//
// GameLevelManager::onSuggestLevelStarsCompleted from 0x80d610 to 0x80d7f4 (484 bytes)
//
// 2 xrefs:
// > GameLevelManager::handleIt @ 0x85c100
// > ??> @ 0x5c278
//
// 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:54:48 +0000
//
__int64 __fastcall GameLevelManager::onSuggestLevelStarsCompleted(GameLevelManager *a1, __int64 a2, char *a3)
{
char *v5; // x19
size_t v6; // x0
__int64 v7; // x24
unsigned int SplitIntFromKey; // w24
_BOOL4 v9; // w19
__int64 v10; // x0
_BOOL8 v12; // x0
_BOOL4 v13; // w19
void (__fastcall ***v14)(_QWORD, _QWORD, __int64); // x0
__int64 v15; // x0
__int64 v16; // x19
float v17; // s0
__int64 v18; // [xsp+40h] [xbp+40h] BYREF
__int64 v19; // [xsp+48h] [xbp+48h]
void *v20; // [xsp+50h] [xbp+50h]
v5 = a3 + 1;
if ( (*a3 & 1) != 0 )
v5 = *((char **)a3 + 2);
v18 = 0;
v19 = 0;
v20 = nullptr;
v6 = strlen(v5);
v7 = *((_QWORD *)a1 + 136);
std::string::__init(&v18, v5, v6);
cocos2d::CCDictionary::removeObjectForKey(v7, &v18);
if ( (v18 & 1) != 0 )
operator delete(v20);
SplitIntFromKey = GameLevelManager::getSplitIntFromKey(a1, v5, 1u);
v18 = 0;
v19 = 0;
v20 = nullptr;
std::string::__init(&v18, &word_117CE08, 2u);
v9 = sub_7FEA60(a2, (__int64)&v18);
if ( (v18 & 1) != 0 )
{
operator delete(v20);
if ( v9 )
goto LABEL_7;
}
else if ( v9 )
{
goto LABEL_7;
}
v18 = 0;
v19 = 0;
v20 = nullptr;
std::string::__init(&v18, "-2", 2u);
v12 = sub_7FEA60(a2, (__int64)&v18);
v13 = v12;
if ( (v18 & 1) != 0 )
operator delete(v20);
if ( v13 )
{
v15 = GameManager::sharedState((GameManager *)v12);
*(_DWORD *)(v15 + 1040) = 0;
v16 = v15;
v17 = (float)((float)rand() * 4.6566e-10) * 1000.0;
*(_DWORD *)(v16 + 1036) = (int)v17;
*(_DWORD *)(v16 + 1032) = (int)v17;
LABEL_7:
v10 = *((_QWORD *)a1 + 170);
if ( v10 )
(*(void (__fastcall **)(__int64, _QWORD, __int64))(*(_QWORD *)v10 + 8LL))(v10, SplitIntFromKey, 51);
return _stack_chk_guard;
}
v14 = *((void (__fastcall ****)(_QWORD, _QWORD, __int64))a1 + 170);
if ( v14 )
(**v14)(v14, SplitIntFromKey, 51);
return _stack_chk_guard;
}