//
// GJBaseGameLayer::processItems from 0x1002855d4 to 0x100285748 (372 bytes)
//
// 1 xrefs:
// > PlayLayer::levelComplete @ 0x100142f18
//
// 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 11:01:57 +0000
//
__int64 __fastcall GJBaseGameLayer::processItems(__int64 a1)
{
__int64 v2; // x20
__int64 result; // x0
__int64 v4; // x21
__int64 v5; // x0
char *CString; // x0
__int64 v7; // x24
unsigned int *v8; // x24
int v9; // w0
__int64 v10; // x24
__int64 v11; // x8
int v12; // w25
int v13; // w26
__int64 v14; // x0
__int64 hasPendingUserCoin; // x0
__int64 v16; // x0
__int64 CoinKey_1; // x24
__int64 v18; // x0
__int64 hasSecretCoin; // x0
__int64 v20; // x0
__int64 v21; // x0
__int64 v22; // x0
const char *v23; // x1
__int64 hasUserCoin; // x0
__int64 v25; // x0
__int64 v26; // x0
void *__p[2]; // [xsp+8h] [xbp-58h] BYREF
char v28; // [xsp+1Fh] [xbp-41h]
v2 = cocos2d::CCDictionary::allKeys(*(_QWORD *)(a1 + 12584));
result = sub_1002E757C(v2);
if ( (_DWORD)result )
{
v4 = 0;
do
{
v5 = sub_1002E75A0(v2, v4);
CString = (char *)cocos2d::CCString::getCString(v5);
v7 = *(_QWORD *)(a1 + 12584);
sub_100009900(__p, CString);
v8 = (unsigned int *)cocos2d::CCDictionary::objectForKey(v7, __p);
if ( v28 < 0 )
operator delete(__p[0]);
v9 = (*(__int64 (__fastcall **)(unsigned int *))(*(_QWORD *)v8 + 1800LL))(v8);
if ( v9 == 22 )
{
CoinKey_1 = GJGameLevel::getCoinKey_1(*(_QWORD *)(a1 + 1936), v8[448]);
v18 = GameStatsManager::sharedState(CoinKey_1);
hasSecretCoin = GameStatsManager::hasSecretCoin(v18, CoinKey_1);
if ( (hasSecretCoin & 1) == 0 )
{
v20 = GameStatsManager::sharedState(hasSecretCoin);
v21 = sub_1003D002C(v20, CoinKey_1);
v22 = GameStatsManager::sharedState(v21);
v23 = "8";
LABEL_14:
GameStatsManager::incrementStat_1(v22, v23);
}
}
else if ( v9 == 31 )
{
v10 = GJGameLevel::getCoinKey_1(*(_QWORD *)(a1 + 1936), v8[448]);
v11 = *(_QWORD *)(a1 + 1936);
v12 = *(_DWORD *)(v11 + 968);
v13 = *(_DWORD *)(v11 + 972);
v14 = GameStatsManager::sharedState(v10);
if ( v12 == v13 )
{
hasPendingUserCoin = GameStatsManager::hasPendingUserCoin(v14, v10);
if ( (hasPendingUserCoin & 1) == 0 )
{
v16 = GameStatsManager::sharedState(hasPendingUserCoin);
sub_1003CFFC0(v16, v10);
}
goto LABEL_15;
}
hasUserCoin = GameStatsManager::hasUserCoin(v14, v10);
if ( (hasUserCoin & 1) == 0 )
{
v25 = GameStatsManager::sharedState(hasUserCoin);
v26 = GameStatsManager::storeUserCoin(v25, v10);
v22 = GameStatsManager::sharedState(v26);
v23 = "12";
goto LABEL_14;
}
}
LABEL_15:
v4 = (unsigned int)(v4 + 1);
result = sub_1002E757C(v2);
}
while ( (unsigned int)v4 < (unsigned int)result );
}
return result;
}