
void png_set_unknown_chunks
               (png_const_structrp png_ptr,png_inforp info_ptr,png_const_unknown_chunkp unknowns,
               int num_unknowns)

{
  byte bVar1;
  undefined *puVar2;
  png_unknown_chunkp ppVar3;
  png_byte pVar5;
  png_byte *ppVar4;
  png_alloc_size_t size;
  size_t sVar6;
  
  if (png_ptr == (png_const_structrp)0x0) {
    return;
  }
  if (((info_ptr != (png_inforp)0x0) && (0 < num_unknowns)) &&
     (unknowns != (png_const_unknown_chunkp)0x0)) {
    ppVar3 = (png_unknown_chunkp)
             png_realloc_array(png_ptr,info_ptr->unknown_chunks,info_ptr->unknown_chunks_num,
                               num_unknowns,0x14);
    if (ppVar3 == (png_unknown_chunkp)0x0) {
      png_chunk_report(png_ptr,PTR_s_nt_0005301c + 0x15a0,1);
      return;
    }
    (*(code *)PTR_png_free_00053324)(png_ptr,info_ptr->unknown_chunks);
    info_ptr->unknown_chunks = ppVar3;
    puVar2 = PTR_s_nt_0005301c;
    info_ptr->free_me = info_ptr->free_me | 0x200;
    ppVar3 = ppVar3 + info_ptr->unknown_chunks_num;
    do {
      bVar1 = unknowns->location;
      *(undefined4 *)ppVar3->name = *(undefined4 *)unknowns->name;
      ppVar3->name[4] = '\0';
      pVar5 = check_location(png_ptr,(uint)bVar1);
      size = unknowns->size;
      ppVar3->location = pVar5;
      if (size == 0) {
        ppVar3->data = (png_byte *)0x0;
        ppVar3->size = 0;
LAB_00033d14:
        ppVar3 = ppVar3 + 1;
        info_ptr->unknown_chunks_num = info_ptr->unknown_chunks_num + 1;
      }
      else {
        ppVar4 = (png_byte *)png_malloc_base(png_ptr,size);
        ppVar3->data = ppVar4;
        if (ppVar4 != (png_byte *)0x0) {
          sVar6 = unknowns->size;
          (*(code *)PTR_memcpy_000534c4)(ppVar4,unknowns->data,sVar6);
          ppVar3->size = sVar6;
          goto LAB_00033d14;
        }
        png_chunk_report(png_ptr,puVar2 + 0x15b8,1);
      }
      num_unknowns = num_unknowns + -1;
      unknowns = unknowns + 1;
    } while (num_unknowns != 0);
  }
  return;
}



void png_set_unknown_chunks(int param_1,int param_2,undefined4 *param_3,int param_4)

{
  undefined *puVar1;
  int iVar2;
  undefined1 uVar3;
  undefined4 *puVar4;
  undefined4 uVar5;
  
  if (param_1 == 0) {
    return;
  }
  if (((param_2 != 0) && (0 < param_4)) && (param_3 != (undefined4 *)0x0)) {
    iVar2 = FUN_0001c2ec(param_1,*(undefined4 *)(param_2 + 0xf8),*(undefined4 *)(param_2 + 0xfc),
                         param_4,0x14);
    if (iVar2 == 0) {
      FUN_0001a23c(param_1,PTR_s_nt_0005301c + 0x15a0,1);
      return;
    }
    (*(code *)PTR_png_free_00053324)(param_1,*(undefined4 *)(param_2 + 0xf8));
    *(int *)(param_2 + 0xf8) = iVar2;
    puVar1 = PTR_s_nt_0005301c;
    *(uint *)(param_2 + 0xf4) = *(uint *)(param_2 + 0xf4) | 0x200;
    puVar4 = (undefined4 *)(iVar2 + *(int *)(param_2 + 0xfc) * 0x14);
    do {
      uVar3 = *(undefined1 *)(param_3 + 4);
      *puVar4 = *param_3;
      *(undefined1 *)(puVar4 + 1) = 0;
      uVar3 = FUN_000315a0(param_1,uVar3);
      iVar2 = param_3[3];
      *(undefined1 *)(puVar4 + 4) = uVar3;
      if (iVar2 == 0) {
        puVar4[2] = 0;
        puVar4[3] = 0;
LAB_00033d14:
        puVar4 = puVar4 + 5;
        *(int *)(param_2 + 0xfc) = *(int *)(param_2 + 0xfc) + 1;
      }
      else {
        iVar2 = FUN_0001c240(param_1);
        puVar4[2] = iVar2;
        if (iVar2 != 0) {
          uVar5 = param_3[3];
          (*(code *)PTR_memcpy_000534c4)(iVar2,param_3[2],uVar5);
          puVar4[3] = uVar5;
          goto LAB_00033d14;
        }
        FUN_0001a23c(param_1,puVar1 + 0x15b8,1);
      }
      param_4 = param_4 + -1;
      param_3 = param_3 + 5;
    } while (param_4 != 0);
  }
  return;
}


