//
// sub_180074E50 from 0x180074e50 to 0x180074eeb (155 bytes)
//
// 2 xrefs:
// > sub_1800741F0 @ 0x180074268
// > sub_180074400 @ 0x18007446f
//
// 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_180074E50(__int64 a1, float a2)
{
bool v3; // cf
float v4; // xmm0_4
float v5; // xmm1_4
__int64 result; // rax
v3 = a2 < 22000.0;
v4 = (float)*(int *)(*(_QWORD *)(a1 + 168) + 1744LL);
v5 = v4 * 0.31830987;
if ( v3 )
{
result = 0;
if ( a2 > v5 )
*(float *)(a1 + 804) = (float)((float)(0.33333334 / (float)(22000.0 - v5)) * (float)(a2 - v5)) + 0.66666669;
else
*(float *)(a1 + 804) = (float)(1.0 / v4) / (float)((float)(0.15915494 / a2) + (float)(1.0 / v4));
}
else
{
*(_DWORD *)(a1 + 804) = 1065353216;
return 0;
}
return result;
}