//
// png_destroy_info_struct from 0x85d8e8 to 0x85d928 (64 bytes)
//
// 5 xrefs:
// > png_destroy_read_struct @ 0x86751c
// > png_destroy_read_struct @ 0x867526
// > sub_867600 @ 0x867678
// > png_destroy_write_struct @ 0x8726fc
// > png_image_write_to_stdio @ 0x873432
//
// 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
//
int __fastcall png_destroy_info_struct(int result, void **a2)
{
bool v2; // zf
void *v3; // r4
int v5; // r1
int v6; // r5
v2 = result == 0;
if ( result )
v2 = a2 == nullptr;
if ( !v2 )
{
v3 = *a2;
if ( *a2 )
{
v5 = (int)*a2;
*a2 = nullptr;
v6 = result;
png_free_data(result, v5, 0x7FFF, -1);
memset(v3, 0, 0x10Cu);
return png_free(v6, v3);
}
}
return result;
}