//
// sub_E9F0E4 from 0xe9f0e4 to 0xe9f168 (132 bytes)
//
// 1 xrefs:
// > sub_E9F4F4 @ 0xe9f524
//
// 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:11:06 +0000
//
unsigned __int64 __fastcall sub_E9F0E4(unsigned __int64 result, __int64 a2, __int64 a3, int a4)
{
int v4; // w10
__int64 v5; // x7
__int64 v6; // x8
unsigned __int8 *v7; // x4
unsigned __int8 *v8; // x6
unsigned int v9; // w5
__int64 v10; // x5
v4 = *(_DWORD *)(result + 136);
v5 = *(_QWORD *)(*(_QWORD *)(result + 656) + 48LL);
if ( a4 > 0 )
{
v6 = 0;
do
{
v7 = *(unsigned __int8 **)(a2 + 8 * v6);
v8 = &v7[3 * (v4 - 1) + 3];
if ( v4 )
{
do
{
v9 = *v7;
v7 += 3;
v10 = *(_QWORD *)(v5 + 8LL * (v9 >> 3));
result = ((unsigned __int64)(*(v7 - 2) >> 2) << 6) + 2LL * (*(v7 - 1) >> 3);
if ( *(_WORD *)(v10 + result) != 0xFFFF )
++*(_WORD *)(v10 + result);
}
while ( v7 != v8 );
}
++v6;
}
while ( a4 > (int)v6 );
}
return result;
}