//
// sub_F7D6C4 from 0xf7d6c4 to 0xf7d708 (68 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:48 +0000
//
__int64 __fastcall sub_F7D6C4(unsigned __int8 *a1, unsigned __int8 a2, unsigned __int64 a3)
{
unsigned __int64 v3; // x9
unsigned __int8 *v4; // x8
unsigned __int64 v5; // x9
__int64 result; // x0
int v7; // w9
v3 = *a1;
if ( (v3 & 1) != 0 )
{
v5 = *((_QWORD *)a1 + 1);
v4 = *((unsigned __int8 **)a1 + 2);
}
else
{
v4 = a1 + 1;
v5 = v3 >> 1;
}
if ( v5 > a3 )
result = a3 + 1;
else
result = v5;
while ( result )
{
v7 = v4[--result];
if ( v7 != a2 )
return result;
}
return -1;
}