//
// sub_10009EE54 from 0x10009ee54 to 0x10009ef8c (312 bytes)
//
// 1 xrefs:
// > GameLevelManager::handleIt @ 0x100094444
//
// 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 10:58:30 +0000
//
__int64 (***__fastcall sub_10009EE54(__int64 a1, char *a2, __int64 a3))(void)
{
unsigned __int64 v6; // x8
void *v7; // x22
int v8; // w0
int v9; // w20
__int64 (***result)(void); // x0
__int64 (**v11)(void); // x8
std::string v12; // [xsp+0h] [xbp-40h] BYREF
std::allocator __a; // [xsp+1Fh] [xbp-21h] BYREF
sub_1000D94D0(a1 + 720, a3);
v6 = *(char *)(a3 + 23);
if ( (v6 & 0x8000000000000000LL) != 0 )
v6 = *(_QWORD *)(a3 + 8);
if ( v6 >= 9 )
{
std::string::basic_string(&v12, (const std::string *)a3, 8u, 0xFFFFFFFFFFFFFFFFLL, &__a);
if ( SHIBYTE(v12.__r_.__value_.__r.__words[2]) < 0 )
{
v7 = (void *)v12.__r_.__value_.__r.__words[0];
atoi(v12.__r_.__value_.__l.__data_);
operator delete(v7);
}
else
{
atoi((const char *)&v12);
}
}
sub_100009900(&v12, "-1");
if ( sub_1000045BC(a2, &v12) )
{
if ( SHIBYTE(v12.__r_.__value_.__r.__words[2]) < 0 )
operator delete(v12.__r_.__value_.__l.__data_);
goto LABEL_18;
}
if ( a2[23] < 0 )
a2 = *(char **)a2;
v8 = atoi(a2);
v9 = v8;
if ( SHIBYTE(v12.__r_.__value_.__r.__words[2]) < 0 )
{
operator delete(v12.__r_.__value_.__l.__data_);
if ( (v9 & 0x80000000) == 0 )
goto LABEL_15;
}
else if ( (v8 & 0x80000000) == 0 )
{
LABEL_15:
result = *(__int64 (****)(void))(a1 + 1360);
if ( !result )
return result;
v11 = *result;
return (__int64 (***)(void))(*v11)();
}
LABEL_18:
result = *(__int64 (****)(void))(a1 + 1360);
if ( !result )
return result;
v11 = *result + 1;
return (__int64 (***)(void))(*v11)();
}