//
// sub_75BEEC from 0x75beec to 0x75bfd0 (228 bytes)
//
// 0 xrefs:
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
int __fastcall sub_75BEEC(int a1, _DWORD *a2, __int64 a3, int a4, int a5, unsigned __int8 a6)
{
int v7; // r5
int v8; // r7
_BOOL4 v9; // lr
_BOOL4 v10; // r12
int v11; // r5
_BOOL4 v12; // r0
unsigned int v13; // r6
_BOOL4 v15; // r0
v7 = a2[8];
v8 = v7 & 8;
v9 = (a6 & v7 & 8) != 0;
*(_QWORD *)a1 = -1;
*(_DWORD *)(a1 + 8) = 0;
v10 = (v7 & 0x10 & a6) != 0;
if ( (a6 & v7 & 8) != 0 )
{
v11 = a2[1];
v12 = a3 == 0;
if ( v11 )
v12 = 1;
if ( !v12 )
return a1;
goto LABEL_5;
}
v11 = a2[4];
v15 = a3 == 0;
if ( v11 )
v15 = 1;
if ( !v15 )
return a1;
if ( v10 )
{
LABEL_5:
v13 = a2[5];
if ( v13 && v13 > a2[3] )
{
if ( !v8 )
{
a2[1] = v13;
a2[2] = v13;
}
a2[3] = v13;
}
if ( a3 >= 0 && a2[3] - v11 >= a3 )
{
if ( v9 )
a2[2] = a2[1] + a3;
if ( v10 )
a2[5] = a2[4] + a3;
*(_QWORD *)a1 = a3;
*(_DWORD *)(a1 + 8) = a4;
}
return a1;
}
return a1;
}