//
// GameStatsManager::getNextGoldChestID from 0x40e484 to 0x40e4a8 (36 bytes)
//
// 2 xrefs:
// > SecretRewardsLayer::init @ 0x586c16
// > SecretRewardsLayer::onGoldChest @ 0x587352
//
// 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
//
int GameStatsManager::getNextGoldChestID(GameStatsManager *a1)
{
int v2; // r4
v2 = 6001;
while ( GameStatsManager::isSecretChestUnlocked(a1, v2) )
{
if ( ++v2 == 6021 )
return 0;
}
return v2;
}