//
// png_read_finish_IDAT from 0xe58e7c to 0xe58f14 (152 bytes)
//
// 3 xrefs:
// > png_read_end @ 0xe4bcc0
// > png_read_finish_row @ 0xe59228
// > ??> @ 0xf5470
//
// 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:19 +0000
//
__int64 __fastcall png_read_finish_IDAT(__int64 a1)
{
__int64 result; // x0
int v3; // w0
int v4; // w1
if ( (*(_DWORD *)(a1 + 360) & 8) != 0
|| (png_read_IDAT_data(a1, 0, 0), *(_QWORD *)(a1 + 400) = 0, v3 = *(_DWORD *)(a1 + 360), (v3 & 8) != 0) )
{
result = 1229209940;
if ( *(_DWORD *)(a1 + 368) == 1229209940 )
{
LABEL_6:
*(_QWORD *)(a1 + 376) = 0;
*(_DWORD *)(a1 + 384) = 0;
*(_DWORD *)(a1 + 368) = 0;
return png_crc_finish((_DWORD *)a1, *(_DWORD *)(a1 + 656));
}
}
else
{
v4 = *(_DWORD *)(a1 + 356);
*(_DWORD *)(a1 + 360) = v3 | 8;
*(_DWORD *)(a1 + 356) = v4 | 8;
result = 1229209940;
if ( *(_DWORD *)(a1 + 368) == 1229209940 )
goto LABEL_6;
}
return result;
}