//
// cocos2d::CCDirector::popScene from 0x100207668 to 0x1002076e0 (120 bytes)
//
// 1 xrefs:
// > GJGarageLayer::onBack @ 0x1003a1120
//
// 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 11:00:57 +0000
//
__int64 __fastcall cocos2d::CCDirector::popScene(__int64 a1)
{
__int64 result; // x0
if ( *(_QWORD *)(a1 + 96) && *(_QWORD *)(a1 + 96) == sub_1002E75B0(*(_QWORD *)(a1 + 296)) )
*(_QWORD *)(a1 + 96) = 0;
sub_1002E7648(*(_QWORD *)(a1 + 296), 1);
result = sub_1002E757C(*(_QWORD *)(a1 + 296));
if ( (_DWORD)result )
{
*(_BYTE *)(a1 + 288) = 1;
result = sub_1002E75A0(*(_QWORD *)(a1 + 296), (unsigned int)(result - 1));
*(_QWORD *)(a1 + 280) = result;
}
else
{
*(_BYTE *)(a1 + 184) = 1;
}
return result;
}