//
// sub_100747190 from 0x100747190 to 0x100747241 (177 bytes)
//
// 3 xrefs:
// > cocos2d::CCNode::sortAllChildren @ 0x10025fbdc
// > cocos2d::CCNode::sortAllChildrenWithIndex @ 0x10025fd59
// > cocos2d::CCNode::qsortAllChildrenWithIndex @ 0x10025fee9
//
// This function is hookable on this platform (idp: pc, 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 12:36:31 +0000
//
void __fastcall sub_100747190(int *a1)
{
__int64 v1; // rsi
__int64 v2; // rax
__int64 v3; // rcx
__int64 v4; // rdx
__int64 v5; // rsi
v1 = *a1;
if ( v1 > 0 )
{
v2 = *((_QWORD *)a1 + 2);
v3 = v1 & 7;
if ( (unsigned int)v1 >= 8 )
{
v5 = v1 & 0x7FFFFFF8;
v4 = 0;
do
{
*(_DWORD *)(*(_QWORD *)(v2 + 8 * v4) + 36LL) = v4;
*(_DWORD *)(*(_QWORD *)(v2 + 8 * v4 + 8) + 36LL) = v4 + 1;
*(_DWORD *)(*(_QWORD *)(v2 + 8 * v4 + 16) + 36LL) = v4 + 2;
*(_DWORD *)(*(_QWORD *)(v2 + 8 * v4 + 24) + 36LL) = v4 + 3;
*(_DWORD *)(*(_QWORD *)(v2 + 8 * v4 + 32) + 36LL) = v4 + 4;
*(_DWORD *)(*(_QWORD *)(v2 + 8 * v4 + 40) + 36LL) = v4 + 5;
*(_DWORD *)(*(_QWORD *)(v2 + 8 * v4 + 48) + 36LL) = v4 + 6;
*(_DWORD *)(*(_QWORD *)(v2 + 8 * v4 + 56) + 36LL) = v4 + 7;
v4 += 8;
}
while ( v4 != v5 );
}
else
{
v4 = 0;
}
for ( ; v3; --v3 )
{
*(_DWORD *)(*(_QWORD *)(v2 + 8 * v4) + 36LL) = v4;
++v4;
}
}
}