//
// cocos2d::CCMenuItemToggle::initWithTarget from 0x7ddf04 to 0x7ddf52 (78 bytes)
//
// 1 xrefs:
// > cocos2d::CCMenuItemToggle::createWithTarget @ 0x7ddfb2
//
// 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:47 +0000
//
int __fastcall cocos2d::CCMenuItemToggle::initWithTarget(int a1, int a2, int a3, int a4, cocos2d::CCObject *a5, int a6)
{
cocos2d::CCArray *v8; // r0
cocos2d::CCArray *v9; // r0
int v10; // r6
cocos2d::CCObject *v11; // t1
v8 = (cocos2d::CCArray *)cocos2d::CCMenuItem::initWithTarget(a1, a2, a3, a4);
v9 = cocos2d::CCArray::create(v8);
*(_DWORD *)(a1 + 304) = v9;
cocos2d::CCObject::retain((int)v9);
v10 = a6 - 4;
while ( a5 )
{
cocos2d::CCArray::addObject(*(cocos2d::CCArray **)(a1 + 304), a5);
v11 = *(cocos2d::CCObject **)(v10 + 4);
v10 += 4;
a5 = v11;
}
*(_DWORD *)(a1 + 300) = -1;
(*(void (__fastcall **)(int, _DWORD))(*(_DWORD *)a1 + 540))(a1, 0);
return 1;
}