//
// GameStatsManager::hasCompletedChallenge from 0x40d850 to 0x40d89e (78 bytes)
//
// 3 xrefs:
// > GameLevelManager::onGetGJChallengesCompleted @ 0x3c3fa4
// > GameStatsManager::completedChallenge @ 0x41c4e6
// > GameStatsManager::dataLoaded @ 0x41df6e
//
// 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
//
bool GameStatsManager::hasCompletedChallenge(GameStatsManager *a1, GJChallengeItem *a2)
{
cocos2d::CCDictionary *m_challengeDiamonds; // r6
int v3; // r6
bool result; // r0
std::string v5[2]; // [sp+0h] [bp-8h] BYREF
v5[0].m_data.m_data = (stl::StringData::Internal *)a1;
v5[1].m_data.m_data = (stl::StringData::Internal *)a2;
m_challengeDiamonds = a1->m_challengeDiamonds;
GameStatsManager::getChallengeKey((GameStatsManager *)v5, (GJChallengeItem *)a1, (int)a2);
v3 = cocos2d::CCDictionary::objectForKey(m_challengeDiamonds, v5);
sub_774008(v5);
result = v3;
if ( v3 )
return 1;
return result;
}