//
// GJGarageLayer::onInfo from 0x790148 to 0x790314 (460 bytes)
//
// 3 xrefs:
// > ??> @ 0x2db70
// > GJGarageLayer::init @ 0x79a1b0
// > ??> @ 0x1229550
//
// 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 GJGarageLayer::onInfo(GJGarageLayer *a1, cocos2d::CCObject *a2)
{
GameManager *v2; // x0
cocos2d::CCString *v3; // x0
char *CString; // x0
FLAlertLayer *v5; // x22
void *v6; // x0
char *v7; // x0
unsigned int *v8; // x1
int v9; // w2
unsigned int *v10; // x1
int v11; // w2
char *v12; // [xsp+48h] [xbp+48h] BYREF
__int64 v13; // [xsp+50h] [xbp+50h] BYREF
v2 = GameManager::sharedState();
v3 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"UserID: %i",
(const char *)(unsigned int)(v2->m_playerUserID.random - v2->m_playerUserID.seed));
CString = (char *)cocos2d::CCString::getCString(v3);
sub_D153B8((int)&v12, CString);
sub_D153B8((int)&v13, v12);
v5 = FLAlertLayer::create(0, (__int64)"User Info", (__int64)&v13);
v6 = (void *)(v13 - 24);
if ( (__int64 *)(v13 - 24) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v8 = (unsigned int *)(v13 - 8);
do
v9 = __ldaxr(v8);
while ( __stlxr(v9 - 1, v8) );
}
else
{
v9 = *(_DWORD *)(v13 - 8);
*(_DWORD *)(v13 - 8) = v9 - 1;
}
if ( v9 <= 0 )
operator delete(v6);
}
v5->show(v5);
v7 = v12 - 24;
if ( v12 - 24 != (char *)&qword_124B6B0 )
{
if ( &pthread_create )
{
v10 = (unsigned int *)(v12 - 8);
do
v11 = __ldaxr(v10);
while ( __stlxr(v11 - 1, v10) );
}
else
{
v11 = *((_DWORD *)v12 - 2);
*((_DWORD *)v12 - 2) = v11 - 1;
}
if ( v11 <= 0 )
operator delete(v7);
}
}