//
// jpeg_CreateDecompress from 0x884440 to 0x8844e8 (168 bytes)
//
// 1 xrefs:
// > cocos2d::CCImage::_initWithJpgData @ 0x7eb7e4
//
// 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:12 +0000
//
int __fastcall jpeg_CreateDecompress(_DWORD *a1, int a2, int a3)
{
int v5; // r7
int v6; // r6
int result; // r0
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 != 488 )
{
*(_DWORD *)(*a1 + 20) = 22;
*(_DWORD *)(*a1 + 24) = 488;
*(_DWORD *)(*a1 + 28) = a3;
(*(void (__fastcall **)(_DWORD *))*a1)(a1);
}
v5 = *a1;
v6 = a1[3];
memset(a1, 0, 0x1E8u);
a1[4] = 1;
*a1 = v5;
a1[3] = v6;
jinit_memory_mgr(a1);
a1[2] = 0;
a1[6] = 0;
a1[41] = 0;
a1[42] = 0;
a1[43] = 0;
a1[44] = 0;
memset(a1 + 45, 0, 0x10u);
memset(a1 + 49, 0, 0x10u);
a1[78] = 0;
jinit_marker_reader(a1);
result = jinit_input_controller(a1);
a1[5] = 200;
return result;
}