//
// cocos2d::CCNode::setUseChildIndex from 0x1002d8c34 to 0x1002d8ca4 (112 bytes)
//
// 1 xrefs:
// > GJBaseGameLayer::setupLayers @ 0x100277bb8
//
// 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 11:02:43 +0000
//
__int64 __fastcall cocos2d::CCNode::setUseChildIndex(__int64 result, int a2)
{
__int64 v2; // x19
unsigned int *v3; // x10
__int64 v4; // x8
__int64 v5; // x9
__int64 v6; // x10
if ( *(unsigned __int8 *)(result + 312) != a2 )
{
v2 = result;
*(_BYTE *)(result + 312) = a2;
if ( a2 )
{
result = *(_QWORD *)(result + 208);
if ( result )
{
result = sub_1002E757C(result);
if ( (_DWORD)result )
{
v3 = *(unsigned int **)(*(_QWORD *)(v2 + 208) + 56LL);
v4 = *v3;
if ( (int)v4 >= 1 )
{
v5 = 0;
v6 = *((_QWORD *)v3 + 2);
do
{
*(_DWORD *)(*(_QWORD *)(v6 + 8 * v5) + 36LL) = v5;
++v5;
}
while ( v4 != v5 );
}
}
}
}
}
return result;
}