//
// cocos2d::CCNode::sortAllChildrenNoIndex from 0x1002737d0 to 0x1002738cf (255 bytes)
//
// 1 xrefs:
// > cocos2d::CCSpriteBatchNode::sortAllChildren @ 0x100176f7e
//
// 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::sortAllChildrenNoIndex(cocos2d::CCNode *a1)
{
cocos2d::ccArray *data; // rax
cocos2d::CCObject **arr; // rbx
__int64 v3; // r14
int v4; // eax
cocos2d::CCObject *v5; // r15
int v6; // r13d
int v7; // r13d
unsigned int v8; // r13d
__int64 v9; // [rsp+0h] [rbp-40h]
__int64 num; // [rsp+8h] [rbp-38h]
__int64 v11; // [rsp+10h] [rbp-30h]
data = a1->m_pChildren->data;
num = (int)data->num;
if ( num >= 2 )
{
arr = data->arr;
v3 = 1;
do
{
v5 = arr[v3];
v9 = v3;
while ( 1 )
{
v11 = v3--;
v6 = ((__int64 (__fastcall *)(cocos2d::CCObject *))v5->__vftable[1].isEqual)(v5);
if ( v6 >= ((int (__fastcall *)(cocos2d::CCObject *))arr[(unsigned int)v3]->__vftable[1].isEqual)(arr[(unsigned int)v3]) )
{
v7 = ((__int64 (__fastcall *)(cocos2d::CCObject *))v5->__vftable[1].isEqual)(v5);
if ( v7 != ((unsigned int (__fastcall *)(cocos2d::CCObject *))arr[(unsigned int)v3]->__vftable[1].isEqual)(arr[(unsigned int)v3]) )
break;
v8 = ((__int64 (__fastcall *)(cocos2d::CCObject *))v5->__vftable[5].copyWithZone)(v5);
if ( v8 >= ((unsigned int (__fastcall *)(cocos2d::CCObject *))arr[(unsigned int)v3]->__vftable[5].copyWithZone)(arr[(unsigned int)v3]) )
break;
}
arr[v11] = arr[(unsigned int)v3];
if ( v3 + 1 <= 1 )
{
v4 = 0;
goto LABEL_4;
}
}
v4 = v11;
LABEL_4:
arr[v4] = v5;
v3 = v9 + 1;
}
while ( v9 + 1 != num );
}
}