//
// sub_6F4BA4 from 0x6f4ba4 to 0x6f4d88 (484 bytes)
//
// 3 xrefs:
// > TIFFWriteScanline @ 0x6f34ec
// > TIFFWriteEncodedStrip @ 0x6f38b4
// > TIFFWriteRawStrip @ 0x6f3dec
//
// 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
//
int __fastcall sub_6F4BA4(int a1, int a2, int a3)
{
_DWORD *v8; // [sp+14h] [bp-10h]
int v9; // [sp+18h] [bp-Ch]
int v10; // [sp+1Ch] [bp-8h]
v8 = (_DWORD *)(a1 + 40);
if ( *(_WORD *)(a1 + 126) != 1 )
_assert2();
v9 = TIFFrealloc(v8[33], 8 * (v8[32] + a2));
v10 = TIFFrealloc(v8[34], 8 * (v8[32] + a2));
if ( v9 && v10 )
{
v8[33] = v9;
v8[34] = v10;
TIFFmemset(v8[33] + 8 * v8[32], 0, 8 * a2);
TIFFmemset(v8[34] + 8 * v8[32], 0, 8 * a2);
v8[32] += a2;
*(_DWORD *)(a1 + 12) |= 8u;
return 1;
}
else
{
if ( v9 )
TIFFfree(v9);
if ( v10 )
TIFFfree(v10);
v8[32] = 0;
TIFFErrorExt(*(_DWORD *)(a1 + 628), a3, "No space to expand strip arrays");
return 0;
}
}