//
// TIFFComputeStrip from 0x8ffb80 to 0x8ffc58 (216 bytes)
//
// 6 xrefs:
// > sub_8DB7A8 @ 0x8dba08
// > sub_8DBC44 @ 0x8dbfa8
// > sub_8DBC44 @ 0x8dc03c
// > sub_8DBC44 @ 0x8dc0d0
// > sub_8DBC44 @ 0x8dc16c
// > ??> @ 0x6b48c
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 12:04:16 +0000
//
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;
}