//
// sub_6AFCE4 from 0x6afce4 to 0x6afdcc (232 bytes)
//
// 2 xrefs:
// > sub_6AA75C @ 0x6aaa70
// > sub_6AAAB8 @ 0x6aad94
//
// 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 sub_6AFCE4(int a1, int a2, _QWORD *a3)
{
int v7; // [sp+20h] [bp-Ch] BYREF
int v8; // [sp+24h] [bp-8h]
if ( (*(_DWORD *)(a1 + 12) & 0x80000) != 0 )
{
*a3 = *(_QWORD *)(a2 + 16);
}
else
{
v7 = *(_DWORD *)(a2 + 16);
if ( (*(_DWORD *)(a1 + 12) & 0x80) != 0 )
TIFFSwabLong(&v7);
v8 = sub_6B0978(a1, a3, v7, 0, 8, a3);
if ( v8 )
return v8;
}
if ( (*(_DWORD *)(a1 + 12) & 0x80) != 0 )
TIFFSwabLong8(a3);
return 0;
}