lui gp,0x2
addiu gp,gp,0x73b0
addu gp,gp,t9
beq a0,zero,0x00033dc8
_nop
addiu sp,sp,-0x48
sw gp,0x18(sp)
sw s6,0x3c(sp)
or s6,a1,zero
sw ra,0x44(sp)
sw s7,0x40(sp)
sw s5,0x38(sp)
sw s4,0x34(sp)
sw s3,0x30(sp)
sw s2,0x2c(sp)
sw s1,0x28(sp)
beq a1,zero,0x00033d9c
_sw s0,0x24(sp)
blez a3,0x00033d9c
_or s2,a3,zero
beq a2,zero,0x00033d9c
_or s1,a2,zero
lw t9,-0x7ddc(gp)
li v0,0x14
lw a2,0xfc(a1)
or s3,a0,zero
lw a1,0xf8(a1)
bal 0x0001c2ec
_sw v0,0x10(sp)
lw gp,0x18(sp)
beq v0,zero,0x00033dec
_or s0,v0,zero
lw t9,-0x7ccc(gp)
or a0,s3,zero
jalr t9
_lw a1,0xf8(s6)
lw a0,0xfc(s6)
lw gp,0x18(sp)
lw v1,0xf4(s6)
sll v0,a0,0x2
sw s0,0xf8(s6)
addu v0,v0,a0
lw s4,-0x7e0c(gp)
lw s5,-0x7fd4(gp)
ori v1,v1,0x200
sll v0,v0,0x2
sw v1,0xf4(s6)
addiu s4,s4,0x15a0
addiu s5,s5,0x15b8
b 0x00033d30
_addu s0,s0,v0
sw zero,0x8(s0)
sw zero,0xc(s0)
lw v0,0xfc(s6)
addiu s0,s0,0x14
addiu v0,v0,0x1
sw v0,0xfc(s6)
addiu s2,s2,-0x1
beq s2,zero,0x00033d9c
_addiu s1,s1,0x14
lwl v0,0x0(s1)
or a0,s3,zero
lbu a1,0x10(s1)
or t9,s4,zero
lwr v0,0x3(s1)
swl v0,0x0(s0)
swr v0,0x3(s0)
bal 0x000315a0
_sb zero,0x4(s0)
lw a1,0xc(s1)
lw gp,0x18(sp)
beq a1,zero,0x00033d0c
_sb v0,0x10(s0)
lw t9,-0x7fb8(gp)
bal 0x0001c240
_or a0,s3,zero
lw gp,0x18(sp)
or a0,v0,zero
sw v0,0x8(s0)
beq v0,zero,0x00033dd0
_lw t9,-0x7b2c(gp)
lw s7,0xc(s1)
lw a1,0x8(s1)
jalr t9
_or a2,s7,zero
b 0x00033d14
_sw s7,0xc(s0)
lw ra,0x44(sp)
lw s7,0x40(sp)
lw s6,0x3c(sp)
lw s5,0x38(sp)
lw s4,0x34(sp)
lw s3,0x30(sp)
lw s2,0x2c(sp)
lw s1,0x28(sp)
lw s0,0x24(sp)
jr ra
_addiu sp,sp,0x48
jr ra
_nop
lw t9,-0x7fcc(gp)
li a2,0x1
or a1,s5,zero
bal 0x0001a23c
_or a0,s3,zero
b 0x00033d28
_addiu s2,s2,-0x1
lw a1,-0x7fd4(gp)
or a0,s3,zero
lw ra,0x44(sp)
li a2,0x1
lw s7,0x40(sp)
lw s6,0x3c(sp)
addiu a1,a1,0x15a0
lw s5,0x38(sp)
lw s4,0x34(sp)
lw s3,0x30(sp)
lw s2,0x2c(sp)
lw s1,0x28(sp)
lw s0,0x24(sp)
lw t9,-0x7fcc(gp)
b 0x0001a23c
_addiu sp,sp,0x48
(translation_unit "void png_set_unknown_chunks(int param_1,int param_2,undefined4 *param_3,int param_4)\n\n{\n  undefined *puVar1;\n  int iVar2;\n  undefined1 uVar3;\n  undefined4 *puVar4;\n  undefined4 uVar5;\n  \n  if (param_1 == 0) {\n    return;\n  }\n  if (((param_2 != 0) && (0 < param_4)) && (param_3 != (undefined4 *)0x0)) {\n    iVar2 = FUN_0001c2ec(param_1,*(undefined4 *)(param_2 + 0xf8),*(undefined4 *)(param_2 + 0xfc),\n                         param_4,0x14);\n    if (iVar2 == 0) {\n      FUN_0001a23c(param_1,PTR_s_nt_0005301c + 0x15a0,1);\n      return;\n    }\n    (*(code *)PTR_png_free_00053324)(param_1,*(undefined4 *)(param_2 + 0xf8));\n    *(int *)(param_2 + 0xf8) = iVar2;\n    puVar1 = PTR_s_nt_0005301c;\n    *(uint *)(param_2 + 0xf4) = *(uint *)(param_2 + 0xf4) | 0x200;\n    puVar4 = (undefined4 *)(iVar2 + *(int *)(param_2 + 0xfc) * 0x14);\n    do {\n      uVar3 = *(undefined1 *)(param_3 + 4);\n      *puVar4 = *param_3;\n      *(undefined1 *)(puVar4 + 1) = 0;\n      uVar3 = FUN_000315a0(param_1,uVar3);\n      iVar2 = param_3[3];\n      *(undefined1 *)(puVar4 + 4) = uVar3;\n      if (iVar2 == 0) {\n        puVar4[2] = 0;\n        puVar4[3] = 0;\nLAB_00033d14:\n        puVar4 = puVar4 + 5;\n        *(int *)(param_2 + 0xfc) = *(int *)(param_2 + 0xfc) + 1;\n      }\n      else {\n        iVar2 = FUN_0001c240(param_1);\n        puVar4[2] = iVar2;\n        if (iVar2 != 0) {\n          uVar5 = param_3[3];\n          (*(code *)PTR_memcpy_000534c4)(iVar2,param_3[2],uVar5);\n          puVar4[3] = uVar5;\n          goto LAB_00033d14;\n        }\n        FUN_0001a23c(param_1,puVar1 + 0x15b8,1);\n      }\n      param_4 = param_4 + -1;\n      param_3 = param_3 + 5;\n    } while (param_4 != 0);\n  }\n  return;\n}\n\n" (function_definition "void png_set_unknown_chunks(int param_1,int param_2,undefined4 *param_3,int param_4)\n\n{\n  undefined *puVar1;\n  int iVar2;\n  undefined1 uVar3;\n  undefined4 *puVar4;\n  undefined4 uVar5;\n  \n  if (param_1 == 0) {\n    return;\n  }\n  if (((param_2 != 0) && (0 < param_4)) && (param_3 != (undefined4 *)0x0)) {\n    iVar2 = FUN_0001c2ec(param_1,*(undefined4 *)(param_2 + 0xf8),*(undefined4 *)(param_2 + 0xfc),\n                         param_4,0x14);\n    if (iVar2 == 0) {\n      FUN_0001a23c(param_1,PTR_s_nt_0005301c + 0x15a0,1);\n      return;\n    }\n    (*(code *)PTR_png_free_00053324)(param_1,*(undefined4 *)(param_2 + 0xf8));\n    *(int *)(param_2 + 0xf8) = iVar2;\n    puVar1 = PTR_s_nt_0005301c;\n    *(uint *)(param_2 + 0xf4) = *(uint *)(param_2 + 0xf4) | 0x200;\n    puVar4 = (undefined4 *)(iVar2 + *(int *)(param_2 + 0xfc) * 0x14);\n    do {\n      uVar3 = *(undefined1 *)(param_3 + 4);\n      *puVar4 = *param_3;\n      *(undefined1 *)(puVar4 + 1) = 0;\n      uVar3 = FUN_000315a0(param_1,uVar3);\n      iVar2 = param_3[3];\n      *(undefined1 *)(puVar4 + 4) = uVar3;\n      if (iVar2 == 0) {\n        puVar4[2] = 0;\n        puVar4[3] = 0;\nLAB_00033d14:\n        puVar4 = puVar4 + 5;\n        *(int *)(param_2 + 0xfc) = *(int *)(param_2 + 0xfc) + 1;\n      }\n      else {\n        iVar2 = FUN_0001c240(param_1);\n        puVar4[2] = iVar2;\n        if (iVar2 != 0) {\n          uVar5 = param_3[3];\n          (*(code *)PTR_memcpy_000534c4)(iVar2,param_3[2],uVar5);\n          puVar4[3] = uVar5;\n          goto LAB_00033d14;\n        }\n        FUN_0001a23c(param_1,puVar1 + 0x15b8,1);\n      }\n      param_4 = param_4 + -1;\n      param_3 = param_3 + 5;\n    } while (param_4 != 0);\n  }\n  return;\n}" primitive_type (function_declarator "png_set_unknown_chunks(int param_1,int param_2,undefined4 *param_3,int param_4)" identifier (parameter_list "(int param_1,int param_2,undefined4 *param_3,int param_4)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "int param_2" primitive_type identifier) , (parameter_declaration "undefined4 *param_3" type_identifier (pointer_declarator "*param_3" * identifier)) , (parameter_declaration "int param_4" primitive_type identifier) ))) (compound_statement "{\n  undefined *puVar1;\n  int iVar2;\n  undefined1 uVar3;\n  undefined4 *puVar4;\n  undefined4 uVar5;\n  \n  if (param_1 == 0) {\n    return;\n  }\n  if (((param_2 != 0) && (0 < param_4)) && (param_3 != (undefined4 *)0x0)) {\n    iVar2 = FUN_0001c2ec(param_1,*(undefined4 *)(param_2 + 0xf8),*(undefined4 *)(param_2 + 0xfc),\n                         param_4,0x14);\n    if (iVar2 == 0) {\n      FUN_0001a23c(param_1,PTR_s_nt_0005301c + 0x15a0,1);\n      return;\n    }\n    (*(code *)PTR_png_free_00053324)(param_1,*(undefined4 *)(param_2 + 0xf8));\n    *(int *)(param_2 + 0xf8) = iVar2;\n    puVar1 = PTR_s_nt_0005301c;\n    *(uint *)(param_2 + 0xf4) = *(uint *)(param_2 + 0xf4) | 0x200;\n    puVar4 = (undefined4 *)(iVar2 + *(int *)(param_2 + 0xfc) * 0x14);\n    do {\n      uVar3 = *(undefined1 *)(param_3 + 4);\n      *puVar4 = *param_3;\n      *(undefined1 *)(puVar4 + 1) = 0;\n      uVar3 = FUN_000315a0(param_1,uVar3);\n      iVar2 = param_3[3];\n      *(undefined1 *)(puVar4 + 4) = uVar3;\n      if (iVar2 == 0) {\n        puVar4[2] = 0;\n        puVar4[3] = 0;\nLAB_00033d14:\n        puVar4 = puVar4 + 5;\n        *(int *)(param_2 + 0xfc) = *(int *)(param_2 + 0xfc) + 1;\n      }\n      else {\n        iVar2 = FUN_0001c240(param_1);\n        puVar4[2] = iVar2;\n        if (iVar2 != 0) {\n          uVar5 = param_3[3];\n          (*(code *)PTR_memcpy_000534c4)(iVar2,param_3[2],uVar5);\n          puVar4[3] = uVar5;\n          goto LAB_00033d14;\n        }\n        FUN_0001a23c(param_1,puVar1 + 0x15b8,1);\n      }\n      param_4 = param_4 + -1;\n      param_3 = param_3 + 5;\n    } while (param_4 != 0);\n  }\n  return;\n}" { (declaration "undefined *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "undefined1 uVar3;" type_identifier identifier ;) (declaration "undefined4 *puVar4;" type_identifier (pointer_declarator "*puVar4" * identifier) ;) (declaration "undefined4 uVar5;" type_identifier identifier ;) (if_statement "if (param_1 == 0) {\n    return;\n  }" if (parenthesized_expression "(param_1 == 0)" ( (binary_expression "param_1 == 0" identifier == number_literal) )) (compound_statement "{\n    return;\n  }" { (return_statement "return;" return ;) })) (if_statement "if (((param_2 != 0) && (0 < param_4)) && (param_3 != (undefined4 *)0x0)) {\n    iVar2 = FUN_0001c2ec(param_1,*(undefined4 *)(param_2 + 0xf8),*(undefined4 *)(param_2 + 0xfc),\n                         param_4,0x14);\n    if (iVar2 == 0) {\n      FUN_0001a23c(param_1,PTR_s_nt_0005301c + 0x15a0,1);\n      return;\n    }\n    (*(code *)PTR_png_free_00053324)(param_1,*(undefined4 *)(param_2 + 0xf8));\n    *(int *)(param_2 + 0xf8) = iVar2;\n    puVar1 = PTR_s_nt_0005301c;\n    *(uint *)(param_2 + 0xf4) = *(uint *)(param_2 + 0xf4) | 0x200;\n    puVar4 = (undefined4 *)(iVar2 + *(int *)(param_2 + 0xfc) * 0x14);\n    do {\n      uVar3 = *(undefined1 *)(param_3 + 4);\n      *puVar4 = *param_3;\n      *(undefined1 *)(puVar4 + 1) = 0;\n      uVar3 = FUN_000315a0(param_1,uVar3);\n      iVar2 = param_3[3];\n      *(undefined1 *)(puVar4 + 4) = uVar3;\n      if (iVar2 == 0) {\n        puVar4[2] = 0;\n        puVar4[3] = 0;\nLAB_00033d14:\n        puVar4 = puVar4 + 5;\n        *(int *)(param_2 + 0xfc) = *(int *)(param_2 + 0xfc) + 1;\n      }\n      else {\n        iVar2 = FUN_0001c240(param_1);\n        puVar4[2] = iVar2;\n        if (iVar2 != 0) {\n          uVar5 = param_3[3];\n          (*(code *)PTR_memcpy_000534c4)(iVar2,param_3[2],uVar5);\n          puVar4[3] = uVar5;\n          goto LAB_00033d14;\n        }\n        FUN_0001a23c(param_1,puVar1 + 0x15b8,1);\n      }\n      param_4 = param_4 + -1;\n      param_3 = param_3 + 5;\n    } while (param_4 != 0);\n  }" if (parenthesized_expression "(((param_2 != 0) && (0 < param_4)) && (param_3 != (undefined4 *)0x0))" ( (binary_expression "((param_2 != 0) && (0 < param_4)) && (param_3 != (undefined4 *)0x0)" (parenthesized_expression "((param_2 != 0) && (0 < param_4))" ( (binary_expression "(param_2 != 0) && (0 < param_4)" (parenthesized_expression "(param_2 != 0)" ( (binary_expression "param_2 != 0" identifier != number_literal) )) && (parenthesized_expression "(0 < param_4)" ( (binary_expression "0 < param_4" number_literal < identifier) ))) )) && (parenthesized_expression "(param_3 != (undefined4 *)0x0)" ( (binary_expression "param_3 != (undefined4 *)0x0" identifier != (cast_expression "(undefined4 *)0x0" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) ))) )) (compound_statement "{\n    iVar2 = FUN_0001c2ec(param_1,*(undefined4 *)(param_2 + 0xf8),*(undefined4 *)(param_2 + 0xfc),\n                         param_4,0x14);\n    if (iVar2 == 0) {\n      FUN_0001a23c(param_1,PTR_s_nt_0005301c + 0x15a0,1);\n      return;\n    }\n    (*(code *)PTR_png_free_00053324)(param_1,*(undefined4 *)(param_2 + 0xf8));\n    *(int *)(param_2 + 0xf8) = iVar2;\n    puVar1 = PTR_s_nt_0005301c;\n    *(uint *)(param_2 + 0xf4) = *(uint *)(param_2 + 0xf4) | 0x200;\n    puVar4 = (undefined4 *)(iVar2 + *(int *)(param_2 + 0xfc) * 0x14);\n    do {\n      uVar3 = *(undefined1 *)(param_3 + 4);\n      *puVar4 = *param_3;\n      *(undefined1 *)(puVar4 + 1) = 0;\n      uVar3 = FUN_000315a0(param_1,uVar3);\n      iVar2 = param_3[3];\n      *(undefined1 *)(puVar4 + 4) = uVar3;\n      if (iVar2 == 0) {\n        puVar4[2] = 0;\n        puVar4[3] = 0;\nLAB_00033d14:\n        puVar4 = puVar4 + 5;\n        *(int *)(param_2 + 0xfc) = *(int *)(param_2 + 0xfc) + 1;\n      }\n      else {\n        iVar2 = FUN_0001c240(param_1);\n        puVar4[2] = iVar2;\n        if (iVar2 != 0) {\n          uVar5 = param_3[3];\n          (*(code *)PTR_memcpy_000534c4)(iVar2,param_3[2],uVar5);\n          puVar4[3] = uVar5;\n          goto LAB_00033d14;\n        }\n        FUN_0001a23c(param_1,puVar1 + 0x15b8,1);\n      }\n      param_4 = param_4 + -1;\n      param_3 = param_3 + 5;\n    } while (param_4 != 0);\n  }" { (expression_statement "iVar2 = FUN_0001c2ec(param_1,*(undefined4 *)(param_2 + 0xf8),*(undefined4 *)(param_2 + 0xfc),\n                         param_4,0x14);" (assignment_expression "iVar2 = FUN_0001c2ec(param_1,*(undefined4 *)(param_2 + 0xf8),*(undefined4 *)(param_2 + 0xfc),\n                         param_4,0x14)" identifier = (call_expression "FUN_0001c2ec(param_1,*(undefined4 *)(param_2 + 0xf8),*(undefined4 *)(param_2 + 0xfc),\n                         param_4,0x14)" identifier (argument_list "(param_1,*(undefined4 *)(param_2 + 0xf8),*(undefined4 *)(param_2 + 0xfc),\n                         param_4,0x14)" ( identifier , (pointer_expression "*(undefined4 *)(param_2 + 0xf8)" * (cast_expression "(undefined4 *)(param_2 + 0xf8)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 0xf8)" ( (binary_expression "param_2 + 0xf8" identifier + number_literal) )))) , (pointer_expression "*(undefined4 *)(param_2 + 0xfc)" * (cast_expression "(undefined4 *)(param_2 + 0xfc)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 0xfc)" ( (binary_expression "param_2 + 0xfc" identifier + number_literal) )))) , identifier , number_literal )))) ;) (if_statement "if (iVar2 == 0) {\n      FUN_0001a23c(param_1,PTR_s_nt_0005301c + 0x15a0,1);\n      return;\n    }" if (parenthesized_expression "(iVar2 == 0)" ( (binary_expression "iVar2 == 0" identifier == number_literal) )) (compound_statement "{\n      FUN_0001a23c(param_1,PTR_s_nt_0005301c + 0x15a0,1);\n      return;\n    }" { (expression_statement "FUN_0001a23c(param_1,PTR_s_nt_0005301c + 0x15a0,1);" (call_expression "FUN_0001a23c(param_1,PTR_s_nt_0005301c + 0x15a0,1)" identifier (argument_list "(param_1,PTR_s_nt_0005301c + 0x15a0,1)" ( identifier , (binary_expression "PTR_s_nt_0005301c + 0x15a0" identifier + number_literal) , number_literal ))) ;) (return_statement "return;" return ;) })) (expression_statement "(*(code *)PTR_png_free_00053324)(param_1,*(undefined4 *)(param_2 + 0xf8));" (call_expression "(*(code *)PTR_png_free_00053324)(param_1,*(undefined4 *)(param_2 + 0xf8))" (parenthesized_expression "(*(code *)PTR_png_free_00053324)" ( (pointer_expression "*(code *)PTR_png_free_00053324" * (cast_expression "(code *)PTR_png_free_00053324" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(param_1,*(undefined4 *)(param_2 + 0xf8))" ( identifier , (pointer_expression "*(undefined4 *)(param_2 + 0xf8)" * (cast_expression "(undefined4 *)(param_2 + 0xf8)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 0xf8)" ( (binary_expression "param_2 + 0xf8" identifier + number_literal) )))) ))) ;) (expression_statement "*(int *)(param_2 + 0xf8) = iVar2;" (assignment_expression "*(int *)(param_2 + 0xf8) = iVar2" (pointer_expression "*(int *)(param_2 + 0xf8)" * (cast_expression "(int *)(param_2 + 0xf8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 0xf8)" ( (binary_expression "param_2 + 0xf8" identifier + number_literal) )))) = identifier) ;) (expression_statement "puVar1 = PTR_s_nt_0005301c;" (assignment_expression "puVar1 = PTR_s_nt_0005301c" identifier = identifier) ;) (expression_statement "*(uint *)(param_2 + 0xf4) = *(uint *)(param_2 + 0xf4) | 0x200;" (assignment_expression "*(uint *)(param_2 + 0xf4) = *(uint *)(param_2 + 0xf4) | 0x200" (pointer_expression "*(uint *)(param_2 + 0xf4)" * (cast_expression "(uint *)(param_2 + 0xf4)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 0xf4)" ( (binary_expression "param_2 + 0xf4" identifier + number_literal) )))) = (binary_expression "*(uint *)(param_2 + 0xf4) | 0x200" (pointer_expression "*(uint *)(param_2 + 0xf4)" * (cast_expression "(uint *)(param_2 + 0xf4)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 0xf4)" ( (binary_expression "param_2 + 0xf4" identifier + number_literal) )))) | number_literal)) ;) (expression_statement "puVar4 = (undefined4 *)(iVar2 + *(int *)(param_2 + 0xfc) * 0x14);" (assignment_expression "puVar4 = (undefined4 *)(iVar2 + *(int *)(param_2 + 0xfc) * 0x14)" identifier = (cast_expression "(undefined4 *)(iVar2 + *(int *)(param_2 + 0xfc) * 0x14)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + *(int *)(param_2 + 0xfc) * 0x14)" ( (binary_expression "iVar2 + *(int *)(param_2 + 0xfc) * 0x14" identifier + (binary_expression "*(int *)(param_2 + 0xfc) * 0x14" (pointer_expression "*(int *)(param_2 + 0xfc)" * (cast_expression "(int *)(param_2 + 0xfc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 0xfc)" ( (binary_expression "param_2 + 0xfc" identifier + number_literal) )))) * number_literal)) )))) ;) (do_statement "do {\n      uVar3 = *(undefined1 *)(param_3 + 4);\n      *puVar4 = *param_3;\n      *(undefined1 *)(puVar4 + 1) = 0;\n      uVar3 = FUN_000315a0(param_1,uVar3);\n      iVar2 = param_3[3];\n      *(undefined1 *)(puVar4 + 4) = uVar3;\n      if (iVar2 == 0) {\n        puVar4[2] = 0;\n        puVar4[3] = 0;\nLAB_00033d14:\n        puVar4 = puVar4 + 5;\n        *(int *)(param_2 + 0xfc) = *(int *)(param_2 + 0xfc) + 1;\n      }\n      else {\n        iVar2 = FUN_0001c240(param_1);\n        puVar4[2] = iVar2;\n        if (iVar2 != 0) {\n          uVar5 = param_3[3];\n          (*(code *)PTR_memcpy_000534c4)(iVar2,param_3[2],uVar5);\n          puVar4[3] = uVar5;\n          goto LAB_00033d14;\n        }\n        FUN_0001a23c(param_1,puVar1 + 0x15b8,1);\n      }\n      param_4 = param_4 + -1;\n      param_3 = param_3 + 5;\n    } while (param_4 != 0);" do (compound_statement "{\n      uVar3 = *(undefined1 *)(param_3 + 4);\n      *puVar4 = *param_3;\n      *(undefined1 *)(puVar4 + 1) = 0;\n      uVar3 = FUN_000315a0(param_1,uVar3);\n      iVar2 = param_3[3];\n      *(undefined1 *)(puVar4 + 4) = uVar3;\n      if (iVar2 == 0) {\n        puVar4[2] = 0;\n        puVar4[3] = 0;\nLAB_00033d14:\n        puVar4 = puVar4 + 5;\n        *(int *)(param_2 + 0xfc) = *(int *)(param_2 + 0xfc) + 1;\n      }\n      else {\n        iVar2 = FUN_0001c240(param_1);\n        puVar4[2] = iVar2;\n        if (iVar2 != 0) {\n          uVar5 = param_3[3];\n          (*(code *)PTR_memcpy_000534c4)(iVar2,param_3[2],uVar5);\n          puVar4[3] = uVar5;\n          goto LAB_00033d14;\n        }\n        FUN_0001a23c(param_1,puVar1 + 0x15b8,1);\n      }\n      param_4 = param_4 + -1;\n      param_3 = param_3 + 5;\n    }" { (expression_statement "uVar3 = *(undefined1 *)(param_3 + 4);" (assignment_expression "uVar3 = *(undefined1 *)(param_3 + 4)" identifier = (pointer_expression "*(undefined1 *)(param_3 + 4)" * (cast_expression "(undefined1 *)(param_3 + 4)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_3 + 4)" ( (binary_expression "param_3 + 4" identifier + number_literal) ))))) ;) (expression_statement "*puVar4 = *param_3;" (assignment_expression "*puVar4 = *param_3" (pointer_expression "*puVar4" * identifier) = (pointer_expression "*param_3" * identifier)) ;) (expression_statement "*(undefined1 *)(puVar4 + 1) = 0;" (assignment_expression "*(undefined1 *)(puVar4 + 1) = 0" (pointer_expression "*(undefined1 *)(puVar4 + 1)" * (cast_expression "(undefined1 *)(puVar4 + 1)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar4 + 1)" ( (binary_expression "puVar4 + 1" identifier + number_literal) )))) = number_literal) ;) (expression_statement "uVar3 = FUN_000315a0(param_1,uVar3);" (assignment_expression "uVar3 = FUN_000315a0(param_1,uVar3)" identifier = (call_expression "FUN_000315a0(param_1,uVar3)" identifier (argument_list "(param_1,uVar3)" ( identifier , identifier )))) ;) (expression_statement "iVar2 = param_3[3];" (assignment_expression "iVar2 = param_3[3]" identifier = (subscript_expression "param_3[3]" identifier [ number_literal ])) ;) (expression_statement "*(undefined1 *)(puVar4 + 4) = uVar3;" (assignment_expression "*(undefined1 *)(puVar4 + 4) = uVar3" (pointer_expression "*(undefined1 *)(puVar4 + 4)" * (cast_expression "(undefined1 *)(puVar4 + 4)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar4 + 4)" ( (binary_expression "puVar4 + 4" identifier + number_literal) )))) = identifier) ;) (if_statement "if (iVar2 == 0) {\n        puVar4[2] = 0;\n        puVar4[3] = 0;\nLAB_00033d14:\n        puVar4 = puVar4 + 5;\n        *(int *)(param_2 + 0xfc) = *(int *)(param_2 + 0xfc) + 1;\n      }\n      else {\n        iVar2 = FUN_0001c240(param_1);\n        puVar4[2] = iVar2;\n        if (iVar2 != 0) {\n          uVar5 = param_3[3];\n          (*(code *)PTR_memcpy_000534c4)(iVar2,param_3[2],uVar5);\n          puVar4[3] = uVar5;\n          goto LAB_00033d14;\n        }\n        FUN_0001a23c(param_1,puVar1 + 0x15b8,1);\n      }" if (parenthesized_expression "(iVar2 == 0)" ( (binary_expression "iVar2 == 0" identifier == number_literal) )) (compound_statement "{\n        puVar4[2] = 0;\n        puVar4[3] = 0;\nLAB_00033d14:\n        puVar4 = puVar4 + 5;\n        *(int *)(param_2 + 0xfc) = *(int *)(param_2 + 0xfc) + 1;\n      }" { (expression_statement "puVar4[2] = 0;" (assignment_expression "puVar4[2] = 0" (subscript_expression "puVar4[2]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "puVar4[3] = 0;" (assignment_expression "puVar4[3] = 0" (subscript_expression "puVar4[3]" identifier [ number_literal ]) = number_literal) ;) (labeled_statement "LAB_00033d14:\n        puVar4 = puVar4 + 5;" statement_identifier : (expression_statement "puVar4 = puVar4 + 5;" (assignment_expression "puVar4 = puVar4 + 5" identifier = (binary_expression "puVar4 + 5" identifier + number_literal)) ;)) (expression_statement "*(int *)(param_2 + 0xfc) = *(int *)(param_2 + 0xfc) + 1;" (assignment_expression "*(int *)(param_2 + 0xfc) = *(int *)(param_2 + 0xfc) + 1" (pointer_expression "*(int *)(param_2 + 0xfc)" * (cast_expression "(int *)(param_2 + 0xfc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 0xfc)" ( (binary_expression "param_2 + 0xfc" identifier + number_literal) )))) = (binary_expression "*(int *)(param_2 + 0xfc) + 1" (pointer_expression "*(int *)(param_2 + 0xfc)" * (cast_expression "(int *)(param_2 + 0xfc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 0xfc)" ( (binary_expression "param_2 + 0xfc" identifier + number_literal) )))) + number_literal)) ;) }) (else_clause "else {\n        iVar2 = FUN_0001c240(param_1);\n        puVar4[2] = iVar2;\n        if (iVar2 != 0) {\n          uVar5 = param_3[3];\n          (*(code *)PTR_memcpy_000534c4)(iVar2,param_3[2],uVar5);\n          puVar4[3] = uVar5;\n          goto LAB_00033d14;\n        }\n        FUN_0001a23c(param_1,puVar1 + 0x15b8,1);\n      }" else (compound_statement "{\n        iVar2 = FUN_0001c240(param_1);\n        puVar4[2] = iVar2;\n        if (iVar2 != 0) {\n          uVar5 = param_3[3];\n          (*(code *)PTR_memcpy_000534c4)(iVar2,param_3[2],uVar5);\n          puVar4[3] = uVar5;\n          goto LAB_00033d14;\n        }\n        FUN_0001a23c(param_1,puVar1 + 0x15b8,1);\n      }" { (expression_statement "iVar2 = FUN_0001c240(param_1);" (assignment_expression "iVar2 = FUN_0001c240(param_1)" identifier = (call_expression "FUN_0001c240(param_1)" identifier (argument_list "(param_1)" ( identifier )))) ;) (expression_statement "puVar4[2] = iVar2;" (assignment_expression "puVar4[2] = iVar2" (subscript_expression "puVar4[2]" identifier [ number_literal ]) = identifier) ;) (if_statement "if (iVar2 != 0) {\n          uVar5 = param_3[3];\n          (*(code *)PTR_memcpy_000534c4)(iVar2,param_3[2],uVar5);\n          puVar4[3] = uVar5;\n          goto LAB_00033d14;\n        }" if (parenthesized_expression "(iVar2 != 0)" ( (binary_expression "iVar2 != 0" identifier != number_literal) )) (compound_statement "{\n          uVar5 = param_3[3];\n          (*(code *)PTR_memcpy_000534c4)(iVar2,param_3[2],uVar5);\n          puVar4[3] = uVar5;\n          goto LAB_00033d14;\n        }" { (expression_statement "uVar5 = param_3[3];" (assignment_expression "uVar5 = param_3[3]" identifier = (subscript_expression "param_3[3]" identifier [ number_literal ])) ;) (expression_statement "(*(code *)PTR_memcpy_000534c4)(iVar2,param_3[2],uVar5);" (call_expression "(*(code *)PTR_memcpy_000534c4)(iVar2,param_3[2],uVar5)" (parenthesized_expression "(*(code *)PTR_memcpy_000534c4)" ( (pointer_expression "*(code *)PTR_memcpy_000534c4" * (cast_expression "(code *)PTR_memcpy_000534c4" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(iVar2,param_3[2],uVar5)" ( identifier , (subscript_expression "param_3[2]" identifier [ number_literal ]) , identifier ))) ;) (expression_statement "puVar4[3] = uVar5;" (assignment_expression "puVar4[3] = uVar5" (subscript_expression "puVar4[3]" identifier [ number_literal ]) = identifier) ;) (goto_statement "goto LAB_00033d14;" goto statement_identifier ;) })) (expression_statement "FUN_0001a23c(param_1,puVar1 + 0x15b8,1);" (call_expression "FUN_0001a23c(param_1,puVar1 + 0x15b8,1)" identifier (argument_list "(param_1,puVar1 + 0x15b8,1)" ( identifier , (binary_expression "puVar1 + 0x15b8" identifier + number_literal) , number_literal ))) ;) }))) (expression_statement "param_4 = param_4 + -1;" (assignment_expression "param_4 = param_4 + -1" identifier = (binary_expression "param_4 + -1" identifier + number_literal)) ;) (expression_statement "param_3 = param_3 + 5;" (assignment_expression "param_3 = param_3 + 5" identifier = (binary_expression "param_3 + 5" identifier + number_literal)) ;) }) while (parenthesized_expression "(param_4 != 0)" ( (binary_expression "param_4 != 0" identifier != number_literal) )) ;) })) (return_statement "return;" return ;) })))
(translation_unit "void png_set_unknown_chunks\n               (png_const_structrp png_ptr,png_inforp info_ptr,png_const_unknown_chunkp unknowns,\n               int num_unknowns)\n\n{\n  byte bVar1;\n  undefined *puVar2;\n  png_unknown_chunkp ppVar3;\n  png_byte pVar5;\n  png_byte *ppVar4;\n  png_alloc_size_t size;\n  size_t sVar6;\n  \n  if (png_ptr == (png_const_structrp)0x0) {\n    return;\n  }\n  if (((info_ptr != (png_inforp)0x0) && (0 < num_unknowns)) &&\n     (unknowns != (png_const_unknown_chunkp)0x0)) {\n    ppVar3 = (png_unknown_chunkp)\n             png_realloc_array(png_ptr,info_ptr->unknown_chunks,info_ptr->unknown_chunks_num,\n                               num_unknowns,0x14);\n    if (ppVar3 == (png_unknown_chunkp)0x0) {\n      png_chunk_report(png_ptr,PTR_s_nt_0005301c + 0x15a0,1);\n      return;\n    }\n    (*(code *)PTR_png_free_00053324)(png_ptr,info_ptr->unknown_chunks);\n    info_ptr->unknown_chunks = ppVar3;\n    puVar2 = PTR_s_nt_0005301c;\n    info_ptr->free_me = info_ptr->free_me | 0x200;\n    ppVar3 = ppVar3 + info_ptr->unknown_chunks_num;\n    do {\n      bVar1 = unknowns->location;\n      *(undefined4 *)ppVar3->name = *(undefined4 *)unknowns->name;\n      ppVar3->name[4] = '\0';\n      pVar5 = check_location(png_ptr,(uint)bVar1);\n      size = unknowns->size;\n      ppVar3->location = pVar5;\n      if (size == 0) {\n        ppVar3->data = (png_byte *)0x0;\n        ppVar3->size = 0;\nLAB_00033d14:\n        ppVar3 = ppVar3 + 1;\n        info_ptr->unknown_chunks_num = info_ptr->unknown_chunks_num + 1;\n      }\n      else {\n        ppVar4 = (png_byte *)png_malloc_base(png_ptr,size);\n        ppVar3->data = ppVar4;\n        if (ppVar4 != (png_byte *)0x0) {\n          sVar6 = unknowns->size;\n          (*(code *)PTR_memcpy_000534c4)(ppVar4,unknowns->data,sVar6);\n          ppVar3->size = sVar6;\n          goto LAB_00033d14;\n        }\n        png_chunk_report(png_ptr,puVar2 + 0x15b8,1);\n      }\n      num_unknowns = num_unknowns + -1;\n      unknowns = unknowns + 1;\n    } while (num_unknowns != 0);\n  }\n  return;\n}\n\n" (function_definition "void png_set_unknown_chunks\n               (png_const_structrp png_ptr,png_inforp info_ptr,png_const_unknown_chunkp unknowns,\n               int num_unknowns)\n\n{\n  byte bVar1;\n  undefined *puVar2;\n  png_unknown_chunkp ppVar3;\n  png_byte pVar5;\n  png_byte *ppVar4;\n  png_alloc_size_t size;\n  size_t sVar6;\n  \n  if (png_ptr == (png_const_structrp)0x0) {\n    return;\n  }\n  if (((info_ptr != (png_inforp)0x0) && (0 < num_unknowns)) &&\n     (unknowns != (png_const_unknown_chunkp)0x0)) {\n    ppVar3 = (png_unknown_chunkp)\n             png_realloc_array(png_ptr,info_ptr->unknown_chunks,info_ptr->unknown_chunks_num,\n                               num_unknowns,0x14);\n    if (ppVar3 == (png_unknown_chunkp)0x0) {\n      png_chunk_report(png_ptr,PTR_s_nt_0005301c + 0x15a0,1);\n      return;\n    }\n    (*(code *)PTR_png_free_00053324)(png_ptr,info_ptr->unknown_chunks);\n    info_ptr->unknown_chunks = ppVar3;\n    puVar2 = PTR_s_nt_0005301c;\n    info_ptr->free_me = info_ptr->free_me | 0x200;\n    ppVar3 = ppVar3 + info_ptr->unknown_chunks_num;\n    do {\n      bVar1 = unknowns->location;\n      *(undefined4 *)ppVar3->name = *(undefined4 *)unknowns->name;\n      ppVar3->name[4] = '\0';\n      pVar5 = check_location(png_ptr,(uint)bVar1);\n      size = unknowns->size;\n      ppVar3->location = pVar5;\n      if (size == 0) {\n        ppVar3->data = (png_byte *)0x0;\n        ppVar3->size = 0;\nLAB_00033d14:\n        ppVar3 = ppVar3 + 1;\n        info_ptr->unknown_chunks_num = info_ptr->unknown_chunks_num + 1;\n      }\n      else {\n        ppVar4 = (png_byte *)png_malloc_base(png_ptr,size);\n        ppVar3->data = ppVar4;\n        if (ppVar4 != (png_byte *)0x0) {\n          sVar6 = unknowns->size;\n          (*(code *)PTR_memcpy_000534c4)(ppVar4,unknowns->data,sVar6);\n          ppVar3->size = sVar6;\n          goto LAB_00033d14;\n        }\n        png_chunk_report(png_ptr,puVar2 + 0x15b8,1);\n      }\n      num_unknowns = num_unknowns + -1;\n      unknowns = unknowns + 1;\n    } while (num_unknowns != 0);\n  }\n  return;\n}" primitive_type (function_declarator "png_set_unknown_chunks\n               (png_const_structrp png_ptr,png_inforp info_ptr,png_const_unknown_chunkp unknowns,\n               int num_unknowns)" identifier (parameter_list "(png_const_structrp png_ptr,png_inforp info_ptr,png_const_unknown_chunkp unknowns,\n               int num_unknowns)" ( (parameter_declaration "png_const_structrp png_ptr" type_identifier identifier) , (parameter_declaration "png_inforp info_ptr" type_identifier identifier) , (parameter_declaration "png_const_unknown_chunkp unknowns" type_identifier identifier) , (parameter_declaration "int num_unknowns" primitive_type identifier) ))) (compound_statement "{\n  byte bVar1;\n  undefined *puVar2;\n  png_unknown_chunkp ppVar3;\n  png_byte pVar5;\n  png_byte *ppVar4;\n  png_alloc_size_t size;\n  size_t sVar6;\n  \n  if (png_ptr == (png_const_structrp)0x0) {\n    return;\n  }\n  if (((info_ptr != (png_inforp)0x0) && (0 < num_unknowns)) &&\n     (unknowns != (png_const_unknown_chunkp)0x0)) {\n    ppVar3 = (png_unknown_chunkp)\n             png_realloc_array(png_ptr,info_ptr->unknown_chunks,info_ptr->unknown_chunks_num,\n                               num_unknowns,0x14);\n    if (ppVar3 == (png_unknown_chunkp)0x0) {\n      png_chunk_report(png_ptr,PTR_s_nt_0005301c + 0x15a0,1);\n      return;\n    }\n    (*(code *)PTR_png_free_00053324)(png_ptr,info_ptr->unknown_chunks);\n    info_ptr->unknown_chunks = ppVar3;\n    puVar2 = PTR_s_nt_0005301c;\n    info_ptr->free_me = info_ptr->free_me | 0x200;\n    ppVar3 = ppVar3 + info_ptr->unknown_chunks_num;\n    do {\n      bVar1 = unknowns->location;\n      *(undefined4 *)ppVar3->name = *(undefined4 *)unknowns->name;\n      ppVar3->name[4] = '\0';\n      pVar5 = check_location(png_ptr,(uint)bVar1);\n      size = unknowns->size;\n      ppVar3->location = pVar5;\n      if (size == 0) {\n        ppVar3->data = (png_byte *)0x0;\n        ppVar3->size = 0;\nLAB_00033d14:\n        ppVar3 = ppVar3 + 1;\n        info_ptr->unknown_chunks_num = info_ptr->unknown_chunks_num + 1;\n      }\n      else {\n        ppVar4 = (png_byte *)png_malloc_base(png_ptr,size);\n        ppVar3->data = ppVar4;\n        if (ppVar4 != (png_byte *)0x0) {\n          sVar6 = unknowns->size;\n          (*(code *)PTR_memcpy_000534c4)(ppVar4,unknowns->data,sVar6);\n          ppVar3->size = sVar6;\n          goto LAB_00033d14;\n        }\n        png_chunk_report(png_ptr,puVar2 + 0x15b8,1);\n      }\n      num_unknowns = num_unknowns + -1;\n      unknowns = unknowns + 1;\n    } while (num_unknowns != 0);\n  }\n  return;\n}" { (declaration "byte bVar1;" type_identifier identifier ;) (declaration "undefined *puVar2;" type_identifier (pointer_declarator "*puVar2" * identifier) ;) (declaration "png_unknown_chunkp ppVar3;" type_identifier identifier ;) (declaration "png_byte pVar5;" type_identifier identifier ;) (declaration "png_byte *ppVar4;" type_identifier (pointer_declarator "*ppVar4" * identifier) ;) (declaration "png_alloc_size_t size;" type_identifier identifier ;) (declaration "size_t sVar6;" primitive_type identifier ;) (if_statement "if (png_ptr == (png_const_structrp)0x0) {\n    return;\n  }" if (parenthesized_expression "(png_ptr == (png_const_structrp)0x0)" ( (binary_expression "png_ptr == (png_const_structrp)0x0" identifier == (cast_expression "(png_const_structrp)0x0" ( (type_descriptor "png_const_structrp" type_identifier) ) number_literal)) )) (compound_statement "{\n    return;\n  }" { (return_statement "return;" return ;) })) (if_statement "if (((info_ptr != (png_inforp)0x0) && (0 < num_unknowns)) &&\n     (unknowns != (png_const_unknown_chunkp)0x0)) {\n    ppVar3 = (png_unknown_chunkp)\n             png_realloc_array(png_ptr,info_ptr->unknown_chunks,info_ptr->unknown_chunks_num,\n                               num_unknowns,0x14);\n    if (ppVar3 == (png_unknown_chunkp)0x0) {\n      png_chunk_report(png_ptr,PTR_s_nt_0005301c + 0x15a0,1);\n      return;\n    }\n    (*(code *)PTR_png_free_00053324)(png_ptr,info_ptr->unknown_chunks);\n    info_ptr->unknown_chunks = ppVar3;\n    puVar2 = PTR_s_nt_0005301c;\n    info_ptr->free_me = info_ptr->free_me | 0x200;\n    ppVar3 = ppVar3 + info_ptr->unknown_chunks_num;\n    do {\n      bVar1 = unknowns->location;\n      *(undefined4 *)ppVar3->name = *(undefined4 *)unknowns->name;\n      ppVar3->name[4] = '\0';\n      pVar5 = check_location(png_ptr,(uint)bVar1);\n      size = unknowns->size;\n      ppVar3->location = pVar5;\n      if (size == 0) {\n        ppVar3->data = (png_byte *)0x0;\n        ppVar3->size = 0;\nLAB_00033d14:\n        ppVar3 = ppVar3 + 1;\n        info_ptr->unknown_chunks_num = info_ptr->unknown_chunks_num + 1;\n      }\n      else {\n        ppVar4 = (png_byte *)png_malloc_base(png_ptr,size);\n        ppVar3->data = ppVar4;\n        if (ppVar4 != (png_byte *)0x0) {\n          sVar6 = unknowns->size;\n          (*(code *)PTR_memcpy_000534c4)(ppVar4,unknowns->data,sVar6);\n          ppVar3->size = sVar6;\n          goto LAB_00033d14;\n        }\n        png_chunk_report(png_ptr,puVar2 + 0x15b8,1);\n      }\n      num_unknowns = num_unknowns + -1;\n      unknowns = unknowns + 1;\n    } while (num_unknowns != 0);\n  }" if (parenthesized_expression "(((info_ptr != (png_inforp)0x0) && (0 < num_unknowns)) &&\n     (unknowns != (png_const_unknown_chunkp)0x0))" ( (binary_expression "((info_ptr != (png_inforp)0x0) && (0 < num_unknowns)) &&\n     (unknowns != (png_const_unknown_chunkp)0x0)" (parenthesized_expression "((info_ptr != (png_inforp)0x0) && (0 < num_unknowns))" ( (binary_expression "(info_ptr != (png_inforp)0x0) && (0 < num_unknowns)" (parenthesized_expression "(info_ptr != (png_inforp)0x0)" ( (binary_expression "info_ptr != (png_inforp)0x0" identifier != (cast_expression "(png_inforp)0x0" ( (type_descriptor "png_inforp" type_identifier) ) number_literal)) )) && (parenthesized_expression "(0 < num_unknowns)" ( (binary_expression "0 < num_unknowns" number_literal < identifier) ))) )) && (parenthesized_expression "(unknowns != (png_const_unknown_chunkp)0x0)" ( (binary_expression "unknowns != (png_const_unknown_chunkp)0x0" identifier != (cast_expression "(png_const_unknown_chunkp)0x0" ( (type_descriptor "png_const_unknown_chunkp" type_identifier) ) number_literal)) ))) )) (compound_statement "{\n    ppVar3 = (png_unknown_chunkp)\n             png_realloc_array(png_ptr,info_ptr->unknown_chunks,info_ptr->unknown_chunks_num,\n                               num_unknowns,0x14);\n    if (ppVar3 == (png_unknown_chunkp)0x0) {\n      png_chunk_report(png_ptr,PTR_s_nt_0005301c + 0x15a0,1);\n      return;\n    }\n    (*(code *)PTR_png_free_00053324)(png_ptr,info_ptr->unknown_chunks);\n    info_ptr->unknown_chunks = ppVar3;\n    puVar2 = PTR_s_nt_0005301c;\n    info_ptr->free_me = info_ptr->free_me | 0x200;\n    ppVar3 = ppVar3 + info_ptr->unknown_chunks_num;\n    do {\n      bVar1 = unknowns->location;\n      *(undefined4 *)ppVar3->name = *(undefined4 *)unknowns->name;\n      ppVar3->name[4] = '\0';\n      pVar5 = check_location(png_ptr,(uint)bVar1);\n      size = unknowns->size;\n      ppVar3->location = pVar5;\n      if (size == 0) {\n        ppVar3->data = (png_byte *)0x0;\n        ppVar3->size = 0;\nLAB_00033d14:\n        ppVar3 = ppVar3 + 1;\n        info_ptr->unknown_chunks_num = info_ptr->unknown_chunks_num + 1;\n      }\n      else {\n        ppVar4 = (png_byte *)png_malloc_base(png_ptr,size);\n        ppVar3->data = ppVar4;\n        if (ppVar4 != (png_byte *)0x0) {\n          sVar6 = unknowns->size;\n          (*(code *)PTR_memcpy_000534c4)(ppVar4,unknowns->data,sVar6);\n          ppVar3->size = sVar6;\n          goto LAB_00033d14;\n        }\n        png_chunk_report(png_ptr,puVar2 + 0x15b8,1);\n      }\n      num_unknowns = num_unknowns + -1;\n      unknowns = unknowns + 1;\n    } while (num_unknowns != 0);\n  }" { (expression_statement "ppVar3 = (png_unknown_chunkp)\n             png_realloc_array(png_ptr,info_ptr->unknown_chunks,info_ptr->unknown_chunks_num,\n                               num_unknowns,0x14);" (assignment_expression "ppVar3 = (png_unknown_chunkp)\n             png_realloc_array(png_ptr,info_ptr->unknown_chunks,info_ptr->unknown_chunks_num,\n                               num_unknowns,0x14)" identifier = (cast_expression "(png_unknown_chunkp)\n             png_realloc_array(png_ptr,info_ptr->unknown_chunks,info_ptr->unknown_chunks_num,\n                               num_unknowns,0x14)" ( (type_descriptor "png_unknown_chunkp" type_identifier) ) (call_expression "png_realloc_array(png_ptr,info_ptr->unknown_chunks,info_ptr->unknown_chunks_num,\n                               num_unknowns,0x14)" identifier (argument_list "(png_ptr,info_ptr->unknown_chunks,info_ptr->unknown_chunks_num,\n                               num_unknowns,0x14)" ( identifier , (field_expression "info_ptr->unknown_chunks" identifier -> field_identifier) , (field_expression "info_ptr->unknown_chunks_num" identifier -> field_identifier) , identifier , number_literal ))))) ;) (if_statement "if (ppVar3 == (png_unknown_chunkp)0x0) {\n      png_chunk_report(png_ptr,PTR_s_nt_0005301c + 0x15a0,1);\n      return;\n    }" if (parenthesized_expression "(ppVar3 == (png_unknown_chunkp)0x0)" ( (binary_expression "ppVar3 == (png_unknown_chunkp)0x0" identifier == (cast_expression "(png_unknown_chunkp)0x0" ( (type_descriptor "png_unknown_chunkp" type_identifier) ) number_literal)) )) (compound_statement "{\n      png_chunk_report(png_ptr,PTR_s_nt_0005301c + 0x15a0,1);\n      return;\n    }" { (expression_statement "png_chunk_report(png_ptr,PTR_s_nt_0005301c + 0x15a0,1);" (call_expression "png_chunk_report(png_ptr,PTR_s_nt_0005301c + 0x15a0,1)" identifier (argument_list "(png_ptr,PTR_s_nt_0005301c + 0x15a0,1)" ( identifier , (binary_expression "PTR_s_nt_0005301c + 0x15a0" identifier + number_literal) , number_literal ))) ;) (return_statement "return;" return ;) })) (expression_statement "(*(code *)PTR_png_free_00053324)(png_ptr,info_ptr->unknown_chunks);" (call_expression "(*(code *)PTR_png_free_00053324)(png_ptr,info_ptr->unknown_chunks)" (parenthesized_expression "(*(code *)PTR_png_free_00053324)" ( (pointer_expression "*(code *)PTR_png_free_00053324" * (cast_expression "(code *)PTR_png_free_00053324" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(png_ptr,info_ptr->unknown_chunks)" ( identifier , (field_expression "info_ptr->unknown_chunks" identifier -> field_identifier) ))) ;) (expression_statement "info_ptr->unknown_chunks = ppVar3;" (assignment_expression "info_ptr->unknown_chunks = ppVar3" (field_expression "info_ptr->unknown_chunks" identifier -> field_identifier) = identifier) ;) (expression_statement "puVar2 = PTR_s_nt_0005301c;" (assignment_expression "puVar2 = PTR_s_nt_0005301c" identifier = identifier) ;) (expression_statement "info_ptr->free_me = info_ptr->free_me | 0x200;" (assignment_expression "info_ptr->free_me = info_ptr->free_me | 0x200" (field_expression "info_ptr->free_me" identifier -> field_identifier) = (binary_expression "info_ptr->free_me | 0x200" (field_expression "info_ptr->free_me" identifier -> field_identifier) | number_literal)) ;) (expression_statement "ppVar3 = ppVar3 + info_ptr->unknown_chunks_num;" (assignment_expression "ppVar3 = ppVar3 + info_ptr->unknown_chunks_num" identifier = (binary_expression "ppVar3 + info_ptr->unknown_chunks_num" identifier + (field_expression "info_ptr->unknown_chunks_num" identifier -> field_identifier))) ;) (do_statement "do {\n      bVar1 = unknowns->location;\n      *(undefined4 *)ppVar3->name = *(undefined4 *)unknowns->name;\n      ppVar3->name[4] = '\0';\n      pVar5 = check_location(png_ptr,(uint)bVar1);\n      size = unknowns->size;\n      ppVar3->location = pVar5;\n      if (size == 0) {\n        ppVar3->data = (png_byte *)0x0;\n        ppVar3->size = 0;\nLAB_00033d14:\n        ppVar3 = ppVar3 + 1;\n        info_ptr->unknown_chunks_num = info_ptr->unknown_chunks_num + 1;\n      }\n      else {\n        ppVar4 = (png_byte *)png_malloc_base(png_ptr,size);\n        ppVar3->data = ppVar4;\n        if (ppVar4 != (png_byte *)0x0) {\n          sVar6 = unknowns->size;\n          (*(code *)PTR_memcpy_000534c4)(ppVar4,unknowns->data,sVar6);\n          ppVar3->size = sVar6;\n          goto LAB_00033d14;\n        }\n        png_chunk_report(png_ptr,puVar2 + 0x15b8,1);\n      }\n      num_unknowns = num_unknowns + -1;\n      unknowns = unknowns + 1;\n    } while (num_unknowns != 0);" do (compound_statement "{\n      bVar1 = unknowns->location;\n      *(undefined4 *)ppVar3->name = *(undefined4 *)unknowns->name;\n      ppVar3->name[4] = '\0';\n      pVar5 = check_location(png_ptr,(uint)bVar1);\n      size = unknowns->size;\n      ppVar3->location = pVar5;\n      if (size == 0) {\n        ppVar3->data = (png_byte *)0x0;\n        ppVar3->size = 0;\nLAB_00033d14:\n        ppVar3 = ppVar3 + 1;\n        info_ptr->unknown_chunks_num = info_ptr->unknown_chunks_num + 1;\n      }\n      else {\n        ppVar4 = (png_byte *)png_malloc_base(png_ptr,size);\n        ppVar3->data = ppVar4;\n        if (ppVar4 != (png_byte *)0x0) {\n          sVar6 = unknowns->size;\n          (*(code *)PTR_memcpy_000534c4)(ppVar4,unknowns->data,sVar6);\n          ppVar3->size = sVar6;\n          goto LAB_00033d14;\n        }\n        png_chunk_report(png_ptr,puVar2 + 0x15b8,1);\n      }\n      num_unknowns = num_unknowns + -1;\n      unknowns = unknowns + 1;\n    }" { (expression_statement "bVar1 = unknowns->location;" (assignment_expression "bVar1 = unknowns->location" identifier = (field_expression "unknowns->location" identifier -> field_identifier)) ;) (expression_statement "*(undefined4 *)ppVar3->name = *(undefined4 *)unknowns->name;" (assignment_expression "*(undefined4 *)ppVar3->name = *(undefined4 *)unknowns->name" (pointer_expression "*(undefined4 *)ppVar3->name" * (cast_expression "(undefined4 *)ppVar3->name" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (field_expression "ppVar3->name" identifier -> field_identifier))) = (pointer_expression "*(undefined4 *)unknowns->name" * (cast_expression "(undefined4 *)unknowns->name" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (field_expression "unknowns->name" identifier -> field_identifier)))) ;) (expression_statement "ppVar3->name[4] = '\0';" (assignment_expression "ppVar3->name[4] = '\0'" (subscript_expression "ppVar3->name[4]" (field_expression "ppVar3->name" identifier -> field_identifier) [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "pVar5 = check_location(png_ptr,(uint)bVar1);" (assignment_expression "pVar5 = check_location(png_ptr,(uint)bVar1)" identifier = (call_expression "check_location(png_ptr,(uint)bVar1)" identifier (argument_list "(png_ptr,(uint)bVar1)" ( identifier , (cast_expression "(uint)bVar1" ( (type_descriptor "uint" type_identifier) ) identifier) )))) ;) (expression_statement "size = unknowns->size;" (assignment_expression "size = unknowns->size" identifier = (field_expression "unknowns->size" identifier -> field_identifier)) ;) (expression_statement "ppVar3->location = pVar5;" (assignment_expression "ppVar3->location = pVar5" (field_expression "ppVar3->location" identifier -> field_identifier) = identifier) ;) (if_statement "if (size == 0) {\n        ppVar3->data = (png_byte *)0x0;\n        ppVar3->size = 0;\nLAB_00033d14:\n        ppVar3 = ppVar3 + 1;\n        info_ptr->unknown_chunks_num = info_ptr->unknown_chunks_num + 1;\n      }\n      else {\n        ppVar4 = (png_byte *)png_malloc_base(png_ptr,size);\n        ppVar3->data = ppVar4;\n        if (ppVar4 != (png_byte *)0x0) {\n          sVar6 = unknowns->size;\n          (*(code *)PTR_memcpy_000534c4)(ppVar4,unknowns->data,sVar6);\n          ppVar3->size = sVar6;\n          goto LAB_00033d14;\n        }\n        png_chunk_report(png_ptr,puVar2 + 0x15b8,1);\n      }" if (parenthesized_expression "(size == 0)" ( (binary_expression "size == 0" identifier == number_literal) )) (compound_statement "{\n        ppVar3->data = (png_byte *)0x0;\n        ppVar3->size = 0;\nLAB_00033d14:\n        ppVar3 = ppVar3 + 1;\n        info_ptr->unknown_chunks_num = info_ptr->unknown_chunks_num + 1;\n      }" { (expression_statement "ppVar3->data = (png_byte *)0x0;" (assignment_expression "ppVar3->data = (png_byte *)0x0" (field_expression "ppVar3->data" identifier -> field_identifier) = (cast_expression "(png_byte *)0x0" ( (type_descriptor "png_byte *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (expression_statement "ppVar3->size = 0;" (assignment_expression "ppVar3->size = 0" (field_expression "ppVar3->size" identifier -> field_identifier) = number_literal) ;) (labeled_statement "LAB_00033d14:\n        ppVar3 = ppVar3 + 1;" statement_identifier : (expression_statement "ppVar3 = ppVar3 + 1;" (assignment_expression "ppVar3 = ppVar3 + 1" identifier = (binary_expression "ppVar3 + 1" identifier + number_literal)) ;)) (expression_statement "info_ptr->unknown_chunks_num = info_ptr->unknown_chunks_num + 1;" (assignment_expression "info_ptr->unknown_chunks_num = info_ptr->unknown_chunks_num + 1" (field_expression "info_ptr->unknown_chunks_num" identifier -> field_identifier) = (binary_expression "info_ptr->unknown_chunks_num + 1" (field_expression "info_ptr->unknown_chunks_num" identifier -> field_identifier) + number_literal)) ;) }) (else_clause "else {\n        ppVar4 = (png_byte *)png_malloc_base(png_ptr,size);\n        ppVar3->data = ppVar4;\n        if (ppVar4 != (png_byte *)0x0) {\n          sVar6 = unknowns->size;\n          (*(code *)PTR_memcpy_000534c4)(ppVar4,unknowns->data,sVar6);\n          ppVar3->size = sVar6;\n          goto LAB_00033d14;\n        }\n        png_chunk_report(png_ptr,puVar2 + 0x15b8,1);\n      }" else (compound_statement "{\n        ppVar4 = (png_byte *)png_malloc_base(png_ptr,size);\n        ppVar3->data = ppVar4;\n        if (ppVar4 != (png_byte *)0x0) {\n          sVar6 = unknowns->size;\n          (*(code *)PTR_memcpy_000534c4)(ppVar4,unknowns->data,sVar6);\n          ppVar3->size = sVar6;\n          goto LAB_00033d14;\n        }\n        png_chunk_report(png_ptr,puVar2 + 0x15b8,1);\n      }" { (expression_statement "ppVar4 = (png_byte *)png_malloc_base(png_ptr,size);" (assignment_expression "ppVar4 = (png_byte *)png_malloc_base(png_ptr,size)" identifier = (cast_expression "(png_byte *)png_malloc_base(png_ptr,size)" ( (type_descriptor "png_byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "png_malloc_base(png_ptr,size)" identifier (argument_list "(png_ptr,size)" ( identifier , identifier ))))) ;) (expression_statement "ppVar3->data = ppVar4;" (assignment_expression "ppVar3->data = ppVar4" (field_expression "ppVar3->data" identifier -> field_identifier) = identifier) ;) (if_statement "if (ppVar4 != (png_byte *)0x0) {\n          sVar6 = unknowns->size;\n          (*(code *)PTR_memcpy_000534c4)(ppVar4,unknowns->data,sVar6);\n          ppVar3->size = sVar6;\n          goto LAB_00033d14;\n        }" if (parenthesized_expression "(ppVar4 != (png_byte *)0x0)" ( (binary_expression "ppVar4 != (png_byte *)0x0" identifier != (cast_expression "(png_byte *)0x0" ( (type_descriptor "png_byte *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n          sVar6 = unknowns->size;\n          (*(code *)PTR_memcpy_000534c4)(ppVar4,unknowns->data,sVar6);\n          ppVar3->size = sVar6;\n          goto LAB_00033d14;\n        }" { (expression_statement "sVar6 = unknowns->size;" (assignment_expression "sVar6 = unknowns->size" identifier = (field_expression "unknowns->size" identifier -> field_identifier)) ;) (expression_statement "(*(code *)PTR_memcpy_000534c4)(ppVar4,unknowns->data,sVar6);" (call_expression "(*(code *)PTR_memcpy_000534c4)(ppVar4,unknowns->data,sVar6)" (parenthesized_expression "(*(code *)PTR_memcpy_000534c4)" ( (pointer_expression "*(code *)PTR_memcpy_000534c4" * (cast_expression "(code *)PTR_memcpy_000534c4" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(ppVar4,unknowns->data,sVar6)" ( identifier , (field_expression "unknowns->data" identifier -> field_identifier) , identifier ))) ;) (expression_statement "ppVar3->size = sVar6;" (assignment_expression "ppVar3->size = sVar6" (field_expression "ppVar3->size" identifier -> field_identifier) = identifier) ;) (goto_statement "goto LAB_00033d14;" goto statement_identifier ;) })) (expression_statement "png_chunk_report(png_ptr,puVar2 + 0x15b8,1);" (call_expression "png_chunk_report(png_ptr,puVar2 + 0x15b8,1)" identifier (argument_list "(png_ptr,puVar2 + 0x15b8,1)" ( identifier , (binary_expression "puVar2 + 0x15b8" identifier + number_literal) , number_literal ))) ;) }))) (expression_statement "num_unknowns = num_unknowns + -1;" (assignment_expression "num_unknowns = num_unknowns + -1" identifier = (binary_expression "num_unknowns + -1" identifier + number_literal)) ;) (expression_statement "unknowns = unknowns + 1;" (assignment_expression "unknowns = unknowns + 1" identifier = (binary_expression "unknowns + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(num_unknowns != 0)" ( (binary_expression "num_unknowns != 0" identifier != number_literal) )) ;) })) (return_statement "return;" return ;) })))
(translation_unit "void png_set_unknown_chunks(int param_1,int param_2,undefined4 *param_3,int param_4)\n\n{\n  undefined *puVar1;\n  int iVar2;\n  undefined1 uVar3;\n  undefined4 *puVar4;\n  undefined4 uVar5;\n  \n  if (param_1 == 0) {\n    return;\n  }\n  if (((param_2 != 0) && (0 < param_4)) && (param_3 != (undefined4 *)0x0)) {\n    iVar2 = FUN_0001c2ec(param_1,*(undefined4 *)(param_2 + 0xf8),*(undefined4 *)(param_2 + 0xfc),\n                         param_4,0x14);\n    if (iVar2 == 0) {\n      FUN_0001a23c(param_1,PTR_s_nt_0005301c + 0x15a0,1);\n      return;\n    }\n    (*(code *)PTR_png_free_00053324)(param_1,*(undefined4 *)(param_2 + 0xf8));\n    *(int *)(param_2 + 0xf8) = iVar2;\n    puVar1 = PTR_s_nt_0005301c;\n    *(uint *)(param_2 + 0xf4) = *(uint *)(param_2 + 0xf4) | 0x200;\n    puVar4 = (undefined4 *)(iVar2 + *(int *)(param_2 + 0xfc) * 0x14);\n    do {\n      uVar3 = *(undefined1 *)(param_3 + 4);\n      *puVar4 = *param_3;\n      *(undefined1 *)(puVar4 + 1) = 0;\n      uVar3 = FUN_000315a0(param_1,uVar3);\n      iVar2 = param_3[3];\n      *(undefined1 *)(puVar4 + 4) = uVar3;\n      if (iVar2 == 0) {\n        puVar4[2] = 0;\n        puVar4[3] = 0;\nLAB_00033d14:\n        puVar4 = puVar4 + 5;\n        *(int *)(param_2 + 0xfc) = *(int *)(param_2 + 0xfc) + 1;\n      }\n      else {\n        iVar2 = FUN_0001c240(param_1);\n        puVar4[2] = iVar2;\n        if (iVar2 != 0) {\n          uVar5 = param_3[3];\n          (*(code *)PTR_memcpy_000534c4)(iVar2,param_3[2],uVar5);\n          puVar4[3] = uVar5;\n          goto LAB_00033d14;\n        }\n        FUN_0001a23c(param_1,puVar1 + 0x15b8,1);\n      }\n      param_4 = param_4 + -1;\n      param_3 = param_3 + 5;\n    } while (param_4 != 0);\n  }\n  return;\n}\n\n" (function_definition "void png_set_unknown_chunks(int param_1,int param_2,undefined4 *param_3,int param_4)\n\n{\n  undefined *puVar1;\n  int iVar2;\n  undefined1 uVar3;\n  undefined4 *puVar4;\n  undefined4 uVar5;\n  \n  if (param_1 == 0) {\n    return;\n  }\n  if (((param_2 != 0) && (0 < param_4)) && (param_3 != (undefined4 *)0x0)) {\n    iVar2 = FUN_0001c2ec(param_1,*(undefined4 *)(param_2 + 0xf8),*(undefined4 *)(param_2 + 0xfc),\n                         param_4,0x14);\n    if (iVar2 == 0) {\n      FUN_0001a23c(param_1,PTR_s_nt_0005301c + 0x15a0,1);\n      return;\n    }\n    (*(code *)PTR_png_free_00053324)(param_1,*(undefined4 *)(param_2 + 0xf8));\n    *(int *)(param_2 + 0xf8) = iVar2;\n    puVar1 = PTR_s_nt_0005301c;\n    *(uint *)(param_2 + 0xf4) = *(uint *)(param_2 + 0xf4) | 0x200;\n    puVar4 = (undefined4 *)(iVar2 + *(int *)(param_2 + 0xfc) * 0x14);\n    do {\n      uVar3 = *(undefined1 *)(param_3 + 4);\n      *puVar4 = *param_3;\n      *(undefined1 *)(puVar4 + 1) = 0;\n      uVar3 = FUN_000315a0(param_1,uVar3);\n      iVar2 = param_3[3];\n      *(undefined1 *)(puVar4 + 4) = uVar3;\n      if (iVar2 == 0) {\n        puVar4[2] = 0;\n        puVar4[3] = 0;\nLAB_00033d14:\n        puVar4 = puVar4 + 5;\n        *(int *)(param_2 + 0xfc) = *(int *)(param_2 + 0xfc) + 1;\n      }\n      else {\n        iVar2 = FUN_0001c240(param_1);\n        puVar4[2] = iVar2;\n        if (iVar2 != 0) {\n          uVar5 = param_3[3];\n          (*(code *)PTR_memcpy_000534c4)(iVar2,param_3[2],uVar5);\n          puVar4[3] = uVar5;\n          goto LAB_00033d14;\n        }\n        FUN_0001a23c(param_1,puVar1 + 0x15b8,1);\n      }\n      param_4 = param_4 + -1;\n      param_3 = param_3 + 5;\n    } while (param_4 != 0);\n  }\n  return;\n}" primitive_type (function_declarator "png_set_unknown_chunks(int param_1,int param_2,undefined4 *param_3,int param_4)" identifier (parameter_list "(int param_1,int param_2,undefined4 *param_3,int param_4)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "int param_2" primitive_type identifier) , (parameter_declaration "undefined4 *param_3" type_identifier (pointer_declarator "*param_3" * identifier)) , (parameter_declaration "int param_4" primitive_type identifier) ))) (compound_statement "{\n  undefined *puVar1;\n  int iVar2;\n  undefined1 uVar3;\n  undefined4 *puVar4;\n  undefined4 uVar5;\n  \n  if (param_1 == 0) {\n    return;\n  }\n  if (((param_2 != 0) && (0 < param_4)) && (param_3 != (undefined4 *)0x0)) {\n    iVar2 = FUN_0001c2ec(param_1,*(undefined4 *)(param_2 + 0xf8),*(undefined4 *)(param_2 + 0xfc),\n                         param_4,0x14);\n    if (iVar2 == 0) {\n      FUN_0001a23c(param_1,PTR_s_nt_0005301c + 0x15a0,1);\n      return;\n    }\n    (*(code *)PTR_png_free_00053324)(param_1,*(undefined4 *)(param_2 + 0xf8));\n    *(int *)(param_2 + 0xf8) = iVar2;\n    puVar1 = PTR_s_nt_0005301c;\n    *(uint *)(param_2 + 0xf4) = *(uint *)(param_2 + 0xf4) | 0x200;\n    puVar4 = (undefined4 *)(iVar2 + *(int *)(param_2 + 0xfc) * 0x14);\n    do {\n      uVar3 = *(undefined1 *)(param_3 + 4);\n      *puVar4 = *param_3;\n      *(undefined1 *)(puVar4 + 1) = 0;\n      uVar3 = FUN_000315a0(param_1,uVar3);\n      iVar2 = param_3[3];\n      *(undefined1 *)(puVar4 + 4) = uVar3;\n      if (iVar2 == 0) {\n        puVar4[2] = 0;\n        puVar4[3] = 0;\nLAB_00033d14:\n        puVar4 = puVar4 + 5;\n        *(int *)(param_2 + 0xfc) = *(int *)(param_2 + 0xfc) + 1;\n      }\n      else {\n        iVar2 = FUN_0001c240(param_1);\n        puVar4[2] = iVar2;\n        if (iVar2 != 0) {\n          uVar5 = param_3[3];\n          (*(code *)PTR_memcpy_000534c4)(iVar2,param_3[2],uVar5);\n          puVar4[3] = uVar5;\n          goto LAB_00033d14;\n        }\n        FUN_0001a23c(param_1,puVar1 + 0x15b8,1);\n      }\n      param_4 = param_4 + -1;\n      param_3 = param_3 + 5;\n    } while (param_4 != 0);\n  }\n  return;\n}" { (declaration "undefined *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "undefined1 uVar3;" type_identifier identifier ;) (declaration "undefined4 *puVar4;" type_identifier (pointer_declarator "*puVar4" * identifier) ;) (declaration "undefined4 uVar5;" type_identifier identifier ;) (if_statement "if (param_1 == 0) {\n    return;\n  }" if (parenthesized_expression "(param_1 == 0)" ( (binary_expression "param_1 == 0" identifier == number_literal) )) (compound_statement "{\n    return;\n  }" { (return_statement "return;" return ;) })) (if_statement "if (((param_2 != 0) && (0 < param_4)) && (param_3 != (undefined4 *)0x0)) {\n    iVar2 = FUN_0001c2ec(param_1,*(undefined4 *)(param_2 + 0xf8),*(undefined4 *)(param_2 + 0xfc),\n                         param_4,0x14);\n    if (iVar2 == 0) {\n      FUN_0001a23c(param_1,PTR_s_nt_0005301c + 0x15a0,1);\n      return;\n    }\n    (*(code *)PTR_png_free_00053324)(param_1,*(undefined4 *)(param_2 + 0xf8));\n    *(int *)(param_2 + 0xf8) = iVar2;\n    puVar1 = PTR_s_nt_0005301c;\n    *(uint *)(param_2 + 0xf4) = *(uint *)(param_2 + 0xf4) | 0x200;\n    puVar4 = (undefined4 *)(iVar2 + *(int *)(param_2 + 0xfc) * 0x14);\n    do {\n      uVar3 = *(undefined1 *)(param_3 + 4);\n      *puVar4 = *param_3;\n      *(undefined1 *)(puVar4 + 1) = 0;\n      uVar3 = FUN_000315a0(param_1,uVar3);\n      iVar2 = param_3[3];\n      *(undefined1 *)(puVar4 + 4) = uVar3;\n      if (iVar2 == 0) {\n        puVar4[2] = 0;\n        puVar4[3] = 0;\nLAB_00033d14:\n        puVar4 = puVar4 + 5;\n        *(int *)(param_2 + 0xfc) = *(int *)(param_2 + 0xfc) + 1;\n      }\n      else {\n        iVar2 = FUN_0001c240(param_1);\n        puVar4[2] = iVar2;\n        if (iVar2 != 0) {\n          uVar5 = param_3[3];\n          (*(code *)PTR_memcpy_000534c4)(iVar2,param_3[2],uVar5);\n          puVar4[3] = uVar5;\n          goto LAB_00033d14;\n        }\n        FUN_0001a23c(param_1,puVar1 + 0x15b8,1);\n      }\n      param_4 = param_4 + -1;\n      param_3 = param_3 + 5;\n    } while (param_4 != 0);\n  }" if (parenthesized_expression "(((param_2 != 0) && (0 < param_4)) && (param_3 != (undefined4 *)0x0))" ( (binary_expression "((param_2 != 0) && (0 < param_4)) && (param_3 != (undefined4 *)0x0)" (parenthesized_expression "((param_2 != 0) && (0 < param_4))" ( (binary_expression "(param_2 != 0) && (0 < param_4)" (parenthesized_expression "(param_2 != 0)" ( (binary_expression "param_2 != 0" identifier != number_literal) )) && (parenthesized_expression "(0 < param_4)" ( (binary_expression "0 < param_4" number_literal < identifier) ))) )) && (parenthesized_expression "(param_3 != (undefined4 *)0x0)" ( (binary_expression "param_3 != (undefined4 *)0x0" identifier != (cast_expression "(undefined4 *)0x0" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) ))) )) (compound_statement "{\n    iVar2 = FUN_0001c2ec(param_1,*(undefined4 *)(param_2 + 0xf8),*(undefined4 *)(param_2 + 0xfc),\n                         param_4,0x14);\n    if (iVar2 == 0) {\n      FUN_0001a23c(param_1,PTR_s_nt_0005301c + 0x15a0,1);\n      return;\n    }\n    (*(code *)PTR_png_free_00053324)(param_1,*(undefined4 *)(param_2 + 0xf8));\n    *(int *)(param_2 + 0xf8) = iVar2;\n    puVar1 = PTR_s_nt_0005301c;\n    *(uint *)(param_2 + 0xf4) = *(uint *)(param_2 + 0xf4) | 0x200;\n    puVar4 = (undefined4 *)(iVar2 + *(int *)(param_2 + 0xfc) * 0x14);\n    do {\n      uVar3 = *(undefined1 *)(param_3 + 4);\n      *puVar4 = *param_3;\n      *(undefined1 *)(puVar4 + 1) = 0;\n      uVar3 = FUN_000315a0(param_1,uVar3);\n      iVar2 = param_3[3];\n      *(undefined1 *)(puVar4 + 4) = uVar3;\n      if (iVar2 == 0) {\n        puVar4[2] = 0;\n        puVar4[3] = 0;\nLAB_00033d14:\n        puVar4 = puVar4 + 5;\n        *(int *)(param_2 + 0xfc) = *(int *)(param_2 + 0xfc) + 1;\n      }\n      else {\n        iVar2 = FUN_0001c240(param_1);\n        puVar4[2] = iVar2;\n        if (iVar2 != 0) {\n          uVar5 = param_3[3];\n          (*(code *)PTR_memcpy_000534c4)(iVar2,param_3[2],uVar5);\n          puVar4[3] = uVar5;\n          goto LAB_00033d14;\n        }\n        FUN_0001a23c(param_1,puVar1 + 0x15b8,1);\n      }\n      param_4 = param_4 + -1;\n      param_3 = param_3 + 5;\n    } while (param_4 != 0);\n  }" { (expression_statement "iVar2 = FUN_0001c2ec(param_1,*(undefined4 *)(param_2 + 0xf8),*(undefined4 *)(param_2 + 0xfc),\n                         param_4,0x14);" (assignment_expression "iVar2 = FUN_0001c2ec(param_1,*(undefined4 *)(param_2 + 0xf8),*(undefined4 *)(param_2 + 0xfc),\n                         param_4,0x14)" identifier = (call_expression "FUN_0001c2ec(param_1,*(undefined4 *)(param_2 + 0xf8),*(undefined4 *)(param_2 + 0xfc),\n                         param_4,0x14)" identifier (argument_list "(param_1,*(undefined4 *)(param_2 + 0xf8),*(undefined4 *)(param_2 + 0xfc),\n                         param_4,0x14)" ( identifier , (pointer_expression "*(undefined4 *)(param_2 + 0xf8)" * (cast_expression "(undefined4 *)(param_2 + 0xf8)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 0xf8)" ( (binary_expression "param_2 + 0xf8" identifier + number_literal) )))) , (pointer_expression "*(undefined4 *)(param_2 + 0xfc)" * (cast_expression "(undefined4 *)(param_2 + 0xfc)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 0xfc)" ( (binary_expression "param_2 + 0xfc" identifier + number_literal) )))) , identifier , number_literal )))) ;) (if_statement "if (iVar2 == 0) {\n      FUN_0001a23c(param_1,PTR_s_nt_0005301c + 0x15a0,1);\n      return;\n    }" if (parenthesized_expression "(iVar2 == 0)" ( (binary_expression "iVar2 == 0" identifier == number_literal) )) (compound_statement "{\n      FUN_0001a23c(param_1,PTR_s_nt_0005301c + 0x15a0,1);\n      return;\n    }" { (expression_statement "FUN_0001a23c(param_1,PTR_s_nt_0005301c + 0x15a0,1);" (call_expression "FUN_0001a23c(param_1,PTR_s_nt_0005301c + 0x15a0,1)" identifier (argument_list "(param_1,PTR_s_nt_0005301c + 0x15a0,1)" ( identifier , (binary_expression "PTR_s_nt_0005301c + 0x15a0" identifier + number_literal) , number_literal ))) ;) (return_statement "return;" return ;) })) (expression_statement "(*(code *)PTR_png_free_00053324)(param_1,*(undefined4 *)(param_2 + 0xf8));" (call_expression "(*(code *)PTR_png_free_00053324)(param_1,*(undefined4 *)(param_2 + 0xf8))" (parenthesized_expression "(*(code *)PTR_png_free_00053324)" ( (pointer_expression "*(code *)PTR_png_free_00053324" * (cast_expression "(code *)PTR_png_free_00053324" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(param_1,*(undefined4 *)(param_2 + 0xf8))" ( identifier , (pointer_expression "*(undefined4 *)(param_2 + 0xf8)" * (cast_expression "(undefined4 *)(param_2 + 0xf8)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 0xf8)" ( (binary_expression "param_2 + 0xf8" identifier + number_literal) )))) ))) ;) (expression_statement "*(int *)(param_2 + 0xf8) = iVar2;" (assignment_expression "*(int *)(param_2 + 0xf8) = iVar2" (pointer_expression "*(int *)(param_2 + 0xf8)" * (cast_expression "(int *)(param_2 + 0xf8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 0xf8)" ( (binary_expression "param_2 + 0xf8" identifier + number_literal) )))) = identifier) ;) (expression_statement "puVar1 = PTR_s_nt_0005301c;" (assignment_expression "puVar1 = PTR_s_nt_0005301c" identifier = identifier) ;) (expression_statement "*(uint *)(param_2 + 0xf4) = *(uint *)(param_2 + 0xf4) | 0x200;" (assignment_expression "*(uint *)(param_2 + 0xf4) = *(uint *)(param_2 + 0xf4) | 0x200" (pointer_expression "*(uint *)(param_2 + 0xf4)" * (cast_expression "(uint *)(param_2 + 0xf4)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 0xf4)" ( (binary_expression "param_2 + 0xf4" identifier + number_literal) )))) = (binary_expression "*(uint *)(param_2 + 0xf4) | 0x200" (pointer_expression "*(uint *)(param_2 + 0xf4)" * (cast_expression "(uint *)(param_2 + 0xf4)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 0xf4)" ( (binary_expression "param_2 + 0xf4" identifier + number_literal) )))) | number_literal)) ;) (expression_statement "puVar4 = (undefined4 *)(iVar2 + *(int *)(param_2 + 0xfc) * 0x14);" (assignment_expression "puVar4 = (undefined4 *)(iVar2 + *(int *)(param_2 + 0xfc) * 0x14)" identifier = (cast_expression "(undefined4 *)(iVar2 + *(int *)(param_2 + 0xfc) * 0x14)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + *(int *)(param_2 + 0xfc) * 0x14)" ( (binary_expression "iVar2 + *(int *)(param_2 + 0xfc) * 0x14" identifier + (binary_expression "*(int *)(param_2 + 0xfc) * 0x14" (pointer_expression "*(int *)(param_2 + 0xfc)" * (cast_expression "(int *)(param_2 + 0xfc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 0xfc)" ( (binary_expression "param_2 + 0xfc" identifier + number_literal) )))) * number_literal)) )))) ;) (do_statement "do {\n      uVar3 = *(undefined1 *)(param_3 + 4);\n      *puVar4 = *param_3;\n      *(undefined1 *)(puVar4 + 1) = 0;\n      uVar3 = FUN_000315a0(param_1,uVar3);\n      iVar2 = param_3[3];\n      *(undefined1 *)(puVar4 + 4) = uVar3;\n      if (iVar2 == 0) {\n        puVar4[2] = 0;\n        puVar4[3] = 0;\nLAB_00033d14:\n        puVar4 = puVar4 + 5;\n        *(int *)(param_2 + 0xfc) = *(int *)(param_2 + 0xfc) + 1;\n      }\n      else {\n        iVar2 = FUN_0001c240(param_1);\n        puVar4[2] = iVar2;\n        if (iVar2 != 0) {\n          uVar5 = param_3[3];\n          (*(code *)PTR_memcpy_000534c4)(iVar2,param_3[2],uVar5);\n          puVar4[3] = uVar5;\n          goto LAB_00033d14;\n        }\n        FUN_0001a23c(param_1,puVar1 + 0x15b8,1);\n      }\n      param_4 = param_4 + -1;\n      param_3 = param_3 + 5;\n    } while (param_4 != 0);" do (compound_statement "{\n      uVar3 = *(undefined1 *)(param_3 + 4);\n      *puVar4 = *param_3;\n      *(undefined1 *)(puVar4 + 1) = 0;\n      uVar3 = FUN_000315a0(param_1,uVar3);\n      iVar2 = param_3[3];\n      *(undefined1 *)(puVar4 + 4) = uVar3;\n      if (iVar2 == 0) {\n        puVar4[2] = 0;\n        puVar4[3] = 0;\nLAB_00033d14:\n        puVar4 = puVar4 + 5;\n        *(int *)(param_2 + 0xfc) = *(int *)(param_2 + 0xfc) + 1;\n      }\n      else {\n        iVar2 = FUN_0001c240(param_1);\n        puVar4[2] = iVar2;\n        if (iVar2 != 0) {\n          uVar5 = param_3[3];\n          (*(code *)PTR_memcpy_000534c4)(iVar2,param_3[2],uVar5);\n          puVar4[3] = uVar5;\n          goto LAB_00033d14;\n        }\n        FUN_0001a23c(param_1,puVar1 + 0x15b8,1);\n      }\n      param_4 = param_4 + -1;\n      param_3 = param_3 + 5;\n    }" { (expression_statement "uVar3 = *(undefined1 *)(param_3 + 4);" (assignment_expression "uVar3 = *(undefined1 *)(param_3 + 4)" identifier = (pointer_expression "*(undefined1 *)(param_3 + 4)" * (cast_expression "(undefined1 *)(param_3 + 4)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_3 + 4)" ( (binary_expression "param_3 + 4" identifier + number_literal) ))))) ;) (expression_statement "*puVar4 = *param_3;" (assignment_expression "*puVar4 = *param_3" (pointer_expression "*puVar4" * identifier) = (pointer_expression "*param_3" * identifier)) ;) (expression_statement "*(undefined1 *)(puVar4 + 1) = 0;" (assignment_expression "*(undefined1 *)(puVar4 + 1) = 0" (pointer_expression "*(undefined1 *)(puVar4 + 1)" * (cast_expression "(undefined1 *)(puVar4 + 1)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar4 + 1)" ( (binary_expression "puVar4 + 1" identifier + number_literal) )))) = number_literal) ;) (expression_statement "uVar3 = FUN_000315a0(param_1,uVar3);" (assignment_expression "uVar3 = FUN_000315a0(param_1,uVar3)" identifier = (call_expression "FUN_000315a0(param_1,uVar3)" identifier (argument_list "(param_1,uVar3)" ( identifier , identifier )))) ;) (expression_statement "iVar2 = param_3[3];" (assignment_expression "iVar2 = param_3[3]" identifier = (subscript_expression "param_3[3]" identifier [ number_literal ])) ;) (expression_statement "*(undefined1 *)(puVar4 + 4) = uVar3;" (assignment_expression "*(undefined1 *)(puVar4 + 4) = uVar3" (pointer_expression "*(undefined1 *)(puVar4 + 4)" * (cast_expression "(undefined1 *)(puVar4 + 4)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar4 + 4)" ( (binary_expression "puVar4 + 4" identifier + number_literal) )))) = identifier) ;) (if_statement "if (iVar2 == 0) {\n        puVar4[2] = 0;\n        puVar4[3] = 0;\nLAB_00033d14:\n        puVar4 = puVar4 + 5;\n        *(int *)(param_2 + 0xfc) = *(int *)(param_2 + 0xfc) + 1;\n      }\n      else {\n        iVar2 = FUN_0001c240(param_1);\n        puVar4[2] = iVar2;\n        if (iVar2 != 0) {\n          uVar5 = param_3[3];\n          (*(code *)PTR_memcpy_000534c4)(iVar2,param_3[2],uVar5);\n          puVar4[3] = uVar5;\n          goto LAB_00033d14;\n        }\n        FUN_0001a23c(param_1,puVar1 + 0x15b8,1);\n      }" if (parenthesized_expression "(iVar2 == 0)" ( (binary_expression "iVar2 == 0" identifier == number_literal) )) (compound_statement "{\n        puVar4[2] = 0;\n        puVar4[3] = 0;\nLAB_00033d14:\n        puVar4 = puVar4 + 5;\n        *(int *)(param_2 + 0xfc) = *(int *)(param_2 + 0xfc) + 1;\n      }" { (expression_statement "puVar4[2] = 0;" (assignment_expression "puVar4[2] = 0" (subscript_expression "puVar4[2]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "puVar4[3] = 0;" (assignment_expression "puVar4[3] = 0" (subscript_expression "puVar4[3]" identifier [ number_literal ]) = number_literal) ;) (labeled_statement "LAB_00033d14:\n        puVar4 = puVar4 + 5;" statement_identifier : (expression_statement "puVar4 = puVar4 + 5;" (assignment_expression "puVar4 = puVar4 + 5" identifier = (binary_expression "puVar4 + 5" identifier + number_literal)) ;)) (expression_statement "*(int *)(param_2 + 0xfc) = *(int *)(param_2 + 0xfc) + 1;" (assignment_expression "*(int *)(param_2 + 0xfc) = *(int *)(param_2 + 0xfc) + 1" (pointer_expression "*(int *)(param_2 + 0xfc)" * (cast_expression "(int *)(param_2 + 0xfc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 0xfc)" ( (binary_expression "param_2 + 0xfc" identifier + number_literal) )))) = (binary_expression "*(int *)(param_2 + 0xfc) + 1" (pointer_expression "*(int *)(param_2 + 0xfc)" * (cast_expression "(int *)(param_2 + 0xfc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 0xfc)" ( (binary_expression "param_2 + 0xfc" identifier + number_literal) )))) + number_literal)) ;) }) (else_clause "else {\n        iVar2 = FUN_0001c240(param_1);\n        puVar4[2] = iVar2;\n        if (iVar2 != 0) {\n          uVar5 = param_3[3];\n          (*(code *)PTR_memcpy_000534c4)(iVar2,param_3[2],uVar5);\n          puVar4[3] = uVar5;\n          goto LAB_00033d14;\n        }\n        FUN_0001a23c(param_1,puVar1 + 0x15b8,1);\n      }" else (compound_statement "{\n        iVar2 = FUN_0001c240(param_1);\n        puVar4[2] = iVar2;\n        if (iVar2 != 0) {\n          uVar5 = param_3[3];\n          (*(code *)PTR_memcpy_000534c4)(iVar2,param_3[2],uVar5);\n          puVar4[3] = uVar5;\n          goto LAB_00033d14;\n        }\n        FUN_0001a23c(param_1,puVar1 + 0x15b8,1);\n      }" { (expression_statement "iVar2 = FUN_0001c240(param_1);" (assignment_expression "iVar2 = FUN_0001c240(param_1)" identifier = (call_expression "FUN_0001c240(param_1)" identifier (argument_list "(param_1)" ( identifier )))) ;) (expression_statement "puVar4[2] = iVar2;" (assignment_expression "puVar4[2] = iVar2" (subscript_expression "puVar4[2]" identifier [ number_literal ]) = identifier) ;) (if_statement "if (iVar2 != 0) {\n          uVar5 = param_3[3];\n          (*(code *)PTR_memcpy_000534c4)(iVar2,param_3[2],uVar5);\n          puVar4[3] = uVar5;\n          goto LAB_00033d14;\n        }" if (parenthesized_expression "(iVar2 != 0)" ( (binary_expression "iVar2 != 0" identifier != number_literal) )) (compound_statement "{\n          uVar5 = param_3[3];\n          (*(code *)PTR_memcpy_000534c4)(iVar2,param_3[2],uVar5);\n          puVar4[3] = uVar5;\n          goto LAB_00033d14;\n        }" { (expression_statement "uVar5 = param_3[3];" (assignment_expression "uVar5 = param_3[3]" identifier = (subscript_expression "param_3[3]" identifier [ number_literal ])) ;) (expression_statement "(*(code *)PTR_memcpy_000534c4)(iVar2,param_3[2],uVar5);" (call_expression "(*(code *)PTR_memcpy_000534c4)(iVar2,param_3[2],uVar5)" (parenthesized_expression "(*(code *)PTR_memcpy_000534c4)" ( (pointer_expression "*(code *)PTR_memcpy_000534c4" * (cast_expression "(code *)PTR_memcpy_000534c4" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(iVar2,param_3[2],uVar5)" ( identifier , (subscript_expression "param_3[2]" identifier [ number_literal ]) , identifier ))) ;) (expression_statement "puVar4[3] = uVar5;" (assignment_expression "puVar4[3] = uVar5" (subscript_expression "puVar4[3]" identifier [ number_literal ]) = identifier) ;) (goto_statement "goto LAB_00033d14;" goto statement_identifier ;) })) (expression_statement "FUN_0001a23c(param_1,puVar1 + 0x15b8,1);" (call_expression "FUN_0001a23c(param_1,puVar1 + 0x15b8,1)" identifier (argument_list "(param_1,puVar1 + 0x15b8,1)" ( identifier , (binary_expression "puVar1 + 0x15b8" identifier + number_literal) , number_literal ))) ;) }))) (expression_statement "param_4 = param_4 + -1;" (assignment_expression "param_4 = param_4 + -1" identifier = (binary_expression "param_4 + -1" identifier + number_literal)) ;) (expression_statement "param_3 = param_3 + 5;" (assignment_expression "param_3 = param_3 + 5" identifier = (binary_expression "param_3 + 5" identifier + number_literal)) ;) }) while (parenthesized_expression "(param_4 != 0)" ( (binary_expression "param_4 != 0" identifier != number_literal) )) ;) })) (return_statement "return;" return ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (return_statement return ;) })) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT != LIT) )) && (parenthesized_expression ( (binary_expression LIT < IDENT) ))) )) && (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) ))) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) , (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) , IDENT , LIT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT , (binary_expression IDENT + LIT) , LIT ))) ;) (return_statement return ;) })) (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( IDENT , (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) ))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) | LIT)) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) * LIT)) )))) ;) (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = (pointer_expression * IDENT)) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = LIT) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT )))) ;) (expression_statement (assignment_expression IDENT = (subscript_expression IDENT [ LIT ])) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;) (labeled_statement statement_identifier : (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;)) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) + LIT)) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (subscript_expression IDENT [ LIT ])) ;) (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( IDENT , (subscript_expression IDENT [ LIT ]) , IDENT ))) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (goto_statement goto statement_identifier ;) })) (expression_statement (call_expression IDENT (argument_list ( IDENT , (binary_expression IDENT + LIT) , LIT ))) ;) }))) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) }) while (parenthesized_expression ( (binary_expression IDENT != LIT) )) ;) })) (return_statement return ;) })))
(function_definition "void png_set_unknown_chunks(int param_1,int param_2,undefined4 *param_3,int param_4)\n\n{\n  undefined *puVar1;\n  int iVar2;\n  undefined1 uVar3;\n  undefined4 *puVar4;\n  undefined4 uVar5;\n  \n  if (param_1 == 0) {\n    return;\n  }\n  if (((param_2 != 0) && (0 < param_4)) && (param_3 != (undefined4 *)0x0)) {\n    iVar2 = FUN_0001c2ec(param_1,*(undefined4 *)(param_2 + 0xf8),*(undefined4 *)(param_2 + 0xfc),\n                         param_4,0x14);\n    if (iVar2 == 0) {\n      FUN_0001a23c(param_1,PTR_s_nt_0005301c + 0x15a0,1);\n      return;\n    }\n    (*(code *)PTR_png_free_00053324)(param_1,*(undefined4 *)(param_2 + 0xf8));\n    *(int *)(param_2 + 0xf8) = iVar2;\n    puVar1 = PTR_s_nt_0005301c;\n    *(uint *)(param_2 + 0xf4) = *(uint *)(param_2 + 0xf4) | 0x200;\n    puVar4 = (undefined4 *)(iVar2 + *(int *)(param_2 + 0xfc) * 0x14);\n    do {\n      uVar3 = *(undefined1 *)(param_3 + 4);\n      *puVar4 = *param_3;\n      *(undefined1 *)(puVar4 + 1) = 0;\n      uVar3 = FUN_000315a0(param_1,uVar3);\n      iVar2 = param_3[3];\n      *(undefined1 *)(puVar4 + 4) = uVar3;\n      if (iVar2 == 0) {\n        puVar4[2] = 0;\n        puVar4[3] = 0;\nLAB_00033d14:\n        puVar4 = puVar4 + 5;\n        *(int *)(param_2 + 0xfc) = *(int *)(param_2 + 0xfc) + 1;\n      }\n      else {\n        iVar2 = FUN_0001c240(param_1);\n        puVar4[2] = iVar2;\n        if (iVar2 != 0) {\n          uVar5 = param_3[3];\n          (*(code *)PTR_memcpy_000534c4)(iVar2,param_3[2],uVar5);\n          puVar4[3] = uVar5;\n          goto LAB_00033d14;\n        }\n        FUN_0001a23c(param_1,puVar1 + 0x15b8,1);\n      }\n      param_4 = param_4 + -1;\n      param_3 = param_3 + 5;\n    } while (param_4 != 0);\n  }\n  return;\n}" (primitive_type "void") (function_declarator "png_set_unknown_chunks(int param_1,int param_2,undefined4 *param_3,int param_4)" (identifier "png_set_unknown_chunks") (parameter_list "(int param_1,int param_2,undefined4 *param_3,int param_4)" (( "(") (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") (pointer_declarator "*param_3" (* "*") (identifier "param_3"))) (, ",") (parameter_declaration "int param_4" (primitive_type "int") (identifier "param_4")) () ")"))) (compound_statement "{\n  undefined *puVar1;\n  int iVar2;\n  undefined1 uVar3;\n  undefined4 *puVar4;\n  undefined4 uVar5;\n  \n  if (param_1 == 0) {\n    return;\n  }\n  if (((param_2 != 0) && (0 < param_4)) && (param_3 != (undefined4 *)0x0)) {\n    iVar2 = FUN_0001c2ec(param_1,*(undefined4 *)(param_2 + 0xf8),*(undefined4 *)(param_2 + 0xfc),\n                         param_4,0x14);\n    if (iVar2 == 0) {\n      FUN_0001a23c(param_1,PTR_s_nt_0005301c + 0x15a0,1);\n      return;\n    }\n    (*(code *)PTR_png_free_00053324)(param_1,*(undefined4 *)(param_2 + 0xf8));\n    *(int *)(param_2 + 0xf8) = iVar2;\n    puVar1 = PTR_s_nt_0005301c;\n    *(uint *)(param_2 + 0xf4) = *(uint *)(param_2 + 0xf4) | 0x200;\n    puVar4 = (undefined4 *)(iVar2 + *(int *)(param_2 + 0xfc) * 0x14);\n    do {\n      uVar3 = *(undefined1 *)(param_3 + 4);\n      *puVar4 = *param_3;\n      *(undefined1 *)(puVar4 + 1) = 0;\n      uVar3 = FUN_000315a0(param_1,uVar3);\n      iVar2 = param_3[3];\n      *(undefined1 *)(puVar4 + 4) = uVar3;\n      if (iVar2 == 0) {\n        puVar4[2] = 0;\n        puVar4[3] = 0;\nLAB_00033d14:\n        puVar4 = puVar4 + 5;\n        *(int *)(param_2 + 0xfc) = *(int *)(param_2 + 0xfc) + 1;\n      }\n      else {\n        iVar2 = FUN_0001c240(param_1);\n        puVar4[2] = iVar2;\n        if (iVar2 != 0) {\n          uVar5 = param_3[3];\n          (*(code *)PTR_memcpy_000534c4)(iVar2,param_3[2],uVar5);\n          puVar4[3] = uVar5;\n          goto LAB_00033d14;\n        }\n        FUN_0001a23c(param_1,puVar1 + 0x15b8,1);\n      }\n      param_4 = param_4 + -1;\n      param_3 = param_3 + 5;\n    } while (param_4 != 0);\n  }\n  return;\n}" ({ "{") (declaration "undefined *puVar1;" (type_identifier "undefined") (pointer_declarator "*puVar1" (* "*") (identifier "puVar1")) (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (declaration "undefined1 uVar3;" (type_identifier "undefined1") (identifier "uVar3") (; ";")) (declaration "undefined4 *puVar4;" (type_identifier "undefined4") (pointer_declarator "*puVar4" (* "*") (identifier "puVar4")) (; ";")) (declaration "undefined4 uVar5;" (type_identifier "undefined4") (identifier "uVar5") (; ";")) (if_statement "if (param_1 == 0) {\n    return;\n  }" (if "if") (parenthesized_expression "(param_1 == 0)" (( "(") (binary_expression "param_1 == 0" (identifier "param_1") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    return;\n  }" ({ "{") (return_statement "return;" (return "return") (; ";")) (} "}"))) (if_statement "if (((param_2 != 0) && (0 < param_4)) && (param_3 != (undefined4 *)0x0)) {\n    iVar2 = FUN_0001c2ec(param_1,*(undefined4 *)(param_2 + 0xf8),*(undefined4 *)(param_2 + 0xfc),\n                         param_4,0x14);\n    if (iVar2 == 0) {\n      FUN_0001a23c(param_1,PTR_s_nt_0005301c + 0x15a0,1);\n      return;\n    }\n    (*(code *)PTR_png_free_00053324)(param_1,*(undefined4 *)(param_2 + 0xf8));\n    *(int *)(param_2 + 0xf8) = iVar2;\n    puVar1 = PTR_s_nt_0005301c;\n    *(uint *)(param_2 + 0xf4) = *(uint *)(param_2 + 0xf4) | 0x200;\n    puVar4 = (undefined4 *)(iVar2 + *(int *)(param_2 + 0xfc) * 0x14);\n    do {\n      uVar3 = *(undefined1 *)(param_3 + 4);\n      *puVar4 = *param_3;\n      *(undefined1 *)(puVar4 + 1) = 0;\n      uVar3 = FUN_000315a0(param_1,uVar3);\n      iVar2 = param_3[3];\n      *(undefined1 *)(puVar4 + 4) = uVar3;\n      if (iVar2 == 0) {\n        puVar4[2] = 0;\n        puVar4[3] = 0;\nLAB_00033d14:\n        puVar4 = puVar4 + 5;\n        *(int *)(param_2 + 0xfc) = *(int *)(param_2 + 0xfc) + 1;\n      }\n      else {\n        iVar2 = FUN_0001c240(param_1);\n        puVar4[2] = iVar2;\n        if (iVar2 != 0) {\n          uVar5 = param_3[3];\n          (*(code *)PTR_memcpy_000534c4)(iVar2,param_3[2],uVar5);\n          puVar4[3] = uVar5;\n          goto LAB_00033d14;\n        }\n        FUN_0001a23c(param_1,puVar1 + 0x15b8,1);\n      }\n      param_4 = param_4 + -1;\n      param_3 = param_3 + 5;\n    } while (param_4 != 0);\n  }" (if "if") (parenthesized_expression "(((param_2 != 0) && (0 < param_4)) && (param_3 != (undefined4 *)0x0))" (( "(") (binary_expression "((param_2 != 0) && (0 < param_4)) && (param_3 != (undefined4 *)0x0)" (parenthesized_expression "((param_2 != 0) && (0 < param_4))" (( "(") (binary_expression "(param_2 != 0) && (0 < param_4)" (parenthesized_expression "(param_2 != 0)" (( "(") (binary_expression "param_2 != 0" (identifier "param_2") (!= "!=") (number_literal "0")) () ")")) (&& "&&") (parenthesized_expression "(0 < param_4)" (( "(") (binary_expression "0 < param_4" (number_literal "0") (< "<") (identifier "param_4")) () ")"))) () ")")) (&& "&&") (parenthesized_expression "(param_3 != (undefined4 *)0x0)" (( "(") (binary_expression "param_3 != (undefined4 *)0x0" (identifier "param_3") (!= "!=") (cast_expression "(undefined4 *)0x0" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")"))) () ")")) (compound_statement "{\n    iVar2 = FUN_0001c2ec(param_1,*(undefined4 *)(param_2 + 0xf8),*(undefined4 *)(param_2 + 0xfc),\n                         param_4,0x14);\n    if (iVar2 == 0) {\n      FUN_0001a23c(param_1,PTR_s_nt_0005301c + 0x15a0,1);\n      return;\n    }\n    (*(code *)PTR_png_free_00053324)(param_1,*(undefined4 *)(param_2 + 0xf8));\n    *(int *)(param_2 + 0xf8) = iVar2;\n    puVar1 = PTR_s_nt_0005301c;\n    *(uint *)(param_2 + 0xf4) = *(uint *)(param_2 + 0xf4) | 0x200;\n    puVar4 = (undefined4 *)(iVar2 + *(int *)(param_2 + 0xfc) * 0x14);\n    do {\n      uVar3 = *(undefined1 *)(param_3 + 4);\n      *puVar4 = *param_3;\n      *(undefined1 *)(puVar4 + 1) = 0;\n      uVar3 = FUN_000315a0(param_1,uVar3);\n      iVar2 = param_3[3];\n      *(undefined1 *)(puVar4 + 4) = uVar3;\n      if (iVar2 == 0) {\n        puVar4[2] = 0;\n        puVar4[3] = 0;\nLAB_00033d14:\n        puVar4 = puVar4 + 5;\n        *(int *)(param_2 + 0xfc) = *(int *)(param_2 + 0xfc) + 1;\n      }\n      else {\n        iVar2 = FUN_0001c240(param_1);\n        puVar4[2] = iVar2;\n        if (iVar2 != 0) {\n          uVar5 = param_3[3];\n          (*(code *)PTR_memcpy_000534c4)(iVar2,param_3[2],uVar5);\n          puVar4[3] = uVar5;\n          goto LAB_00033d14;\n        }\n        FUN_0001a23c(param_1,puVar1 + 0x15b8,1);\n      }\n      param_4 = param_4 + -1;\n      param_3 = param_3 + 5;\n    } while (param_4 != 0);\n  }" ({ "{") (expression_statement "iVar2 = FUN_0001c2ec(param_1,*(undefined4 *)(param_2 + 0xf8),*(undefined4 *)(param_2 + 0xfc),\n                         param_4,0x14);" (assignment_expression "iVar2 = FUN_0001c2ec(param_1,*(undefined4 *)(param_2 + 0xf8),*(undefined4 *)(param_2 + 0xfc),\n                         param_4,0x14)" (identifier "iVar2") (= "=") (call_expression "FUN_0001c2ec(param_1,*(undefined4 *)(param_2 + 0xf8),*(undefined4 *)(param_2 + 0xfc),\n                         param_4,0x14)" (identifier "FUN_0001c2ec") (argument_list "(param_1,*(undefined4 *)(param_2 + 0xf8),*(undefined4 *)(param_2 + 0xfc),\n                         param_4,0x14)" (( "(") (identifier "param_1") (, ",") (pointer_expression "*(undefined4 *)(param_2 + 0xf8)" (* "*") (cast_expression "(undefined4 *)(param_2 + 0xf8)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_2 + 0xf8)" (( "(") (binary_expression "param_2 + 0xf8" (identifier "param_2") (+ "+") (number_literal "0xf8")) () ")")))) (, ",") (pointer_expression "*(undefined4 *)(param_2 + 0xfc)" (* "*") (cast_expression "(undefined4 *)(param_2 + 0xfc)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_2 + 0xfc)" (( "(") (binary_expression "param_2 + 0xfc" (identifier "param_2") (+ "+") (number_literal "0xfc")) () ")")))) (, ",") (identifier "param_4") (, ",") (number_literal "0x14") () ")")))) (; ";")) (if_statement "if (iVar2 == 0) {\n      FUN_0001a23c(param_1,PTR_s_nt_0005301c + 0x15a0,1);\n      return;\n    }" (if "if") (parenthesized_expression "(iVar2 == 0)" (( "(") (binary_expression "iVar2 == 0" (identifier "iVar2") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n      FUN_0001a23c(param_1,PTR_s_nt_0005301c + 0x15a0,1);\n      return;\n    }" ({ "{") (expression_statement "FUN_0001a23c(param_1,PTR_s_nt_0005301c + 0x15a0,1);" (call_expression "FUN_0001a23c(param_1,PTR_s_nt_0005301c + 0x15a0,1)" (identifier "FUN_0001a23c") (argument_list "(param_1,PTR_s_nt_0005301c + 0x15a0,1)" (( "(") (identifier "param_1") (, ",") (binary_expression "PTR_s_nt_0005301c + 0x15a0" (identifier "PTR_s_nt_0005301c") (+ "+") (number_literal "0x15a0")) (, ",") (number_literal "1") () ")"))) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}"))) (expression_statement "(*(code *)PTR_png_free_00053324)(param_1,*(undefined4 *)(param_2 + 0xf8));" (call_expression "(*(code *)PTR_png_free_00053324)(param_1,*(undefined4 *)(param_2 + 0xf8))" (parenthesized_expression "(*(code *)PTR_png_free_00053324)" (( "(") (pointer_expression "*(code *)PTR_png_free_00053324" (* "*") (cast_expression "(code *)PTR_png_free_00053324" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_png_free_00053324"))) () ")")) (argument_list "(param_1,*(undefined4 *)(param_2 + 0xf8))" (( "(") (identifier "param_1") (, ",") (pointer_expression "*(undefined4 *)(param_2 + 0xf8)" (* "*") (cast_expression "(undefined4 *)(param_2 + 0xf8)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_2 + 0xf8)" (( "(") (binary_expression "param_2 + 0xf8" (identifier "param_2") (+ "+") (number_literal "0xf8")) () ")")))) () ")"))) (; ";")) (expression_statement "*(int *)(param_2 + 0xf8) = iVar2;" (assignment_expression "*(int *)(param_2 + 0xf8) = iVar2" (pointer_expression "*(int *)(param_2 + 0xf8)" (* "*") (cast_expression "(int *)(param_2 + 0xf8)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_2 + 0xf8)" (( "(") (binary_expression "param_2 + 0xf8" (identifier "param_2") (+ "+") (number_literal "0xf8")) () ")")))) (= "=") (identifier "iVar2")) (; ";")) (expression_statement "puVar1 = PTR_s_nt_0005301c;" (assignment_expression "puVar1 = PTR_s_nt_0005301c" (identifier "puVar1") (= "=") (identifier "PTR_s_nt_0005301c")) (; ";")) (expression_statement "*(uint *)(param_2 + 0xf4) = *(uint *)(param_2 + 0xf4) | 0x200;" (assignment_expression "*(uint *)(param_2 + 0xf4) = *(uint *)(param_2 + 0xf4) | 0x200" (pointer_expression "*(uint *)(param_2 + 0xf4)" (* "*") (cast_expression "(uint *)(param_2 + 0xf4)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_2 + 0xf4)" (( "(") (binary_expression "param_2 + 0xf4" (identifier "param_2") (+ "+") (number_literal "0xf4")) () ")")))) (= "=") (binary_expression "*(uint *)(param_2 + 0xf4) | 0x200" (pointer_expression "*(uint *)(param_2 + 0xf4)" (* "*") (cast_expression "(uint *)(param_2 + 0xf4)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_2 + 0xf4)" (( "(") (binary_expression "param_2 + 0xf4" (identifier "param_2") (+ "+") (number_literal "0xf4")) () ")")))) (| "|") (number_literal "0x200"))) (; ";")) (expression_statement "puVar4 = (undefined4 *)(iVar2 + *(int *)(param_2 + 0xfc) * 0x14);" (assignment_expression "puVar4 = (undefined4 *)(iVar2 + *(int *)(param_2 + 0xfc) * 0x14)" (identifier "puVar4") (= "=") (cast_expression "(undefined4 *)(iVar2 + *(int *)(param_2 + 0xfc) * 0x14)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar2 + *(int *)(param_2 + 0xfc) * 0x14)" (( "(") (binary_expression "iVar2 + *(int *)(param_2 + 0xfc) * 0x14" (identifier "iVar2") (+ "+") (binary_expression "*(int *)(param_2 + 0xfc) * 0x14" (pointer_expression "*(int *)(param_2 + 0xfc)" (* "*") (cast_expression "(int *)(param_2 + 0xfc)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_2 + 0xfc)" (( "(") (binary_expression "param_2 + 0xfc" (identifier "param_2") (+ "+") (number_literal "0xfc")) () ")")))) (* "*") (number_literal "0x14"))) () ")")))) (; ";")) (do_statement "do {\n      uVar3 = *(undefined1 *)(param_3 + 4);\n      *puVar4 = *param_3;\n      *(undefined1 *)(puVar4 + 1) = 0;\n      uVar3 = FUN_000315a0(param_1,uVar3);\n      iVar2 = param_3[3];\n      *(undefined1 *)(puVar4 + 4) = uVar3;\n      if (iVar2 == 0) {\n        puVar4[2] = 0;\n        puVar4[3] = 0;\nLAB_00033d14:\n        puVar4 = puVar4 + 5;\n        *(int *)(param_2 + 0xfc) = *(int *)(param_2 + 0xfc) + 1;\n      }\n      else {\n        iVar2 = FUN_0001c240(param_1);\n        puVar4[2] = iVar2;\n        if (iVar2 != 0) {\n          uVar5 = param_3[3];\n          (*(code *)PTR_memcpy_000534c4)(iVar2,param_3[2],uVar5);\n          puVar4[3] = uVar5;\n          goto LAB_00033d14;\n        }\n        FUN_0001a23c(param_1,puVar1 + 0x15b8,1);\n      }\n      param_4 = param_4 + -1;\n      param_3 = param_3 + 5;\n    } while (param_4 != 0);" (do "do") (compound_statement "{\n      uVar3 = *(undefined1 *)(param_3 + 4);\n      *puVar4 = *param_3;\n      *(undefined1 *)(puVar4 + 1) = 0;\n      uVar3 = FUN_000315a0(param_1,uVar3);\n      iVar2 = param_3[3];\n      *(undefined1 *)(puVar4 + 4) = uVar3;\n      if (iVar2 == 0) {\n        puVar4[2] = 0;\n        puVar4[3] = 0;\nLAB_00033d14:\n        puVar4 = puVar4 + 5;\n        *(int *)(param_2 + 0xfc) = *(int *)(param_2 + 0xfc) + 1;\n      }\n      else {\n        iVar2 = FUN_0001c240(param_1);\n        puVar4[2] = iVar2;\n        if (iVar2 != 0) {\n          uVar5 = param_3[3];\n          (*(code *)PTR_memcpy_000534c4)(iVar2,param_3[2],uVar5);\n          puVar4[3] = uVar5;\n          goto LAB_00033d14;\n        }\n        FUN_0001a23c(param_1,puVar1 + 0x15b8,1);\n      }\n      param_4 = param_4 + -1;\n      param_3 = param_3 + 5;\n    }" ({ "{") (expression_statement "uVar3 = *(undefined1 *)(param_3 + 4);" (assignment_expression "uVar3 = *(undefined1 *)(param_3 + 4)" (identifier "uVar3") (= "=") (pointer_expression "*(undefined1 *)(param_3 + 4)" (* "*") (cast_expression "(undefined1 *)(param_3 + 4)" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_3 + 4)" (( "(") (binary_expression "param_3 + 4" (identifier "param_3") (+ "+") (number_literal "4")) () ")"))))) (; ";")) (expression_statement "*puVar4 = *param_3;" (assignment_expression "*puVar4 = *param_3" (pointer_expression "*puVar4" (* "*") (identifier "puVar4")) (= "=") (pointer_expression "*param_3" (* "*") (identifier "param_3"))) (; ";")) (expression_statement "*(undefined1 *)(puVar4 + 1) = 0;" (assignment_expression "*(undefined1 *)(puVar4 + 1) = 0" (pointer_expression "*(undefined1 *)(puVar4 + 1)" (* "*") (cast_expression "(undefined1 *)(puVar4 + 1)" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(puVar4 + 1)" (( "(") (binary_expression "puVar4 + 1" (identifier "puVar4") (+ "+") (number_literal "1")) () ")")))) (= "=") (number_literal "0")) (; ";")) (expression_statement "uVar3 = FUN_000315a0(param_1,uVar3);" (assignment_expression "uVar3 = FUN_000315a0(param_1,uVar3)" (identifier "uVar3") (= "=") (call_expression "FUN_000315a0(param_1,uVar3)" (identifier "FUN_000315a0") (argument_list "(param_1,uVar3)" (( "(") (identifier "param_1") (, ",") (identifier "uVar3") () ")")))) (; ";")) (expression_statement "iVar2 = param_3[3];" (assignment_expression "iVar2 = param_3[3]" (identifier "iVar2") (= "=") (subscript_expression "param_3[3]" (identifier "param_3") ([ "[") (number_literal "3") (] "]"))) (; ";")) (expression_statement "*(undefined1 *)(puVar4 + 4) = uVar3;" (assignment_expression "*(undefined1 *)(puVar4 + 4) = uVar3" (pointer_expression "*(undefined1 *)(puVar4 + 4)" (* "*") (cast_expression "(undefined1 *)(puVar4 + 4)" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(puVar4 + 4)" (( "(") (binary_expression "puVar4 + 4" (identifier "puVar4") (+ "+") (number_literal "4")) () ")")))) (= "=") (identifier "uVar3")) (; ";")) (if_statement "if (iVar2 == 0) {\n        puVar4[2] = 0;\n        puVar4[3] = 0;\nLAB_00033d14:\n        puVar4 = puVar4 + 5;\n        *(int *)(param_2 + 0xfc) = *(int *)(param_2 + 0xfc) + 1;\n      }\n      else {\n        iVar2 = FUN_0001c240(param_1);\n        puVar4[2] = iVar2;\n        if (iVar2 != 0) {\n          uVar5 = param_3[3];\n          (*(code *)PTR_memcpy_000534c4)(iVar2,param_3[2],uVar5);\n          puVar4[3] = uVar5;\n          goto LAB_00033d14;\n        }\n        FUN_0001a23c(param_1,puVar1 + 0x15b8,1);\n      }" (if "if") (parenthesized_expression "(iVar2 == 0)" (( "(") (binary_expression "iVar2 == 0" (identifier "iVar2") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n        puVar4[2] = 0;\n        puVar4[3] = 0;\nLAB_00033d14:\n        puVar4 = puVar4 + 5;\n        *(int *)(param_2 + 0xfc) = *(int *)(param_2 + 0xfc) + 1;\n      }" ({ "{") (expression_statement "puVar4[2] = 0;" (assignment_expression "puVar4[2] = 0" (subscript_expression "puVar4[2]" (identifier "puVar4") ([ "[") (number_literal "2") (] "]")) (= "=") (number_literal "0")) (; ";")) (expression_statement "puVar4[3] = 0;" (assignment_expression "puVar4[3] = 0" (subscript_expression "puVar4[3]" (identifier "puVar4") ([ "[") (number_literal "3") (] "]")) (= "=") (number_literal "0")) (; ";")) (labeled_statement "LAB_00033d14:\n        puVar4 = puVar4 + 5;" (statement_identifier "LAB_00033d14") (: ":") (expression_statement "puVar4 = puVar4 + 5;" (assignment_expression "puVar4 = puVar4 + 5" (identifier "puVar4") (= "=") (binary_expression "puVar4 + 5" (identifier "puVar4") (+ "+") (number_literal "5"))) (; ";"))) (expression_statement "*(int *)(param_2 + 0xfc) = *(int *)(param_2 + 0xfc) + 1;" (assignment_expression "*(int *)(param_2 + 0xfc) = *(int *)(param_2 + 0xfc) + 1" (pointer_expression "*(int *)(param_2 + 0xfc)" (* "*") (cast_expression "(int *)(param_2 + 0xfc)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_2 + 0xfc)" (( "(") (binary_expression "param_2 + 0xfc" (identifier "param_2") (+ "+") (number_literal "0xfc")) () ")")))) (= "=") (binary_expression "*(int *)(param_2 + 0xfc) + 1" (pointer_expression "*(int *)(param_2 + 0xfc)" (* "*") (cast_expression "(int *)(param_2 + 0xfc)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_2 + 0xfc)" (( "(") (binary_expression "param_2 + 0xfc" (identifier "param_2") (+ "+") (number_literal "0xfc")) () ")")))) (+ "+") (number_literal "1"))) (; ";")) (} "}")) (else_clause "else {\n        iVar2 = FUN_0001c240(param_1);\n        puVar4[2] = iVar2;\n        if (iVar2 != 0) {\n          uVar5 = param_3[3];\n          (*(code *)PTR_memcpy_000534c4)(iVar2,param_3[2],uVar5);\n          puVar4[3] = uVar5;\n          goto LAB_00033d14;\n        }\n        FUN_0001a23c(param_1,puVar1 + 0x15b8,1);\n      }" (else "else") (compound_statement "{\n        iVar2 = FUN_0001c240(param_1);\n        puVar4[2] = iVar2;\n        if (iVar2 != 0) {\n          uVar5 = param_3[3];\n          (*(code *)PTR_memcpy_000534c4)(iVar2,param_3[2],uVar5);\n          puVar4[3] = uVar5;\n          goto LAB_00033d14;\n        }\n        FUN_0001a23c(param_1,puVar1 + 0x15b8,1);\n      }" ({ "{") (expression_statement "iVar2 = FUN_0001c240(param_1);" (assignment_expression "iVar2 = FUN_0001c240(param_1)" (identifier "iVar2") (= "=") (call_expression "FUN_0001c240(param_1)" (identifier "FUN_0001c240") (argument_list "(param_1)" (( "(") (identifier "param_1") () ")")))) (; ";")) (expression_statement "puVar4[2] = iVar2;" (assignment_expression "puVar4[2] = iVar2" (subscript_expression "puVar4[2]" (identifier "puVar4") ([ "[") (number_literal "2") (] "]")) (= "=") (identifier "iVar2")) (; ";")) (if_statement "if (iVar2 != 0) {\n          uVar5 = param_3[3];\n          (*(code *)PTR_memcpy_000534c4)(iVar2,param_3[2],uVar5);\n          puVar4[3] = uVar5;\n          goto LAB_00033d14;\n        }" (if "if") (parenthesized_expression "(iVar2 != 0)" (( "(") (binary_expression "iVar2 != 0" (identifier "iVar2") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n          uVar5 = param_3[3];\n          (*(code *)PTR_memcpy_000534c4)(iVar2,param_3[2],uVar5);\n          puVar4[3] = uVar5;\n          goto LAB_00033d14;\n        }" ({ "{") (expression_statement "uVar5 = param_3[3];" (assignment_expression "uVar5 = param_3[3]" (identifier "uVar5") (= "=") (subscript_expression "param_3[3]" (identifier "param_3") ([ "[") (number_literal "3") (] "]"))) (; ";")) (expression_statement "(*(code *)PTR_memcpy_000534c4)(iVar2,param_3[2],uVar5);" (call_expression "(*(code *)PTR_memcpy_000534c4)(iVar2,param_3[2],uVar5)" (parenthesized_expression "(*(code *)PTR_memcpy_000534c4)" (( "(") (pointer_expression "*(code *)PTR_memcpy_000534c4" (* "*") (cast_expression "(code *)PTR_memcpy_000534c4" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_memcpy_000534c4"))) () ")")) (argument_list "(iVar2,param_3[2],uVar5)" (( "(") (identifier "iVar2") (, ",") (subscript_expression "param_3[2]" (identifier "param_3") ([ "[") (number_literal "2") (] "]")) (, ",") (identifier "uVar5") () ")"))) (; ";")) (expression_statement "puVar4[3] = uVar5;" (assignment_expression "puVar4[3] = uVar5" (subscript_expression "puVar4[3]" (identifier "puVar4") ([ "[") (number_literal "3") (] "]")) (= "=") (identifier "uVar5")) (; ";")) (goto_statement "goto LAB_00033d14;" (goto "goto") (statement_identifier "LAB_00033d14") (; ";")) (} "}"))) (expression_statement "FUN_0001a23c(param_1,puVar1 + 0x15b8,1);" (call_expression "FUN_0001a23c(param_1,puVar1 + 0x15b8,1)" (identifier "FUN_0001a23c") (argument_list "(param_1,puVar1 + 0x15b8,1)" (( "(") (identifier "param_1") (, ",") (binary_expression "puVar1 + 0x15b8" (identifier "puVar1") (+ "+") (number_literal "0x15b8")) (, ",") (number_literal "1") () ")"))) (; ";")) (} "}")))) (expression_statement "param_4 = param_4 + -1;" (assignment_expression "param_4 = param_4 + -1" (identifier "param_4") (= "=") (binary_expression "param_4 + -1" (identifier "param_4") (+ "+") (number_literal "-1"))) (; ";")) (expression_statement "param_3 = param_3 + 5;" (assignment_expression "param_3 = param_3 + 5" (identifier "param_3") (= "=") (binary_expression "param_3 + 5" (identifier "param_3") (+ "+") (number_literal "5"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(param_4 != 0)" (( "(") (binary_expression "param_4 != 0" (identifier "param_4") (!= "!=") (number_literal "0")) () ")")) (; ";")) (} "}"))) (return_statement "return;" (return "return") (; ";")) (} "}")))

void function_1
               (type_1 var_1,type_2 var_2,type_3 var_4,
               int var_3)

{
  type_4 bVar1;
  type_5 *var_13;
  type_6 var_6;
  type_7 pVar5;
  type_7 *var_12;
  type_8 var_10;
  size_t sVar6;
  
  if (var_1 == (type_1)0x0) {
    return;
  }
  if (((var_2 != (type_2)0x0) && (0 < var_3)) &&
     (var_4 != (type_3)0x0)) {
    var_6 = (type_6)
             var_5(var_1,var_2->unknown_chunks,var_2->unknown_chunks_num,
                               var_3,0x14);
    if (var_6 == (type_6)0x0) {
      var_7(var_1,var_8 + 0x15a0,1);
      return;
    }
    (*(type_9 *)PTR_png_free_00053324)(var_1,var_2->unknown_chunks);
    var_2->unknown_chunks = var_6;
    var_13 = var_8;
    var_2->free_me = var_2->free_me | 0x200;
    var_6 = var_6 + var_2->unknown_chunks_num;
    do {
      bVar1 = var_4->location;
      *(type_10 *)var_6->name = *(type_10 *)var_4->name;
      var_6->name[4] = '\0';
      pVar5 = var_9(var_1,(type_11)bVar1);
      var_10 = var_4->var_10;
      var_6->location = pVar5;
      if (var_10 == 0) {
        var_6->data = (type_7 *)0x0;
        var_6->var_10 = 0;
LAB_00033d14:
        var_6 = var_6 + 1;
        var_2->unknown_chunks_num = var_2->unknown_chunks_num + 1;
      }
      else {
        var_12 = (type_7 *)var_11(var_1,var_10);
        var_6->data = var_12;
        if (var_12 != (type_7 *)0x0) {
          sVar6 = var_4->var_10;
          (*(type_9 *)PTR_memcpy_000534c4)(var_12,var_4->data,sVar6);
          var_6->var_10 = sVar6;
          goto LAB_00033d14;
        }
        var_7(var_1,var_13 + 0x15b8,1);
      }
      var_3 = var_3 + -1;
      var_4 = var_4 + 1;
    } while (var_3 != 0);
  }
  return;
}


(translation_unit (function_definition type: (primitive_type) 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: (pointer_declarator declarator: (identifier))) (parameter_declaration type: (primitive_type) declarator: (identifier)))) body: (compound_statement (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (type_identifier) declarator: (identifier)) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (return_statement))) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) right: (parenthesized_expression (binary_expression left: (number_literal) right: (identifier))))) right: (parenthesized_expression (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (number_literal)))))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) (identifier) (number_literal))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (binary_expression left: (identifier) right: (number_literal)) (number_literal)))) (return_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) (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal)))))))) (expression_statement (assignment_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: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (binary_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (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))))))) (do_statement body: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (pointer_expression argument: (identifier)))) (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier))))) (expression_statement (assignment_expression left: (identifier) right: (subscript_expression argument: (identifier) index: (number_literal)))) (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (identifier))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (number_literal))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (number_literal))) (labeled_statement label: (statement_identifier) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal))))) (expression_statement (assignment_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: (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))))) alternative: (else_clause (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier))))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (identifier))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (subscript_expression argument: (identifier) index: (number_literal)))) (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) (subscript_expression argument: (identifier) index: (number_literal)) (identifier)))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (identifier))) (goto_statement label: (statement_identifier)))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (binary_expression left: (identifier) right: (number_literal)) (number_literal))))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal))))) condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal)))))) (return_statement))))

