//
// cocos2d::CCMenuItemToggle::setEnabled from 0x5d5160 to 0x5d51b2 (82 bytes)
//
// 0 xrefs:
//
// 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 cocos2d::CCMenuItemToggle::setEnabled(cocos2d::CCMenuItemToggle *a1, bool a2)
{
_BOOL4 v3; // r6
cocos2d::CCArray *m_uID; // r0
unsigned int v5; // r3
_DWORD *v6; // r2
int *v7; // r5
int *v8; // r4
int v9; // r0
int v10; // t1
v3 = a2;
if ( a1->m_bEnabled != a2 )
{
cocos2d::CCMenuItem::setEnabled(a1, a2);
m_uID = (cocos2d::CCArray *)a1[1].m_uID;
if ( m_uID )
{
if ( cocos2d::CCArray::count(m_uID) )
{
v5 = a1[1].m_uID;
if ( v5 )
{
v6 = *(_DWORD **)(v5 + 52);
if ( *v6 )
{
v7 = (int *)v6[3];
v8 = &v7[*v6 - 1];
while ( v7 <= v8 )
{
v10 = *v7++;
v9 = v10;
if ( !v10 )
break;
(*(void (__fastcall **)(int, _BOOL4))(*(_DWORD *)v9 + 520))(v9, v3);
}
}
}
}
}
}
}