//
// png_destroy_info_struct from 0xbc5fc8 to 0xbc6030 (104 bytes)
//
// 6 xrefs:
// > png_destroy_read_struct @ 0xbd5cdc
// > png_destroy_read_struct @ 0xbd5ce8
// > sub_BD5DF0 @ 0xbd5ec4
// > png_destroy_write_struct @ 0xbe8044
// > png_image_write_to_stdio @ 0xbe9048
// > ??> @ 0x9ca38
//
// 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
//
__int64 __fastcall png_destroy_info_struct(__int64 result, void **a2)
{
void *v2; // x20
__int64 v4; // x1
__int64 v5; // x19
if ( result && a2 )
{
v2 = *a2;
if ( *a2 )
{
v4 = (__int64)*a2;
v5 = result;
*a2 = nullptr;
png_free_data(result, v4, 0x7FFF, -1);
memset(v2, 0, 0x158u);
return png_free(v5, v2);
}
}
return result;
}