//
// SetupInstantCountPopup::updateItemID from 0x1001bcf00 to 0x1001bcf80 (128 bytes)
//
// 2 xrefs:
// > SetupInstantCountPopup::onTargetIDArrow @ 0x1001bc9cc
// > SetupInstantCountPopup::textChanged @ 0x1001bd0d4
//
// 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
//
void __fastcall SetupInstantCountPopup::updateItemID(SetupInstantCountPopup *a1)
{
int v1; // w8
EffectGameObject *m_gameObject; // x9
cocos2d::CCArray *m_gameObjects; // x0
__int64 v5; // x20
v1 = a1->m_itemID & ~(a1->m_itemID >> 31);
if ( v1 >= 9999 )
v1 = 9999;
a1->m_itemID = v1;
m_gameObject = a1->m_gameObject;
if ( m_gameObject )
{
m_gameObject->m_itemID = v1;
}
else
{
m_gameObjects = a1->m_gameObjects;
if ( m_gameObjects && (unsigned int)sub_10024A36C(m_gameObjects) )
{
v5 = 0;
do
{
*(_DWORD *)(sub_10024A388(a1->m_gameObjects, v5) + 1680) = a1->m_itemID;
v5 = (unsigned int)(v5 + 1);
}
while ( (unsigned int)v5 < (unsigned int)sub_10024A36C(a1->m_gameObjects) );
}
}
}