//
// cocos2d::CCNode::setUseChildIndex from 0x1002734a0 to 0x1002735a6 (262 bytes)
//
// 1 xrefs:
// > GJBaseGameLayer::setupLayers @ 0x100113d5d
//
// 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
//
void __fastcall cocos2d::CCNode::setUseChildIndex(cocos2d::CCNode *a1, bool a2)
{
cocos2d::CCArray *m_pChildren; // rax
cocos2d::ccArray *data; // rax
__int64 num; // rsi
cocos2d::CCObject **arr; // rax
__int64 v6; // rcx
__int64 v7; // rdx
__int64 v8; // rsi
if ( a1->m_bUseChildIndex != a2 )
{
a1->m_bUseChildIndex = a2;
if ( a2 )
{
m_pChildren = a1->m_pChildren;
if ( m_pChildren )
{
if ( (unsigned int)sub_100720070(m_pChildren) )
{
data = a1->m_pChildren->data;
num = (int)data->num;
if ( num > 0 )
{
arr = data->arr;
v6 = num & 7;
if ( (unsigned int)num >= 8 )
{
v8 = num & 0x7FFFFFF8;
v7 = 0;
do
{
arr[v7]->m_uUnknown = v7;
arr[v7 + 1]->m_uUnknown = v7 + 1;
arr[v7 + 2]->m_uUnknown = v7 + 2;
arr[v7 + 3]->m_uUnknown = v7 + 3;
arr[v7 + 4]->m_uUnknown = v7 + 4;
arr[v7 + 5]->m_uUnknown = v7 + 5;
arr[v7 + 6]->m_uUnknown = v7 + 6;
arr[v7 + 7]->m_uUnknown = v7 + 7;
v7 += 8;
}
while ( v7 != v8 );
}
else
{
v7 = 0;
}
for ( ; v6; --v6 )
{
arr[v7]->m_uUnknown = v7;
++v7;
}
}
}
}
}
}
}