//
// png_get_uint_31 from 0x86c624 to 0x86c648 (36 bytes)
//
// 5 xrefs:
// > png_push_read_chunk @ 0x862770
// > png_push_read_IDAT @ 0x8631dc
// > png_handle_IHDR @ 0x86c94c
// > png_handle_IHDR @ 0x86c956
// > png_read_chunk_header @ 0x86ea24
//
// 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:55 +0000
//
int __fastcall png_get_uint_31(int a1, unsigned __int8 *a2)
{
int v2; // r2
int v3; // r5
int v4; // r1
v2 = a2[3];
v3 = a2[2];
v4 = (a2[1] << 16) + (*a2 << 24);
if ( v4 + v2 + (v3 << 8) < 0 )
png_error(a1, "PNG unsigned integer out of range");
return v4 + v2 + (v3 << 8);
}