//
// GJRewardItem::getRandomNonMaxShardType from 0x523084 to 0x5230f6 (114 bytes)
//
// 1 xrefs:
// > GameStatsManager::completedDailyLevel @ 0x52aeaa
//
// 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:52 +0000
//
int __fastcall GJRewardItem::getRandomNonMaxShardType(GJRewardItem *this, int a2, char *a3, int a4)
{
int v4; // r5
GameStatsManager *RandomShardType; // r0
int v6; // r4
GameStatsManager *v7; // r8
const char *v8; // r1
int Stat; // r8
int result; // r0
int v11[2]; // [sp+0h] [bp+0h] BYREF
char *v12; // [sp+8h] [bp+8h]
int v13; // [sp+Ch] [bp+Ch]
v11[0] = (int)this;
v11[1] = a2;
v12 = a3;
v13 = a4;
v4 = 10;
RandomShardType = (GameStatsManager *)GJRewardItem::getRandomShardType(this);
v6 = (int)RandomShardType;
while ( 1 )
{
v7 = (GameStatsManager *)GameStatsManager::sharedState(RandomShardType);
GJRewardItem::rewardItemToStat(v11, v6);
v8 = (v11[0] & 1) != 0 ? v12 : (char *)v11 + 1;
Stat = GameStatsManager::getStat(v7, v8);
std::string::~string((int)v11);
result = v6;
if ( Stat <= 99 )
break;
RandomShardType = (GameStatsManager *)GJRewardItem::getNextShardType(v6);
--v4;
v6 = (int)RandomShardType;
if ( !v4 )
return 0;
}
return result;
}