//
// png_handle_IEND from 0x65cb30 to 0x65cb6a (58 bytes)
//
// 3 xrefs:
// > png_push_read_chunk @ 0x652776
// > png_read_info @ 0x65581a
// > png_read_end @ 0x6572f0
//
// 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_handle_IEND(_DWORD *a1, int a2, unsigned int a3)
{
int result; // r0
if ( (a1[77] & 5) != 5 )
png_chunk_error((int)a1, "out of place");
a1[77] |= 0x18u;
result = png_crc_finish(a1, a3);
if ( a3 )
return png_chunk_benign_error((int)a1, "invalid");
return result;
}