//
// SetupTriggerPopup::toggleBG from 0x100219a50 to 0x100219abb (107 bytes)
//
// 3 xrefs:
// > UIOptionsLayer::init @ 0x1002a0549
// > UIPOptionsLayer::init @ 0x1002a5385
// > TouchControlEditLayer::init @ 0x100977d6f
//
// 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:27:01 +0000
//
__int64 __fastcall SetupTriggerPopup::toggleBG(__int64 a1, unsigned __int8 a2)
{
__int64 v2; // rax
__int64 result; // rax
v2 = (*(__int64 (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(a1 + 584) + 480LL))(*(_QWORD *)(a1 + 584), 1);
if ( v2 )
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v2 + 344LL))(v2, a2);
result = (*(__int64 (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(a1 + 584) + 480LL))(*(_QWORD *)(a1 + 584), 3);
if ( result )
return (*(__int64 (__fastcall **)(__int64, _QWORD))(*(_QWORD *)result + 344LL))(result, a2);
return result;
}