//
// GameLevelManager::getSavedLevels from 0x4ad11c to 0x4ad202 (230 bytes)
//
// 5 xrefs:
// > LevelBrowserLayer::loadPage @ 0x4a6598
// > LevelBrowserLayer::FLAlert_Clicked @ 0x4a8de0
// > LevelBrowserLayer::FLAlert_Clicked @ 0x4a8ed0
// > GameLevelManager::limitSavedLevels @ 0x4ade7e
// > LevelPickerPopup::savedIndex @ 0x74fb36
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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 11:49:59 +0000
//
size_t **__fastcall GameLevelManager::getSavedLevels(cocos2d::CCDictionary **this, int a2, int a3)
{
unsigned int v5; // r4
size_t **v6; // r5
cocos2d::CCArray *v7; // r7
int v8; // r0
cocos2d::CCString *v9; // r0
const char *CString; // r0
cocos2d::CCObject *v11; // r3
size_t v12; // r0
cocos2d::CCObject *v15; // [sp+8h] [bp-1Ch]
cocos2d::CCObject *v16; // [sp+8h] [bp-1Ch]
const char *v17; // [sp+Ch] [bp-18h]
int v18[3]; // [sp+10h] [bp-14h] BYREF
v5 = 0;
v6 = (size_t **)cocos2d::CCArray::create((cocos2d::CCArray *)this);
v7 = (cocos2d::CCArray *)cocos2d::CCDictionary::allKeys(*(this + 136));
while ( v5 < cocos2d::CCArray::count(v7) )
{
v8 = cocos2d::CCArray::count(v7);
v9 = (cocos2d::CCString *)cocos2d::CCArray::objectAtIndex(v7, ~v5 + v8);
CString = (const char *)cocos2d::CCString::getCString(v9);
v11 = *(this + 136);
memset(v18, 0, sizeof(v18));
v15 = v11;
v17 = CString;
v12 = strlen(CString);
std::string::__init(v18, v17, v12);
v16 = (cocos2d::CCObject *)cocos2d::CCDictionary::objectForKey(v15, v18);
std::string::~string((int)v18);
if ( !*((_BYTE *)v16 + 917) && (!a2 || *((_BYTE *)v16 + 736)) && (a3 <= 0 || *((_DWORD *)v16 + 185) == a3) )
cocos2d::CCArray::addObject((cocos2d::CCArray *)v6, v16);
++v5;
}
if ( cocos2d::CCArray::count((cocos2d::CCArray *)v6) )
qsort((void *)v6[13][3], *v6[13], 4u, savedLevelCompare);
return v6;
}