//
// TIFFWriteRawStrip from 0x6f3cac to 0x6f3e7c (464 bytes)
//
// 1 xrefs:
// > ??> @ 0x5896c
//
// 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 TIFFWriteRawStrip(_DWORD *a1, unsigned int a2, int a3, int a4)
{
unsigned int v5; // r3
_DWORD *v11; // [sp+14h] [bp-8h]
v11 = a1 + 10;
if ( (a1[3] & 0x40) == 0 && !TIFFWriteCheck(a1, 0, "TIFFWriteRawStrip") )
return -1;
if ( v11[32] <= a2 )
{
if ( *((_WORD *)v11 + 43) == 2 )
{
TIFFErrorExt(a1[157], (int)"TIFFWriteRawStrip", "Can not grow image by strips when using separate planes");
return -1;
}
if ( v11[31] <= a2 )
{
if ( v11[5] >= (unsigned int)-v11[15] )
v5 = 0;
else
v5 = (unsigned int)(v11[5] + v11[15] - 1) / v11[15];
v11[31] = v5;
}
if ( !sub_6F4BA4(a1, 1, "TIFFWriteRawStrip") )
return -1;
}
a1[113] = a2;
a1[111] = v11[15] * (a2 % v11[31]);
if ( sub_6F4D98(a1, a2, a3, a4) )
return a4;
else
return -1;
}