//
// GJRewardItem::getRandomNonMaxShardType from 0x1003d2920 to 0x1003d29bc (156 bytes)
//
// 1 xrefs:
// > GameStatsManager::completedDailyLevel @ 0x1003d26a8
//
// 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 11:04:12 +0000
//
__int64 GJRewardItem::getRandomNonMaxShardType()
{
int v0; // w21
__int64 RandomShardType; // x19
__int64 v2; // x20
char *v3; // x1
int Stat; // w20
void *__p[2]; // [xsp+8h] [xbp-38h] BYREF
char v7; // [xsp+1Fh] [xbp-21h]
v0 = 10;
RandomShardType = GJRewardItem::getRandomShardType();
while ( 1 )
{
v2 = GameStatsManager::sharedState();
GJRewardItem::rewardItemToStat(RandomShardType, __p);
v3 = v7 >= 0 ? (char *)__p : (char *)__p[0];
Stat = GameStatsManager::getStat(v2, v3);
if ( v7 < 0 )
operator delete(__p[0]);
if ( Stat <= 99 )
break;
RandomShardType = GJRewardItem::getNextShardType(RandomShardType);
if ( !--v0 )
return 0;
}
return RandomShardType;
}