//
// jpeg_stdio_src from 0xc0675c to 0xc06810 (180 bytes)
//
// 1 xrefs:
// > ??> @ 0xc51a8
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
void (*__fastcall jpeg_stdio_src(__int64 a1, __int64 a2))()
{
_QWORD *v3; // x1
__int64 v6; // x21
__int64 (__fastcall **v7)(__int64, _QWORD, __int64); // x3
__int64 v8; // x0
v3 = *(_QWORD **)(a1 + 40);
if ( !v3 )
{
v6 = (**(__int64 (***)(void))(a1 + 8))();
v7 = *(__int64 (__fastcall ***)(__int64, _QWORD, __int64))(a1 + 8);
*(_QWORD *)(a1 + 40) = v6;
v8 = (*v7)(a1, 0, 4096);
v3 = *(_QWORD **)(a1 + 40);
*(_QWORD *)(v6 + 64) = v8;
}
v3[2] = sub_C065D8;
v3[3] = sub_C066B0;
v3[4] = sub_C0663C;
v3[5] = jpeg_resync_to_restart;
v3[7] = a2;
v3[1] = 0;
v3[6] = nullsub_39;
*v3 = 0;
return nullsub_39;
}