//
// sub_ECFEA8 from 0xecfea8 to 0xecff38 (144 bytes)
//
// 2 xrefs:
// > TIFFInitPackBits @ 0xed01ac
// > TIFFInitPackBits @ 0xed01c4
//
// 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:39 +0000
//
__int64 __fastcall sub_ECFEA8(__int64 a1, unsigned __int8 *a2, __int64 a3)
{
bool v3; // zf
bool v4; // nf
__int64 v6; // x19
__int64 v7; // x21
unsigned __int8 *v9; // x1
__int64 v10; // x4
int v11; // w0
v3 = a3 == 0;
v4 = a3 < 0;
v6 = a3;
v7 = **(_QWORD **)(a1 + 848);
while ( !v4 && !v3 )
{
v9 = a2;
if ( v6 > v7 )
v10 = v7;
else
v10 = v6;
v6 -= v10;
a2 += v10;
v11 = sub_ECF860((_QWORD *)a1, v9, v10);
v3 = v6 == 0;
v4 = v6 < 0;
if ( v11 < 0 )
return 0xFFFFFFFFLL;
}
return 1;
}