//
// SetupMoveCommandPopup::updateControlVisibility from 0x1006e02b0 to 0x1006e0456 (422 bytes)
//
// 2 xrefs:
// > SetupMoveCommandPopup::init @ 0x1006dffd8
// > SetupMoveCommandPopup::valueDidChange @ 0x1006e079f
//
// 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:35:44 +0000
//
__int64 __fastcall SetupMoveCommandPopup::updateControlVisibility(__int64 a1, __m128 a2)
{
bool v3; // r14
bool v4; // r15
_BOOL8 v5; // rdx
bool v6; // r14
__int64 result; // rax
int v8; // r14d
int v9; // r15d
__m128 v10; // xmm0
__m128 v11; // rt1
v3 = (*(float (__fastcall **)(__int64, __int64))(*(_QWORD *)a1 + 1464LL))(a1, 100) != 0.0;
v4 = (*(float (__fastcall **)(__int64, __int64))(*(_QWORD *)a1 + 1464LL))(a1, 394) != 0.0;
v5 = v3;
v6 = v4 || v3;
(*(void (__fastcall **)(__int64, __int64, _BOOL8))(*(_QWORD *)a1 + 1352LL))(a1, 9002, v5);
(*(void (__fastcall **)(__int64, __int64, bool))(*(_QWORD *)a1 + 1352LL))(a1, 9003, v4);
(*(void (__fastcall **)(__int64, __int64, bool))(*(_QWORD *)a1 + 1352LL))(a1, 9004, v6);
result = (*(__int64 (__fastcall **)(__int64, __int64, bool))(*(_QWORD *)a1 + 1352LL))(a1, 9001, !v6);
if ( !v6 )
{
LOBYTE(v8) = 1;
LOBYTE(v9) = 1;
if ( (*(float (__fastcall **)(__int64, __int64))(*(_QWORD *)a1 + 1464LL))(a1, 58) == 0.0 )
{
v10.f32[0] = (*(float (__fastcall **)(__int64, __int64))(*(_QWORD *)a1 + 1464LL))(a1, 141);
v9 = _mm_cvtsi128_si32((__m128i)_mm_cmpneq_ss((__m128)0LL, v10)) & 1;
}
(*(void (__fastcall **)(__int64, __int64, _QWORD))(*(_QWORD *)a1 + 1352LL))(a1, 28, (unsigned __int8)v9 ^ 1u);
(*(void (__fastcall **)(__int64, __int64, _QWORD))(*(_QWORD *)a1 + 1352LL))(a1, 143, (unsigned __int8)v9);
if ( (*(float (__fastcall **)(__int64, __int64))(*(_QWORD *)a1 + 1464LL))(a1, 59) == 0.0 )
{
*(double *)a2.i64 = (*(double (__fastcall **)(__int64, __int64))(*(_QWORD *)a1 + 1464LL))(a1, 142);
v11.i32[0] = 0;
v8 = _mm_cvtsi128_si32((__m128i)_mm_cmpneq_ss(a2, v11)) & 1;
}
(*(void (__fastcall **)(__int64, __int64, _QWORD))(*(_QWORD *)a1 + 1352LL))(a1, 29, (unsigned __int8)v8 ^ 1u);
return (*(__int64 (__fastcall **)(__int64, __int64, _QWORD))(*(_QWORD *)a1 + 1352LL))(a1, 144, (unsigned __int8)v8);
}
return result;
}