//
// cocos2d::CCNode::detachChild from 0x180003220 to 0x1800032ba (154 bytes)
//
// 3 xrefs:
// > cocos2d::CCNode::removeChild @ 0x1800046d8
// > ??> @ 0x1801438a8
// > ??> @ 0x1801ad2a0
//
// 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::detachChild(cocos2d::CCNode *this, struct cocos2d::CCNode *a2, char a3)
{
cocos2d::CCArray *m_pChildren; // rcx
if ( this->m_bRunning )
{
((void (__fastcall *)(struct cocos2d::CCNode *))a2->onExitTransitionDidStart)(a2);
((void (__fastcall *)(struct cocos2d::CCNode *))a2->onExit)(a2);
}
if ( a3 )
((void (__fastcall *)(struct cocos2d::CCNode *))a2->cleanup)(a2);
((void (__fastcall *)(struct cocos2d::CCNode *, _QWORD))a2->setParent)(a2, 0);
m_pChildren = this->m_pChildren;
if ( this->m_bUseChildIndex )
cocos2d::CCArray::removeObjectAtIndexChild(m_pChildren, a2->m_uUnknown, 1);
else
cocos2d::CCArray::removeObject(m_pChildren, a2, 1);
}