//
// TIFFComputeStrip from 0x6effc0 to 0x6f0098 (216 bytes)
//
// 6 xrefs:
// > sub_6CBBE8 @ 0x6cbe48
// > sub_6CC084 @ 0x6cc3e8
// > sub_6CC084 @ 0x6cc47c
// > sub_6CC084 @ 0x6cc510
// > sub_6CC084 @ 0x6cc5ac
// > ??> @ 0x5846c
//
// 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 TIFFComputeStrip(int a1, unsigned int a2, unsigned __int16 a3)
{
int v3; // r0
int v7; // [sp+18h] [bp-Ch]
int v8; // [sp+1Ch] [bp-8h]
v7 = a1 + 40;
v3 = a2 / *(_DWORD *)(a1 + 100);
v8 = v3;
if ( *(_WORD *)(v7 + 86) != 2 )
return v8;
if ( a3 < (unsigned int)*(unsigned __int16 *)(v7 + 58) )
return v3 + *(_DWORD *)(v7 + 124) * a3;
TIFFErrorExt(
*(_DWORD *)(a1 + 628),
(int)"TIFFComputeStrip",
"%lu: Sample out of range, max %lu",
a3,
*(unsigned __int16 *)(v7 + 58));
return 0;
}