//
// sub_ED8CEC from 0xed8cec to 0xed8df0 (260 bytes)
//
// 2 xrefs:
// > TIFFWriteScanline @ 0xed98f8
// > TIFFWriteEncodedStrip @ 0xed9af4
//
// 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:44 +0000
//
__int64 __fastcall sub_ED8CEC(__int64 a1, __int64 a2)
{
__int64 v2; // x19
char *v5; // x21
void *v6; // x20
__int64 v7; // x0
__int64 v9; // x0
int v10; // w1
v2 = a1 + 56;
v5 = (char *)TIFFrealloc(*(void **)(a1 + 232), 8LL * (unsigned int)(*(_DWORD *)(a1 + 228) + 1));
v6 = TIFFrealloc(*(void **)(v2 + 184), 8LL * (unsigned int)(*(_DWORD *)(v2 + 172) + 1));
if ( v6 && v5 )
{
v9 = *(unsigned int *)(v2 + 172);
*(_QWORD *)(v2 + 176) = v5;
*(_QWORD *)(v2 + 184) = v6;
TIFFmemset(&v5[8 * v9], 0, 8u);
TIFFmemset((void *)(*(_QWORD *)(v2 + 184) + 8LL * *(unsigned int *)(v2 + 172)), 0, 8u);
v10 = *(_DWORD *)(a1 + 16);
++*(_DWORD *)(v2 + 172);
*(_DWORD *)(a1 + 16) = v10 | 8;
return 1;
}
else
{
if ( v5 )
TIFFfree(v5);
if ( v6 )
TIFFfree(v6);
v7 = *(_QWORD *)(a1 + 952);
*(_DWORD *)(v2 + 172) = 0;
TIFFErrorExt(v7, a2, "No space to expand strip arrays");
return 0;
}
}