//
// sub_10050C444 from 0x10050c444 to 0x10050c560 (284 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
//
__int64 __fastcall sub_10050C444(float *a1, int a2, float *a3, char *a4, int a5, int a6, int a7, int a8)
{
float v10; // s0
float v11; // s0
float v12; // s0
float v14; // s0
double v15; // d0
if ( a2 == 2 )
{
v12 = a1[169];
if ( v12 <= 0.0 )
{
*a3 = -80.0;
if ( !a4 )
return 0;
}
else
{
*a3 = log10f(v12) * 20.0;
if ( !a4 )
return 0;
}
v14 = a1[169];
if ( v14 > 0.0 )
goto LABEL_15;
goto LABEL_19;
}
if ( a2 == 1 )
{
v11 = a1[168];
if ( v11 <= 0.0 )
{
*a3 = -80.0;
if ( !a4 )
return 0;
}
else
{
*a3 = log10f(v11) * 20.0;
if ( !a4 )
return 0;
}
v14 = a1[168];
if ( v14 > 0.0 )
{
LABEL_15:
v10 = log10f(v14) * 20.0;
goto LABEL_16;
}
LABEL_19:
LOBYTE(v15) = 0;
goto LABEL_20;
}
if ( a2 )
return 31;
*a3 = a1[167];
if ( a4 )
{
v10 = a1[167];
LABEL_16:
v15 = v10;
LABEL_20:
sub_1004C7414(a4, 0x20u, "%.02f", (int)a4, a5, a6, a7, a8, SLOBYTE(v15));
}
return 0;
}