//
// png_free from 0x6521b8 to 0x6521ce (22 bytes)
//
// 107 xrefs:
// > cocos2d::CCImage::_saveImageToPNG @ 0x5e2240
// > png_zfree @ 0x64d00c
// > sub_64D010 @ 0x64d03c
// > png_free_data @ 0x64d534
// > png_free_data @ 0x64d59e
// > png_free_data @ 0x64d5de
// > png_free_data @ 0x64d5f0
// > png_free_data @ 0x64d630
// > png_free_data @ 0x64d63e
// > png_free_data @ 0x64d65e
// > png_free_data @ 0x64d684
// > png_free_data @ 0x64d68e
// > png_free_data @ 0x64d6b8
// > png_free_data @ 0x64d6c4
// > png_free_data @ 0x64d6e2
// > png_free_data @ 0x64d6f6
// > png_free_data @ 0x64d71e
// > png_free_data @ 0x64d742
// > png_free_data @ 0x64d768
// > png_free_data @ 0x64d770
// > png_free_data @ 0x64d7a4
// > png_free_data @ 0x64d7b6
// > png_free_data @ 0x64d7e2
// > png_free_data @ 0x64d7f4
// > png_free_data @ 0x64d82c
// > png_free_data @ 0x64d83a
// > png_free_data @ 0x64d84c
// > png_destroy_info_struct @ 0x64d8a0
// > png_destroy_gamma_table @ 0x65058a
// > png_destroy_gamma_table @ 0x6505b0
// > png_destroy_gamma_table @ 0x6505be
// > png_destroy_gamma_table @ 0x6505ce
// > png_destroy_gamma_table @ 0x6505de
// > png_destroy_gamma_table @ 0x650604
// > png_destroy_gamma_table @ 0x650612
// > png_destroy_gamma_table @ 0x65063c
// > png_destroy_gamma_table @ 0x65064a
// > png_free_jmpbuf @ 0x651076
// > png_destroy_png_struct @ 0x6521f6
// > png_push_save_buffer @ 0x65244c
// > png_push_save_buffer @ 0x6524c0
// > sub_655D68 @ 0x656196
// > sub_655D68 @ 0x65620c
// > sub_6569F0 @ 0x656b50
// > png_destroy_read_struct @ 0x6574b8
// > png_destroy_read_struct @ 0x6574c6
// > png_destroy_read_struct @ 0x6574d4
// > png_destroy_read_struct @ 0x6574e2
// > png_destroy_read_struct @ 0x6574f0
// > png_destroy_read_struct @ 0x657524
// > png_destroy_read_struct @ 0x657532
// > png_destroy_read_struct @ 0x657540
// > png_destroy_read_struct @ 0x657558
// > png_set_quantize @ 0x658d82
// > png_set_quantize @ 0x658daa
// > png_set_quantize @ 0x658db8
// > png_set_quantize @ 0x658dc2
// > png_set_quantize @ 0x658e7e
// > png_set_quantize @ 0x65916e
// > sub_65C398 @ 0x65c526
// > sub_65C398 @ 0x65c560
// > png_handle_iCCP @ 0x65d352
// > png_handle_sPLT @ 0x65d634
// > png_handle_sPLT @ 0x65d692
// > png_handle_pCAL @ 0x65ddba
// > png_handle_pCAL @ 0x65ddec
// > png_handle_pCAL @ 0x65deb6
// > png_handle_sCAL @ 0x65dfa2
// > png_handle_tEXt @ 0x65e224
// > png_handle_zTXt @ 0x65e35a
// > png_handle_iTXt @ 0x65e508
// > png_handle_unknown @ 0x65e6dc
// > png_handle_unknown @ 0x65e7a4
// > png_handle_unknown @ 0x65e7d2
// > png_read_IDAT_data @ 0x65f260
// > png_read_start_row @ 0x65f566
// > png_read_start_row @ 0x65f5f6
// > png_read_start_row @ 0x65f600
// > png_set_sCAL_s @ 0x65fdd4
// > png_set_iCCP @ 0x66016a
// > png_set_text_2 @ 0x6603d4
// > png_set_sPLT @ 0x660584
// > png_set_sPLT @ 0x66062a
// > png_set_unknown_chunks @ 0x6606a2
// > png_set_keep_unknown_chunks @ 0x6608e8
// > png_set_keep_unknown_chunks @ 0x66091e
// > png_destroy_write_struct @ 0x66269e
// > png_destroy_write_struct @ 0x6626ac
// > png_destroy_write_struct @ 0x6626b6
// > png_destroy_write_struct @ 0x6626c0
// > png_destroy_write_struct @ 0x6626ca
// > png_destroy_write_struct @ 0x6626d4
// > png_destroy_write_struct @ 0x662702
// > png_destroy_write_struct @ 0x662714
// > png_destroy_write_struct @ 0x662726
// > png_destroy_write_struct @ 0x662730
// > png_destroy_write_struct @ 0x66273c
// > png_destroy_write_struct @ 0x66274e
// > png_set_filter_heuristics @ 0x66296e
// > png_set_filter_heuristics @ 0x662980
// > png_set_filter_heuristics @ 0x662992
// > png_set_filter_heuristics_fixed @ 0x662bd2
// > png_set_filter_heuristics_fixed @ 0x662be4
// > png_set_filter_heuristics_fixed @ 0x662bf6
// > sub_662E04 @ 0x662f9e
// > png_free_buffer_list @ 0x66421a
// > png_write_pCAL @ 0x66599e
//
// 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
//
void __fastcall png_free(int a1, void *a2)
{
bool v2; // zf
void (*v3)(void); // r3
v2 = a2 == nullptr;
if ( a2 )
v2 = a1 == 0;
if ( !v2 )
{
v3 = *(void (**)(void))(a1 + 824);
if ( v3 )
v3();
else
png_free_default(a1, a2);
}
}