//
// cocos2d::CCNode::qsortAllChildrenWithIndex from 0xd40238 to 0xd402bc (132 bytes)
//
// 3 xrefs:
// > PlayLayer::resetLevel @ 0x711848
// > cocos2d::CCNode::sortAllChildrenWithIndex @ 0xd402bc
// > ??> @ 0xb05c0
//
// This function is hookable on this platform (idp: arm, 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 13:07:30 +0000
//
__int64 __fastcall cocos2d::CCNode::qsortAllChildrenWithIndex(cocos2d::CCNode *this)
{
unsigned int *v2; // x1
__int64 v3; // x0
char *v4; // x1
bool (__fastcall *v6)(__int64, __int64); // [xsp+20h] [xbp+20h] BYREF
if ( *((_BYTE *)this + 288) )
{
cocos2d::CCNode::updateChildIndexes((__int64)this);
v2 = *(unsigned int **)(*((_QWORD *)this + 26) + 56LL);
v3 = *((_QWORD *)v2 + 2);
v4 = (char *)(v3 + 8LL * *v2);
v6 = sub_D3C9E0;
std::__sort(
v3,
v4,
(unsigned __int8 (__fastcall **)(__int64, __int64))&v6);
cocos2d::ccArrayRecreateChildIndexes(*(_QWORD *)(*((_QWORD *)this + 26) + 56LL));
}
return _stack_chk_guard;
}