//
// sub_96776 from 0x96776 to 0x967e2 (108 bytes)
//
// 1 xrefs:
// > sub_95948 @ 0x959b4
//
// 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_96776(_DWORD *a1, float *a2)
{
float v2; // s0
int v3; // r3
int v4; // r2
int v5; // r1
float v6; // s2
int v7; // r4
v2 = *a2;
v3 = 0;
v4 = a1[1] - 1;
while ( 1 )
{
if ( v3 > v4 )
return v3;
if ( *(float *)(*a1 + 4 * v4) < v2 )
break;
v5 = (v3 + v4) / 2;
v6 = *(float *)(*a1 + 4 * v5);
v7 = v2 < v6;
if ( v6 < v2 )
v7 = -1;
if ( !v7 )
return v5;
if ( v7 > 0 )
v4 = v5 - 1;
else
v3 = v5 + 1;
}
return v4 + 1;
}