//
// AppDelegate::willSwitchToScene from 0x140098cc0 to 0x140098dfa (314 bytes)
//
// 2 xrefs:
// > ??> @ 0x140719f78
// > ??> @ 0x140912d70
//
// 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 11:26:04 +0000
//
void __fastcall AppDelegate::willSwitchToScene(__int64 a1, __int64 a2)
{
__int64 v3; // rdi
__int64 v4; // rcx
__int64 v5; // rdi
__int64 v6; // rcx
__int64 v7; // rdx
__int64 v8; // r8
v3 = AchievementNotifier::sharedState();
v4 = *(_QWORD *)(v3 + 336);
*(_QWORD *)(v3 + 320) = a2;
if ( v4 && (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v4 + 504LL))(v4) != a2 )
{
cocos2d::CCObject::retain(*(cocos2d::CCObject **)(v3 + 336));
(*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(v3 + 336) + 520LL))(*(_QWORD *)(v3 + 336), 0);
(*(void (__fastcall **)(__int64, _QWORD, __int64))(*(_QWORD *)a2 + 456LL))(a2, *(_QWORD *)(v3 + 336), 105);
cocos2d::CCObject::release(*(cocos2d::CCObject **)(v3 + 336));
cocos2d::CCNode::resumeSchedulerAndActions(*(cocos2d::CCNode **)(v3 + 336));
}
v5 = sub_14006CDD0();
v6 = *(_QWORD *)(v5 + 376);
*(_QWORD *)(v5 + 384) = a2;
if ( v6 && (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v6 + 504LL))(v6) != a2 )
{
cocos2d::CCObject::retain(*(cocos2d::CCObject **)(v5 + 376));
(*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(v5 + 376) + 520LL))(*(_QWORD *)(v5 + 376), 0);
v7 = *(_QWORD *)(v5 + 376);
v8 = *(unsigned int *)(v7 + 592);
if ( !(_DWORD)v8 )
v8 = 105;
(*(void (__fastcall **)(__int64, __int64, __int64))(*(_QWORD *)a2 + 456LL))(a2, v7, v8);
cocos2d::CCObject::release(*(cocos2d::CCObject **)(v5 + 376));
cocos2d::CCNode::resumeSchedulerAndActions(*(cocos2d::CCNode **)(v5 + 376));
}
if ( qword_140909788 )
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)qword_140909788 + 1032LL))(qword_140909788, 0);
}