//
// cocos2d::ccArrayUpdateChildIndexes from 0xd91f20 to 0xd91f98 (120 bytes)
//
// 4 xrefs:
// > cocos2d::CCNode::updateChildIndexes @ 0xd3ead0
// > cocos2d::ccArrayAppendObjectChild @ 0xd91fac
// > cocos2d::ccArrayRemoveAllObjects @ 0xd92024
// > ??> @ 0xe3698
//
// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!
//
// 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 13:08:19 +0000
//
__int64 __fastcall cocos2d::ccArrayUpdateChildIndexes(__int64 result)
{
int v1; // w7
__int64 v2; // x2
int v3; // w1
int v4; // w6
__int64 v5; // x4
int v6; // w3
__int64 v7; // x5
v1 = *(_DWORD *)(result + 8);
if ( v1 != -1 )
{
if ( v1 > 0 )
{
v2 = 0;
v3 = 0;
v4 = 0;
do
{
while ( 1 )
{
v5 = *(_QWORD *)(result + 16);
v6 = v3 - v4;
v7 = *(_QWORD *)(v5 + v2);
if ( v7 )
break;
++v3;
++v4;
v2 += 8;
if ( v1 == v3 )
goto LABEL_9;
}
if ( v4 )
{
*(_QWORD *)(v5 + 8LL * v6) = v7;
*(_DWORD *)(*(_QWORD *)(*(_QWORD *)(result + 16) + 8LL * v6) + 36LL) = v6;
}
++v3;
v2 += 8;
}
while ( v1 != v3 );
}
LABEL_9:
*(_DWORD *)(result + 8) = -1;
}
return result;
}