//
// sub_96776 from 0x96776 to 0x967e2 (108 bytes)
//
// 1 xrefs:
// > sub_95948 @ 0x959b4
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 11:41:28 +0000
//
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;
}