//
// sub_C9AB48 from 0xc9ab48 to 0xc9ac60 (280 bytes)
//
// 3 xrefs:
// > sub_C9BDA0 @ 0xc9c96c
// > sub_C9BDA0 @ 0xc9c978
// > sub_C9BDA0 @ 0xc9c984
//
// 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
//
void __fastcall sub_C9AB48(int *a1, void *a2)
{
int *v2; // x4
int v3; // w3
int *v5; // x19
unsigned int v6; // w0
int v7; // t1
float v9; // s0
double v10; // d8
__int64 i; // x19
unsigned int v12; // w0
v2 = a1 + 256;
v3 = 0;
v5 = a1;
v6 = 0;
do
{
v7 = *v5++;
v6 += v7;
if ( v7 )
++v3;
}
while ( v5 != v2 );
if ( v3 <= 1 )
{
memset(a2, 0, 0x800u);
}
else
{
if ( v6 > 0xFF )
off_1260550();
else
v9 = flt_F54D80[v6];
v10 = v9;
for ( i = 0; i != 256; ++i )
{
while ( 1 )
{
v12 = a1[i];
if ( v12 > 0xFF )
break;
*((double *)a2 + i++) = v10 - flt_F54D80[v12];
if ( i == 256 )
return;
}
*((double *)a2 + i) = v10 - off_1260550();
}
}
}