//
// png_check_chunk_name from 0x65e90c to 0x65e988 (124 bytes)
//
// 2 xrefs:
// > png_push_read_chunk @ 0x65272a
// > png_read_chunk_header @ 0x65e9e0
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
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;
}