//
// sub_97B1AA from 0x97b1aa to 0x97b214 (106 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:06:03 +0000
//
int __fastcall sub_97B1AA(unsigned __int8 *a1, unsigned __int8 *a2, unsigned int a3)
{
unsigned int v3; // r3
unsigned int v4; // r3
unsigned __int8 *v5; // r8
unsigned int v6; // r4
unsigned int v7; // r6
unsigned __int8 *v8; // r9
int v9; // r1
int v10; // r5
int v11; // r0
v3 = *a1;
if ( (v3 & 1) != 0 )
{
v5 = *((unsigned __int8 **)a1 + 2);
v4 = *((_DWORD *)a1 + 1);
}
else
{
v4 = v3 >> 1;
v5 = a1 + 4;
}
v6 = *((_DWORD *)a2 + 1);
v7 = *a2;
v8 = *((unsigned __int8 **)a2 + 2);
if ( (v7 & 1) == 0 )
{
v6 = v7 >> 1;
v8 = a2 + 4;
}
if ( v6 )
{
if ( v4 > a3 )
v4 = a3 + 1;
v9 = 4 * v4;
while ( 1 )
{
v10 = v9;
if ( !v9 )
break;
v11 = sub_998B64(v8, *(_DWORD *)&v5[v9 - 4], v6);
v9 = v10 - 4;
if ( v11 )
return (v10 - 4) >> 2;
}
}
return -1;
}