//
// GJOptionsLayer::onToggle from 0x10037238c to 0x10037246c (224 bytes)
//
// 1 xrefs:
// > GJOptionsLayer::addToggleInternal @ 0x100371edc
//
// 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:23 +0000
//
void __fastcall GJOptionsLayer::onToggle(_QWORD *a1, __int64 a2)
{
__int64 v4; // x21
int v5; // w0
__int64 v6; // x0
__n128 v7; // q0
__int64 v8; // x21
__int64 v9; // x20
__int64 CString; // x0
char *v11; // x0
__int64 v12; // x0
void *__p[2]; // [xsp+8h] [xbp-38h] BYREF
char v14; // [xsp+1Fh] [xbp-21h]
v4 = a1[131];
v5 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a2 + 64LL))(a2);
v7 = cocos2d::CCDictionary::objectForKey_1(v4, v5);
if ( v6 )
{
v8 = v6;
v9 = GameManager::sharedState(v6);
CString = cocos2d::CCString::getCString(v8);
GameManager::toggleGameVariable(v9, CString);
v11 = (char *)cocos2d::CCString::getCString(v8);
sub_100009900(__p, v11);
(*(void (__fastcall **)(_QWORD *, void **))(*a1 + 1512LL))(a1, __p);
if ( v14 < 0 )
operator delete(__p[0]);
}
else
{
v12 = (*(__int64 (__fastcall **)(__int64, __n128))(*(_QWORD *)a2 + 64LL))(a2, v7);
(*(void (__fastcall **)(_QWORD *, __int64))(*a1 + 1520LL))(a1, v12);
}
}