//
// png_destroy_info_struct from 0x64d868 to 0x64d8a8 (64 bytes)
//
// 5 xrefs:
// > png_destroy_read_struct @ 0x65749c
// > png_destroy_read_struct @ 0x6574a6
// > sub_657580 @ 0x6575f8
// > png_destroy_write_struct @ 0x66267c
// > png_image_write_to_stdio @ 0x6633b2
//
// 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_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;
}