//
// TIFFRGBAImageEnd from 0x6c9dc0 to 0x6c9f78 (440 bytes)
//
// 4 xrefs:
// > TIFFReadRGBAImageOriented @ 0x6cabdc
// > TIFFReadRGBAStrip @ 0x6d6ca8
// > TIFFReadRGBATile @ 0x6d6f80
// > ??> @ 0x5840c
//
// 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 TIFFRGBAImageEnd(int result)
{
_DWORD *v1; // [sp+4h] [bp-8h]
v1 = (_DWORD *)result;
if ( *(_DWORD *)(result + 56) )
{
result = TIFFfree(*(_DWORD *)(result + 56));
v1[14] = 0;
}
if ( v1[15] )
{
result = TIFFfree(v1[15]);
v1[15] = 0;
}
if ( v1[16] )
{
result = TIFFfree(v1[16]);
v1[16] = 0;
}
if ( v1[17] )
{
result = TIFFfree(v1[17]);
v1[17] = 0;
}
if ( v1[18] )
{
result = TIFFfree(v1[18]);
v1[18] = 0;
}
if ( v1[19] )
{
result = TIFFfree(v1[19]);
v1[19] = 0;
}
if ( v1[20] )
{
result = TIFFfree(v1[20]);
v1[20] = 0;
}
if ( v1[9] )
{
TIFFfree(v1[9]);
TIFFfree(v1[10]);
result = TIFFfree(v1[11]);
v1[11] = 0;
v1[10] = v1[11];
v1[9] = v1[10];
}
return result;
}