//
// GameManager::completedAchievement from 0x721e20 to 0x721f50 (304 bytes)
//
// 3 xrefs:
// > GameManager::reportAchievementWithID @ 0x72200c
// > GameManager::verifyAchievementUnlocks @ 0x7228f8
// > ??> @ 0xc3cd0
//
// 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:52:23 +0000
//
__int64 __fastcall GameManager::completedAchievement(GameManager *a1, PlatformToolbox *this)
{
PlatformToolbox *v4; // x1
char v5; // t1
char v6; // w0
__int64 v7; // x0
__int64 v8; // x1
unsigned int v9; // w19
int v10; // w0
unsigned int v12; // [xsp+38h] [xbp+38h] BYREF
int v13; // [xsp+3Ch] [xbp+3Ch] BYREF
__int64 v14; // [xsp+40h] [xbp+40h] BYREF
__int64 v15; // [xsp+48h] [xbp+48h]
void *v16; // [xsp+50h] [xbp+50h]
v12 = 0;
v5 = *(_BYTE *)this;
v4 = (PlatformToolbox *)((char *)this + 1);
v13 = 0;
if ( (v5 & 1) != 0 )
v4 = *((PlatformToolbox **)this + 2);
PlatformToolbox::logEvent(v4, (const char *)v4);
v14 = 0;
v6 = *(_BYTE *)this;
v15 = 0;
v16 = nullptr;
if ( (v6 & 1) != 0 )
{
std::string::__init(&v14, *((void **)this + 2), *((_QWORD *)this + 1));
}
else
{
v7 = *(_QWORD *)this;
v8 = *((_QWORD *)this + 1);
v16 = *((void **)this + 2);
v14 = v7;
v15 = v8;
}
GameManager::getUnlockForAchievement((__int64)a1, (__int64)&v14, &v12, &v13);
if ( (v14 & 1) != 0 )
operator delete(v16);
if ( v13 )
{
if ( (unsigned int)(v13 - 2) <= 1 )
{
GameManager::unlockColor((__int64)a1, v12, v13);
}
else
{
v9 = v12;
v10 = GameManager::unlockTypeToIconType(a1, v13);
GameManager::unlockIcon((__int64)a1, v9, v10);
}
}
return _stack_chk_guard;
}