//
// GameStatsManager::processChallengeQueue from 0x8cc50c to 0x8cc5a4 (152 bytes)
//
// 3 xrefs:
// > ChallengesPage::createChallengeNode @ 0xa638fc
// > ChallengesPage::claimItem @ 0xa644f4
// > ??> @ 0xefb90
//
// 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::processChallengeQueue(GameStatsManager *this, const char *a2)
{
unsigned int v3; // w19
GJChallengeItem *QueuedChallenge; // x22
GJChallengeItem *SecondaryQueuedChallenge; // x21
__int64 result; // x0
v3 = (unsigned int)a2;
QueuedChallenge = (GJChallengeItem *)GameStatsManager::getQueuedChallenge(this, a2);
SecondaryQueuedChallenge = (GJChallengeItem *)GameStatsManager::getSecondaryQueuedChallenge(this, v3);
result = GameStatsManager::removeChallenge(this, (const char *)v3);
if ( QueuedChallenge )
{
GameStatsManager::storeChallenge(this, (const char *)v3, QueuedChallenge);
result = GameStatsManager::removeQueuedChallenge(this, (const char *)v3);
}
if ( SecondaryQueuedChallenge )
{
GameStatsManager::storeQueuedChallenge(this, (const char *)v3, SecondaryQueuedChallenge);
return GameStatsManager::removeQueuedSecondaryChallenge(this, v3);
}
return result;
}