
/* DWARF original prototype: void write_unknown_chunks(png_structrp png_ptr, png_const_inforp
   info_ptr, uint where, png_const_inforp info_ptr) */

void write_unknown_chunks
               (png_structrp png_ptr,png_const_inforp info_ptr,uint where,
               png_const_inforp info_ptr_1)

{
  int iVar1;
  png_uint_32 pVar2;
  undefined *puVar3;
  uint uVar4;
  
  iVar1 = *(int *)where;
  pVar2 = info_ptr->width;
  if (pVar2 + iVar1 * 0x14 <= pVar2) {
    return;
  }
  puVar3 = PTR_s_nt_0005301c + 0x1bb0;
  uVar4 = pVar2;
  do {
    while (((uint)*(byte *)(uVar4 + 0x10) & (uint)info_ptr_1) == 0) {
      uVar4 = uVar4 + 0x14;
      if (pVar2 + iVar1 * 0x14 <= uVar4) {
        return;
      }
    }
    iVar1 = (*(code *)PTR_png_handle_as_unknown_00053460)(png_ptr,uVar4);
    if ((iVar1 == 1) ||
       ((((*(byte *)(uVar4 + 3) & 0x20) == 0 && (iVar1 != 3)) &&
        ((iVar1 != 0 || (png_ptr->unknown_default != 3)))))) {
      pVar2 = info_ptr->width;
      iVar1 = *(int *)where;
    }
    else {
      iVar1 = *(int *)(uVar4 + 0xc);
      if (iVar1 == 0) {
        (*(code *)PTR_png_warning_00053440)(png_ptr,puVar3);
        iVar1 = *(int *)(uVar4 + 0xc);
      }
      (*(code *)PTR_png_write_chunk_00053424)(png_ptr,uVar4,*(undefined4 *)(uVar4 + 8),iVar1);
      pVar2 = info_ptr->width;
      iVar1 = *(int *)where;
    }
    uVar4 = uVar4 + 0x14;
  } while (uVar4 < pVar2 + iVar1 * 0x14);
  return;
}



void FUN_0003534c(int param_1,uint *param_2,int *param_3,byte param_4)

{
  int iVar1;
  uint uVar2;
  undefined *puVar3;
  uint uVar4;
  
  iVar1 = *param_3;
  uVar2 = *param_2;
  if (uVar2 + iVar1 * 0x14 <= uVar2) {
    return;
  }
  puVar3 = PTR_s_nt_0005301c + 0x1bb0;
  uVar4 = uVar2;
  do {
    while ((*(byte *)(uVar4 + 0x10) & param_4) == 0) {
      uVar4 = uVar4 + 0x14;
      if (uVar2 + iVar1 * 0x14 <= uVar4) {
        return;
      }
    }
    iVar1 = (*(code *)PTR_png_handle_as_unknown_00053460)(param_1,uVar4);
    if ((iVar1 == 1) ||
       ((((*(byte *)(uVar4 + 3) & 0x20) == 0 && (iVar1 != 3)) &&
        ((iVar1 != 0 || (*(int *)(param_1 + 0x2ec) != 3)))))) {
      uVar2 = *param_2;
      iVar1 = *param_3;
    }
    else {
      iVar1 = *(int *)(uVar4 + 0xc);
      if (iVar1 == 0) {
        (*(code *)PTR_png_warning_00053440)(param_1,puVar3);
        iVar1 = *(int *)(uVar4 + 0xc);
      }
      (*(code *)PTR_png_write_chunk_00053424)(param_1,uVar4,*(undefined4 *)(uVar4 + 8),iVar1);
      uVar2 = *param_2;
      iVar1 = *param_3;
    }
    uVar4 = uVar4 + 0x14;
  } while (uVar4 < uVar2 + iVar1 * 0x14);
  return;
}


