//
// sub_8C3194 from 0x8c3194 to 0x8c3308 (372 bytes)
//
// 1 xrefs:
// > TIFFReadDirectory @ 0x8c0a8c
//
// 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:04:00 +0000
//
int __fastcall sub_8C3194(int a1, __int64 a2)
{
unsigned __int16 i; // [sp+1Ah] [bp-Ah]
int v8; // [sp+1Ch] [bp-8h]
if ( a2 )
{
for ( i = 0; i < (unsigned int)*(unsigned __int16 *)(a1 + 38) && *(_DWORD *)(a1 + 32); ++i )
{
if ( a2 == *(_QWORD *)(*(_DWORD *)(a1 + 32) + 8 * i) )
return 0;
}
if ( (unsigned __int16)++*(_WORD *)(a1 + 38) > (unsigned int)*(unsigned __int16 *)(a1 + 36) )
{
v8 = TIFFCheckRealloc((_DWORD *)a1, *(_DWORD *)(a1 + 32), *(unsigned __int16 *)(a1 + 38), 16, "for IFD list");
if ( !v8 )
return 0;
*(_WORD *)(a1 + 36) = 2 * *(_WORD *)(a1 + 38);
*(_DWORD *)(a1 + 32) = v8;
}
*(_QWORD *)(*(_DWORD *)(a1 + 32) + 8 * (*(unsigned __int16 *)(a1 + 38) - 1)) = a2;
return 1;
}
return 0;
}