//
// GameManager::toggleGameVariable from 0x10036d290 to 0x10036d33a (170 bytes)
//
// 71 xrefs:
// > EditorUI::init @ 0x1000078be
// > EditorUI::init @ 0x1000078d2
// > EditorUI::onStickyToggle @ 0x100008b8c
// > EditorPauseLayer::toggleFollowPlayer @ 0x10027ef54
// > EditorPauseLayer::togglePlaytestMusic @ 0x10027ef74
// > EditorPauseLayer::toggleIgnoreDamage @ 0x10027ef94
// > EditorPauseLayer::toggleEditorColorMode @ 0x10027efb8
// > EditorPauseLayer::toggleHideInvisible @ 0x10027efe4
// > EditorPauseLayer::togglePreviewParticles @ 0x10027f008
// > EditorPauseLayer::togglePreviewShaders @ 0x10027f034
// > EditorPauseLayer::togglePreviewAnim @ 0x10027f058
// > EditorPauseLayer::toggleDebugDraw @ 0x10027f084
// > EditorPauseLayer::toggleEffectDuration @ 0x10027f0a4
// > EditorPauseLayer::toggleEffectLines @ 0x10027f0c4
// > EditorPauseLayer::toggleEditorGround @ 0x10027f0ec
// > EditorPauseLayer::toggleEditorBackground @ 0x10027f13c
// > EditorPauseLayer::toggleEditorGrid @ 0x10027f184
// > EditorPauseLayer::toggleGridOnTop @ 0x10027f1ac
// > EditorPauseLayer::toggleShowObjectInfo @ 0x10027f228
// > EditorPauseLayer::toggleSelectFilter @ 0x10027f264
// > EditorPauseLayer::toggleRecordOrder @ 0x10027f284
// > GJOptionsLayer::onToggle @ 0x100287b80
// > GameOptionsLayer::didToggle @ 0x10029f1c8
// > GameOptionsLayer::didToggle @ 0x10029f202
// > GameOptionsLayer::didToggle @ 0x10029f273
// > GameOptionsLayer::didToggle @ 0x10029f29f
// > GameOptionsLayer::didToggle @ 0x10029f2b3
// > GameOptionsLayer::didToggle @ 0x10029f2db
// > GameOptionsLayer::didToggle @ 0x10029f311
// > UIOptionsLayer::valueDidChange @ 0x1002a261c
// > GJGarageLayer::onSpecial @ 0x100357214
// > PauseLayer::onSideButtonPressed @ 0x1003c173f
// > SFXBrowser::onToggleCompactMode @ 0x10042e372
// > CreateParticlePopup::onTogglePerfLog @ 0x100467f2c
// > UILayer::handleAction @ 0x1004c3bd5
// > UILayer::handleAction @ 0x1004c3ca5
// > UILayer::handleAction @ 0x1004c3d39
// > UILayer::handleAction @ 0x1004c3e48
// > UILayer::handleAction @ 0x1004c3f2d
// > UILayer::handleAction @ 0x1004c3fca
// > UILayer::handleAction @ 0x1004c4214
// > UILayer::handleAction @ 0x1004c42b2
// > UILayer::handleAction @ 0x1004c450f
// > UILayer::handleAction @ 0x1004c45b4
// > UILayer::handleAction @ 0x1004c4631
// > UILayer::handleAction @ 0x1004c46ce
// > EditorUI::handleEditorAction @ 0x10060bf49
// > EditorUI::handleEditorAction @ 0x10060c7ba
// > EditorUI::handleEditorAction @ 0x10060c8d5
// > EditorUI::handleEditorAction @ 0x10060ca52
// > EditorUI::toggleViewOption @ 0x10063e852
// > OptionsLayer::onMenuMusic @ 0x10087be53
// > MoreOptionsLayer::onToggle @ 0x10087f27e
// > MoreVideoOptionsLayer::onToggle @ 0x100883352
// > sub_1008858B0 @ 0x1008858c4
// > ParentalOptionsLayer::onToggle @ 0x1008866e2
// > InfoLayer::toggleExtendedMode @ 0x1008942d8
// > InfoLayer::toggleSmallCommentMode @ 0x100894308
// > sub_1008B55B0 @ 0x1008b55c4
// > sub_1008C7F70 @ 0x1008c7f83
// > sub_1008C7FB0 @ 0x1008c7fc3
// > sub_1008C7FF0 @ 0x1008c8004
// > sub_1008C8010 @ 0x1008c8024
// > sub_1008C8030 @ 0x1008c8044
// > sub_1008C8050 @ 0x1008c8065
// > sub_1008C8140 @ 0x1008c8155
// > sub_1008C81F0 @ 0x1008c8204
// > sub_1008C8210 @ 0x1008c8223
// > sub_1008CA590 @ 0x1008ca5a4
// > TimeSpeedControl::onAudioTimeSpeedToggle @ 0x100977c6c
// > TouchControlEditLayer::valueDidChange @ 0x10097a792
//
// This function is hookable on this platform (idp: pc, 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 12:29:01 +0000
//
__int64 __fastcall GameManager::toggleGameVariable(__int64 a1, std::string::value_type *a2)
{
__int64 v2; // rdi
void *v3; // r14
unsigned __int8 GameVariable; // al
__int64 v5; // rdi
unsigned __int8 v6; // r15
void *v7; // r14
unsigned int v8; // r14d
v2 = qword_100BE3098;
if ( !qword_100BE3098 )
{
v3 = operator new(0x6B8u);
sub_100377960(v3);
qword_100BE3098 = (__int64)v3;
(*(void (__fastcall **)(void *))(*(_QWORD *)v3 + 80LL))(v3);
v2 = qword_100BE3098;
}
GameVariable = GameManager::getGameVariable(v2, a2);
v5 = qword_100BE3098;
if ( !qword_100BE3098 )
{
v6 = GameVariable;
v7 = operator new(0x6B8u);
sub_100377960(v7);
qword_100BE3098 = (__int64)v7;
(*(void (__fastcall **)(void *))(*(_QWORD *)v7 + 80LL))(v7);
v5 = qword_100BE3098;
GameVariable = v6;
}
v8 = GameVariable ^ 1;
GameManager::setGameVariable(v5, a2);
return v8;
}