//
// cocos2d::CCLayer::onExit from 0x7d8514 to 0x7d8592 (126 bytes)
//
// 22 xrefs:
// > cocos2d::CCScrollLayer::~CCScrollLayer @ 0x3c7e88
// > TableView::onExit @ 0x3ca938
// > CCTextInputNode::onExit @ 0x3e4baa
// > PlayLayer::onExit @ 0x3ff7d6
// > GJPromoPopup::onExit @ 0x5d3e52
// > GauntletSelectLayer::onExit @ 0x60d97c
// > GJShopLayer::onExit @ 0x613992
// > SecretLayer3::onExit @ 0x61a46a
// > SecretLayer2::onExit @ 0x61a6a8
// > SecretLayer4::onExit @ 0x623404
// > WorldSelectLayer::onExit @ 0x62caac
// > MapSelectLayer::onExit @ 0x640fae
// > LevelAreaLayer::onExit @ 0x6a5d28
// > LevelAreaInnerLayer::onExit @ 0x6a5d5c
// > SecretRewardsLayer::onExit @ 0x6cfef2
// > GJPathsLayer::onExit @ 0x6d1744
// > LevelListLayer::onExit @ 0x6d48d6
// > SecretLayer5::onExit @ 0x6e2884
// > EditorWindowPopup::onExit @ 0x78d2e0
// > TouchControlEditLayer::onExit @ 0x7a353c
// > cocos2d::extension::CCControl::onExit @ 0x7a6d4c
// > cocos2d::CCMenu::onExit @ 0x7dce24
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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 12:00:41 +0000
//
cocos2d::CCScriptEngineManager *__fastcall cocos2d::CCLayer::onExit(cocos2d::CCLayer *this)
{
int v2; // r0
int v3; // r1
int v4; // r2
int v5; // r5
cocos2d::CCTouchDispatcher *v6; // r0
int v7; // r0
cocos2d::CCKeypadDelegate *v8; // r0
cocos2d::CCKeyboardDispatcher *v9; // r0
cocos2d::CCMouseDispatcher *v10; // r0
v2 = cocos2d::CCDirector::sharedDirector(this);
v5 = v2;
if ( *((_BYTE *)this + 284) )
{
v6 = (cocos2d::CCTouchDispatcher *)(*(int (__fastcall **)(int))(*(_DWORD *)v2 + 80))(v2);
cocos2d::CCTouchDispatcher::removeDelegate(v6, (cocos2d::CCLayer *)((char *)this + 264));
}
if ( *((_BYTE *)this + 285) )
{
v7 = (*(int (__fastcall **)(int))(*(_DWORD *)v5 + 112))(v5);
cocos2d::CCAccelerometer::setDelegate(v7, 0);
}
if ( *((_BYTE *)this + 286) )
{
v8 = (cocos2d::CCKeypadDelegate *)(*(int (__fastcall **)(int))(*(_DWORD *)v5 + 88))(v5);
cocos2d::CCKeypadDispatcher::removeDelegate(v8, (cocos2d::CCLayer *)((char *)this + 272));
}
if ( *((_BYTE *)this + 287) )
{
v9 = (cocos2d::CCKeyboardDispatcher *)(*(int (__fastcall **)(int))(*(_DWORD *)v5 + 96))(v5);
cocos2d::CCKeyboardDispatcher::removeDelegate(v9, (cocos2d::CCLayer *)((char *)this + 276));
}
if ( *((_BYTE *)this + 288) )
{
v10 = (cocos2d::CCMouseDispatcher *)(*(int (__fastcall **)(int))(*(_DWORD *)v5 + 104))(v5);
cocos2d::CCMouseDispatcher::removeDelegate(v10, (cocos2d::CCLayer *)((char *)this + 280));
}
return cocos2d::CCNode::onExit(this, v3, v4);
}