//
// sub_EB89A8 from 0xeb89a8 to 0xeb8a34 (140 bytes)
//
// 2 xrefs:
// > TIFFInitDumpMode @ 0xeb8a48
// > TIFFInitDumpMode @ 0xeb8a50
//
// 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:11:28 +0000
//
__int64 __fastcall sub_EB89A8(__int64 a1, char *a2, signed __int64 a3)
{
__int64 v6; // x4
char *v7; // x1
v6 = *(_QWORD *)(a1 + 912);
if ( v6 < a3 )
{
TIFFErrorExt(
*(_QWORD *)(a1 + 952),
"DumpModeDecode",
"Not enough data for scanline %lu, expected a request for at most %lld bytes, got a request for %lld bytes",
*(unsigned int *)(a1 + 636),
v6,
a3);
return 0;
}
else
{
v7 = *(char **)(a1 + 904);
if ( v7 != a2 )
{
TIFFmemcpy(a2, v7, a3);
v7 = *(char **)(a1 + 904);
v6 = *(_QWORD *)(a1 + 912);
}
*(_QWORD *)(a1 + 904) = &v7[a3];
*(_QWORD *)(a1 + 912) = v6 - a3;
return 1;
}
}