//
// cocos2d::CCDirector::popScene from 0x100478d40 to 0x100478dbe (126 bytes)
//
// 1 xrefs:
// > GJGarageLayer::onBack @ 0x10035539e
//
// This function is hookable on this platform (idp: pc, 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 12:30:36 +0000
//
__int64 __fastcall cocos2d::CCDirector::popScene(__int64 a1)
{
__int64 result; // rax
if ( *(_QWORD *)(a1 + 96) && *(_QWORD *)(a1 + 96) == sub_1007FF000(*(_QWORD *)(a1 + 296)) )
*(_QWORD *)(a1 + 96) = 0;
sub_1007FF120(*(_QWORD *)(a1 + 296), 1);
result = sub_1007FEF90(*(_QWORD *)(a1 + 296));
if ( (_DWORD)result )
{
*(_BYTE *)(a1 + 288) = 1;
result = sub_1007FEFE0(*(_QWORD *)(a1 + 296), (unsigned int)(result - 1));
*(_QWORD *)(a1 + 280) = result;
}
else
{
*(_BYTE *)(a1 + 184) = 1;
}
return result;
}