//
// png_calculate_crc from 0x85d310 to 0x85d342 (50 bytes)
//
// 36 xrefs:
// > png_push_crc_finish @ 0x8625b4
// > png_push_crc_finish @ 0x8625fa
// > png_push_read_IDAT @ 0x863140
// > png_push_read_IDAT @ 0x863192
// > png_crc_read @ 0x86c71c
// > png_read_chunk_header @ 0x86ea56
// > png_write_chunk_start @ 0x87419e
// > png_write_chunk_data @ 0x8741ce
// > png_write_chunk @ 0x87425a
// > png_write_IHDR @ 0x8743de
// > png_write_PLTE @ 0x87458c
// > png_compress_IDAT @ 0x87471a
// > png_compress_IDAT @ 0x874866
// > png_write_IEND @ 0x87497a
// > png_write_gAMA_fixed @ 0x8749f4
// > png_write_sRGB @ 0x874a6a
// > png_write_iCCP @ 0x874b48
// > png_write_sPLT @ 0x874c62
// > png_write_sBIT @ 0x874df6
// > png_write_cHRM_fixed @ 0x874ee6
// > png_write_tRNS @ 0x874faa
// > png_write_tRNS @ 0x87500a
// > png_write_tRNS @ 0x875090
// > png_write_bKGD @ 0x875140
// > png_write_bKGD @ 0x8751be
// > png_write_bKGD @ 0x875240
// > png_write_hIST @ 0x8752fc
// > png_write_tEXt @ 0x8753c0
// > png_write_zTXt @ 0x8754d4
// > png_write_iTXt @ 0x875694
// > png_write_iTXt @ 0x875796
// > png_write_oFFs @ 0x8758c0
// > png_write_pCAL @ 0x8759a8
// > png_write_sCAL_s @ 0x875b4c
// > png_write_pHYs @ 0x875bf0
// > png_write_tIME @ 0x875c9e
//
// 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:41 +0000
//
_DWORD *__fastcall png_calculate_crc(_DWORD *result, int a2, int a3)
{
_DWORD *v3; // r4
if ( (result[119] & 0x20000000) != 0 )
{
if ( (result[78] & 0x300) == 0x300 )
return result;
}
else if ( (result[78] & 0x800) != 0 )
{
return result;
}
if ( a3 )
{
v3 = result;
result = (_DWORD *)crc32(result[128], a2, a3);
v3[128] = result;
}
return result;
}