//
// jpeg_start_output from 0x6749f8 to 0x674a40 (72 bytes)
//
// 0 xrefs:
//
// 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
//
int __fastcall jpeg_start_output(_DWORD *a1, int a2)
{
int v3; // r3
bool v5; // zf
v3 = a1[5];
v5 = v3 == 204;
if ( v3 != 204 )
v5 = v3 == 207;
if ( !v5 )
{
*(_DWORD *)(*a1 + 20) = 21;
*(_DWORD *)(*a1 + 24) = a1[5];
(*(void (__fastcall **)(_DWORD *))*a1)(a1);
}
if ( a2 < 1 )
a2 = 1;
if ( *(_DWORD *)(a1[115] + 20) && a2 >= a1[36] )
a2 = a1[36];
a1[38] = a2;
return sub_674798((int)a1);
}