//
// sub_8BF148 from 0x8bf148 to 0x8bf288 (320 bytes)
//
// 2 xrefs:
// > TIFFReadDirectory @ 0x8c0d10
// > TIFFReadDirectory @ 0x8c14e4
//
// 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_8BF148(int a1, int a2, unsigned __int16 *a3)
{
unsigned __int16 *v8; // [sp+10h] [bp-14h] BYREF
int v9; // [sp+14h] [bp-10h]
unsigned __int16 *v10; // [sp+18h] [bp-Ch]
__int16 v11; // [sp+1Eh] [bp-6h]
if ( (unsigned __int64)*(unsigned __int16 *)(a1 + 98) > *(_QWORD *)(a2 + 8) )
return 1;
v9 = sub_8BBA58((_DWORD *)a1, a2, &v8);
if ( v9 )
return v9;
v10 = v8;
v11 = *(_WORD *)(a1 + 98);
*a3 = *v8;
++v10;
--v11;
while ( v11 )
{
if ( *v10++ != *a3 )
{
v9 = 5;
break;
}
--v11;
}
TIFFfree(v8);
return v9;
}