lui gp,0x2
addiu gp,gp,0x5ca4
addu gp,gp,t9
lw v1,0x0(a2)
lw t0,0x0(a1)
sll v0,v1,0x2
addu v0,v0,v1
sll v0,v0,0x2
addu v0,t0,v0
sltu v0,t0,v0
beq v0,zero,0x000354d8
_nop
addiu sp,sp,-0x40
sw s4,0x2c(sp)
sw gp,0x10(sp)
sw s7,0x38(sp)
or s7,a3,zero
sw s6,0x34(sp)
or s6,t0,zero
sw s5,0x30(sp)
li s5,0x3
sw s3,0x28(sp)
li s3,0x1
sw s2,0x24(sp)
or s2,a1,zero
sw s1,0x20(sp)
or s1,a2,zero
sw s0,0x1c(sp)
or s0,a0,zero
sw ra,0x3c(sp)
lw s4,-0x7fd4(gp)
b 0x000353ec
_addiu s4,s4,0x1bb0
addiu s6,s6,0x14
addu v0,v0,v1
sll v0,v0,0x2
addu v0,t0,v0
sltu v0,s6,v0
beq v0,zero,0x00035468
_lw ra,0x3c(sp)
lbu v0,0x10(s6)
and v0,v0,s7
beq v0,zero,0x000353d0
_sll v0,v1,0x2
lw t9,-0x7b90(gp)
or a1,s6,zero
jalr t9
_or a0,s0,zero
beq v0,s3,0x00035440
_lw gp,0x10(sp)
lbu v1,0x3(s6)
andi v1,v1,0x20
bne v1,zero,0x00035490
_nop
beq v0,s5,0x00035490
_nop
bne v0,zero,0x00035440
_nop
lw v0,0x2ec(s0)
beq v0,s5,0x00035490
_nop
lw t0,0x0(s2)
lw v1,0x0(s1)
sll v0,v1,0x2
addiu s6,s6,0x14
addu v0,v0,v1
sll v0,v0,0x2
addu v0,t0,v0
sltu v0,s6,v0
bne v0,zero,0x000353ec
_lw ra,0x3c(sp)
lw s7,0x38(sp)
lw s6,0x34(sp)
lw s5,0x30(sp)
lw s4,0x2c(sp)
lw s3,0x28(sp)
lw s2,0x24(sp)
lw s1,0x20(sp)
lw s0,0x1c(sp)
jr ra
_addiu sp,sp,0x40
lw a3,0xc(s6)
beq a3,zero,0x000354c0
_lw t9,-0x7bb0(gp)
lw t9,-0x7bcc(gp)
or a1,s6,zero
lw a2,0x8(s6)
jalr t9
_or a0,s0,zero
lw gp,0x10(sp)
lw t0,0x0(s2)
b 0x00035448
_lw v1,0x0(s1)
or a1,s4,zero
jalr t9
_or a0,s0,zero
lw gp,0x10(sp)
b 0x0003549c
_lw a3,0xc(s6)
jr ra
_nop
(translation_unit "void FUN_0003534c(int param_1,uint *param_2,int *param_3,byte param_4)\n\n{\n  int iVar1;\n  uint uVar2;\n  undefined *puVar3;\n  uint uVar4;\n  \n  iVar1 = *param_3;\n  uVar2 = *param_2;\n  if (uVar2 + iVar1 * 0x14 <= uVar2) {\n    return;\n  }\n  puVar3 = PTR_s_nt_0005301c + 0x1bb0;\n  uVar4 = uVar2;\n  do {\n    while ((*(byte *)(uVar4 + 0x10) & param_4) == 0) {\n      uVar4 = uVar4 + 0x14;\n      if (uVar2 + iVar1 * 0x14 <= uVar4) {\n        return;\n      }\n    }\n    iVar1 = (*(code *)PTR_png_handle_as_unknown_00053460)(param_1,uVar4);\n    if ((iVar1 == 1) ||\n       ((((*(byte *)(uVar4 + 3) & 0x20) == 0 && (iVar1 != 3)) &&\n        ((iVar1 != 0 || (*(int *)(param_1 + 0x2ec) != 3)))))) {\n      uVar2 = *param_2;\n      iVar1 = *param_3;\n    }\n    else {\n      iVar1 = *(int *)(uVar4 + 0xc);\n      if (iVar1 == 0) {\n        (*(code *)PTR_png_warning_00053440)(param_1,puVar3);\n        iVar1 = *(int *)(uVar4 + 0xc);\n      }\n      (*(code *)PTR_png_write_chunk_00053424)(param_1,uVar4,*(undefined4 *)(uVar4 + 8),iVar1);\n      uVar2 = *param_2;\n      iVar1 = *param_3;\n    }\n    uVar4 = uVar4 + 0x14;\n  } while (uVar4 < uVar2 + iVar1 * 0x14);\n  return;\n}\n\n" (function_definition "void FUN_0003534c(int param_1,uint *param_2,int *param_3,byte param_4)\n\n{\n  int iVar1;\n  uint uVar2;\n  undefined *puVar3;\n  uint uVar4;\n  \n  iVar1 = *param_3;\n  uVar2 = *param_2;\n  if (uVar2 + iVar1 * 0x14 <= uVar2) {\n    return;\n  }\n  puVar3 = PTR_s_nt_0005301c + 0x1bb0;\n  uVar4 = uVar2;\n  do {\n    while ((*(byte *)(uVar4 + 0x10) & param_4) == 0) {\n      uVar4 = uVar4 + 0x14;\n      if (uVar2 + iVar1 * 0x14 <= uVar4) {\n        return;\n      }\n    }\n    iVar1 = (*(code *)PTR_png_handle_as_unknown_00053460)(param_1,uVar4);\n    if ((iVar1 == 1) ||\n       ((((*(byte *)(uVar4 + 3) & 0x20) == 0 && (iVar1 != 3)) &&\n        ((iVar1 != 0 || (*(int *)(param_1 + 0x2ec) != 3)))))) {\n      uVar2 = *param_2;\n      iVar1 = *param_3;\n    }\n    else {\n      iVar1 = *(int *)(uVar4 + 0xc);\n      if (iVar1 == 0) {\n        (*(code *)PTR_png_warning_00053440)(param_1,puVar3);\n        iVar1 = *(int *)(uVar4 + 0xc);\n      }\n      (*(code *)PTR_png_write_chunk_00053424)(param_1,uVar4,*(undefined4 *)(uVar4 + 8),iVar1);\n      uVar2 = *param_2;\n      iVar1 = *param_3;\n    }\n    uVar4 = uVar4 + 0x14;\n  } while (uVar4 < uVar2 + iVar1 * 0x14);\n  return;\n}" primitive_type (function_declarator "FUN_0003534c(int param_1,uint *param_2,int *param_3,byte param_4)" identifier (parameter_list "(int param_1,uint *param_2,int *param_3,byte param_4)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "uint *param_2" type_identifier (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "int *param_3" primitive_type (pointer_declarator "*param_3" * identifier)) , (parameter_declaration "byte param_4" type_identifier identifier) ))) (compound_statement "{\n  int iVar1;\n  uint uVar2;\n  undefined *puVar3;\n  uint uVar4;\n  \n  iVar1 = *param_3;\n  uVar2 = *param_2;\n  if (uVar2 + iVar1 * 0x14 <= uVar2) {\n    return;\n  }\n  puVar3 = PTR_s_nt_0005301c + 0x1bb0;\n  uVar4 = uVar2;\n  do {\n    while ((*(byte *)(uVar4 + 0x10) & param_4) == 0) {\n      uVar4 = uVar4 + 0x14;\n      if (uVar2 + iVar1 * 0x14 <= uVar4) {\n        return;\n      }\n    }\n    iVar1 = (*(code *)PTR_png_handle_as_unknown_00053460)(param_1,uVar4);\n    if ((iVar1 == 1) ||\n       ((((*(byte *)(uVar4 + 3) & 0x20) == 0 && (iVar1 != 3)) &&\n        ((iVar1 != 0 || (*(int *)(param_1 + 0x2ec) != 3)))))) {\n      uVar2 = *param_2;\n      iVar1 = *param_3;\n    }\n    else {\n      iVar1 = *(int *)(uVar4 + 0xc);\n      if (iVar1 == 0) {\n        (*(code *)PTR_png_warning_00053440)(param_1,puVar3);\n        iVar1 = *(int *)(uVar4 + 0xc);\n      }\n      (*(code *)PTR_png_write_chunk_00053424)(param_1,uVar4,*(undefined4 *)(uVar4 + 8),iVar1);\n      uVar2 = *param_2;\n      iVar1 = *param_3;\n    }\n    uVar4 = uVar4 + 0x14;\n  } while (uVar4 < uVar2 + iVar1 * 0x14);\n  return;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "uint uVar2;" type_identifier identifier ;) (declaration "undefined *puVar3;" type_identifier (pointer_declarator "*puVar3" * identifier) ;) (declaration "uint uVar4;" type_identifier identifier ;) (expression_statement "iVar1 = *param_3;" (assignment_expression "iVar1 = *param_3" identifier = (pointer_expression "*param_3" * identifier)) ;) (expression_statement "uVar2 = *param_2;" (assignment_expression "uVar2 = *param_2" identifier = (pointer_expression "*param_2" * identifier)) ;) (if_statement "if (uVar2 + iVar1 * 0x14 <= uVar2) {\n    return;\n  }" if (parenthesized_expression "(uVar2 + iVar1 * 0x14 <= uVar2)" ( (binary_expression "uVar2 + iVar1 * 0x14 <= uVar2" (binary_expression "uVar2 + iVar1 * 0x14" identifier + (binary_expression "iVar1 * 0x14" identifier * number_literal)) <= identifier) )) (compound_statement "{\n    return;\n  }" { (return_statement "return;" return ;) })) (expression_statement "puVar3 = PTR_s_nt_0005301c + 0x1bb0;" (assignment_expression "puVar3 = PTR_s_nt_0005301c + 0x1bb0" identifier = (binary_expression "PTR_s_nt_0005301c + 0x1bb0" identifier + number_literal)) ;) (expression_statement "uVar4 = uVar2;" (assignment_expression "uVar4 = uVar2" identifier = identifier) ;) (do_statement "do {\n    while ((*(byte *)(uVar4 + 0x10) & param_4) == 0) {\n      uVar4 = uVar4 + 0x14;\n      if (uVar2 + iVar1 * 0x14 <= uVar4) {\n        return;\n      }\n    }\n    iVar1 = (*(code *)PTR_png_handle_as_unknown_00053460)(param_1,uVar4);\n    if ((iVar1 == 1) ||\n       ((((*(byte *)(uVar4 + 3) & 0x20) == 0 && (iVar1 != 3)) &&\n        ((iVar1 != 0 || (*(int *)(param_1 + 0x2ec) != 3)))))) {\n      uVar2 = *param_2;\n      iVar1 = *param_3;\n    }\n    else {\n      iVar1 = *(int *)(uVar4 + 0xc);\n      if (iVar1 == 0) {\n        (*(code *)PTR_png_warning_00053440)(param_1,puVar3);\n        iVar1 = *(int *)(uVar4 + 0xc);\n      }\n      (*(code *)PTR_png_write_chunk_00053424)(param_1,uVar4,*(undefined4 *)(uVar4 + 8),iVar1);\n      uVar2 = *param_2;\n      iVar1 = *param_3;\n    }\n    uVar4 = uVar4 + 0x14;\n  } while (uVar4 < uVar2 + iVar1 * 0x14);" do (compound_statement "{\n    while ((*(byte *)(uVar4 + 0x10) & param_4) == 0) {\n      uVar4 = uVar4 + 0x14;\n      if (uVar2 + iVar1 * 0x14 <= uVar4) {\n        return;\n      }\n    }\n    iVar1 = (*(code *)PTR_png_handle_as_unknown_00053460)(param_1,uVar4);\n    if ((iVar1 == 1) ||\n       ((((*(byte *)(uVar4 + 3) & 0x20) == 0 && (iVar1 != 3)) &&\n        ((iVar1 != 0 || (*(int *)(param_1 + 0x2ec) != 3)))))) {\n      uVar2 = *param_2;\n      iVar1 = *param_3;\n    }\n    else {\n      iVar1 = *(int *)(uVar4 + 0xc);\n      if (iVar1 == 0) {\n        (*(code *)PTR_png_warning_00053440)(param_1,puVar3);\n        iVar1 = *(int *)(uVar4 + 0xc);\n      }\n      (*(code *)PTR_png_write_chunk_00053424)(param_1,uVar4,*(undefined4 *)(uVar4 + 8),iVar1);\n      uVar2 = *param_2;\n      iVar1 = *param_3;\n    }\n    uVar4 = uVar4 + 0x14;\n  }" { (while_statement "while ((*(byte *)(uVar4 + 0x10) & param_4) == 0) {\n      uVar4 = uVar4 + 0x14;\n      if (uVar2 + iVar1 * 0x14 <= uVar4) {\n        return;\n      }\n    }" while (parenthesized_expression "((*(byte *)(uVar4 + 0x10) & param_4) == 0)" ( (binary_expression "(*(byte *)(uVar4 + 0x10) & param_4) == 0" (parenthesized_expression "(*(byte *)(uVar4 + 0x10) & param_4)" ( (binary_expression "*(byte *)(uVar4 + 0x10) & param_4" (pointer_expression "*(byte *)(uVar4 + 0x10)" * (cast_expression "(byte *)(uVar4 + 0x10)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(uVar4 + 0x10)" ( (binary_expression "uVar4 + 0x10" identifier + number_literal) )))) & identifier) )) == number_literal) )) (compound_statement "{\n      uVar4 = uVar4 + 0x14;\n      if (uVar2 + iVar1 * 0x14 <= uVar4) {\n        return;\n      }\n    }" { (expression_statement "uVar4 = uVar4 + 0x14;" (assignment_expression "uVar4 = uVar4 + 0x14" identifier = (binary_expression "uVar4 + 0x14" identifier + number_literal)) ;) (if_statement "if (uVar2 + iVar1 * 0x14 <= uVar4) {\n        return;\n      }" if (parenthesized_expression "(uVar2 + iVar1 * 0x14 <= uVar4)" ( (binary_expression "uVar2 + iVar1 * 0x14 <= uVar4" (binary_expression "uVar2 + iVar1 * 0x14" identifier + (binary_expression "iVar1 * 0x14" identifier * number_literal)) <= identifier) )) (compound_statement "{\n        return;\n      }" { (return_statement "return;" return ;) })) })) (expression_statement "iVar1 = (*(code *)PTR_png_handle_as_unknown_00053460)(param_1,uVar4);" (assignment_expression "iVar1 = (*(code *)PTR_png_handle_as_unknown_00053460)(param_1,uVar4)" identifier = (call_expression "(*(code *)PTR_png_handle_as_unknown_00053460)(param_1,uVar4)" (parenthesized_expression "(*(code *)PTR_png_handle_as_unknown_00053460)" ( (pointer_expression "*(code *)PTR_png_handle_as_unknown_00053460" * (cast_expression "(code *)PTR_png_handle_as_unknown_00053460" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(param_1,uVar4)" ( identifier , identifier )))) ;) (if_statement "if ((iVar1 == 1) ||\n       ((((*(byte *)(uVar4 + 3) & 0x20) == 0 && (iVar1 != 3)) &&\n        ((iVar1 != 0 || (*(int *)(param_1 + 0x2ec) != 3)))))) {\n      uVar2 = *param_2;\n      iVar1 = *param_3;\n    }\n    else {\n      iVar1 = *(int *)(uVar4 + 0xc);\n      if (iVar1 == 0) {\n        (*(code *)PTR_png_warning_00053440)(param_1,puVar3);\n        iVar1 = *(int *)(uVar4 + 0xc);\n      }\n      (*(code *)PTR_png_write_chunk_00053424)(param_1,uVar4,*(undefined4 *)(uVar4 + 8),iVar1);\n      uVar2 = *param_2;\n      iVar1 = *param_3;\n    }" if (parenthesized_expression "((iVar1 == 1) ||\n       ((((*(byte *)(uVar4 + 3) & 0x20) == 0 && (iVar1 != 3)) &&\n        ((iVar1 != 0 || (*(int *)(param_1 + 0x2ec) != 3))))))" ( (binary_expression "(iVar1 == 1) ||\n       ((((*(byte *)(uVar4 + 3) & 0x20) == 0 && (iVar1 != 3)) &&\n        ((iVar1 != 0 || (*(int *)(param_1 + 0x2ec) != 3)))))" (parenthesized_expression "(iVar1 == 1)" ( (binary_expression "iVar1 == 1" identifier == number_literal) )) || (parenthesized_expression "((((*(byte *)(uVar4 + 3) & 0x20) == 0 && (iVar1 != 3)) &&\n        ((iVar1 != 0 || (*(int *)(param_1 + 0x2ec) != 3)))))" ( (parenthesized_expression "(((*(byte *)(uVar4 + 3) & 0x20) == 0 && (iVar1 != 3)) &&\n        ((iVar1 != 0 || (*(int *)(param_1 + 0x2ec) != 3))))" ( (binary_expression "((*(byte *)(uVar4 + 3) & 0x20) == 0 && (iVar1 != 3)) &&\n        ((iVar1 != 0 || (*(int *)(param_1 + 0x2ec) != 3)))" (parenthesized_expression "((*(byte *)(uVar4 + 3) & 0x20) == 0 && (iVar1 != 3))" ( (binary_expression "(*(byte *)(uVar4 + 3) & 0x20) == 0 && (iVar1 != 3)" (binary_expression "(*(byte *)(uVar4 + 3) & 0x20) == 0" (parenthesized_expression "(*(byte *)(uVar4 + 3) & 0x20)" ( (binary_expression "*(byte *)(uVar4 + 3) & 0x20" (pointer_expression "*(byte *)(uVar4 + 3)" * (cast_expression "(byte *)(uVar4 + 3)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(uVar4 + 3)" ( (binary_expression "uVar4 + 3" identifier + number_literal) )))) & number_literal) )) == number_literal) && (parenthesized_expression "(iVar1 != 3)" ( (binary_expression "iVar1 != 3" identifier != number_literal) ))) )) && (parenthesized_expression "((iVar1 != 0 || (*(int *)(param_1 + 0x2ec) != 3)))" ( (parenthesized_expression "(iVar1 != 0 || (*(int *)(param_1 + 0x2ec) != 3))" ( (binary_expression "iVar1 != 0 || (*(int *)(param_1 + 0x2ec) != 3)" (binary_expression "iVar1 != 0" identifier != number_literal) || (parenthesized_expression "(*(int *)(param_1 + 0x2ec) != 3)" ( (binary_expression "*(int *)(param_1 + 0x2ec) != 3" (pointer_expression "*(int *)(param_1 + 0x2ec)" * (cast_expression "(int *)(param_1 + 0x2ec)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x2ec)" ( (binary_expression "param_1 + 0x2ec" identifier + number_literal) )))) != number_literal) ))) )) ))) )) ))) )) (compound_statement "{\n      uVar2 = *param_2;\n      iVar1 = *param_3;\n    }" { (expression_statement "uVar2 = *param_2;" (assignment_expression "uVar2 = *param_2" identifier = (pointer_expression "*param_2" * identifier)) ;) (expression_statement "iVar1 = *param_3;" (assignment_expression "iVar1 = *param_3" identifier = (pointer_expression "*param_3" * identifier)) ;) }) (else_clause "else {\n      iVar1 = *(int *)(uVar4 + 0xc);\n      if (iVar1 == 0) {\n        (*(code *)PTR_png_warning_00053440)(param_1,puVar3);\n        iVar1 = *(int *)(uVar4 + 0xc);\n      }\n      (*(code *)PTR_png_write_chunk_00053424)(param_1,uVar4,*(undefined4 *)(uVar4 + 8),iVar1);\n      uVar2 = *param_2;\n      iVar1 = *param_3;\n    }" else (compound_statement "{\n      iVar1 = *(int *)(uVar4 + 0xc);\n      if (iVar1 == 0) {\n        (*(code *)PTR_png_warning_00053440)(param_1,puVar3);\n        iVar1 = *(int *)(uVar4 + 0xc);\n      }\n      (*(code *)PTR_png_write_chunk_00053424)(param_1,uVar4,*(undefined4 *)(uVar4 + 8),iVar1);\n      uVar2 = *param_2;\n      iVar1 = *param_3;\n    }" { (expression_statement "iVar1 = *(int *)(uVar4 + 0xc);" (assignment_expression "iVar1 = *(int *)(uVar4 + 0xc)" identifier = (pointer_expression "*(int *)(uVar4 + 0xc)" * (cast_expression "(int *)(uVar4 + 0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(uVar4 + 0xc)" ( (binary_expression "uVar4 + 0xc" identifier + number_literal) ))))) ;) (if_statement "if (iVar1 == 0) {\n        (*(code *)PTR_png_warning_00053440)(param_1,puVar3);\n        iVar1 = *(int *)(uVar4 + 0xc);\n      }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n        (*(code *)PTR_png_warning_00053440)(param_1,puVar3);\n        iVar1 = *(int *)(uVar4 + 0xc);\n      }" { (expression_statement "(*(code *)PTR_png_warning_00053440)(param_1,puVar3);" (call_expression "(*(code *)PTR_png_warning_00053440)(param_1,puVar3)" (parenthesized_expression "(*(code *)PTR_png_warning_00053440)" ( (pointer_expression "*(code *)PTR_png_warning_00053440" * (cast_expression "(code *)PTR_png_warning_00053440" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(param_1,puVar3)" ( identifier , identifier ))) ;) (expression_statement "iVar1 = *(int *)(uVar4 + 0xc);" (assignment_expression "iVar1 = *(int *)(uVar4 + 0xc)" identifier = (pointer_expression "*(int *)(uVar4 + 0xc)" * (cast_expression "(int *)(uVar4 + 0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(uVar4 + 0xc)" ( (binary_expression "uVar4 + 0xc" identifier + number_literal) ))))) ;) })) (expression_statement "(*(code *)PTR_png_write_chunk_00053424)(param_1,uVar4,*(undefined4 *)(uVar4 + 8),iVar1);" (call_expression "(*(code *)PTR_png_write_chunk_00053424)(param_1,uVar4,*(undefined4 *)(uVar4 + 8),iVar1)" (parenthesized_expression "(*(code *)PTR_png_write_chunk_00053424)" ( (pointer_expression "*(code *)PTR_png_write_chunk_00053424" * (cast_expression "(code *)PTR_png_write_chunk_00053424" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(param_1,uVar4,*(undefined4 *)(uVar4 + 8),iVar1)" ( identifier , identifier , (pointer_expression "*(undefined4 *)(uVar4 + 8)" * (cast_expression "(undefined4 *)(uVar4 + 8)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(uVar4 + 8)" ( (binary_expression "uVar4 + 8" identifier + number_literal) )))) , identifier ))) ;) (expression_statement "uVar2 = *param_2;" (assignment_expression "uVar2 = *param_2" identifier = (pointer_expression "*param_2" * identifier)) ;) (expression_statement "iVar1 = *param_3;" (assignment_expression "iVar1 = *param_3" identifier = (pointer_expression "*param_3" * identifier)) ;) }))) (expression_statement "uVar4 = uVar4 + 0x14;" (assignment_expression "uVar4 = uVar4 + 0x14" identifier = (binary_expression "uVar4 + 0x14" identifier + number_literal)) ;) }) while (parenthesized_expression "(uVar4 < uVar2 + iVar1 * 0x14)" ( (binary_expression "uVar4 < uVar2 + iVar1 * 0x14" identifier < (binary_expression "uVar2 + iVar1 * 0x14" identifier + (binary_expression "iVar1 * 0x14" identifier * number_literal))) )) ;) (return_statement "return;" return ;) })))
(translation_unit "/* DWARF original prototype: void write_unknown_chunks(png_structrp png_ptr, png_const_inforp\n   info_ptr, uint where, png_const_inforp info_ptr) */\n\nvoid write_unknown_chunks\n               (png_structrp png_ptr,png_const_inforp info_ptr,uint where,\n               png_const_inforp info_ptr_1)\n\n{\n  int iVar1;\n  png_uint_32 pVar2;\n  undefined *puVar3;\n  uint uVar4;\n  \n  iVar1 = *(int *)where;\n  pVar2 = info_ptr->width;\n  if (pVar2 + iVar1 * 0x14 <= pVar2) {\n    return;\n  }\n  puVar3 = PTR_s_nt_0005301c + 0x1bb0;\n  uVar4 = pVar2;\n  do {\n    while (((uint)*(byte *)(uVar4 + 0x10) & (uint)info_ptr_1) == 0) {\n      uVar4 = uVar4 + 0x14;\n      if (pVar2 + iVar1 * 0x14 <= uVar4) {\n        return;\n      }\n    }\n    iVar1 = (*(code *)PTR_png_handle_as_unknown_00053460)(png_ptr,uVar4);\n    if ((iVar1 == 1) ||\n       ((((*(byte *)(uVar4 + 3) & 0x20) == 0 && (iVar1 != 3)) &&\n        ((iVar1 != 0 || (png_ptr->unknown_default != 3)))))) {\n      pVar2 = info_ptr->width;\n      iVar1 = *(int *)where;\n    }\n    else {\n      iVar1 = *(int *)(uVar4 + 0xc);\n      if (iVar1 == 0) {\n        (*(code *)PTR_png_warning_00053440)(png_ptr,puVar3);\n        iVar1 = *(int *)(uVar4 + 0xc);\n      }\n      (*(code *)PTR_png_write_chunk_00053424)(png_ptr,uVar4,*(undefined4 *)(uVar4 + 8),iVar1);\n      pVar2 = info_ptr->width;\n      iVar1 = *(int *)where;\n    }\n    uVar4 = uVar4 + 0x14;\n  } while (uVar4 < pVar2 + iVar1 * 0x14);\n  return;\n}\n\n" comment (function_definition "void write_unknown_chunks\n               (png_structrp png_ptr,png_const_inforp info_ptr,uint where,\n               png_const_inforp info_ptr_1)\n\n{\n  int iVar1;\n  png_uint_32 pVar2;\n  undefined *puVar3;\n  uint uVar4;\n  \n  iVar1 = *(int *)where;\n  pVar2 = info_ptr->width;\n  if (pVar2 + iVar1 * 0x14 <= pVar2) {\n    return;\n  }\n  puVar3 = PTR_s_nt_0005301c + 0x1bb0;\n  uVar4 = pVar2;\n  do {\n    while (((uint)*(byte *)(uVar4 + 0x10) & (uint)info_ptr_1) == 0) {\n      uVar4 = uVar4 + 0x14;\n      if (pVar2 + iVar1 * 0x14 <= uVar4) {\n        return;\n      }\n    }\n    iVar1 = (*(code *)PTR_png_handle_as_unknown_00053460)(png_ptr,uVar4);\n    if ((iVar1 == 1) ||\n       ((((*(byte *)(uVar4 + 3) & 0x20) == 0 && (iVar1 != 3)) &&\n        ((iVar1 != 0 || (png_ptr->unknown_default != 3)))))) {\n      pVar2 = info_ptr->width;\n      iVar1 = *(int *)where;\n    }\n    else {\n      iVar1 = *(int *)(uVar4 + 0xc);\n      if (iVar1 == 0) {\n        (*(code *)PTR_png_warning_00053440)(png_ptr,puVar3);\n        iVar1 = *(int *)(uVar4 + 0xc);\n      }\n      (*(code *)PTR_png_write_chunk_00053424)(png_ptr,uVar4,*(undefined4 *)(uVar4 + 8),iVar1);\n      pVar2 = info_ptr->width;\n      iVar1 = *(int *)where;\n    }\n    uVar4 = uVar4 + 0x14;\n  } while (uVar4 < pVar2 + iVar1 * 0x14);\n  return;\n}" primitive_type (function_declarator "write_unknown_chunks\n               (png_structrp png_ptr,png_const_inforp info_ptr,uint where,\n               png_const_inforp info_ptr_1)" identifier (parameter_list "(png_structrp png_ptr,png_const_inforp info_ptr,uint where,\n               png_const_inforp info_ptr_1)" ( (parameter_declaration "png_structrp png_ptr" type_identifier identifier) , (parameter_declaration "png_const_inforp info_ptr" type_identifier identifier) , (parameter_declaration "uint where" type_identifier identifier) , (parameter_declaration "png_const_inforp info_ptr_1" type_identifier identifier) ))) (compound_statement "{\n  int iVar1;\n  png_uint_32 pVar2;\n  undefined *puVar3;\n  uint uVar4;\n  \n  iVar1 = *(int *)where;\n  pVar2 = info_ptr->width;\n  if (pVar2 + iVar1 * 0x14 <= pVar2) {\n    return;\n  }\n  puVar3 = PTR_s_nt_0005301c + 0x1bb0;\n  uVar4 = pVar2;\n  do {\n    while (((uint)*(byte *)(uVar4 + 0x10) & (uint)info_ptr_1) == 0) {\n      uVar4 = uVar4 + 0x14;\n      if (pVar2 + iVar1 * 0x14 <= uVar4) {\n        return;\n      }\n    }\n    iVar1 = (*(code *)PTR_png_handle_as_unknown_00053460)(png_ptr,uVar4);\n    if ((iVar1 == 1) ||\n       ((((*(byte *)(uVar4 + 3) & 0x20) == 0 && (iVar1 != 3)) &&\n        ((iVar1 != 0 || (png_ptr->unknown_default != 3)))))) {\n      pVar2 = info_ptr->width;\n      iVar1 = *(int *)where;\n    }\n    else {\n      iVar1 = *(int *)(uVar4 + 0xc);\n      if (iVar1 == 0) {\n        (*(code *)PTR_png_warning_00053440)(png_ptr,puVar3);\n        iVar1 = *(int *)(uVar4 + 0xc);\n      }\n      (*(code *)PTR_png_write_chunk_00053424)(png_ptr,uVar4,*(undefined4 *)(uVar4 + 8),iVar1);\n      pVar2 = info_ptr->width;\n      iVar1 = *(int *)where;\n    }\n    uVar4 = uVar4 + 0x14;\n  } while (uVar4 < pVar2 + iVar1 * 0x14);\n  return;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "png_uint_32 pVar2;" type_identifier identifier ;) (declaration "undefined *puVar3;" type_identifier (pointer_declarator "*puVar3" * identifier) ;) (declaration "uint uVar4;" type_identifier identifier ;) (expression_statement "iVar1 = *(int *)where;" (assignment_expression "iVar1 = *(int *)where" identifier = (pointer_expression "*(int *)where" * (cast_expression "(int *)where" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier))) ;) (expression_statement "pVar2 = info_ptr->width;" (assignment_expression "pVar2 = info_ptr->width" identifier = (field_expression "info_ptr->width" identifier -> field_identifier)) ;) (if_statement "if (pVar2 + iVar1 * 0x14 <= pVar2) {\n    return;\n  }" if (parenthesized_expression "(pVar2 + iVar1 * 0x14 <= pVar2)" ( (binary_expression "pVar2 + iVar1 * 0x14 <= pVar2" (binary_expression "pVar2 + iVar1 * 0x14" identifier + (binary_expression "iVar1 * 0x14" identifier * number_literal)) <= identifier) )) (compound_statement "{\n    return;\n  }" { (return_statement "return;" return ;) })) (expression_statement "puVar3 = PTR_s_nt_0005301c + 0x1bb0;" (assignment_expression "puVar3 = PTR_s_nt_0005301c + 0x1bb0" identifier = (binary_expression "PTR_s_nt_0005301c + 0x1bb0" identifier + number_literal)) ;) (expression_statement "uVar4 = pVar2;" (assignment_expression "uVar4 = pVar2" identifier = identifier) ;) (do_statement "do {\n    while (((uint)*(byte *)(uVar4 + 0x10) & (uint)info_ptr_1) == 0) {\n      uVar4 = uVar4 + 0x14;\n      if (pVar2 + iVar1 * 0x14 <= uVar4) {\n        return;\n      }\n    }\n    iVar1 = (*(code *)PTR_png_handle_as_unknown_00053460)(png_ptr,uVar4);\n    if ((iVar1 == 1) ||\n       ((((*(byte *)(uVar4 + 3) & 0x20) == 0 && (iVar1 != 3)) &&\n        ((iVar1 != 0 || (png_ptr->unknown_default != 3)))))) {\n      pVar2 = info_ptr->width;\n      iVar1 = *(int *)where;\n    }\n    else {\n      iVar1 = *(int *)(uVar4 + 0xc);\n      if (iVar1 == 0) {\n        (*(code *)PTR_png_warning_00053440)(png_ptr,puVar3);\n        iVar1 = *(int *)(uVar4 + 0xc);\n      }\n      (*(code *)PTR_png_write_chunk_00053424)(png_ptr,uVar4,*(undefined4 *)(uVar4 + 8),iVar1);\n      pVar2 = info_ptr->width;\n      iVar1 = *(int *)where;\n    }\n    uVar4 = uVar4 + 0x14;\n  } while (uVar4 < pVar2 + iVar1 * 0x14);" do (compound_statement "{\n    while (((uint)*(byte *)(uVar4 + 0x10) & (uint)info_ptr_1) == 0) {\n      uVar4 = uVar4 + 0x14;\n      if (pVar2 + iVar1 * 0x14 <= uVar4) {\n        return;\n      }\n    }\n    iVar1 = (*(code *)PTR_png_handle_as_unknown_00053460)(png_ptr,uVar4);\n    if ((iVar1 == 1) ||\n       ((((*(byte *)(uVar4 + 3) & 0x20) == 0 && (iVar1 != 3)) &&\n        ((iVar1 != 0 || (png_ptr->unknown_default != 3)))))) {\n      pVar2 = info_ptr->width;\n      iVar1 = *(int *)where;\n    }\n    else {\n      iVar1 = *(int *)(uVar4 + 0xc);\n      if (iVar1 == 0) {\n        (*(code *)PTR_png_warning_00053440)(png_ptr,puVar3);\n        iVar1 = *(int *)(uVar4 + 0xc);\n      }\n      (*(code *)PTR_png_write_chunk_00053424)(png_ptr,uVar4,*(undefined4 *)(uVar4 + 8),iVar1);\n      pVar2 = info_ptr->width;\n      iVar1 = *(int *)where;\n    }\n    uVar4 = uVar4 + 0x14;\n  }" { (while_statement "while (((uint)*(byte *)(uVar4 + 0x10) & (uint)info_ptr_1) == 0) {\n      uVar4 = uVar4 + 0x14;\n      if (pVar2 + iVar1 * 0x14 <= uVar4) {\n        return;\n      }\n    }" while (parenthesized_expression "(((uint)*(byte *)(uVar4 + 0x10) & (uint)info_ptr_1) == 0)" ( (binary_expression "((uint)*(byte *)(uVar4 + 0x10) & (uint)info_ptr_1) == 0" (parenthesized_expression "((uint)*(byte *)(uVar4 + 0x10) & (uint)info_ptr_1)" ( (binary_expression "(uint)*(byte *)(uVar4 + 0x10) & (uint)info_ptr_1" (binary_expression "(uint)*(byte *)(uVar4 + 0x10)" (parenthesized_expression "(uint)" ( identifier )) * (cast_expression "(byte *)(uVar4 + 0x10)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(uVar4 + 0x10)" ( (binary_expression "uVar4 + 0x10" identifier + number_literal) )))) & (cast_expression "(uint)info_ptr_1" ( (type_descriptor "uint" type_identifier) ) identifier)) )) == number_literal) )) (compound_statement "{\n      uVar4 = uVar4 + 0x14;\n      if (pVar2 + iVar1 * 0x14 <= uVar4) {\n        return;\n      }\n    }" { (expression_statement "uVar4 = uVar4 + 0x14;" (assignment_expression "uVar4 = uVar4 + 0x14" identifier = (binary_expression "uVar4 + 0x14" identifier + number_literal)) ;) (if_statement "if (pVar2 + iVar1 * 0x14 <= uVar4) {\n        return;\n      }" if (parenthesized_expression "(pVar2 + iVar1 * 0x14 <= uVar4)" ( (binary_expression "pVar2 + iVar1 * 0x14 <= uVar4" (binary_expression "pVar2 + iVar1 * 0x14" identifier + (binary_expression "iVar1 * 0x14" identifier * number_literal)) <= identifier) )) (compound_statement "{\n        return;\n      }" { (return_statement "return;" return ;) })) })) (expression_statement "iVar1 = (*(code *)PTR_png_handle_as_unknown_00053460)(png_ptr,uVar4);" (assignment_expression "iVar1 = (*(code *)PTR_png_handle_as_unknown_00053460)(png_ptr,uVar4)" identifier = (call_expression "(*(code *)PTR_png_handle_as_unknown_00053460)(png_ptr,uVar4)" (parenthesized_expression "(*(code *)PTR_png_handle_as_unknown_00053460)" ( (pointer_expression "*(code *)PTR_png_handle_as_unknown_00053460" * (cast_expression "(code *)PTR_png_handle_as_unknown_00053460" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(png_ptr,uVar4)" ( identifier , identifier )))) ;) (if_statement "if ((iVar1 == 1) ||\n       ((((*(byte *)(uVar4 + 3) & 0x20) == 0 && (iVar1 != 3)) &&\n        ((iVar1 != 0 || (png_ptr->unknown_default != 3)))))) {\n      pVar2 = info_ptr->width;\n      iVar1 = *(int *)where;\n    }\n    else {\n      iVar1 = *(int *)(uVar4 + 0xc);\n      if (iVar1 == 0) {\n        (*(code *)PTR_png_warning_00053440)(png_ptr,puVar3);\n        iVar1 = *(int *)(uVar4 + 0xc);\n      }\n      (*(code *)PTR_png_write_chunk_00053424)(png_ptr,uVar4,*(undefined4 *)(uVar4 + 8),iVar1);\n      pVar2 = info_ptr->width;\n      iVar1 = *(int *)where;\n    }" if (parenthesized_expression "((iVar1 == 1) ||\n       ((((*(byte *)(uVar4 + 3) & 0x20) == 0 && (iVar1 != 3)) &&\n        ((iVar1 != 0 || (png_ptr->unknown_default != 3))))))" ( (binary_expression "(iVar1 == 1) ||\n       ((((*(byte *)(uVar4 + 3) & 0x20) == 0 && (iVar1 != 3)) &&\n        ((iVar1 != 0 || (png_ptr->unknown_default != 3)))))" (parenthesized_expression "(iVar1 == 1)" ( (binary_expression "iVar1 == 1" identifier == number_literal) )) || (parenthesized_expression "((((*(byte *)(uVar4 + 3) & 0x20) == 0 && (iVar1 != 3)) &&\n        ((iVar1 != 0 || (png_ptr->unknown_default != 3)))))" ( (parenthesized_expression "(((*(byte *)(uVar4 + 3) & 0x20) == 0 && (iVar1 != 3)) &&\n        ((iVar1 != 0 || (png_ptr->unknown_default != 3))))" ( (binary_expression "((*(byte *)(uVar4 + 3) & 0x20) == 0 && (iVar1 != 3)) &&\n        ((iVar1 != 0 || (png_ptr->unknown_default != 3)))" (parenthesized_expression "((*(byte *)(uVar4 + 3) & 0x20) == 0 && (iVar1 != 3))" ( (binary_expression "(*(byte *)(uVar4 + 3) & 0x20) == 0 && (iVar1 != 3)" (binary_expression "(*(byte *)(uVar4 + 3) & 0x20) == 0" (parenthesized_expression "(*(byte *)(uVar4 + 3) & 0x20)" ( (binary_expression "*(byte *)(uVar4 + 3) & 0x20" (pointer_expression "*(byte *)(uVar4 + 3)" * (cast_expression "(byte *)(uVar4 + 3)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(uVar4 + 3)" ( (binary_expression "uVar4 + 3" identifier + number_literal) )))) & number_literal) )) == number_literal) && (parenthesized_expression "(iVar1 != 3)" ( (binary_expression "iVar1 != 3" identifier != number_literal) ))) )) && (parenthesized_expression "((iVar1 != 0 || (png_ptr->unknown_default != 3)))" ( (parenthesized_expression "(iVar1 != 0 || (png_ptr->unknown_default != 3))" ( (binary_expression "iVar1 != 0 || (png_ptr->unknown_default != 3)" (binary_expression "iVar1 != 0" identifier != number_literal) || (parenthesized_expression "(png_ptr->unknown_default != 3)" ( (binary_expression "png_ptr->unknown_default != 3" (field_expression "png_ptr->unknown_default" identifier -> field_identifier) != number_literal) ))) )) ))) )) ))) )) (compound_statement "{\n      pVar2 = info_ptr->width;\n      iVar1 = *(int *)where;\n    }" { (expression_statement "pVar2 = info_ptr->width;" (assignment_expression "pVar2 = info_ptr->width" identifier = (field_expression "info_ptr->width" identifier -> field_identifier)) ;) (expression_statement "iVar1 = *(int *)where;" (assignment_expression "iVar1 = *(int *)where" identifier = (pointer_expression "*(int *)where" * (cast_expression "(int *)where" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier))) ;) }) (else_clause "else {\n      iVar1 = *(int *)(uVar4 + 0xc);\n      if (iVar1 == 0) {\n        (*(code *)PTR_png_warning_00053440)(png_ptr,puVar3);\n        iVar1 = *(int *)(uVar4 + 0xc);\n      }\n      (*(code *)PTR_png_write_chunk_00053424)(png_ptr,uVar4,*(undefined4 *)(uVar4 + 8),iVar1);\n      pVar2 = info_ptr->width;\n      iVar1 = *(int *)where;\n    }" else (compound_statement "{\n      iVar1 = *(int *)(uVar4 + 0xc);\n      if (iVar1 == 0) {\n        (*(code *)PTR_png_warning_00053440)(png_ptr,puVar3);\n        iVar1 = *(int *)(uVar4 + 0xc);\n      }\n      (*(code *)PTR_png_write_chunk_00053424)(png_ptr,uVar4,*(undefined4 *)(uVar4 + 8),iVar1);\n      pVar2 = info_ptr->width;\n      iVar1 = *(int *)where;\n    }" { (expression_statement "iVar1 = *(int *)(uVar4 + 0xc);" (assignment_expression "iVar1 = *(int *)(uVar4 + 0xc)" identifier = (pointer_expression "*(int *)(uVar4 + 0xc)" * (cast_expression "(int *)(uVar4 + 0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(uVar4 + 0xc)" ( (binary_expression "uVar4 + 0xc" identifier + number_literal) ))))) ;) (if_statement "if (iVar1 == 0) {\n        (*(code *)PTR_png_warning_00053440)(png_ptr,puVar3);\n        iVar1 = *(int *)(uVar4 + 0xc);\n      }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n        (*(code *)PTR_png_warning_00053440)(png_ptr,puVar3);\n        iVar1 = *(int *)(uVar4 + 0xc);\n      }" { (expression_statement "(*(code *)PTR_png_warning_00053440)(png_ptr,puVar3);" (call_expression "(*(code *)PTR_png_warning_00053440)(png_ptr,puVar3)" (parenthesized_expression "(*(code *)PTR_png_warning_00053440)" ( (pointer_expression "*(code *)PTR_png_warning_00053440" * (cast_expression "(code *)PTR_png_warning_00053440" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(png_ptr,puVar3)" ( identifier , identifier ))) ;) (expression_statement "iVar1 = *(int *)(uVar4 + 0xc);" (assignment_expression "iVar1 = *(int *)(uVar4 + 0xc)" identifier = (pointer_expression "*(int *)(uVar4 + 0xc)" * (cast_expression "(int *)(uVar4 + 0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(uVar4 + 0xc)" ( (binary_expression "uVar4 + 0xc" identifier + number_literal) ))))) ;) })) (expression_statement "(*(code *)PTR_png_write_chunk_00053424)(png_ptr,uVar4,*(undefined4 *)(uVar4 + 8),iVar1);" (call_expression "(*(code *)PTR_png_write_chunk_00053424)(png_ptr,uVar4,*(undefined4 *)(uVar4 + 8),iVar1)" (parenthesized_expression "(*(code *)PTR_png_write_chunk_00053424)" ( (pointer_expression "*(code *)PTR_png_write_chunk_00053424" * (cast_expression "(code *)PTR_png_write_chunk_00053424" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(png_ptr,uVar4,*(undefined4 *)(uVar4 + 8),iVar1)" ( identifier , identifier , (pointer_expression "*(undefined4 *)(uVar4 + 8)" * (cast_expression "(undefined4 *)(uVar4 + 8)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(uVar4 + 8)" ( (binary_expression "uVar4 + 8" identifier + number_literal) )))) , identifier ))) ;) (expression_statement "pVar2 = info_ptr->width;" (assignment_expression "pVar2 = info_ptr->width" identifier = (field_expression "info_ptr->width" identifier -> field_identifier)) ;) (expression_statement "iVar1 = *(int *)where;" (assignment_expression "iVar1 = *(int *)where" identifier = (pointer_expression "*(int *)where" * (cast_expression "(int *)where" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier))) ;) }))) (expression_statement "uVar4 = uVar4 + 0x14;" (assignment_expression "uVar4 = uVar4 + 0x14" identifier = (binary_expression "uVar4 + 0x14" identifier + number_literal)) ;) }) while (parenthesized_expression "(uVar4 < pVar2 + iVar1 * 0x14)" ( (binary_expression "uVar4 < pVar2 + iVar1 * 0x14" identifier < (binary_expression "pVar2 + iVar1 * 0x14" identifier + (binary_expression "iVar1 * 0x14" identifier * number_literal))) )) ;) (return_statement "return;" return ;) })))
(translation_unit "void FUN_0003534c(int param_1,uint *param_2,int *param_3,byte param_4)\n\n{\n  int iVar1;\n  uint uVar2;\n  undefined *puVar3;\n  uint uVar4;\n  \n  iVar1 = *param_3;\n  uVar2 = *param_2;\n  if (uVar2 + iVar1 * 0x14 <= uVar2) {\n    return;\n  }\n  puVar3 = PTR_s_nt_0005301c + 0x1bb0;\n  uVar4 = uVar2;\n  do {\n    while ((*(byte *)(uVar4 + 0x10) & param_4) == 0) {\n      uVar4 = uVar4 + 0x14;\n      if (uVar2 + iVar1 * 0x14 <= uVar4) {\n        return;\n      }\n    }\n    iVar1 = (*(code *)PTR_png_handle_as_unknown_00053460)(param_1,uVar4);\n    if ((iVar1 == 1) ||\n       ((((*(byte *)(uVar4 + 3) & 0x20) == 0 && (iVar1 != 3)) &&\n        ((iVar1 != 0 || (*(int *)(param_1 + 0x2ec) != 3)))))) {\n      uVar2 = *param_2;\n      iVar1 = *param_3;\n    }\n    else {\n      iVar1 = *(int *)(uVar4 + 0xc);\n      if (iVar1 == 0) {\n        (*(code *)PTR_png_warning_00053440)(param_1,puVar3);\n        iVar1 = *(int *)(uVar4 + 0xc);\n      }\n      (*(code *)PTR_png_write_chunk_00053424)(param_1,uVar4,*(undefined4 *)(uVar4 + 8),iVar1);\n      uVar2 = *param_2;\n      iVar1 = *param_3;\n    }\n    uVar4 = uVar4 + 0x14;\n  } while (uVar4 < uVar2 + iVar1 * 0x14);\n  return;\n}\n\n" (function_definition "void FUN_0003534c(int param_1,uint *param_2,int *param_3,byte param_4)\n\n{\n  int iVar1;\n  uint uVar2;\n  undefined *puVar3;\n  uint uVar4;\n  \n  iVar1 = *param_3;\n  uVar2 = *param_2;\n  if (uVar2 + iVar1 * 0x14 <= uVar2) {\n    return;\n  }\n  puVar3 = PTR_s_nt_0005301c + 0x1bb0;\n  uVar4 = uVar2;\n  do {\n    while ((*(byte *)(uVar4 + 0x10) & param_4) == 0) {\n      uVar4 = uVar4 + 0x14;\n      if (uVar2 + iVar1 * 0x14 <= uVar4) {\n        return;\n      }\n    }\n    iVar1 = (*(code *)PTR_png_handle_as_unknown_00053460)(param_1,uVar4);\n    if ((iVar1 == 1) ||\n       ((((*(byte *)(uVar4 + 3) & 0x20) == 0 && (iVar1 != 3)) &&\n        ((iVar1 != 0 || (*(int *)(param_1 + 0x2ec) != 3)))))) {\n      uVar2 = *param_2;\n      iVar1 = *param_3;\n    }\n    else {\n      iVar1 = *(int *)(uVar4 + 0xc);\n      if (iVar1 == 0) {\n        (*(code *)PTR_png_warning_00053440)(param_1,puVar3);\n        iVar1 = *(int *)(uVar4 + 0xc);\n      }\n      (*(code *)PTR_png_write_chunk_00053424)(param_1,uVar4,*(undefined4 *)(uVar4 + 8),iVar1);\n      uVar2 = *param_2;\n      iVar1 = *param_3;\n    }\n    uVar4 = uVar4 + 0x14;\n  } while (uVar4 < uVar2 + iVar1 * 0x14);\n  return;\n}" primitive_type (function_declarator "FUN_0003534c(int param_1,uint *param_2,int *param_3,byte param_4)" identifier (parameter_list "(int param_1,uint *param_2,int *param_3,byte param_4)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "uint *param_2" type_identifier (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "int *param_3" primitive_type (pointer_declarator "*param_3" * identifier)) , (parameter_declaration "byte param_4" type_identifier identifier) ))) (compound_statement "{\n  int iVar1;\n  uint uVar2;\n  undefined *puVar3;\n  uint uVar4;\n  \n  iVar1 = *param_3;\n  uVar2 = *param_2;\n  if (uVar2 + iVar1 * 0x14 <= uVar2) {\n    return;\n  }\n  puVar3 = PTR_s_nt_0005301c + 0x1bb0;\n  uVar4 = uVar2;\n  do {\n    while ((*(byte *)(uVar4 + 0x10) & param_4) == 0) {\n      uVar4 = uVar4 + 0x14;\n      if (uVar2 + iVar1 * 0x14 <= uVar4) {\n        return;\n      }\n    }\n    iVar1 = (*(code *)PTR_png_handle_as_unknown_00053460)(param_1,uVar4);\n    if ((iVar1 == 1) ||\n       ((((*(byte *)(uVar4 + 3) & 0x20) == 0 && (iVar1 != 3)) &&\n        ((iVar1 != 0 || (*(int *)(param_1 + 0x2ec) != 3)))))) {\n      uVar2 = *param_2;\n      iVar1 = *param_3;\n    }\n    else {\n      iVar1 = *(int *)(uVar4 + 0xc);\n      if (iVar1 == 0) {\n        (*(code *)PTR_png_warning_00053440)(param_1,puVar3);\n        iVar1 = *(int *)(uVar4 + 0xc);\n      }\n      (*(code *)PTR_png_write_chunk_00053424)(param_1,uVar4,*(undefined4 *)(uVar4 + 8),iVar1);\n      uVar2 = *param_2;\n      iVar1 = *param_3;\n    }\n    uVar4 = uVar4 + 0x14;\n  } while (uVar4 < uVar2 + iVar1 * 0x14);\n  return;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "uint uVar2;" type_identifier identifier ;) (declaration "undefined *puVar3;" type_identifier (pointer_declarator "*puVar3" * identifier) ;) (declaration "uint uVar4;" type_identifier identifier ;) (expression_statement "iVar1 = *param_3;" (assignment_expression "iVar1 = *param_3" identifier = (pointer_expression "*param_3" * identifier)) ;) (expression_statement "uVar2 = *param_2;" (assignment_expression "uVar2 = *param_2" identifier = (pointer_expression "*param_2" * identifier)) ;) (if_statement "if (uVar2 + iVar1 * 0x14 <= uVar2) {\n    return;\n  }" if (parenthesized_expression "(uVar2 + iVar1 * 0x14 <= uVar2)" ( (binary_expression "uVar2 + iVar1 * 0x14 <= uVar2" (binary_expression "uVar2 + iVar1 * 0x14" identifier + (binary_expression "iVar1 * 0x14" identifier * number_literal)) <= identifier) )) (compound_statement "{\n    return;\n  }" { (return_statement "return;" return ;) })) (expression_statement "puVar3 = PTR_s_nt_0005301c + 0x1bb0;" (assignment_expression "puVar3 = PTR_s_nt_0005301c + 0x1bb0" identifier = (binary_expression "PTR_s_nt_0005301c + 0x1bb0" identifier + number_literal)) ;) (expression_statement "uVar4 = uVar2;" (assignment_expression "uVar4 = uVar2" identifier = identifier) ;) (do_statement "do {\n    while ((*(byte *)(uVar4 + 0x10) & param_4) == 0) {\n      uVar4 = uVar4 + 0x14;\n      if (uVar2 + iVar1 * 0x14 <= uVar4) {\n        return;\n      }\n    }\n    iVar1 = (*(code *)PTR_png_handle_as_unknown_00053460)(param_1,uVar4);\n    if ((iVar1 == 1) ||\n       ((((*(byte *)(uVar4 + 3) & 0x20) == 0 && (iVar1 != 3)) &&\n        ((iVar1 != 0 || (*(int *)(param_1 + 0x2ec) != 3)))))) {\n      uVar2 = *param_2;\n      iVar1 = *param_3;\n    }\n    else {\n      iVar1 = *(int *)(uVar4 + 0xc);\n      if (iVar1 == 0) {\n        (*(code *)PTR_png_warning_00053440)(param_1,puVar3);\n        iVar1 = *(int *)(uVar4 + 0xc);\n      }\n      (*(code *)PTR_png_write_chunk_00053424)(param_1,uVar4,*(undefined4 *)(uVar4 + 8),iVar1);\n      uVar2 = *param_2;\n      iVar1 = *param_3;\n    }\n    uVar4 = uVar4 + 0x14;\n  } while (uVar4 < uVar2 + iVar1 * 0x14);" do (compound_statement "{\n    while ((*(byte *)(uVar4 + 0x10) & param_4) == 0) {\n      uVar4 = uVar4 + 0x14;\n      if (uVar2 + iVar1 * 0x14 <= uVar4) {\n        return;\n      }\n    }\n    iVar1 = (*(code *)PTR_png_handle_as_unknown_00053460)(param_1,uVar4);\n    if ((iVar1 == 1) ||\n       ((((*(byte *)(uVar4 + 3) & 0x20) == 0 && (iVar1 != 3)) &&\n        ((iVar1 != 0 || (*(int *)(param_1 + 0x2ec) != 3)))))) {\n      uVar2 = *param_2;\n      iVar1 = *param_3;\n    }\n    else {\n      iVar1 = *(int *)(uVar4 + 0xc);\n      if (iVar1 == 0) {\n        (*(code *)PTR_png_warning_00053440)(param_1,puVar3);\n        iVar1 = *(int *)(uVar4 + 0xc);\n      }\n      (*(code *)PTR_png_write_chunk_00053424)(param_1,uVar4,*(undefined4 *)(uVar4 + 8),iVar1);\n      uVar2 = *param_2;\n      iVar1 = *param_3;\n    }\n    uVar4 = uVar4 + 0x14;\n  }" { (while_statement "while ((*(byte *)(uVar4 + 0x10) & param_4) == 0) {\n      uVar4 = uVar4 + 0x14;\n      if (uVar2 + iVar1 * 0x14 <= uVar4) {\n        return;\n      }\n    }" while (parenthesized_expression "((*(byte *)(uVar4 + 0x10) & param_4) == 0)" ( (binary_expression "(*(byte *)(uVar4 + 0x10) & param_4) == 0" (parenthesized_expression "(*(byte *)(uVar4 + 0x10) & param_4)" ( (binary_expression "*(byte *)(uVar4 + 0x10) & param_4" (pointer_expression "*(byte *)(uVar4 + 0x10)" * (cast_expression "(byte *)(uVar4 + 0x10)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(uVar4 + 0x10)" ( (binary_expression "uVar4 + 0x10" identifier + number_literal) )))) & identifier) )) == number_literal) )) (compound_statement "{\n      uVar4 = uVar4 + 0x14;\n      if (uVar2 + iVar1 * 0x14 <= uVar4) {\n        return;\n      }\n    }" { (expression_statement "uVar4 = uVar4 + 0x14;" (assignment_expression "uVar4 = uVar4 + 0x14" identifier = (binary_expression "uVar4 + 0x14" identifier + number_literal)) ;) (if_statement "if (uVar2 + iVar1 * 0x14 <= uVar4) {\n        return;\n      }" if (parenthesized_expression "(uVar2 + iVar1 * 0x14 <= uVar4)" ( (binary_expression "uVar2 + iVar1 * 0x14 <= uVar4" (binary_expression "uVar2 + iVar1 * 0x14" identifier + (binary_expression "iVar1 * 0x14" identifier * number_literal)) <= identifier) )) (compound_statement "{\n        return;\n      }" { (return_statement "return;" return ;) })) })) (expression_statement "iVar1 = (*(code *)PTR_png_handle_as_unknown_00053460)(param_1,uVar4);" (assignment_expression "iVar1 = (*(code *)PTR_png_handle_as_unknown_00053460)(param_1,uVar4)" identifier = (call_expression "(*(code *)PTR_png_handle_as_unknown_00053460)(param_1,uVar4)" (parenthesized_expression "(*(code *)PTR_png_handle_as_unknown_00053460)" ( (pointer_expression "*(code *)PTR_png_handle_as_unknown_00053460" * (cast_expression "(code *)PTR_png_handle_as_unknown_00053460" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(param_1,uVar4)" ( identifier , identifier )))) ;) (if_statement "if ((iVar1 == 1) ||\n       ((((*(byte *)(uVar4 + 3) & 0x20) == 0 && (iVar1 != 3)) &&\n        ((iVar1 != 0 || (*(int *)(param_1 + 0x2ec) != 3)))))) {\n      uVar2 = *param_2;\n      iVar1 = *param_3;\n    }\n    else {\n      iVar1 = *(int *)(uVar4 + 0xc);\n      if (iVar1 == 0) {\n        (*(code *)PTR_png_warning_00053440)(param_1,puVar3);\n        iVar1 = *(int *)(uVar4 + 0xc);\n      }\n      (*(code *)PTR_png_write_chunk_00053424)(param_1,uVar4,*(undefined4 *)(uVar4 + 8),iVar1);\n      uVar2 = *param_2;\n      iVar1 = *param_3;\n    }" if (parenthesized_expression "((iVar1 == 1) ||\n       ((((*(byte *)(uVar4 + 3) & 0x20) == 0 && (iVar1 != 3)) &&\n        ((iVar1 != 0 || (*(int *)(param_1 + 0x2ec) != 3))))))" ( (binary_expression "(iVar1 == 1) ||\n       ((((*(byte *)(uVar4 + 3) & 0x20) == 0 && (iVar1 != 3)) &&\n        ((iVar1 != 0 || (*(int *)(param_1 + 0x2ec) != 3)))))" (parenthesized_expression "(iVar1 == 1)" ( (binary_expression "iVar1 == 1" identifier == number_literal) )) || (parenthesized_expression "((((*(byte *)(uVar4 + 3) & 0x20) == 0 && (iVar1 != 3)) &&\n        ((iVar1 != 0 || (*(int *)(param_1 + 0x2ec) != 3)))))" ( (parenthesized_expression "(((*(byte *)(uVar4 + 3) & 0x20) == 0 && (iVar1 != 3)) &&\n        ((iVar1 != 0 || (*(int *)(param_1 + 0x2ec) != 3))))" ( (binary_expression "((*(byte *)(uVar4 + 3) & 0x20) == 0 && (iVar1 != 3)) &&\n        ((iVar1 != 0 || (*(int *)(param_1 + 0x2ec) != 3)))" (parenthesized_expression "((*(byte *)(uVar4 + 3) & 0x20) == 0 && (iVar1 != 3))" ( (binary_expression "(*(byte *)(uVar4 + 3) & 0x20) == 0 && (iVar1 != 3)" (binary_expression "(*(byte *)(uVar4 + 3) & 0x20) == 0" (parenthesized_expression "(*(byte *)(uVar4 + 3) & 0x20)" ( (binary_expression "*(byte *)(uVar4 + 3) & 0x20" (pointer_expression "*(byte *)(uVar4 + 3)" * (cast_expression "(byte *)(uVar4 + 3)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(uVar4 + 3)" ( (binary_expression "uVar4 + 3" identifier + number_literal) )))) & number_literal) )) == number_literal) && (parenthesized_expression "(iVar1 != 3)" ( (binary_expression "iVar1 != 3" identifier != number_literal) ))) )) && (parenthesized_expression "((iVar1 != 0 || (*(int *)(param_1 + 0x2ec) != 3)))" ( (parenthesized_expression "(iVar1 != 0 || (*(int *)(param_1 + 0x2ec) != 3))" ( (binary_expression "iVar1 != 0 || (*(int *)(param_1 + 0x2ec) != 3)" (binary_expression "iVar1 != 0" identifier != number_literal) || (parenthesized_expression "(*(int *)(param_1 + 0x2ec) != 3)" ( (binary_expression "*(int *)(param_1 + 0x2ec) != 3" (pointer_expression "*(int *)(param_1 + 0x2ec)" * (cast_expression "(int *)(param_1 + 0x2ec)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x2ec)" ( (binary_expression "param_1 + 0x2ec" identifier + number_literal) )))) != number_literal) ))) )) ))) )) ))) )) (compound_statement "{\n      uVar2 = *param_2;\n      iVar1 = *param_3;\n    }" { (expression_statement "uVar2 = *param_2;" (assignment_expression "uVar2 = *param_2" identifier = (pointer_expression "*param_2" * identifier)) ;) (expression_statement "iVar1 = *param_3;" (assignment_expression "iVar1 = *param_3" identifier = (pointer_expression "*param_3" * identifier)) ;) }) (else_clause "else {\n      iVar1 = *(int *)(uVar4 + 0xc);\n      if (iVar1 == 0) {\n        (*(code *)PTR_png_warning_00053440)(param_1,puVar3);\n        iVar1 = *(int *)(uVar4 + 0xc);\n      }\n      (*(code *)PTR_png_write_chunk_00053424)(param_1,uVar4,*(undefined4 *)(uVar4 + 8),iVar1);\n      uVar2 = *param_2;\n      iVar1 = *param_3;\n    }" else (compound_statement "{\n      iVar1 = *(int *)(uVar4 + 0xc);\n      if (iVar1 == 0) {\n        (*(code *)PTR_png_warning_00053440)(param_1,puVar3);\n        iVar1 = *(int *)(uVar4 + 0xc);\n      }\n      (*(code *)PTR_png_write_chunk_00053424)(param_1,uVar4,*(undefined4 *)(uVar4 + 8),iVar1);\n      uVar2 = *param_2;\n      iVar1 = *param_3;\n    }" { (expression_statement "iVar1 = *(int *)(uVar4 + 0xc);" (assignment_expression "iVar1 = *(int *)(uVar4 + 0xc)" identifier = (pointer_expression "*(int *)(uVar4 + 0xc)" * (cast_expression "(int *)(uVar4 + 0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(uVar4 + 0xc)" ( (binary_expression "uVar4 + 0xc" identifier + number_literal) ))))) ;) (if_statement "if (iVar1 == 0) {\n        (*(code *)PTR_png_warning_00053440)(param_1,puVar3);\n        iVar1 = *(int *)(uVar4 + 0xc);\n      }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n        (*(code *)PTR_png_warning_00053440)(param_1,puVar3);\n        iVar1 = *(int *)(uVar4 + 0xc);\n      }" { (expression_statement "(*(code *)PTR_png_warning_00053440)(param_1,puVar3);" (call_expression "(*(code *)PTR_png_warning_00053440)(param_1,puVar3)" (parenthesized_expression "(*(code *)PTR_png_warning_00053440)" ( (pointer_expression "*(code *)PTR_png_warning_00053440" * (cast_expression "(code *)PTR_png_warning_00053440" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(param_1,puVar3)" ( identifier , identifier ))) ;) (expression_statement "iVar1 = *(int *)(uVar4 + 0xc);" (assignment_expression "iVar1 = *(int *)(uVar4 + 0xc)" identifier = (pointer_expression "*(int *)(uVar4 + 0xc)" * (cast_expression "(int *)(uVar4 + 0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(uVar4 + 0xc)" ( (binary_expression "uVar4 + 0xc" identifier + number_literal) ))))) ;) })) (expression_statement "(*(code *)PTR_png_write_chunk_00053424)(param_1,uVar4,*(undefined4 *)(uVar4 + 8),iVar1);" (call_expression "(*(code *)PTR_png_write_chunk_00053424)(param_1,uVar4,*(undefined4 *)(uVar4 + 8),iVar1)" (parenthesized_expression "(*(code *)PTR_png_write_chunk_00053424)" ( (pointer_expression "*(code *)PTR_png_write_chunk_00053424" * (cast_expression "(code *)PTR_png_write_chunk_00053424" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(param_1,uVar4,*(undefined4 *)(uVar4 + 8),iVar1)" ( identifier , identifier , (pointer_expression "*(undefined4 *)(uVar4 + 8)" * (cast_expression "(undefined4 *)(uVar4 + 8)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(uVar4 + 8)" ( (binary_expression "uVar4 + 8" identifier + number_literal) )))) , identifier ))) ;) (expression_statement "uVar2 = *param_2;" (assignment_expression "uVar2 = *param_2" identifier = (pointer_expression "*param_2" * identifier)) ;) (expression_statement "iVar1 = *param_3;" (assignment_expression "iVar1 = *param_3" identifier = (pointer_expression "*param_3" * identifier)) ;) }))) (expression_statement "uVar4 = uVar4 + 0x14;" (assignment_expression "uVar4 = uVar4 + 0x14" identifier = (binary_expression "uVar4 + 0x14" identifier + number_literal)) ;) }) while (parenthesized_expression "(uVar4 < uVar2 + iVar1 * 0x14)" ( (binary_expression "uVar4 < uVar2 + iVar1 * 0x14" identifier < (binary_expression "uVar2 + iVar1 * 0x14" identifier + (binary_expression "iVar1 * 0x14" identifier * number_literal))) )) ;) (return_statement "return;" return ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression (binary_expression IDENT + (binary_expression IDENT * LIT)) <= IDENT) )) (compound_statement { (return_statement return ;) })) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (do_statement do (compound_statement { (while_statement while (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) & IDENT) )) == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression (binary_expression IDENT + (binary_expression IDENT * LIT)) <= IDENT) )) (compound_statement { (return_statement return ;) })) })) (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( IDENT , IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT == LIT) )) || (parenthesized_expression ( (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (binary_expression (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) & LIT) )) == LIT) && (parenthesized_expression ( (binary_expression IDENT != LIT) ))) )) && (parenthesized_expression ( (parenthesized_expression ( (binary_expression (binary_expression IDENT != LIT) || (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) != LIT) ))) )) ))) )) ))) )) (compound_statement { (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( IDENT , IDENT ))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) })) (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( IDENT , IDENT , (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) , IDENT ))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) }))) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) }) while (parenthesized_expression ( (binary_expression IDENT < (binary_expression IDENT + (binary_expression IDENT * LIT))) )) ;) (return_statement return ;) })))
(function_definition "void FUN_0003534c(int param_1,uint *param_2,int *param_3,byte param_4)\n\n{\n  int iVar1;\n  uint uVar2;\n  undefined *puVar3;\n  uint uVar4;\n  \n  iVar1 = *param_3;\n  uVar2 = *param_2;\n  if (uVar2 + iVar1 * 0x14 <= uVar2) {\n    return;\n  }\n  puVar3 = PTR_s_nt_0005301c + 0x1bb0;\n  uVar4 = uVar2;\n  do {\n    while ((*(byte *)(uVar4 + 0x10) & param_4) == 0) {\n      uVar4 = uVar4 + 0x14;\n      if (uVar2 + iVar1 * 0x14 <= uVar4) {\n        return;\n      }\n    }\n    iVar1 = (*(code *)PTR_png_handle_as_unknown_00053460)(param_1,uVar4);\n    if ((iVar1 == 1) ||\n       ((((*(byte *)(uVar4 + 3) & 0x20) == 0 && (iVar1 != 3)) &&\n        ((iVar1 != 0 || (*(int *)(param_1 + 0x2ec) != 3)))))) {\n      uVar2 = *param_2;\n      iVar1 = *param_3;\n    }\n    else {\n      iVar1 = *(int *)(uVar4 + 0xc);\n      if (iVar1 == 0) {\n        (*(code *)PTR_png_warning_00053440)(param_1,puVar3);\n        iVar1 = *(int *)(uVar4 + 0xc);\n      }\n      (*(code *)PTR_png_write_chunk_00053424)(param_1,uVar4,*(undefined4 *)(uVar4 + 8),iVar1);\n      uVar2 = *param_2;\n      iVar1 = *param_3;\n    }\n    uVar4 = uVar4 + 0x14;\n  } while (uVar4 < uVar2 + iVar1 * 0x14);\n  return;\n}" (primitive_type "void") (function_declarator "FUN_0003534c(int param_1,uint *param_2,int *param_3,byte param_4)" (identifier "FUN_0003534c") (parameter_list "(int param_1,uint *param_2,int *param_3,byte param_4)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) (, ",") (parameter_declaration "uint *param_2" (type_identifier "uint") (pointer_declarator "*param_2" (* "*") (identifier "param_2"))) (, ",") (parameter_declaration "int *param_3" (primitive_type "int") (pointer_declarator "*param_3" (* "*") (identifier "param_3"))) (, ",") (parameter_declaration "byte param_4" (type_identifier "byte") (identifier "param_4")) () ")"))) (compound_statement "{\n  int iVar1;\n  uint uVar2;\n  undefined *puVar3;\n  uint uVar4;\n  \n  iVar1 = *param_3;\n  uVar2 = *param_2;\n  if (uVar2 + iVar1 * 0x14 <= uVar2) {\n    return;\n  }\n  puVar3 = PTR_s_nt_0005301c + 0x1bb0;\n  uVar4 = uVar2;\n  do {\n    while ((*(byte *)(uVar4 + 0x10) & param_4) == 0) {\n      uVar4 = uVar4 + 0x14;\n      if (uVar2 + iVar1 * 0x14 <= uVar4) {\n        return;\n      }\n    }\n    iVar1 = (*(code *)PTR_png_handle_as_unknown_00053460)(param_1,uVar4);\n    if ((iVar1 == 1) ||\n       ((((*(byte *)(uVar4 + 3) & 0x20) == 0 && (iVar1 != 3)) &&\n        ((iVar1 != 0 || (*(int *)(param_1 + 0x2ec) != 3)))))) {\n      uVar2 = *param_2;\n      iVar1 = *param_3;\n    }\n    else {\n      iVar1 = *(int *)(uVar4 + 0xc);\n      if (iVar1 == 0) {\n        (*(code *)PTR_png_warning_00053440)(param_1,puVar3);\n        iVar1 = *(int *)(uVar4 + 0xc);\n      }\n      (*(code *)PTR_png_write_chunk_00053424)(param_1,uVar4,*(undefined4 *)(uVar4 + 8),iVar1);\n      uVar2 = *param_2;\n      iVar1 = *param_3;\n    }\n    uVar4 = uVar4 + 0x14;\n  } while (uVar4 < uVar2 + iVar1 * 0x14);\n  return;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "uint uVar2;" (type_identifier "uint") (identifier "uVar2") (; ";")) (declaration "undefined *puVar3;" (type_identifier "undefined") (pointer_declarator "*puVar3" (* "*") (identifier "puVar3")) (; ";")) (declaration "uint uVar4;" (type_identifier "uint") (identifier "uVar4") (; ";")) (expression_statement "iVar1 = *param_3;" (assignment_expression "iVar1 = *param_3" (identifier "iVar1") (= "=") (pointer_expression "*param_3" (* "*") (identifier "param_3"))) (; ";")) (expression_statement "uVar2 = *param_2;" (assignment_expression "uVar2 = *param_2" (identifier "uVar2") (= "=") (pointer_expression "*param_2" (* "*") (identifier "param_2"))) (; ";")) (if_statement "if (uVar2 + iVar1 * 0x14 <= uVar2) {\n    return;\n  }" (if "if") (parenthesized_expression "(uVar2 + iVar1 * 0x14 <= uVar2)" (( "(") (binary_expression "uVar2 + iVar1 * 0x14 <= uVar2" (binary_expression "uVar2 + iVar1 * 0x14" (identifier "uVar2") (+ "+") (binary_expression "iVar1 * 0x14" (identifier "iVar1") (* "*") (number_literal "0x14"))) (<= "<=") (identifier "uVar2")) () ")")) (compound_statement "{\n    return;\n  }" ({ "{") (return_statement "return;" (return "return") (; ";")) (} "}"))) (expression_statement "puVar3 = PTR_s_nt_0005301c + 0x1bb0;" (assignment_expression "puVar3 = PTR_s_nt_0005301c + 0x1bb0" (identifier "puVar3") (= "=") (binary_expression "PTR_s_nt_0005301c + 0x1bb0" (identifier "PTR_s_nt_0005301c") (+ "+") (number_literal "0x1bb0"))) (; ";")) (expression_statement "uVar4 = uVar2;" (assignment_expression "uVar4 = uVar2" (identifier "uVar4") (= "=") (identifier "uVar2")) (; ";")) (do_statement "do {\n    while ((*(byte *)(uVar4 + 0x10) & param_4) == 0) {\n      uVar4 = uVar4 + 0x14;\n      if (uVar2 + iVar1 * 0x14 <= uVar4) {\n        return;\n      }\n    }\n    iVar1 = (*(code *)PTR_png_handle_as_unknown_00053460)(param_1,uVar4);\n    if ((iVar1 == 1) ||\n       ((((*(byte *)(uVar4 + 3) & 0x20) == 0 && (iVar1 != 3)) &&\n        ((iVar1 != 0 || (*(int *)(param_1 + 0x2ec) != 3)))))) {\n      uVar2 = *param_2;\n      iVar1 = *param_3;\n    }\n    else {\n      iVar1 = *(int *)(uVar4 + 0xc);\n      if (iVar1 == 0) {\n        (*(code *)PTR_png_warning_00053440)(param_1,puVar3);\n        iVar1 = *(int *)(uVar4 + 0xc);\n      }\n      (*(code *)PTR_png_write_chunk_00053424)(param_1,uVar4,*(undefined4 *)(uVar4 + 8),iVar1);\n      uVar2 = *param_2;\n      iVar1 = *param_3;\n    }\n    uVar4 = uVar4 + 0x14;\n  } while (uVar4 < uVar2 + iVar1 * 0x14);" (do "do") (compound_statement "{\n    while ((*(byte *)(uVar4 + 0x10) & param_4) == 0) {\n      uVar4 = uVar4 + 0x14;\n      if (uVar2 + iVar1 * 0x14 <= uVar4) {\n        return;\n      }\n    }\n    iVar1 = (*(code *)PTR_png_handle_as_unknown_00053460)(param_1,uVar4);\n    if ((iVar1 == 1) ||\n       ((((*(byte *)(uVar4 + 3) & 0x20) == 0 && (iVar1 != 3)) &&\n        ((iVar1 != 0 || (*(int *)(param_1 + 0x2ec) != 3)))))) {\n      uVar2 = *param_2;\n      iVar1 = *param_3;\n    }\n    else {\n      iVar1 = *(int *)(uVar4 + 0xc);\n      if (iVar1 == 0) {\n        (*(code *)PTR_png_warning_00053440)(param_1,puVar3);\n        iVar1 = *(int *)(uVar4 + 0xc);\n      }\n      (*(code *)PTR_png_write_chunk_00053424)(param_1,uVar4,*(undefined4 *)(uVar4 + 8),iVar1);\n      uVar2 = *param_2;\n      iVar1 = *param_3;\n    }\n    uVar4 = uVar4 + 0x14;\n  }" ({ "{") (while_statement "while ((*(byte *)(uVar4 + 0x10) & param_4) == 0) {\n      uVar4 = uVar4 + 0x14;\n      if (uVar2 + iVar1 * 0x14 <= uVar4) {\n        return;\n      }\n    }" (while "while") (parenthesized_expression "((*(byte *)(uVar4 + 0x10) & param_4) == 0)" (( "(") (binary_expression "(*(byte *)(uVar4 + 0x10) & param_4) == 0" (parenthesized_expression "(*(byte *)(uVar4 + 0x10) & param_4)" (( "(") (binary_expression "*(byte *)(uVar4 + 0x10) & param_4" (pointer_expression "*(byte *)(uVar4 + 0x10)" (* "*") (cast_expression "(byte *)(uVar4 + 0x10)" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(uVar4 + 0x10)" (( "(") (binary_expression "uVar4 + 0x10" (identifier "uVar4") (+ "+") (number_literal "0x10")) () ")")))) (& "&") (identifier "param_4")) () ")")) (== "==") (number_literal "0")) () ")")) (compound_statement "{\n      uVar4 = uVar4 + 0x14;\n      if (uVar2 + iVar1 * 0x14 <= uVar4) {\n        return;\n      }\n    }" ({ "{") (expression_statement "uVar4 = uVar4 + 0x14;" (assignment_expression "uVar4 = uVar4 + 0x14" (identifier "uVar4") (= "=") (binary_expression "uVar4 + 0x14" (identifier "uVar4") (+ "+") (number_literal "0x14"))) (; ";")) (if_statement "if (uVar2 + iVar1 * 0x14 <= uVar4) {\n        return;\n      }" (if "if") (parenthesized_expression "(uVar2 + iVar1 * 0x14 <= uVar4)" (( "(") (binary_expression "uVar2 + iVar1 * 0x14 <= uVar4" (binary_expression "uVar2 + iVar1 * 0x14" (identifier "uVar2") (+ "+") (binary_expression "iVar1 * 0x14" (identifier "iVar1") (* "*") (number_literal "0x14"))) (<= "<=") (identifier "uVar4")) () ")")) (compound_statement "{\n        return;\n      }" ({ "{") (return_statement "return;" (return "return") (; ";")) (} "}"))) (} "}"))) (expression_statement "iVar1 = (*(code *)PTR_png_handle_as_unknown_00053460)(param_1,uVar4);" (assignment_expression "iVar1 = (*(code *)PTR_png_handle_as_unknown_00053460)(param_1,uVar4)" (identifier "iVar1") (= "=") (call_expression "(*(code *)PTR_png_handle_as_unknown_00053460)(param_1,uVar4)" (parenthesized_expression "(*(code *)PTR_png_handle_as_unknown_00053460)" (( "(") (pointer_expression "*(code *)PTR_png_handle_as_unknown_00053460" (* "*") (cast_expression "(code *)PTR_png_handle_as_unknown_00053460" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_png_handle_as_unknown_00053460"))) () ")")) (argument_list "(param_1,uVar4)" (( "(") (identifier "param_1") (, ",") (identifier "uVar4") () ")")))) (; ";")) (if_statement "if ((iVar1 == 1) ||\n       ((((*(byte *)(uVar4 + 3) & 0x20) == 0 && (iVar1 != 3)) &&\n        ((iVar1 != 0 || (*(int *)(param_1 + 0x2ec) != 3)))))) {\n      uVar2 = *param_2;\n      iVar1 = *param_3;\n    }\n    else {\n      iVar1 = *(int *)(uVar4 + 0xc);\n      if (iVar1 == 0) {\n        (*(code *)PTR_png_warning_00053440)(param_1,puVar3);\n        iVar1 = *(int *)(uVar4 + 0xc);\n      }\n      (*(code *)PTR_png_write_chunk_00053424)(param_1,uVar4,*(undefined4 *)(uVar4 + 8),iVar1);\n      uVar2 = *param_2;\n      iVar1 = *param_3;\n    }" (if "if") (parenthesized_expression "((iVar1 == 1) ||\n       ((((*(byte *)(uVar4 + 3) & 0x20) == 0 && (iVar1 != 3)) &&\n        ((iVar1 != 0 || (*(int *)(param_1 + 0x2ec) != 3))))))" (( "(") (binary_expression "(iVar1 == 1) ||\n       ((((*(byte *)(uVar4 + 3) & 0x20) == 0 && (iVar1 != 3)) &&\n        ((iVar1 != 0 || (*(int *)(param_1 + 0x2ec) != 3)))))" (parenthesized_expression "(iVar1 == 1)" (( "(") (binary_expression "iVar1 == 1" (identifier "iVar1") (== "==") (number_literal "1")) () ")")) (|| "||") (parenthesized_expression "((((*(byte *)(uVar4 + 3) & 0x20) == 0 && (iVar1 != 3)) &&\n        ((iVar1 != 0 || (*(int *)(param_1 + 0x2ec) != 3)))))" (( "(") (parenthesized_expression "(((*(byte *)(uVar4 + 3) & 0x20) == 0 && (iVar1 != 3)) &&\n        ((iVar1 != 0 || (*(int *)(param_1 + 0x2ec) != 3))))" (( "(") (binary_expression "((*(byte *)(uVar4 + 3) & 0x20) == 0 && (iVar1 != 3)) &&\n        ((iVar1 != 0 || (*(int *)(param_1 + 0x2ec) != 3)))" (parenthesized_expression "((*(byte *)(uVar4 + 3) & 0x20) == 0 && (iVar1 != 3))" (( "(") (binary_expression "(*(byte *)(uVar4 + 3) & 0x20) == 0 && (iVar1 != 3)" (binary_expression "(*(byte *)(uVar4 + 3) & 0x20) == 0" (parenthesized_expression "(*(byte *)(uVar4 + 3) & 0x20)" (( "(") (binary_expression "*(byte *)(uVar4 + 3) & 0x20" (pointer_expression "*(byte *)(uVar4 + 3)" (* "*") (cast_expression "(byte *)(uVar4 + 3)" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(uVar4 + 3)" (( "(") (binary_expression "uVar4 + 3" (identifier "uVar4") (+ "+") (number_literal "3")) () ")")))) (& "&") (number_literal "0x20")) () ")")) (== "==") (number_literal "0")) (&& "&&") (parenthesized_expression "(iVar1 != 3)" (( "(") (binary_expression "iVar1 != 3" (identifier "iVar1") (!= "!=") (number_literal "3")) () ")"))) () ")")) (&& "&&") (parenthesized_expression "((iVar1 != 0 || (*(int *)(param_1 + 0x2ec) != 3)))" (( "(") (parenthesized_expression "(iVar1 != 0 || (*(int *)(param_1 + 0x2ec) != 3))" (( "(") (binary_expression "iVar1 != 0 || (*(int *)(param_1 + 0x2ec) != 3)" (binary_expression "iVar1 != 0" (identifier "iVar1") (!= "!=") (number_literal "0")) (|| "||") (parenthesized_expression "(*(int *)(param_1 + 0x2ec) != 3)" (( "(") (binary_expression "*(int *)(param_1 + 0x2ec) != 3" (pointer_expression "*(int *)(param_1 + 0x2ec)" (* "*") (cast_expression "(int *)(param_1 + 0x2ec)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x2ec)" (( "(") (binary_expression "param_1 + 0x2ec" (identifier "param_1") (+ "+") (number_literal "0x2ec")) () ")")))) (!= "!=") (number_literal "3")) () ")"))) () ")")) () ")"))) () ")")) () ")"))) () ")")) (compound_statement "{\n      uVar2 = *param_2;\n      iVar1 = *param_3;\n    }" ({ "{") (expression_statement "uVar2 = *param_2;" (assignment_expression "uVar2 = *param_2" (identifier "uVar2") (= "=") (pointer_expression "*param_2" (* "*") (identifier "param_2"))) (; ";")) (expression_statement "iVar1 = *param_3;" (assignment_expression "iVar1 = *param_3" (identifier "iVar1") (= "=") (pointer_expression "*param_3" (* "*") (identifier "param_3"))) (; ";")) (} "}")) (else_clause "else {\n      iVar1 = *(int *)(uVar4 + 0xc);\n      if (iVar1 == 0) {\n        (*(code *)PTR_png_warning_00053440)(param_1,puVar3);\n        iVar1 = *(int *)(uVar4 + 0xc);\n      }\n      (*(code *)PTR_png_write_chunk_00053424)(param_1,uVar4,*(undefined4 *)(uVar4 + 8),iVar1);\n      uVar2 = *param_2;\n      iVar1 = *param_3;\n    }" (else "else") (compound_statement "{\n      iVar1 = *(int *)(uVar4 + 0xc);\n      if (iVar1 == 0) {\n        (*(code *)PTR_png_warning_00053440)(param_1,puVar3);\n        iVar1 = *(int *)(uVar4 + 0xc);\n      }\n      (*(code *)PTR_png_write_chunk_00053424)(param_1,uVar4,*(undefined4 *)(uVar4 + 8),iVar1);\n      uVar2 = *param_2;\n      iVar1 = *param_3;\n    }" ({ "{") (expression_statement "iVar1 = *(int *)(uVar4 + 0xc);" (assignment_expression "iVar1 = *(int *)(uVar4 + 0xc)" (identifier "iVar1") (= "=") (pointer_expression "*(int *)(uVar4 + 0xc)" (* "*") (cast_expression "(int *)(uVar4 + 0xc)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(uVar4 + 0xc)" (( "(") (binary_expression "uVar4 + 0xc" (identifier "uVar4") (+ "+") (number_literal "0xc")) () ")"))))) (; ";")) (if_statement "if (iVar1 == 0) {\n        (*(code *)PTR_png_warning_00053440)(param_1,puVar3);\n        iVar1 = *(int *)(uVar4 + 0xc);\n      }" (if "if") (parenthesized_expression "(iVar1 == 0)" (( "(") (binary_expression "iVar1 == 0" (identifier "iVar1") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n        (*(code *)PTR_png_warning_00053440)(param_1,puVar3);\n        iVar1 = *(int *)(uVar4 + 0xc);\n      }" ({ "{") (expression_statement "(*(code *)PTR_png_warning_00053440)(param_1,puVar3);" (call_expression "(*(code *)PTR_png_warning_00053440)(param_1,puVar3)" (parenthesized_expression "(*(code *)PTR_png_warning_00053440)" (( "(") (pointer_expression "*(code *)PTR_png_warning_00053440" (* "*") (cast_expression "(code *)PTR_png_warning_00053440" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_png_warning_00053440"))) () ")")) (argument_list "(param_1,puVar3)" (( "(") (identifier "param_1") (, ",") (identifier "puVar3") () ")"))) (; ";")) (expression_statement "iVar1 = *(int *)(uVar4 + 0xc);" (assignment_expression "iVar1 = *(int *)(uVar4 + 0xc)" (identifier "iVar1") (= "=") (pointer_expression "*(int *)(uVar4 + 0xc)" (* "*") (cast_expression "(int *)(uVar4 + 0xc)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(uVar4 + 0xc)" (( "(") (binary_expression "uVar4 + 0xc" (identifier "uVar4") (+ "+") (number_literal "0xc")) () ")"))))) (; ";")) (} "}"))) (expression_statement "(*(code *)PTR_png_write_chunk_00053424)(param_1,uVar4,*(undefined4 *)(uVar4 + 8),iVar1);" (call_expression "(*(code *)PTR_png_write_chunk_00053424)(param_1,uVar4,*(undefined4 *)(uVar4 + 8),iVar1)" (parenthesized_expression "(*(code *)PTR_png_write_chunk_00053424)" (( "(") (pointer_expression "*(code *)PTR_png_write_chunk_00053424" (* "*") (cast_expression "(code *)PTR_png_write_chunk_00053424" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_png_write_chunk_00053424"))) () ")")) (argument_list "(param_1,uVar4,*(undefined4 *)(uVar4 + 8),iVar1)" (( "(") (identifier "param_1") (, ",") (identifier "uVar4") (, ",") (pointer_expression "*(undefined4 *)(uVar4 + 8)" (* "*") (cast_expression "(undefined4 *)(uVar4 + 8)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(uVar4 + 8)" (( "(") (binary_expression "uVar4 + 8" (identifier "uVar4") (+ "+") (number_literal "8")) () ")")))) (, ",") (identifier "iVar1") () ")"))) (; ";")) (expression_statement "uVar2 = *param_2;" (assignment_expression "uVar2 = *param_2" (identifier "uVar2") (= "=") (pointer_expression "*param_2" (* "*") (identifier "param_2"))) (; ";")) (expression_statement "iVar1 = *param_3;" (assignment_expression "iVar1 = *param_3" (identifier "iVar1") (= "=") (pointer_expression "*param_3" (* "*") (identifier "param_3"))) (; ";")) (} "}")))) (expression_statement "uVar4 = uVar4 + 0x14;" (assignment_expression "uVar4 = uVar4 + 0x14" (identifier "uVar4") (= "=") (binary_expression "uVar4 + 0x14" (identifier "uVar4") (+ "+") (number_literal "0x14"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(uVar4 < uVar2 + iVar1 * 0x14)" (( "(") (binary_expression "uVar4 < uVar2 + iVar1 * 0x14" (identifier "uVar4") (< "<") (binary_expression "uVar2 + iVar1 * 0x14" (identifier "uVar2") (+ "+") (binary_expression "iVar1 * 0x14" (identifier "iVar1") (* "*") (number_literal "0x14")))) () ")")) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}")))

/* DWARF original prototype: void write_unknown_chunks(png_structrp png_ptr, png_const_inforp
   info_ptr, uint where, png_const_inforp info_ptr) */

void function_1
               (type_1 png_ptr,type_2 info_ptr,type_3 where,
               type_2 info_ptr_1)

{
  int var_2;
  type_4 var_1;
  type_5 *puVar3;
  type_3 var_4;
  
  var_2 = *(int *)where;
  var_1 = info_ptr->width;
  if (var_1 + var_2 * 0x14 <= var_1) {
    return;
  }
  puVar3 = var_3 + 0x1bb0;
  var_4 = var_1;
  do {
    while (((type_3)*(type_6 *)(var_4 + 0x10) & (type_3)info_ptr_1) == 0) {
      var_4 = var_4 + 0x14;
      if (var_1 + var_2 * 0x14 <= var_4) {
        return;
      }
    }
    var_2 = (*(type_7 *)PTR_png_handle_as_unknown_00053460)(png_ptr,var_4);
    if ((var_2 == 1) ||
       ((((*(type_6 *)(var_4 + 3) & 0x20) == 0 && (var_2 != 3)) &&
        ((var_2 != 0 || (png_ptr->unknown_default != 3)))))) {
      var_1 = info_ptr->width;
      var_2 = *(int *)where;
    }
    else {
      var_2 = *(int *)(var_4 + 0xc);
      if (var_2 == 0) {
        (*(type_7 *)PTR_png_warning_00053440)(png_ptr,puVar3);
        var_2 = *(int *)(var_4 + 0xc);
      }
      (*(type_7 *)PTR_png_write_chunk_00053424)(png_ptr,var_4,*(type_8 *)(var_4 + 8),var_2);
      var_1 = info_ptr->width;
      var_2 = *(int *)where;
    }
    var_4 = var_4 + 0x14;
  } while (var_4 < var_1 + var_2 * 0x14);
  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: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (parameter_declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (parameter_declaration type: (type_identifier) declarator: (identifier)))) body: (compound_statement (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)) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (identifier)))) (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal))) right: (identifier))) consequence: (compound_statement (return_statement))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (do_statement body: (compound_statement (while_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (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: (identifier))) right: (number_literal))) body: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal))) right: (identifier))) consequence: (compound_statement (return_statement))))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (parenthesized_expression (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (identifier)))) arguments: (argument_list (identifier) (identifier))))) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) right: (parenthesized_expression (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (binary_expression left: (parenthesized_expression (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))) right: (number_literal)) right: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (parenthesized_expression (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (number_literal)) right: (parenthesized_expression (binary_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (number_literal))))))))))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (identifier))))) alternative: (else_clause (compound_statement (expression_statement (assignment_expression left: (identifier) right: (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))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (call_expression function: (parenthesized_expression (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (identifier)))) arguments: (argument_list (identifier) (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (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))))))))) (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) (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))))) (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (identifier))))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal))))) condition: (parenthesized_expression (binary_expression left: (identifier) right: (binary_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))))) (return_statement))))

