//
// jinit_arith_encoder from 0x878a6c to 0x878aac (64 bytes)
//
// 2 xrefs:
// > jinit_compress_master @ 0x87db4a
// > jpeg_write_coefficients @ 0x884212
//
// 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:04 +0000
//
void *__fastcall jinit_arith_encoder(int a1)
{
int v2; // r4
void *result; // r0
v2 = (**(int (***)(void))(a1 + 4))();
*(_DWORD *)(a1 + 424) = v2;
*(_DWORD *)(v2 + 8) = sub_877C74;
*(_DWORD *)v2 = sub_877278;
memset((void *)(v2 + 76), 0, 0x40u);
result = memset((void *)(v2 + 140), 0, 0x40u);
*(_BYTE *)(v2 + 204) = 113;
return result;
}