//
// sub_F808E4 from 0xf808e4 to 0xf80980 (156 bytes)
//
// 0 xrefs:
//
// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!
//
// 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 13:13:50 +0000
//
__int64 __fastcall sub_F808E4(unsigned __int8 *a1, unsigned __int8 *a2, unsigned __int64 a3)
{
unsigned __int64 v3; // x9
unsigned __int8 *v4; // x8
unsigned __int64 v5; // x12
unsigned __int64 v6; // x9
unsigned __int8 *v7; // x11
__int64 result; // x0
bool v9; // zf
unsigned __int64 v10; // x9
unsigned __int64 v11; // x13
unsigned __int8 *v12; // x9
unsigned __int8 *v13; // x10
__int64 v14; // x14
unsigned __int8 *v15; // x15
int v16; // t1
__int64 v17; // x8
v3 = *a1;
if ( (v3 & 1) != 0 )
{
v5 = *((_QWORD *)a1 + 1);
v4 = *((unsigned __int8 **)a1 + 2);
}
else
{
v4 = a1 + 4;
v5 = v3 >> 1;
}
v6 = *a2;
v7 = *((unsigned __int8 **)a2 + 2);
result = -1;
v9 = (v6 & 1) == 0;
v10 = v6 >> 1;
if ( v9 )
{
v7 = a2 + 4;
v11 = v10;
}
else
{
v11 = *((_QWORD *)a2 + 1);
}
if ( v5 > a3 && v11 )
{
v12 = &v4[4 * a3];
v13 = &v4[4 * v5];
if ( v5 != a3 )
{
LABEL_10:
v14 = 4 * v11;
v15 = v7;
while ( 1 )
{
v16 = *(_DWORD *)v15;
v15 += 4;
if ( *(_DWORD *)v12 == v16 )
break;
v14 -= 4;
if ( !v14 )
{
v12 += 4;
if ( v12 != v13 )
goto LABEL_10;
v12 = &v4[4 * v5];
break;
}
}
}
v17 = (v12 - v4) >> 2;
if ( v12 == v13 )
return -1;
else
return v17;
}
return result;
}