//
// sub_95D20 from 0x95d20 to 0x95ea4 (388 bytes)
//
// 1 xrefs:
// > sub_95EE4 @ 0x95ef8
//
// 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
//
float *__fastcall sub_95D20(float **a1, float a2, float a3, float *a4, int a5, float *a6)
{
float v8; // s16
float v11; // s0
float *result; // r0
float v13; // s26
float v14; // s24
float *v15; // r6
float *i; // r5
int v17; // r9
unsigned int v18; // r8
float v19; // s28
float v20; // s2
float *v21; // r0
float v22; // s0
unsigned int v23; // r1
v8 = a2 + 0.691;
v11 = powf(10.0, (float)(a2 + 0.691) * 0.1);
result = (float *)a5;
v13 = 0.0;
if ( v8 > -80.0 )
v13 = v11;
if ( a5 )
{
if ( a6 )
{
v14 = (float)(a3 - a2) / (float)a5;
if ( v14 > 0.0 )
{
memset(a6, 0, 4 * a5);
v15 = *a1;
i = *a1;
if ( a4 )
{
for ( i = *a1; v15 <= i && &v15[(_DWORD)a1[1]] > i && *i < v13; ++i )
*a6 = *a6 + 1.0;
}
v17 = 0;
while ( v15 <= i )
{
if ( v17 >= a5 )
break;
v18 = (unsigned int)&v15[(_DWORD)a1[1]];
if ( v18 <= (unsigned int)i )
break;
v19 = v8 + (float)(v14 * (float)(v17 + 1));
v20 = powf(10.0, v19 * 0.1);
v21 = &a6[v17++];
v22 = 0.0;
if ( v19 > -80.0 )
v22 = v20;
while ( v18 > (unsigned int)i && *i < v22 )
{
++i;
*v21 = *v21 + 1.0;
}
++i;
}
result = a4;
if ( a4 )
{
v23 = (unsigned int)i;
result = &a6[a5 - 1];
while ( v15 <= i && (unsigned int)&v15[(_DWORD)a1[1]] > v23 )
{
v23 += 4;
*result = *result + 1.0;
}
}
}
}
}
return result;
}