//
// sub_8C240C from 0x8c240c to 0x8c24c4 (184 bytes)
//
// 2 xrefs:
// > TIFFReadDirectory @ 0x8c0b60
// > TIFFReadCustomDirectory @ 0x8c2758
//
// 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_8C240C(int result, _WORD *a2, unsigned __int16 a3)
{
unsigned __int16 v3; // [sp+10h] [bp-Ch]
unsigned __int16 i; // [sp+12h] [bp-Ah]
v3 = 0;
for ( i = 0; i < (unsigned int)a3; ++i )
{
if ( v3 > (unsigned int)(unsigned __int16)*a2 )
return TIFFWarningExt(
*(_DWORD *)(result + 628),
"TIFFReadDirectoryCheckOrder",
"Invalid TIFF directory; tags are not sorted in ascending order");
v3 = *a2 + 1;
a2 += 12;
}
return result;
}