//
// cocos2d::CCSprite::sortAllChildren from 0x7f084c to 0x7f0936 (234 bytes)
//
// 0 xrefs:
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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:01:04 +0000
//
int __fastcall cocos2d::CCSprite::sortAllChildren(int this)
{
int v1; // r11
int v2; // r6
int *v3; // r3
_DWORD *v4; // r10
_DWORD *v5; // r8
_DWORD *v6; // r4
_DWORD *v7; // t1
int v8; // r7
_DWORD *i; // r5
int v10; // r9
int v11; // r3
int v12; // r3
_DWORD *v13; // r1
int *v14; // r5
int *v15; // r4
int v16; // t1
int v17; // [sp+0h] [bp-Ch]
int v18; // [sp+4h] [bp-8h]
int v19; // [sp+4h] [bp-8h]
unsigned int v20; // [sp+4h] [bp-8h]
v1 = this;
if ( *(_BYTE *)(this + 240) )
{
v2 = 1;
v3 = *(int **)(*(_DWORD *)(this + 192) + 52);
v4 = (_DWORD *)v3[3];
v5 = v4;
v17 = *v3;
while ( v2 < v17 )
{
v7 = (_DWORD *)v5[1];
++v5;
v6 = v7;
v8 = v2 - 1;
for ( i = v5; ; --i )
{
v10 = v8 + 1;
if ( v8 < 0 )
break;
v18 = (*(int (__fastcall **)(_DWORD *))(*v6 + 52))(v6);
this = (*(int (__fastcall **)(_DWORD))(*(_DWORD *)*(i - 1) + 52))(*(i - 1));
if ( v18 >= this )
{
v19 = (*(int (__fastcall **)(_DWORD *))(*v6 + 52))(v6);
this = (*(int (__fastcall **)(_DWORD))(*(_DWORD *)*(i - 1) + 52))(*(i - 1));
if ( v19 != this )
break;
v20 = (*(int (__fastcall **)(_DWORD *))(*v6 + 208))(v6);
this = (*(int (__fastcall **)(_DWORD))(*(_DWORD *)*(i - 1) + 208))(*(i - 1));
if ( v20 >= this )
break;
}
v11 = *(i - 1);
--v8;
*i = v11;
*(_DWORD *)(v11 + 32) = v10;
}
v4[v10] = v6;
++v2;
v6[8] = v10;
}
if ( *(_DWORD *)(v1 + 292) )
{
v12 = *(_DWORD *)(v1 + 192);
if ( v12 )
{
v13 = *(_DWORD **)(v12 + 52);
if ( *v13 )
{
v14 = (int *)v13[3];
v15 = &v14[*v13 - 1];
while ( v14 <= v15 )
{
v16 = *v14++;
this = v16;
if ( !v16 )
break;
this = (*(int (__fastcall **)(int))(*(_DWORD *)this + 300))(this);
}
}
}
}
*(_BYTE *)(v1 + 240) = 0;
}
return this;
}