//
// EditorUI::toggleTraceSelected from 0x1004754e4 to 0x100475598 (180 bytes)
//
// 2 xrefs:
// > EditorUI::handleEditorAction @ 0x100163388
// > EditorUI::handleEditorAction @ 0x1001634b4
//
// 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:40 +0000
//
bool __fastcall EditorUI::toggleTraceSelected(__int64 *a1, int a2)
{
int v4; // w0
__int64 v6; // x8
__int64 v7; // x9
__int64 v8; // x10
__int64 v9; // x9
__int64 v10; // x10
v4 = sub_1002E757C(a1[112]);
if ( !v4 )
{
v6 = a1[187];
if ( a2 )
{
v7 = a1[180];
if ( v6 )
{
v8 = *(_QWORD *)(v7 + 14824);
if ( v8 && *(_DWORD *)(v8 + 916) == *(_DWORD *)(v6 + 916) )
v6 = 0;
*(_QWORD *)(v7 + 14824) = v6;
}
else
{
*(_QWORD *)(v7 + 14824) = 0;
}
}
else if ( v6 && *(_DWORD *)(v6 + 1248) == 1 )
{
v9 = a1[180];
v10 = *(_QWORD *)(v9 + 14832);
if ( v10 && *(_DWORD *)(v10 + 916) == *(_DWORD *)(v6 + 916) )
v6 = 0;
*(_QWORD *)(v9 + 14832) = v6;
}
else
{
*(_QWORD *)(a1[180] + 14832) = 0;
}
}
return v4 == 0;
}