//
// sub_5E1868 from 0x5e1868 to 0x5e189e (54 bytes)
//
// 0 xrefs:
//
// 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 sub_5E1868(int a1, void *a2, size_t a3)
{
_DWORD *io_ptr; // r0
int v7; // r3
_DWORD *v8; // r4
void *result; // r0
io_ptr = (_DWORD *)png_get_io_ptr();
v7 = io_ptr[2];
v8 = io_ptr;
if ( (signed int)(a3 + v7) > io_ptr[1] )
png_error(a1, "pngReaderCallback failed");
result = memcpy(a2, (const void *)(*io_ptr + v7), a3);
v8[2] += a3;
return result;
}