//
// sub_5DE84 from 0x5de84 to 0x5def0 (108 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_5DE84(int a1, int a2, float *a3, int a4)
{
int v4; // r0
float v7; // s16
float v8; // r0
float v9; // s0
v4 = *(_DWORD *)(a1 + 4);
if ( a2 == 2 )
{
v7 = *(float *)(v4 + 36);
}
else
{
if ( a2 != 1 )
return 31;
v7 = *(float *)(v4 + 32);
}
v8 = log10f(v7);
v9 = -80.0;
if ( v7 > 0.0 )
v9 = v8 * 20.0;
*a3 = v9;
if ( a4 )
sub_BE420(a4, 32, "%.1f", v9);
return 0;
}