//
// jpeg_read_scanlines from 0x6748e0 to 0x674966 (134 bytes)
//
// 1 xrefs:
// > cocos2d::CCImage::_initWithJpgData @ 0x5e1a40
//
// 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
//
int __fastcall jpeg_read_scanlines(_DWORD *a1, int a2, int a3)
{
unsigned int v6; // r3
int v7; // r0
int v8; // r7
int result; // r0
int v10; // [sp+4h] [bp-4h] BYREF
if ( a1[5] != 205 )
{
*(_DWORD *)(*a1 + 20) = 21;
*(_DWORD *)(*a1 + 24) = a1[5];
(*(void (__fastcall **)(_DWORD *))*a1)(a1);
}
v6 = a1[35];
if ( v6 >= a1[29] )
{
*(_DWORD *)(*a1 + 20) = 126;
(*(void (__fastcall **)(_DWORD *, int))(*a1 + 4))(a1, -1);
return 0;
}
else
{
v7 = a1[2];
if ( v7 )
{
*(_DWORD *)(v7 + 4) = v6;
*(_DWORD *)(a1[2] + 8) = a1[29];
(*(void (__fastcall **)(_DWORD *))a1[2])(a1);
}
v8 = a1[112];
v10 = 0;
(*(void (__fastcall **)(_DWORD *, int, int *, int))(v8 + 4))(a1, a2, &v10, a3);
result = v10;
a1[35] += v10;
}
return result;
}