
void png_set_rgb_to_gray_fixed
               (png_structrp png_ptr,int error_action,png_fixed_point red,png_fixed_point green)

{
  int iVar1;
  uint uVar2;
  
  iVar1 = png_rtran_ok(png_ptr,1);
  if (iVar1 != 0) {
    if (error_action == 2) {
      uVar2 = png_ptr->transformations | 0x400000;
      png_ptr->transformations = uVar2;
    }
    else if (error_action == 3) {
      uVar2 = png_ptr->transformations | 0x200000;
      png_ptr->transformations = uVar2;
    }
    else {
      if (error_action != 1) {
        (*(code *)PTR_png_error_0005340c)(png_ptr,PTR_s_nt_0005301c + 0x3ac);
      }
      uVar2 = png_ptr->transformations | 0x600000;
      png_ptr->transformations = uVar2;
    }
    if (png_ptr->color_type == '\x03') {
      png_ptr->transformations = uVar2 | 0x1000;
    }
    if ((-1 < red) && (-1 < green)) {
      if (red + green < 0x186a1) {
        png_ptr->rgb_to_gray_coefficients_set = '\x01';
        png_ptr->rgb_to_gray_red_coeff = (png_uint_16)((uint)(red << 0xf) / 100000);
        png_ptr->rgb_to_gray_green_coeff = (png_uint_16)((uint)(green << 0xf) / 100000);
        return;
      }
      png_app_warning(png_ptr,PTR_s_nt_0005301c + 0x3d0);
    }
    if ((png_ptr->rgb_to_gray_red_coeff == 0) && (png_ptr->rgb_to_gray_green_coeff == 0)) {
      png_ptr->rgb_to_gray_red_coeff = 0x1b38;
      png_ptr->rgb_to_gray_green_coeff = 0x5b8a;
    }
  }
  return;
}



void png_set_rgb_to_gray_fixed(int param_1,int param_2,int param_3,int param_4)

{
  int iVar1;
  uint uVar2;
  
  iVar1 = FUN_00024cb8(param_1,1);
  if (iVar1 != 0) {
    if (param_2 == 2) {
      uVar2 = *(uint *)(param_1 + 300) | 0x400000;
      *(uint *)(param_1 + 300) = uVar2;
    }
    else if (param_2 == 3) {
      uVar2 = *(uint *)(param_1 + 300) | 0x200000;
      *(uint *)(param_1 + 300) = uVar2;
    }
    else {
      if (param_2 != 1) {
        (*(code *)PTR_png_error_0005340c)(param_1,PTR_s_nt_0005301c + 0x3ac);
      }
      uVar2 = *(uint *)(param_1 + 300) | 0x600000;
      *(uint *)(param_1 + 300) = uVar2;
    }
    if (*(char *)(param_1 + 0x1ff) == '\x03') {
      *(uint *)(param_1 + 300) = uVar2 | 0x1000;
    }
    if ((-1 < param_3) && (-1 < param_4)) {
      if (param_3 + param_4 < 0x186a1) {
        *(undefined1 *)(param_1 + 0x2f9) = 1;
        *(short *)(param_1 + 0x2fa) = (short)((uint)(param_3 << 0xf) / 100000);
        *(short *)(param_1 + 0x2fc) = (short)((uint)(param_4 << 0xf) / 100000);
        return;
      }
      FUN_0001a110(param_1,PTR_s_nt_0005301c + 0x3d0);
    }
    if ((*(short *)(param_1 + 0x2fa) == 0) && (*(short *)(param_1 + 0x2fc) == 0)) {
      *(undefined2 *)(param_1 + 0x2fa) = 0x1b38;
      *(undefined2 *)(param_1 + 0x2fc) = 0x5b8a;
    }
  }
  return;
}


