//
// sub_8AD9F0 from 0x8ad9f0 to 0x8ada58 (104 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:03:52 +0000
//
int __fastcall sub_8AD9F0(int result, int *a2, int a3, int a4)
{
int v4; // lr
int v5; // r6
int *v6; // r12
int v7; // t1
int v8; // r4
unsigned int v9; // r2
int v10; // r3
int v11; // r7
v4 = *(_DWORD *)(result + 112);
v5 = *(_DWORD *)(*(_DWORD *)(result + 484) + 24);
if ( a4 > 0 )
{
v6 = &a2[a4];
do
{
v7 = *a2++;
result = v7 + 3;
v8 = v7 + 3 * (v4 + 1);
if ( v4 )
{
do
{
v9 = *(unsigned __int8 *)(result - 2);
result += 3;
v10 = 2 * (*(unsigned __int8 *)(result - 4) >> 3) + (v9 >> 2 << 6);
v11 = *(_DWORD *)(v5 + 4 * (*(unsigned __int8 *)(result - 6) >> 3));
if ( *(_WORD *)(v11 + v10) != 0xFFFF )
++*(_WORD *)(v11 + v10);
}
while ( result != v8 );
}
}
while ( a2 != v6 );
}
return result;
}