//
// ParentalOptionsLayer::applyToggleLock from 0x52d6f4 to 0x52d78a (150 bytes)
//
// 2 xrefs:
// > ParentalOptionsLayer::updateToggleStates @ 0x52d7cc
// > ParentalOptionsLayer::updateToggleStates @ 0x52d7dc
//
// 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 11:52:01 +0000
//
unsigned int __fastcall ParentalOptionsLayer::applyToggleLock(ParentalOptionsLayer *this, cocos2d::CCArray *a2, int a3)
{
unsigned int result; // r0
char v5; // r3
int v6; // r9
unsigned int v7; // r4
int v8; // r0
unsigned int v9; // r1
int v10; // r7
int v11; // r8
_DWORD v12[2]; // [sp+0h] [bp-8h] BYREF
v12[0] = this;
v12[1] = a2;
result = _stack_chk_guard;
if ( a2 )
{
if ( a3 )
{
v5 = -106;
LOWORD(v12[0]) = -26986;
}
else
{
v5 = -1;
LOWORD(v12[0]) = -1;
}
v6 = a3 ^ 1;
v7 = 0;
BYTE2(v12[0]) = v5;
while ( 1 )
{
result = cocos2d::CCArray::count(a2);
if ( v7 + 1 >= result )
break;
v8 = cocos2d::CCArray::objectAtIndex(a2, v7);
v9 = v7 + 1;
v7 += 2;
v10 = v8;
v11 = cocos2d::CCArray::objectAtIndex(a2, v9);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v10 + 528))(v10, v6);
CCMenuItemToggler::setSpriteColor(v10, (int)v12);
(*(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v11 + 536))(v11, v12);
}
}
return result;
}