//
// cocos2d::CCDirector::popScene from 0xad6eec to 0xad6f50 (100 bytes)
//
// 2 xrefs:
// > GJGarageLayer::onBack @ 0x790064
// > ??> @ 0x8e260
//
// 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::CCDirector::popScene(cocos2d::CCDirector *a1)
{
int v2; // w1
cocos2d::CCArray *m_pobScenesStack; // x0
cocos2d::CCDirector::checkSceneReference(a1);
cocos2d::CCArray::removeLastObject(a1->m_pobScenesStack, 1u);
v2 = cocos2d::CCArray::count(a1->m_pobScenesStack);
if ( v2 )
{
m_pobScenesStack = a1->m_pobScenesStack;
a1->m_bSendCleanupToScene = 1;
a1->m_pNextScene = (cocos2d::CCScene *)cocos2d::CCArray::objectAtIndex(m_pobScenesStack, v2 - 1);
}
else
{
cocos2d::CCDirector::end(a1);
}
}