//
// LeaderboardsLayer::refreshTabs from 0x94e124 to 0x94e1c0 (156 bytes)
//
// 3 xrefs:
// > LeaderboardsLayer::setupLevelBrowser @ 0x94e2fc
// > LeaderboardsLayer::toggleTabButtons @ 0x94e534
// > ??> @ 0xcc550
//
// 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:57:21 +0000
//
__int64 __fastcall LeaderboardsLayer::refreshTabs(cocos2d::CCArray **this)
{
unsigned int v1; // w20
cocos2d::CCDirector **v3; // x19
void (__fastcall *v4)(cocos2d::CCDirector **, _QWORD); // x22
__int64 v5; // x0
__int64 v6; // x0
__int64 result; // x0
bool v8; // cf
unsigned int v9; // w1
v1 = 0;
while ( 1 )
{
result = cocos2d::CCArray::count(*(this + 62));
v8 = v1 >= (unsigned int)result;
v9 = v1++;
if ( v8 )
break;
v3 = (cocos2d::CCDirector **)cocos2d::CCArray::objectAtIndex(*(this + 62), v9);
(*((void (__fastcall **)(cocos2d::CCDirector **, _QWORD))*v3 + 125))(v3, 0);
v4 = *((void (__fastcall **)(cocos2d::CCDirector **, _QWORD))*v3 + 128);
v5 = cocos2d::CCDirector::sharedDirector(*v3);
v6 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v5 + 160LL))(v5);
v4(v3, (unsigned int)(*(_DWORD *)(v6 + 128) - 1));
(*((void (__fastcall **)(cocos2d::CCDirector **, __int64))*v3 + 125))(v3, 1);
}
return result;
}