//
// png_get_uint_31 from 0xbdec6c to 0xbdecb0 (68 bytes)
//
// 6 xrefs:
// > png_push_read_chunk @ 0xbcf35c
// > png_push_read_IDAT @ 0xbd01a4
// > png_handle_IHDR @ 0xbdf200
// > png_handle_IHDR @ 0xbdf214
// > png_read_chunk_header @ 0xbe1f20
// > ??> @ 0x40bd8
//
// 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
//
__int64 __fastcall png_get_uint_31(__int64 a1, unsigned __int8 *a2)
{
int v2; // w1
v2 = (a2[1] << 16) + (*a2 << 24) + a2[3] + (a2[2] << 8);
if ( v2 < 0 )
png_error(a1, "PNG unsigned integer out of range");
return (unsigned int)v2;
}