//
// cocos2d::CCNode::insertChild from 0xacca00 to 0xacca7c (124 bytes)
//
// 2 xrefs:
// > cocos2d::CCNode::addChild @ 0xaccaa4
// > ??> @ 0xb9280
//
// 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
//
// local variable allocation has failed, the output may be wrong!
void cocos2d::CCNode::insertChild(cocos2d::CCNode *a1, int a2)
{
unsigned int v2; // w2
__int64 v3; // x19
_BOOL4 m_bUseChildIndex; // w3
cocos2d *data; // x0
unsigned int v6; // [xsp+28h] [xbp+28h]
v3 = *(_QWORD *)&a2;
m_bUseChildIndex = a1->m_bUseChildIndex;
a1->m_bReorderChildDirty = 1;
v6 = v2;
data = (cocos2d *)a1->m_pChildren->data;
if ( m_bUseChildIndex )
((void (__fastcall *)(cocos2d *__hidden, int))cocos2d::ccArrayAppendObjectWithResizeChild)(data, a2);
else
((void (__fastcall *)(cocos2d *__hidden, int))cocos2d::ccArrayAppendObjectWithResize)(data, a2);
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v3 + 96LL))(v3, v6);
}