//
// sub_100374CE0 from 0x100374ce0 to 0x100374d74 (148 bytes)
//
// 4 xrefs:
// > GJAccountSettingsLayer::init @ 0x100374670
// > GJAccountSettingsLayer::init @ 0x100374290
// > GJAccountSettingsLayer::init @ 0x100374324
// > GJAccountSettingsLayer::init @ 0x1003743bc
//
// 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:03:24 +0000
//
__int64 __fastcall sub_100374CE0(__int64 result, __int64 a2)
{
__int64 v2; // x19
__int64 v3; // x8
unsigned int *v4; // x9
__int64 v5; // x8
__int64 *v6; // x21
unsigned __int64 v7; // x22
__int64 v8; // x20
_BOOL8 v9; // x1
v2 = result;
if ( a2 )
{
result = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a2 + 64LL))(a2);
*(_DWORD *)(v2 + 672) = result;
}
v3 = *(_QWORD *)(v2 + 736);
if ( v3 )
{
v4 = *(unsigned int **)(v3 + 56);
v5 = *v4;
if ( (_DWORD)v5 )
{
v6 = *((__int64 **)v4 + 2);
v7 = (unsigned __int64)&v6[v5 - 1];
do
{
v8 = *v6;
if ( !*v6 )
break;
v9 = (*(unsigned int (__fastcall **)(__int64))(*(_QWORD *)v8 + 64LL))(*v6) != *(_DWORD *)(v2 + 672);
result = CCMenuItemToggler::toggle(v8, v9);
++v6;
}
while ( (unsigned __int64)v6 <= v7 );
}
}
return result;
}