//
// GameStatsManager::getCollectedCoinsForLevel from 0x5173c8 to 0x5173f0 (40 bytes)
//
// 7 xrefs:
// > GameStatsManager::checkCoinAchievement @ 0x517426
// > GameStatsManager::checkCoinAchievement @ 0x517486
// > GameStatsManager::checkCoinAchievement @ 0x5174c0
// > GameStatsManager::checkCoinAchievement @ 0x51750a
// > GameStatsManager::checkCoinAchievement @ 0x517552
// > GameStatsManager::checkCoinAchievement @ 0x51758c
// > GameStatsManager::checkCoinAchievement @ 0x5175c6
//
// 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:43 +0000
//
int __fastcall GameStatsManager::getCollectedCoinsForLevel(GameStatsManager *this, GJGameLevel *a2)
{
int v4; // r4
int v5; // r5
const char *CoinKey; // r0
v4 = 1;
v5 = 0;
do
{
CoinKey = (const char *)GJGameLevel::getCoinKey(a2, v4);
if ( GameStatsManager::hasSecretCoin(this, CoinKey) )
++v5;
++v4;
}
while ( v4 != 4 );
return v5;
}