//
// sub_9BD64 from 0x9bd64 to 0x9be30 (204 bytes)
//
// 1 xrefs:
// > sub_9D7EC @ 0x9d8d4
//
// 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_9BD64(int a1, int a2)
{
int v4; // r0
float *v5; // r10
int v6; // r4
int v7; // r11
float v8; // s16
int v9; // r6
int v10; // r0
int v11; // r1
dword_113638[0] = 1065353216;
dword_11363C = 0;
dword_115638 = a2 >> 1;
dword_11563C = 1;
v4 = sub_9BE3C(a1, 1040187392);
v5 = &flt_113640;
*(int *)((char *)dword_113638 + (a2 & 0xFFFFFFFC)) = v4;
*(int *)((char *)&dword_113638[1] + (a2 & 0xFFFFFFFC)) = v4;
v6 = 2;
v7 = -1;
v8 = 1.0 / (float)(a2 >> 2);
while ( v6 < a2 >> 2 )
{
v9 = sub_9BE3C(a1, (float)((float)v6 * 0.125) * v8);
v10 = sub_9BEAC(a1, (float)((float)v6 * 0.125) * v8);
*(_DWORD *)v5 = v9;
*((_DWORD *)v5 + 1) = v10;
v5 += 2;
v6 += 2;
v11 = dword_115638 + v7;
v7 -= 2;
dword_113638[v11] = v9;
dword_113638[v11 - 1] = v10;
}
return sub_9BEC0(&dword_115638, dword_113638, dword_115638);
}