//
// sub_C54A38 from 0xc54a38 to 0xc54ac0 (136 bytes)
//
// 1 xrefs:
// > TIFFInitSGILog @ 0xc57658
//
// 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
//
__int64 __fastcall sub_C54A38(__int64 a1, __int64 a2, __int64 a3, unsigned __int16 a4)
{
unsigned int v5; // w23
__int64 v8; // x19
__int64 v9; // x1
__int64 result; // x0
v5 = a4;
v8 = TIFFTileRowSize(a1);
if ( !a3 )
return 1;
while ( 1 )
{
v9 = a2;
a2 += v8;
result = (*(__int64 (__fastcall **)(__int64, __int64, __int64, _QWORD))(a1 + 760))(a1, v9, v8, v5);
a3 -= v8;
if ( !(_DWORD)result )
break;
if ( !a3 )
return 1;
}
return result;
}