//
// cocos2d::CCShuffleTiles::startWithTarget from 0x7c21ac to 0x7c2306 (346 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:21 +0000
//
int __fastcall cocos2d::CCShuffleTiles::startWithTarget(unsigned int **this, cocos2d::CCNode *a2)
{
unsigned int v3; // r0
unsigned int v4; // s15
unsigned int v5; // r0
unsigned int *v6; // r0
unsigned int v7; // r3
unsigned int v8; // r2
unsigned int v9; // r8
int v10; // r9
unsigned int v11; // r0
int result; // r0
unsigned int *v13; // r5
int v14; // r7
int v15; // r9
int v16; // r8
float v17; // s17
float v18; // r2
unsigned int *v19; // r0
float v20[2]; // [sp+4h] [bp-14h] BYREF
_BYTE v21[8]; // [sp+Ch] [bp-Ch] BYREF
cocos2d::CCGridAction::startWithTarget((cocos2d::CCGridAction *)this, a2);
v3 = (unsigned int)*(this + 22);
if ( v3 != -1 )
srand(v3);
v4 = (unsigned int)(float)(*((float *)this + 20) * *((float *)this + 21));
*(this + 23) = (unsigned int *)v4;
if ( v4 > 0x1FC00000 )
v5 = -1;
else
v5 = 4 * v4;
v6 = (unsigned int *)operator new[](v5);
v7 = 0;
*(this + 24) = v6;
while ( 1 )
{
v8 = (unsigned int)*(this + 23);
if ( v7 >= v8 )
break;
(*(this + 24))[v7] = v7;
++v7;
}
cocos2d::CCShuffleTiles::shuffle((cocos2d::CCShuffleTiles *)this, *(this + 24), v8);
v9 = (unsigned int)*(this + 23);
v10 = 0;
if ( v9 > 0x5500000 )
v11 = -1;
else
v11 = 24;
if ( v9 <= 0x5500000 )
v11 *= v9;
result = operator new[](v11);
v13 = (unsigned int *)result;
v14 = result;
while ( v10 != v9 )
{
++v10;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v14);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)(v14 + 8));
result = cocos2d::CCSize::CCSize((cocos2d::CCSize *)(v14 + 16));
v14 += 24;
}
v15 = 0;
*(this + 25) = v13;
while ( (float)v15 < *((float *)this + 20) )
{
v16 = 0;
while ( 1 )
{
v17 = (float)v16;
if ( (float)v16 >= *((float *)this + 21) )
break;
v18 = (float)v16++;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v21, (float)v15, v18);
cocos2d::CCPoint::operator=(v13, v21);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v21, (float)v15, v17);
cocos2d::CCPoint::operator=(v13 + 2, v21);
cocos2d::CCSize::CCSize((cocos2d::CCSize *)v20, (float)v15, v17);
cocos2d::CCShuffleTiles::getDelta((cocos2d::CCShuffleTiles *)v21, (const cocos2d::CCSize *)this, v20);
v19 = v13 + 4;
v13 += 6;
result = cocos2d::CCSize::operator=(v19, v21);
}
++v15;
}
return result;
}