//
// sub_F196A8 from 0xf196a8 to 0xf19818 (368 bytes)
//
// 1 xrefs:
// > sub_F29B2C @ 0xf29bf8
//
// 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:12:33 +0000
//
__int64 __fastcall sub_F196A8(__int64 a1, _QWORD *a2)
{
__int64 result; // x0
__int64 v4; // x4
int v5; // w2
int v6; // w2
int v7; // w2
char *v8; // x1
char *v9; // x1
char *v10; // x1
signed int v11; // w2
unsigned int v12; // w3
signed int v13; // w2
unsigned int v14; // w3
_QWORD v15[3]; // [xsp+38h] [xbp+38h] BYREF
sub_F11D54(a1, v15);
LABEL_2:
result = v15[0];
v4 = v15[2];
while ( result )
{
if ( *(_BYTE *)result )
{
if ( *(_BYTE *)result == 1 )
{
++*(_DWORD *)(*a2 + 4LL * (*(_DWORD *)(result + 4) + 280));
}
else
{
if ( *(unsigned __int16 *)(result + 2) > 0x1FFu )
{
v13 = *(unsigned __int16 *)(result + 2) - 1;
v14 = __clz(v13) ^ 0x1F;
v5 = ((v13 >> (v14 - 1)) & 1) + 2 * v14;
}
else
{
v5 = byte_11E5760[2 * *(unsigned __int16 *)(result + 2)];
}
++*(_DWORD *)(*a2 + 4LL * (v5 + 256));
v6 = *(_DWORD *)(result + 4);
if ( v6 > 511 )
{
v11 = v6 - 1;
v12 = __clz(v11) ^ 0x1F;
v7 = ((v11 >> (v12 - 1)) & 1) + 2 * v12;
}
else
{
v7 = byte_11E5760[2 * v6];
}
++*((_DWORD *)a2 + v7 + 770);
}
}
else
{
v8 = (char *)a2 + 4 * *(unsigned __int8 *)(result + 7);
++*((_DWORD *)v8 + 514);
v9 = (char *)a2 + 4 * *(unsigned __int8 *)(result + 6);
++*((_DWORD *)v9 + 2);
++*(_DWORD *)(*a2 + 4LL * *(unsigned __int8 *)(result + 5));
v10 = (char *)a2 + 4 * *(unsigned __int8 *)(result + 4);
++*((_DWORD *)v10 + 258);
}
result += 8;
v15[0] = result;
if ( result == v4 )
{
sub_F11D98((__int64)v15);
goto LABEL_2;
}
}
return result;
}