//
// sub_10022342C from 0x10022342c to 0x1002234fc (208 bytes)
//
// 2 xrefs:
// > sub_100221F74 @ 0x100222db8
// > sub_100221F74 @ 0x100222e6c
//
// 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 11:01:09 +0000
//
__int64 __fastcall sub_10022342C(__int64 a1, __int64 a2)
{
int v4; // w21
int v5; // w0
__int64 v6; // x8
__int64 v8; // x0
__int64 v9; // x20
v4 = *(_DWORD *)(a1 + 1112);
if ( v4 == (*(unsigned int (__fastcall **)(__int64))(*(_QWORD *)a2 + 64LL))(a2) )
v5 = 0;
else
v5 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a2 + 64LL))(a2);
*(_DWORD *)(a1 + 1112) = v5;
v6 = *(_QWORD *)(a1 + 680);
if ( v6 )
{
*(_DWORD *)(v6 + 1512) = v5;
}
else
{
v8 = *(_QWORD *)(a1 + 688);
if ( v8 && (unsigned int)sub_1002E757C(v8) )
{
v9 = 0;
do
{
*(_DWORD *)(sub_1002E75A0(*(_QWORD *)(a1 + 688), v9) + 1512) = *(_DWORD *)(a1 + 1112);
v9 = (unsigned int)(v9 + 1);
}
while ( (unsigned int)v9 < (unsigned int)sub_1002E757C(*(_QWORD *)(a1 + 688)) );
}
}
CCMenuItemToggler::toggle(*(_QWORD *)(a1 + 1120), *(_DWORD *)(a1 + 1112) == 1);
return CCMenuItemToggler::toggle(*(_QWORD *)(a1 + 1128), *(_DWORD *)(a1 + 1112) == 2);
}