//
// sub_953AA0 from 0x953aa0 to 0x953ae4 (68 bytes)
//
// 1 xrefs:
// > sub_9538BC @ 0x9538ec
//
// 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 12:05:26 +0000
//
_DWORD *__fastcall sub_953AA0(_DWORD *a1, int a2, int a3, _DWORD *a4, int a5, int a6, int a7, _DWORD *a8)
{
unsigned int v8; // r4
unsigned int v9; // r5
int v10; // r6
v8 = a5 - a2;
while ( 1 )
{
v9 = v8;
if ( !v8 )
break;
v10 = a2 + (v8 >> 1);
v8 >>= 1;
if ( *a8 >= *a4 + 8 * v10 + ((2 * *(_DWORD *)(*a4 + 8 * v10)) & 0x80000000 | *(_DWORD *)(*a4 + 8 * v10)) )
{
v8 = v9 - 1 - v8;
a2 = v10 + 1;
}
}
*a1 = a2;
a1[1] = a3;
a1[2] = a4;
return a1 + 3;
}