//
// png_benign_error from 0x65116c to 0x6511b4 (72 bytes)
//
// 11 xrefs:
// > png_colorspace_set_endpoints @ 0x64f238
// > png_colorspace_set_endpoints @ 0x64f826
// > png_colorspace_set_chromaticities @ 0x64fc6e
// > png_colorspace_set_chromaticities @ 0x64fdc8
// > png_colorspace_set_sRGB @ 0x650122
// > png_push_read_chunk @ 0x6529be
// > png_read_end @ 0x6572d8
// > png_read_end @ 0x65731e
// > png_read_end @ 0x657378
// > png_set_iCCP @ 0x660162
// > png_write_end @ 0x661d52
//
// 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_benign_error(_DWORD *a1, const char *a2)
{
int v2; // r4
v2 = a1[77];
if ( (a1[78] & 0x100000) == 0 )
{
if ( (v2 & 0x8000) == 0 || !a1[119] )
png_error((int)a1, a2);
png_chunk_error((int)a1, a2);
}
if ( (v2 & 0x8000) != 0 && a1[119] )
return png_chunk_warning((int)a1, a2);
else
return png_warning((int)a1, a2);
}