//
// sub_918B98 from 0x918b98 to 0x918c50 (184 bytes)
//
// 0 xrefs:
//
// 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:04:35 +0000
//
bool __fastcall sub_918B98(int a1, _WORD *a2, int a3)
{
int v3; // r5
int v4; // r12
unsigned __int8 *v5; // r6
int v6; // r4
int v7; // t1
int v8; // r10
bool v9; // zf
unsigned int v10; // lr
unsigned int v11; // r3
__int16 v12; // r7
unsigned int v13; // r3
__int16 v15; // lr
__int16 v16; // r10
__int16 v17; // r7
v3 = 0;
v4 = -1;
v5 = (unsigned __int8 *)&unk_C4529F;
do
{
while ( 1 )
{
v7 = *++v5;
v6 = v7;
v11 = *(unsigned __int16 *)(a1 + 2 * v7);
v8 = a3 + 4 * v7;
v10 = v11 >> 15;
v9 = v11 >> 15 == 0;
v11 = (__int16)v11;
if ( !v9 )
v11 = -(__int16)v11;
if ( v11 > *(_DWORD *)(v8 + 128) )
break;
*a2 = 0;
*(_WORD *)(a1 + 2 * v6) = 0;
LABEL_9:
++v3;
++a2;
if ( v3 == 16 )
return v4 >= 0;
}
v12 = *(_WORD *)(a3 + 2 * v6);
v13 = (*(_DWORD *)(v8 + 64) + *(unsigned __int16 *)(a3 + 2 * v6 + 32) * v11) >> 17;
if ( v13 < 0x800 )
{
if ( v10 )
v13 = -v13;
v15 = v13;
v16 = v13;
}
else
{
if ( !v10 )
{
v4 = v3;
*(_WORD *)(a1 + 2 * v6) = 2047 * v12;
*a2 = 2047;
goto LABEL_9;
}
v16 = -2047;
v13 = -2047;
v15 = -2047;
}
v17 = v15 * v12;
if ( v13 )
v4 = v3;
++v3;
++a2;
*(_WORD *)(a1 + 2 * v6) = v17;
*(a2 - 1) = v16;
}
while ( v3 != 16 );
return v4 >= 0;
}