//
// jinit_huff_decoder from 0xe83d24 to 0xe83e14 (240 bytes)
//
// 3 xrefs:
// > jinit_master_decompress @ 0xe8a218
// > jpeg_read_coefficients @ 0xe8bfc8
// > ??> @ 0x9fa90
//
// 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:10:47 +0000
//
__int64 (__fastcall *__fastcall jinit_huff_decoder(__int64 a1))(__int64 a1)
{
__int64 v2; // x22
int v3; // w1
__int64 (__fastcall *result)(__int64); // x0
__int64 v5; // x0
char *v6; // x20
int v7; // w19
void *v8; // x0
v2 = (**(__int64 (***)(void))(a1 + 8))();
*(_QWORD *)(a1 + 624) = v2;
v3 = *(_DWORD *)(a1 + 316);
*(_QWORD *)v2 = sub_E82464;
result = sub_E80760;
*(_QWORD *)(v2 + 16) = sub_E80760;
if ( v3 )
{
v5 = (**(__int64 (__fastcall ***)(__int64, __int64, __int64))(a1 + 8))(
a1,
1,
4LL * (int)(*(_DWORD *)(a1 + 56) << 6));
*(_QWORD *)(a1 + 192) = v5;
v6 = (char *)v5;
if ( *(int *)(a1 + 56) > 0 )
{
v7 = 0;
do
{
v8 = v6;
v6 += 256;
++v7;
memset(v8, 255, 0x100u);
}
while ( *(_DWORD *)(a1 + 56) > v7 );
}
*(_OWORD *)(v2 + 72) = 0u;
*(_OWORD *)(v2 + 88) = 0u;
return (__int64 (__fastcall *)(__int64))(v2 + 72);
}
else
{
*(_QWORD *)(v2 + 144) = 0;
*(_QWORD *)(v2 + 152) = 0;
*(_QWORD *)(v2 + 160) = 0;
*(_QWORD *)(v2 + 168) = 0;
*(_QWORD *)(v2 + 112) = 0;
*(_QWORD *)(v2 + 120) = 0;
*(_QWORD *)(v2 + 128) = 0;
*(_QWORD *)(v2 + 136) = 0;
}
return result;
}