void MASKED(int param_1,int param_2,undefined4 *param_3,int param_4)

{
  undefined *puVar1;
  int iVar2;
  undefined1 uVar3;
  undefined4 *puVar4;
  undefined4 uVar5;
  
  if (param_1 == 0) {
    return;
  }
  if (((param_2 != 0) && (0 < param_4)) && (param_3 != (undefined4 *)0x0)) {
    iVar2 = FUN_0001c2ec(param_1,*(undefined4 *)(param_2 + 0xf8),*(undefined4 *)(param_2 + 0xfc),
                         param_4,0x14);
    if (iVar2 == 0) {
      FUN_0001a23c(param_1,PTR_s_nt_0005301c + 0x15a0,1);
      return;
    }
    (*(code *)PTR_png_free_00053324)(param_1,*(undefined4 *)(param_2 + 0xf8));
    *(int *)(param_2 + 0xf8) = iVar2;
    puVar1 = PTR_s_nt_0005301c;
    *(uint *)(param_2 + 0xf4) = *(uint *)(param_2 + 0xf4) | 0x200;
    puVar4 = (undefined4 *)(iVar2 + *(int *)(param_2 + 0xfc) * 0x14);
    do {
      uVar3 = *(undefined1 *)(param_3 + 4);
      *puVar4 = *param_3;
      *(undefined1 *)(puVar4 + 1) = 0;
      uVar3 = FUN_000315a0(param_1,uVar3);
      iVar2 = param_3[3];
      *(undefined1 *)(puVar4 + 4) = uVar3;
      if (iVar2 == 0) {
        puVar4[2] = 0;
        puVar4[3] = 0;
LAB_00033d14:
        puVar4 = puVar4 + 5;
        *(int *)(param_2 + 0xfc) = *(int *)(param_2 + 0xfc) + 1;
      }
      else {
        iVar2 = FUN_0001c240(param_1);
        puVar4[2] = iVar2;
        if (iVar2 != 0) {
          uVar5 = param_3[3];
          (*(code *)PTR_memcpy_000534c4)(iVar2,param_3[2],uVar5);
          puVar4[3] = uVar5;
          goto LAB_00033d14;
        }
        FUN_0001a23c(param_1,puVar1 + 0x15b8,1);
      }
      param_4 = param_4 + -1;
      param_3 = param_3 + 5;
    } while (param_4 != 0);
  }
  return;
}

