//
// PlatformerControlsPopup::FLAlert_Clicked from 0x10051d4f4 to 0x10051d59c (168 bytes)
//
// 2 xrefs:
// > sub_10051D5B8 @ 0x10051d5bc
// > ??> @ 0x10099e048
//
// 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:07:10 +0000
//
__int64 __fastcall PlatformerControlsPopup::FLAlert_Clicked(__int64 result, __int64 a2, int a3)
{
__int64 v3; // x19
__int64 v4; // x0
__int64 v5; // x8
char *v6; // x0
void *__p[2]; // [xsp+8h] [xbp-28h] BYREF
char v8; // [xsp+1Fh] [xbp-11h]
if ( a3 )
{
v3 = result;
if ( *(_QWORD *)(result + 1048) )
{
*(_QWORD *)(GameLevelManager::sharedState() + 1360) = result + 1016;
v4 = GameLevelManager::sharedState();
result = sub_1000CB888(
v4,
*(_DWORD *)(*(_QWORD *)(v3 + 1048) + 328LL) - *(_DWORD *)(*(_QWORD *)(v3 + 1048) + 332LL));
if ( (_DWORD)result )
{
v5 = *(_QWORD *)(v3 + 1192);
if ( v5 )
{
*(_QWORD *)(v5 + 664) = 0;
*(_QWORD *)(v3 + 1192) = 0;
}
sub_100009900(__p, "Removing controls...");
v6 = UploadActionPopup::create(v3 + 1024, (__int64)__p);
*(_QWORD *)(v3 + 1192) = v6;
if ( v8 < 0 )
{
operator delete(__p[0]);
v6 = *(char **)(v3 + 1192);
}
return (*(__int64 (__fastcall **)(char *))(*(_QWORD *)v6 + 1312LL))(v6);
}
}
}
return result;
}