//
// DeathTrackerOptionsPopup::FLAlert_Clicked from 0xca9370 to 0xca9504 (404 bytes)
//
// 3 xrefs:
// > `non-virtual thunk to'DeathTrackerOptionsPopup::FLAlert_Clicked @ 0xca950c
// > ??> @ 0x47398
// > ??> @ 0x14f87d0
//
// 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 13:06:04 +0000
//
__int64 __fastcall DeathTrackerOptionsPopup::FLAlert_Clicked(DeathTrackerOptionsPopup *this, FLAlertLayer *a2, char a3)
{
GameLevelManager *v5; // x0
GameLevelManager *v6; // x0
cocos2d::CCDirector *v7; // x0
__int64 *v8; // x21
__int64 v9; // x3
void (__fastcall *v10)(__int64 *, __int64, __int64); // x24
__int64 v11; // x0
DeathTrackerPopup *v12; // x0
__int64 v13[2]; // [xsp+48h] [xbp+48h] BYREF
void *v14; // [xsp+58h] [xbp+58h]
__int64 v15[2]; // [xsp+60h] [xbp+60h] BYREF
void *v16; // [xsp+70h] [xbp+70h]
if ( !a3 )
return _stack_chk_guard;
if ( (*(unsigned int (__fastcall **)(FLAlertLayer *))(*(_QWORD *)a2 + 64LL))(a2) != 1 )
return _stack_chk_guard;
v5 = *((GameLevelManager **)this + 128);
if ( !v5 )
return _stack_chk_guard;
v6 = (GameLevelManager *)GameLevelManager::sharedState(v5);
v7 = (cocos2d::CCDirector *)GameLevelManager::clearDeathDataInstances(v6, *((GJGameLevel **)this + 128), 0);
v8 = *(__int64 **)(cocos2d::CCDirector::sharedDirector(v7) + 272);
v9 = *v8;
v13[0] = 0;
v13[1] = 0;
v10 = *(void (__fastcall **)(__int64 *, __int64, __int64))(v9 + 464);
v14 = nullptr;
std::string::__init(v13, "Death data cleared", 0x12u);
v15[0] = 0;
v15[1] = 0;
v16 = nullptr;
std::string::__init(v15, &byte_11B8890, 0);
v11 = TextAlertPopup::create((char *)v13, 150, (char *)v15, 0.5, 0.6);
v10(v8, v11, 1000);
if ( (v15[0] & 1) != 0 )
{
operator delete(v16);
if ( (v13[0] & 1) == 0 )
goto LABEL_7;
LABEL_11:
operator delete(v14);
goto LABEL_7;
}
if ( (v13[0] & 1) != 0 )
goto LABEL_11;
LABEL_7:
v12 = *((DeathTrackerPopup **)this + 129);
if ( v12 )
DeathTrackerPopup::onClose(v12, nullptr);
(*(void (__fastcall **)(DeathTrackerOptionsPopup *, _QWORD))(*(_QWORD *)this + 1368LL))(this, 0);
return _stack_chk_guard;
}