//
// GameManager::safePopScene from 0x10031d80c to 0x10031d870 (100 bytes)
//
// 4 xrefs:
// > LevelInfoLayer::onBack @ 0x100028c94
// > LevelSearchLayer::onBack @ 0x100054368
// > LeaderboardsLayer::onBack @ 0x1003b17e8
// > LevelBrowserLayer::onBack @ 0x100418f64
//
// 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
//
bool __fastcall GameManager::safePopScene(GameManager *a1)
{
cocos2d::CCDirector *v1; // x0
int v2; // w20
cocos2d::CCDirector *v3; // x0
cocos2d::CCDirector *v4; // x19
cocos2d::CCScene *v5; // x0
cocos2d::CCTransitionFade *v6; // x1
v1 = cocos2d::CCDirector::sharedDirector();
v2 = cocos2d::CCDirector::sceneCount(v1);
v3 = cocos2d::CCDirector::sharedDirector();
v4 = v3;
if ( v2 > 1 )
return cocos2d::CCDirector::popSceneWithTransition(v3, 0.5, kPopTransitionFade);
v5 = MenuLayer::scene(0);
v6 = cocos2d::CCTransitionFade::create_1(0.5, v5);
return cocos2d::CCDirector::replaceScene(v4, v6);
}