//
// cocos2d::CCDirector::popScene from 0xd49b2c to 0xd49b90 (100 bytes)
//
// 2 xrefs:
// > GJGarageLayer::onBack @ 0x8b9780
// > ??> @ 0xbc2c0
//
// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!
//
// 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 13:07:37 +0000
//
cocos2d::CCArray *__fastcall cocos2d::CCDirector::popScene(cocos2d::CCArray **this)
{
int v2; // w1
cocos2d::CCArray *v3; // x0
cocos2d::CCArray *result; // x0
cocos2d::CCDirector::checkSceneReference((__int64)this);
cocos2d::CCArray::removeLastObject(*(this + 37), 1u);
v2 = cocos2d::CCArray::count(*(this + 37));
if ( !v2 )
return (cocos2d::CCArray *)cocos2d::CCDirector::end((__int64)this);
v3 = *(this + 37);
*((_BYTE *)this + 288) = 1;
result = (cocos2d::CCArray *)cocos2d::CCArray::objectAtIndex(v3, v2 - 1);
*(this + 35) = result;
return result;
}