//
// jpeg_mem_src from 0xe7c9d0 to 0xe7ca90 (192 bytes)
//
// 2 xrefs:
// > cocos2d::CCImage::_initWithJpgData @ 0xd7ccb4
// > ??> @ 0x506e0
//
// 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:43 +0000
//
void (*__fastcall jpeg_mem_src(__int64 a1, __int64 a2, __int64 a3))()
{
_QWORD *v6; // x1
void (__fastcall *v8)(__int64); // x2
if ( !a2 || !a3 )
{
v8 = **(void (__fastcall ***)(__int64))a1;
*(_DWORD *)(*(_QWORD *)a1 + 40LL) = 43;
v8(a1);
v6 = *(_QWORD **)(a1 + 40);
if ( v6 )
goto LABEL_4;
LABEL_6:
v6 = (_QWORD *)(**(__int64 (__fastcall ***)(__int64))(a1 + 8))(a1);
*(_QWORD *)(a1 + 40) = v6;
goto LABEL_4;
}
v6 = *(_QWORD **)(a1 + 40);
if ( !v6 )
goto LABEL_6;
LABEL_4:
v6[2] = nullsub_17;
v6[3] = sub_E7C7AC;
v6[4] = sub_E7C7FC;
v6[5] = jpeg_resync_to_restart;
v6[1] = a3;
*v6 = a2;
v6[6] = nullsub_35;
return nullsub_35;
}