lui gp,0x3
addiu gp,gp,0x4ccc
addu gp,gp,t9
addiu sp,sp,-0x30
lw t9,-0x7f80(gp)
addiu t9,t9,0x4cb8
sw s1,0x20(sp)
or s1,a1,zero
sw gp,0x10(sp)
li a1,0x1
sw s3,0x28(sp)
sw s2,0x24(sp)
or s3,a3,zero
sw s0,0x1c(sp)
or s2,a2,zero
sw ra,0x2c(sp)
bal 0x00024cb8
_or s0,a0,zero
beq v0,zero,0x0002642c
_lw gp,0x10(sp)
li v0,0x2
beq s1,v0,0x00026458
_lui v1,0x40
li v0,0x3
beq s1,v0,0x00026448
_lui v1,0x20
li v0,0x1
beq s1,v0,0x000263a8
_lw a1,-0x7fd4(gp)
or a0,s0,zero
lw t9,-0x7be4(gp)
jalr t9
_addiu a1,a1,0x3ac
lw v0,0x12c(s0)
lui v1,0x60
or v0,v0,v1
sw v0,0x12c(s0)
lbu a0,0x1ff(s0)
li v1,0x3
bne a0,v1,0x000263cc
_ori v0,v0,0x1000
sw v0,0x12c(s0)
bltz s2,0x00026404
_nop
bltz s3,0x00026404
_lui v1,0x1
addu v0,s2,s3
ori v1,v1,0x86a1
slt v0,v0,v1
bne v0,zero,0x00026468
_sll v0,s3,0xf
lw a1,-0x7fd4(gp)
or a0,s0,zero
lw t9,-0x7f70(gp)
bal 0x0001a110
_addiu a1,a1,0x3d0
lhu v0,0x2fa(s0)
bne v0,zero,0x00026430
_lw ra,0x2c(sp)
lhu v0,0x2fc(s0)
bne v0,zero,0x00026434
_lw s3,0x28(sp)
li v0,0x1b38
sh v0,0x2fa(s0)
li v0,0x5b8a
sh v0,0x2fc(s0)
lw ra,0x2c(sp)
lw s3,0x28(sp)
lw s2,0x24(sp)
lw s1,0x20(sp)
lw s0,0x1c(sp)
jr ra
_addiu sp,sp,0x30
lw v0,0x12c(s0)
or v0,v0,v1
b 0x000263b8
_sw v0,0x12c(s0)
lw v0,0x12c(s0)
or v0,v0,v1
b 0x000263b8
_sw v0,0x12c(s0)
sll s2,s2,0xf
lui s3,0xa7c
srl s2,s2,0x5
addiu s3,s3,0x5ac5
srl v0,v0,0x5
multu s2,s3
li v1,0x1
sb v1,0x2f9(s0)
mfhi s2
lw ra,0x2c(sp)
multu v0,s3
lw s1,0x20(sp)
lw s3,0x28(sp)
mfhi v0
srl s2,s2,0x7
sh s2,0x2fa(s0)
lw s2,0x24(sp)
srl v0,v0,0x7
sh v0,0x2fc(s0)
lw s0,0x1c(sp)
jr ra
_addiu sp,sp,0x30
(translation_unit "void png_set_rgb_to_gray_fixed(int param_1,int param_2,int param_3,int param_4)\n\n{\n  int iVar1;\n  uint uVar2;\n  \n  iVar1 = FUN_00024cb8(param_1,1);\n  if (iVar1 != 0) {\n    if (param_2 == 2) {\n      uVar2 = *(uint *)(param_1 + 300) | 0x400000;\n      *(uint *)(param_1 + 300) = uVar2;\n    }\n    else if (param_2 == 3) {\n      uVar2 = *(uint *)(param_1 + 300) | 0x200000;\n      *(uint *)(param_1 + 300) = uVar2;\n    }\n    else {\n      if (param_2 != 1) {\n        (*(code *)PTR_png_error_0005340c)(param_1,PTR_s_nt_0005301c + 0x3ac);\n      }\n      uVar2 = *(uint *)(param_1 + 300) | 0x600000;\n      *(uint *)(param_1 + 300) = uVar2;\n    }\n    if (*(char *)(param_1 + 0x1ff) == '\x03') {\n      *(uint *)(param_1 + 300) = uVar2 | 0x1000;\n    }\n    if ((-1 < param_3) && (-1 < param_4)) {\n      if (param_3 + param_4 < 0x186a1) {\n        *(undefined1 *)(param_1 + 0x2f9) = 1;\n        *(short *)(param_1 + 0x2fa) = (short)((uint)(param_3 << 0xf) / 100000);\n        *(short *)(param_1 + 0x2fc) = (short)((uint)(param_4 << 0xf) / 100000);\n        return;\n      }\n      FUN_0001a110(param_1,PTR_s_nt_0005301c + 0x3d0);\n    }\n    if ((*(short *)(param_1 + 0x2fa) == 0) && (*(short *)(param_1 + 0x2fc) == 0)) {\n      *(undefined2 *)(param_1 + 0x2fa) = 0x1b38;\n      *(undefined2 *)(param_1 + 0x2fc) = 0x5b8a;\n    }\n  }\n  return;\n}\n\n" (function_definition "void png_set_rgb_to_gray_fixed(int param_1,int param_2,int param_3,int param_4)\n\n{\n  int iVar1;\n  uint uVar2;\n  \n  iVar1 = FUN_00024cb8(param_1,1);\n  if (iVar1 != 0) {\n    if (param_2 == 2) {\n      uVar2 = *(uint *)(param_1 + 300) | 0x400000;\n      *(uint *)(param_1 + 300) = uVar2;\n    }\n    else if (param_2 == 3) {\n      uVar2 = *(uint *)(param_1 + 300) | 0x200000;\n      *(uint *)(param_1 + 300) = uVar2;\n    }\n    else {\n      if (param_2 != 1) {\n        (*(code *)PTR_png_error_0005340c)(param_1,PTR_s_nt_0005301c + 0x3ac);\n      }\n      uVar2 = *(uint *)(param_1 + 300) | 0x600000;\n      *(uint *)(param_1 + 300) = uVar2;\n    }\n    if (*(char *)(param_1 + 0x1ff) == '\x03') {\n      *(uint *)(param_1 + 300) = uVar2 | 0x1000;\n    }\n    if ((-1 < param_3) && (-1 < param_4)) {\n      if (param_3 + param_4 < 0x186a1) {\n        *(undefined1 *)(param_1 + 0x2f9) = 1;\n        *(short *)(param_1 + 0x2fa) = (short)((uint)(param_3 << 0xf) / 100000);\n        *(short *)(param_1 + 0x2fc) = (short)((uint)(param_4 << 0xf) / 100000);\n        return;\n      }\n      FUN_0001a110(param_1,PTR_s_nt_0005301c + 0x3d0);\n    }\n    if ((*(short *)(param_1 + 0x2fa) == 0) && (*(short *)(param_1 + 0x2fc) == 0)) {\n      *(undefined2 *)(param_1 + 0x2fa) = 0x1b38;\n      *(undefined2 *)(param_1 + 0x2fc) = 0x5b8a;\n    }\n  }\n  return;\n}" primitive_type (function_declarator "png_set_rgb_to_gray_fixed(int param_1,int param_2,int param_3,int param_4)" identifier (parameter_list "(int param_1,int param_2,int param_3,int param_4)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "int param_2" primitive_type identifier) , (parameter_declaration "int param_3" primitive_type identifier) , (parameter_declaration "int param_4" primitive_type identifier) ))) (compound_statement "{\n  int iVar1;\n  uint uVar2;\n  \n  iVar1 = FUN_00024cb8(param_1,1);\n  if (iVar1 != 0) {\n    if (param_2 == 2) {\n      uVar2 = *(uint *)(param_1 + 300) | 0x400000;\n      *(uint *)(param_1 + 300) = uVar2;\n    }\n    else if (param_2 == 3) {\n      uVar2 = *(uint *)(param_1 + 300) | 0x200000;\n      *(uint *)(param_1 + 300) = uVar2;\n    }\n    else {\n      if (param_2 != 1) {\n        (*(code *)PTR_png_error_0005340c)(param_1,PTR_s_nt_0005301c + 0x3ac);\n      }\n      uVar2 = *(uint *)(param_1 + 300) | 0x600000;\n      *(uint *)(param_1 + 300) = uVar2;\n    }\n    if (*(char *)(param_1 + 0x1ff) == '\x03') {\n      *(uint *)(param_1 + 300) = uVar2 | 0x1000;\n    }\n    if ((-1 < param_3) && (-1 < param_4)) {\n      if (param_3 + param_4 < 0x186a1) {\n        *(undefined1 *)(param_1 + 0x2f9) = 1;\n        *(short *)(param_1 + 0x2fa) = (short)((uint)(param_3 << 0xf) / 100000);\n        *(short *)(param_1 + 0x2fc) = (short)((uint)(param_4 << 0xf) / 100000);\n        return;\n      }\n      FUN_0001a110(param_1,PTR_s_nt_0005301c + 0x3d0);\n    }\n    if ((*(short *)(param_1 + 0x2fa) == 0) && (*(short *)(param_1 + 0x2fc) == 0)) {\n      *(undefined2 *)(param_1 + 0x2fa) = 0x1b38;\n      *(undefined2 *)(param_1 + 0x2fc) = 0x5b8a;\n    }\n  }\n  return;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "uint uVar2;" type_identifier identifier ;) (expression_statement "iVar1 = FUN_00024cb8(param_1,1);" (assignment_expression "iVar1 = FUN_00024cb8(param_1,1)" identifier = (call_expression "FUN_00024cb8(param_1,1)" identifier (argument_list "(param_1,1)" ( identifier , number_literal )))) ;) (if_statement "if (iVar1 != 0) {\n    if (param_2 == 2) {\n      uVar2 = *(uint *)(param_1 + 300) | 0x400000;\n      *(uint *)(param_1 + 300) = uVar2;\n    }\n    else if (param_2 == 3) {\n      uVar2 = *(uint *)(param_1 + 300) | 0x200000;\n      *(uint *)(param_1 + 300) = uVar2;\n    }\n    else {\n      if (param_2 != 1) {\n        (*(code *)PTR_png_error_0005340c)(param_1,PTR_s_nt_0005301c + 0x3ac);\n      }\n      uVar2 = *(uint *)(param_1 + 300) | 0x600000;\n      *(uint *)(param_1 + 300) = uVar2;\n    }\n    if (*(char *)(param_1 + 0x1ff) == '\x03') {\n      *(uint *)(param_1 + 300) = uVar2 | 0x1000;\n    }\n    if ((-1 < param_3) && (-1 < param_4)) {\n      if (param_3 + param_4 < 0x186a1) {\n        *(undefined1 *)(param_1 + 0x2f9) = 1;\n        *(short *)(param_1 + 0x2fa) = (short)((uint)(param_3 << 0xf) / 100000);\n        *(short *)(param_1 + 0x2fc) = (short)((uint)(param_4 << 0xf) / 100000);\n        return;\n      }\n      FUN_0001a110(param_1,PTR_s_nt_0005301c + 0x3d0);\n    }\n    if ((*(short *)(param_1 + 0x2fa) == 0) && (*(short *)(param_1 + 0x2fc) == 0)) {\n      *(undefined2 *)(param_1 + 0x2fa) = 0x1b38;\n      *(undefined2 *)(param_1 + 0x2fc) = 0x5b8a;\n    }\n  }" if (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) (compound_statement "{\n    if (param_2 == 2) {\n      uVar2 = *(uint *)(param_1 + 300) | 0x400000;\n      *(uint *)(param_1 + 300) = uVar2;\n    }\n    else if (param_2 == 3) {\n      uVar2 = *(uint *)(param_1 + 300) | 0x200000;\n      *(uint *)(param_1 + 300) = uVar2;\n    }\n    else {\n      if (param_2 != 1) {\n        (*(code *)PTR_png_error_0005340c)(param_1,PTR_s_nt_0005301c + 0x3ac);\n      }\n      uVar2 = *(uint *)(param_1 + 300) | 0x600000;\n      *(uint *)(param_1 + 300) = uVar2;\n    }\n    if (*(char *)(param_1 + 0x1ff) == '\x03') {\n      *(uint *)(param_1 + 300) = uVar2 | 0x1000;\n    }\n    if ((-1 < param_3) && (-1 < param_4)) {\n      if (param_3 + param_4 < 0x186a1) {\n        *(undefined1 *)(param_1 + 0x2f9) = 1;\n        *(short *)(param_1 + 0x2fa) = (short)((uint)(param_3 << 0xf) / 100000);\n        *(short *)(param_1 + 0x2fc) = (short)((uint)(param_4 << 0xf) / 100000);\n        return;\n      }\n      FUN_0001a110(param_1,PTR_s_nt_0005301c + 0x3d0);\n    }\n    if ((*(short *)(param_1 + 0x2fa) == 0) && (*(short *)(param_1 + 0x2fc) == 0)) {\n      *(undefined2 *)(param_1 + 0x2fa) = 0x1b38;\n      *(undefined2 *)(param_1 + 0x2fc) = 0x5b8a;\n    }\n  }" { (if_statement "if (param_2 == 2) {\n      uVar2 = *(uint *)(param_1 + 300) | 0x400000;\n      *(uint *)(param_1 + 300) = uVar2;\n    }\n    else if (param_2 == 3) {\n      uVar2 = *(uint *)(param_1 + 300) | 0x200000;\n      *(uint *)(param_1 + 300) = uVar2;\n    }\n    else {\n      if (param_2 != 1) {\n        (*(code *)PTR_png_error_0005340c)(param_1,PTR_s_nt_0005301c + 0x3ac);\n      }\n      uVar2 = *(uint *)(param_1 + 300) | 0x600000;\n      *(uint *)(param_1 + 300) = uVar2;\n    }" if (parenthesized_expression "(param_2 == 2)" ( (binary_expression "param_2 == 2" identifier == number_literal) )) (compound_statement "{\n      uVar2 = *(uint *)(param_1 + 300) | 0x400000;\n      *(uint *)(param_1 + 300) = uVar2;\n    }" { (expression_statement "uVar2 = *(uint *)(param_1 + 300) | 0x400000;" (assignment_expression "uVar2 = *(uint *)(param_1 + 300) | 0x400000" identifier = (binary_expression "*(uint *)(param_1 + 300) | 0x400000" (pointer_expression "*(uint *)(param_1 + 300)" * (cast_expression "(uint *)(param_1 + 300)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 300)" ( (binary_expression "param_1 + 300" identifier + number_literal) )))) | number_literal)) ;) (expression_statement "*(uint *)(param_1 + 300) = uVar2;" (assignment_expression "*(uint *)(param_1 + 300) = uVar2" (pointer_expression "*(uint *)(param_1 + 300)" * (cast_expression "(uint *)(param_1 + 300)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 300)" ( (binary_expression "param_1 + 300" identifier + number_literal) )))) = identifier) ;) }) (else_clause "else if (param_2 == 3) {\n      uVar2 = *(uint *)(param_1 + 300) | 0x200000;\n      *(uint *)(param_1 + 300) = uVar2;\n    }\n    else {\n      if (param_2 != 1) {\n        (*(code *)PTR_png_error_0005340c)(param_1,PTR_s_nt_0005301c + 0x3ac);\n      }\n      uVar2 = *(uint *)(param_1 + 300) | 0x600000;\n      *(uint *)(param_1 + 300) = uVar2;\n    }" else (if_statement "if (param_2 == 3) {\n      uVar2 = *(uint *)(param_1 + 300) | 0x200000;\n      *(uint *)(param_1 + 300) = uVar2;\n    }\n    else {\n      if (param_2 != 1) {\n        (*(code *)PTR_png_error_0005340c)(param_1,PTR_s_nt_0005301c + 0x3ac);\n      }\n      uVar2 = *(uint *)(param_1 + 300) | 0x600000;\n      *(uint *)(param_1 + 300) = uVar2;\n    }" if (parenthesized_expression "(param_2 == 3)" ( (binary_expression "param_2 == 3" identifier == number_literal) )) (compound_statement "{\n      uVar2 = *(uint *)(param_1 + 300) | 0x200000;\n      *(uint *)(param_1 + 300) = uVar2;\n    }" { (expression_statement "uVar2 = *(uint *)(param_1 + 300) | 0x200000;" (assignment_expression "uVar2 = *(uint *)(param_1 + 300) | 0x200000" identifier = (binary_expression "*(uint *)(param_1 + 300) | 0x200000" (pointer_expression "*(uint *)(param_1 + 300)" * (cast_expression "(uint *)(param_1 + 300)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 300)" ( (binary_expression "param_1 + 300" identifier + number_literal) )))) | number_literal)) ;) (expression_statement "*(uint *)(param_1 + 300) = uVar2;" (assignment_expression "*(uint *)(param_1 + 300) = uVar2" (pointer_expression "*(uint *)(param_1 + 300)" * (cast_expression "(uint *)(param_1 + 300)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 300)" ( (binary_expression "param_1 + 300" identifier + number_literal) )))) = identifier) ;) }) (else_clause "else {\n      if (param_2 != 1) {\n        (*(code *)PTR_png_error_0005340c)(param_1,PTR_s_nt_0005301c + 0x3ac);\n      }\n      uVar2 = *(uint *)(param_1 + 300) | 0x600000;\n      *(uint *)(param_1 + 300) = uVar2;\n    }" else (compound_statement "{\n      if (param_2 != 1) {\n        (*(code *)PTR_png_error_0005340c)(param_1,PTR_s_nt_0005301c + 0x3ac);\n      }\n      uVar2 = *(uint *)(param_1 + 300) | 0x600000;\n      *(uint *)(param_1 + 300) = uVar2;\n    }" { (if_statement "if (param_2 != 1) {\n        (*(code *)PTR_png_error_0005340c)(param_1,PTR_s_nt_0005301c + 0x3ac);\n      }" if (parenthesized_expression "(param_2 != 1)" ( (binary_expression "param_2 != 1" identifier != number_literal) )) (compound_statement "{\n        (*(code *)PTR_png_error_0005340c)(param_1,PTR_s_nt_0005301c + 0x3ac);\n      }" { (expression_statement "(*(code *)PTR_png_error_0005340c)(param_1,PTR_s_nt_0005301c + 0x3ac);" (call_expression "(*(code *)PTR_png_error_0005340c)(param_1,PTR_s_nt_0005301c + 0x3ac)" (parenthesized_expression "(*(code *)PTR_png_error_0005340c)" ( (pointer_expression "*(code *)PTR_png_error_0005340c" * (cast_expression "(code *)PTR_png_error_0005340c" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(param_1,PTR_s_nt_0005301c + 0x3ac)" ( identifier , (binary_expression "PTR_s_nt_0005301c + 0x3ac" identifier + number_literal) ))) ;) })) (expression_statement "uVar2 = *(uint *)(param_1 + 300) | 0x600000;" (assignment_expression "uVar2 = *(uint *)(param_1 + 300) | 0x600000" identifier = (binary_expression "*(uint *)(param_1 + 300) | 0x600000" (pointer_expression "*(uint *)(param_1 + 300)" * (cast_expression "(uint *)(param_1 + 300)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 300)" ( (binary_expression "param_1 + 300" identifier + number_literal) )))) | number_literal)) ;) (expression_statement "*(uint *)(param_1 + 300) = uVar2;" (assignment_expression "*(uint *)(param_1 + 300) = uVar2" (pointer_expression "*(uint *)(param_1 + 300)" * (cast_expression "(uint *)(param_1 + 300)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 300)" ( (binary_expression "param_1 + 300" identifier + number_literal) )))) = identifier) ;) }))))) (if_statement "if (*(char *)(param_1 + 0x1ff) == '\x03') {\n      *(uint *)(param_1 + 300) = uVar2 | 0x1000;\n    }" if (parenthesized_expression "(*(char *)(param_1 + 0x1ff) == '\x03')" ( (binary_expression "*(char *)(param_1 + 0x1ff) == '\x03'" (pointer_expression "*(char *)(param_1 + 0x1ff)" * (cast_expression "(char *)(param_1 + 0x1ff)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x1ff)" ( (binary_expression "param_1 + 0x1ff" identifier + number_literal) )))) == (char_literal "'\x03'" ' escape_sequence ')) )) (compound_statement "{\n      *(uint *)(param_1 + 300) = uVar2 | 0x1000;\n    }" { (expression_statement "*(uint *)(param_1 + 300) = uVar2 | 0x1000;" (assignment_expression "*(uint *)(param_1 + 300) = uVar2 | 0x1000" (pointer_expression "*(uint *)(param_1 + 300)" * (cast_expression "(uint *)(param_1 + 300)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 300)" ( (binary_expression "param_1 + 300" identifier + number_literal) )))) = (binary_expression "uVar2 | 0x1000" identifier | number_literal)) ;) })) (if_statement "if ((-1 < param_3) && (-1 < param_4)) {\n      if (param_3 + param_4 < 0x186a1) {\n        *(undefined1 *)(param_1 + 0x2f9) = 1;\n        *(short *)(param_1 + 0x2fa) = (short)((uint)(param_3 << 0xf) / 100000);\n        *(short *)(param_1 + 0x2fc) = (short)((uint)(param_4 << 0xf) / 100000);\n        return;\n      }\n      FUN_0001a110(param_1,PTR_s_nt_0005301c + 0x3d0);\n    }" if (parenthesized_expression "((-1 < param_3) && (-1 < param_4))" ( (binary_expression "(-1 < param_3) && (-1 < param_4)" (parenthesized_expression "(-1 < param_3)" ( (binary_expression "-1 < param_3" number_literal < identifier) )) && (parenthesized_expression "(-1 < param_4)" ( (binary_expression "-1 < param_4" number_literal < identifier) ))) )) (compound_statement "{\n      if (param_3 + param_4 < 0x186a1) {\n        *(undefined1 *)(param_1 + 0x2f9) = 1;\n        *(short *)(param_1 + 0x2fa) = (short)((uint)(param_3 << 0xf) / 100000);\n        *(short *)(param_1 + 0x2fc) = (short)((uint)(param_4 << 0xf) / 100000);\n        return;\n      }\n      FUN_0001a110(param_1,PTR_s_nt_0005301c + 0x3d0);\n    }" { (if_statement "if (param_3 + param_4 < 0x186a1) {\n        *(undefined1 *)(param_1 + 0x2f9) = 1;\n        *(short *)(param_1 + 0x2fa) = (short)((uint)(param_3 << 0xf) / 100000);\n        *(short *)(param_1 + 0x2fc) = (short)((uint)(param_4 << 0xf) / 100000);\n        return;\n      }" if (parenthesized_expression "(param_3 + param_4 < 0x186a1)" ( (binary_expression "param_3 + param_4 < 0x186a1" (binary_expression "param_3 + param_4" identifier + identifier) < number_literal) )) (compound_statement "{\n        *(undefined1 *)(param_1 + 0x2f9) = 1;\n        *(short *)(param_1 + 0x2fa) = (short)((uint)(param_3 << 0xf) / 100000);\n        *(short *)(param_1 + 0x2fc) = (short)((uint)(param_4 << 0xf) / 100000);\n        return;\n      }" { (expression_statement "*(undefined1 *)(param_1 + 0x2f9) = 1;" (assignment_expression "*(undefined1 *)(param_1 + 0x2f9) = 1" (pointer_expression "*(undefined1 *)(param_1 + 0x2f9)" * (cast_expression "(undefined1 *)(param_1 + 0x2f9)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x2f9)" ( (binary_expression "param_1 + 0x2f9" identifier + number_literal) )))) = number_literal) ;) (expression_statement "*(short *)(param_1 + 0x2fa) = (short)((uint)(param_3 << 0xf) / 100000);" (assignment_expression "*(short *)(param_1 + 0x2fa) = (short)((uint)(param_3 << 0xf) / 100000)" (pointer_expression "*(short *)(param_1 + 0x2fa)" * (cast_expression "(short *)(param_1 + 0x2fa)" ( (type_descriptor "short *" (sized_type_specifier "short" short) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x2fa)" ( (binary_expression "param_1 + 0x2fa" identifier + number_literal) )))) = (cast_expression "(short)((uint)(param_3 << 0xf) / 100000)" ( (type_descriptor "short" (sized_type_specifier "short" short)) ) (parenthesized_expression "((uint)(param_3 << 0xf) / 100000)" ( (binary_expression "(uint)(param_3 << 0xf) / 100000" (call_expression "(uint)(param_3 << 0xf)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(param_3 << 0xf)" ( (binary_expression "param_3 << 0xf" identifier << number_literal) ))) / number_literal) )))) ;) (expression_statement "*(short *)(param_1 + 0x2fc) = (short)((uint)(param_4 << 0xf) / 100000);" (assignment_expression "*(short *)(param_1 + 0x2fc) = (short)((uint)(param_4 << 0xf) / 100000)" (pointer_expression "*(short *)(param_1 + 0x2fc)" * (cast_expression "(short *)(param_1 + 0x2fc)" ( (type_descriptor "short *" (sized_type_specifier "short" short) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x2fc)" ( (binary_expression "param_1 + 0x2fc" identifier + number_literal) )))) = (cast_expression "(short)((uint)(param_4 << 0xf) / 100000)" ( (type_descriptor "short" (sized_type_specifier "short" short)) ) (parenthesized_expression "((uint)(param_4 << 0xf) / 100000)" ( (binary_expression "(uint)(param_4 << 0xf) / 100000" (call_expression "(uint)(param_4 << 0xf)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(param_4 << 0xf)" ( (binary_expression "param_4 << 0xf" identifier << number_literal) ))) / number_literal) )))) ;) (return_statement "return;" return ;) })) (expression_statement "FUN_0001a110(param_1,PTR_s_nt_0005301c + 0x3d0);" (call_expression "FUN_0001a110(param_1,PTR_s_nt_0005301c + 0x3d0)" identifier (argument_list "(param_1,PTR_s_nt_0005301c + 0x3d0)" ( identifier , (binary_expression "PTR_s_nt_0005301c + 0x3d0" identifier + number_literal) ))) ;) })) (if_statement "if ((*(short *)(param_1 + 0x2fa) == 0) && (*(short *)(param_1 + 0x2fc) == 0)) {\n      *(undefined2 *)(param_1 + 0x2fa) = 0x1b38;\n      *(undefined2 *)(param_1 + 0x2fc) = 0x5b8a;\n    }" if (parenthesized_expression "((*(short *)(param_1 + 0x2fa) == 0) && (*(short *)(param_1 + 0x2fc) == 0))" ( (binary_expression "(*(short *)(param_1 + 0x2fa) == 0) && (*(short *)(param_1 + 0x2fc) == 0)" (parenthesized_expression "(*(short *)(param_1 + 0x2fa) == 0)" ( (binary_expression "*(short *)(param_1 + 0x2fa) == 0" (pointer_expression "*(short *)(param_1 + 0x2fa)" * (cast_expression "(short *)(param_1 + 0x2fa)" ( (type_descriptor "short *" (sized_type_specifier "short" short) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x2fa)" ( (binary_expression "param_1 + 0x2fa" identifier + number_literal) )))) == number_literal) )) && (parenthesized_expression "(*(short *)(param_1 + 0x2fc) == 0)" ( (binary_expression "*(short *)(param_1 + 0x2fc) == 0" (pointer_expression "*(short *)(param_1 + 0x2fc)" * (cast_expression "(short *)(param_1 + 0x2fc)" ( (type_descriptor "short *" (sized_type_specifier "short" short) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x2fc)" ( (binary_expression "param_1 + 0x2fc" identifier + number_literal) )))) == number_literal) ))) )) (compound_statement "{\n      *(undefined2 *)(param_1 + 0x2fa) = 0x1b38;\n      *(undefined2 *)(param_1 + 0x2fc) = 0x5b8a;\n    }" { (expression_statement "*(undefined2 *)(param_1 + 0x2fa) = 0x1b38;" (assignment_expression "*(undefined2 *)(param_1 + 0x2fa) = 0x1b38" (pointer_expression "*(undefined2 *)(param_1 + 0x2fa)" * (cast_expression "(undefined2 *)(param_1 + 0x2fa)" ( (type_descriptor "undefined2 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x2fa)" ( (binary_expression "param_1 + 0x2fa" identifier + number_literal) )))) = number_literal) ;) (expression_statement "*(undefined2 *)(param_1 + 0x2fc) = 0x5b8a;" (assignment_expression "*(undefined2 *)(param_1 + 0x2fc) = 0x5b8a" (pointer_expression "*(undefined2 *)(param_1 + 0x2fc)" * (cast_expression "(undefined2 *)(param_1 + 0x2fc)" ( (type_descriptor "undefined2 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x2fc)" ( (binary_expression "param_1 + 0x2fc" identifier + number_literal) )))) = number_literal) ;) })) })) (return_statement "return;" return ;) })))
(translation_unit "void png_set_rgb_to_gray_fixed\n               (png_structrp png_ptr,int error_action,png_fixed_point red,png_fixed_point green)\n\n{\n  int iVar1;\n  uint uVar2;\n  \n  iVar1 = png_rtran_ok(png_ptr,1);\n  if (iVar1 != 0) {\n    if (error_action == 2) {\n      uVar2 = png_ptr->transformations | 0x400000;\n      png_ptr->transformations = uVar2;\n    }\n    else if (error_action == 3) {\n      uVar2 = png_ptr->transformations | 0x200000;\n      png_ptr->transformations = uVar2;\n    }\n    else {\n      if (error_action != 1) {\n        (*(code *)PTR_png_error_0005340c)(png_ptr,PTR_s_nt_0005301c + 0x3ac);\n      }\n      uVar2 = png_ptr->transformations | 0x600000;\n      png_ptr->transformations = uVar2;\n    }\n    if (png_ptr->color_type == '\x03') {\n      png_ptr->transformations = uVar2 | 0x1000;\n    }\n    if ((-1 < red) && (-1 < green)) {\n      if (red + green < 0x186a1) {\n        png_ptr->rgb_to_gray_coefficients_set = '\x01';\n        png_ptr->rgb_to_gray_red_coeff = (png_uint_16)((uint)(red << 0xf) / 100000);\n        png_ptr->rgb_to_gray_green_coeff = (png_uint_16)((uint)(green << 0xf) / 100000);\n        return;\n      }\n      png_app_warning(png_ptr,PTR_s_nt_0005301c + 0x3d0);\n    }\n    if ((png_ptr->rgb_to_gray_red_coeff == 0) && (png_ptr->rgb_to_gray_green_coeff == 0)) {\n      png_ptr->rgb_to_gray_red_coeff = 0x1b38;\n      png_ptr->rgb_to_gray_green_coeff = 0x5b8a;\n    }\n  }\n  return;\n}\n\n" (function_definition "void png_set_rgb_to_gray_fixed\n               (png_structrp png_ptr,int error_action,png_fixed_point red,png_fixed_point green)\n\n{\n  int iVar1;\n  uint uVar2;\n  \n  iVar1 = png_rtran_ok(png_ptr,1);\n  if (iVar1 != 0) {\n    if (error_action == 2) {\n      uVar2 = png_ptr->transformations | 0x400000;\n      png_ptr->transformations = uVar2;\n    }\n    else if (error_action == 3) {\n      uVar2 = png_ptr->transformations | 0x200000;\n      png_ptr->transformations = uVar2;\n    }\n    else {\n      if (error_action != 1) {\n        (*(code *)PTR_png_error_0005340c)(png_ptr,PTR_s_nt_0005301c + 0x3ac);\n      }\n      uVar2 = png_ptr->transformations | 0x600000;\n      png_ptr->transformations = uVar2;\n    }\n    if (png_ptr->color_type == '\x03') {\n      png_ptr->transformations = uVar2 | 0x1000;\n    }\n    if ((-1 < red) && (-1 < green)) {\n      if (red + green < 0x186a1) {\n        png_ptr->rgb_to_gray_coefficients_set = '\x01';\n        png_ptr->rgb_to_gray_red_coeff = (png_uint_16)((uint)(red << 0xf) / 100000);\n        png_ptr->rgb_to_gray_green_coeff = (png_uint_16)((uint)(green << 0xf) / 100000);\n        return;\n      }\n      png_app_warning(png_ptr,PTR_s_nt_0005301c + 0x3d0);\n    }\n    if ((png_ptr->rgb_to_gray_red_coeff == 0) && (png_ptr->rgb_to_gray_green_coeff == 0)) {\n      png_ptr->rgb_to_gray_red_coeff = 0x1b38;\n      png_ptr->rgb_to_gray_green_coeff = 0x5b8a;\n    }\n  }\n  return;\n}" primitive_type (function_declarator "png_set_rgb_to_gray_fixed\n               (png_structrp png_ptr,int error_action,png_fixed_point red,png_fixed_point green)" identifier (parameter_list "(png_structrp png_ptr,int error_action,png_fixed_point red,png_fixed_point green)" ( (parameter_declaration "png_structrp png_ptr" type_identifier identifier) , (parameter_declaration "int error_action" primitive_type identifier) , (parameter_declaration "png_fixed_point red" type_identifier identifier) , (parameter_declaration "png_fixed_point green" type_identifier identifier) ))) (compound_statement "{\n  int iVar1;\n  uint uVar2;\n  \n  iVar1 = png_rtran_ok(png_ptr,1);\n  if (iVar1 != 0) {\n    if (error_action == 2) {\n      uVar2 = png_ptr->transformations | 0x400000;\n      png_ptr->transformations = uVar2;\n    }\n    else if (error_action == 3) {\n      uVar2 = png_ptr->transformations | 0x200000;\n      png_ptr->transformations = uVar2;\n    }\n    else {\n      if (error_action != 1) {\n        (*(code *)PTR_png_error_0005340c)(png_ptr,PTR_s_nt_0005301c + 0x3ac);\n      }\n      uVar2 = png_ptr->transformations | 0x600000;\n      png_ptr->transformations = uVar2;\n    }\n    if (png_ptr->color_type == '\x03') {\n      png_ptr->transformations = uVar2 | 0x1000;\n    }\n    if ((-1 < red) && (-1 < green)) {\n      if (red + green < 0x186a1) {\n        png_ptr->rgb_to_gray_coefficients_set = '\x01';\n        png_ptr->rgb_to_gray_red_coeff = (png_uint_16)((uint)(red << 0xf) / 100000);\n        png_ptr->rgb_to_gray_green_coeff = (png_uint_16)((uint)(green << 0xf) / 100000);\n        return;\n      }\n      png_app_warning(png_ptr,PTR_s_nt_0005301c + 0x3d0);\n    }\n    if ((png_ptr->rgb_to_gray_red_coeff == 0) && (png_ptr->rgb_to_gray_green_coeff == 0)) {\n      png_ptr->rgb_to_gray_red_coeff = 0x1b38;\n      png_ptr->rgb_to_gray_green_coeff = 0x5b8a;\n    }\n  }\n  return;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "uint uVar2;" type_identifier identifier ;) (expression_statement "iVar1 = png_rtran_ok(png_ptr,1);" (assignment_expression "iVar1 = png_rtran_ok(png_ptr,1)" identifier = (call_expression "png_rtran_ok(png_ptr,1)" identifier (argument_list "(png_ptr,1)" ( identifier , number_literal )))) ;) (if_statement "if (iVar1 != 0) {\n    if (error_action == 2) {\n      uVar2 = png_ptr->transformations | 0x400000;\n      png_ptr->transformations = uVar2;\n    }\n    else if (error_action == 3) {\n      uVar2 = png_ptr->transformations | 0x200000;\n      png_ptr->transformations = uVar2;\n    }\n    else {\n      if (error_action != 1) {\n        (*(code *)PTR_png_error_0005340c)(png_ptr,PTR_s_nt_0005301c + 0x3ac);\n      }\n      uVar2 = png_ptr->transformations | 0x600000;\n      png_ptr->transformations = uVar2;\n    }\n    if (png_ptr->color_type == '\x03') {\n      png_ptr->transformations = uVar2 | 0x1000;\n    }\n    if ((-1 < red) && (-1 < green)) {\n      if (red + green < 0x186a1) {\n        png_ptr->rgb_to_gray_coefficients_set = '\x01';\n        png_ptr->rgb_to_gray_red_coeff = (png_uint_16)((uint)(red << 0xf) / 100000);\n        png_ptr->rgb_to_gray_green_coeff = (png_uint_16)((uint)(green << 0xf) / 100000);\n        return;\n      }\n      png_app_warning(png_ptr,PTR_s_nt_0005301c + 0x3d0);\n    }\n    if ((png_ptr->rgb_to_gray_red_coeff == 0) && (png_ptr->rgb_to_gray_green_coeff == 0)) {\n      png_ptr->rgb_to_gray_red_coeff = 0x1b38;\n      png_ptr->rgb_to_gray_green_coeff = 0x5b8a;\n    }\n  }" if (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) (compound_statement "{\n    if (error_action == 2) {\n      uVar2 = png_ptr->transformations | 0x400000;\n      png_ptr->transformations = uVar2;\n    }\n    else if (error_action == 3) {\n      uVar2 = png_ptr->transformations | 0x200000;\n      png_ptr->transformations = uVar2;\n    }\n    else {\n      if (error_action != 1) {\n        (*(code *)PTR_png_error_0005340c)(png_ptr,PTR_s_nt_0005301c + 0x3ac);\n      }\n      uVar2 = png_ptr->transformations | 0x600000;\n      png_ptr->transformations = uVar2;\n    }\n    if (png_ptr->color_type == '\x03') {\n      png_ptr->transformations = uVar2 | 0x1000;\n    }\n    if ((-1 < red) && (-1 < green)) {\n      if (red + green < 0x186a1) {\n        png_ptr->rgb_to_gray_coefficients_set = '\x01';\n        png_ptr->rgb_to_gray_red_coeff = (png_uint_16)((uint)(red << 0xf) / 100000);\n        png_ptr->rgb_to_gray_green_coeff = (png_uint_16)((uint)(green << 0xf) / 100000);\n        return;\n      }\n      png_app_warning(png_ptr,PTR_s_nt_0005301c + 0x3d0);\n    }\n    if ((png_ptr->rgb_to_gray_red_coeff == 0) && (png_ptr->rgb_to_gray_green_coeff == 0)) {\n      png_ptr->rgb_to_gray_red_coeff = 0x1b38;\n      png_ptr->rgb_to_gray_green_coeff = 0x5b8a;\n    }\n  }" { (if_statement "if (error_action == 2) {\n      uVar2 = png_ptr->transformations | 0x400000;\n      png_ptr->transformations = uVar2;\n    }\n    else if (error_action == 3) {\n      uVar2 = png_ptr->transformations | 0x200000;\n      png_ptr->transformations = uVar2;\n    }\n    else {\n      if (error_action != 1) {\n        (*(code *)PTR_png_error_0005340c)(png_ptr,PTR_s_nt_0005301c + 0x3ac);\n      }\n      uVar2 = png_ptr->transformations | 0x600000;\n      png_ptr->transformations = uVar2;\n    }" if (parenthesized_expression "(error_action == 2)" ( (binary_expression "error_action == 2" identifier == number_literal) )) (compound_statement "{\n      uVar2 = png_ptr->transformations | 0x400000;\n      png_ptr->transformations = uVar2;\n    }" { (expression_statement "uVar2 = png_ptr->transformations | 0x400000;" (assignment_expression "uVar2 = png_ptr->transformations | 0x400000" identifier = (binary_expression "png_ptr->transformations | 0x400000" (field_expression "png_ptr->transformations" identifier -> field_identifier) | number_literal)) ;) (expression_statement "png_ptr->transformations = uVar2;" (assignment_expression "png_ptr->transformations = uVar2" (field_expression "png_ptr->transformations" identifier -> field_identifier) = identifier) ;) }) (else_clause "else if (error_action == 3) {\n      uVar2 = png_ptr->transformations | 0x200000;\n      png_ptr->transformations = uVar2;\n    }\n    else {\n      if (error_action != 1) {\n        (*(code *)PTR_png_error_0005340c)(png_ptr,PTR_s_nt_0005301c + 0x3ac);\n      }\n      uVar2 = png_ptr->transformations | 0x600000;\n      png_ptr->transformations = uVar2;\n    }" else (if_statement "if (error_action == 3) {\n      uVar2 = png_ptr->transformations | 0x200000;\n      png_ptr->transformations = uVar2;\n    }\n    else {\n      if (error_action != 1) {\n        (*(code *)PTR_png_error_0005340c)(png_ptr,PTR_s_nt_0005301c + 0x3ac);\n      }\n      uVar2 = png_ptr->transformations | 0x600000;\n      png_ptr->transformations = uVar2;\n    }" if (parenthesized_expression "(error_action == 3)" ( (binary_expression "error_action == 3" identifier == number_literal) )) (compound_statement "{\n      uVar2 = png_ptr->transformations | 0x200000;\n      png_ptr->transformations = uVar2;\n    }" { (expression_statement "uVar2 = png_ptr->transformations | 0x200000;" (assignment_expression "uVar2 = png_ptr->transformations | 0x200000" identifier = (binary_expression "png_ptr->transformations | 0x200000" (field_expression "png_ptr->transformations" identifier -> field_identifier) | number_literal)) ;) (expression_statement "png_ptr->transformations = uVar2;" (assignment_expression "png_ptr->transformations = uVar2" (field_expression "png_ptr->transformations" identifier -> field_identifier) = identifier) ;) }) (else_clause "else {\n      if (error_action != 1) {\n        (*(code *)PTR_png_error_0005340c)(png_ptr,PTR_s_nt_0005301c + 0x3ac);\n      }\n      uVar2 = png_ptr->transformations | 0x600000;\n      png_ptr->transformations = uVar2;\n    }" else (compound_statement "{\n      if (error_action != 1) {\n        (*(code *)PTR_png_error_0005340c)(png_ptr,PTR_s_nt_0005301c + 0x3ac);\n      }\n      uVar2 = png_ptr->transformations | 0x600000;\n      png_ptr->transformations = uVar2;\n    }" { (if_statement "if (error_action != 1) {\n        (*(code *)PTR_png_error_0005340c)(png_ptr,PTR_s_nt_0005301c + 0x3ac);\n      }" if (parenthesized_expression "(error_action != 1)" ( (binary_expression "error_action != 1" identifier != number_literal) )) (compound_statement "{\n        (*(code *)PTR_png_error_0005340c)(png_ptr,PTR_s_nt_0005301c + 0x3ac);\n      }" { (expression_statement "(*(code *)PTR_png_error_0005340c)(png_ptr,PTR_s_nt_0005301c + 0x3ac);" (call_expression "(*(code *)PTR_png_error_0005340c)(png_ptr,PTR_s_nt_0005301c + 0x3ac)" (parenthesized_expression "(*(code *)PTR_png_error_0005340c)" ( (pointer_expression "*(code *)PTR_png_error_0005340c" * (cast_expression "(code *)PTR_png_error_0005340c" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(png_ptr,PTR_s_nt_0005301c + 0x3ac)" ( identifier , (binary_expression "PTR_s_nt_0005301c + 0x3ac" identifier + number_literal) ))) ;) })) (expression_statement "uVar2 = png_ptr->transformations | 0x600000;" (assignment_expression "uVar2 = png_ptr->transformations | 0x600000" identifier = (binary_expression "png_ptr->transformations | 0x600000" (field_expression "png_ptr->transformations" identifier -> field_identifier) | number_literal)) ;) (expression_statement "png_ptr->transformations = uVar2;" (assignment_expression "png_ptr->transformations = uVar2" (field_expression "png_ptr->transformations" identifier -> field_identifier) = identifier) ;) }))))) (if_statement "if (png_ptr->color_type == '\x03') {\n      png_ptr->transformations = uVar2 | 0x1000;\n    }" if (parenthesized_expression "(png_ptr->color_type == '\x03')" ( (binary_expression "png_ptr->color_type == '\x03'" (field_expression "png_ptr->color_type" identifier -> field_identifier) == (char_literal "'\x03'" ' escape_sequence ')) )) (compound_statement "{\n      png_ptr->transformations = uVar2 | 0x1000;\n    }" { (expression_statement "png_ptr->transformations = uVar2 | 0x1000;" (assignment_expression "png_ptr->transformations = uVar2 | 0x1000" (field_expression "png_ptr->transformations" identifier -> field_identifier) = (binary_expression "uVar2 | 0x1000" identifier | number_literal)) ;) })) (if_statement "if ((-1 < red) && (-1 < green)) {\n      if (red + green < 0x186a1) {\n        png_ptr->rgb_to_gray_coefficients_set = '\x01';\n        png_ptr->rgb_to_gray_red_coeff = (png_uint_16)((uint)(red << 0xf) / 100000);\n        png_ptr->rgb_to_gray_green_coeff = (png_uint_16)((uint)(green << 0xf) / 100000);\n        return;\n      }\n      png_app_warning(png_ptr,PTR_s_nt_0005301c + 0x3d0);\n    }" if (parenthesized_expression "((-1 < red) && (-1 < green))" ( (binary_expression "(-1 < red) && (-1 < green)" (parenthesized_expression "(-1 < red)" ( (binary_expression "-1 < red" number_literal < identifier) )) && (parenthesized_expression "(-1 < green)" ( (binary_expression "-1 < green" number_literal < identifier) ))) )) (compound_statement "{\n      if (red + green < 0x186a1) {\n        png_ptr->rgb_to_gray_coefficients_set = '\x01';\n        png_ptr->rgb_to_gray_red_coeff = (png_uint_16)((uint)(red << 0xf) / 100000);\n        png_ptr->rgb_to_gray_green_coeff = (png_uint_16)((uint)(green << 0xf) / 100000);\n        return;\n      }\n      png_app_warning(png_ptr,PTR_s_nt_0005301c + 0x3d0);\n    }" { (if_statement "if (red + green < 0x186a1) {\n        png_ptr->rgb_to_gray_coefficients_set = '\x01';\n        png_ptr->rgb_to_gray_red_coeff = (png_uint_16)((uint)(red << 0xf) / 100000);\n        png_ptr->rgb_to_gray_green_coeff = (png_uint_16)((uint)(green << 0xf) / 100000);\n        return;\n      }" if (parenthesized_expression "(red + green < 0x186a1)" ( (binary_expression "red + green < 0x186a1" (binary_expression "red + green" identifier + identifier) < number_literal) )) (compound_statement "{\n        png_ptr->rgb_to_gray_coefficients_set = '\x01';\n        png_ptr->rgb_to_gray_red_coeff = (png_uint_16)((uint)(red << 0xf) / 100000);\n        png_ptr->rgb_to_gray_green_coeff = (png_uint_16)((uint)(green << 0xf) / 100000);\n        return;\n      }" { (expression_statement "png_ptr->rgb_to_gray_coefficients_set = '\x01';" (assignment_expression "png_ptr->rgb_to_gray_coefficients_set = '\x01'" (field_expression "png_ptr->rgb_to_gray_coefficients_set" identifier -> field_identifier) = (char_literal "'\x01'" ' escape_sequence ')) ;) (expression_statement "png_ptr->rgb_to_gray_red_coeff = (png_uint_16)((uint)(red << 0xf) / 100000);" (assignment_expression "png_ptr->rgb_to_gray_red_coeff = (png_uint_16)((uint)(red << 0xf) / 100000)" (field_expression "png_ptr->rgb_to_gray_red_coeff" identifier -> field_identifier) = (call_expression "(png_uint_16)((uint)(red << 0xf) / 100000)" (parenthesized_expression "(png_uint_16)" ( identifier )) (argument_list "((uint)(red << 0xf) / 100000)" ( (binary_expression "(uint)(red << 0xf) / 100000" (call_expression "(uint)(red << 0xf)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(red << 0xf)" ( (binary_expression "red << 0xf" identifier << number_literal) ))) / number_literal) )))) ;) (expression_statement "png_ptr->rgb_to_gray_green_coeff = (png_uint_16)((uint)(green << 0xf) / 100000);" (assignment_expression "png_ptr->rgb_to_gray_green_coeff = (png_uint_16)((uint)(green << 0xf) / 100000)" (field_expression "png_ptr->rgb_to_gray_green_coeff" identifier -> field_identifier) = (call_expression "(png_uint_16)((uint)(green << 0xf) / 100000)" (parenthesized_expression "(png_uint_16)" ( identifier )) (argument_list "((uint)(green << 0xf) / 100000)" ( (binary_expression "(uint)(green << 0xf) / 100000" (call_expression "(uint)(green << 0xf)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(green << 0xf)" ( (binary_expression "green << 0xf" identifier << number_literal) ))) / number_literal) )))) ;) (return_statement "return;" return ;) })) (expression_statement "png_app_warning(png_ptr,PTR_s_nt_0005301c + 0x3d0);" (call_expression "png_app_warning(png_ptr,PTR_s_nt_0005301c + 0x3d0)" identifier (argument_list "(png_ptr,PTR_s_nt_0005301c + 0x3d0)" ( identifier , (binary_expression "PTR_s_nt_0005301c + 0x3d0" identifier + number_literal) ))) ;) })) (if_statement "if ((png_ptr->rgb_to_gray_red_coeff == 0) && (png_ptr->rgb_to_gray_green_coeff == 0)) {\n      png_ptr->rgb_to_gray_red_coeff = 0x1b38;\n      png_ptr->rgb_to_gray_green_coeff = 0x5b8a;\n    }" if (parenthesized_expression "((png_ptr->rgb_to_gray_red_coeff == 0) && (png_ptr->rgb_to_gray_green_coeff == 0))" ( (binary_expression "(png_ptr->rgb_to_gray_red_coeff == 0) && (png_ptr->rgb_to_gray_green_coeff == 0)" (parenthesized_expression "(png_ptr->rgb_to_gray_red_coeff == 0)" ( (binary_expression "png_ptr->rgb_to_gray_red_coeff == 0" (field_expression "png_ptr->rgb_to_gray_red_coeff" identifier -> field_identifier) == number_literal) )) && (parenthesized_expression "(png_ptr->rgb_to_gray_green_coeff == 0)" ( (binary_expression "png_ptr->rgb_to_gray_green_coeff == 0" (field_expression "png_ptr->rgb_to_gray_green_coeff" identifier -> field_identifier) == number_literal) ))) )) (compound_statement "{\n      png_ptr->rgb_to_gray_red_coeff = 0x1b38;\n      png_ptr->rgb_to_gray_green_coeff = 0x5b8a;\n    }" { (expression_statement "png_ptr->rgb_to_gray_red_coeff = 0x1b38;" (assignment_expression "png_ptr->rgb_to_gray_red_coeff = 0x1b38" (field_expression "png_ptr->rgb_to_gray_red_coeff" identifier -> field_identifier) = number_literal) ;) (expression_statement "png_ptr->rgb_to_gray_green_coeff = 0x5b8a;" (assignment_expression "png_ptr->rgb_to_gray_green_coeff = 0x5b8a" (field_expression "png_ptr->rgb_to_gray_green_coeff" identifier -> field_identifier) = number_literal) ;) })) })) (return_statement "return;" return ;) })))
(translation_unit "void png_set_rgb_to_gray_fixed(int param_1,int param_2,int param_3,int param_4)\n\n{\n  int iVar1;\n  uint uVar2;\n  \n  iVar1 = FUN_00024cb8(param_1,1);\n  if (iVar1 != 0) {\n    if (param_2 == 2) {\n      uVar2 = *(uint *)(param_1 + 300) | 0x400000;\n      *(uint *)(param_1 + 300) = uVar2;\n    }\n    else if (param_2 == 3) {\n      uVar2 = *(uint *)(param_1 + 300) | 0x200000;\n      *(uint *)(param_1 + 300) = uVar2;\n    }\n    else {\n      if (param_2 != 1) {\n        (*(code *)PTR_png_error_0005340c)(param_1,PTR_s_nt_0005301c + 0x3ac);\n      }\n      uVar2 = *(uint *)(param_1 + 300) | 0x600000;\n      *(uint *)(param_1 + 300) = uVar2;\n    }\n    if (*(char *)(param_1 + 0x1ff) == '\x03') {\n      *(uint *)(param_1 + 300) = uVar2 | 0x1000;\n    }\n    if ((-1 < param_3) && (-1 < param_4)) {\n      if (param_3 + param_4 < 0x186a1) {\n        *(undefined1 *)(param_1 + 0x2f9) = 1;\n        *(short *)(param_1 + 0x2fa) = (short)((uint)(param_3 << 0xf) / 100000);\n        *(short *)(param_1 + 0x2fc) = (short)((uint)(param_4 << 0xf) / 100000);\n        return;\n      }\n      FUN_0001a110(param_1,PTR_s_nt_0005301c + 0x3d0);\n    }\n    if ((*(short *)(param_1 + 0x2fa) == 0) && (*(short *)(param_1 + 0x2fc) == 0)) {\n      *(undefined2 *)(param_1 + 0x2fa) = 0x1b38;\n      *(undefined2 *)(param_1 + 0x2fc) = 0x5b8a;\n    }\n  }\n  return;\n}\n\n" (function_definition "void png_set_rgb_to_gray_fixed(int param_1,int param_2,int param_3,int param_4)\n\n{\n  int iVar1;\n  uint uVar2;\n  \n  iVar1 = FUN_00024cb8(param_1,1);\n  if (iVar1 != 0) {\n    if (param_2 == 2) {\n      uVar2 = *(uint *)(param_1 + 300) | 0x400000;\n      *(uint *)(param_1 + 300) = uVar2;\n    }\n    else if (param_2 == 3) {\n      uVar2 = *(uint *)(param_1 + 300) | 0x200000;\n      *(uint *)(param_1 + 300) = uVar2;\n    }\n    else {\n      if (param_2 != 1) {\n        (*(code *)PTR_png_error_0005340c)(param_1,PTR_s_nt_0005301c + 0x3ac);\n      }\n      uVar2 = *(uint *)(param_1 + 300) | 0x600000;\n      *(uint *)(param_1 + 300) = uVar2;\n    }\n    if (*(char *)(param_1 + 0x1ff) == '\x03') {\n      *(uint *)(param_1 + 300) = uVar2 | 0x1000;\n    }\n    if ((-1 < param_3) && (-1 < param_4)) {\n      if (param_3 + param_4 < 0x186a1) {\n        *(undefined1 *)(param_1 + 0x2f9) = 1;\n        *(short *)(param_1 + 0x2fa) = (short)((uint)(param_3 << 0xf) / 100000);\n        *(short *)(param_1 + 0x2fc) = (short)((uint)(param_4 << 0xf) / 100000);\n        return;\n      }\n      FUN_0001a110(param_1,PTR_s_nt_0005301c + 0x3d0);\n    }\n    if ((*(short *)(param_1 + 0x2fa) == 0) && (*(short *)(param_1 + 0x2fc) == 0)) {\n      *(undefined2 *)(param_1 + 0x2fa) = 0x1b38;\n      *(undefined2 *)(param_1 + 0x2fc) = 0x5b8a;\n    }\n  }\n  return;\n}" primitive_type (function_declarator "png_set_rgb_to_gray_fixed(int param_1,int param_2,int param_3,int param_4)" identifier (parameter_list "(int param_1,int param_2,int param_3,int param_4)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "int param_2" primitive_type identifier) , (parameter_declaration "int param_3" primitive_type identifier) , (parameter_declaration "int param_4" primitive_type identifier) ))) (compound_statement "{\n  int iVar1;\n  uint uVar2;\n  \n  iVar1 = FUN_00024cb8(param_1,1);\n  if (iVar1 != 0) {\n    if (param_2 == 2) {\n      uVar2 = *(uint *)(param_1 + 300) | 0x400000;\n      *(uint *)(param_1 + 300) = uVar2;\n    }\n    else if (param_2 == 3) {\n      uVar2 = *(uint *)(param_1 + 300) | 0x200000;\n      *(uint *)(param_1 + 300) = uVar2;\n    }\n    else {\n      if (param_2 != 1) {\n        (*(code *)PTR_png_error_0005340c)(param_1,PTR_s_nt_0005301c + 0x3ac);\n      }\n      uVar2 = *(uint *)(param_1 + 300) | 0x600000;\n      *(uint *)(param_1 + 300) = uVar2;\n    }\n    if (*(char *)(param_1 + 0x1ff) == '\x03') {\n      *(uint *)(param_1 + 300) = uVar2 | 0x1000;\n    }\n    if ((-1 < param_3) && (-1 < param_4)) {\n      if (param_3 + param_4 < 0x186a1) {\n        *(undefined1 *)(param_1 + 0x2f9) = 1;\n        *(short *)(param_1 + 0x2fa) = (short)((uint)(param_3 << 0xf) / 100000);\n        *(short *)(param_1 + 0x2fc) = (short)((uint)(param_4 << 0xf) / 100000);\n        return;\n      }\n      FUN_0001a110(param_1,PTR_s_nt_0005301c + 0x3d0);\n    }\n    if ((*(short *)(param_1 + 0x2fa) == 0) && (*(short *)(param_1 + 0x2fc) == 0)) {\n      *(undefined2 *)(param_1 + 0x2fa) = 0x1b38;\n      *(undefined2 *)(param_1 + 0x2fc) = 0x5b8a;\n    }\n  }\n  return;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "uint uVar2;" type_identifier identifier ;) (expression_statement "iVar1 = FUN_00024cb8(param_1,1);" (assignment_expression "iVar1 = FUN_00024cb8(param_1,1)" identifier = (call_expression "FUN_00024cb8(param_1,1)" identifier (argument_list "(param_1,1)" ( identifier , number_literal )))) ;) (if_statement "if (iVar1 != 0) {\n    if (param_2 == 2) {\n      uVar2 = *(uint *)(param_1 + 300) | 0x400000;\n      *(uint *)(param_1 + 300) = uVar2;\n    }\n    else if (param_2 == 3) {\n      uVar2 = *(uint *)(param_1 + 300) | 0x200000;\n      *(uint *)(param_1 + 300) = uVar2;\n    }\n    else {\n      if (param_2 != 1) {\n        (*(code *)PTR_png_error_0005340c)(param_1,PTR_s_nt_0005301c + 0x3ac);\n      }\n      uVar2 = *(uint *)(param_1 + 300) | 0x600000;\n      *(uint *)(param_1 + 300) = uVar2;\n    }\n    if (*(char *)(param_1 + 0x1ff) == '\x03') {\n      *(uint *)(param_1 + 300) = uVar2 | 0x1000;\n    }\n    if ((-1 < param_3) && (-1 < param_4)) {\n      if (param_3 + param_4 < 0x186a1) {\n        *(undefined1 *)(param_1 + 0x2f9) = 1;\n        *(short *)(param_1 + 0x2fa) = (short)((uint)(param_3 << 0xf) / 100000);\n        *(short *)(param_1 + 0x2fc) = (short)((uint)(param_4 << 0xf) / 100000);\n        return;\n      }\n      FUN_0001a110(param_1,PTR_s_nt_0005301c + 0x3d0);\n    }\n    if ((*(short *)(param_1 + 0x2fa) == 0) && (*(short *)(param_1 + 0x2fc) == 0)) {\n      *(undefined2 *)(param_1 + 0x2fa) = 0x1b38;\n      *(undefined2 *)(param_1 + 0x2fc) = 0x5b8a;\n    }\n  }" if (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) (compound_statement "{\n    if (param_2 == 2) {\n      uVar2 = *(uint *)(param_1 + 300) | 0x400000;\n      *(uint *)(param_1 + 300) = uVar2;\n    }\n    else if (param_2 == 3) {\n      uVar2 = *(uint *)(param_1 + 300) | 0x200000;\n      *(uint *)(param_1 + 300) = uVar2;\n    }\n    else {\n      if (param_2 != 1) {\n        (*(code *)PTR_png_error_0005340c)(param_1,PTR_s_nt_0005301c + 0x3ac);\n      }\n      uVar2 = *(uint *)(param_1 + 300) | 0x600000;\n      *(uint *)(param_1 + 300) = uVar2;\n    }\n    if (*(char *)(param_1 + 0x1ff) == '\x03') {\n      *(uint *)(param_1 + 300) = uVar2 | 0x1000;\n    }\n    if ((-1 < param_3) && (-1 < param_4)) {\n      if (param_3 + param_4 < 0x186a1) {\n        *(undefined1 *)(param_1 + 0x2f9) = 1;\n        *(short *)(param_1 + 0x2fa) = (short)((uint)(param_3 << 0xf) / 100000);\n        *(short *)(param_1 + 0x2fc) = (short)((uint)(param_4 << 0xf) / 100000);\n        return;\n      }\n      FUN_0001a110(param_1,PTR_s_nt_0005301c + 0x3d0);\n    }\n    if ((*(short *)(param_1 + 0x2fa) == 0) && (*(short *)(param_1 + 0x2fc) == 0)) {\n      *(undefined2 *)(param_1 + 0x2fa) = 0x1b38;\n      *(undefined2 *)(param_1 + 0x2fc) = 0x5b8a;\n    }\n  }" { (if_statement "if (param_2 == 2) {\n      uVar2 = *(uint *)(param_1 + 300) | 0x400000;\n      *(uint *)(param_1 + 300) = uVar2;\n    }\n    else if (param_2 == 3) {\n      uVar2 = *(uint *)(param_1 + 300) | 0x200000;\n      *(uint *)(param_1 + 300) = uVar2;\n    }\n    else {\n      if (param_2 != 1) {\n        (*(code *)PTR_png_error_0005340c)(param_1,PTR_s_nt_0005301c + 0x3ac);\n      }\n      uVar2 = *(uint *)(param_1 + 300) | 0x600000;\n      *(uint *)(param_1 + 300) = uVar2;\n    }" if (parenthesized_expression "(param_2 == 2)" ( (binary_expression "param_2 == 2" identifier == number_literal) )) (compound_statement "{\n      uVar2 = *(uint *)(param_1 + 300) | 0x400000;\n      *(uint *)(param_1 + 300) = uVar2;\n    }" { (expression_statement "uVar2 = *(uint *)(param_1 + 300) | 0x400000;" (assignment_expression "uVar2 = *(uint *)(param_1 + 300) | 0x400000" identifier = (binary_expression "*(uint *)(param_1 + 300) | 0x400000" (pointer_expression "*(uint *)(param_1 + 300)" * (cast_expression "(uint *)(param_1 + 300)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 300)" ( (binary_expression "param_1 + 300" identifier + number_literal) )))) | number_literal)) ;) (expression_statement "*(uint *)(param_1 + 300) = uVar2;" (assignment_expression "*(uint *)(param_1 + 300) = uVar2" (pointer_expression "*(uint *)(param_1 + 300)" * (cast_expression "(uint *)(param_1 + 300)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 300)" ( (binary_expression "param_1 + 300" identifier + number_literal) )))) = identifier) ;) }) (else_clause "else if (param_2 == 3) {\n      uVar2 = *(uint *)(param_1 + 300) | 0x200000;\n      *(uint *)(param_1 + 300) = uVar2;\n    }\n    else {\n      if (param_2 != 1) {\n        (*(code *)PTR_png_error_0005340c)(param_1,PTR_s_nt_0005301c + 0x3ac);\n      }\n      uVar2 = *(uint *)(param_1 + 300) | 0x600000;\n      *(uint *)(param_1 + 300) = uVar2;\n    }" else (if_statement "if (param_2 == 3) {\n      uVar2 = *(uint *)(param_1 + 300) | 0x200000;\n      *(uint *)(param_1 + 300) = uVar2;\n    }\n    else {\n      if (param_2 != 1) {\n        (*(code *)PTR_png_error_0005340c)(param_1,PTR_s_nt_0005301c + 0x3ac);\n      }\n      uVar2 = *(uint *)(param_1 + 300) | 0x600000;\n      *(uint *)(param_1 + 300) = uVar2;\n    }" if (parenthesized_expression "(param_2 == 3)" ( (binary_expression "param_2 == 3" identifier == number_literal) )) (compound_statement "{\n      uVar2 = *(uint *)(param_1 + 300) | 0x200000;\n      *(uint *)(param_1 + 300) = uVar2;\n    }" { (expression_statement "uVar2 = *(uint *)(param_1 + 300) | 0x200000;" (assignment_expression "uVar2 = *(uint *)(param_1 + 300) | 0x200000" identifier = (binary_expression "*(uint *)(param_1 + 300) | 0x200000" (pointer_expression "*(uint *)(param_1 + 300)" * (cast_expression "(uint *)(param_1 + 300)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 300)" ( (binary_expression "param_1 + 300" identifier + number_literal) )))) | number_literal)) ;) (expression_statement "*(uint *)(param_1 + 300) = uVar2;" (assignment_expression "*(uint *)(param_1 + 300) = uVar2" (pointer_expression "*(uint *)(param_1 + 300)" * (cast_expression "(uint *)(param_1 + 300)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 300)" ( (binary_expression "param_1 + 300" identifier + number_literal) )))) = identifier) ;) }) (else_clause "else {\n      if (param_2 != 1) {\n        (*(code *)PTR_png_error_0005340c)(param_1,PTR_s_nt_0005301c + 0x3ac);\n      }\n      uVar2 = *(uint *)(param_1 + 300) | 0x600000;\n      *(uint *)(param_1 + 300) = uVar2;\n    }" else (compound_statement "{\n      if (param_2 != 1) {\n        (*(code *)PTR_png_error_0005340c)(param_1,PTR_s_nt_0005301c + 0x3ac);\n      }\n      uVar2 = *(uint *)(param_1 + 300) | 0x600000;\n      *(uint *)(param_1 + 300) = uVar2;\n    }" { (if_statement "if (param_2 != 1) {\n        (*(code *)PTR_png_error_0005340c)(param_1,PTR_s_nt_0005301c + 0x3ac);\n      }" if (parenthesized_expression "(param_2 != 1)" ( (binary_expression "param_2 != 1" identifier != number_literal) )) (compound_statement "{\n        (*(code *)PTR_png_error_0005340c)(param_1,PTR_s_nt_0005301c + 0x3ac);\n      }" { (expression_statement "(*(code *)PTR_png_error_0005340c)(param_1,PTR_s_nt_0005301c + 0x3ac);" (call_expression "(*(code *)PTR_png_error_0005340c)(param_1,PTR_s_nt_0005301c + 0x3ac)" (parenthesized_expression "(*(code *)PTR_png_error_0005340c)" ( (pointer_expression "*(code *)PTR_png_error_0005340c" * (cast_expression "(code *)PTR_png_error_0005340c" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(param_1,PTR_s_nt_0005301c + 0x3ac)" ( identifier , (binary_expression "PTR_s_nt_0005301c + 0x3ac" identifier + number_literal) ))) ;) })) (expression_statement "uVar2 = *(uint *)(param_1 + 300) | 0x600000;" (assignment_expression "uVar2 = *(uint *)(param_1 + 300) | 0x600000" identifier = (binary_expression "*(uint *)(param_1 + 300) | 0x600000" (pointer_expression "*(uint *)(param_1 + 300)" * (cast_expression "(uint *)(param_1 + 300)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 300)" ( (binary_expression "param_1 + 300" identifier + number_literal) )))) | number_literal)) ;) (expression_statement "*(uint *)(param_1 + 300) = uVar2;" (assignment_expression "*(uint *)(param_1 + 300) = uVar2" (pointer_expression "*(uint *)(param_1 + 300)" * (cast_expression "(uint *)(param_1 + 300)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 300)" ( (binary_expression "param_1 + 300" identifier + number_literal) )))) = identifier) ;) }))))) (if_statement "if (*(char *)(param_1 + 0x1ff) == '\x03') {\n      *(uint *)(param_1 + 300) = uVar2 | 0x1000;\n    }" if (parenthesized_expression "(*(char *)(param_1 + 0x1ff) == '\x03')" ( (binary_expression "*(char *)(param_1 + 0x1ff) == '\x03'" (pointer_expression "*(char *)(param_1 + 0x1ff)" * (cast_expression "(char *)(param_1 + 0x1ff)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x1ff)" ( (binary_expression "param_1 + 0x1ff" identifier + number_literal) )))) == (char_literal "'\x03'" ' escape_sequence ')) )) (compound_statement "{\n      *(uint *)(param_1 + 300) = uVar2 | 0x1000;\n    }" { (expression_statement "*(uint *)(param_1 + 300) = uVar2 | 0x1000;" (assignment_expression "*(uint *)(param_1 + 300) = uVar2 | 0x1000" (pointer_expression "*(uint *)(param_1 + 300)" * (cast_expression "(uint *)(param_1 + 300)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 300)" ( (binary_expression "param_1 + 300" identifier + number_literal) )))) = (binary_expression "uVar2 | 0x1000" identifier | number_literal)) ;) })) (if_statement "if ((-1 < param_3) && (-1 < param_4)) {\n      if (param_3 + param_4 < 0x186a1) {\n        *(undefined1 *)(param_1 + 0x2f9) = 1;\n        *(short *)(param_1 + 0x2fa) = (short)((uint)(param_3 << 0xf) / 100000);\n        *(short *)(param_1 + 0x2fc) = (short)((uint)(param_4 << 0xf) / 100000);\n        return;\n      }\n      FUN_0001a110(param_1,PTR_s_nt_0005301c + 0x3d0);\n    }" if (parenthesized_expression "((-1 < param_3) && (-1 < param_4))" ( (binary_expression "(-1 < param_3) && (-1 < param_4)" (parenthesized_expression "(-1 < param_3)" ( (binary_expression "-1 < param_3" number_literal < identifier) )) && (parenthesized_expression "(-1 < param_4)" ( (binary_expression "-1 < param_4" number_literal < identifier) ))) )) (compound_statement "{\n      if (param_3 + param_4 < 0x186a1) {\n        *(undefined1 *)(param_1 + 0x2f9) = 1;\n        *(short *)(param_1 + 0x2fa) = (short)((uint)(param_3 << 0xf) / 100000);\n        *(short *)(param_1 + 0x2fc) = (short)((uint)(param_4 << 0xf) / 100000);\n        return;\n      }\n      FUN_0001a110(param_1,PTR_s_nt_0005301c + 0x3d0);\n    }" { (if_statement "if (param_3 + param_4 < 0x186a1) {\n        *(undefined1 *)(param_1 + 0x2f9) = 1;\n        *(short *)(param_1 + 0x2fa) = (short)((uint)(param_3 << 0xf) / 100000);\n        *(short *)(param_1 + 0x2fc) = (short)((uint)(param_4 << 0xf) / 100000);\n        return;\n      }" if (parenthesized_expression "(param_3 + param_4 < 0x186a1)" ( (binary_expression "param_3 + param_4 < 0x186a1" (binary_expression "param_3 + param_4" identifier + identifier) < number_literal) )) (compound_statement "{\n        *(undefined1 *)(param_1 + 0x2f9) = 1;\n        *(short *)(param_1 + 0x2fa) = (short)((uint)(param_3 << 0xf) / 100000);\n        *(short *)(param_1 + 0x2fc) = (short)((uint)(param_4 << 0xf) / 100000);\n        return;\n      }" { (expression_statement "*(undefined1 *)(param_1 + 0x2f9) = 1;" (assignment_expression "*(undefined1 *)(param_1 + 0x2f9) = 1" (pointer_expression "*(undefined1 *)(param_1 + 0x2f9)" * (cast_expression "(undefined1 *)(param_1 + 0x2f9)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x2f9)" ( (binary_expression "param_1 + 0x2f9" identifier + number_literal) )))) = number_literal) ;) (expression_statement "*(short *)(param_1 + 0x2fa) = (short)((uint)(param_3 << 0xf) / 100000);" (assignment_expression "*(short *)(param_1 + 0x2fa) = (short)((uint)(param_3 << 0xf) / 100000)" (pointer_expression "*(short *)(param_1 + 0x2fa)" * (cast_expression "(short *)(param_1 + 0x2fa)" ( (type_descriptor "short *" (sized_type_specifier "short" short) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x2fa)" ( (binary_expression "param_1 + 0x2fa" identifier + number_literal) )))) = (cast_expression "(short)((uint)(param_3 << 0xf) / 100000)" ( (type_descriptor "short" (sized_type_specifier "short" short)) ) (parenthesized_expression "((uint)(param_3 << 0xf) / 100000)" ( (binary_expression "(uint)(param_3 << 0xf) / 100000" (call_expression "(uint)(param_3 << 0xf)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(param_3 << 0xf)" ( (binary_expression "param_3 << 0xf" identifier << number_literal) ))) / number_literal) )))) ;) (expression_statement "*(short *)(param_1 + 0x2fc) = (short)((uint)(param_4 << 0xf) / 100000);" (assignment_expression "*(short *)(param_1 + 0x2fc) = (short)((uint)(param_4 << 0xf) / 100000)" (pointer_expression "*(short *)(param_1 + 0x2fc)" * (cast_expression "(short *)(param_1 + 0x2fc)" ( (type_descriptor "short *" (sized_type_specifier "short" short) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x2fc)" ( (binary_expression "param_1 + 0x2fc" identifier + number_literal) )))) = (cast_expression "(short)((uint)(param_4 << 0xf) / 100000)" ( (type_descriptor "short" (sized_type_specifier "short" short)) ) (parenthesized_expression "((uint)(param_4 << 0xf) / 100000)" ( (binary_expression "(uint)(param_4 << 0xf) / 100000" (call_expression "(uint)(param_4 << 0xf)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(param_4 << 0xf)" ( (binary_expression "param_4 << 0xf" identifier << number_literal) ))) / number_literal) )))) ;) (return_statement "return;" return ;) })) (expression_statement "FUN_0001a110(param_1,PTR_s_nt_0005301c + 0x3d0);" (call_expression "FUN_0001a110(param_1,PTR_s_nt_0005301c + 0x3d0)" identifier (argument_list "(param_1,PTR_s_nt_0005301c + 0x3d0)" ( identifier , (binary_expression "PTR_s_nt_0005301c + 0x3d0" identifier + number_literal) ))) ;) })) (if_statement "if ((*(short *)(param_1 + 0x2fa) == 0) && (*(short *)(param_1 + 0x2fc) == 0)) {\n      *(undefined2 *)(param_1 + 0x2fa) = 0x1b38;\n      *(undefined2 *)(param_1 + 0x2fc) = 0x5b8a;\n    }" if (parenthesized_expression "((*(short *)(param_1 + 0x2fa) == 0) && (*(short *)(param_1 + 0x2fc) == 0))" ( (binary_expression "(*(short *)(param_1 + 0x2fa) == 0) && (*(short *)(param_1 + 0x2fc) == 0)" (parenthesized_expression "(*(short *)(param_1 + 0x2fa) == 0)" ( (binary_expression "*(short *)(param_1 + 0x2fa) == 0" (pointer_expression "*(short *)(param_1 + 0x2fa)" * (cast_expression "(short *)(param_1 + 0x2fa)" ( (type_descriptor "short *" (sized_type_specifier "short" short) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x2fa)" ( (binary_expression "param_1 + 0x2fa" identifier + number_literal) )))) == number_literal) )) && (parenthesized_expression "(*(short *)(param_1 + 0x2fc) == 0)" ( (binary_expression "*(short *)(param_1 + 0x2fc) == 0" (pointer_expression "*(short *)(param_1 + 0x2fc)" * (cast_expression "(short *)(param_1 + 0x2fc)" ( (type_descriptor "short *" (sized_type_specifier "short" short) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x2fc)" ( (binary_expression "param_1 + 0x2fc" identifier + number_literal) )))) == number_literal) ))) )) (compound_statement "{\n      *(undefined2 *)(param_1 + 0x2fa) = 0x1b38;\n      *(undefined2 *)(param_1 + 0x2fc) = 0x5b8a;\n    }" { (expression_statement "*(undefined2 *)(param_1 + 0x2fa) = 0x1b38;" (assignment_expression "*(undefined2 *)(param_1 + 0x2fa) = 0x1b38" (pointer_expression "*(undefined2 *)(param_1 + 0x2fa)" * (cast_expression "(undefined2 *)(param_1 + 0x2fa)" ( (type_descriptor "undefined2 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x2fa)" ( (binary_expression "param_1 + 0x2fa" identifier + number_literal) )))) = number_literal) ;) (expression_statement "*(undefined2 *)(param_1 + 0x2fc) = 0x5b8a;" (assignment_expression "*(undefined2 *)(param_1 + 0x2fc) = 0x5b8a" (pointer_expression "*(undefined2 *)(param_1 + 0x2fc)" * (cast_expression "(undefined2 *)(param_1 + 0x2fc)" ( (type_descriptor "undefined2 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x2fc)" ( (binary_expression "param_1 + 0x2fc" identifier + number_literal) )))) = 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 IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , LIT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) | LIT)) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) }) (else_clause else (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) | LIT)) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) }) (else_clause else (compound_statement { (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 , (binary_expression IDENT + LIT) ))) ;) })) (expression_statement (assignment_expression IDENT = (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) | 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 (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) == (char_literal ' escape_sequence ')) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = (binary_expression IDENT | LIT)) ;) })) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression LIT < IDENT) )) && (parenthesized_expression ( (binary_expression LIT < IDENT) ))) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (binary_expression IDENT + IDENT) < LIT) )) (compound_statement { (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 (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier short) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = (cast_expression ( (type_descriptor (sized_type_specifier short)) ) (parenthesized_expression ( (binary_expression (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression IDENT << LIT) ))) / LIT) )))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier short) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = (cast_expression ( (type_descriptor (sized_type_specifier short)) ) (parenthesized_expression ( (binary_expression (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression IDENT << LIT) ))) / LIT) )))) ;) (return_statement return ;) })) (expression_statement (call_expression IDENT (argument_list ( IDENT , (binary_expression IDENT + LIT) ))) ;) })) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier short) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) == LIT) )) && (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier short) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) == LIT) ))) )) (compound_statement { (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 (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = LIT) ;) })) })) (return_statement return ;) })))
(function_definition "void png_set_rgb_to_gray_fixed(int param_1,int param_2,int param_3,int param_4)\n\n{\n  int iVar1;\n  uint uVar2;\n  \n  iVar1 = FUN_00024cb8(param_1,1);\n  if (iVar1 != 0) {\n    if (param_2 == 2) {\n      uVar2 = *(uint *)(param_1 + 300) | 0x400000;\n      *(uint *)(param_1 + 300) = uVar2;\n    }\n    else if (param_2 == 3) {\n      uVar2 = *(uint *)(param_1 + 300) | 0x200000;\n      *(uint *)(param_1 + 300) = uVar2;\n    }\n    else {\n      if (param_2 != 1) {\n        (*(code *)PTR_png_error_0005340c)(param_1,PTR_s_nt_0005301c + 0x3ac);\n      }\n      uVar2 = *(uint *)(param_1 + 300) | 0x600000;\n      *(uint *)(param_1 + 300) = uVar2;\n    }\n    if (*(char *)(param_1 + 0x1ff) == '\x03') {\n      *(uint *)(param_1 + 300) = uVar2 | 0x1000;\n    }\n    if ((-1 < param_3) && (-1 < param_4)) {\n      if (param_3 + param_4 < 0x186a1) {\n        *(undefined1 *)(param_1 + 0x2f9) = 1;\n        *(short *)(param_1 + 0x2fa) = (short)((uint)(param_3 << 0xf) / 100000);\n        *(short *)(param_1 + 0x2fc) = (short)((uint)(param_4 << 0xf) / 100000);\n        return;\n      }\n      FUN_0001a110(param_1,PTR_s_nt_0005301c + 0x3d0);\n    }\n    if ((*(short *)(param_1 + 0x2fa) == 0) && (*(short *)(param_1 + 0x2fc) == 0)) {\n      *(undefined2 *)(param_1 + 0x2fa) = 0x1b38;\n      *(undefined2 *)(param_1 + 0x2fc) = 0x5b8a;\n    }\n  }\n  return;\n}" (primitive_type "void") (function_declarator "png_set_rgb_to_gray_fixed(int param_1,int param_2,int param_3,int param_4)" (identifier "png_set_rgb_to_gray_fixed") (parameter_list "(int param_1,int param_2,int 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 "int param_3" (primitive_type "int") (identifier "param_3")) (, ",") (parameter_declaration "int param_4" (primitive_type "int") (identifier "param_4")) () ")"))) (compound_statement "{\n  int iVar1;\n  uint uVar2;\n  \n  iVar1 = FUN_00024cb8(param_1,1);\n  if (iVar1 != 0) {\n    if (param_2 == 2) {\n      uVar2 = *(uint *)(param_1 + 300) | 0x400000;\n      *(uint *)(param_1 + 300) = uVar2;\n    }\n    else if (param_2 == 3) {\n      uVar2 = *(uint *)(param_1 + 300) | 0x200000;\n      *(uint *)(param_1 + 300) = uVar2;\n    }\n    else {\n      if (param_2 != 1) {\n        (*(code *)PTR_png_error_0005340c)(param_1,PTR_s_nt_0005301c + 0x3ac);\n      }\n      uVar2 = *(uint *)(param_1 + 300) | 0x600000;\n      *(uint *)(param_1 + 300) = uVar2;\n    }\n    if (*(char *)(param_1 + 0x1ff) == '\x03') {\n      *(uint *)(param_1 + 300) = uVar2 | 0x1000;\n    }\n    if ((-1 < param_3) && (-1 < param_4)) {\n      if (param_3 + param_4 < 0x186a1) {\n        *(undefined1 *)(param_1 + 0x2f9) = 1;\n        *(short *)(param_1 + 0x2fa) = (short)((uint)(param_3 << 0xf) / 100000);\n        *(short *)(param_1 + 0x2fc) = (short)((uint)(param_4 << 0xf) / 100000);\n        return;\n      }\n      FUN_0001a110(param_1,PTR_s_nt_0005301c + 0x3d0);\n    }\n    if ((*(short *)(param_1 + 0x2fa) == 0) && (*(short *)(param_1 + 0x2fc) == 0)) {\n      *(undefined2 *)(param_1 + 0x2fa) = 0x1b38;\n      *(undefined2 *)(param_1 + 0x2fc) = 0x5b8a;\n    }\n  }\n  return;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "uint uVar2;" (type_identifier "uint") (identifier "uVar2") (; ";")) (expression_statement "iVar1 = FUN_00024cb8(param_1,1);" (assignment_expression "iVar1 = FUN_00024cb8(param_1,1)" (identifier "iVar1") (= "=") (call_expression "FUN_00024cb8(param_1,1)" (identifier "FUN_00024cb8") (argument_list "(param_1,1)" (( "(") (identifier "param_1") (, ",") (number_literal "1") () ")")))) (; ";")) (if_statement "if (iVar1 != 0) {\n    if (param_2 == 2) {\n      uVar2 = *(uint *)(param_1 + 300) | 0x400000;\n      *(uint *)(param_1 + 300) = uVar2;\n    }\n    else if (param_2 == 3) {\n      uVar2 = *(uint *)(param_1 + 300) | 0x200000;\n      *(uint *)(param_1 + 300) = uVar2;\n    }\n    else {\n      if (param_2 != 1) {\n        (*(code *)PTR_png_error_0005340c)(param_1,PTR_s_nt_0005301c + 0x3ac);\n      }\n      uVar2 = *(uint *)(param_1 + 300) | 0x600000;\n      *(uint *)(param_1 + 300) = uVar2;\n    }\n    if (*(char *)(param_1 + 0x1ff) == '\x03') {\n      *(uint *)(param_1 + 300) = uVar2 | 0x1000;\n    }\n    if ((-1 < param_3) && (-1 < param_4)) {\n      if (param_3 + param_4 < 0x186a1) {\n        *(undefined1 *)(param_1 + 0x2f9) = 1;\n        *(short *)(param_1 + 0x2fa) = (short)((uint)(param_3 << 0xf) / 100000);\n        *(short *)(param_1 + 0x2fc) = (short)((uint)(param_4 << 0xf) / 100000);\n        return;\n      }\n      FUN_0001a110(param_1,PTR_s_nt_0005301c + 0x3d0);\n    }\n    if ((*(short *)(param_1 + 0x2fa) == 0) && (*(short *)(param_1 + 0x2fc) == 0)) {\n      *(undefined2 *)(param_1 + 0x2fa) = 0x1b38;\n      *(undefined2 *)(param_1 + 0x2fc) = 0x5b8a;\n    }\n  }" (if "if") (parenthesized_expression "(iVar1 != 0)" (( "(") (binary_expression "iVar1 != 0" (identifier "iVar1") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    if (param_2 == 2) {\n      uVar2 = *(uint *)(param_1 + 300) | 0x400000;\n      *(uint *)(param_1 + 300) = uVar2;\n    }\n    else if (param_2 == 3) {\n      uVar2 = *(uint *)(param_1 + 300) | 0x200000;\n      *(uint *)(param_1 + 300) = uVar2;\n    }\n    else {\n      if (param_2 != 1) {\n        (*(code *)PTR_png_error_0005340c)(param_1,PTR_s_nt_0005301c + 0x3ac);\n      }\n      uVar2 = *(uint *)(param_1 + 300) | 0x600000;\n      *(uint *)(param_1 + 300) = uVar2;\n    }\n    if (*(char *)(param_1 + 0x1ff) == '\x03') {\n      *(uint *)(param_1 + 300) = uVar2 | 0x1000;\n    }\n    if ((-1 < param_3) && (-1 < param_4)) {\n      if (param_3 + param_4 < 0x186a1) {\n        *(undefined1 *)(param_1 + 0x2f9) = 1;\n        *(short *)(param_1 + 0x2fa) = (short)((uint)(param_3 << 0xf) / 100000);\n        *(short *)(param_1 + 0x2fc) = (short)((uint)(param_4 << 0xf) / 100000);\n        return;\n      }\n      FUN_0001a110(param_1,PTR_s_nt_0005301c + 0x3d0);\n    }\n    if ((*(short *)(param_1 + 0x2fa) == 0) && (*(short *)(param_1 + 0x2fc) == 0)) {\n      *(undefined2 *)(param_1 + 0x2fa) = 0x1b38;\n      *(undefined2 *)(param_1 + 0x2fc) = 0x5b8a;\n    }\n  }" ({ "{") (if_statement "if (param_2 == 2) {\n      uVar2 = *(uint *)(param_1 + 300) | 0x400000;\n      *(uint *)(param_1 + 300) = uVar2;\n    }\n    else if (param_2 == 3) {\n      uVar2 = *(uint *)(param_1 + 300) | 0x200000;\n      *(uint *)(param_1 + 300) = uVar2;\n    }\n    else {\n      if (param_2 != 1) {\n        (*(code *)PTR_png_error_0005340c)(param_1,PTR_s_nt_0005301c + 0x3ac);\n      }\n      uVar2 = *(uint *)(param_1 + 300) | 0x600000;\n      *(uint *)(param_1 + 300) = uVar2;\n    }" (if "if") (parenthesized_expression "(param_2 == 2)" (( "(") (binary_expression "param_2 == 2" (identifier "param_2") (== "==") (number_literal "2")) () ")")) (compound_statement "{\n      uVar2 = *(uint *)(param_1 + 300) | 0x400000;\n      *(uint *)(param_1 + 300) = uVar2;\n    }" ({ "{") (expression_statement "uVar2 = *(uint *)(param_1 + 300) | 0x400000;" (assignment_expression "uVar2 = *(uint *)(param_1 + 300) | 0x400000" (identifier "uVar2") (= "=") (binary_expression "*(uint *)(param_1 + 300) | 0x400000" (pointer_expression "*(uint *)(param_1 + 300)" (* "*") (cast_expression "(uint *)(param_1 + 300)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 300)" (( "(") (binary_expression "param_1 + 300" (identifier "param_1") (+ "+") (number_literal "300")) () ")")))) (| "|") (number_literal "0x400000"))) (; ";")) (expression_statement "*(uint *)(param_1 + 300) = uVar2;" (assignment_expression "*(uint *)(param_1 + 300) = uVar2" (pointer_expression "*(uint *)(param_1 + 300)" (* "*") (cast_expression "(uint *)(param_1 + 300)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 300)" (( "(") (binary_expression "param_1 + 300" (identifier "param_1") (+ "+") (number_literal "300")) () ")")))) (= "=") (identifier "uVar2")) (; ";")) (} "}")) (else_clause "else if (param_2 == 3) {\n      uVar2 = *(uint *)(param_1 + 300) | 0x200000;\n      *(uint *)(param_1 + 300) = uVar2;\n    }\n    else {\n      if (param_2 != 1) {\n        (*(code *)PTR_png_error_0005340c)(param_1,PTR_s_nt_0005301c + 0x3ac);\n      }\n      uVar2 = *(uint *)(param_1 + 300) | 0x600000;\n      *(uint *)(param_1 + 300) = uVar2;\n    }" (else "else") (if_statement "if (param_2 == 3) {\n      uVar2 = *(uint *)(param_1 + 300) | 0x200000;\n      *(uint *)(param_1 + 300) = uVar2;\n    }\n    else {\n      if (param_2 != 1) {\n        (*(code *)PTR_png_error_0005340c)(param_1,PTR_s_nt_0005301c + 0x3ac);\n      }\n      uVar2 = *(uint *)(param_1 + 300) | 0x600000;\n      *(uint *)(param_1 + 300) = uVar2;\n    }" (if "if") (parenthesized_expression "(param_2 == 3)" (( "(") (binary_expression "param_2 == 3" (identifier "param_2") (== "==") (number_literal "3")) () ")")) (compound_statement "{\n      uVar2 = *(uint *)(param_1 + 300) | 0x200000;\n      *(uint *)(param_1 + 300) = uVar2;\n    }" ({ "{") (expression_statement "uVar2 = *(uint *)(param_1 + 300) | 0x200000;" (assignment_expression "uVar2 = *(uint *)(param_1 + 300) | 0x200000" (identifier "uVar2") (= "=") (binary_expression "*(uint *)(param_1 + 300) | 0x200000" (pointer_expression "*(uint *)(param_1 + 300)" (* "*") (cast_expression "(uint *)(param_1 + 300)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 300)" (( "(") (binary_expression "param_1 + 300" (identifier "param_1") (+ "+") (number_literal "300")) () ")")))) (| "|") (number_literal "0x200000"))) (; ";")) (expression_statement "*(uint *)(param_1 + 300) = uVar2;" (assignment_expression "*(uint *)(param_1 + 300) = uVar2" (pointer_expression "*(uint *)(param_1 + 300)" (* "*") (cast_expression "(uint *)(param_1 + 300)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 300)" (( "(") (binary_expression "param_1 + 300" (identifier "param_1") (+ "+") (number_literal "300")) () ")")))) (= "=") (identifier "uVar2")) (; ";")) (} "}")) (else_clause "else {\n      if (param_2 != 1) {\n        (*(code *)PTR_png_error_0005340c)(param_1,PTR_s_nt_0005301c + 0x3ac);\n      }\n      uVar2 = *(uint *)(param_1 + 300) | 0x600000;\n      *(uint *)(param_1 + 300) = uVar2;\n    }" (else "else") (compound_statement "{\n      if (param_2 != 1) {\n        (*(code *)PTR_png_error_0005340c)(param_1,PTR_s_nt_0005301c + 0x3ac);\n      }\n      uVar2 = *(uint *)(param_1 + 300) | 0x600000;\n      *(uint *)(param_1 + 300) = uVar2;\n    }" ({ "{") (if_statement "if (param_2 != 1) {\n        (*(code *)PTR_png_error_0005340c)(param_1,PTR_s_nt_0005301c + 0x3ac);\n      }" (if "if") (parenthesized_expression "(param_2 != 1)" (( "(") (binary_expression "param_2 != 1" (identifier "param_2") (!= "!=") (number_literal "1")) () ")")) (compound_statement "{\n        (*(code *)PTR_png_error_0005340c)(param_1,PTR_s_nt_0005301c + 0x3ac);\n      }" ({ "{") (expression_statement "(*(code *)PTR_png_error_0005340c)(param_1,PTR_s_nt_0005301c + 0x3ac);" (call_expression "(*(code *)PTR_png_error_0005340c)(param_1,PTR_s_nt_0005301c + 0x3ac)" (parenthesized_expression "(*(code *)PTR_png_error_0005340c)" (( "(") (pointer_expression "*(code *)PTR_png_error_0005340c" (* "*") (cast_expression "(code *)PTR_png_error_0005340c" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_png_error_0005340c"))) () ")")) (argument_list "(param_1,PTR_s_nt_0005301c + 0x3ac)" (( "(") (identifier "param_1") (, ",") (binary_expression "PTR_s_nt_0005301c + 0x3ac" (identifier "PTR_s_nt_0005301c") (+ "+") (number_literal "0x3ac")) () ")"))) (; ";")) (} "}"))) (expression_statement "uVar2 = *(uint *)(param_1 + 300) | 0x600000;" (assignment_expression "uVar2 = *(uint *)(param_1 + 300) | 0x600000" (identifier "uVar2") (= "=") (binary_expression "*(uint *)(param_1 + 300) | 0x600000" (pointer_expression "*(uint *)(param_1 + 300)" (* "*") (cast_expression "(uint *)(param_1 + 300)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 300)" (( "(") (binary_expression "param_1 + 300" (identifier "param_1") (+ "+") (number_literal "300")) () ")")))) (| "|") (number_literal "0x600000"))) (; ";")) (expression_statement "*(uint *)(param_1 + 300) = uVar2;" (assignment_expression "*(uint *)(param_1 + 300) = uVar2" (pointer_expression "*(uint *)(param_1 + 300)" (* "*") (cast_expression "(uint *)(param_1 + 300)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 300)" (( "(") (binary_expression "param_1 + 300" (identifier "param_1") (+ "+") (number_literal "300")) () ")")))) (= "=") (identifier "uVar2")) (; ";")) (} "}")))))) (if_statement "if (*(char *)(param_1 + 0x1ff) == '\x03') {\n      *(uint *)(param_1 + 300) = uVar2 | 0x1000;\n    }" (if "if") (parenthesized_expression "(*(char *)(param_1 + 0x1ff) == '\x03')" (( "(") (binary_expression "*(char *)(param_1 + 0x1ff) == '\x03'" (pointer_expression "*(char *)(param_1 + 0x1ff)" (* "*") (cast_expression "(char *)(param_1 + 0x1ff)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x1ff)" (( "(") (binary_expression "param_1 + 0x1ff" (identifier "param_1") (+ "+") (number_literal "0x1ff")) () ")")))) (== "==") (char_literal "'\x03'" (' "'") (escape_sequence "\x03") (' "'"))) () ")")) (compound_statement "{\n      *(uint *)(param_1 + 300) = uVar2 | 0x1000;\n    }" ({ "{") (expression_statement "*(uint *)(param_1 + 300) = uVar2 | 0x1000;" (assignment_expression "*(uint *)(param_1 + 300) = uVar2 | 0x1000" (pointer_expression "*(uint *)(param_1 + 300)" (* "*") (cast_expression "(uint *)(param_1 + 300)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 300)" (( "(") (binary_expression "param_1 + 300" (identifier "param_1") (+ "+") (number_literal "300")) () ")")))) (= "=") (binary_expression "uVar2 | 0x1000" (identifier "uVar2") (| "|") (number_literal "0x1000"))) (; ";")) (} "}"))) (if_statement "if ((-1 < param_3) && (-1 < param_4)) {\n      if (param_3 + param_4 < 0x186a1) {\n        *(undefined1 *)(param_1 + 0x2f9) = 1;\n        *(short *)(param_1 + 0x2fa) = (short)((uint)(param_3 << 0xf) / 100000);\n        *(short *)(param_1 + 0x2fc) = (short)((uint)(param_4 << 0xf) / 100000);\n        return;\n      }\n      FUN_0001a110(param_1,PTR_s_nt_0005301c + 0x3d0);\n    }" (if "if") (parenthesized_expression "((-1 < param_3) && (-1 < param_4))" (( "(") (binary_expression "(-1 < param_3) && (-1 < param_4)" (parenthesized_expression "(-1 < param_3)" (( "(") (binary_expression "-1 < param_3" (number_literal "-1") (< "<") (identifier "param_3")) () ")")) (&& "&&") (parenthesized_expression "(-1 < param_4)" (( "(") (binary_expression "-1 < param_4" (number_literal "-1") (< "<") (identifier "param_4")) () ")"))) () ")")) (compound_statement "{\n      if (param_3 + param_4 < 0x186a1) {\n        *(undefined1 *)(param_1 + 0x2f9) = 1;\n        *(short *)(param_1 + 0x2fa) = (short)((uint)(param_3 << 0xf) / 100000);\n        *(short *)(param_1 + 0x2fc) = (short)((uint)(param_4 << 0xf) / 100000);\n        return;\n      }\n      FUN_0001a110(param_1,PTR_s_nt_0005301c + 0x3d0);\n    }" ({ "{") (if_statement "if (param_3 + param_4 < 0x186a1) {\n        *(undefined1 *)(param_1 + 0x2f9) = 1;\n        *(short *)(param_1 + 0x2fa) = (short)((uint)(param_3 << 0xf) / 100000);\n        *(short *)(param_1 + 0x2fc) = (short)((uint)(param_4 << 0xf) / 100000);\n        return;\n      }" (if "if") (parenthesized_expression "(param_3 + param_4 < 0x186a1)" (( "(") (binary_expression "param_3 + param_4 < 0x186a1" (binary_expression "param_3 + param_4" (identifier "param_3") (+ "+") (identifier "param_4")) (< "<") (number_literal "0x186a1")) () ")")) (compound_statement "{\n        *(undefined1 *)(param_1 + 0x2f9) = 1;\n        *(short *)(param_1 + 0x2fa) = (short)((uint)(param_3 << 0xf) / 100000);\n        *(short *)(param_1 + 0x2fc) = (short)((uint)(param_4 << 0xf) / 100000);\n        return;\n      }" ({ "{") (expression_statement "*(undefined1 *)(param_1 + 0x2f9) = 1;" (assignment_expression "*(undefined1 *)(param_1 + 0x2f9) = 1" (pointer_expression "*(undefined1 *)(param_1 + 0x2f9)" (* "*") (cast_expression "(undefined1 *)(param_1 + 0x2f9)" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x2f9)" (( "(") (binary_expression "param_1 + 0x2f9" (identifier "param_1") (+ "+") (number_literal "0x2f9")) () ")")))) (= "=") (number_literal "1")) (; ";")) (expression_statement "*(short *)(param_1 + 0x2fa) = (short)((uint)(param_3 << 0xf) / 100000);" (assignment_expression "*(short *)(param_1 + 0x2fa) = (short)((uint)(param_3 << 0xf) / 100000)" (pointer_expression "*(short *)(param_1 + 0x2fa)" (* "*") (cast_expression "(short *)(param_1 + 0x2fa)" (( "(") (type_descriptor "short *" (sized_type_specifier "short" (short "short")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x2fa)" (( "(") (binary_expression "param_1 + 0x2fa" (identifier "param_1") (+ "+") (number_literal "0x2fa")) () ")")))) (= "=") (cast_expression "(short)((uint)(param_3 << 0xf) / 100000)" (( "(") (type_descriptor "short" (sized_type_specifier "short" (short "short"))) () ")") (parenthesized_expression "((uint)(param_3 << 0xf) / 100000)" (( "(") (binary_expression "(uint)(param_3 << 0xf) / 100000" (call_expression "(uint)(param_3 << 0xf)" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (argument_list "(param_3 << 0xf)" (( "(") (binary_expression "param_3 << 0xf" (identifier "param_3") (<< "<<") (number_literal "0xf")) () ")"))) (/ "/") (number_literal "100000")) () ")")))) (; ";")) (expression_statement "*(short *)(param_1 + 0x2fc) = (short)((uint)(param_4 << 0xf) / 100000);" (assignment_expression "*(short *)(param_1 + 0x2fc) = (short)((uint)(param_4 << 0xf) / 100000)" (pointer_expression "*(short *)(param_1 + 0x2fc)" (* "*") (cast_expression "(short *)(param_1 + 0x2fc)" (( "(") (type_descriptor "short *" (sized_type_specifier "short" (short "short")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x2fc)" (( "(") (binary_expression "param_1 + 0x2fc" (identifier "param_1") (+ "+") (number_literal "0x2fc")) () ")")))) (= "=") (cast_expression "(short)((uint)(param_4 << 0xf) / 100000)" (( "(") (type_descriptor "short" (sized_type_specifier "short" (short "short"))) () ")") (parenthesized_expression "((uint)(param_4 << 0xf) / 100000)" (( "(") (binary_expression "(uint)(param_4 << 0xf) / 100000" (call_expression "(uint)(param_4 << 0xf)" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (argument_list "(param_4 << 0xf)" (( "(") (binary_expression "param_4 << 0xf" (identifier "param_4") (<< "<<") (number_literal "0xf")) () ")"))) (/ "/") (number_literal "100000")) () ")")))) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}"))) (expression_statement "FUN_0001a110(param_1,PTR_s_nt_0005301c + 0x3d0);" (call_expression "FUN_0001a110(param_1,PTR_s_nt_0005301c + 0x3d0)" (identifier "FUN_0001a110") (argument_list "(param_1,PTR_s_nt_0005301c + 0x3d0)" (( "(") (identifier "param_1") (, ",") (binary_expression "PTR_s_nt_0005301c + 0x3d0" (identifier "PTR_s_nt_0005301c") (+ "+") (number_literal "0x3d0")) () ")"))) (; ";")) (} "}"))) (if_statement "if ((*(short *)(param_1 + 0x2fa) == 0) && (*(short *)(param_1 + 0x2fc) == 0)) {\n      *(undefined2 *)(param_1 + 0x2fa) = 0x1b38;\n      *(undefined2 *)(param_1 + 0x2fc) = 0x5b8a;\n    }" (if "if") (parenthesized_expression "((*(short *)(param_1 + 0x2fa) == 0) && (*(short *)(param_1 + 0x2fc) == 0))" (( "(") (binary_expression "(*(short *)(param_1 + 0x2fa) == 0) && (*(short *)(param_1 + 0x2fc) == 0)" (parenthesized_expression "(*(short *)(param_1 + 0x2fa) == 0)" (( "(") (binary_expression "*(short *)(param_1 + 0x2fa) == 0" (pointer_expression "*(short *)(param_1 + 0x2fa)" (* "*") (cast_expression "(short *)(param_1 + 0x2fa)" (( "(") (type_descriptor "short *" (sized_type_specifier "short" (short "short")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x2fa)" (( "(") (binary_expression "param_1 + 0x2fa" (identifier "param_1") (+ "+") (number_literal "0x2fa")) () ")")))) (== "==") (number_literal "0")) () ")")) (&& "&&") (parenthesized_expression "(*(short *)(param_1 + 0x2fc) == 0)" (( "(") (binary_expression "*(short *)(param_1 + 0x2fc) == 0" (pointer_expression "*(short *)(param_1 + 0x2fc)" (* "*") (cast_expression "(short *)(param_1 + 0x2fc)" (( "(") (type_descriptor "short *" (sized_type_specifier "short" (short "short")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x2fc)" (( "(") (binary_expression "param_1 + 0x2fc" (identifier "param_1") (+ "+") (number_literal "0x2fc")) () ")")))) (== "==") (number_literal "0")) () ")"))) () ")")) (compound_statement "{\n      *(undefined2 *)(param_1 + 0x2fa) = 0x1b38;\n      *(undefined2 *)(param_1 + 0x2fc) = 0x5b8a;\n    }" ({ "{") (expression_statement "*(undefined2 *)(param_1 + 0x2fa) = 0x1b38;" (assignment_expression "*(undefined2 *)(param_1 + 0x2fa) = 0x1b38" (pointer_expression "*(undefined2 *)(param_1 + 0x2fa)" (* "*") (cast_expression "(undefined2 *)(param_1 + 0x2fa)" (( "(") (type_descriptor "undefined2 *" (type_identifier "undefined2") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x2fa)" (( "(") (binary_expression "param_1 + 0x2fa" (identifier "param_1") (+ "+") (number_literal "0x2fa")) () ")")))) (= "=") (number_literal "0x1b38")) (; ";")) (expression_statement "*(undefined2 *)(param_1 + 0x2fc) = 0x5b8a;" (assignment_expression "*(undefined2 *)(param_1 + 0x2fc) = 0x5b8a" (pointer_expression "*(undefined2 *)(param_1 + 0x2fc)" (* "*") (cast_expression "(undefined2 *)(param_1 + 0x2fc)" (( "(") (type_descriptor "undefined2 *" (type_identifier "undefined2") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x2fc)" (( "(") (binary_expression "param_1 + 0x2fc" (identifier "param_1") (+ "+") (number_literal "0x2fc")) () ")")))) (= "=") (number_literal "0x5b8a")) (; ";")) (} "}"))) (} "}"))) (return_statement "return;" (return "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: (primitive_type) declarator: (identifier)) (parameter_declaration type: (primitive_type) declarator: (identifier)))) body: (compound_statement (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (number_literal))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) 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: (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)))) alternative: (else_clause (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) 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: (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)))) alternative: (else_clause (compound_statement (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) (binary_expression left: (identifier) right: (number_literal))))))) (expression_statement (assignment_expression left: (identifier) 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: (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: (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: (char_literal (escape_sequence)))) consequence: (compound_statement (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: (identifier) right: (number_literal)))))) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (number_literal) right: (identifier))) right: (parenthesized_expression (binary_expression left: (number_literal) right: (identifier))))) consequence: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (identifier)) right: (number_literal))) consequence: (compound_statement (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: (pointer_expression argument: (cast_expression type: (type_descriptor type: (sized_type_specifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (cast_expression type: (type_descriptor type: (sized_type_specifier)) value: (parenthesized_expression (binary_expression left: (call_expression function: (parenthesized_expression (identifier)) arguments: (argument_list (binary_expression left: (identifier) right: (number_literal)))) right: (number_literal)))))) (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (sized_type_specifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (cast_expression type: (type_descriptor type: (sized_type_specifier)) value: (parenthesized_expression (binary_expression left: (call_expression function: (parenthesized_expression (identifier)) arguments: (argument_list (binary_expression left: (identifier) right: (number_literal)))) right: (number_literal)))))) (return_statement))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (binary_expression left: (identifier) right: (number_literal))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (sized_type_specifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (number_literal))) right: (parenthesized_expression (binary_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (sized_type_specifier) 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: (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: (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))))))) (return_statement))))

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

{
  int iVar1;
  uint uVar2;
  
  iVar1 = FUN_00024cb8(param_1,1);
  if (iVar1 != 0) {
    if (param_2 == 2) {
      uVar2 = *(uint *)(param_1 + 300) | 0x400000;
      *(uint *)(param_1 + 300) = uVar2;
    }
    else if (param_2 == 3) {
      uVar2 = *(uint *)(param_1 + 300) | 0x200000;
      *(uint *)(param_1 + 300) = uVar2;
    }
    else {
      if (param_2 != 1) {
        (*(code *)PTR_png_error_0005340c)(param_1,PTR_s_nt_0005301c + 0x3ac);
      }
      uVar2 = *(uint *)(param_1 + 300) | 0x600000;
      *(uint *)(param_1 + 300) = uVar2;
    }
    if (*(char *)(param_1 + 0x1ff) == '\x03') {
      *(uint *)(param_1 + 300) = uVar2 | 0x1000;
    }
    if ((-1 < param_3) && (-1 < param_4)) {
      if (param_3 + param_4 < 0x186a1) {
        *(undefined1 *)(param_1 + 0x2f9) = 1;
        *(short *)(param_1 + 0x2fa) = (short)((uint)(param_3 << 0xf) / 100000);
        *(short *)(param_1 + 0x2fc) = (short)((uint)(param_4 << 0xf) / 100000);
        return;
      }
      FUN_0001a110(param_1,PTR_s_nt_0005301c + 0x3d0);
    }
    if ((*(short *)(param_1 + 0x2fa) == 0) && (*(short *)(param_1 + 0x2fc) == 0)) {
      *(undefined2 *)(param_1 + 0x2fa) = 0x1b38;
      *(undefined2 *)(param_1 + 0x2fc) = 0x5b8a;
    }
  }
  return;
}

