
int png_image_write_to_file
              (png_imagep image,char *file_name,int convert_to_8bit,void *buffer,
              png_int_32 row_stride,void *colormap)

{
  int iVar1;
  int iVar2;
  undefined4 *puVar3;
  png_const_charp error_message;
  undefined4 uVar4;
  
  if (image == (png_imagep)0x0) {
    return 0;
  }
  if (image->version == 1) {
    if ((file_name == (char *)0x0) || (buffer == (void *)0x0)) {
      error_message = PTR_s_nt_0005301c + 0x2048;
    }
    else {
      iVar1 = (*(code *)PTR_fopen_000534f0)(file_name,PTR_s_nt_0005301c + 0x2044);
      if (iVar1 == 0) {
        puVar3 = (undefined4 *)(*(code *)PTR___errno_location_00053384)();
        uVar4 = *puVar3;
      }
      else {
        iVar2 = (*(code *)PTR_png_image_write_to_stdio_000532e0)
                          (image,iVar1,convert_to_8bit,buffer,row_stride,colormap);
        if (iVar2 == 0) {
          (*(code *)PTR_fclose_00053318)(iVar1);
          (*(code *)PTR_remove_00053310)(file_name);
          return 0;
        }
        iVar2 = (*(code *)PTR_fflush_000534f4)(iVar1);
        if ((iVar2 == 0) && (iVar2 = (*(code *)PTR_ferror_000534a8)(iVar1), iVar2 == 0)) {
          iVar1 = (*(code *)PTR_fclose_00053318)(iVar1);
          if (iVar1 == 0) {
            return 1;
          }
          puVar3 = (undefined4 *)(*(code *)PTR___errno_location_00053384)();
          uVar4 = *puVar3;
        }
        else {
          puVar3 = (undefined4 *)(*(code *)PTR___errno_location_00053384)();
          uVar4 = *puVar3;
          (*(code *)PTR_fclose_00053318)(iVar1);
        }
        (*(code *)PTR_remove_00053310)(file_name);
      }
      error_message = (png_const_charp)(*(code *)PTR_strerror_00053404)(uVar4);
    }
  }
  else {
    error_message = PTR_s_nt_0005301c + 0x2074;
  }
  iVar1 = png_image_error(image,error_message);
  return iVar1;
}



undefined4
png_image_write_to_file
          (int param_1,int param_2,undefined4 param_3,int param_4,undefined4 param_5,
          undefined4 param_6)

{
  undefined4 uVar1;
  int iVar2;
  int iVar3;
  undefined4 *puVar4;
  undefined *puVar5;
  
  if (param_1 == 0) {
    return 0;
  }
  if (*(int *)(param_1 + 4) == 1) {
    if ((param_2 == 0) || (param_4 == 0)) {
      puVar5 = PTR_s_nt_0005301c + 0x2048;
    }
    else {
      iVar2 = (*(code *)PTR_fopen_000534f0)(param_2,PTR_s_nt_0005301c + 0x2044);
      if (iVar2 == 0) {
        puVar4 = (undefined4 *)(*(code *)PTR___errno_location_00053384)();
        uVar1 = *puVar4;
      }
      else {
        iVar3 = (*(code *)PTR_png_image_write_to_stdio_000532e0)
                          (param_1,iVar2,param_3,param_4,param_5,param_6);
        if (iVar3 == 0) {
          (*(code *)PTR_fclose_00053318)(iVar2);
          (*(code *)PTR_remove_00053310)(param_2);
          return 0;
        }
        iVar3 = (*(code *)PTR_fflush_000534f4)(iVar2);
        if ((iVar3 == 0) && (iVar3 = (*(code *)PTR_ferror_000534a8)(iVar2), iVar3 == 0)) {
          iVar2 = (*(code *)PTR_fclose_00053318)(iVar2);
          if (iVar2 == 0) {
            return 1;
          }
          puVar4 = (undefined4 *)(*(code *)PTR___errno_location_00053384)();
          uVar1 = *puVar4;
        }
        else {
          puVar4 = (undefined4 *)(*(code *)PTR___errno_location_00053384)();
          uVar1 = *puVar4;
          (*(code *)PTR_fclose_00053318)(iVar2);
        }
        (*(code *)PTR_remove_00053310)(param_2);
      }
      puVar5 = (undefined *)(*(code *)PTR_strerror_00053404)(uVar1);
    }
  }
  else {
    puVar5 = PTR_s_nt_0005301c + 0x2074;
  }
  uVar1 = FUN_00019740(param_1,puVar5);
  return uVar1;
}


