//
// jpeg_start_compress from 0x8770dc to 0x87713c (96 bytes)
//
// 1 xrefs:
// > cocos2d::CCImage::_saveImageToJPG @ 0x7ec058
//
// 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:03 +0000
//
int __fastcall jpeg_start_compress(_DWORD *a1, int a2)
{
int result; // r0
int v5; // r3
int v6; // r3
if ( a1[5] != 100 )
{
*(_DWORD *)(*a1 + 20) = 21;
*(_DWORD *)(*a1 + 24) = a1[5];
(*(void (__fastcall **)(_DWORD *))*a1)(a1);
}
if ( a2 )
jpeg_suppress_tables(a1, 0);
(*(void (__fastcall **)(_DWORD *))(*a1 + 16))(a1);
(*(void (__fastcall **)(_DWORD *))(a1[6] + 8))(a1);
jinit_compress_master(a1);
result = (*(int (__fastcall **)(_DWORD *))a1[98])(a1);
v5 = a1[52];
a1[66] = 0;
if ( v5 )
v6 = 102;
else
v6 = 101;
a1[5] = v6;
return result;
}