//
// TIFFReadRGBAStrip from 0x8e669c to 0x8e68bc (544 bytes)
//
// 1 xrefs:
// > ??> @ 0x6b4ac
//
// 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:10 +0000
//
int __fastcall TIFFReadRGBAStrip(int a1, unsigned int a2, int a3)
{
int v3; // r4
int v4; // r0
int v6; // r4
int v7; // r0
int v8; // r4
int v9; // r0
unsigned int v14; // [sp+10h] [bp-474h] BYREF
_DWORD v15[5]; // [sp+14h] [bp-470h] BYREF
unsigned int v16; // [sp+28h] [bp-45Ch]
unsigned int v17; // [sp+68h] [bp-41Ch]
int v18; // [sp+6Ch] [bp-418h]
_DWORD v19[256]; // [sp+70h] [bp-414h] BYREF
int v20; // [sp+470h] [bp-14h]
unsigned int v21; // [sp+474h] [bp-10h]
memset(v19, 0, sizeof(v19));
if ( TIFFIsTiled(a1) )
{
v3 = *(_DWORD *)(a1 + 628);
v4 = TIFFFileName(a1);
TIFFErrorExt(v3, v4, "Can't use TIFFReadRGBAStrip() with tiled file.");
return 0;
}
else
{
TIFFGetFieldDefaulted(a1, 0x116u, &v14);
if ( a2 % v14 )
{
v6 = *(_DWORD *)(a1 + 628);
v7 = TIFFFileName(a1);
TIFFErrorExt(v6, v7, "Row passed to TIFFReadRGBAStrip() must be first in a strip.");
return 0;
}
else
{
if ( TIFFRGBAImageOK(a1, (char *)v19) && TIFFRGBAImageBegin((int)v15, a1, 0, (char *)v19) )
{
v17 = a2;
v18 = 0;
if ( v14 + a2 <= v16 )
v21 = v14;
else
v21 = v16 - a2;
v20 = TIFFRGBAImageGet(v15, a3, v15[4], v21);
TIFFRGBAImageEnd((int)v15);
}
else
{
v8 = *(_DWORD *)(a1 + 628);
v9 = TIFFFileName(a1);
TIFFErrorExt(v8, v9, "%s", (const char *)v19);
return 0;
}
return v20;
}
}
}