//
// jinit_arith_encoder from 0x6689ec to 0x668a2c (64 bytes)
//
// 2 xrefs:
// > jinit_compress_master @ 0x66daca
// > jpeg_write_coefficients @ 0x674192
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
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_667BF4;
*(_DWORD *)v2 = sub_6671F8;
memset((void *)(v2 + 76), 0, 0x40u);
result = memset((void *)(v2 + 140), 0, 0x40u);
*(_BYTE *)(v2 + 204) = 113;
return result;
}