void MASKED(int param_1,uint *param_2,int *param_3,byte param_4)

{
  int iVar1;
  uint uVar2;
  undefined *puVar3;
  uint uVar4;
  
  iVar1 = *param_3;
  uVar2 = *param_2;
  if (uVar2 + iVar1 * 0x14 <= uVar2) {
    return;
  }
  puVar3 = PTR_s_nt_0005301c + 0x1bb0;
  uVar4 = uVar2;
  do {
    while ((*(byte *)(uVar4 + 0x10) & param_4) == 0) {
      uVar4 = uVar4 + 0x14;
      if (uVar2 + iVar1 * 0x14 <= uVar4) {
        return;
      }
    }
    iVar1 = (*(code *)PTR_png_handle_as_unknown_00053460)(param_1,uVar4);
    if ((iVar1 == 1) ||
       ((((*(byte *)(uVar4 + 3) & 0x20) == 0 && (iVar1 != 3)) &&
        ((iVar1 != 0 || (*(int *)(param_1 + 0x2ec) != 3)))))) {
      uVar2 = *param_2;
      iVar1 = *param_3;
    }
    else {
      iVar1 = *(int *)(uVar4 + 0xc);
      if (iVar1 == 0) {
        (*(code *)PTR_png_warning_00053440)(param_1,puVar3);
        iVar1 = *(int *)(uVar4 + 0xc);
      }
      (*(code *)PTR_png_write_chunk_00053424)(param_1,uVar4,*(undefined4 *)(uVar4 + 8),iVar1);
      uVar2 = *param_2;
      iVar1 = *param_3;
    }
    uVar4 = uVar4 + 0x14;
  } while (uVar4 < uVar2 + iVar1 * 0x14);
  return;
}

