//
// AppDelegate::applicationWillTerminate from 0x6e648c to 0x6e64cc (64 bytes)
//
// 2 xrefs:
// > ??> @ 0xe6668
// > ??> @ 0x1425218
//
// 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 12:51:43 +0000
//
__int64 __fastcall AppDelegate::applicationWillTerminate(AppDelegate *this)
{
GameManager *v1; // x0
GManager *v2; // x0
LocalLevelManager *v3; // x0
GManager *v4; // x0
v1 = (GameManager *)(*(__int64 (__fastcall **)(AppDelegate *, _QWORD))(*(_QWORD *)this + 64LL))(this, 0);
v2 = (GManager *)GameManager::sharedState(v1);
v3 = (LocalLevelManager *)GManager::waitForSave(v2, 2.0);
v4 = (GManager *)LocalLevelManager::sharedState(v3);
return GManager::waitForSave(v4, 2.0);
}