//
// _TIFFDefaultTileSize from 0xed887c to 0xed8908 (140 bytes)
//
// 3 xrefs:
// > ??> @ 0xa83a0
// > _TIFFSetDefaultCompressionState @ 0xea4e68
// > ??> @ 0x1544bc0
//
// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!
//
// 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 13:11:44 +0000
//
__int64 __fastcall TIFFDefaultTileSize(__int64 a1, _DWORD *a2, int *a3)
{
__int64 result; // x0
int v4; // w1
int v5; // w3
LODWORD(result) = *a2;
if ( (int)*a2 > 0 )
{
if ( *a3 > 0 )
{
if ( (result & 0xF) == 0 )
goto LABEL_4;
LABEL_11:
v5 = 0;
if ( (unsigned int)result <= 0xFFFFFFEF )
v5 = (result + 15) & 0xFFFFFFF0;
*a2 = v5;
goto LABEL_4;
}
LABEL_10:
*a3 = 256;
result = (unsigned int)*a2;
if ( (result & 0xF) == 0 )
return result;
goto LABEL_11;
}
*a2 = 256;
if ( *a3 <= 0 )
goto LABEL_10;
LABEL_4:
result = (unsigned int)*a3;
if ( (result & 0xF) != 0 )
{
v4 = 0;
if ( (unsigned int)result <= 0xFFFFFFEF )
v4 = (result + 15) & 0xFFFFFFF0;
*a3 = v4;
}
return result;
}