//
// GameManager::toggleGameVariable from 0x416e2c to 0x416e50 (36 bytes)
//
// 71 xrefs:
// > UILayer::handleAction @ 0x3fe1e2
// > UILayer::handleAction @ 0x3fe224
// > UILayer::handleAction @ 0x3fe2be
// > UILayer::handleAction @ 0x3fe31a
// > UILayer::handleAction @ 0x3fe3f8
// > UILayer::handleAction @ 0x3fe43a
// > UILayer::handleAction @ 0x3fe488
// > UILayer::handleAction @ 0x3fe560
// > UILayer::handleAction @ 0x3fe5bc
// > UILayer::handleAction @ 0x3fe618
// > UILayer::handleAction @ 0x3fe6fe
// > UILayer::handleAction @ 0x3fe76e
// > EditorUI::onStickyToggle @ 0x486582
// > EditorUI::init @ 0x48bf3a
// > EditorUI::init @ 0x48bf46
// > PauseLayer::onSideButtonPressed @ 0x48e748
// > EditorPauseLayer::toggleFollowPlayer @ 0x508ece
// > EditorPauseLayer::togglePlaytestMusic @ 0x508ee6
// > EditorPauseLayer::toggleIgnoreDamage @ 0x508efe
// > EditorPauseLayer::toggleEditorColorMode @ 0x508f14
// > EditorPauseLayer::toggleHideInvisible @ 0x508f36
// > EditorPauseLayer::togglePreviewParticles @ 0x508f4c
// > EditorPauseLayer::togglePreviewShaders @ 0x508f6e
// > EditorPauseLayer::togglePreviewAnim @ 0x508f84
// > EditorPauseLayer::toggleDebugDraw @ 0x508fa6
// > EditorPauseLayer::toggleEffectDuration @ 0x508fbe
// > EditorPauseLayer::toggleEffectLines @ 0x508fd6
// > EditorPauseLayer::toggleEditorGround @ 0x508fee
// > EditorPauseLayer::toggleEditorBackground @ 0x50901e
// > EditorPauseLayer::toggleEditorGrid @ 0x509052
// > EditorPauseLayer::toggleGridOnTop @ 0x50906a
// > EditorPauseLayer::toggleShowObjectInfo @ 0x5090c0
// > EditorPauseLayer::toggleSelectFilter @ 0x5090ea
// > EditorPauseLayer::toggleRecordOrder @ 0x509102
// > GJGarageLayer::onSpecial @ 0x50ac0e
// > ParentalOptionsLayer::onLockToggle @ 0x52c2a6
// > OptionsLayer::onMenuMusic @ 0x52c8f6
// > ParentalOptionsLayer::onToggle @ 0x530340
// > MoreOptionsLayer::onToggle @ 0x531828
// > MoreVideoOptionsLayer::onToggle @ 0x531ad0
// > InfoLayer::toggleExtendedMode @ 0x54068c
// > InfoLayer::toggleSmallCommentMode @ 0x5406ac
// > GameOptionsLayer::didToggle @ 0x5d39b2
// > GameOptionsLayer::didToggle @ 0x5d39d6
// > GameOptionsLayer::didToggle @ 0x5d39f4
// > GameOptionsLayer::didToggle @ 0x5d3a1a
// > GameOptionsLayer::didToggle @ 0x5d3a3c
// > GameOptionsLayer::didToggle @ 0x5d3a5e
// > GameOptionsLayer::didToggle @ 0x5d3a84
// > GJOptionsLayer::onToggle @ 0x5d738e
// > UIOptionsLayer::valueDidChange @ 0x5dd972
// > CreateParticlePopup::onTogglePerfLog @ 0x663d72
// > SFXBrowser::onToggleCompactMode @ 0x6c6346
// > EditorUI::handleEditorAction @ 0x6f1d8a
// > EditorUI::handleEditorAction @ 0x6f1e1e
// > EditorUI::handleEditorAction @ 0x6f1e9e
// > EditorUI::handleEditorAction @ 0x6f2390
// > EditorUI::toggleViewOption @ 0x70c3b0
// > ClearPlatformerSavesOptionsPopup::onBackupToggle @ 0x76157e
// > DeathMarkerSettingsPopup::onToggleColor @ 0x76dad6
// > DeathMarkerSettingsPopup::onToggleAnimation @ 0x76daee
// > DeathMarkerSettingsPopup::onToggleSound @ 0x76db06
// > DeathMarkerSettingsPopup::onToggleLimited @ 0x76db1e
// > DeathMarkerSettingsPopup::onToggleLocal @ 0x76db32
// > DeathMarkerSettingsPopup::onToggleGlobal @ 0x76db62
// > DeathMarkerSettingsPopup::onToggleDisabled @ 0x76db92
// > DeathMarkerSettingsPopup::onToggleLive @ 0x76dc26
// > DeathMarkerSettingsPopup::onToggleLabels @ 0x76dc56
// > DeathTrackerOptionsPopup::onToggleAutoScroll @ 0x76ff9a
// > TimeSpeedControl::onAudioTimeSpeedToggle @ 0x7a22ce
// > TouchControlEditLayer::valueDidChange @ 0x7a4ede
//
// 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:47:41 +0000
//
const char *__fastcall GameManager::toggleGameVariable(GameManager *this, char *a2)
{
GameManager *v3; // r0
GameManager *v4; // r0
const char *v5; // r4
GameManager *v6; // r0
v3 = (GameManager *)GameManager::sharedState(this);
v4 = (GameManager *)(GameManager::getGameVariable(v3, a2) ^ 1);
v5 = (const char *)(unsigned __int8)v4;
v6 = (GameManager *)GameManager::sharedState(v4);
GameManager::setGameVariable(v6, a2, v5);
return v5;
}