//
// sub_18000FAE0 from 0x18000fae0 to 0x18000fc03 (291 bytes)
//
// 3 xrefs:
// > ??> @ 0x18016c810
// > ??> @ 0x18016ca88
// > ??> @ 0x1801f6d8c
//
// 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
//
__int64 __fastcall sub_18000FAE0(__int64 a1, __int64 a2, int a3)
{
__int64 v3; // rbx
__int64 v6; // r8
float *v7; // rdx
int v8; // r9d
float v9; // xmm1_4
int v10; // ecx
int v11; // r9d
int v12; // ecx
unsigned int v13; // r9d
v3 = a3;
if ( a3 < 0 )
return 31;
if ( a2 && a3 )
{
v6 = 0;
v7 = (float *)(a2 + 8);
while ( 1 )
{
v8 = 0;
v9 = *(v7 - 1);
if ( (*(_DWORD *)v7 & 0x7F800000) == 0x7F800000 )
v8 = 29;
v10 = 0;
if ( (*(_DWORD *)(v7 - 1) & 0x7F800000) == 0x7F800000 )
v10 = 29;
v11 = v10 | v8;
v12 = 0;
if ( (*(_DWORD *)(v7 - 2) & 0x7F800000) == 0x7F800000 )
v12 = 29;
v13 = v12 | v11;
if ( v13 )
return v13;
if ( v6 > 0 && *(v7 - 2) <= *(v7 - 5) || v9 < 0.0 || v9 > 1.0 )
return 31;
++v6;
v7 += 3;
if ( v6 >= v3 )
goto LABEL_17;
}
}
else
{
LABEL_17:
*(_DWORD *)(a1 + 72) |= 4u;
*(_QWORD *)(a1 + 224) = a2;
*(_DWORD *)(a1 + 232) = v3;
return 0;
}
}