//
// GJGarageLayer::achievementForUnlock from 0x50c234 to 0x50c2d0 (156 bytes)
//
// 0 xrefs:
//
// 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:51:28 +0000
//
int *__fastcall GJGarageLayer::achievementForUnlock(int *a1, int a2, int a3)
{
int v6; // r0
int *v7; // r0
AchievementManager *v8; // r7
int v9; // r2
int v10; // r3
int isAchievementAvailable; // r7
int v12; // r0
int v13; // r1
int v14; // r2
int v16; // [sp+4h] [bp-1Ch] BYREF
int v17; // [sp+8h] [bp-18h]
int v18; // [sp+Ch] [bp-14h]
int v19[3]; // [sp+10h] [bp-10h] BYREF
v6 = AchievementManager::sharedState((AchievementManager *)a1);
v7 = AchievementManager::achievementForUnlock(&v16, v6, a2, a3);
v8 = (AchievementManager *)AchievementManager::sharedState((AchievementManager *)v7);
std::string::basic_string(v19, (int)&v16);
isAchievementAvailable = AchievementManager::isAchievementAvailable(v8, (int)v19, v9, v10);
std::string::~string((int)v19);
if ( isAchievementAvailable )
{
v12 = v16;
v13 = v17;
v14 = v18;
v16 = 0;
v17 = 0;
v18 = 0;
*a1 = v12;
a1[1] = v13;
a1[2] = v14;
}
else
{
*a1 = 0;
a1[1] = 0;
a1[2] = 0;
std::string::__init(a1, &unk_B6B226, 0);
}
std::string::~string((int)&v16);
return a1;
}