//
// GameStatsManager::processChallengeQueue from 0x517a78 to 0x517ac4 (76 bytes)
//
// 2 xrefs:
// > ChallengesPage::createChallengeNode @ 0x60016c
// > ChallengesPage::claimItem @ 0x600b76
//
// 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::processChallengeQueue(GameStatsManager *this, const char *a2)
{
GJChallengeItem *QueuedChallenge; // r7
GJChallengeItem *SecondaryQueuedChallenge; // r6
int result; // r0
int v7; // r3
QueuedChallenge = (GJChallengeItem *)GameStatsManager::getQueuedChallenge(this, a2);
SecondaryQueuedChallenge = (GJChallengeItem *)GameStatsManager::getSecondaryQueuedChallenge(this, (int)a2);
result = GameStatsManager::removeChallenge(this, a2);
if ( QueuedChallenge )
{
GameStatsManager::storeChallenge(this, a2, QueuedChallenge, v7);
result = GameStatsManager::removeQueuedChallenge(this, a2);
}
if ( SecondaryQueuedChallenge )
{
GameStatsManager::storeQueuedChallenge(this, a2, SecondaryQueuedChallenge, v7);
return GameStatsManager::removeQueuedSecondaryChallenge(this, (int)a2);
}
return result;
}