//
// sub_8BF8A4 from 0x8bf8a4 to 0x8bf98c (232 bytes)
//
// 2 xrefs:
// > sub_8BA31C @ 0x8ba630
// > sub_8BA678 @ 0x8ba954
//
// 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:03:58 +0000
//
int __fastcall sub_8BF8A4(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_8C0538(a1, a3, v7, 0, 8, a3);
if ( v8 )
return v8;
}
if ( (*(_DWORD *)(a1 + 12) & 0x80) != 0 )
TIFFSwabLong8(a3);
return 0;
}