//
// SetupGravityModPopup::updateItemID from 0xafb524 to 0xafb5ac (136 bytes)
//
// 2 xrefs:
// > SetupGravityModPopup::textChanged @ 0xafb624
// > ??> @ 0xfbbf0
//
// 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 13:01:17 +0000
//
__int64 __fastcall SetupGravityModPopup::updateItemID(__int64 this)
{
__int64 v1; // x19
__int64 v2; // x1
unsigned int v3; // w20
bool v4; // cf
unsigned int v5; // w1
v1 = this;
LODWORD(this) = *(_DWORD *)(this + 728);
v2 = *(_QWORD *)(v1 + 664);
if ( (int)this < 0 )
LODWORD(this) = 0;
if ( (int)this > 999 )
this = 999;
else
this = (unsigned int)this;
*(_DWORD *)(v1 + 728) = this;
if ( v2 )
{
*(_DWORD *)(v2 + 1680) = this;
}
else
{
this = *(_QWORD *)(v1 + 672);
if ( this )
{
v3 = 0;
while ( 1 )
{
this = cocos2d::CCArray::count((cocos2d::CCArray *)this);
v4 = v3 >= (unsigned int)this;
v5 = v3++;
if ( v4 )
break;
*(_DWORD *)(cocos2d::CCArray::objectAtIndex(*(cocos2d::CCArray **)(v1 + 672), v5) + 1680) = *(_DWORD *)(v1 + 728);
this = *(_QWORD *)(v1 + 672);
}
}
}
return this;
}