//
// sub_97B06E from 0x97b06e to 0x97b0da (108 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_97B06E(unsigned __int8 *a1, unsigned __int8 *a2, unsigned int a3)
{
unsigned int v3; // r3
unsigned __int64 v4; // kr00_8
unsigned int v5; // r5
unsigned int v6; // r3
unsigned __int8 *v7; // r6
int result; // r0
_DWORD *v9; // r12
_DWORD *v10; // r3
int v11; // r0
int v12; // r4
unsigned __int8 *v13; // r5
int v14; // t1
v3 = *a1;
if ( (v3 & 1) != 0 )
v4 = *(_QWORD *)(a1 + 4);
else
v4 = __PAIR64__((unsigned int)(a1 + 4), v3 >> 1);
v5 = *((_DWORD *)a2 + 1);
v6 = *a2;
v7 = *((unsigned __int8 **)a2 + 2);
if ( (v6 & 1) == 0 )
{
v5 = v6 >> 1;
v7 = a2 + 4;
}
result = -1;
if ( (unsigned int)v4 > a3 && v5 )
{
v9 = (_DWORD *)(HIDWORD(v4) + 4 * v4);
v10 = (_DWORD *)(HIDWORD(v4) + 4 * a3);
if ( (_DWORD)v4 != a3 )
{
v11 = 4 * v5;
LABEL_10:
v12 = v11;
v13 = v7;
while ( 1 )
{
v14 = *(_DWORD *)v13;
v13 += 4;
if ( *v10 == v14 )
break;
v12 -= 4;
if ( !v12 )
{
if ( ++v10 != v9 )
goto LABEL_10;
v10 = (_DWORD *)(HIDWORD(v4) + 4 * v4);
break;
}
}
}
result = ((int)v10 - HIDWORD(v4)) >> 2;
if ( v10 == v9 )
return -1;
}
return result;
}