//
// png_get_uint_31 from 0xe54e2c to 0xe54e70 (68 bytes)
//
// 6 xrefs:
// > png_push_read_chunk @ 0xe4551c
// > png_push_read_IDAT @ 0xe46364
// > png_handle_IHDR @ 0xe553c0
// > png_handle_IHDR @ 0xe553d4
// > png_read_chunk_header @ 0xe580e0
// > ??> @ 0x5cf08
//
// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!
//
// 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 13:10:17 +0000
//
__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;
}