//
// png_check_chunk_name from 0x86e98c to 0x86ea08 (124 bytes)
//
// 2 xrefs:
// > png_push_read_chunk @ 0x8627aa
// > png_read_chunk_header @ 0x86ea60
//
// 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:02:56 +0000
//
int __fastcall png_check_chunk_name(int result, unsigned int a2)
{
_BOOL4 v2; // r3
_BOOL4 v3; // r3
_BOOL4 v4; // r3
unsigned int v5; // r1
_BOOL4 v6; // r1
v2 = (unsigned int)(unsigned __int8)a2 - 65 > 0x39;
if ( (unsigned int)(unsigned __int8)a2 - 91 <= 5 )
v2 = 1;
if ( v2 )
goto LABEL_14;
v3 = (unsigned int)BYTE1(a2) - 65 > 0x39;
if ( (unsigned int)BYTE1(a2) - 91 <= 5 )
v3 = 1;
if ( v3 )
goto LABEL_14;
v4 = (unsigned int)BYTE2(a2) - 65 > 0x39;
if ( (unsigned int)BYTE2(a2) - 91 <= 5 )
v4 = 1;
if ( v4 || ((v5 = HIBYTE(a2), v5 - 91 <= 5) ? (v6 = 1) : (v6 = v5 - 65 > 0x39), v6) )
LABEL_14:
png_chunk_error(result, "invalid chunk type");
return result;
}