//
// cocos2d::CCDirector::popScene from 0x1004843b0 to 0x10048442e (126 bytes)
//
// 1 xrefs:
// > GJGarageLayer::onBack @ 0x10036bf8e
//
// 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::CCDirector::popScene(cocos2d::CCDirector *a1)
{
int v1; // eax
if ( a1->m_pSceneReference && a1->m_pSceneReference == (cocos2d::CCScene *)sub_1007200E0(a1->m_pobScenesStack) )
a1->m_pSceneReference = nullptr;
sub_100720200(a1->m_pobScenesStack, 1);
v1 = sub_100720070(a1->m_pobScenesStack);
if ( v1 )
{
a1->m_bSendCleanupToScene = 1;
a1->m_pNextScene = (cocos2d::CCScene *)sub_1007200C0(a1->m_pobScenesStack, (unsigned int)(v1 - 1));
}
else
{
a1->m_bPurgeDirecotorInNextLoop = 1;
}
}