//
// EditorUI::toggleMode from 0x100470be4 to 0x100470c98 (180 bytes)
//
// 4 xrefs:
// > EditorUI::handleEditorAction @ 0x1001630c4
// > EditorUI::init @ 0x10046f904
// > EditorUI::onPlaytest @ 0x100471464
// > EditorUI::init @ 0x10046e934
//
// 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:05:38 +0000
//
void *__fastcall EditorUI::toggleMode(__int64 a1, __int64 a2)
{
void *result; // x0
int v4; // w20
__n128 v5; // q0
__int64 v6; // x20
__int64 v7; // x0
unsigned int v8; // w8
__int64 v9; // x0
__int64 v10; // x0
result = (void *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a2 + 64LL))(a2);
if ( *(_DWORD *)(a1 + 1436) != (_DWORD)result )
{
v4 = (int)result;
*(_DWORD *)(a1 + 1436) = (_DWORD)result;
EditorUI::resetUI(a1);
if ( (unsigned int)(v4 - 1) > 3 )
v6 = 169;
else
v6 = dword_10076F2C0[v4 - 1];
v7 = EditorSFXManager::sharedState(v5);
result = (void *)EditorSFXManager::playAction(v7, v6, 169);
v8 = *(_DWORD *)(a1 + 1436) - 1;
if ( v8 <= 3 )
{
v9 = *(_QWORD *)(a1 + 8 * v8 + 920);
v10 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v9 + 1072LL))(v9);
return ButtonSprite::updateBGImage(v10, (__int64)"GJ_button_02.png");
}
}
return result;
}