//
// LevelLeaderboard::reloadLeaderboard from 0xa83c08 to 0xa83ccc (196 bytes)
//
// 3 xrefs:
// > LevelLeaderboard::onChangeType @ 0xa83d38
// > LevelLeaderboard::onChangeMode @ 0xa83d94
// > ??> @ 0xeb300
//
// 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:00:33 +0000
//
__int64 __fastcall LevelLeaderboard::reloadLeaderboard(GJGameLevel **a1, int a2, int a3)
{
cocos2d::CCDirector *v5; // x0
__int64 v6; // x0
cocos2d::CCTouchDispatcher *v7; // x0
__int64 v8; // x0
cocos2d::CCTouchDispatcher *v9; // x0
cocos2d::CCDirector *v10; // x22
cocos2d::CCScene *v11; // x20
void (__fastcall *v12)(cocos2d::CCScene *, cocos2d::CCDirector *, __int64); // x21
int HighestChildZ; // w0
__int64 v14; // x2
int v16; // [xsp+38h] [xbp+38h]
int v17; // [xsp+38h] [xbp+38h]
v5 = a1[88];
if ( v5 )
{
v16 = a3;
v6 = cocos2d::CCDirector::sharedDirector(v5);
v7 = (cocos2d::CCTouchDispatcher *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v6 + 160LL))(v6);
v5 = (cocos2d::CCDirector *)cocos2d::CCTouchDispatcher::unregisterForcePrio(v7, a1[88]);
a3 = v16;
}
v17 = a3;
v8 = cocos2d::CCDirector::sharedDirector(v5);
v9 = (cocos2d::CCTouchDispatcher *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v8 + 160LL))(v8);
cocos2d::CCTouchDispatcher::unregisterForcePrio(v9, (cocos2d::CCObject *)a1);
v10 = (cocos2d::CCDirector *)LevelLeaderboard::create(a1[85], a2, v17);
v11 = *(cocos2d::CCScene **)(cocos2d::CCDirector::sharedDirector(v10) + 272);
v12 = *(void (__fastcall **)(cocos2d::CCScene *, cocos2d::CCDirector *, __int64))(*(_QWORD *)v11 + 464LL);
HighestChildZ = cocos2d::CCScene::getHighestChildZ(v11);
v14 = 105;
if ( HighestChildZ > 104 )
v14 = (unsigned int)cocos2d::CCScene::getHighestChildZ(v11) + 1;
v12(v11, v10, v14);
return LevelLeaderboard::onClose((LevelLeaderboard *)a1, nullptr);
}