lui gp,0x2
addiu gp,gp,0x29e0
addu gp,gp,t9
addiu sp,sp,-0x40
sw gp,0x18(sp)
sw s5,0x34(sp)
sw s4,0x30(sp)
sw ra,0x3c(sp)
sw s6,0x38(sp)
sw s3,0x2c(sp)
sw s2,0x28(sp)
sw s1,0x24(sp)
sw s0,0x20(sp)
lw s4,0x50(sp)
beq a0,zero,0x00038778
_lw s5,0x54(sp)
lw t0,0x4(a0)
li v1,0x1
beq t0,v1,0x00038694
_or s0,a0,zero
lw a1,-0x7fd4(gp)
lw t9,-0x7e4c(gp)
addiu a1,a1,0x2074
lw ra,0x3c(sp)
lw s6,0x38(sp)
lw s5,0x34(sp)
lw s4,0x30(sp)
lw s3,0x2c(sp)
lw s2,0x28(sp)
lw s1,0x24(sp)
lw s0,0x20(sp)
b 0x00019740
_addiu sp,sp,0x40
beq a1,zero,0x000387a8
_nop
beq a3,zero,0x000387a8
_or s1,a1,zero
or a0,a1,zero
lw t9,-0x7b00(gp)
lw a1,-0x7fd4(gp)
or s2,a3,zero
or s3,a2,zero
jalr t9
_addiu a1,a1,0x2044
lw gp,0x18(sp)
beq v0,zero,0x0003880c
_or s6,v0,zero
lw t9,-0x7d10(gp)
or a3,s2,zero
sw s5,0x14(sp)
or a2,s3,zero
sw s4,0x10(sp)
or a1,v0,zero
jalr t9
_or a0,s0,zero
lw gp,0x18(sp)
beq v0,zero,0x000387e8
_or s2,v0,zero
lw t9,-0x7afc(gp)
jalr t9
_or a0,s6,zero
bne v0,zero,0x00038720
_lw gp,0x18(sp)
lw t9,-0x7b48(gp)
jalr t9
_or a0,s6,zero
beq v0,zero,0x000387bc
_lw gp,0x18(sp)
lw t9,-0x7c6c(gp)
jalr t9
_nop
or a0,s6,zero
lw gp,0x18(sp)
lw t9,-0x7cd8(gp)
jalr t9
_lw s2,0x0(v0)
lw gp,0x18(sp)
lw t9,-0x7ce0(gp)
jalr t9
_or a0,s1,zero
or a0,s2,zero
lw gp,0x18(sp)
lw t9,-0x7bec(gp)
jalr t9
_nop
or a0,s0,zero
lw gp,0x18(sp)
or a1,v0,zero
b 0x0003866c
_lw t9,-0x7e4c(gp)
or s2,zero,zero
lw ra,0x3c(sp)
or v0,s2,zero
lw s6,0x38(sp)
lw s5,0x34(sp)
lw s4,0x30(sp)
lw s3,0x2c(sp)
lw s2,0x28(sp)
lw s1,0x24(sp)
lw s0,0x20(sp)
jr ra
_addiu sp,sp,0x40
lw a1,-0x7fd4(gp)
or a0,s0,zero
lw t9,-0x7e4c(gp)
b 0x0003866c
_addiu a1,a1,0x2048
lw t9,-0x7cd8(gp)
jalr t9
_or a0,s6,zero
beq v0,zero,0x00038824
_lw gp,0x18(sp)
lw t9,-0x7c6c(gp)
jalr t9
_nop
lw gp,0x18(sp)
b 0x00038744
_lw s2,0x0(v0)
lw t9,-0x7cd8(gp)
jalr t9
_or a0,s6,zero
lw gp,0x18(sp)
lw t9,-0x7ce0(gp)
jalr t9
_or a0,s1,zero
b 0x00038780
_lw ra,0x3c(sp)
lw t9,-0x7c6c(gp)
jalr t9
_nop
lw gp,0x18(sp)
b 0x00038758
_lw a0,0x0(v0)
b 0x0003877c
_li s2,0x1
(translation_unit "undefined4\npng_image_write_to_file\n          (int param_1,int param_2,undefined4 param_3,int param_4,undefined4 param_5,\n          undefined4 param_6)\n\n{\n  undefined4 uVar1;\n  int iVar2;\n  int iVar3;\n  undefined4 *puVar4;\n  undefined *puVar5;\n  \n  if (param_1 == 0) {\n    return 0;\n  }\n  if (*(int *)(param_1 + 4) == 1) {\n    if ((param_2 == 0) || (param_4 == 0)) {\n      puVar5 = PTR_s_nt_0005301c + 0x2048;\n    }\n    else {\n      iVar2 = (*(code *)PTR_fopen_000534f0)(param_2,PTR_s_nt_0005301c + 0x2044);\n      if (iVar2 == 0) {\n        puVar4 = (undefined4 *)(*(code *)PTR___errno_location_00053384)();\n        uVar1 = *puVar4;\n      }\n      else {\n        iVar3 = (*(code *)PTR_png_image_write_to_stdio_000532e0)\n                          (param_1,iVar2,param_3,param_4,param_5,param_6);\n        if (iVar3 == 0) {\n          (*(code *)PTR_fclose_00053318)(iVar2);\n          (*(code *)PTR_remove_00053310)(param_2);\n          return 0;\n        }\n        iVar3 = (*(code *)PTR_fflush_000534f4)(iVar2);\n        if ((iVar3 == 0) && (iVar3 = (*(code *)PTR_ferror_000534a8)(iVar2), iVar3 == 0)) {\n          iVar2 = (*(code *)PTR_fclose_00053318)(iVar2);\n          if (iVar2 == 0) {\n            return 1;\n          }\n          puVar4 = (undefined4 *)(*(code *)PTR___errno_location_00053384)();\n          uVar1 = *puVar4;\n        }\n        else {\n          puVar4 = (undefined4 *)(*(code *)PTR___errno_location_00053384)();\n          uVar1 = *puVar4;\n          (*(code *)PTR_fclose_00053318)(iVar2);\n        }\n        (*(code *)PTR_remove_00053310)(param_2);\n      }\n      puVar5 = (undefined *)(*(code *)PTR_strerror_00053404)(uVar1);\n    }\n  }\n  else {\n    puVar5 = PTR_s_nt_0005301c + 0x2074;\n  }\n  uVar1 = FUN_00019740(param_1,puVar5);\n  return uVar1;\n}\n\n" (function_definition "undefined4\npng_image_write_to_file\n          (int param_1,int param_2,undefined4 param_3,int param_4,undefined4 param_5,\n          undefined4 param_6)\n\n{\n  undefined4 uVar1;\n  int iVar2;\n  int iVar3;\n  undefined4 *puVar4;\n  undefined *puVar5;\n  \n  if (param_1 == 0) {\n    return 0;\n  }\n  if (*(int *)(param_1 + 4) == 1) {\n    if ((param_2 == 0) || (param_4 == 0)) {\n      puVar5 = PTR_s_nt_0005301c + 0x2048;\n    }\n    else {\n      iVar2 = (*(code *)PTR_fopen_000534f0)(param_2,PTR_s_nt_0005301c + 0x2044);\n      if (iVar2 == 0) {\n        puVar4 = (undefined4 *)(*(code *)PTR___errno_location_00053384)();\n        uVar1 = *puVar4;\n      }\n      else {\n        iVar3 = (*(code *)PTR_png_image_write_to_stdio_000532e0)\n                          (param_1,iVar2,param_3,param_4,param_5,param_6);\n        if (iVar3 == 0) {\n          (*(code *)PTR_fclose_00053318)(iVar2);\n          (*(code *)PTR_remove_00053310)(param_2);\n          return 0;\n        }\n        iVar3 = (*(code *)PTR_fflush_000534f4)(iVar2);\n        if ((iVar3 == 0) && (iVar3 = (*(code *)PTR_ferror_000534a8)(iVar2), iVar3 == 0)) {\n          iVar2 = (*(code *)PTR_fclose_00053318)(iVar2);\n          if (iVar2 == 0) {\n            return 1;\n          }\n          puVar4 = (undefined4 *)(*(code *)PTR___errno_location_00053384)();\n          uVar1 = *puVar4;\n        }\n        else {\n          puVar4 = (undefined4 *)(*(code *)PTR___errno_location_00053384)();\n          uVar1 = *puVar4;\n          (*(code *)PTR_fclose_00053318)(iVar2);\n        }\n        (*(code *)PTR_remove_00053310)(param_2);\n      }\n      puVar5 = (undefined *)(*(code *)PTR_strerror_00053404)(uVar1);\n    }\n  }\n  else {\n    puVar5 = PTR_s_nt_0005301c + 0x2074;\n  }\n  uVar1 = FUN_00019740(param_1,puVar5);\n  return uVar1;\n}" type_identifier (function_declarator "png_image_write_to_file\n          (int param_1,int param_2,undefined4 param_3,int param_4,undefined4 param_5,\n          undefined4 param_6)" identifier (parameter_list "(int param_1,int param_2,undefined4 param_3,int param_4,undefined4 param_5,\n          undefined4 param_6)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "int param_2" primitive_type identifier) , (parameter_declaration "undefined4 param_3" type_identifier identifier) , (parameter_declaration "int param_4" primitive_type identifier) , (parameter_declaration "undefined4 param_5" type_identifier identifier) , (parameter_declaration "undefined4 param_6" type_identifier identifier) ))) (compound_statement "{\n  undefined4 uVar1;\n  int iVar2;\n  int iVar3;\n  undefined4 *puVar4;\n  undefined *puVar5;\n  \n  if (param_1 == 0) {\n    return 0;\n  }\n  if (*(int *)(param_1 + 4) == 1) {\n    if ((param_2 == 0) || (param_4 == 0)) {\n      puVar5 = PTR_s_nt_0005301c + 0x2048;\n    }\n    else {\n      iVar2 = (*(code *)PTR_fopen_000534f0)(param_2,PTR_s_nt_0005301c + 0x2044);\n      if (iVar2 == 0) {\n        puVar4 = (undefined4 *)(*(code *)PTR___errno_location_00053384)();\n        uVar1 = *puVar4;\n      }\n      else {\n        iVar3 = (*(code *)PTR_png_image_write_to_stdio_000532e0)\n                          (param_1,iVar2,param_3,param_4,param_5,param_6);\n        if (iVar3 == 0) {\n          (*(code *)PTR_fclose_00053318)(iVar2);\n          (*(code *)PTR_remove_00053310)(param_2);\n          return 0;\n        }\n        iVar3 = (*(code *)PTR_fflush_000534f4)(iVar2);\n        if ((iVar3 == 0) && (iVar3 = (*(code *)PTR_ferror_000534a8)(iVar2), iVar3 == 0)) {\n          iVar2 = (*(code *)PTR_fclose_00053318)(iVar2);\n          if (iVar2 == 0) {\n            return 1;\n          }\n          puVar4 = (undefined4 *)(*(code *)PTR___errno_location_00053384)();\n          uVar1 = *puVar4;\n        }\n        else {\n          puVar4 = (undefined4 *)(*(code *)PTR___errno_location_00053384)();\n          uVar1 = *puVar4;\n          (*(code *)PTR_fclose_00053318)(iVar2);\n        }\n        (*(code *)PTR_remove_00053310)(param_2);\n      }\n      puVar5 = (undefined *)(*(code *)PTR_strerror_00053404)(uVar1);\n    }\n  }\n  else {\n    puVar5 = PTR_s_nt_0005301c + 0x2074;\n  }\n  uVar1 = FUN_00019740(param_1,puVar5);\n  return uVar1;\n}" { (declaration "undefined4 uVar1;" type_identifier identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "undefined4 *puVar4;" type_identifier (pointer_declarator "*puVar4" * identifier) ;) (declaration "undefined *puVar5;" type_identifier (pointer_declarator "*puVar5" * identifier) ;) (if_statement "if (param_1 == 0) {\n    return 0;\n  }" if (parenthesized_expression "(param_1 == 0)" ( (binary_expression "param_1 == 0" identifier == number_literal) )) (compound_statement "{\n    return 0;\n  }" { (return_statement "return 0;" return number_literal ;) })) (if_statement "if (*(int *)(param_1 + 4) == 1) {\n    if ((param_2 == 0) || (param_4 == 0)) {\n      puVar5 = PTR_s_nt_0005301c + 0x2048;\n    }\n    else {\n      iVar2 = (*(code *)PTR_fopen_000534f0)(param_2,PTR_s_nt_0005301c + 0x2044);\n      if (iVar2 == 0) {\n        puVar4 = (undefined4 *)(*(code *)PTR___errno_location_00053384)();\n        uVar1 = *puVar4;\n      }\n      else {\n        iVar3 = (*(code *)PTR_png_image_write_to_stdio_000532e0)\n                          (param_1,iVar2,param_3,param_4,param_5,param_6);\n        if (iVar3 == 0) {\n          (*(code *)PTR_fclose_00053318)(iVar2);\n          (*(code *)PTR_remove_00053310)(param_2);\n          return 0;\n        }\n        iVar3 = (*(code *)PTR_fflush_000534f4)(iVar2);\n        if ((iVar3 == 0) && (iVar3 = (*(code *)PTR_ferror_000534a8)(iVar2), iVar3 == 0)) {\n          iVar2 = (*(code *)PTR_fclose_00053318)(iVar2);\n          if (iVar2 == 0) {\n            return 1;\n          }\n          puVar4 = (undefined4 *)(*(code *)PTR___errno_location_00053384)();\n          uVar1 = *puVar4;\n        }\n        else {\n          puVar4 = (undefined4 *)(*(code *)PTR___errno_location_00053384)();\n          uVar1 = *puVar4;\n          (*(code *)PTR_fclose_00053318)(iVar2);\n        }\n        (*(code *)PTR_remove_00053310)(param_2);\n      }\n      puVar5 = (undefined *)(*(code *)PTR_strerror_00053404)(uVar1);\n    }\n  }\n  else {\n    puVar5 = PTR_s_nt_0005301c + 0x2074;\n  }" if (parenthesized_expression "(*(int *)(param_1 + 4) == 1)" ( (binary_expression "*(int *)(param_1 + 4) == 1" (pointer_expression "*(int *)(param_1 + 4)" * (cast_expression "(int *)(param_1 + 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 4)" ( (binary_expression "param_1 + 4" identifier + number_literal) )))) == number_literal) )) (compound_statement "{\n    if ((param_2 == 0) || (param_4 == 0)) {\n      puVar5 = PTR_s_nt_0005301c + 0x2048;\n    }\n    else {\n      iVar2 = (*(code *)PTR_fopen_000534f0)(param_2,PTR_s_nt_0005301c + 0x2044);\n      if (iVar2 == 0) {\n        puVar4 = (undefined4 *)(*(code *)PTR___errno_location_00053384)();\n        uVar1 = *puVar4;\n      }\n      else {\n        iVar3 = (*(code *)PTR_png_image_write_to_stdio_000532e0)\n                          (param_1,iVar2,param_3,param_4,param_5,param_6);\n        if (iVar3 == 0) {\n          (*(code *)PTR_fclose_00053318)(iVar2);\n          (*(code *)PTR_remove_00053310)(param_2);\n          return 0;\n        }\n        iVar3 = (*(code *)PTR_fflush_000534f4)(iVar2);\n        if ((iVar3 == 0) && (iVar3 = (*(code *)PTR_ferror_000534a8)(iVar2), iVar3 == 0)) {\n          iVar2 = (*(code *)PTR_fclose_00053318)(iVar2);\n          if (iVar2 == 0) {\n            return 1;\n          }\n          puVar4 = (undefined4 *)(*(code *)PTR___errno_location_00053384)();\n          uVar1 = *puVar4;\n        }\n        else {\n          puVar4 = (undefined4 *)(*(code *)PTR___errno_location_00053384)();\n          uVar1 = *puVar4;\n          (*(code *)PTR_fclose_00053318)(iVar2);\n        }\n        (*(code *)PTR_remove_00053310)(param_2);\n      }\n      puVar5 = (undefined *)(*(code *)PTR_strerror_00053404)(uVar1);\n    }\n  }" { (if_statement "if ((param_2 == 0) || (param_4 == 0)) {\n      puVar5 = PTR_s_nt_0005301c + 0x2048;\n    }\n    else {\n      iVar2 = (*(code *)PTR_fopen_000534f0)(param_2,PTR_s_nt_0005301c + 0x2044);\n      if (iVar2 == 0) {\n        puVar4 = (undefined4 *)(*(code *)PTR___errno_location_00053384)();\n        uVar1 = *puVar4;\n      }\n      else {\n        iVar3 = (*(code *)PTR_png_image_write_to_stdio_000532e0)\n                          (param_1,iVar2,param_3,param_4,param_5,param_6);\n        if (iVar3 == 0) {\n          (*(code *)PTR_fclose_00053318)(iVar2);\n          (*(code *)PTR_remove_00053310)(param_2);\n          return 0;\n        }\n        iVar3 = (*(code *)PTR_fflush_000534f4)(iVar2);\n        if ((iVar3 == 0) && (iVar3 = (*(code *)PTR_ferror_000534a8)(iVar2), iVar3 == 0)) {\n          iVar2 = (*(code *)PTR_fclose_00053318)(iVar2);\n          if (iVar2 == 0) {\n            return 1;\n          }\n          puVar4 = (undefined4 *)(*(code *)PTR___errno_location_00053384)();\n          uVar1 = *puVar4;\n        }\n        else {\n          puVar4 = (undefined4 *)(*(code *)PTR___errno_location_00053384)();\n          uVar1 = *puVar4;\n          (*(code *)PTR_fclose_00053318)(iVar2);\n        }\n        (*(code *)PTR_remove_00053310)(param_2);\n      }\n      puVar5 = (undefined *)(*(code *)PTR_strerror_00053404)(uVar1);\n    }" if (parenthesized_expression "((param_2 == 0) || (param_4 == 0))" ( (binary_expression "(param_2 == 0) || (param_4 == 0)" (parenthesized_expression "(param_2 == 0)" ( (binary_expression "param_2 == 0" identifier == number_literal) )) || (parenthesized_expression "(param_4 == 0)" ( (binary_expression "param_4 == 0" identifier == number_literal) ))) )) (compound_statement "{\n      puVar5 = PTR_s_nt_0005301c + 0x2048;\n    }" { (expression_statement "puVar5 = PTR_s_nt_0005301c + 0x2048;" (assignment_expression "puVar5 = PTR_s_nt_0005301c + 0x2048" identifier = (binary_expression "PTR_s_nt_0005301c + 0x2048" identifier + number_literal)) ;) }) (else_clause "else {\n      iVar2 = (*(code *)PTR_fopen_000534f0)(param_2,PTR_s_nt_0005301c + 0x2044);\n      if (iVar2 == 0) {\n        puVar4 = (undefined4 *)(*(code *)PTR___errno_location_00053384)();\n        uVar1 = *puVar4;\n      }\n      else {\n        iVar3 = (*(code *)PTR_png_image_write_to_stdio_000532e0)\n                          (param_1,iVar2,param_3,param_4,param_5,param_6);\n        if (iVar3 == 0) {\n          (*(code *)PTR_fclose_00053318)(iVar2);\n          (*(code *)PTR_remove_00053310)(param_2);\n          return 0;\n        }\n        iVar3 = (*(code *)PTR_fflush_000534f4)(iVar2);\n        if ((iVar3 == 0) && (iVar3 = (*(code *)PTR_ferror_000534a8)(iVar2), iVar3 == 0)) {\n          iVar2 = (*(code *)PTR_fclose_00053318)(iVar2);\n          if (iVar2 == 0) {\n            return 1;\n          }\n          puVar4 = (undefined4 *)(*(code *)PTR___errno_location_00053384)();\n          uVar1 = *puVar4;\n        }\n        else {\n          puVar4 = (undefined4 *)(*(code *)PTR___errno_location_00053384)();\n          uVar1 = *puVar4;\n          (*(code *)PTR_fclose_00053318)(iVar2);\n        }\n        (*(code *)PTR_remove_00053310)(param_2);\n      }\n      puVar5 = (undefined *)(*(code *)PTR_strerror_00053404)(uVar1);\n    }" else (compound_statement "{\n      iVar2 = (*(code *)PTR_fopen_000534f0)(param_2,PTR_s_nt_0005301c + 0x2044);\n      if (iVar2 == 0) {\n        puVar4 = (undefined4 *)(*(code *)PTR___errno_location_00053384)();\n        uVar1 = *puVar4;\n      }\n      else {\n        iVar3 = (*(code *)PTR_png_image_write_to_stdio_000532e0)\n                          (param_1,iVar2,param_3,param_4,param_5,param_6);\n        if (iVar3 == 0) {\n          (*(code *)PTR_fclose_00053318)(iVar2);\n          (*(code *)PTR_remove_00053310)(param_2);\n          return 0;\n        }\n        iVar3 = (*(code *)PTR_fflush_000534f4)(iVar2);\n        if ((iVar3 == 0) && (iVar3 = (*(code *)PTR_ferror_000534a8)(iVar2), iVar3 == 0)) {\n          iVar2 = (*(code *)PTR_fclose_00053318)(iVar2);\n          if (iVar2 == 0) {\n            return 1;\n          }\n          puVar4 = (undefined4 *)(*(code *)PTR___errno_location_00053384)();\n          uVar1 = *puVar4;\n        }\n        else {\n          puVar4 = (undefined4 *)(*(code *)PTR___errno_location_00053384)();\n          uVar1 = *puVar4;\n          (*(code *)PTR_fclose_00053318)(iVar2);\n        }\n        (*(code *)PTR_remove_00053310)(param_2);\n      }\n      puVar5 = (undefined *)(*(code *)PTR_strerror_00053404)(uVar1);\n    }" { (expression_statement "iVar2 = (*(code *)PTR_fopen_000534f0)(param_2,PTR_s_nt_0005301c + 0x2044);" (assignment_expression "iVar2 = (*(code *)PTR_fopen_000534f0)(param_2,PTR_s_nt_0005301c + 0x2044)" identifier = (call_expression "(*(code *)PTR_fopen_000534f0)(param_2,PTR_s_nt_0005301c + 0x2044)" (parenthesized_expression "(*(code *)PTR_fopen_000534f0)" ( (pointer_expression "*(code *)PTR_fopen_000534f0" * (cast_expression "(code *)PTR_fopen_000534f0" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(param_2,PTR_s_nt_0005301c + 0x2044)" ( identifier , (binary_expression "PTR_s_nt_0005301c + 0x2044" identifier + number_literal) )))) ;) (if_statement "if (iVar2 == 0) {\n        puVar4 = (undefined4 *)(*(code *)PTR___errno_location_00053384)();\n        uVar1 = *puVar4;\n      }\n      else {\n        iVar3 = (*(code *)PTR_png_image_write_to_stdio_000532e0)\n                          (param_1,iVar2,param_3,param_4,param_5,param_6);\n        if (iVar3 == 0) {\n          (*(code *)PTR_fclose_00053318)(iVar2);\n          (*(code *)PTR_remove_00053310)(param_2);\n          return 0;\n        }\n        iVar3 = (*(code *)PTR_fflush_000534f4)(iVar2);\n        if ((iVar3 == 0) && (iVar3 = (*(code *)PTR_ferror_000534a8)(iVar2), iVar3 == 0)) {\n          iVar2 = (*(code *)PTR_fclose_00053318)(iVar2);\n          if (iVar2 == 0) {\n            return 1;\n          }\n          puVar4 = (undefined4 *)(*(code *)PTR___errno_location_00053384)();\n          uVar1 = *puVar4;\n        }\n        else {\n          puVar4 = (undefined4 *)(*(code *)PTR___errno_location_00053384)();\n          uVar1 = *puVar4;\n          (*(code *)PTR_fclose_00053318)(iVar2);\n        }\n        (*(code *)PTR_remove_00053310)(param_2);\n      }" if (parenthesized_expression "(iVar2 == 0)" ( (binary_expression "iVar2 == 0" identifier == number_literal) )) (compound_statement "{\n        puVar4 = (undefined4 *)(*(code *)PTR___errno_location_00053384)();\n        uVar1 = *puVar4;\n      }" { (expression_statement "puVar4 = (undefined4 *)(*(code *)PTR___errno_location_00053384)();" (assignment_expression "puVar4 = (undefined4 *)(*(code *)PTR___errno_location_00053384)()" identifier = (cast_expression "(undefined4 *)(*(code *)PTR___errno_location_00053384)()" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "(*(code *)PTR___errno_location_00053384)()" (parenthesized_expression "(*(code *)PTR___errno_location_00053384)" ( (pointer_expression "*(code *)PTR___errno_location_00053384" * (cast_expression "(code *)PTR___errno_location_00053384" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( ))))) ;) (expression_statement "uVar1 = *puVar4;" (assignment_expression "uVar1 = *puVar4" identifier = (pointer_expression "*puVar4" * identifier)) ;) }) (else_clause "else {\n        iVar3 = (*(code *)PTR_png_image_write_to_stdio_000532e0)\n                          (param_1,iVar2,param_3,param_4,param_5,param_6);\n        if (iVar3 == 0) {\n          (*(code *)PTR_fclose_00053318)(iVar2);\n          (*(code *)PTR_remove_00053310)(param_2);\n          return 0;\n        }\n        iVar3 = (*(code *)PTR_fflush_000534f4)(iVar2);\n        if ((iVar3 == 0) && (iVar3 = (*(code *)PTR_ferror_000534a8)(iVar2), iVar3 == 0)) {\n          iVar2 = (*(code *)PTR_fclose_00053318)(iVar2);\n          if (iVar2 == 0) {\n            return 1;\n          }\n          puVar4 = (undefined4 *)(*(code *)PTR___errno_location_00053384)();\n          uVar1 = *puVar4;\n        }\n        else {\n          puVar4 = (undefined4 *)(*(code *)PTR___errno_location_00053384)();\n          uVar1 = *puVar4;\n          (*(code *)PTR_fclose_00053318)(iVar2);\n        }\n        (*(code *)PTR_remove_00053310)(param_2);\n      }" else (compound_statement "{\n        iVar3 = (*(code *)PTR_png_image_write_to_stdio_000532e0)\n                          (param_1,iVar2,param_3,param_4,param_5,param_6);\n        if (iVar3 == 0) {\n          (*(code *)PTR_fclose_00053318)(iVar2);\n          (*(code *)PTR_remove_00053310)(param_2);\n          return 0;\n        }\n        iVar3 = (*(code *)PTR_fflush_000534f4)(iVar2);\n        if ((iVar3 == 0) && (iVar3 = (*(code *)PTR_ferror_000534a8)(iVar2), iVar3 == 0)) {\n          iVar2 = (*(code *)PTR_fclose_00053318)(iVar2);\n          if (iVar2 == 0) {\n            return 1;\n          }\n          puVar4 = (undefined4 *)(*(code *)PTR___errno_location_00053384)();\n          uVar1 = *puVar4;\n        }\n        else {\n          puVar4 = (undefined4 *)(*(code *)PTR___errno_location_00053384)();\n          uVar1 = *puVar4;\n          (*(code *)PTR_fclose_00053318)(iVar2);\n        }\n        (*(code *)PTR_remove_00053310)(param_2);\n      }" { (expression_statement "iVar3 = (*(code *)PTR_png_image_write_to_stdio_000532e0)\n                          (param_1,iVar2,param_3,param_4,param_5,param_6);" (assignment_expression "iVar3 = (*(code *)PTR_png_image_write_to_stdio_000532e0)\n                          (param_1,iVar2,param_3,param_4,param_5,param_6)" identifier = (call_expression "(*(code *)PTR_png_image_write_to_stdio_000532e0)\n                          (param_1,iVar2,param_3,param_4,param_5,param_6)" (parenthesized_expression "(*(code *)PTR_png_image_write_to_stdio_000532e0)" ( (pointer_expression "*(code *)PTR_png_image_write_to_stdio_000532e0" * (cast_expression "(code *)PTR_png_image_write_to_stdio_000532e0" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(param_1,iVar2,param_3,param_4,param_5,param_6)" ( identifier , identifier , identifier , identifier , identifier , identifier )))) ;) (if_statement "if (iVar3 == 0) {\n          (*(code *)PTR_fclose_00053318)(iVar2);\n          (*(code *)PTR_remove_00053310)(param_2);\n          return 0;\n        }" if (parenthesized_expression "(iVar3 == 0)" ( (binary_expression "iVar3 == 0" identifier == number_literal) )) (compound_statement "{\n          (*(code *)PTR_fclose_00053318)(iVar2);\n          (*(code *)PTR_remove_00053310)(param_2);\n          return 0;\n        }" { (expression_statement "(*(code *)PTR_fclose_00053318)(iVar2);" (call_expression "(*(code *)PTR_fclose_00053318)(iVar2)" (parenthesized_expression "(*(code *)PTR_fclose_00053318)" ( (pointer_expression "*(code *)PTR_fclose_00053318" * (cast_expression "(code *)PTR_fclose_00053318" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(iVar2)" ( identifier ))) ;) (expression_statement "(*(code *)PTR_remove_00053310)(param_2);" (call_expression "(*(code *)PTR_remove_00053310)(param_2)" (parenthesized_expression "(*(code *)PTR_remove_00053310)" ( (pointer_expression "*(code *)PTR_remove_00053310" * (cast_expression "(code *)PTR_remove_00053310" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(param_2)" ( identifier ))) ;) (return_statement "return 0;" return number_literal ;) })) (expression_statement "iVar3 = (*(code *)PTR_fflush_000534f4)(iVar2);" (assignment_expression "iVar3 = (*(code *)PTR_fflush_000534f4)(iVar2)" identifier = (call_expression "(*(code *)PTR_fflush_000534f4)(iVar2)" (parenthesized_expression "(*(code *)PTR_fflush_000534f4)" ( (pointer_expression "*(code *)PTR_fflush_000534f4" * (cast_expression "(code *)PTR_fflush_000534f4" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(iVar2)" ( identifier )))) ;) (if_statement "if ((iVar3 == 0) && (iVar3 = (*(code *)PTR_ferror_000534a8)(iVar2), iVar3 == 0)) {\n          iVar2 = (*(code *)PTR_fclose_00053318)(iVar2);\n          if (iVar2 == 0) {\n            return 1;\n          }\n          puVar4 = (undefined4 *)(*(code *)PTR___errno_location_00053384)();\n          uVar1 = *puVar4;\n        }\n        else {\n          puVar4 = (undefined4 *)(*(code *)PTR___errno_location_00053384)();\n          uVar1 = *puVar4;\n          (*(code *)PTR_fclose_00053318)(iVar2);\n        }" if (parenthesized_expression "((iVar3 == 0) && (iVar3 = (*(code *)PTR_ferror_000534a8)(iVar2), iVar3 == 0))" ( (binary_expression "(iVar3 == 0) && (iVar3 = (*(code *)PTR_ferror_000534a8)(iVar2), iVar3 == 0)" (parenthesized_expression "(iVar3 == 0)" ( (binary_expression "iVar3 == 0" identifier == number_literal) )) && (parenthesized_expression "(iVar3 = (*(code *)PTR_ferror_000534a8)(iVar2), iVar3 == 0)" ( (comma_expression "iVar3 = (*(code *)PTR_ferror_000534a8)(iVar2), iVar3 == 0" (assignment_expression "iVar3 = (*(code *)PTR_ferror_000534a8)(iVar2)" identifier = (call_expression "(*(code *)PTR_ferror_000534a8)(iVar2)" (parenthesized_expression "(*(code *)PTR_ferror_000534a8)" ( (pointer_expression "*(code *)PTR_ferror_000534a8" * (cast_expression "(code *)PTR_ferror_000534a8" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(iVar2)" ( identifier )))) , (binary_expression "iVar3 == 0" identifier == number_literal)) ))) )) (compound_statement "{\n          iVar2 = (*(code *)PTR_fclose_00053318)(iVar2);\n          if (iVar2 == 0) {\n            return 1;\n          }\n          puVar4 = (undefined4 *)(*(code *)PTR___errno_location_00053384)();\n          uVar1 = *puVar4;\n        }" { (expression_statement "iVar2 = (*(code *)PTR_fclose_00053318)(iVar2);" (assignment_expression "iVar2 = (*(code *)PTR_fclose_00053318)(iVar2)" identifier = (call_expression "(*(code *)PTR_fclose_00053318)(iVar2)" (parenthesized_expression "(*(code *)PTR_fclose_00053318)" ( (pointer_expression "*(code *)PTR_fclose_00053318" * (cast_expression "(code *)PTR_fclose_00053318" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(iVar2)" ( identifier )))) ;) (if_statement "if (iVar2 == 0) {\n            return 1;\n          }" if (parenthesized_expression "(iVar2 == 0)" ( (binary_expression "iVar2 == 0" identifier == number_literal) )) (compound_statement "{\n            return 1;\n          }" { (return_statement "return 1;" return number_literal ;) })) (expression_statement "puVar4 = (undefined4 *)(*(code *)PTR___errno_location_00053384)();" (assignment_expression "puVar4 = (undefined4 *)(*(code *)PTR___errno_location_00053384)()" identifier = (cast_expression "(undefined4 *)(*(code *)PTR___errno_location_00053384)()" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "(*(code *)PTR___errno_location_00053384)()" (parenthesized_expression "(*(code *)PTR___errno_location_00053384)" ( (pointer_expression "*(code *)PTR___errno_location_00053384" * (cast_expression "(code *)PTR___errno_location_00053384" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( ))))) ;) (expression_statement "uVar1 = *puVar4;" (assignment_expression "uVar1 = *puVar4" identifier = (pointer_expression "*puVar4" * identifier)) ;) }) (else_clause "else {\n          puVar4 = (undefined4 *)(*(code *)PTR___errno_location_00053384)();\n          uVar1 = *puVar4;\n          (*(code *)PTR_fclose_00053318)(iVar2);\n        }" else (compound_statement "{\n          puVar4 = (undefined4 *)(*(code *)PTR___errno_location_00053384)();\n          uVar1 = *puVar4;\n          (*(code *)PTR_fclose_00053318)(iVar2);\n        }" { (expression_statement "puVar4 = (undefined4 *)(*(code *)PTR___errno_location_00053384)();" (assignment_expression "puVar4 = (undefined4 *)(*(code *)PTR___errno_location_00053384)()" identifier = (cast_expression "(undefined4 *)(*(code *)PTR___errno_location_00053384)()" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "(*(code *)PTR___errno_location_00053384)()" (parenthesized_expression "(*(code *)PTR___errno_location_00053384)" ( (pointer_expression "*(code *)PTR___errno_location_00053384" * (cast_expression "(code *)PTR___errno_location_00053384" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( ))))) ;) (expression_statement "uVar1 = *puVar4;" (assignment_expression "uVar1 = *puVar4" identifier = (pointer_expression "*puVar4" * identifier)) ;) (expression_statement "(*(code *)PTR_fclose_00053318)(iVar2);" (call_expression "(*(code *)PTR_fclose_00053318)(iVar2)" (parenthesized_expression "(*(code *)PTR_fclose_00053318)" ( (pointer_expression "*(code *)PTR_fclose_00053318" * (cast_expression "(code *)PTR_fclose_00053318" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(iVar2)" ( identifier ))) ;) }))) (expression_statement "(*(code *)PTR_remove_00053310)(param_2);" (call_expression "(*(code *)PTR_remove_00053310)(param_2)" (parenthesized_expression "(*(code *)PTR_remove_00053310)" ( (pointer_expression "*(code *)PTR_remove_00053310" * (cast_expression "(code *)PTR_remove_00053310" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(param_2)" ( identifier ))) ;) }))) (expression_statement "puVar5 = (undefined *)(*(code *)PTR_strerror_00053404)(uVar1);" (assignment_expression "puVar5 = (undefined *)(*(code *)PTR_strerror_00053404)(uVar1)" identifier = (cast_expression "(undefined *)(*(code *)PTR_strerror_00053404)(uVar1)" ( (type_descriptor "undefined *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "(*(code *)PTR_strerror_00053404)(uVar1)" (parenthesized_expression "(*(code *)PTR_strerror_00053404)" ( (pointer_expression "*(code *)PTR_strerror_00053404" * (cast_expression "(code *)PTR_strerror_00053404" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(uVar1)" ( identifier ))))) ;) }))) }) (else_clause "else {\n    puVar5 = PTR_s_nt_0005301c + 0x2074;\n  }" else (compound_statement "{\n    puVar5 = PTR_s_nt_0005301c + 0x2074;\n  }" { (expression_statement "puVar5 = PTR_s_nt_0005301c + 0x2074;" (assignment_expression "puVar5 = PTR_s_nt_0005301c + 0x2074" identifier = (binary_expression "PTR_s_nt_0005301c + 0x2074" identifier + number_literal)) ;) }))) (expression_statement "uVar1 = FUN_00019740(param_1,puVar5);" (assignment_expression "uVar1 = FUN_00019740(param_1,puVar5)" identifier = (call_expression "FUN_00019740(param_1,puVar5)" identifier (argument_list "(param_1,puVar5)" ( identifier , identifier )))) ;) (return_statement "return uVar1;" return identifier ;) })))
(translation_unit "int png_image_write_to_file\n              (png_imagep image,char *file_name,int convert_to_8bit,void *buffer,\n              png_int_32 row_stride,void *colormap)\n\n{\n  int iVar1;\n  int iVar2;\n  undefined4 *puVar3;\n  png_const_charp error_message;\n  undefined4 uVar4;\n  \n  if (image == (png_imagep)0x0) {\n    return 0;\n  }\n  if (image->version == 1) {\n    if ((file_name == (char *)0x0) || (buffer == (void *)0x0)) {\n      error_message = PTR_s_nt_0005301c + 0x2048;\n    }\n    else {\n      iVar1 = (*(code *)PTR_fopen_000534f0)(file_name,PTR_s_nt_0005301c + 0x2044);\n      if (iVar1 == 0) {\n        puVar3 = (undefined4 *)(*(code *)PTR___errno_location_00053384)();\n        uVar4 = *puVar3;\n      }\n      else {\n        iVar2 = (*(code *)PTR_png_image_write_to_stdio_000532e0)\n                          (image,iVar1,convert_to_8bit,buffer,row_stride,colormap);\n        if (iVar2 == 0) {\n          (*(code *)PTR_fclose_00053318)(iVar1);\n          (*(code *)PTR_remove_00053310)(file_name);\n          return 0;\n        }\n        iVar2 = (*(code *)PTR_fflush_000534f4)(iVar1);\n        if ((iVar2 == 0) && (iVar2 = (*(code *)PTR_ferror_000534a8)(iVar1), iVar2 == 0)) {\n          iVar1 = (*(code *)PTR_fclose_00053318)(iVar1);\n          if (iVar1 == 0) {\n            return 1;\n          }\n          puVar3 = (undefined4 *)(*(code *)PTR___errno_location_00053384)();\n          uVar4 = *puVar3;\n        }\n        else {\n          puVar3 = (undefined4 *)(*(code *)PTR___errno_location_00053384)();\n          uVar4 = *puVar3;\n          (*(code *)PTR_fclose_00053318)(iVar1);\n        }\n        (*(code *)PTR_remove_00053310)(file_name);\n      }\n      error_message = (png_const_charp)(*(code *)PTR_strerror_00053404)(uVar4);\n    }\n  }\n  else {\n    error_message = PTR_s_nt_0005301c + 0x2074;\n  }\n  iVar1 = png_image_error(image,error_message);\n  return iVar1;\n}\n\n" (function_definition "int png_image_write_to_file\n              (png_imagep image,char *file_name,int convert_to_8bit,void *buffer,\n              png_int_32 row_stride,void *colormap)\n\n{\n  int iVar1;\n  int iVar2;\n  undefined4 *puVar3;\n  png_const_charp error_message;\n  undefined4 uVar4;\n  \n  if (image == (png_imagep)0x0) {\n    return 0;\n  }\n  if (image->version == 1) {\n    if ((file_name == (char *)0x0) || (buffer == (void *)0x0)) {\n      error_message = PTR_s_nt_0005301c + 0x2048;\n    }\n    else {\n      iVar1 = (*(code *)PTR_fopen_000534f0)(file_name,PTR_s_nt_0005301c + 0x2044);\n      if (iVar1 == 0) {\n        puVar3 = (undefined4 *)(*(code *)PTR___errno_location_00053384)();\n        uVar4 = *puVar3;\n      }\n      else {\n        iVar2 = (*(code *)PTR_png_image_write_to_stdio_000532e0)\n                          (image,iVar1,convert_to_8bit,buffer,row_stride,colormap);\n        if (iVar2 == 0) {\n          (*(code *)PTR_fclose_00053318)(iVar1);\n          (*(code *)PTR_remove_00053310)(file_name);\n          return 0;\n        }\n        iVar2 = (*(code *)PTR_fflush_000534f4)(iVar1);\n        if ((iVar2 == 0) && (iVar2 = (*(code *)PTR_ferror_000534a8)(iVar1), iVar2 == 0)) {\n          iVar1 = (*(code *)PTR_fclose_00053318)(iVar1);\n          if (iVar1 == 0) {\n            return 1;\n          }\n          puVar3 = (undefined4 *)(*(code *)PTR___errno_location_00053384)();\n          uVar4 = *puVar3;\n        }\n        else {\n          puVar3 = (undefined4 *)(*(code *)PTR___errno_location_00053384)();\n          uVar4 = *puVar3;\n          (*(code *)PTR_fclose_00053318)(iVar1);\n        }\n        (*(code *)PTR_remove_00053310)(file_name);\n      }\n      error_message = (png_const_charp)(*(code *)PTR_strerror_00053404)(uVar4);\n    }\n  }\n  else {\n    error_message = PTR_s_nt_0005301c + 0x2074;\n  }\n  iVar1 = png_image_error(image,error_message);\n  return iVar1;\n}" primitive_type (function_declarator "png_image_write_to_file\n              (png_imagep image,char *file_name,int convert_to_8bit,void *buffer,\n              png_int_32 row_stride,void *colormap)" identifier (parameter_list "(png_imagep image,char *file_name,int convert_to_8bit,void *buffer,\n              png_int_32 row_stride,void *colormap)" ( (parameter_declaration "png_imagep image" type_identifier identifier) , (parameter_declaration "char *file_name" primitive_type (pointer_declarator "*file_name" * identifier)) , (parameter_declaration "int convert_to_8bit" primitive_type identifier) , (parameter_declaration "void *buffer" primitive_type (pointer_declarator "*buffer" * identifier)) , (parameter_declaration "png_int_32 row_stride" type_identifier identifier) , (parameter_declaration "void *colormap" primitive_type (pointer_declarator "*colormap" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  int iVar2;\n  undefined4 *puVar3;\n  png_const_charp error_message;\n  undefined4 uVar4;\n  \n  if (image == (png_imagep)0x0) {\n    return 0;\n  }\n  if (image->version == 1) {\n    if ((file_name == (char *)0x0) || (buffer == (void *)0x0)) {\n      error_message = PTR_s_nt_0005301c + 0x2048;\n    }\n    else {\n      iVar1 = (*(code *)PTR_fopen_000534f0)(file_name,PTR_s_nt_0005301c + 0x2044);\n      if (iVar1 == 0) {\n        puVar3 = (undefined4 *)(*(code *)PTR___errno_location_00053384)();\n        uVar4 = *puVar3;\n      }\n      else {\n        iVar2 = (*(code *)PTR_png_image_write_to_stdio_000532e0)\n                          (image,iVar1,convert_to_8bit,buffer,row_stride,colormap);\n        if (iVar2 == 0) {\n          (*(code *)PTR_fclose_00053318)(iVar1);\n          (*(code *)PTR_remove_00053310)(file_name);\n          return 0;\n        }\n        iVar2 = (*(code *)PTR_fflush_000534f4)(iVar1);\n        if ((iVar2 == 0) && (iVar2 = (*(code *)PTR_ferror_000534a8)(iVar1), iVar2 == 0)) {\n          iVar1 = (*(code *)PTR_fclose_00053318)(iVar1);\n          if (iVar1 == 0) {\n            return 1;\n          }\n          puVar3 = (undefined4 *)(*(code *)PTR___errno_location_00053384)();\n          uVar4 = *puVar3;\n        }\n        else {\n          puVar3 = (undefined4 *)(*(code *)PTR___errno_location_00053384)();\n          uVar4 = *puVar3;\n          (*(code *)PTR_fclose_00053318)(iVar1);\n        }\n        (*(code *)PTR_remove_00053310)(file_name);\n      }\n      error_message = (png_const_charp)(*(code *)PTR_strerror_00053404)(uVar4);\n    }\n  }\n  else {\n    error_message = PTR_s_nt_0005301c + 0x2074;\n  }\n  iVar1 = png_image_error(image,error_message);\n  return iVar1;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "undefined4 *puVar3;" type_identifier (pointer_declarator "*puVar3" * identifier) ;) (declaration "png_const_charp error_message;" type_identifier identifier ;) (declaration "undefined4 uVar4;" type_identifier identifier ;) (if_statement "if (image == (png_imagep)0x0) {\n    return 0;\n  }" if (parenthesized_expression "(image == (png_imagep)0x0)" ( (binary_expression "image == (png_imagep)0x0" identifier == (cast_expression "(png_imagep)0x0" ( (type_descriptor "png_imagep" type_identifier) ) number_literal)) )) (compound_statement "{\n    return 0;\n  }" { (return_statement "return 0;" return number_literal ;) })) (if_statement "if (image->version == 1) {\n    if ((file_name == (char *)0x0) || (buffer == (void *)0x0)) {\n      error_message = PTR_s_nt_0005301c + 0x2048;\n    }\n    else {\n      iVar1 = (*(code *)PTR_fopen_000534f0)(file_name,PTR_s_nt_0005301c + 0x2044);\n      if (iVar1 == 0) {\n        puVar3 = (undefined4 *)(*(code *)PTR___errno_location_00053384)();\n        uVar4 = *puVar3;\n      }\n      else {\n        iVar2 = (*(code *)PTR_png_image_write_to_stdio_000532e0)\n                          (image,iVar1,convert_to_8bit,buffer,row_stride,colormap);\n        if (iVar2 == 0) {\n          (*(code *)PTR_fclose_00053318)(iVar1);\n          (*(code *)PTR_remove_00053310)(file_name);\n          return 0;\n        }\n        iVar2 = (*(code *)PTR_fflush_000534f4)(iVar1);\n        if ((iVar2 == 0) && (iVar2 = (*(code *)PTR_ferror_000534a8)(iVar1), iVar2 == 0)) {\n          iVar1 = (*(code *)PTR_fclose_00053318)(iVar1);\n          if (iVar1 == 0) {\n            return 1;\n          }\n          puVar3 = (undefined4 *)(*(code *)PTR___errno_location_00053384)();\n          uVar4 = *puVar3;\n        }\n        else {\n          puVar3 = (undefined4 *)(*(code *)PTR___errno_location_00053384)();\n          uVar4 = *puVar3;\n          (*(code *)PTR_fclose_00053318)(iVar1);\n        }\n        (*(code *)PTR_remove_00053310)(file_name);\n      }\n      error_message = (png_const_charp)(*(code *)PTR_strerror_00053404)(uVar4);\n    }\n  }\n  else {\n    error_message = PTR_s_nt_0005301c + 0x2074;\n  }" if (parenthesized_expression "(image->version == 1)" ( (binary_expression "image->version == 1" (field_expression "image->version" identifier -> field_identifier) == number_literal) )) (compound_statement "{\n    if ((file_name == (char *)0x0) || (buffer == (void *)0x0)) {\n      error_message = PTR_s_nt_0005301c + 0x2048;\n    }\n    else {\n      iVar1 = (*(code *)PTR_fopen_000534f0)(file_name,PTR_s_nt_0005301c + 0x2044);\n      if (iVar1 == 0) {\n        puVar3 = (undefined4 *)(*(code *)PTR___errno_location_00053384)();\n        uVar4 = *puVar3;\n      }\n      else {\n        iVar2 = (*(code *)PTR_png_image_write_to_stdio_000532e0)\n                          (image,iVar1,convert_to_8bit,buffer,row_stride,colormap);\n        if (iVar2 == 0) {\n          (*(code *)PTR_fclose_00053318)(iVar1);\n          (*(code *)PTR_remove_00053310)(file_name);\n          return 0;\n        }\n        iVar2 = (*(code *)PTR_fflush_000534f4)(iVar1);\n        if ((iVar2 == 0) && (iVar2 = (*(code *)PTR_ferror_000534a8)(iVar1), iVar2 == 0)) {\n          iVar1 = (*(code *)PTR_fclose_00053318)(iVar1);\n          if (iVar1 == 0) {\n            return 1;\n          }\n          puVar3 = (undefined4 *)(*(code *)PTR___errno_location_00053384)();\n          uVar4 = *puVar3;\n        }\n        else {\n          puVar3 = (undefined4 *)(*(code *)PTR___errno_location_00053384)();\n          uVar4 = *puVar3;\n          (*(code *)PTR_fclose_00053318)(iVar1);\n        }\n        (*(code *)PTR_remove_00053310)(file_name);\n      }\n      error_message = (png_const_charp)(*(code *)PTR_strerror_00053404)(uVar4);\n    }\n  }" { (if_statement "if ((file_name == (char *)0x0) || (buffer == (void *)0x0)) {\n      error_message = PTR_s_nt_0005301c + 0x2048;\n    }\n    else {\n      iVar1 = (*(code *)PTR_fopen_000534f0)(file_name,PTR_s_nt_0005301c + 0x2044);\n      if (iVar1 == 0) {\n        puVar3 = (undefined4 *)(*(code *)PTR___errno_location_00053384)();\n        uVar4 = *puVar3;\n      }\n      else {\n        iVar2 = (*(code *)PTR_png_image_write_to_stdio_000532e0)\n                          (image,iVar1,convert_to_8bit,buffer,row_stride,colormap);\n        if (iVar2 == 0) {\n          (*(code *)PTR_fclose_00053318)(iVar1);\n          (*(code *)PTR_remove_00053310)(file_name);\n          return 0;\n        }\n        iVar2 = (*(code *)PTR_fflush_000534f4)(iVar1);\n        if ((iVar2 == 0) && (iVar2 = (*(code *)PTR_ferror_000534a8)(iVar1), iVar2 == 0)) {\n          iVar1 = (*(code *)PTR_fclose_00053318)(iVar1);\n          if (iVar1 == 0) {\n            return 1;\n          }\n          puVar3 = (undefined4 *)(*(code *)PTR___errno_location_00053384)();\n          uVar4 = *puVar3;\n        }\n        else {\n          puVar3 = (undefined4 *)(*(code *)PTR___errno_location_00053384)();\n          uVar4 = *puVar3;\n          (*(code *)PTR_fclose_00053318)(iVar1);\n        }\n        (*(code *)PTR_remove_00053310)(file_name);\n      }\n      error_message = (png_const_charp)(*(code *)PTR_strerror_00053404)(uVar4);\n    }" if (parenthesized_expression "((file_name == (char *)0x0) || (buffer == (void *)0x0))" ( (binary_expression "(file_name == (char *)0x0) || (buffer == (void *)0x0)" (parenthesized_expression "(file_name == (char *)0x0)" ( (binary_expression "file_name == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) || (parenthesized_expression "(buffer == (void *)0x0)" ( (binary_expression "buffer == (void *)0x0" identifier == (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ))) )) (compound_statement "{\n      error_message = PTR_s_nt_0005301c + 0x2048;\n    }" { (expression_statement "error_message = PTR_s_nt_0005301c + 0x2048;" (assignment_expression "error_message = PTR_s_nt_0005301c + 0x2048" identifier = (binary_expression "PTR_s_nt_0005301c + 0x2048" identifier + number_literal)) ;) }) (else_clause "else {\n      iVar1 = (*(code *)PTR_fopen_000534f0)(file_name,PTR_s_nt_0005301c + 0x2044);\n      if (iVar1 == 0) {\n        puVar3 = (undefined4 *)(*(code *)PTR___errno_location_00053384)();\n        uVar4 = *puVar3;\n      }\n      else {\n        iVar2 = (*(code *)PTR_png_image_write_to_stdio_000532e0)\n                          (image,iVar1,convert_to_8bit,buffer,row_stride,colormap);\n        if (iVar2 == 0) {\n          (*(code *)PTR_fclose_00053318)(iVar1);\n          (*(code *)PTR_remove_00053310)(file_name);\n          return 0;\n        }\n        iVar2 = (*(code *)PTR_fflush_000534f4)(iVar1);\n        if ((iVar2 == 0) && (iVar2 = (*(code *)PTR_ferror_000534a8)(iVar1), iVar2 == 0)) {\n          iVar1 = (*(code *)PTR_fclose_00053318)(iVar1);\n          if (iVar1 == 0) {\n            return 1;\n          }\n          puVar3 = (undefined4 *)(*(code *)PTR___errno_location_00053384)();\n          uVar4 = *puVar3;\n        }\n        else {\n          puVar3 = (undefined4 *)(*(code *)PTR___errno_location_00053384)();\n          uVar4 = *puVar3;\n          (*(code *)PTR_fclose_00053318)(iVar1);\n        }\n        (*(code *)PTR_remove_00053310)(file_name);\n      }\n      error_message = (png_const_charp)(*(code *)PTR_strerror_00053404)(uVar4);\n    }" else (compound_statement "{\n      iVar1 = (*(code *)PTR_fopen_000534f0)(file_name,PTR_s_nt_0005301c + 0x2044);\n      if (iVar1 == 0) {\n        puVar3 = (undefined4 *)(*(code *)PTR___errno_location_00053384)();\n        uVar4 = *puVar3;\n      }\n      else {\n        iVar2 = (*(code *)PTR_png_image_write_to_stdio_000532e0)\n                          (image,iVar1,convert_to_8bit,buffer,row_stride,colormap);\n        if (iVar2 == 0) {\n          (*(code *)PTR_fclose_00053318)(iVar1);\n          (*(code *)PTR_remove_00053310)(file_name);\n          return 0;\n        }\n        iVar2 = (*(code *)PTR_fflush_000534f4)(iVar1);\n        if ((iVar2 == 0) && (iVar2 = (*(code *)PTR_ferror_000534a8)(iVar1), iVar2 == 0)) {\n          iVar1 = (*(code *)PTR_fclose_00053318)(iVar1);\n          if (iVar1 == 0) {\n            return 1;\n          }\n          puVar3 = (undefined4 *)(*(code *)PTR___errno_location_00053384)();\n          uVar4 = *puVar3;\n        }\n        else {\n          puVar3 = (undefined4 *)(*(code *)PTR___errno_location_00053384)();\n          uVar4 = *puVar3;\n          (*(code *)PTR_fclose_00053318)(iVar1);\n        }\n        (*(code *)PTR_remove_00053310)(file_name);\n      }\n      error_message = (png_const_charp)(*(code *)PTR_strerror_00053404)(uVar4);\n    }" { (expression_statement "iVar1 = (*(code *)PTR_fopen_000534f0)(file_name,PTR_s_nt_0005301c + 0x2044);" (assignment_expression "iVar1 = (*(code *)PTR_fopen_000534f0)(file_name,PTR_s_nt_0005301c + 0x2044)" identifier = (call_expression "(*(code *)PTR_fopen_000534f0)(file_name,PTR_s_nt_0005301c + 0x2044)" (parenthesized_expression "(*(code *)PTR_fopen_000534f0)" ( (pointer_expression "*(code *)PTR_fopen_000534f0" * (cast_expression "(code *)PTR_fopen_000534f0" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(file_name,PTR_s_nt_0005301c + 0x2044)" ( identifier , (binary_expression "PTR_s_nt_0005301c + 0x2044" identifier + number_literal) )))) ;) (if_statement "if (iVar1 == 0) {\n        puVar3 = (undefined4 *)(*(code *)PTR___errno_location_00053384)();\n        uVar4 = *puVar3;\n      }\n      else {\n        iVar2 = (*(code *)PTR_png_image_write_to_stdio_000532e0)\n                          (image,iVar1,convert_to_8bit,buffer,row_stride,colormap);\n        if (iVar2 == 0) {\n          (*(code *)PTR_fclose_00053318)(iVar1);\n          (*(code *)PTR_remove_00053310)(file_name);\n          return 0;\n        }\n        iVar2 = (*(code *)PTR_fflush_000534f4)(iVar1);\n        if ((iVar2 == 0) && (iVar2 = (*(code *)PTR_ferror_000534a8)(iVar1), iVar2 == 0)) {\n          iVar1 = (*(code *)PTR_fclose_00053318)(iVar1);\n          if (iVar1 == 0) {\n            return 1;\n          }\n          puVar3 = (undefined4 *)(*(code *)PTR___errno_location_00053384)();\n          uVar4 = *puVar3;\n        }\n        else {\n          puVar3 = (undefined4 *)(*(code *)PTR___errno_location_00053384)();\n          uVar4 = *puVar3;\n          (*(code *)PTR_fclose_00053318)(iVar1);\n        }\n        (*(code *)PTR_remove_00053310)(file_name);\n      }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n        puVar3 = (undefined4 *)(*(code *)PTR___errno_location_00053384)();\n        uVar4 = *puVar3;\n      }" { (expression_statement "puVar3 = (undefined4 *)(*(code *)PTR___errno_location_00053384)();" (assignment_expression "puVar3 = (undefined4 *)(*(code *)PTR___errno_location_00053384)()" identifier = (cast_expression "(undefined4 *)(*(code *)PTR___errno_location_00053384)()" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "(*(code *)PTR___errno_location_00053384)()" (parenthesized_expression "(*(code *)PTR___errno_location_00053384)" ( (pointer_expression "*(code *)PTR___errno_location_00053384" * (cast_expression "(code *)PTR___errno_location_00053384" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( ))))) ;) (expression_statement "uVar4 = *puVar3;" (assignment_expression "uVar4 = *puVar3" identifier = (pointer_expression "*puVar3" * identifier)) ;) }) (else_clause "else {\n        iVar2 = (*(code *)PTR_png_image_write_to_stdio_000532e0)\n                          (image,iVar1,convert_to_8bit,buffer,row_stride,colormap);\n        if (iVar2 == 0) {\n          (*(code *)PTR_fclose_00053318)(iVar1);\n          (*(code *)PTR_remove_00053310)(file_name);\n          return 0;\n        }\n        iVar2 = (*(code *)PTR_fflush_000534f4)(iVar1);\n        if ((iVar2 == 0) && (iVar2 = (*(code *)PTR_ferror_000534a8)(iVar1), iVar2 == 0)) {\n          iVar1 = (*(code *)PTR_fclose_00053318)(iVar1);\n          if (iVar1 == 0) {\n            return 1;\n          }\n          puVar3 = (undefined4 *)(*(code *)PTR___errno_location_00053384)();\n          uVar4 = *puVar3;\n        }\n        else {\n          puVar3 = (undefined4 *)(*(code *)PTR___errno_location_00053384)();\n          uVar4 = *puVar3;\n          (*(code *)PTR_fclose_00053318)(iVar1);\n        }\n        (*(code *)PTR_remove_00053310)(file_name);\n      }" else (compound_statement "{\n        iVar2 = (*(code *)PTR_png_image_write_to_stdio_000532e0)\n                          (image,iVar1,convert_to_8bit,buffer,row_stride,colormap);\n        if (iVar2 == 0) {\n          (*(code *)PTR_fclose_00053318)(iVar1);\n          (*(code *)PTR_remove_00053310)(file_name);\n          return 0;\n        }\n        iVar2 = (*(code *)PTR_fflush_000534f4)(iVar1);\n        if ((iVar2 == 0) && (iVar2 = (*(code *)PTR_ferror_000534a8)(iVar1), iVar2 == 0)) {\n          iVar1 = (*(code *)PTR_fclose_00053318)(iVar1);\n          if (iVar1 == 0) {\n            return 1;\n          }\n          puVar3 = (undefined4 *)(*(code *)PTR___errno_location_00053384)();\n          uVar4 = *puVar3;\n        }\n        else {\n          puVar3 = (undefined4 *)(*(code *)PTR___errno_location_00053384)();\n          uVar4 = *puVar3;\n          (*(code *)PTR_fclose_00053318)(iVar1);\n        }\n        (*(code *)PTR_remove_00053310)(file_name);\n      }" { (expression_statement "iVar2 = (*(code *)PTR_png_image_write_to_stdio_000532e0)\n                          (image,iVar1,convert_to_8bit,buffer,row_stride,colormap);" (assignment_expression "iVar2 = (*(code *)PTR_png_image_write_to_stdio_000532e0)\n                          (image,iVar1,convert_to_8bit,buffer,row_stride,colormap)" identifier = (call_expression "(*(code *)PTR_png_image_write_to_stdio_000532e0)\n                          (image,iVar1,convert_to_8bit,buffer,row_stride,colormap)" (parenthesized_expression "(*(code *)PTR_png_image_write_to_stdio_000532e0)" ( (pointer_expression "*(code *)PTR_png_image_write_to_stdio_000532e0" * (cast_expression "(code *)PTR_png_image_write_to_stdio_000532e0" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(image,iVar1,convert_to_8bit,buffer,row_stride,colormap)" ( identifier , identifier , identifier , identifier , identifier , identifier )))) ;) (if_statement "if (iVar2 == 0) {\n          (*(code *)PTR_fclose_00053318)(iVar1);\n          (*(code *)PTR_remove_00053310)(file_name);\n          return 0;\n        }" if (parenthesized_expression "(iVar2 == 0)" ( (binary_expression "iVar2 == 0" identifier == number_literal) )) (compound_statement "{\n          (*(code *)PTR_fclose_00053318)(iVar1);\n          (*(code *)PTR_remove_00053310)(file_name);\n          return 0;\n        }" { (expression_statement "(*(code *)PTR_fclose_00053318)(iVar1);" (call_expression "(*(code *)PTR_fclose_00053318)(iVar1)" (parenthesized_expression "(*(code *)PTR_fclose_00053318)" ( (pointer_expression "*(code *)PTR_fclose_00053318" * (cast_expression "(code *)PTR_fclose_00053318" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(iVar1)" ( identifier ))) ;) (expression_statement "(*(code *)PTR_remove_00053310)(file_name);" (call_expression "(*(code *)PTR_remove_00053310)(file_name)" (parenthesized_expression "(*(code *)PTR_remove_00053310)" ( (pointer_expression "*(code *)PTR_remove_00053310" * (cast_expression "(code *)PTR_remove_00053310" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(file_name)" ( identifier ))) ;) (return_statement "return 0;" return number_literal ;) })) (expression_statement "iVar2 = (*(code *)PTR_fflush_000534f4)(iVar1);" (assignment_expression "iVar2 = (*(code *)PTR_fflush_000534f4)(iVar1)" identifier = (call_expression "(*(code *)PTR_fflush_000534f4)(iVar1)" (parenthesized_expression "(*(code *)PTR_fflush_000534f4)" ( (pointer_expression "*(code *)PTR_fflush_000534f4" * (cast_expression "(code *)PTR_fflush_000534f4" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(iVar1)" ( identifier )))) ;) (if_statement "if ((iVar2 == 0) && (iVar2 = (*(code *)PTR_ferror_000534a8)(iVar1), iVar2 == 0)) {\n          iVar1 = (*(code *)PTR_fclose_00053318)(iVar1);\n          if (iVar1 == 0) {\n            return 1;\n          }\n          puVar3 = (undefined4 *)(*(code *)PTR___errno_location_00053384)();\n          uVar4 = *puVar3;\n        }\n        else {\n          puVar3 = (undefined4 *)(*(code *)PTR___errno_location_00053384)();\n          uVar4 = *puVar3;\n          (*(code *)PTR_fclose_00053318)(iVar1);\n        }" if (parenthesized_expression "((iVar2 == 0) && (iVar2 = (*(code *)PTR_ferror_000534a8)(iVar1), iVar2 == 0))" ( (binary_expression "(iVar2 == 0) && (iVar2 = (*(code *)PTR_ferror_000534a8)(iVar1), iVar2 == 0)" (parenthesized_expression "(iVar2 == 0)" ( (binary_expression "iVar2 == 0" identifier == number_literal) )) && (parenthesized_expression "(iVar2 = (*(code *)PTR_ferror_000534a8)(iVar1), iVar2 == 0)" ( (comma_expression "iVar2 = (*(code *)PTR_ferror_000534a8)(iVar1), iVar2 == 0" (assignment_expression "iVar2 = (*(code *)PTR_ferror_000534a8)(iVar1)" identifier = (call_expression "(*(code *)PTR_ferror_000534a8)(iVar1)" (parenthesized_expression "(*(code *)PTR_ferror_000534a8)" ( (pointer_expression "*(code *)PTR_ferror_000534a8" * (cast_expression "(code *)PTR_ferror_000534a8" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(iVar1)" ( identifier )))) , (binary_expression "iVar2 == 0" identifier == number_literal)) ))) )) (compound_statement "{\n          iVar1 = (*(code *)PTR_fclose_00053318)(iVar1);\n          if (iVar1 == 0) {\n            return 1;\n          }\n          puVar3 = (undefined4 *)(*(code *)PTR___errno_location_00053384)();\n          uVar4 = *puVar3;\n        }" { (expression_statement "iVar1 = (*(code *)PTR_fclose_00053318)(iVar1);" (assignment_expression "iVar1 = (*(code *)PTR_fclose_00053318)(iVar1)" identifier = (call_expression "(*(code *)PTR_fclose_00053318)(iVar1)" (parenthesized_expression "(*(code *)PTR_fclose_00053318)" ( (pointer_expression "*(code *)PTR_fclose_00053318" * (cast_expression "(code *)PTR_fclose_00053318" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(iVar1)" ( identifier )))) ;) (if_statement "if (iVar1 == 0) {\n            return 1;\n          }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n            return 1;\n          }" { (return_statement "return 1;" return number_literal ;) })) (expression_statement "puVar3 = (undefined4 *)(*(code *)PTR___errno_location_00053384)();" (assignment_expression "puVar3 = (undefined4 *)(*(code *)PTR___errno_location_00053384)()" identifier = (cast_expression "(undefined4 *)(*(code *)PTR___errno_location_00053384)()" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "(*(code *)PTR___errno_location_00053384)()" (parenthesized_expression "(*(code *)PTR___errno_location_00053384)" ( (pointer_expression "*(code *)PTR___errno_location_00053384" * (cast_expression "(code *)PTR___errno_location_00053384" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( ))))) ;) (expression_statement "uVar4 = *puVar3;" (assignment_expression "uVar4 = *puVar3" identifier = (pointer_expression "*puVar3" * identifier)) ;) }) (else_clause "else {\n          puVar3 = (undefined4 *)(*(code *)PTR___errno_location_00053384)();\n          uVar4 = *puVar3;\n          (*(code *)PTR_fclose_00053318)(iVar1);\n        }" else (compound_statement "{\n          puVar3 = (undefined4 *)(*(code *)PTR___errno_location_00053384)();\n          uVar4 = *puVar3;\n          (*(code *)PTR_fclose_00053318)(iVar1);\n        }" { (expression_statement "puVar3 = (undefined4 *)(*(code *)PTR___errno_location_00053384)();" (assignment_expression "puVar3 = (undefined4 *)(*(code *)PTR___errno_location_00053384)()" identifier = (cast_expression "(undefined4 *)(*(code *)PTR___errno_location_00053384)()" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "(*(code *)PTR___errno_location_00053384)()" (parenthesized_expression "(*(code *)PTR___errno_location_00053384)" ( (pointer_expression "*(code *)PTR___errno_location_00053384" * (cast_expression "(code *)PTR___errno_location_00053384" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( ))))) ;) (expression_statement "uVar4 = *puVar3;" (assignment_expression "uVar4 = *puVar3" identifier = (pointer_expression "*puVar3" * identifier)) ;) (expression_statement "(*(code *)PTR_fclose_00053318)(iVar1);" (call_expression "(*(code *)PTR_fclose_00053318)(iVar1)" (parenthesized_expression "(*(code *)PTR_fclose_00053318)" ( (pointer_expression "*(code *)PTR_fclose_00053318" * (cast_expression "(code *)PTR_fclose_00053318" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(iVar1)" ( identifier ))) ;) }))) (expression_statement "(*(code *)PTR_remove_00053310)(file_name);" (call_expression "(*(code *)PTR_remove_00053310)(file_name)" (parenthesized_expression "(*(code *)PTR_remove_00053310)" ( (pointer_expression "*(code *)PTR_remove_00053310" * (cast_expression "(code *)PTR_remove_00053310" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(file_name)" ( identifier ))) ;) }))) (expression_statement "error_message = (png_const_charp)(*(code *)PTR_strerror_00053404)(uVar4);" (assignment_expression "error_message = (png_const_charp)(*(code *)PTR_strerror_00053404)(uVar4)" identifier = (call_expression "(png_const_charp)(*(code *)PTR_strerror_00053404)(uVar4)" (call_expression "(png_const_charp)(*(code *)PTR_strerror_00053404)" (parenthesized_expression "(png_const_charp)" ( identifier )) (argument_list "(*(code *)PTR_strerror_00053404)" ( (pointer_expression "*(code *)PTR_strerror_00053404" * (cast_expression "(code *)PTR_strerror_00053404" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) ))) (argument_list "(uVar4)" ( identifier )))) ;) }))) }) (else_clause "else {\n    error_message = PTR_s_nt_0005301c + 0x2074;\n  }" else (compound_statement "{\n    error_message = PTR_s_nt_0005301c + 0x2074;\n  }" { (expression_statement "error_message = PTR_s_nt_0005301c + 0x2074;" (assignment_expression "error_message = PTR_s_nt_0005301c + 0x2074" identifier = (binary_expression "PTR_s_nt_0005301c + 0x2074" identifier + number_literal)) ;) }))) (expression_statement "iVar1 = png_image_error(image,error_message);" (assignment_expression "iVar1 = png_image_error(image,error_message)" identifier = (call_expression "png_image_error(image,error_message)" identifier (argument_list "(image,error_message)" ( identifier , identifier )))) ;) (return_statement "return iVar1;" return identifier ;) })))
(translation_unit "undefined4\npng_image_write_to_file\n          (int param_1,int param_2,undefined4 param_3,int param_4,undefined4 param_5,\n          undefined4 param_6)\n\n{\n  undefined4 uVar1;\n  int iVar2;\n  int iVar3;\n  undefined4 *puVar4;\n  undefined *puVar5;\n  \n  if (param_1 == 0) {\n    return 0;\n  }\n  if (*(int *)(param_1 + 4) == 1) {\n    if ((param_2 == 0) || (param_4 == 0)) {\n      puVar5 = PTR_s_nt_0005301c + 0x2048;\n    }\n    else {\n      iVar2 = (*(code *)PTR_fopen_000534f0)(param_2,PTR_s_nt_0005301c + 0x2044);\n      if (iVar2 == 0) {\n        puVar4 = (undefined4 *)(*(code *)PTR___errno_location_00053384)();\n        uVar1 = *puVar4;\n      }\n      else {\n        iVar3 = (*(code *)PTR_png_image_write_to_stdio_000532e0)\n                          (param_1,iVar2,param_3,param_4,param_5,param_6);\n        if (iVar3 == 0) {\n          (*(code *)PTR_fclose_00053318)(iVar2);\n          (*(code *)PTR_remove_00053310)(param_2);\n          return 0;\n        }\n        iVar3 = (*(code *)PTR_fflush_000534f4)(iVar2);\n        if ((iVar3 == 0) && (iVar3 = (*(code *)PTR_ferror_000534a8)(iVar2), iVar3 == 0)) {\n          iVar2 = (*(code *)PTR_fclose_00053318)(iVar2);\n          if (iVar2 == 0) {\n            return 1;\n          }\n          puVar4 = (undefined4 *)(*(code *)PTR___errno_location_00053384)();\n          uVar1 = *puVar4;\n        }\n        else {\n          puVar4 = (undefined4 *)(*(code *)PTR___errno_location_00053384)();\n          uVar1 = *puVar4;\n          (*(code *)PTR_fclose_00053318)(iVar2);\n        }\n        (*(code *)PTR_remove_00053310)(param_2);\n      }\n      puVar5 = (undefined *)(*(code *)PTR_strerror_00053404)(uVar1);\n    }\n  }\n  else {\n    puVar5 = PTR_s_nt_0005301c + 0x2074;\n  }\n  uVar1 = FUN_00019740(param_1,puVar5);\n  return uVar1;\n}\n\n" (function_definition "undefined4\npng_image_write_to_file\n          (int param_1,int param_2,undefined4 param_3,int param_4,undefined4 param_5,\n          undefined4 param_6)\n\n{\n  undefined4 uVar1;\n  int iVar2;\n  int iVar3;\n  undefined4 *puVar4;\n  undefined *puVar5;\n  \n  if (param_1 == 0) {\n    return 0;\n  }\n  if (*(int *)(param_1 + 4) == 1) {\n    if ((param_2 == 0) || (param_4 == 0)) {\n      puVar5 = PTR_s_nt_0005301c + 0x2048;\n    }\n    else {\n      iVar2 = (*(code *)PTR_fopen_000534f0)(param_2,PTR_s_nt_0005301c + 0x2044);\n      if (iVar2 == 0) {\n        puVar4 = (undefined4 *)(*(code *)PTR___errno_location_00053384)();\n        uVar1 = *puVar4;\n      }\n      else {\n        iVar3 = (*(code *)PTR_png_image_write_to_stdio_000532e0)\n                          (param_1,iVar2,param_3,param_4,param_5,param_6);\n        if (iVar3 == 0) {\n          (*(code *)PTR_fclose_00053318)(iVar2);\n          (*(code *)PTR_remove_00053310)(param_2);\n          return 0;\n        }\n        iVar3 = (*(code *)PTR_fflush_000534f4)(iVar2);\n        if ((iVar3 == 0) && (iVar3 = (*(code *)PTR_ferror_000534a8)(iVar2), iVar3 == 0)) {\n          iVar2 = (*(code *)PTR_fclose_00053318)(iVar2);\n          if (iVar2 == 0) {\n            return 1;\n          }\n          puVar4 = (undefined4 *)(*(code *)PTR___errno_location_00053384)();\n          uVar1 = *puVar4;\n        }\n        else {\n          puVar4 = (undefined4 *)(*(code *)PTR___errno_location_00053384)();\n          uVar1 = *puVar4;\n          (*(code *)PTR_fclose_00053318)(iVar2);\n        }\n        (*(code *)PTR_remove_00053310)(param_2);\n      }\n      puVar5 = (undefined *)(*(code *)PTR_strerror_00053404)(uVar1);\n    }\n  }\n  else {\n    puVar5 = PTR_s_nt_0005301c + 0x2074;\n  }\n  uVar1 = FUN_00019740(param_1,puVar5);\n  return uVar1;\n}" type_identifier (function_declarator "png_image_write_to_file\n          (int param_1,int param_2,undefined4 param_3,int param_4,undefined4 param_5,\n          undefined4 param_6)" identifier (parameter_list "(int param_1,int param_2,undefined4 param_3,int param_4,undefined4 param_5,\n          undefined4 param_6)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "int param_2" primitive_type identifier) , (parameter_declaration "undefined4 param_3" type_identifier identifier) , (parameter_declaration "int param_4" primitive_type identifier) , (parameter_declaration "undefined4 param_5" type_identifier identifier) , (parameter_declaration "undefined4 param_6" type_identifier identifier) ))) (compound_statement "{\n  undefined4 uVar1;\n  int iVar2;\n  int iVar3;\n  undefined4 *puVar4;\n  undefined *puVar5;\n  \n  if (param_1 == 0) {\n    return 0;\n  }\n  if (*(int *)(param_1 + 4) == 1) {\n    if ((param_2 == 0) || (param_4 == 0)) {\n      puVar5 = PTR_s_nt_0005301c + 0x2048;\n    }\n    else {\n      iVar2 = (*(code *)PTR_fopen_000534f0)(param_2,PTR_s_nt_0005301c + 0x2044);\n      if (iVar2 == 0) {\n        puVar4 = (undefined4 *)(*(code *)PTR___errno_location_00053384)();\n        uVar1 = *puVar4;\n      }\n      else {\n        iVar3 = (*(code *)PTR_png_image_write_to_stdio_000532e0)\n                          (param_1,iVar2,param_3,param_4,param_5,param_6);\n        if (iVar3 == 0) {\n          (*(code *)PTR_fclose_00053318)(iVar2);\n          (*(code *)PTR_remove_00053310)(param_2);\n          return 0;\n        }\n        iVar3 = (*(code *)PTR_fflush_000534f4)(iVar2);\n        if ((iVar3 == 0) && (iVar3 = (*(code *)PTR_ferror_000534a8)(iVar2), iVar3 == 0)) {\n          iVar2 = (*(code *)PTR_fclose_00053318)(iVar2);\n          if (iVar2 == 0) {\n            return 1;\n          }\n          puVar4 = (undefined4 *)(*(code *)PTR___errno_location_00053384)();\n          uVar1 = *puVar4;\n        }\n        else {\n          puVar4 = (undefined4 *)(*(code *)PTR___errno_location_00053384)();\n          uVar1 = *puVar4;\n          (*(code *)PTR_fclose_00053318)(iVar2);\n        }\n        (*(code *)PTR_remove_00053310)(param_2);\n      }\n      puVar5 = (undefined *)(*(code *)PTR_strerror_00053404)(uVar1);\n    }\n  }\n  else {\n    puVar5 = PTR_s_nt_0005301c + 0x2074;\n  }\n  uVar1 = FUN_00019740(param_1,puVar5);\n  return uVar1;\n}" { (declaration "undefined4 uVar1;" type_identifier identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "undefined4 *puVar4;" type_identifier (pointer_declarator "*puVar4" * identifier) ;) (declaration "undefined *puVar5;" type_identifier (pointer_declarator "*puVar5" * identifier) ;) (if_statement "if (param_1 == 0) {\n    return 0;\n  }" if (parenthesized_expression "(param_1 == 0)" ( (binary_expression "param_1 == 0" identifier == number_literal) )) (compound_statement "{\n    return 0;\n  }" { (return_statement "return 0;" return number_literal ;) })) (if_statement "if (*(int *)(param_1 + 4) == 1) {\n    if ((param_2 == 0) || (param_4 == 0)) {\n      puVar5 = PTR_s_nt_0005301c + 0x2048;\n    }\n    else {\n      iVar2 = (*(code *)PTR_fopen_000534f0)(param_2,PTR_s_nt_0005301c + 0x2044);\n      if (iVar2 == 0) {\n        puVar4 = (undefined4 *)(*(code *)PTR___errno_location_00053384)();\n        uVar1 = *puVar4;\n      }\n      else {\n        iVar3 = (*(code *)PTR_png_image_write_to_stdio_000532e0)\n                          (param_1,iVar2,param_3,param_4,param_5,param_6);\n        if (iVar3 == 0) {\n          (*(code *)PTR_fclose_00053318)(iVar2);\n          (*(code *)PTR_remove_00053310)(param_2);\n          return 0;\n        }\n        iVar3 = (*(code *)PTR_fflush_000534f4)(iVar2);\n        if ((iVar3 == 0) && (iVar3 = (*(code *)PTR_ferror_000534a8)(iVar2), iVar3 == 0)) {\n          iVar2 = (*(code *)PTR_fclose_00053318)(iVar2);\n          if (iVar2 == 0) {\n            return 1;\n          }\n          puVar4 = (undefined4 *)(*(code *)PTR___errno_location_00053384)();\n          uVar1 = *puVar4;\n        }\n        else {\n          puVar4 = (undefined4 *)(*(code *)PTR___errno_location_00053384)();\n          uVar1 = *puVar4;\n          (*(code *)PTR_fclose_00053318)(iVar2);\n        }\n        (*(code *)PTR_remove_00053310)(param_2);\n      }\n      puVar5 = (undefined *)(*(code *)PTR_strerror_00053404)(uVar1);\n    }\n  }\n  else {\n    puVar5 = PTR_s_nt_0005301c + 0x2074;\n  }" if (parenthesized_expression "(*(int *)(param_1 + 4) == 1)" ( (binary_expression "*(int *)(param_1 + 4) == 1" (pointer_expression "*(int *)(param_1 + 4)" * (cast_expression "(int *)(param_1 + 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 4)" ( (binary_expression "param_1 + 4" identifier + number_literal) )))) == number_literal) )) (compound_statement "{\n    if ((param_2 == 0) || (param_4 == 0)) {\n      puVar5 = PTR_s_nt_0005301c + 0x2048;\n    }\n    else {\n      iVar2 = (*(code *)PTR_fopen_000534f0)(param_2,PTR_s_nt_0005301c + 0x2044);\n      if (iVar2 == 0) {\n        puVar4 = (undefined4 *)(*(code *)PTR___errno_location_00053384)();\n        uVar1 = *puVar4;\n      }\n      else {\n        iVar3 = (*(code *)PTR_png_image_write_to_stdio_000532e0)\n                          (param_1,iVar2,param_3,param_4,param_5,param_6);\n        if (iVar3 == 0) {\n          (*(code *)PTR_fclose_00053318)(iVar2);\n          (*(code *)PTR_remove_00053310)(param_2);\n          return 0;\n        }\n        iVar3 = (*(code *)PTR_fflush_000534f4)(iVar2);\n        if ((iVar3 == 0) && (iVar3 = (*(code *)PTR_ferror_000534a8)(iVar2), iVar3 == 0)) {\n          iVar2 = (*(code *)PTR_fclose_00053318)(iVar2);\n          if (iVar2 == 0) {\n            return 1;\n          }\n          puVar4 = (undefined4 *)(*(code *)PTR___errno_location_00053384)();\n          uVar1 = *puVar4;\n        }\n        else {\n          puVar4 = (undefined4 *)(*(code *)PTR___errno_location_00053384)();\n          uVar1 = *puVar4;\n          (*(code *)PTR_fclose_00053318)(iVar2);\n        }\n        (*(code *)PTR_remove_00053310)(param_2);\n      }\n      puVar5 = (undefined *)(*(code *)PTR_strerror_00053404)(uVar1);\n    }\n  }" { (if_statement "if ((param_2 == 0) || (param_4 == 0)) {\n      puVar5 = PTR_s_nt_0005301c + 0x2048;\n    }\n    else {\n      iVar2 = (*(code *)PTR_fopen_000534f0)(param_2,PTR_s_nt_0005301c + 0x2044);\n      if (iVar2 == 0) {\n        puVar4 = (undefined4 *)(*(code *)PTR___errno_location_00053384)();\n        uVar1 = *puVar4;\n      }\n      else {\n        iVar3 = (*(code *)PTR_png_image_write_to_stdio_000532e0)\n                          (param_1,iVar2,param_3,param_4,param_5,param_6);\n        if (iVar3 == 0) {\n          (*(code *)PTR_fclose_00053318)(iVar2);\n          (*(code *)PTR_remove_00053310)(param_2);\n          return 0;\n        }\n        iVar3 = (*(code *)PTR_fflush_000534f4)(iVar2);\n        if ((iVar3 == 0) && (iVar3 = (*(code *)PTR_ferror_000534a8)(iVar2), iVar3 == 0)) {\n          iVar2 = (*(code *)PTR_fclose_00053318)(iVar2);\n          if (iVar2 == 0) {\n            return 1;\n          }\n          puVar4 = (undefined4 *)(*(code *)PTR___errno_location_00053384)();\n          uVar1 = *puVar4;\n        }\n        else {\n          puVar4 = (undefined4 *)(*(code *)PTR___errno_location_00053384)();\n          uVar1 = *puVar4;\n          (*(code *)PTR_fclose_00053318)(iVar2);\n        }\n        (*(code *)PTR_remove_00053310)(param_2);\n      }\n      puVar5 = (undefined *)(*(code *)PTR_strerror_00053404)(uVar1);\n    }" if (parenthesized_expression "((param_2 == 0) || (param_4 == 0))" ( (binary_expression "(param_2 == 0) || (param_4 == 0)" (parenthesized_expression "(param_2 == 0)" ( (binary_expression "param_2 == 0" identifier == number_literal) )) || (parenthesized_expression "(param_4 == 0)" ( (binary_expression "param_4 == 0" identifier == number_literal) ))) )) (compound_statement "{\n      puVar5 = PTR_s_nt_0005301c + 0x2048;\n    }" { (expression_statement "puVar5 = PTR_s_nt_0005301c + 0x2048;" (assignment_expression "puVar5 = PTR_s_nt_0005301c + 0x2048" identifier = (binary_expression "PTR_s_nt_0005301c + 0x2048" identifier + number_literal)) ;) }) (else_clause "else {\n      iVar2 = (*(code *)PTR_fopen_000534f0)(param_2,PTR_s_nt_0005301c + 0x2044);\n      if (iVar2 == 0) {\n        puVar4 = (undefined4 *)(*(code *)PTR___errno_location_00053384)();\n        uVar1 = *puVar4;\n      }\n      else {\n        iVar3 = (*(code *)PTR_png_image_write_to_stdio_000532e0)\n                          (param_1,iVar2,param_3,param_4,param_5,param_6);\n        if (iVar3 == 0) {\n          (*(code *)PTR_fclose_00053318)(iVar2);\n          (*(code *)PTR_remove_00053310)(param_2);\n          return 0;\n        }\n        iVar3 = (*(code *)PTR_fflush_000534f4)(iVar2);\n        if ((iVar3 == 0) && (iVar3 = (*(code *)PTR_ferror_000534a8)(iVar2), iVar3 == 0)) {\n          iVar2 = (*(code *)PTR_fclose_00053318)(iVar2);\n          if (iVar2 == 0) {\n            return 1;\n          }\n          puVar4 = (undefined4 *)(*(code *)PTR___errno_location_00053384)();\n          uVar1 = *puVar4;\n        }\n        else {\n          puVar4 = (undefined4 *)(*(code *)PTR___errno_location_00053384)();\n          uVar1 = *puVar4;\n          (*(code *)PTR_fclose_00053318)(iVar2);\n        }\n        (*(code *)PTR_remove_00053310)(param_2);\n      }\n      puVar5 = (undefined *)(*(code *)PTR_strerror_00053404)(uVar1);\n    }" else (compound_statement "{\n      iVar2 = (*(code *)PTR_fopen_000534f0)(param_2,PTR_s_nt_0005301c + 0x2044);\n      if (iVar2 == 0) {\n        puVar4 = (undefined4 *)(*(code *)PTR___errno_location_00053384)();\n        uVar1 = *puVar4;\n      }\n      else {\n        iVar3 = (*(code *)PTR_png_image_write_to_stdio_000532e0)\n                          (param_1,iVar2,param_3,param_4,param_5,param_6);\n        if (iVar3 == 0) {\n          (*(code *)PTR_fclose_00053318)(iVar2);\n          (*(code *)PTR_remove_00053310)(param_2);\n          return 0;\n        }\n        iVar3 = (*(code *)PTR_fflush_000534f4)(iVar2);\n        if ((iVar3 == 0) && (iVar3 = (*(code *)PTR_ferror_000534a8)(iVar2), iVar3 == 0)) {\n          iVar2 = (*(code *)PTR_fclose_00053318)(iVar2);\n          if (iVar2 == 0) {\n            return 1;\n          }\n          puVar4 = (undefined4 *)(*(code *)PTR___errno_location_00053384)();\n          uVar1 = *puVar4;\n        }\n        else {\n          puVar4 = (undefined4 *)(*(code *)PTR___errno_location_00053384)();\n          uVar1 = *puVar4;\n          (*(code *)PTR_fclose_00053318)(iVar2);\n        }\n        (*(code *)PTR_remove_00053310)(param_2);\n      }\n      puVar5 = (undefined *)(*(code *)PTR_strerror_00053404)(uVar1);\n    }" { (expression_statement "iVar2 = (*(code *)PTR_fopen_000534f0)(param_2,PTR_s_nt_0005301c + 0x2044);" (assignment_expression "iVar2 = (*(code *)PTR_fopen_000534f0)(param_2,PTR_s_nt_0005301c + 0x2044)" identifier = (call_expression "(*(code *)PTR_fopen_000534f0)(param_2,PTR_s_nt_0005301c + 0x2044)" (parenthesized_expression "(*(code *)PTR_fopen_000534f0)" ( (pointer_expression "*(code *)PTR_fopen_000534f0" * (cast_expression "(code *)PTR_fopen_000534f0" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(param_2,PTR_s_nt_0005301c + 0x2044)" ( identifier , (binary_expression "PTR_s_nt_0005301c + 0x2044" identifier + number_literal) )))) ;) (if_statement "if (iVar2 == 0) {\n        puVar4 = (undefined4 *)(*(code *)PTR___errno_location_00053384)();\n        uVar1 = *puVar4;\n      }\n      else {\n        iVar3 = (*(code *)PTR_png_image_write_to_stdio_000532e0)\n                          (param_1,iVar2,param_3,param_4,param_5,param_6);\n        if (iVar3 == 0) {\n          (*(code *)PTR_fclose_00053318)(iVar2);\n          (*(code *)PTR_remove_00053310)(param_2);\n          return 0;\n        }\n        iVar3 = (*(code *)PTR_fflush_000534f4)(iVar2);\n        if ((iVar3 == 0) && (iVar3 = (*(code *)PTR_ferror_000534a8)(iVar2), iVar3 == 0)) {\n          iVar2 = (*(code *)PTR_fclose_00053318)(iVar2);\n          if (iVar2 == 0) {\n            return 1;\n          }\n          puVar4 = (undefined4 *)(*(code *)PTR___errno_location_00053384)();\n          uVar1 = *puVar4;\n        }\n        else {\n          puVar4 = (undefined4 *)(*(code *)PTR___errno_location_00053384)();\n          uVar1 = *puVar4;\n          (*(code *)PTR_fclose_00053318)(iVar2);\n        }\n        (*(code *)PTR_remove_00053310)(param_2);\n      }" if (parenthesized_expression "(iVar2 == 0)" ( (binary_expression "iVar2 == 0" identifier == number_literal) )) (compound_statement "{\n        puVar4 = (undefined4 *)(*(code *)PTR___errno_location_00053384)();\n        uVar1 = *puVar4;\n      }" { (expression_statement "puVar4 = (undefined4 *)(*(code *)PTR___errno_location_00053384)();" (assignment_expression "puVar4 = (undefined4 *)(*(code *)PTR___errno_location_00053384)()" identifier = (cast_expression "(undefined4 *)(*(code *)PTR___errno_location_00053384)()" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "(*(code *)PTR___errno_location_00053384)()" (parenthesized_expression "(*(code *)PTR___errno_location_00053384)" ( (pointer_expression "*(code *)PTR___errno_location_00053384" * (cast_expression "(code *)PTR___errno_location_00053384" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( ))))) ;) (expression_statement "uVar1 = *puVar4;" (assignment_expression "uVar1 = *puVar4" identifier = (pointer_expression "*puVar4" * identifier)) ;) }) (else_clause "else {\n        iVar3 = (*(code *)PTR_png_image_write_to_stdio_000532e0)\n                          (param_1,iVar2,param_3,param_4,param_5,param_6);\n        if (iVar3 == 0) {\n          (*(code *)PTR_fclose_00053318)(iVar2);\n          (*(code *)PTR_remove_00053310)(param_2);\n          return 0;\n        }\n        iVar3 = (*(code *)PTR_fflush_000534f4)(iVar2);\n        if ((iVar3 == 0) && (iVar3 = (*(code *)PTR_ferror_000534a8)(iVar2), iVar3 == 0)) {\n          iVar2 = (*(code *)PTR_fclose_00053318)(iVar2);\n          if (iVar2 == 0) {\n            return 1;\n          }\n          puVar4 = (undefined4 *)(*(code *)PTR___errno_location_00053384)();\n          uVar1 = *puVar4;\n        }\n        else {\n          puVar4 = (undefined4 *)(*(code *)PTR___errno_location_00053384)();\n          uVar1 = *puVar4;\n          (*(code *)PTR_fclose_00053318)(iVar2);\n        }\n        (*(code *)PTR_remove_00053310)(param_2);\n      }" else (compound_statement "{\n        iVar3 = (*(code *)PTR_png_image_write_to_stdio_000532e0)\n                          (param_1,iVar2,param_3,param_4,param_5,param_6);\n        if (iVar3 == 0) {\n          (*(code *)PTR_fclose_00053318)(iVar2);\n          (*(code *)PTR_remove_00053310)(param_2);\n          return 0;\n        }\n        iVar3 = (*(code *)PTR_fflush_000534f4)(iVar2);\n        if ((iVar3 == 0) && (iVar3 = (*(code *)PTR_ferror_000534a8)(iVar2), iVar3 == 0)) {\n          iVar2 = (*(code *)PTR_fclose_00053318)(iVar2);\n          if (iVar2 == 0) {\n            return 1;\n          }\n          puVar4 = (undefined4 *)(*(code *)PTR___errno_location_00053384)();\n          uVar1 = *puVar4;\n        }\n        else {\n          puVar4 = (undefined4 *)(*(code *)PTR___errno_location_00053384)();\n          uVar1 = *puVar4;\n          (*(code *)PTR_fclose_00053318)(iVar2);\n        }\n        (*(code *)PTR_remove_00053310)(param_2);\n      }" { (expression_statement "iVar3 = (*(code *)PTR_png_image_write_to_stdio_000532e0)\n                          (param_1,iVar2,param_3,param_4,param_5,param_6);" (assignment_expression "iVar3 = (*(code *)PTR_png_image_write_to_stdio_000532e0)\n                          (param_1,iVar2,param_3,param_4,param_5,param_6)" identifier = (call_expression "(*(code *)PTR_png_image_write_to_stdio_000532e0)\n                          (param_1,iVar2,param_3,param_4,param_5,param_6)" (parenthesized_expression "(*(code *)PTR_png_image_write_to_stdio_000532e0)" ( (pointer_expression "*(code *)PTR_png_image_write_to_stdio_000532e0" * (cast_expression "(code *)PTR_png_image_write_to_stdio_000532e0" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(param_1,iVar2,param_3,param_4,param_5,param_6)" ( identifier , identifier , identifier , identifier , identifier , identifier )))) ;) (if_statement "if (iVar3 == 0) {\n          (*(code *)PTR_fclose_00053318)(iVar2);\n          (*(code *)PTR_remove_00053310)(param_2);\n          return 0;\n        }" if (parenthesized_expression "(iVar3 == 0)" ( (binary_expression "iVar3 == 0" identifier == number_literal) )) (compound_statement "{\n          (*(code *)PTR_fclose_00053318)(iVar2);\n          (*(code *)PTR_remove_00053310)(param_2);\n          return 0;\n        }" { (expression_statement "(*(code *)PTR_fclose_00053318)(iVar2);" (call_expression "(*(code *)PTR_fclose_00053318)(iVar2)" (parenthesized_expression "(*(code *)PTR_fclose_00053318)" ( (pointer_expression "*(code *)PTR_fclose_00053318" * (cast_expression "(code *)PTR_fclose_00053318" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(iVar2)" ( identifier ))) ;) (expression_statement "(*(code *)PTR_remove_00053310)(param_2);" (call_expression "(*(code *)PTR_remove_00053310)(param_2)" (parenthesized_expression "(*(code *)PTR_remove_00053310)" ( (pointer_expression "*(code *)PTR_remove_00053310" * (cast_expression "(code *)PTR_remove_00053310" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(param_2)" ( identifier ))) ;) (return_statement "return 0;" return number_literal ;) })) (expression_statement "iVar3 = (*(code *)PTR_fflush_000534f4)(iVar2);" (assignment_expression "iVar3 = (*(code *)PTR_fflush_000534f4)(iVar2)" identifier = (call_expression "(*(code *)PTR_fflush_000534f4)(iVar2)" (parenthesized_expression "(*(code *)PTR_fflush_000534f4)" ( (pointer_expression "*(code *)PTR_fflush_000534f4" * (cast_expression "(code *)PTR_fflush_000534f4" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(iVar2)" ( identifier )))) ;) (if_statement "if ((iVar3 == 0) && (iVar3 = (*(code *)PTR_ferror_000534a8)(iVar2), iVar3 == 0)) {\n          iVar2 = (*(code *)PTR_fclose_00053318)(iVar2);\n          if (iVar2 == 0) {\n            return 1;\n          }\n          puVar4 = (undefined4 *)(*(code *)PTR___errno_location_00053384)();\n          uVar1 = *puVar4;\n        }\n        else {\n          puVar4 = (undefined4 *)(*(code *)PTR___errno_location_00053384)();\n          uVar1 = *puVar4;\n          (*(code *)PTR_fclose_00053318)(iVar2);\n        }" if (parenthesized_expression "((iVar3 == 0) && (iVar3 = (*(code *)PTR_ferror_000534a8)(iVar2), iVar3 == 0))" ( (binary_expression "(iVar3 == 0) && (iVar3 = (*(code *)PTR_ferror_000534a8)(iVar2), iVar3 == 0)" (parenthesized_expression "(iVar3 == 0)" ( (binary_expression "iVar3 == 0" identifier == number_literal) )) && (parenthesized_expression "(iVar3 = (*(code *)PTR_ferror_000534a8)(iVar2), iVar3 == 0)" ( (comma_expression "iVar3 = (*(code *)PTR_ferror_000534a8)(iVar2), iVar3 == 0" (assignment_expression "iVar3 = (*(code *)PTR_ferror_000534a8)(iVar2)" identifier = (call_expression "(*(code *)PTR_ferror_000534a8)(iVar2)" (parenthesized_expression "(*(code *)PTR_ferror_000534a8)" ( (pointer_expression "*(code *)PTR_ferror_000534a8" * (cast_expression "(code *)PTR_ferror_000534a8" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(iVar2)" ( identifier )))) , (binary_expression "iVar3 == 0" identifier == number_literal)) ))) )) (compound_statement "{\n          iVar2 = (*(code *)PTR_fclose_00053318)(iVar2);\n          if (iVar2 == 0) {\n            return 1;\n          }\n          puVar4 = (undefined4 *)(*(code *)PTR___errno_location_00053384)();\n          uVar1 = *puVar4;\n        }" { (expression_statement "iVar2 = (*(code *)PTR_fclose_00053318)(iVar2);" (assignment_expression "iVar2 = (*(code *)PTR_fclose_00053318)(iVar2)" identifier = (call_expression "(*(code *)PTR_fclose_00053318)(iVar2)" (parenthesized_expression "(*(code *)PTR_fclose_00053318)" ( (pointer_expression "*(code *)PTR_fclose_00053318" * (cast_expression "(code *)PTR_fclose_00053318" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(iVar2)" ( identifier )))) ;) (if_statement "if (iVar2 == 0) {\n            return 1;\n          }" if (parenthesized_expression "(iVar2 == 0)" ( (binary_expression "iVar2 == 0" identifier == number_literal) )) (compound_statement "{\n            return 1;\n          }" { (return_statement "return 1;" return number_literal ;) })) (expression_statement "puVar4 = (undefined4 *)(*(code *)PTR___errno_location_00053384)();" (assignment_expression "puVar4 = (undefined4 *)(*(code *)PTR___errno_location_00053384)()" identifier = (cast_expression "(undefined4 *)(*(code *)PTR___errno_location_00053384)()" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "(*(code *)PTR___errno_location_00053384)()" (parenthesized_expression "(*(code *)PTR___errno_location_00053384)" ( (pointer_expression "*(code *)PTR___errno_location_00053384" * (cast_expression "(code *)PTR___errno_location_00053384" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( ))))) ;) (expression_statement "uVar1 = *puVar4;" (assignment_expression "uVar1 = *puVar4" identifier = (pointer_expression "*puVar4" * identifier)) ;) }) (else_clause "else {\n          puVar4 = (undefined4 *)(*(code *)PTR___errno_location_00053384)();\n          uVar1 = *puVar4;\n          (*(code *)PTR_fclose_00053318)(iVar2);\n        }" else (compound_statement "{\n          puVar4 = (undefined4 *)(*(code *)PTR___errno_location_00053384)();\n          uVar1 = *puVar4;\n          (*(code *)PTR_fclose_00053318)(iVar2);\n        }" { (expression_statement "puVar4 = (undefined4 *)(*(code *)PTR___errno_location_00053384)();" (assignment_expression "puVar4 = (undefined4 *)(*(code *)PTR___errno_location_00053384)()" identifier = (cast_expression "(undefined4 *)(*(code *)PTR___errno_location_00053384)()" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "(*(code *)PTR___errno_location_00053384)()" (parenthesized_expression "(*(code *)PTR___errno_location_00053384)" ( (pointer_expression "*(code *)PTR___errno_location_00053384" * (cast_expression "(code *)PTR___errno_location_00053384" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( ))))) ;) (expression_statement "uVar1 = *puVar4;" (assignment_expression "uVar1 = *puVar4" identifier = (pointer_expression "*puVar4" * identifier)) ;) (expression_statement "(*(code *)PTR_fclose_00053318)(iVar2);" (call_expression "(*(code *)PTR_fclose_00053318)(iVar2)" (parenthesized_expression "(*(code *)PTR_fclose_00053318)" ( (pointer_expression "*(code *)PTR_fclose_00053318" * (cast_expression "(code *)PTR_fclose_00053318" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(iVar2)" ( identifier ))) ;) }))) (expression_statement "(*(code *)PTR_remove_00053310)(param_2);" (call_expression "(*(code *)PTR_remove_00053310)(param_2)" (parenthesized_expression "(*(code *)PTR_remove_00053310)" ( (pointer_expression "*(code *)PTR_remove_00053310" * (cast_expression "(code *)PTR_remove_00053310" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(param_2)" ( identifier ))) ;) }))) (expression_statement "puVar5 = (undefined *)(*(code *)PTR_strerror_00053404)(uVar1);" (assignment_expression "puVar5 = (undefined *)(*(code *)PTR_strerror_00053404)(uVar1)" identifier = (cast_expression "(undefined *)(*(code *)PTR_strerror_00053404)(uVar1)" ( (type_descriptor "undefined *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "(*(code *)PTR_strerror_00053404)(uVar1)" (parenthesized_expression "(*(code *)PTR_strerror_00053404)" ( (pointer_expression "*(code *)PTR_strerror_00053404" * (cast_expression "(code *)PTR_strerror_00053404" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(uVar1)" ( identifier ))))) ;) }))) }) (else_clause "else {\n    puVar5 = PTR_s_nt_0005301c + 0x2074;\n  }" else (compound_statement "{\n    puVar5 = PTR_s_nt_0005301c + 0x2074;\n  }" { (expression_statement "puVar5 = PTR_s_nt_0005301c + 0x2074;" (assignment_expression "puVar5 = PTR_s_nt_0005301c + 0x2074" identifier = (binary_expression "PTR_s_nt_0005301c + 0x2074" identifier + number_literal)) ;) }))) (expression_statement "uVar1 = FUN_00019740(param_1,puVar5);" (assignment_expression "uVar1 = FUN_00019740(param_1,puVar5)" identifier = (call_expression "FUN_00019740(param_1,puVar5)" identifier (argument_list "(param_1,puVar5)" ( identifier , identifier )))) ;) (return_statement "return uVar1;" return identifier ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (return_statement return LIT ;) })) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) == LIT) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT == LIT) )) || (parenthesized_expression ( (binary_expression IDENT == LIT) ))) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( IDENT , (binary_expression IDENT + LIT) )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( ))))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( IDENT , IDENT , IDENT , IDENT , IDENT , IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( IDENT ))) ;) (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( IDENT ))) ;) (return_statement return LIT ;) })) (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT == LIT) )) && (parenthesized_expression ( (comma_expression (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( IDENT )))) , (binary_expression IDENT == LIT)) ))) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (return_statement return LIT ;) })) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( ))))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( ))))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( IDENT ))) ;) }))) (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( IDENT ))) ;) }))) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( IDENT ))))) ;) }))) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) }))) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT )))) ;) (return_statement return IDENT ;) })))
(function_definition "undefined4\npng_image_write_to_file\n          (int param_1,int param_2,undefined4 param_3,int param_4,undefined4 param_5,\n          undefined4 param_6)\n\n{\n  undefined4 uVar1;\n  int iVar2;\n  int iVar3;\n  undefined4 *puVar4;\n  undefined *puVar5;\n  \n  if (param_1 == 0) {\n    return 0;\n  }\n  if (*(int *)(param_1 + 4) == 1) {\n    if ((param_2 == 0) || (param_4 == 0)) {\n      puVar5 = PTR_s_nt_0005301c + 0x2048;\n    }\n    else {\n      iVar2 = (*(code *)PTR_fopen_000534f0)(param_2,PTR_s_nt_0005301c + 0x2044);\n      if (iVar2 == 0) {\n        puVar4 = (undefined4 *)(*(code *)PTR___errno_location_00053384)();\n        uVar1 = *puVar4;\n      }\n      else {\n        iVar3 = (*(code *)PTR_png_image_write_to_stdio_000532e0)\n                          (param_1,iVar2,param_3,param_4,param_5,param_6);\n        if (iVar3 == 0) {\n          (*(code *)PTR_fclose_00053318)(iVar2);\n          (*(code *)PTR_remove_00053310)(param_2);\n          return 0;\n        }\n        iVar3 = (*(code *)PTR_fflush_000534f4)(iVar2);\n        if ((iVar3 == 0) && (iVar3 = (*(code *)PTR_ferror_000534a8)(iVar2), iVar3 == 0)) {\n          iVar2 = (*(code *)PTR_fclose_00053318)(iVar2);\n          if (iVar2 == 0) {\n            return 1;\n          }\n          puVar4 = (undefined4 *)(*(code *)PTR___errno_location_00053384)();\n          uVar1 = *puVar4;\n        }\n        else {\n          puVar4 = (undefined4 *)(*(code *)PTR___errno_location_00053384)();\n          uVar1 = *puVar4;\n          (*(code *)PTR_fclose_00053318)(iVar2);\n        }\n        (*(code *)PTR_remove_00053310)(param_2);\n      }\n      puVar5 = (undefined *)(*(code *)PTR_strerror_00053404)(uVar1);\n    }\n  }\n  else {\n    puVar5 = PTR_s_nt_0005301c + 0x2074;\n  }\n  uVar1 = FUN_00019740(param_1,puVar5);\n  return uVar1;\n}" (type_identifier "undefined4") (function_declarator "png_image_write_to_file\n          (int param_1,int param_2,undefined4 param_3,int param_4,undefined4 param_5,\n          undefined4 param_6)" (identifier "png_image_write_to_file") (parameter_list "(int param_1,int param_2,undefined4 param_3,int param_4,undefined4 param_5,\n          undefined4 param_6)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) (, ",") (parameter_declaration "int param_2" (primitive_type "int") (identifier "param_2")) (, ",") (parameter_declaration "undefined4 param_3" (type_identifier "undefined4") (identifier "param_3")) (, ",") (parameter_declaration "int param_4" (primitive_type "int") (identifier "param_4")) (, ",") (parameter_declaration "undefined4 param_5" (type_identifier "undefined4") (identifier "param_5")) (, ",") (parameter_declaration "undefined4 param_6" (type_identifier "undefined4") (identifier "param_6")) () ")"))) (compound_statement "{\n  undefined4 uVar1;\n  int iVar2;\n  int iVar3;\n  undefined4 *puVar4;\n  undefined *puVar5;\n  \n  if (param_1 == 0) {\n    return 0;\n  }\n  if (*(int *)(param_1 + 4) == 1) {\n    if ((param_2 == 0) || (param_4 == 0)) {\n      puVar5 = PTR_s_nt_0005301c + 0x2048;\n    }\n    else {\n      iVar2 = (*(code *)PTR_fopen_000534f0)(param_2,PTR_s_nt_0005301c + 0x2044);\n      if (iVar2 == 0) {\n        puVar4 = (undefined4 *)(*(code *)PTR___errno_location_00053384)();\n        uVar1 = *puVar4;\n      }\n      else {\n        iVar3 = (*(code *)PTR_png_image_write_to_stdio_000532e0)\n                          (param_1,iVar2,param_3,param_4,param_5,param_6);\n        if (iVar3 == 0) {\n          (*(code *)PTR_fclose_00053318)(iVar2);\n          (*(code *)PTR_remove_00053310)(param_2);\n          return 0;\n        }\n        iVar3 = (*(code *)PTR_fflush_000534f4)(iVar2);\n        if ((iVar3 == 0) && (iVar3 = (*(code *)PTR_ferror_000534a8)(iVar2), iVar3 == 0)) {\n          iVar2 = (*(code *)PTR_fclose_00053318)(iVar2);\n          if (iVar2 == 0) {\n            return 1;\n          }\n          puVar4 = (undefined4 *)(*(code *)PTR___errno_location_00053384)();\n          uVar1 = *puVar4;\n        }\n        else {\n          puVar4 = (undefined4 *)(*(code *)PTR___errno_location_00053384)();\n          uVar1 = *puVar4;\n          (*(code *)PTR_fclose_00053318)(iVar2);\n        }\n        (*(code *)PTR_remove_00053310)(param_2);\n      }\n      puVar5 = (undefined *)(*(code *)PTR_strerror_00053404)(uVar1);\n    }\n  }\n  else {\n    puVar5 = PTR_s_nt_0005301c + 0x2074;\n  }\n  uVar1 = FUN_00019740(param_1,puVar5);\n  return uVar1;\n}" ({ "{") (declaration "undefined4 uVar1;" (type_identifier "undefined4") (identifier "uVar1") (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (declaration "int iVar3;" (primitive_type "int") (identifier "iVar3") (; ";")) (declaration "undefined4 *puVar4;" (type_identifier "undefined4") (pointer_declarator "*puVar4" (* "*") (identifier "puVar4")) (; ";")) (declaration "undefined *puVar5;" (type_identifier "undefined") (pointer_declarator "*puVar5" (* "*") (identifier "puVar5")) (; ";")) (if_statement "if (param_1 == 0) {\n    return 0;\n  }" (if "if") (parenthesized_expression "(param_1 == 0)" (( "(") (binary_expression "param_1 == 0" (identifier "param_1") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    return 0;\n  }" ({ "{") (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}"))) (if_statement "if (*(int *)(param_1 + 4) == 1) {\n    if ((param_2 == 0) || (param_4 == 0)) {\n      puVar5 = PTR_s_nt_0005301c + 0x2048;\n    }\n    else {\n      iVar2 = (*(code *)PTR_fopen_000534f0)(param_2,PTR_s_nt_0005301c + 0x2044);\n      if (iVar2 == 0) {\n        puVar4 = (undefined4 *)(*(code *)PTR___errno_location_00053384)();\n        uVar1 = *puVar4;\n      }\n      else {\n        iVar3 = (*(code *)PTR_png_image_write_to_stdio_000532e0)\n                          (param_1,iVar2,param_3,param_4,param_5,param_6);\n        if (iVar3 == 0) {\n          (*(code *)PTR_fclose_00053318)(iVar2);\n          (*(code *)PTR_remove_00053310)(param_2);\n          return 0;\n        }\n        iVar3 = (*(code *)PTR_fflush_000534f4)(iVar2);\n        if ((iVar3 == 0) && (iVar3 = (*(code *)PTR_ferror_000534a8)(iVar2), iVar3 == 0)) {\n          iVar2 = (*(code *)PTR_fclose_00053318)(iVar2);\n          if (iVar2 == 0) {\n            return 1;\n          }\n          puVar4 = (undefined4 *)(*(code *)PTR___errno_location_00053384)();\n          uVar1 = *puVar4;\n        }\n        else {\n          puVar4 = (undefined4 *)(*(code *)PTR___errno_location_00053384)();\n          uVar1 = *puVar4;\n          (*(code *)PTR_fclose_00053318)(iVar2);\n        }\n        (*(code *)PTR_remove_00053310)(param_2);\n      }\n      puVar5 = (undefined *)(*(code *)PTR_strerror_00053404)(uVar1);\n    }\n  }\n  else {\n    puVar5 = PTR_s_nt_0005301c + 0x2074;\n  }" (if "if") (parenthesized_expression "(*(int *)(param_1 + 4) == 1)" (( "(") (binary_expression "*(int *)(param_1 + 4) == 1" (pointer_expression "*(int *)(param_1 + 4)" (* "*") (cast_expression "(int *)(param_1 + 4)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 4)" (( "(") (binary_expression "param_1 + 4" (identifier "param_1") (+ "+") (number_literal "4")) () ")")))) (== "==") (number_literal "1")) () ")")) (compound_statement "{\n    if ((param_2 == 0) || (param_4 == 0)) {\n      puVar5 = PTR_s_nt_0005301c + 0x2048;\n    }\n    else {\n      iVar2 = (*(code *)PTR_fopen_000534f0)(param_2,PTR_s_nt_0005301c + 0x2044);\n      if (iVar2 == 0) {\n        puVar4 = (undefined4 *)(*(code *)PTR___errno_location_00053384)();\n        uVar1 = *puVar4;\n      }\n      else {\n        iVar3 = (*(code *)PTR_png_image_write_to_stdio_000532e0)\n                          (param_1,iVar2,param_3,param_4,param_5,param_6);\n        if (iVar3 == 0) {\n          (*(code *)PTR_fclose_00053318)(iVar2);\n          (*(code *)PTR_remove_00053310)(param_2);\n          return 0;\n        }\n        iVar3 = (*(code *)PTR_fflush_000534f4)(iVar2);\n        if ((iVar3 == 0) && (iVar3 = (*(code *)PTR_ferror_000534a8)(iVar2), iVar3 == 0)) {\n          iVar2 = (*(code *)PTR_fclose_00053318)(iVar2);\n          if (iVar2 == 0) {\n            return 1;\n          }\n          puVar4 = (undefined4 *)(*(code *)PTR___errno_location_00053384)();\n          uVar1 = *puVar4;\n        }\n        else {\n          puVar4 = (undefined4 *)(*(code *)PTR___errno_location_00053384)();\n          uVar1 = *puVar4;\n          (*(code *)PTR_fclose_00053318)(iVar2);\n        }\n        (*(code *)PTR_remove_00053310)(param_2);\n      }\n      puVar5 = (undefined *)(*(code *)PTR_strerror_00053404)(uVar1);\n    }\n  }" ({ "{") (if_statement "if ((param_2 == 0) || (param_4 == 0)) {\n      puVar5 = PTR_s_nt_0005301c + 0x2048;\n    }\n    else {\n      iVar2 = (*(code *)PTR_fopen_000534f0)(param_2,PTR_s_nt_0005301c + 0x2044);\n      if (iVar2 == 0) {\n        puVar4 = (undefined4 *)(*(code *)PTR___errno_location_00053384)();\n        uVar1 = *puVar4;\n      }\n      else {\n        iVar3 = (*(code *)PTR_png_image_write_to_stdio_000532e0)\n                          (param_1,iVar2,param_3,param_4,param_5,param_6);\n        if (iVar3 == 0) {\n          (*(code *)PTR_fclose_00053318)(iVar2);\n          (*(code *)PTR_remove_00053310)(param_2);\n          return 0;\n        }\n        iVar3 = (*(code *)PTR_fflush_000534f4)(iVar2);\n        if ((iVar3 == 0) && (iVar3 = (*(code *)PTR_ferror_000534a8)(iVar2), iVar3 == 0)) {\n          iVar2 = (*(code *)PTR_fclose_00053318)(iVar2);\n          if (iVar2 == 0) {\n            return 1;\n          }\n          puVar4 = (undefined4 *)(*(code *)PTR___errno_location_00053384)();\n          uVar1 = *puVar4;\n        }\n        else {\n          puVar4 = (undefined4 *)(*(code *)PTR___errno_location_00053384)();\n          uVar1 = *puVar4;\n          (*(code *)PTR_fclose_00053318)(iVar2);\n        }\n        (*(code *)PTR_remove_00053310)(param_2);\n      }\n      puVar5 = (undefined *)(*(code *)PTR_strerror_00053404)(uVar1);\n    }" (if "if") (parenthesized_expression "((param_2 == 0) || (param_4 == 0))" (( "(") (binary_expression "(param_2 == 0) || (param_4 == 0)" (parenthesized_expression "(param_2 == 0)" (( "(") (binary_expression "param_2 == 0" (identifier "param_2") (== "==") (number_literal "0")) () ")")) (|| "||") (parenthesized_expression "(param_4 == 0)" (( "(") (binary_expression "param_4 == 0" (identifier "param_4") (== "==") (number_literal "0")) () ")"))) () ")")) (compound_statement "{\n      puVar5 = PTR_s_nt_0005301c + 0x2048;\n    }" ({ "{") (expression_statement "puVar5 = PTR_s_nt_0005301c + 0x2048;" (assignment_expression "puVar5 = PTR_s_nt_0005301c + 0x2048" (identifier "puVar5") (= "=") (binary_expression "PTR_s_nt_0005301c + 0x2048" (identifier "PTR_s_nt_0005301c") (+ "+") (number_literal "0x2048"))) (; ";")) (} "}")) (else_clause "else {\n      iVar2 = (*(code *)PTR_fopen_000534f0)(param_2,PTR_s_nt_0005301c + 0x2044);\n      if (iVar2 == 0) {\n        puVar4 = (undefined4 *)(*(code *)PTR___errno_location_00053384)();\n        uVar1 = *puVar4;\n      }\n      else {\n        iVar3 = (*(code *)PTR_png_image_write_to_stdio_000532e0)\n                          (param_1,iVar2,param_3,param_4,param_5,param_6);\n        if (iVar3 == 0) {\n          (*(code *)PTR_fclose_00053318)(iVar2);\n          (*(code *)PTR_remove_00053310)(param_2);\n          return 0;\n        }\n        iVar3 = (*(code *)PTR_fflush_000534f4)(iVar2);\n        if ((iVar3 == 0) && (iVar3 = (*(code *)PTR_ferror_000534a8)(iVar2), iVar3 == 0)) {\n          iVar2 = (*(code *)PTR_fclose_00053318)(iVar2);\n          if (iVar2 == 0) {\n            return 1;\n          }\n          puVar4 = (undefined4 *)(*(code *)PTR___errno_location_00053384)();\n          uVar1 = *puVar4;\n        }\n        else {\n          puVar4 = (undefined4 *)(*(code *)PTR___errno_location_00053384)();\n          uVar1 = *puVar4;\n          (*(code *)PTR_fclose_00053318)(iVar2);\n        }\n        (*(code *)PTR_remove_00053310)(param_2);\n      }\n      puVar5 = (undefined *)(*(code *)PTR_strerror_00053404)(uVar1);\n    }" (else "else") (compound_statement "{\n      iVar2 = (*(code *)PTR_fopen_000534f0)(param_2,PTR_s_nt_0005301c + 0x2044);\n      if (iVar2 == 0) {\n        puVar4 = (undefined4 *)(*(code *)PTR___errno_location_00053384)();\n        uVar1 = *puVar4;\n      }\n      else {\n        iVar3 = (*(code *)PTR_png_image_write_to_stdio_000532e0)\n                          (param_1,iVar2,param_3,param_4,param_5,param_6);\n        if (iVar3 == 0) {\n          (*(code *)PTR_fclose_00053318)(iVar2);\n          (*(code *)PTR_remove_00053310)(param_2);\n          return 0;\n        }\n        iVar3 = (*(code *)PTR_fflush_000534f4)(iVar2);\n        if ((iVar3 == 0) && (iVar3 = (*(code *)PTR_ferror_000534a8)(iVar2), iVar3 == 0)) {\n          iVar2 = (*(code *)PTR_fclose_00053318)(iVar2);\n          if (iVar2 == 0) {\n            return 1;\n          }\n          puVar4 = (undefined4 *)(*(code *)PTR___errno_location_00053384)();\n          uVar1 = *puVar4;\n        }\n        else {\n          puVar4 = (undefined4 *)(*(code *)PTR___errno_location_00053384)();\n          uVar1 = *puVar4;\n          (*(code *)PTR_fclose_00053318)(iVar2);\n        }\n        (*(code *)PTR_remove_00053310)(param_2);\n      }\n      puVar5 = (undefined *)(*(code *)PTR_strerror_00053404)(uVar1);\n    }" ({ "{") (expression_statement "iVar2 = (*(code *)PTR_fopen_000534f0)(param_2,PTR_s_nt_0005301c + 0x2044);" (assignment_expression "iVar2 = (*(code *)PTR_fopen_000534f0)(param_2,PTR_s_nt_0005301c + 0x2044)" (identifier "iVar2") (= "=") (call_expression "(*(code *)PTR_fopen_000534f0)(param_2,PTR_s_nt_0005301c + 0x2044)" (parenthesized_expression "(*(code *)PTR_fopen_000534f0)" (( "(") (pointer_expression "*(code *)PTR_fopen_000534f0" (* "*") (cast_expression "(code *)PTR_fopen_000534f0" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_fopen_000534f0"))) () ")")) (argument_list "(param_2,PTR_s_nt_0005301c + 0x2044)" (( "(") (identifier "param_2") (, ",") (binary_expression "PTR_s_nt_0005301c + 0x2044" (identifier "PTR_s_nt_0005301c") (+ "+") (number_literal "0x2044")) () ")")))) (; ";")) (if_statement "if (iVar2 == 0) {\n        puVar4 = (undefined4 *)(*(code *)PTR___errno_location_00053384)();\n        uVar1 = *puVar4;\n      }\n      else {\n        iVar3 = (*(code *)PTR_png_image_write_to_stdio_000532e0)\n                          (param_1,iVar2,param_3,param_4,param_5,param_6);\n        if (iVar3 == 0) {\n          (*(code *)PTR_fclose_00053318)(iVar2);\n          (*(code *)PTR_remove_00053310)(param_2);\n          return 0;\n        }\n        iVar3 = (*(code *)PTR_fflush_000534f4)(iVar2);\n        if ((iVar3 == 0) && (iVar3 = (*(code *)PTR_ferror_000534a8)(iVar2), iVar3 == 0)) {\n          iVar2 = (*(code *)PTR_fclose_00053318)(iVar2);\n          if (iVar2 == 0) {\n            return 1;\n          }\n          puVar4 = (undefined4 *)(*(code *)PTR___errno_location_00053384)();\n          uVar1 = *puVar4;\n        }\n        else {\n          puVar4 = (undefined4 *)(*(code *)PTR___errno_location_00053384)();\n          uVar1 = *puVar4;\n          (*(code *)PTR_fclose_00053318)(iVar2);\n        }\n        (*(code *)PTR_remove_00053310)(param_2);\n      }" (if "if") (parenthesized_expression "(iVar2 == 0)" (( "(") (binary_expression "iVar2 == 0" (identifier "iVar2") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n        puVar4 = (undefined4 *)(*(code *)PTR___errno_location_00053384)();\n        uVar1 = *puVar4;\n      }" ({ "{") (expression_statement "puVar4 = (undefined4 *)(*(code *)PTR___errno_location_00053384)();" (assignment_expression "puVar4 = (undefined4 *)(*(code *)PTR___errno_location_00053384)()" (identifier "puVar4") (= "=") (cast_expression "(undefined4 *)(*(code *)PTR___errno_location_00053384)()" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "(*(code *)PTR___errno_location_00053384)()" (parenthesized_expression "(*(code *)PTR___errno_location_00053384)" (( "(") (pointer_expression "*(code *)PTR___errno_location_00053384" (* "*") (cast_expression "(code *)PTR___errno_location_00053384" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR___errno_location_00053384"))) () ")")) (argument_list "()" (( "(") () ")"))))) (; ";")) (expression_statement "uVar1 = *puVar4;" (assignment_expression "uVar1 = *puVar4" (identifier "uVar1") (= "=") (pointer_expression "*puVar4" (* "*") (identifier "puVar4"))) (; ";")) (} "}")) (else_clause "else {\n        iVar3 = (*(code *)PTR_png_image_write_to_stdio_000532e0)\n                          (param_1,iVar2,param_3,param_4,param_5,param_6);\n        if (iVar3 == 0) {\n          (*(code *)PTR_fclose_00053318)(iVar2);\n          (*(code *)PTR_remove_00053310)(param_2);\n          return 0;\n        }\n        iVar3 = (*(code *)PTR_fflush_000534f4)(iVar2);\n        if ((iVar3 == 0) && (iVar3 = (*(code *)PTR_ferror_000534a8)(iVar2), iVar3 == 0)) {\n          iVar2 = (*(code *)PTR_fclose_00053318)(iVar2);\n          if (iVar2 == 0) {\n            return 1;\n          }\n          puVar4 = (undefined4 *)(*(code *)PTR___errno_location_00053384)();\n          uVar1 = *puVar4;\n        }\n        else {\n          puVar4 = (undefined4 *)(*(code *)PTR___errno_location_00053384)();\n          uVar1 = *puVar4;\n          (*(code *)PTR_fclose_00053318)(iVar2);\n        }\n        (*(code *)PTR_remove_00053310)(param_2);\n      }" (else "else") (compound_statement "{\n        iVar3 = (*(code *)PTR_png_image_write_to_stdio_000532e0)\n                          (param_1,iVar2,param_3,param_4,param_5,param_6);\n        if (iVar3 == 0) {\n          (*(code *)PTR_fclose_00053318)(iVar2);\n          (*(code *)PTR_remove_00053310)(param_2);\n          return 0;\n        }\n        iVar3 = (*(code *)PTR_fflush_000534f4)(iVar2);\n        if ((iVar3 == 0) && (iVar3 = (*(code *)PTR_ferror_000534a8)(iVar2), iVar3 == 0)) {\n          iVar2 = (*(code *)PTR_fclose_00053318)(iVar2);\n          if (iVar2 == 0) {\n            return 1;\n          }\n          puVar4 = (undefined4 *)(*(code *)PTR___errno_location_00053384)();\n          uVar1 = *puVar4;\n        }\n        else {\n          puVar4 = (undefined4 *)(*(code *)PTR___errno_location_00053384)();\n          uVar1 = *puVar4;\n          (*(code *)PTR_fclose_00053318)(iVar2);\n        }\n        (*(code *)PTR_remove_00053310)(param_2);\n      }" ({ "{") (expression_statement "iVar3 = (*(code *)PTR_png_image_write_to_stdio_000532e0)\n                          (param_1,iVar2,param_3,param_4,param_5,param_6);" (assignment_expression "iVar3 = (*(code *)PTR_png_image_write_to_stdio_000532e0)\n                          (param_1,iVar2,param_3,param_4,param_5,param_6)" (identifier "iVar3") (= "=") (call_expression "(*(code *)PTR_png_image_write_to_stdio_000532e0)\n                          (param_1,iVar2,param_3,param_4,param_5,param_6)" (parenthesized_expression "(*(code *)PTR_png_image_write_to_stdio_000532e0)" (( "(") (pointer_expression "*(code *)PTR_png_image_write_to_stdio_000532e0" (* "*") (cast_expression "(code *)PTR_png_image_write_to_stdio_000532e0" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_png_image_write_to_stdio_000532e0"))) () ")")) (argument_list "(param_1,iVar2,param_3,param_4,param_5,param_6)" (( "(") (identifier "param_1") (, ",") (identifier "iVar2") (, ",") (identifier "param_3") (, ",") (identifier "param_4") (, ",") (identifier "param_5") (, ",") (identifier "param_6") () ")")))) (; ";")) (if_statement "if (iVar3 == 0) {\n          (*(code *)PTR_fclose_00053318)(iVar2);\n          (*(code *)PTR_remove_00053310)(param_2);\n          return 0;\n        }" (if "if") (parenthesized_expression "(iVar3 == 0)" (( "(") (binary_expression "iVar3 == 0" (identifier "iVar3") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n          (*(code *)PTR_fclose_00053318)(iVar2);\n          (*(code *)PTR_remove_00053310)(param_2);\n          return 0;\n        }" ({ "{") (expression_statement "(*(code *)PTR_fclose_00053318)(iVar2);" (call_expression "(*(code *)PTR_fclose_00053318)(iVar2)" (parenthesized_expression "(*(code *)PTR_fclose_00053318)" (( "(") (pointer_expression "*(code *)PTR_fclose_00053318" (* "*") (cast_expression "(code *)PTR_fclose_00053318" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_fclose_00053318"))) () ")")) (argument_list "(iVar2)" (( "(") (identifier "iVar2") () ")"))) (; ";")) (expression_statement "(*(code *)PTR_remove_00053310)(param_2);" (call_expression "(*(code *)PTR_remove_00053310)(param_2)" (parenthesized_expression "(*(code *)PTR_remove_00053310)" (( "(") (pointer_expression "*(code *)PTR_remove_00053310" (* "*") (cast_expression "(code *)PTR_remove_00053310" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_remove_00053310"))) () ")")) (argument_list "(param_2)" (( "(") (identifier "param_2") () ")"))) (; ";")) (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}"))) (expression_statement "iVar3 = (*(code *)PTR_fflush_000534f4)(iVar2);" (assignment_expression "iVar3 = (*(code *)PTR_fflush_000534f4)(iVar2)" (identifier "iVar3") (= "=") (call_expression "(*(code *)PTR_fflush_000534f4)(iVar2)" (parenthesized_expression "(*(code *)PTR_fflush_000534f4)" (( "(") (pointer_expression "*(code *)PTR_fflush_000534f4" (* "*") (cast_expression "(code *)PTR_fflush_000534f4" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_fflush_000534f4"))) () ")")) (argument_list "(iVar2)" (( "(") (identifier "iVar2") () ")")))) (; ";")) (if_statement "if ((iVar3 == 0) && (iVar3 = (*(code *)PTR_ferror_000534a8)(iVar2), iVar3 == 0)) {\n          iVar2 = (*(code *)PTR_fclose_00053318)(iVar2);\n          if (iVar2 == 0) {\n            return 1;\n          }\n          puVar4 = (undefined4 *)(*(code *)PTR___errno_location_00053384)();\n          uVar1 = *puVar4;\n        }\n        else {\n          puVar4 = (undefined4 *)(*(code *)PTR___errno_location_00053384)();\n          uVar1 = *puVar4;\n          (*(code *)PTR_fclose_00053318)(iVar2);\n        }" (if "if") (parenthesized_expression "((iVar3 == 0) && (iVar3 = (*(code *)PTR_ferror_000534a8)(iVar2), iVar3 == 0))" (( "(") (binary_expression "(iVar3 == 0) && (iVar3 = (*(code *)PTR_ferror_000534a8)(iVar2), iVar3 == 0)" (parenthesized_expression "(iVar3 == 0)" (( "(") (binary_expression "iVar3 == 0" (identifier "iVar3") (== "==") (number_literal "0")) () ")")) (&& "&&") (parenthesized_expression "(iVar3 = (*(code *)PTR_ferror_000534a8)(iVar2), iVar3 == 0)" (( "(") (comma_expression "iVar3 = (*(code *)PTR_ferror_000534a8)(iVar2), iVar3 == 0" (assignment_expression "iVar3 = (*(code *)PTR_ferror_000534a8)(iVar2)" (identifier "iVar3") (= "=") (call_expression "(*(code *)PTR_ferror_000534a8)(iVar2)" (parenthesized_expression "(*(code *)PTR_ferror_000534a8)" (( "(") (pointer_expression "*(code *)PTR_ferror_000534a8" (* "*") (cast_expression "(code *)PTR_ferror_000534a8" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_ferror_000534a8"))) () ")")) (argument_list "(iVar2)" (( "(") (identifier "iVar2") () ")")))) (, ",") (binary_expression "iVar3 == 0" (identifier "iVar3") (== "==") (number_literal "0"))) () ")"))) () ")")) (compound_statement "{\n          iVar2 = (*(code *)PTR_fclose_00053318)(iVar2);\n          if (iVar2 == 0) {\n            return 1;\n          }\n          puVar4 = (undefined4 *)(*(code *)PTR___errno_location_00053384)();\n          uVar1 = *puVar4;\n        }" ({ "{") (expression_statement "iVar2 = (*(code *)PTR_fclose_00053318)(iVar2);" (assignment_expression "iVar2 = (*(code *)PTR_fclose_00053318)(iVar2)" (identifier "iVar2") (= "=") (call_expression "(*(code *)PTR_fclose_00053318)(iVar2)" (parenthesized_expression "(*(code *)PTR_fclose_00053318)" (( "(") (pointer_expression "*(code *)PTR_fclose_00053318" (* "*") (cast_expression "(code *)PTR_fclose_00053318" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_fclose_00053318"))) () ")")) (argument_list "(iVar2)" (( "(") (identifier "iVar2") () ")")))) (; ";")) (if_statement "if (iVar2 == 0) {\n            return 1;\n          }" (if "if") (parenthesized_expression "(iVar2 == 0)" (( "(") (binary_expression "iVar2 == 0" (identifier "iVar2") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n            return 1;\n          }" ({ "{") (return_statement "return 1;" (return "return") (number_literal "1") (; ";")) (} "}"))) (expression_statement "puVar4 = (undefined4 *)(*(code *)PTR___errno_location_00053384)();" (assignment_expression "puVar4 = (undefined4 *)(*(code *)PTR___errno_location_00053384)()" (identifier "puVar4") (= "=") (cast_expression "(undefined4 *)(*(code *)PTR___errno_location_00053384)()" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "(*(code *)PTR___errno_location_00053384)()" (parenthesized_expression "(*(code *)PTR___errno_location_00053384)" (( "(") (pointer_expression "*(code *)PTR___errno_location_00053384" (* "*") (cast_expression "(code *)PTR___errno_location_00053384" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR___errno_location_00053384"))) () ")")) (argument_list "()" (( "(") () ")"))))) (; ";")) (expression_statement "uVar1 = *puVar4;" (assignment_expression "uVar1 = *puVar4" (identifier "uVar1") (= "=") (pointer_expression "*puVar4" (* "*") (identifier "puVar4"))) (; ";")) (} "}")) (else_clause "else {\n          puVar4 = (undefined4 *)(*(code *)PTR___errno_location_00053384)();\n          uVar1 = *puVar4;\n          (*(code *)PTR_fclose_00053318)(iVar2);\n        }" (else "else") (compound_statement "{\n          puVar4 = (undefined4 *)(*(code *)PTR___errno_location_00053384)();\n          uVar1 = *puVar4;\n          (*(code *)PTR_fclose_00053318)(iVar2);\n        }" ({ "{") (expression_statement "puVar4 = (undefined4 *)(*(code *)PTR___errno_location_00053384)();" (assignment_expression "puVar4 = (undefined4 *)(*(code *)PTR___errno_location_00053384)()" (identifier "puVar4") (= "=") (cast_expression "(undefined4 *)(*(code *)PTR___errno_location_00053384)()" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "(*(code *)PTR___errno_location_00053384)()" (parenthesized_expression "(*(code *)PTR___errno_location_00053384)" (( "(") (pointer_expression "*(code *)PTR___errno_location_00053384" (* "*") (cast_expression "(code *)PTR___errno_location_00053384" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR___errno_location_00053384"))) () ")")) (argument_list "()" (( "(") () ")"))))) (; ";")) (expression_statement "uVar1 = *puVar4;" (assignment_expression "uVar1 = *puVar4" (identifier "uVar1") (= "=") (pointer_expression "*puVar4" (* "*") (identifier "puVar4"))) (; ";")) (expression_statement "(*(code *)PTR_fclose_00053318)(iVar2);" (call_expression "(*(code *)PTR_fclose_00053318)(iVar2)" (parenthesized_expression "(*(code *)PTR_fclose_00053318)" (( "(") (pointer_expression "*(code *)PTR_fclose_00053318" (* "*") (cast_expression "(code *)PTR_fclose_00053318" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_fclose_00053318"))) () ")")) (argument_list "(iVar2)" (( "(") (identifier "iVar2") () ")"))) (; ";")) (} "}")))) (expression_statement "(*(code *)PTR_remove_00053310)(param_2);" (call_expression "(*(code *)PTR_remove_00053310)(param_2)" (parenthesized_expression "(*(code *)PTR_remove_00053310)" (( "(") (pointer_expression "*(code *)PTR_remove_00053310" (* "*") (cast_expression "(code *)PTR_remove_00053310" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_remove_00053310"))) () ")")) (argument_list "(param_2)" (( "(") (identifier "param_2") () ")"))) (; ";")) (} "}")))) (expression_statement "puVar5 = (undefined *)(*(code *)PTR_strerror_00053404)(uVar1);" (assignment_expression "puVar5 = (undefined *)(*(code *)PTR_strerror_00053404)(uVar1)" (identifier "puVar5") (= "=") (cast_expression "(undefined *)(*(code *)PTR_strerror_00053404)(uVar1)" (( "(") (type_descriptor "undefined *" (type_identifier "undefined") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "(*(code *)PTR_strerror_00053404)(uVar1)" (parenthesized_expression "(*(code *)PTR_strerror_00053404)" (( "(") (pointer_expression "*(code *)PTR_strerror_00053404" (* "*") (cast_expression "(code *)PTR_strerror_00053404" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_strerror_00053404"))) () ")")) (argument_list "(uVar1)" (( "(") (identifier "uVar1") () ")"))))) (; ";")) (} "}")))) (} "}")) (else_clause "else {\n    puVar5 = PTR_s_nt_0005301c + 0x2074;\n  }" (else "else") (compound_statement "{\n    puVar5 = PTR_s_nt_0005301c + 0x2074;\n  }" ({ "{") (expression_statement "puVar5 = PTR_s_nt_0005301c + 0x2074;" (assignment_expression "puVar5 = PTR_s_nt_0005301c + 0x2074" (identifier "puVar5") (= "=") (binary_expression "PTR_s_nt_0005301c + 0x2074" (identifier "PTR_s_nt_0005301c") (+ "+") (number_literal "0x2074"))) (; ";")) (} "}")))) (expression_statement "uVar1 = FUN_00019740(param_1,puVar5);" (assignment_expression "uVar1 = FUN_00019740(param_1,puVar5)" (identifier "uVar1") (= "=") (call_expression "FUN_00019740(param_1,puVar5)" (identifier "FUN_00019740") (argument_list "(param_1,puVar5)" (( "(") (identifier "param_1") (, ",") (identifier "puVar5") () ")")))) (; ";")) (return_statement "return uVar1;" (return "return") (identifier "uVar1") (; ";")) (} "}")))
(translation_unit (function_definition type: (type_identifier) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (primitive_type) declarator: (identifier)) (parameter_declaration type: (primitive_type) declarator: (identifier)) (parameter_declaration type: (type_identifier) declarator: (identifier)) (parameter_declaration type: (primitive_type) declarator: (identifier)) (parameter_declaration type: (type_identifier) declarator: (identifier)) (parameter_declaration type: (type_identifier) declarator: (identifier)))) body: (compound_statement (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (return_statement (number_literal)))) (if_statement condition: (parenthesized_expression (binary_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (number_literal))) consequence: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) right: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal))))) alternative: (else_clause (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (parenthesized_expression (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (identifier)))) arguments: (argument_list (identifier) (binary_expression left: (identifier) right: (number_literal)))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (call_expression function: (parenthesized_expression (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (identifier)))) arguments: (argument_list))))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (identifier))))) alternative: (else_clause (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (parenthesized_expression (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (identifier)))) arguments: (argument_list (identifier) (identifier) (identifier) (identifier) (identifier) (identifier))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (call_expression function: (parenthesized_expression (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (identifier)))) arguments: (argument_list (identifier)))) (expression_statement (call_expression function: (parenthesized_expression (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (identifier)))) arguments: (argument_list (identifier)))) (return_statement (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (parenthesized_expression (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (identifier)))) arguments: (argument_list (identifier))))) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) right: (parenthesized_expression (comma_expression left: (assignment_expression left: (identifier) right: (call_expression function: (parenthesized_expression (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (identifier)))) arguments: (argument_list (identifier)))) right: (binary_expression left: (identifier) right: (number_literal)))))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (parenthesized_expression (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (identifier)))) arguments: (argument_list (identifier))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (return_statement (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (call_expression function: (parenthesized_expression (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (identifier)))) arguments: (argument_list))))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (identifier))))) alternative: (else_clause (compound_statement (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (call_expression function: (parenthesized_expression (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (identifier)))) arguments: (argument_list))))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (identifier)))) (expression_statement (call_expression function: (parenthesized_expression (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (identifier)))) arguments: (argument_list (identifier))))))) (expression_statement (call_expression function: (parenthesized_expression (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (identifier)))) arguments: (argument_list (identifier))))))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (call_expression function: (parenthesized_expression (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (identifier)))) arguments: (argument_list (identifier)))))))))) alternative: (else_clause (compound_statement (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal))))))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier))))) (return_statement (identifier)))))

