//
// cocos2d::ccArrayUpdateChildIndexes from 0xb213b0 to 0xb21428 (120 bytes)
//
// 4 xrefs:
// > cocos2d::CCNode::updateChildIndexes @ 0xaccb60
// > cocos2d::ccArrayAppendObjectChild @ 0xb2143c
// > cocos2d::ccArrayRemoveAllObjects @ 0xb214ac
// > ??> @ 0xadc28
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
__int64 __fastcall cocos2d::ccArrayUpdateChildIndexes(__int64 result)
{
int v1; // w7
__int64 v2; // x3
__int64 v3; // x2
int v4; // w1
int v5; // w6
__int64 v6; // x5
int v7; // w4
v1 = *(_DWORD *)(result + 8);
if ( v1 != -1 )
{
if ( v1 > 0 )
{
v2 = *(_QWORD *)(result + 16);
v3 = 0;
v4 = 0;
v5 = 0;
do
{
while ( 1 )
{
v6 = *(_QWORD *)(v2 + v3);
v7 = v4 - v5;
if ( v6 )
break;
++v4;
++v5;
v3 += 8;
if ( v1 == v4 )
goto LABEL_9;
}
if ( v5 )
{
*(_QWORD *)(v2 + 8LL * v7) = v6;
v2 = *(_QWORD *)(result + 16);
*(_DWORD *)(*(_QWORD *)(v2 + 8LL * v7) + 36LL) = v7;
}
++v4;
v3 += 8;
}
while ( v1 != v4 );
}
LABEL_9:
*(_DWORD *)(result + 8) = -1;
}
return result;
}