//
// sub_EBBEA4 from 0xebbea4 to 0xebbf58 (180 bytes)
//
// 2 xrefs:
// > TIFFInitCCITTFax4 @ 0xebf008
// > TIFFInitCCITTFax4 @ 0xebf010
//
// 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:30 +0000
//
__int64 __fastcall sub_EBBEA4(_QWORD *a1, unsigned __int8 *a2, __int64 a3)
{
__int64 v3; // x19
__int64 v6; // x21
__int64 v7; // x0
__int64 result; // x0
v3 = a1[106];
v6 = a3;
if ( a3 % *(_QWORD *)(v3 + 8) )
{
TIFFErrorExt(a1[119], (__int64)&dword_11C5DE0[160], "Fractional scanlines cannot be written");
return 0;
}
else
{
while ( v6 > 0 )
{
result = sub_EBA940(a1, a2, *(_BYTE **)(v3 + 128), *(_DWORD *)(v3 + 16));
if ( !(_DWORD)result )
return result;
TIFFmemcpy(*(void **)(v3 + 128), a2, *(_QWORD *)(v3 + 8));
v7 = *(_QWORD *)(v3 + 8);
v6 -= v7;
a2 += v7;
}
return 1;
}
}