//
// cocos2d::CCNode::qsortAllChildrenWithIndex from 0x180004520 to 0x18000458b (107 bytes)
//
// 6 xrefs:
// > cocos2d::CCNode::sortAllChildren @ 0x18000516b
// > cocos2d::CCNode::sortAllChildrenWithIndex @ 0x180005290
// > ??> @ 0x180130ddc
// > ??> @ 0x180130dec
// > ??> @ 0x1801438a8
// > ??> @ 0x1801ad48c
//
// 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::qsortAllChildrenWithIndex(cocos2d::CCNode *this)
{
cocos2d::CCArray **p_m_pChildren; // rbx
if ( this->m_bReorderChildDirty )
{
p_m_pChildren = &this->m_pChildren;
if ( this->m_bUseChildIndex )
sub_18009E0E0((*p_m_pChildren)->data);
sub_1800023F0(
(char *)(*p_m_pChildren)->data->arr,
(__int64 *)&(*p_m_pChildren)->data->arr[(*p_m_pChildren)->data->num],
(*p_m_pChildren)->data->num,
(unsigned __int8 (__fastcall *)(__int64, __int64))sub_180004150);
sub_18009DCF0((*p_m_pChildren)->data);
}
}