//
// GJGarageLayer::titleForUnlock from 0x1003069e0 to 0x100306a94 (180 bytes)
//
// 1 xrefs:
// > ItemInfoPopup::init @ 0x1003088d8
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
void __usercall GJGarageLayer::titleForUnlock(__int64 a1@, int a2@, _QWORD *a3@)
{
AchievementManager *v6; // x0
AchievementManager *v7; // x0
void **v8; // x1
cocos2d::CCDictionary *AchievementsWithID; // x20
cocos2d::CCString *v10; // x0
char *CString; // x0
void *__p[2]; // [xsp+0h] [xbp-50h] BYREF
char v13; // [xsp+17h] [xbp-39h]
void *v14[2]; // [xsp+18h] [xbp-38h] BYREF
char v15; // [xsp+2Fh] [xbp-21h]
v6 = AchievementManager::sharedState();
AchievementManager::achievementForUnlock((__int64)v6, a1, a2, v14);
v7 = AchievementManager::sharedState();
if ( v15 >= 0 )
v8 = v14;
else
v8 = (void **)v14[0];
AchievementsWithID = AchievementManager::getAchievementsWithID(v7, (const char *)v8);
sub_100009900(__p, "title");
v10 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey_1(AchievementsWithID, __p);
CString = (char *)cocos2d::CCString::getCString(v10);
sub_100009900(a3, CString);
if ( v13 < 0 )
operator delete(__p[0]);
if ( v15 < 0 )
operator delete(v14[0]);
}