//
// cocos2d::CCMenuItemToggle::setSelectedIndex from 0x7dd408 to 0x7dd4ca (194 bytes)
//
// 0 xrefs:
//
// 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 12:00:46 +0000
//
int __fastcall cocos2d::CCMenuItemToggle::setSelectedIndex(int this, unsigned int a2)
{
int v2; // r4
int v4; // r3
int v5; // r0
int v6; // r5
const cocos2d::CCSize *v7; // r0
int (__fastcall *v8)(int, float *); // r7
float v9[2]; // [sp+4h] [bp-18h] BYREF
float v10[2]; // [sp+Ch] [bp-10h] BYREF
v2 = this;
if ( a2 != *(_DWORD *)(this + 300) )
{
this = cocos2d::CCArray::count(*(cocos2d::CCArray **)(this + 304));
if ( this )
{
v4 = *(_DWORD *)v2;
*(_DWORD *)(v2 + 300) = a2;
v5 = (*(int (__fastcall **)(int, int))(v4 + 240))(v2, -1061138431);
if ( v5 )
(*(void (__fastcall **)(int, _DWORD))(*(_DWORD *)v5 + 264))(v5, 0);
v6 = cocos2d::CCArray::objectAtIndex(*(cocos2d::CCArray **)(v2 + 304), *(_DWORD *)(v2 + 300));
(*(void (__fastcall **)(int, int, _DWORD, int))(*(_DWORD *)v2 + 236))(v2, v6, 0, -1061138431);
v7 = (const cocos2d::CCSize *)(*(int (__fastcall **)(int))(*(_DWORD *)v6 + 164))(v6);
cocos2d::CCSize::CCSize(v9, v7);
(*(void (__fastcall **)(int, float *))(*(_DWORD *)v2 + 160))(v2, v9);
v8 = *(int (__fastcall **)(int, float *))(*(_DWORD *)v6 + 92);
cocos2d::CCPoint::CCPoint(v10, v9[0] * 0.5, v9[1] * 0.5);
return v8(v6, v10);
}
}
return this;
}