//
// SetupCameraModePopup::determineStartValues from 0x100451e78 to 0x100452024 (428 bytes)
//
// 1 xrefs:
// > ??> @ 0x100966bf8
//
// 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:21 +0000
//
__int64 __fastcall SetupCameraModePopup::determineStartValues(__int64 a1)
{
__int64 result; // x0
_QWORD *v3; // x20
unsigned int v4; // w21
char v5; // w23
char v6; // w24
float v7; // s8
float v8; // s10
__int64 v9; // x0
result = SetupTriggerPopup::determineStartValues(a1);
if ( *(_QWORD *)(a1 + 680) )
{
v3 = sub_1002E736C();
result = sub_1002E74E0((__int64)v3);
if ( !v3 )
goto LABEL_34;
}
else
{
v3 = *(_QWORD **)(a1 + 688);
if ( !v3 )
goto LABEL_34;
}
result = sub_1002E757C((__int64)v3);
if ( !(_DWORD)result )
goto LABEL_34;
*(_WORD *)(a1 + 1076) = 257;
*(_BYTE *)(a1 + 1078) = 1;
result = sub_1002E757C((__int64)v3);
if ( !(_DWORD)result )
goto LABEL_34;
v4 = 0;
v5 = 0;
v6 = 0;
v7 = -99999.0;
v8 = -99999.0;
do
{
v9 = sub_1002E75A0((__int64)v3, v4);
if ( (*(_BYTE *)(v9 + 1748) & 1) == 0 )
*(_BYTE *)(a1 + 1076) = 0;
if ( (*(_BYTE *)(v9 + 1749) & 1) == 0 )
*(_BYTE *)(a1 + 1077) = 0;
if ( (v6 & 1) != 0 )
{
v6 = 1;
if ( (v5 & 1) != 0 )
goto LABEL_20;
}
else if ( v8 == -99999.0 )
{
v6 = 0;
v8 = *(float *)(v9 + 1752);
if ( (v5 & 1) != 0 )
goto LABEL_20;
}
else if ( v8 == *(float *)(v9 + 1752) )
{
v6 = 0;
if ( (v5 & 1) != 0 )
{
LABEL_20:
v5 = 1;
goto LABEL_27;
}
}
else
{
v6 = 1;
v8 = -99999.0;
if ( (v5 & 1) != 0 )
goto LABEL_20;
}
if ( v7 == -99999.0 )
{
v5 = 0;
v7 = *(float *)(v9 + 1756);
}
else if ( v7 == *(float *)(v9 + 1756) )
{
v5 = 0;
}
else
{
v5 = 1;
v7 = -99999.0;
}
LABEL_27:
if ( *(_DWORD *)(v9 + 1028) != 2925 )
*(_BYTE *)(a1 + 1078) = 0;
++v4;
result = sub_1002E757C((__int64)v3);
}
while ( v4 < (unsigned int)result );
if ( v8 != -99999.0 )
*(_DWORD *)(a1 + 1048) = (int)v8;
if ( v7 != -99999.0 )
*(float *)(a1 + 1072) = v7;
LABEL_34:
if ( (*(_BYTE *)(a1 + 1077) & 1) == 0 )
{
*(_DWORD *)(a1 + 1048) = 10;
*(_DWORD *)(a1 + 1072) = 1056964608;
}
return result;
}