undefined4
MASKED
          (int param_1,int param_2,undefined4 param_3,int param_4,undefined4 param_5,
          undefined4 param_6)

{
  undefined4 uVar1;
  int iVar2;
  int iVar3;
  undefined4 *puVar4;
  undefined *puVar5;
  
  if (param_1 == 0) {
    return 0;
  }
  if (*(int *)(param_1 + 4) == 1) {
    if ((param_2 == 0) || (param_4 == 0)) {
      puVar5 = PTR_s_nt_0005301c + 0x2048;
    }
    else {
      iVar2 = (*(code *)PTR_fopen_000534f0)(param_2,PTR_s_nt_0005301c + 0x2044);
      if (iVar2 == 0) {
        puVar4 = (undefined4 *)(*(code *)PTR___errno_location_00053384)();
        uVar1 = *puVar4;
      }
      else {
        iVar3 = (*(code *)PTR_png_image_write_to_stdio_000532e0)
                          (param_1,iVar2,param_3,param_4,param_5,param_6);
        if (iVar3 == 0) {
          (*(code *)PTR_fclose_00053318)(iVar2);
          (*(code *)PTR_remove_00053310)(param_2);
          return 0;
        }
        iVar3 = (*(code *)PTR_fflush_000534f4)(iVar2);
        if ((iVar3 == 0) && (iVar3 = (*(code *)PTR_ferror_000534a8)(iVar2), iVar3 == 0)) {
          iVar2 = (*(code *)PTR_fclose_00053318)(iVar2);
          if (iVar2 == 0) {
            return 1;
          }
          puVar4 = (undefined4 *)(*(code *)PTR___errno_location_00053384)();
          uVar1 = *puVar4;
        }
        else {
          puVar4 = (undefined4 *)(*(code *)PTR___errno_location_00053384)();
          uVar1 = *puVar4;
          (*(code *)PTR_fclose_00053318)(iVar2);
        }
        (*(code *)PTR_remove_00053310)(param_2);
      }
      puVar5 = (undefined *)(*(code *)PTR_strerror_00053404)(uVar1);
    }
  }
  else {
    puVar5 = PTR_s_nt_0005301c + 0x2074;
  }
  uVar1 = FUN_00019740(param_1,puVar5);
  return uVar1;
}

