//
// ClearPlatformerSavesPopup::updateStats from 0xc8ee30 to 0xc8effc (460 bytes)
//
// 4 xrefs:
// > ClearPlatformerSavesPopup::onIncludeFavoritesToggle @ 0xc8f018
// > ClearPlatformerSavesPopup::init @ 0xc8ff5c
// > ClearPlatformerSavesPopup::FLAlert_Clicked @ 0xc90214
// > ??> @ 0x96370
//
// 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:05:46 +0000
//
__int64 __fastcall ClearPlatformerSavesPopup::updateStats(ClearPlatformerSavesPopup *this)
{
GameLevelManager *v2; // x0
char *v3; // x2
char *v4; // x3
cocos2d::CCString *v5; // x0
__int64 CString; // x1
GameLevelManager *v7; // x0
GameLevelManager *v8; // x0
__int64 v9; // x22
void (__fastcall *v10)(__int64, __int64); // x23
char *v11; // x1
cocos2d::CCString *v12; // x0
__int64 v13; // x0
char *v15; // [xsp+50h] [xbp+50h]
char *v16; // [xsp+58h] [xbp+58h]
__int64 v17; // [xsp+58h] [xbp+58h]
int v18; // [xsp+68h] [xbp+68h] BYREF
int v19; // [xsp+6Ch] [xbp+6Ch] BYREF
char *v20; // [xsp+70h] [xbp+70h] BYREF
char *v21; // [xsp+78h] [xbp+78h] BYREF
__int64 v22[2]; // [xsp+80h] [xbp+80h] BYREF
char *v23; // [xsp+90h] [xbp+90h]
v18 = 0;
v20 = nullptr;
v2 = (GameLevelManager *)GameLevelManager::sharedState(_stack_chk_guard);
GameLevelManager::getPlatformerSaveStats(v2, *((unsigned __int8 *)this + 672), &v18, (unsigned __int64 *)&v20);
if ( v18 == 1 )
v3 = &byte_11B8890;
else
v3 = "s";
v15 = (char *)(unsigned int)v18;
v16 = v3;
sub_C8ECE0(v20, v22);
v4 = (char *)v22 + 1;
if ( (v22[0] & 1) != 0 )
v4 = v23;
v5 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"%i save%s - %s", v15, v16, v4);
CString = cocos2d::CCString::getCString(v5);
if ( (v22[0] & 1) != 0 )
{
v17 = CString;
operator delete(v23);
CString = v17;
}
(*(void (__fastcall **)(_QWORD, __int64))(**((_QWORD **)this + 86) + 928LL))(*((_QWORD *)this + 86), CString);
v7 = (GameLevelManager *)cocos2d::CCLabelBMFont::limitLabelWidth(
*((cocos2d::CCLabelBMFont **)this + 86),
280.0,
0.6,
0.3);
v19 = 0;
v21 = nullptr;
v8 = (GameLevelManager *)GameLevelManager::sharedState(v7);
GameLevelManager::getPlatformerSaveStats(v8, 2, &v19, (unsigned __int64 *)&v21);
v9 = *((_QWORD *)this + 87);
v10 = *(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v9 + 928LL);
sub_C8ECE0(v21, v22);
v11 = (char *)v22 + 1;
if ( (v22[0] & 1) != 0 )
v11 = v23;
v12 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"Favorites: %s", v11);
v13 = cocos2d::CCString::getCString(v12);
v10(v9, v13);
if ( (v22[0] & 1) != 0 )
operator delete(v23);
cocos2d::CCLabelBMFont::limitLabelWidth(*((cocos2d::CCLabelBMFont **)this + 87), 280.0, 0.4, 0.3);
return _stack_chk_guard;
}