//
// sub_1003157D8 from 0x1003157d8 to 0x1003158a8 (208 bytes)
//
// 1 xrefs:
// > sub_100314E5C @ 0x100315250
//
// 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:15 +0000
//
__int64 __fastcall sub_1003157D8(__int64 a1)
{
__int64 v2; // x0
__int64 v3; // x0
__n128 GameVariable; // q0
__int64 v5; // x0
__int64 v6; // x20
__int64 v7; // x8
void *__p[2]; // [xsp+8h] [xbp-28h] BYREF
char v10; // [xsp+1Fh] [xbp-11h]
*(_BYTE *)(*(_QWORD *)(a1 + 680) + 616LL) ^= 1u;
v2 = GameManager::sharedState(a1);
GameVariable = GameManager::getGameVariable(v2, "0070");
if ( (v3 & 1) == 0 )
{
v5 = GameManager::sharedState(v3);
GameManager::setGameVariable(v5, "0070", 1);
sub_100009900(
__p,
"An unlisted level can only be found by entering its levelID. Once a level is unlisted, it cannot change back to listed.");
v6 = FLAlertLayer::create_1(0, "Unlisted", __p, "OK", 0, 320.0);
if ( v10 < 0 )
operator delete(__p[0]);
(*(void (__fastcall **)(__int64))(*(_QWORD *)v6 + 1312LL))(v6);
}
v7 = *(_QWORD *)(a1 + 680);
if ( (*(_BYTE *)(v7 + 616) & 1) == 0 )
*(_BYTE *)(v7 + 617) = 0;
return sub_1003158D8(a1, GameVariable);
}