//
// jpeg_CreateCompress from 0x876de4 to 0x876ea8 (196 bytes)
//
// 1 xrefs:
// > cocos2d::CCImage::_saveImageToJPG @ 0x7ec022
//
// 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_CreateCompress(_DWORD *a1, int a2, int a3)
{
int v5; // r6
int v6; // r7
a1[1] = 0;
if ( a2 != 90 )
{
*(_DWORD *)(*a1 + 20) = 13;
*(_DWORD *)(*a1 + 24) = 90;
*(_DWORD *)(*a1 + 28) = a2;
(*(void (__fastcall **)(_DWORD *))*a1)(a1);
}
if ( a3 != 440 )
{
*(_DWORD *)(*a1 + 20) = 22;
*(_DWORD *)(*a1 + 24) = 440;
*(_DWORD *)(*a1 + 28) = a3;
(*(void (__fastcall **)(_DWORD *))*a1)(a1);
}
v5 = a1[3];
v6 = *a1;
memset(a1, 0, 0x1B8u);
a1[3] = v5;
*a1 = v6;
jinit_memory_mgr(a1);
a1[2] = 0;
a1[6] = 0;
a1[21] = 0;
memset(a1 + 22, 0, 0x10u);
*((_QWORD *)a1 + 13) = 0x6400000064LL;
*((_QWORD *)a1 + 14) = 0x6400000064LL;
memset(a1 + 30, 0, 0x10u);
memset(a1 + 34, 0, 0x10u);
a1[96] = &jpeg_natural_order;
a1[107] = 0;
a1[95] = 8;
a1[97] = 63;
a1[5] = 100;
*((_QWORD *)a1 + 6) = 0x3FF0000000000000LL;
return 0;
}