//
// EditorUI::toggleSnap from 0x100007fd0 to 0x10000805f (143 bytes)
//
// 2 xrefs:
// > EditorUI::handleEditorAction @ 0x10060c654
// > EditorUI::init @ 0x100005cee
//
// 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:18:48 +0000
//
__int64 __fastcall EditorUI::toggleSnap(__int64 a1, __int64 a2, __int64 a3)
{
__int64 v4; // rdi
unsigned __int8 GameVariable; // r15
__int64 v6; // rdx
__int64 v7; // rax
__int64 v8; // rax
const char *v9; // rsi
__int64 v10; // rax
v4 = GameManager::sharedState(a1, a2, a3);
GameVariable = GameManager::getGameVariable(v4, "0008");
v7 = GameManager::sharedState(v4, "0008", v6);
GameManager::setGameVariable(v7, "0008", GameVariable ^ 1u);
v8 = (*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 976) + 1072LL))(*(_QWORD *)(a1 + 976));
v9 = "GJ_button_02.png";
if ( GameVariable )
v9 = "GJ_button_01.png";
ButtonSprite::updateBGImage(v8, v9);
v10 = EditorSFXManager::sharedState();
return EditorSFXManager::playAction(v10, 190, 189);
}