//
// cocos2d::CCNode::sortAllChildrenNoIndex from 0x180005280 to 0x180005386 (262 bytes)
//
// 6 xrefs:
// > cocos2d::CCNode::sortAllChildren @ 0x18000526d
// > cocos2d::CCSpriteBatchNode::sortAllChildren @ 0x1800922fc
// > ??> @ 0x180139c24
// > ??> @ 0x180139c34
// > ??> @ 0x18014cf68
// > ??> @ 0x1801b7684
//
// 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 11:21:18 +0000
//
void __fastcall cocos2d::CCNode::sortAllChildrenNoIndex(cocos2d::CCNode *this)
{
int *v1; // rcx
__int64 v2; // r13
__int64 v3; // r12
__int64 v4; // rbp
int v5; // r15d
__int64 v6; // r14
int v7; // edi
__int64 i; // rsi
int v9; // ebx
int v10; // ebx
unsigned int v11; // ebx
v1 = *(int **)(*((_QWORD *)this + 26) + 56LL);
v2 = *v1;
v3 = *((_QWORD *)v1 + 2);
if ( v2 > 1 )
{
v4 = 1;
v5 = 0;
do
{
v6 = *(_QWORD *)(v3 + 8 * v4);
v7 = v5;
for ( i = v4 - 1; v7 >= 0; --v7 )
{
v9 = (*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(v3 + 8 * i) + 96LL))(*(_QWORD *)(v3 + 8 * i));
if ( (*(int (__fastcall **)(__int64))(*(_QWORD *)v6 + 96LL))(v6) >= v9 )
{
v10 = (*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(v3 + 8 * i) + 96LL))(*(_QWORD *)(v3 + 8 * i));
if ( (*(unsigned int (__fastcall **)(__int64))(*(_QWORD *)v6 + 96LL))(v6) != v10 )
break;
v11 = (*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(v3 + 8 * i) + 408LL))(*(_QWORD *)(v3 + 8 * i));
if ( (*(unsigned int (__fastcall **)(__int64))(*(_QWORD *)v6 + 408LL))(v6) >= v11 )
break;
}
*(_QWORD *)(v3 + 8 * i + 8) = *(_QWORD *)(v3 + 8 * i);
--i;
}
++v5;
*(_QWORD *)(v3 + 8 * i + 8) = v6;
++v4;
}
while ( v4 < v2 );
}
}