//
// sub_18006F4E0 from 0x18006f4e0 to 0x18006f571 (145 bytes)
//
// 2 xrefs:
// > sub_18006E8E0 @ 0x18006e958
// > sub_18006EAF0 @ 0x18006eb51
//
// 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_18006F4E0(__int64 a1, float a2)
{
bool v3; // cf
float v4; // xmm4_4
float v5; // xmm1_4
__int64 result; // rax
float v7; // xmm1_4
v3 = a2 < 22000.0;
v4 = (float)*(int *)(*(_QWORD *)(a1 + 168) + 1744LL);
v5 = v4 * 0.31830987;
if ( v3 )
{
result = 0;
if ( a2 > v5 )
v7 = (float)(0.33333334 / (float)(22000.0 - v5)) * (float)(22000.0 - a2);
else
v7 = (float)(0.15915494 / a2) / (float)((float)(1.0 / v4) + (float)(0.15915494 / a2));
*(float *)(a1 + 804) = v7;
}
else
{
*(_DWORD *)(a1 + 804) = 0;
return 0;
}
return result;
}