//
// cocos2d::CCTiledGrid3D::calculateVertexPoints from 0x7cde34 to 0x7ce002 (462 bytes)
//
// 0 xrefs:
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 12:00:33 +0000
//
void *__fastcall cocos2d::CCTiledGrid3D::calculateVertexPoints(cocos2d::CCTiledGrid3D *this)
{
float v2; // s16
float v3; // s17
int ContentSizeInPixels; // r0
int v5; // r6
float v6; // s18
void *v7; // r0
void *v8; // r0
void *v9; // r0
void *v10; // r0
char *v11; // r8
void *v12; // r0
void *v13; // r9
char *v14; // r0
char *v15; // r5
_WORD *v16; // r0
float v17; // s9
char *v18; // r1
int v19; // r12
float v20; // s11
__int16 v21; // r3
int v22; // r2
float v23; // s10
char *v24; // r3
float *v25; // r5
int v26; // r10
float v27; // s13
int v28; // r2
float v29; // s14
float v30; // s12
float v31; // s15
float v32; // s13
float v33; // s14
float v34; // s12
float v35; // s15
float v36; // s13
float v37; // s14
v2 = (float)(unsigned int)(*(int (__fastcall **)(_DWORD))(**((_DWORD **)this + 17) + 44))(*((_DWORD *)this + 17));
v3 = (float)(unsigned int)(*(int (__fastcall **)(_DWORD))(**((_DWORD **)this + 17) + 48))(*((_DWORD *)this + 17));
ContentSizeInPixels = cocos2d::CCTexture2D::getContentSizeInPixels(*((cocos2d::CCTexture2D **)this + 17));
v5 = (int)(float)(*((float *)this + 15) * *((float *)this + 16));
v6 = *(float *)(ContentSizeInPixels + 4);
v7 = *((void **)this + 25);
if ( v7 )
{
free(v7);
*((_DWORD *)this + 25) = 0;
}
v8 = *((void **)this + 26);
if ( v8 )
{
free(v8);
*((_DWORD *)this + 26) = 0;
}
v9 = *((void **)this + 24);
if ( v9 )
{
free(v9);
*((_DWORD *)this + 24) = 0;
}
v10 = *((void **)this + 27);
if ( v10 )
free(v10);
v11 = (char *)malloc(48 * v5);
*((_DWORD *)this + 25) = v11;
v12 = malloc(48 * v5);
*((_DWORD *)this + 26) = v12;
v13 = v12;
v14 = (char *)malloc(32 * v5);
*((_DWORD *)this + 24) = v14;
v15 = v14;
v16 = malloc(12 * v5);
v17 = *((float *)this + 15);
v18 = v11;
v19 = 0;
*((_DWORD *)this + 27) = v16;
while ( 1 )
{
v20 = (float)v19;
if ( (float)v19 >= v17 )
break;
v23 = *((float *)this + 16);
v24 = v18 + 48;
v25 = (float *)(v15 + 32);
v26 = 0;
while ( 1 )
{
v18 = v24 - 48;
if ( (float)v26 >= v23 )
break;
v27 = *((float *)this + 18);
v28 = *((unsigned __int8 *)this + 84);
*((_DWORD *)v24 - 10) = 0;
v29 = *((float *)this + 19);
*((_DWORD *)v24 - 7) = 0;
*((_DWORD *)v24 - 4) = 0;
v30 = v20 * v27;
*((_DWORD *)v24 - 1) = 0;
v31 = (float)v26 * v29;
*((float *)v24 - 12) = v20 * v27;
*((float *)v24 - 6) = v20 * v27;
v32 = (float)(v20 * v27) + v27;
*((float *)v24 - 11) = v31;
*((float *)v24 - 8) = v31;
v33 = v31 + v29;
*((float *)v24 - 9) = v32;
*((float *)v24 - 3) = v32;
*((float *)v24 - 5) = v33;
*((float *)v24 - 2) = v33;
if ( v28 )
{
v31 = v6 - v31;
v33 = v6 - v33;
}
++v26;
v24 += 48;
v25 += 8;
v34 = v30 / v2;
v35 = v31 / v3;
*(v25 - 16) = v34;
*(v25 - 12) = v34;
v36 = v32 / v2;
*(v25 - 15) = v35;
*(v25 - 13) = v35;
v37 = v33 / v3;
*(v25 - 14) = v36;
*(v25 - 10) = v36;
*(v25 - 11) = v37;
*(v25 - 9) = v37;
}
v15 = (char *)(v25 - 8);
++v19;
}
v21 = 1;
v22 = 0;
while ( 1 )
{
v16 += 6;
if ( v22 >= v5 )
break;
*(v16 - 6) = 4 * v22;
*(v16 - 5) = v21;
*(v16 - 3) = v21;
++v22;
*(v16 - 4) = v21 + 1;
*(v16 - 2) = v21 + 1;
*(v16 - 1) = v21 + 2;
v21 += 4;
}
return sub_AF7CD4(v13, v11, 48 * v5);
}