//
// jpeg_write_m_header from 0xe67fec to 0xe68060 (116 bytes)
//
// 1 xrefs:
// > ??> @ 0xcf4d8
//
// 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:32 +0000
//
__int64 __fastcall jpeg_write_m_header(__int64 a1, __int64 a2, __int64 a3)
{
int v4; // w3
void (__fastcall **v5)(__int64); // x4
__int64 v7; // [xsp+20h] [xbp+20h]
__int64 v8; // [xsp+28h] [xbp+28h]
v4 = *(_DWORD *)(a1 + 36);
if ( *(_DWORD *)(a1 + 344) || (unsigned int)(v4 - 101) > 2 )
{
v5 = *(void (__fastcall ***)(__int64))a1;
v7 = a3;
v8 = a2;
*((_DWORD *)v5 + 11) = v4;
*((_DWORD *)v5 + 10) = 21;
(**(void (__fastcall ***)(__int64))a1)(a1);
a3 = v7;
a2 = v8;
}
return (*(__int64 (__fastcall **)(__int64, __int64, __int64))(*(_QWORD *)(a1 + 528) + 40LL))(a1, a2, a3);
}