//
// AppDelegate::applicationDidEnterBackground from 0x100307190 to 0x100307270 (224 bytes)
//
// 1 xrefs:
// > ??> @ 0x10092b488
//
// 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:03:08 +0000
//
void __fastcall AppDelegate::applicationDidEnterBackground(_BYTE *a1)
{
__int64 v2; // x0
std::__thread_struct *v3; // x20
_QWORD *v4; // x0
int v5; // w0
__int64 v6; // x0
__int64 v7; // x0
__int64 v8; // x0
__int64 v9; // x0
std::thread v10; // [xsp+0h] [xbp-20h] BYREF
void *v11; // [xsp+8h] [xbp-18h] BYREF
v2 = FMODAudioEngine::sharedEngine();
sub_1001B56B0(v2);
sub_1001F9B74();
sub_1001FA180();
(*(void (__fastcall **)(_BYTE *, _QWORD))(*(_QWORD *)a1 + 64LL))(a1, 0);
v3 = (std::__thread_struct *)operator new(8u);
std::__thread_struct::__thread_struct(v3);
v4 = operator new(8u);
*v4 = v3;
v11 = v4;
v5 = pthread_create(&v10.__t_, nullptr, (void *(__cdecl *)(void *))sub_1003074F8, v4);
if ( v5 )
{
std::__throw_system_error(v5, "thread constructor failed");
__break(1u);
}
else
{
v11 = nullptr;
sub_1002DE574(&v11);
std::thread::detach(&v10);
std::thread::~thread(&v10);
v6 = cocos2d::CCDirector::sharedDirector();
(*(void (__fastcall **)(__int64))(*(_QWORD *)v6 + 104LL))(v6);
v7 = cocos2d::CCDirector::sharedDirector();
cocos2d::CCDirector::pause(v7);
if ( a1[32] == 1 )
{
nullsub_72();
v9 = GameManager::sharedState(v8);
nullsub_178(v9);
}
}
}