//
// cocos2d::CCNode::onExit from 0x5be4a0 to 0x5be4fa (90 bytes)
//
// 3 xrefs:
// > cocos2d::CCLayer::onExit @ 0x5d03fe
// > cocos2d::CCTransitionScene::onExit @ 0x5d3088
// > cocos2d::CCClippingNode::onExit @ 0x5d63b6
//
// 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 cocos2d::CCNode::onExit(cocos2d::CCNode *a1)
{
cocos2d::CCArray *m_pChildren; // r3
cocos2d::CCScriptEngineManager *v3; // r0
cocos2d::ccArray *data; // r2
cocos2d::CCObject **arr; // r5
cocos2d::CCObject **v6; // r4
int v7; // r0
int v8; // t1
cocos2d::CCNode::pauseSchedulerAndActions(a1);
a1->m_bRunning = 0;
m_pChildren = a1->m_pChildren;
if ( m_pChildren )
{
data = m_pChildren->data;
if ( data->num )
{
arr = data->arr;
v6 = &arr[data->num] + 0x3FFFFFFF;
while ( arr <= v6 )
{
v8 = (int)*arr++;
v7 = v8;
if ( !v8 )
break;
(*(void (__fastcall **)(int))(*(_DWORD *)v7 + 352))(v7);
}
}
}
if ( a1->m_eScriptType )
{
v3 = cocos2d::CCScriptEngineManager::sharedManager();
(*(void (__fastcall **)(_DWORD, cocos2d::CCNode *, int))(**(_DWORD **)v3 + 36))(*(_DWORD *)v3, a1, 1);
}
}