//
// jpeg_write_tables from 0xbf1ebc to 0xbf1f48 (140 bytes)
//
// 1 xrefs:
// > ??> @ 0xbd1c8
//
// 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
//
__int64 __fastcall jpeg_write_tables(__int64 a1)
{
int v1; // w1
void (__fastcall **v3)(__int64); // x2
v1 = *(_DWORD *)(a1 + 36);
if ( v1 != 100 )
{
v3 = *(void (__fastcall ***)(__int64))a1;
*((_DWORD *)v3 + 11) = v1;
*((_DWORD *)v3 + 10) = 21;
(**(void (__fastcall ***)(__int64))a1)(a1);
}
(*(void (__fastcall **)(__int64))(*(_QWORD *)a1 + 32LL))(a1);
(*(void (__fastcall **)(__int64))(*(_QWORD *)(a1 + 40) + 16LL))(a1);
jinit_marker_writer(a1);
(*(void (__fastcall **)(__int64))(*(_QWORD *)(a1 + 528) + 32LL))(a1);
return (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)(a1 + 40) + 32LL))(a1);
}