//
// SetupInstantCountPopup::onCountType from 0xa9e5a0 to 0xa9e660 (192 bytes)
//
// 5 xrefs:
// > ??> @ 0xbed20
// > SetupInstantCountPopup::init @ 0xa9f544
// > SetupInstantCountPopup::init @ 0xa9f5d8
// > SetupInstantCountPopup::init @ 0xa9f66c
// > ??> @ 0x15458e0
//
// 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:00:47 +0000
//
cocos2d::CCArray *__fastcall SetupInstantCountPopup::onCountType(SetupInstantCountPopup *this, cocos2d::CCObject *a2)
{
int v3; // w2
CCMenuItemToggler *v4; // x0
cocos2d::CCArray *result; // x0
unsigned int v6; // w20
bool v7; // cf
unsigned int v8; // w1
v3 = (*(__int64 (__fastcall **)(cocos2d::CCObject *))(*(_QWORD *)a2 + 64LL))(a2);
v4 = *((CCMenuItemToggler **)this + 133);
*((_DWORD *)this + 264) = v3;
CCMenuItemToggler::toggle(v4, v3 == 0);
CCMenuItemToggler::toggle(*((CCMenuItemToggler **)this + 134), *((_DWORD *)this + 264) == 1);
CCMenuItemToggler::toggle(*((CCMenuItemToggler **)this + 135), *((_DWORD *)this + 264) == 2);
result = *((cocos2d::CCArray **)this + 85);
if ( result )
{
*((_DWORD *)result + 461) = *((_DWORD *)this + 264);
}
else
{
result = *((cocos2d::CCArray **)this + 86);
if ( result )
{
v6 = 0;
while ( 1 )
{
result = (cocos2d::CCArray *)cocos2d::CCArray::count(result);
v7 = v6 >= (unsigned int)result;
v8 = v6++;
if ( v7 )
break;
*(_DWORD *)(cocos2d::CCArray::objectAtIndex(*((cocos2d::CCArray **)this + 86), v8) + 1844) = *((_DWORD *)this + 264);
result = *((cocos2d::CCArray **)this + 86);
}
}
}
return result;
}