//
// TIFFReverseBits from 0x6f1770 to 0x6f1948 (472 bytes)
//
// 7 xrefs:
// > sub_6ED3C0 @ 0x6ed924
// > TIFFFillStrip @ 0x6eea48
// > TIFFFillTile @ 0x6ef664
// > TIFFWriteEncodedStrip @ 0x6f3c2c
// > TIFFWriteEncodedTile @ 0x6f43d0
// > TIFFFlushData1 @ 0x6f52e8
// > ??> @ 0x5875c
//
// 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
//
unsigned __int8 *__fastcall TIFFReverseBits(unsigned __int8 *result, int a2)
{
unsigned __int8 *v4; // [sp+4h] [bp-8h]
v4 = result;
while ( a2 > 8 )
{
*v4 = byte_9FF1B0[*v4];
v4[1] = byte_9FF1B0[v4[1]];
v4[2] = byte_9FF1B0[v4[2]];
v4[3] = byte_9FF1B0[v4[3]];
v4[4] = byte_9FF1B0[v4[4]];
v4[5] = byte_9FF1B0[v4[5]];
v4[6] = byte_9FF1B0[v4[6]];
v4[7] = byte_9FF1B0[v4[7]];
v4 += 8;
a2 -= 8;
}
while ( a2-- > 0 )
{
*v4 = byte_9FF1B0[*v4];
++v4;
}
return result;
}