//
// UISaveLoadLayer::onLoad from 0xa2ec60 to 0xa2ee90 (560 bytes)
//
// 3 xrefs:
// > ??> @ 0xe22a0
// > UISaveLoadLayer::init @ 0xa276d0
// > ??> @ 0x1546cb8
//
// 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 12:59:46 +0000
//
__int64 __fastcall UISaveLoadLayer::onLoad(UISaveLoadLayer *this, cocos2d::CCObject *a2)
{
unsigned int v3; // w22
GameManager *v4; // x0
GameManager *v5; // x0
__int64 v6; // x21
const char *v7; // x1
cocos2d::CCString *v8; // x0
size_t v9; // x0
__int64 v10; // x1
void (__fastcall *v11)(__int64, __int64, __int64); // x23
__int64 v12; // x0
char *CString; // [xsp+48h] [xbp+48h]
__int64 v15; // [xsp+50h] [xbp+50h] BYREF
size_t v16; // [xsp+58h] [xbp+58h]
void *v17; // [xsp+60h] [xbp+60h]
__int64 v18; // [xsp+68h] [xbp+68h] BYREF
size_t v19; // [xsp+70h] [xbp+70h]
void *v20; // [xsp+78h] [xbp+78h]
__int64 v21[2]; // [xsp+80h] [xbp+80h] BYREF
void *v22; // [xsp+90h] [xbp+90h]
v3 = (*(__int64 (__fastcall **)(cocos2d::CCObject *))(*(_QWORD *)a2 + 64LL))(a2);
(*(void (__fastcall **)(UISaveLoadLayer *, _QWORD))(*(_QWORD *)this + 1368LL))(this, 0);
v4 = (GameManager *)(*(__int64 (__fastcall **)(_QWORD, _QWORD))(**((_QWORD **)this + 127) + 1368LL))(
*((_QWORD *)this + 127),
0);
v5 = (GameManager *)GameManager::sharedState(v4);
GameManager::loadDPadLayout(v5, v3, *(_BYTE *)(*((_QWORD *)this + 127) + 1012LL));
v6 = UIOptionsLayer::create((UIOptionsLayer *)*(unsigned __int8 *)(*((_QWORD *)this + 127) + 1012LL));
(*(void (__fastcall **)(__int64))(*(_QWORD *)v6 + 1312LL))(v6);
if ( *(_BYTE *)(*((_QWORD *)this + 127) + 1012LL) )
v7 = "Dual ";
else
v7 = &byte_11B8890;
v8 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"%sUI %i loaded.", v7, v3);
v15 = 0;
CString = (char *)cocos2d::CCString::getCString(v8);
v16 = 0;
v17 = nullptr;
v9 = strlen(CString);
std::string::__init(&v15, CString, v9);
v10 = *(_QWORD *)v6;
v18 = 0;
v19 = 0;
v20 = nullptr;
v11 = *(void (__fastcall **)(__int64, __int64, __int64))(v10 + 464);
if ( (v15 & 1) != 0 )
{
std::string::__init(&v18, v17, v16);
}
else
{
v20 = v17;
v18 = v15;
v19 = v16;
}
v21[0] = 0;
v21[1] = 0;
v22 = nullptr;
std::string::__init(v21, &byte_11B8890, 0);
v12 = TextAlertPopup::create((char *)&v18, 150, (char *)v21, 0.5, 0.6);
v11(v6, v12, 100);
if ( (v21[0] & 1) != 0 )
operator delete(v22);
if ( (v18 & 1) != 0 )
operator delete(v20);
if ( (v15 & 1) != 0 )
operator delete(v17);
return _stack_chk_guard;
}