//
// GameStatsManager::getCollectedCoinsForLevel from 0x8cb39c to 0x8cb400 (100 bytes)
//
// 8 xrefs:
// > GameStatsManager::checkCoinAchievement @ 0x8cb45c
// > GameStatsManager::checkCoinAchievement @ 0x8cb4b0
// > GameStatsManager::checkCoinAchievement @ 0x8cb500
// > GameStatsManager::checkCoinAchievement @ 0x8cb540
// > GameStatsManager::checkCoinAchievement @ 0x8cb55c
// > GameStatsManager::checkCoinAchievement @ 0x8cb578
// > GameStatsManager::checkCoinAchievement @ 0x8cb5b8
// > ??> @ 0xb5a98
//
// 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:56:36 +0000
//
__int64 __fastcall GameStatsManager::getCollectedCoinsForLevel(GameStatsManager *this, GJGameLevel *a2)
{
int v2; // w19
unsigned int v5; // w20
unsigned int v6; // w1
const char *CoinKey; // x0
v2 = 1;
v5 = 0;
do
{
v6 = v2++;
CoinKey = (const char *)GJGameLevel::getCoinKey(a2, v6);
if ( GameStatsManager::hasSecretCoin(this, CoinKey) )
++v5;
}
while ( v2 != 4 );
return v5;
}