//
// sub_6F5D38 from 0x6f5d38 to 0x6f5e54 (284 bytes)
//
// 3 xrefs:
// > TIFFInitZIP @ 0x6f62e0
// > TIFFInitZIP @ 0x6f62e4
// > ??> @ 0x6f63b8
//
// 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_6F5D38(_DWORD *a1)
{
int v4; // [sp+8h] [bp-Ch]
unsigned int v5; // [sp+Ch] [bp-8h]
v4 = a1[144];
*(_DWORD *)(v4 + 68) = 0;
while ( 1 )
{
v5 = j_deflate(v4 + 64, 4);
if ( v5 > 1 )
break;
if ( *(_DWORD *)(v4 + 80) != a1[148] )
{
a1[152] = a1[148] - *(_DWORD *)(v4 + 80);
TIFFFlushData1((int)a1);
*(_DWORD *)(v4 + 76) = a1[147];
*(_DWORD *)(v4 + 80) = a1[148];
}
if ( v5 == 1 )
return 1;
}
TIFFErrorExt(a1[157], (int)"ZIPPostEncode", "ZLib error: %s", *(const char **)(v4 + 88));
return 0;
}