//
// cocos2d::CCDirector::popScene from 0x1001760e8 to 0x100176160 (120 bytes)
//
// 1 xrefs:
// > GJGarageLayer::onBack @ 0x100304420
//
// 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 v2; // w0
if ( a1->m_pSceneReference && a1->m_pSceneReference == (cocos2d::CCScene *)sub_10024A398(a1->m_pobScenesStack) )
a1->m_pSceneReference = nullptr;
sub_10024A430(a1->m_pobScenesStack, 1);
v2 = sub_10024A36C(a1->m_pobScenesStack);
if ( v2 )
{
a1->m_bSendCleanupToScene = 1;
a1->m_pNextScene = (cocos2d::CCScene *)sub_10024A388(a1->m_pobScenesStack, (unsigned int)(v2 - 1));
}
else
{
a1->m_bPurgeDirecotorInNextLoop = 1;
}
}