
int png_set_option(png_structrp png_ptr,int option,int onoff)

{
  uint uVar1;
  uint uVar2;
  uint uVar3;
  
  if (png_ptr == (png_structrp)0x0) {
    return 1;
  }
  if (0xb < (uint)option) {
    return 1;
  }
  if ((option & 1U) == 0) {
    uVar1 = 3 << (option & 0x1fU);
    uVar3 = uVar1;
    if (onoff == 0) {
      uVar3 = 2 << (option & 0x1fU);
    }
    uVar2 = png_ptr->options;
    png_ptr->options = ~uVar1 & uVar2 | uVar3;
    return (int)(uVar1 & uVar2) >> (option & 0x1fU);
  }
  return option & 1U;
}



uint png_set_option(int param_1,uint param_2,int param_3)

{
  uint uVar1;
  uint uVar2;
  uint uVar3;
  
  if (param_1 == 0) {
    return 1;
  }
  if (0xb < param_2) {
    return 1;
  }
  if ((param_2 & 1) == 0) {
    uVar1 = 3 << (param_2 & 0x1f);
    uVar3 = uVar1;
    if (param_3 == 0) {
      uVar3 = 2 << (param_2 & 0x1f);
    }
    uVar2 = *(uint *)(param_1 + 700);
    *(uint *)(param_1 + 700) = ~uVar1 & uVar2 | uVar3;
    return (int)(uVar1 & uVar2) >> (param_2 & 0x1f);
  }
  return param_2 & 1;
}


beq a0,zero,0x000195ac
_nop
sltiu v0,a1,0xc
beq v0,zero,0x000195a4
_nop
andi v0,a1,0x1
beq v0,zero,0x000195b4
_nop
jr ra
_nop
jr ra
_li v0,0x1
jr ra
_li v0,0x1
li v0,0x3
bne a2,zero,0x000195e8
_sllv v0,v0,a1
li v1,0x2
sllv a3,v1,a1
lw a2,0x2bc(a0)
nor v1,zero,v0
and v1,v1,a2
or v1,v1,a3
and v0,v0,a2
sw v1,0x2bc(a0)
jr ra
_srav v0,v0,a1
b 0x000195c8
_or a3,v0,zero
(translation_unit "uint png_set_option(int param_1,uint param_2,int param_3)\n\n{\n  uint uVar1;\n  uint uVar2;\n  uint uVar3;\n  \n  if (param_1 == 0) {\n    return 1;\n  }\n  if (0xb < param_2) {\n    return 1;\n  }\n  if ((param_2 & 1) == 0) {\n    uVar1 = 3 << (param_2 & 0x1f);\n    uVar3 = uVar1;\n    if (param_3 == 0) {\n      uVar3 = 2 << (param_2 & 0x1f);\n    }\n    uVar2 = *(uint *)(param_1 + 700);\n    *(uint *)(param_1 + 700) = ~uVar1 & uVar2 | uVar3;\n    return (int)(uVar1 & uVar2) >> (param_2 & 0x1f);\n  }\n  return param_2 & 1;\n}\n\n" (function_definition "uint png_set_option(int param_1,uint param_2,int param_3)\n\n{\n  uint uVar1;\n  uint uVar2;\n  uint uVar3;\n  \n  if (param_1 == 0) {\n    return 1;\n  }\n  if (0xb < param_2) {\n    return 1;\n  }\n  if ((param_2 & 1) == 0) {\n    uVar1 = 3 << (param_2 & 0x1f);\n    uVar3 = uVar1;\n    if (param_3 == 0) {\n      uVar3 = 2 << (param_2 & 0x1f);\n    }\n    uVar2 = *(uint *)(param_1 + 700);\n    *(uint *)(param_1 + 700) = ~uVar1 & uVar2 | uVar3;\n    return (int)(uVar1 & uVar2) >> (param_2 & 0x1f);\n  }\n  return param_2 & 1;\n}" type_identifier (function_declarator "png_set_option(int param_1,uint param_2,int param_3)" identifier (parameter_list "(int param_1,uint param_2,int param_3)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "uint param_2" type_identifier identifier) , (parameter_declaration "int param_3" primitive_type identifier) ))) (compound_statement "{\n  uint uVar1;\n  uint uVar2;\n  uint uVar3;\n  \n  if (param_1 == 0) {\n    return 1;\n  }\n  if (0xb < param_2) {\n    return 1;\n  }\n  if ((param_2 & 1) == 0) {\n    uVar1 = 3 << (param_2 & 0x1f);\n    uVar3 = uVar1;\n    if (param_3 == 0) {\n      uVar3 = 2 << (param_2 & 0x1f);\n    }\n    uVar2 = *(uint *)(param_1 + 700);\n    *(uint *)(param_1 + 700) = ~uVar1 & uVar2 | uVar3;\n    return (int)(uVar1 & uVar2) >> (param_2 & 0x1f);\n  }\n  return param_2 & 1;\n}" { (declaration "uint uVar1;" type_identifier identifier ;) (declaration "uint uVar2;" type_identifier identifier ;) (declaration "uint uVar3;" type_identifier identifier ;) (if_statement "if (param_1 == 0) {\n    return 1;\n  }" if (parenthesized_expression "(param_1 == 0)" ( (binary_expression "param_1 == 0" identifier == number_literal) )) (compound_statement "{\n    return 1;\n  }" { (return_statement "return 1;" return number_literal ;) })) (if_statement "if (0xb < param_2) {\n    return 1;\n  }" if (parenthesized_expression "(0xb < param_2)" ( (binary_expression "0xb < param_2" number_literal < identifier) )) (compound_statement "{\n    return 1;\n  }" { (return_statement "return 1;" return number_literal ;) })) (if_statement "if ((param_2 & 1) == 0) {\n    uVar1 = 3 << (param_2 & 0x1f);\n    uVar3 = uVar1;\n    if (param_3 == 0) {\n      uVar3 = 2 << (param_2 & 0x1f);\n    }\n    uVar2 = *(uint *)(param_1 + 700);\n    *(uint *)(param_1 + 700) = ~uVar1 & uVar2 | uVar3;\n    return (int)(uVar1 & uVar2) >> (param_2 & 0x1f);\n  }" if (parenthesized_expression "((param_2 & 1) == 0)" ( (binary_expression "(param_2 & 1) == 0" (parenthesized_expression "(param_2 & 1)" ( (binary_expression "param_2 & 1" identifier & number_literal) )) == number_literal) )) (compound_statement "{\n    uVar1 = 3 << (param_2 & 0x1f);\n    uVar3 = uVar1;\n    if (param_3 == 0) {\n      uVar3 = 2 << (param_2 & 0x1f);\n    }\n    uVar2 = *(uint *)(param_1 + 700);\n    *(uint *)(param_1 + 700) = ~uVar1 & uVar2 | uVar3;\n    return (int)(uVar1 & uVar2) >> (param_2 & 0x1f);\n  }" { (expression_statement "uVar1 = 3 << (param_2 & 0x1f);" (assignment_expression "uVar1 = 3 << (param_2 & 0x1f)" identifier = (binary_expression "3 << (param_2 & 0x1f)" number_literal << (parenthesized_expression "(param_2 & 0x1f)" ( (binary_expression "param_2 & 0x1f" identifier & number_literal) )))) ;) (expression_statement "uVar3 = uVar1;" (assignment_expression "uVar3 = uVar1" identifier = identifier) ;) (if_statement "if (param_3 == 0) {\n      uVar3 = 2 << (param_2 & 0x1f);\n    }" if (parenthesized_expression "(param_3 == 0)" ( (binary_expression "param_3 == 0" identifier == number_literal) )) (compound_statement "{\n      uVar3 = 2 << (param_2 & 0x1f);\n    }" { (expression_statement "uVar3 = 2 << (param_2 & 0x1f);" (assignment_expression "uVar3 = 2 << (param_2 & 0x1f)" identifier = (binary_expression "2 << (param_2 & 0x1f)" number_literal << (parenthesized_expression "(param_2 & 0x1f)" ( (binary_expression "param_2 & 0x1f" identifier & number_literal) )))) ;) })) (expression_statement "uVar2 = *(uint *)(param_1 + 700);" (assignment_expression "uVar2 = *(uint *)(param_1 + 700)" identifier = (pointer_expression "*(uint *)(param_1 + 700)" * (cast_expression "(uint *)(param_1 + 700)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 700)" ( (binary_expression "param_1 + 700" identifier + number_literal) ))))) ;) (expression_statement "*(uint *)(param_1 + 700) = ~uVar1 & uVar2 | uVar3;" (assignment_expression "*(uint *)(param_1 + 700) = ~uVar1 & uVar2 | uVar3" (pointer_expression "*(uint *)(param_1 + 700)" * (cast_expression "(uint *)(param_1 + 700)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 700)" ( (binary_expression "param_1 + 700" identifier + number_literal) )))) = (binary_expression "~uVar1 & uVar2 | uVar3" (binary_expression "~uVar1 & uVar2" (unary_expression "~uVar1" ~ identifier) & identifier) | identifier)) ;) (return_statement "return (int)(uVar1 & uVar2) >> (param_2 & 0x1f);" return (binary_expression "(int)(uVar1 & uVar2) >> (param_2 & 0x1f)" (cast_expression "(int)(uVar1 & uVar2)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "(uVar1 & uVar2)" ( (binary_expression "uVar1 & uVar2" identifier & identifier) ))) >> (parenthesized_expression "(param_2 & 0x1f)" ( (binary_expression "param_2 & 0x1f" identifier & number_literal) ))) ;) })) (return_statement "return param_2 & 1;" return (binary_expression "param_2 & 1" identifier & number_literal) ;) })))
(translation_unit "int png_set_option(png_structrp png_ptr,int option,int onoff)\n\n{\n  uint uVar1;\n  uint uVar2;\n  uint uVar3;\n  \n  if (png_ptr == (png_structrp)0x0) {\n    return 1;\n  }\n  if (0xb < (uint)option) {\n    return 1;\n  }\n  if ((option & 1U) == 0) {\n    uVar1 = 3 << (option & 0x1fU);\n    uVar3 = uVar1;\n    if (onoff == 0) {\n      uVar3 = 2 << (option & 0x1fU);\n    }\n    uVar2 = png_ptr->options;\n    png_ptr->options = ~uVar1 & uVar2 | uVar3;\n    return (int)(uVar1 & uVar2) >> (option & 0x1fU);\n  }\n  return option & 1U;\n}\n\n" (function_definition "int png_set_option(png_structrp png_ptr,int option,int onoff)\n\n{\n  uint uVar1;\n  uint uVar2;\n  uint uVar3;\n  \n  if (png_ptr == (png_structrp)0x0) {\n    return 1;\n  }\n  if (0xb < (uint)option) {\n    return 1;\n  }\n  if ((option & 1U) == 0) {\n    uVar1 = 3 << (option & 0x1fU);\n    uVar3 = uVar1;\n    if (onoff == 0) {\n      uVar3 = 2 << (option & 0x1fU);\n    }\n    uVar2 = png_ptr->options;\n    png_ptr->options = ~uVar1 & uVar2 | uVar3;\n    return (int)(uVar1 & uVar2) >> (option & 0x1fU);\n  }\n  return option & 1U;\n}" primitive_type (function_declarator "png_set_option(png_structrp png_ptr,int option,int onoff)" identifier (parameter_list "(png_structrp png_ptr,int option,int onoff)" ( (parameter_declaration "png_structrp png_ptr" type_identifier identifier) , (parameter_declaration "int option" primitive_type identifier) , (parameter_declaration "int onoff" primitive_type identifier) ))) (compound_statement "{\n  uint uVar1;\n  uint uVar2;\n  uint uVar3;\n  \n  if (png_ptr == (png_structrp)0x0) {\n    return 1;\n  }\n  if (0xb < (uint)option) {\n    return 1;\n  }\n  if ((option & 1U) == 0) {\n    uVar1 = 3 << (option & 0x1fU);\n    uVar3 = uVar1;\n    if (onoff == 0) {\n      uVar3 = 2 << (option & 0x1fU);\n    }\n    uVar2 = png_ptr->options;\n    png_ptr->options = ~uVar1 & uVar2 | uVar3;\n    return (int)(uVar1 & uVar2) >> (option & 0x1fU);\n  }\n  return option & 1U;\n}" { (declaration "uint uVar1;" type_identifier identifier ;) (declaration "uint uVar2;" type_identifier identifier ;) (declaration "uint uVar3;" type_identifier identifier ;) (if_statement "if (png_ptr == (png_structrp)0x0) {\n    return 1;\n  }" if (parenthesized_expression "(png_ptr == (png_structrp)0x0)" ( (binary_expression "png_ptr == (png_structrp)0x0" identifier == (cast_expression "(png_structrp)0x0" ( (type_descriptor "png_structrp" type_identifier) ) number_literal)) )) (compound_statement "{\n    return 1;\n  }" { (return_statement "return 1;" return number_literal ;) })) (if_statement "if (0xb < (uint)option) {\n    return 1;\n  }" if (parenthesized_expression "(0xb < (uint)option)" ( (binary_expression "0xb < (uint)option" number_literal < (cast_expression "(uint)option" ( (type_descriptor "uint" type_identifier) ) identifier)) )) (compound_statement "{\n    return 1;\n  }" { (return_statement "return 1;" return number_literal ;) })) (if_statement "if ((option & 1U) == 0) {\n    uVar1 = 3 << (option & 0x1fU);\n    uVar3 = uVar1;\n    if (onoff == 0) {\n      uVar3 = 2 << (option & 0x1fU);\n    }\n    uVar2 = png_ptr->options;\n    png_ptr->options = ~uVar1 & uVar2 | uVar3;\n    return (int)(uVar1 & uVar2) >> (option & 0x1fU);\n  }" if (parenthesized_expression "((option & 1U) == 0)" ( (binary_expression "(option & 1U) == 0" (parenthesized_expression "(option & 1U)" ( (binary_expression "option & 1U" identifier & number_literal) )) == number_literal) )) (compound_statement "{\n    uVar1 = 3 << (option & 0x1fU);\n    uVar3 = uVar1;\n    if (onoff == 0) {\n      uVar3 = 2 << (option & 0x1fU);\n    }\n    uVar2 = png_ptr->options;\n    png_ptr->options = ~uVar1 & uVar2 | uVar3;\n    return (int)(uVar1 & uVar2) >> (option & 0x1fU);\n  }" { (expression_statement "uVar1 = 3 << (option & 0x1fU);" (assignment_expression "uVar1 = 3 << (option & 0x1fU)" identifier = (binary_expression "3 << (option & 0x1fU)" number_literal << (parenthesized_expression "(option & 0x1fU)" ( (binary_expression "option & 0x1fU" identifier & number_literal) )))) ;) (expression_statement "uVar3 = uVar1;" (assignment_expression "uVar3 = uVar1" identifier = identifier) ;) (if_statement "if (onoff == 0) {\n      uVar3 = 2 << (option & 0x1fU);\n    }" if (parenthesized_expression "(onoff == 0)" ( (binary_expression "onoff == 0" identifier == number_literal) )) (compound_statement "{\n      uVar3 = 2 << (option & 0x1fU);\n    }" { (expression_statement "uVar3 = 2 << (option & 0x1fU);" (assignment_expression "uVar3 = 2 << (option & 0x1fU)" identifier = (binary_expression "2 << (option & 0x1fU)" number_literal << (parenthesized_expression "(option & 0x1fU)" ( (binary_expression "option & 0x1fU" identifier & number_literal) )))) ;) })) (expression_statement "uVar2 = png_ptr->options;" (assignment_expression "uVar2 = png_ptr->options" identifier = (field_expression "png_ptr->options" identifier -> field_identifier)) ;) (expression_statement "png_ptr->options = ~uVar1 & uVar2 | uVar3;" (assignment_expression "png_ptr->options = ~uVar1 & uVar2 | uVar3" (field_expression "png_ptr->options" identifier -> field_identifier) = (binary_expression "~uVar1 & uVar2 | uVar3" (binary_expression "~uVar1 & uVar2" (unary_expression "~uVar1" ~ identifier) & identifier) | identifier)) ;) (return_statement "return (int)(uVar1 & uVar2) >> (option & 0x1fU);" return (binary_expression "(int)(uVar1 & uVar2) >> (option & 0x1fU)" (cast_expression "(int)(uVar1 & uVar2)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "(uVar1 & uVar2)" ( (binary_expression "uVar1 & uVar2" identifier & identifier) ))) >> (parenthesized_expression "(option & 0x1fU)" ( (binary_expression "option & 0x1fU" identifier & number_literal) ))) ;) })) (return_statement "return option & 1U;" return (binary_expression "option & 1U" identifier & number_literal) ;) })))
(translation_unit "uint png_set_option(int param_1,uint param_2,int param_3)\n\n{\n  uint uVar1;\n  uint uVar2;\n  uint uVar3;\n  \n  if (param_1 == 0) {\n    return 1;\n  }\n  if (0xb < param_2) {\n    return 1;\n  }\n  if ((param_2 & 1) == 0) {\n    uVar1 = 3 << (param_2 & 0x1f);\n    uVar3 = uVar1;\n    if (param_3 == 0) {\n      uVar3 = 2 << (param_2 & 0x1f);\n    }\n    uVar2 = *(uint *)(param_1 + 700);\n    *(uint *)(param_1 + 700) = ~uVar1 & uVar2 | uVar3;\n    return (int)(uVar1 & uVar2) >> (param_2 & 0x1f);\n  }\n  return param_2 & 1;\n}\n\n" (function_definition "uint png_set_option(int param_1,uint param_2,int param_3)\n\n{\n  uint uVar1;\n  uint uVar2;\n  uint uVar3;\n  \n  if (param_1 == 0) {\n    return 1;\n  }\n  if (0xb < param_2) {\n    return 1;\n  }\n  if ((param_2 & 1) == 0) {\n    uVar1 = 3 << (param_2 & 0x1f);\n    uVar3 = uVar1;\n    if (param_3 == 0) {\n      uVar3 = 2 << (param_2 & 0x1f);\n    }\n    uVar2 = *(uint *)(param_1 + 700);\n    *(uint *)(param_1 + 700) = ~uVar1 & uVar2 | uVar3;\n    return (int)(uVar1 & uVar2) >> (param_2 & 0x1f);\n  }\n  return param_2 & 1;\n}" type_identifier (function_declarator "png_set_option(int param_1,uint param_2,int param_3)" identifier (parameter_list "(int param_1,uint param_2,int param_3)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "uint param_2" type_identifier identifier) , (parameter_declaration "int param_3" primitive_type identifier) ))) (compound_statement "{\n  uint uVar1;\n  uint uVar2;\n  uint uVar3;\n  \n  if (param_1 == 0) {\n    return 1;\n  }\n  if (0xb < param_2) {\n    return 1;\n  }\n  if ((param_2 & 1) == 0) {\n    uVar1 = 3 << (param_2 & 0x1f);\n    uVar3 = uVar1;\n    if (param_3 == 0) {\n      uVar3 = 2 << (param_2 & 0x1f);\n    }\n    uVar2 = *(uint *)(param_1 + 700);\n    *(uint *)(param_1 + 700) = ~uVar1 & uVar2 | uVar3;\n    return (int)(uVar1 & uVar2) >> (param_2 & 0x1f);\n  }\n  return param_2 & 1;\n}" { (declaration "uint uVar1;" type_identifier identifier ;) (declaration "uint uVar2;" type_identifier identifier ;) (declaration "uint uVar3;" type_identifier identifier ;) (if_statement "if (param_1 == 0) {\n    return 1;\n  }" if (parenthesized_expression "(param_1 == 0)" ( (binary_expression "param_1 == 0" identifier == number_literal) )) (compound_statement "{\n    return 1;\n  }" { (return_statement "return 1;" return number_literal ;) })) (if_statement "if (0xb < param_2) {\n    return 1;\n  }" if (parenthesized_expression "(0xb < param_2)" ( (binary_expression "0xb < param_2" number_literal < identifier) )) (compound_statement "{\n    return 1;\n  }" { (return_statement "return 1;" return number_literal ;) })) (if_statement "if ((param_2 & 1) == 0) {\n    uVar1 = 3 << (param_2 & 0x1f);\n    uVar3 = uVar1;\n    if (param_3 == 0) {\n      uVar3 = 2 << (param_2 & 0x1f);\n    }\n    uVar2 = *(uint *)(param_1 + 700);\n    *(uint *)(param_1 + 700) = ~uVar1 & uVar2 | uVar3;\n    return (int)(uVar1 & uVar2) >> (param_2 & 0x1f);\n  }" if (parenthesized_expression "((param_2 & 1) == 0)" ( (binary_expression "(param_2 & 1) == 0" (parenthesized_expression "(param_2 & 1)" ( (binary_expression "param_2 & 1" identifier & number_literal) )) == number_literal) )) (compound_statement "{\n    uVar1 = 3 << (param_2 & 0x1f);\n    uVar3 = uVar1;\n    if (param_3 == 0) {\n      uVar3 = 2 << (param_2 & 0x1f);\n    }\n    uVar2 = *(uint *)(param_1 + 700);\n    *(uint *)(param_1 + 700) = ~uVar1 & uVar2 | uVar3;\n    return (int)(uVar1 & uVar2) >> (param_2 & 0x1f);\n  }" { (expression_statement "uVar1 = 3 << (param_2 & 0x1f);" (assignment_expression "uVar1 = 3 << (param_2 & 0x1f)" identifier = (binary_expression "3 << (param_2 & 0x1f)" number_literal << (parenthesized_expression "(param_2 & 0x1f)" ( (binary_expression "param_2 & 0x1f" identifier & number_literal) )))) ;) (expression_statement "uVar3 = uVar1;" (assignment_expression "uVar3 = uVar1" identifier = identifier) ;) (if_statement "if (param_3 == 0) {\n      uVar3 = 2 << (param_2 & 0x1f);\n    }" if (parenthesized_expression "(param_3 == 0)" ( (binary_expression "param_3 == 0" identifier == number_literal) )) (compound_statement "{\n      uVar3 = 2 << (param_2 & 0x1f);\n    }" { (expression_statement "uVar3 = 2 << (param_2 & 0x1f);" (assignment_expression "uVar3 = 2 << (param_2 & 0x1f)" identifier = (binary_expression "2 << (param_2 & 0x1f)" number_literal << (parenthesized_expression "(param_2 & 0x1f)" ( (binary_expression "param_2 & 0x1f" identifier & number_literal) )))) ;) })) (expression_statement "uVar2 = *(uint *)(param_1 + 700);" (assignment_expression "uVar2 = *(uint *)(param_1 + 700)" identifier = (pointer_expression "*(uint *)(param_1 + 700)" * (cast_expression "(uint *)(param_1 + 700)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 700)" ( (binary_expression "param_1 + 700" identifier + number_literal) ))))) ;) (expression_statement "*(uint *)(param_1 + 700) = ~uVar1 & uVar2 | uVar3;" (assignment_expression "*(uint *)(param_1 + 700) = ~uVar1 & uVar2 | uVar3" (pointer_expression "*(uint *)(param_1 + 700)" * (cast_expression "(uint *)(param_1 + 700)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 700)" ( (binary_expression "param_1 + 700" identifier + number_literal) )))) = (binary_expression "~uVar1 & uVar2 | uVar3" (binary_expression "~uVar1 & uVar2" (unary_expression "~uVar1" ~ identifier) & identifier) | identifier)) ;) (return_statement "return (int)(uVar1 & uVar2) >> (param_2 & 0x1f);" return (binary_expression "(int)(uVar1 & uVar2) >> (param_2 & 0x1f)" (cast_expression "(int)(uVar1 & uVar2)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "(uVar1 & uVar2)" ( (binary_expression "uVar1 & uVar2" identifier & identifier) ))) >> (parenthesized_expression "(param_2 & 0x1f)" ( (binary_expression "param_2 & 0x1f" identifier & number_literal) ))) ;) })) (return_statement "return param_2 & 1;" return (binary_expression "param_2 & 1" identifier & number_literal) ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (return_statement return LIT ;) })) (if_statement if (parenthesized_expression ( (binary_expression LIT < IDENT) )) (compound_statement { (return_statement return LIT ;) })) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT & LIT) )) == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression LIT << (parenthesized_expression ( (binary_expression IDENT & LIT) )))) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression LIT << (parenthesized_expression ( (binary_expression IDENT & LIT) )))) ;) })) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = (binary_expression (binary_expression (unary_expression ~ IDENT) & IDENT) | IDENT)) ;) (return_statement return (binary_expression (cast_expression ( (type_descriptor TYPE) ) (parenthesized_expression ( (binary_expression IDENT & IDENT) ))) >> (parenthesized_expression ( (binary_expression IDENT & LIT) ))) ;) })) (return_statement return (binary_expression IDENT & LIT) ;) })))
(function_definition "uint png_set_option(int param_1,uint param_2,int param_3)\n\n{\n  uint uVar1;\n  uint uVar2;\n  uint uVar3;\n  \n  if (param_1 == 0) {\n    return 1;\n  }\n  if (0xb < param_2) {\n    return 1;\n  }\n  if ((param_2 & 1) == 0) {\n    uVar1 = 3 << (param_2 & 0x1f);\n    uVar3 = uVar1;\n    if (param_3 == 0) {\n      uVar3 = 2 << (param_2 & 0x1f);\n    }\n    uVar2 = *(uint *)(param_1 + 700);\n    *(uint *)(param_1 + 700) = ~uVar1 & uVar2 | uVar3;\n    return (int)(uVar1 & uVar2) >> (param_2 & 0x1f);\n  }\n  return param_2 & 1;\n}" (type_identifier "uint") (function_declarator "png_set_option(int param_1,uint param_2,int param_3)" (identifier "png_set_option") (parameter_list "(int param_1,uint param_2,int param_3)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) (, ",") (parameter_declaration "uint param_2" (type_identifier "uint") (identifier "param_2")) (, ",") (parameter_declaration "int param_3" (primitive_type "int") (identifier "param_3")) () ")"))) (compound_statement "{\n  uint uVar1;\n  uint uVar2;\n  uint uVar3;\n  \n  if (param_1 == 0) {\n    return 1;\n  }\n  if (0xb < param_2) {\n    return 1;\n  }\n  if ((param_2 & 1) == 0) {\n    uVar1 = 3 << (param_2 & 0x1f);\n    uVar3 = uVar1;\n    if (param_3 == 0) {\n      uVar3 = 2 << (param_2 & 0x1f);\n    }\n    uVar2 = *(uint *)(param_1 + 700);\n    *(uint *)(param_1 + 700) = ~uVar1 & uVar2 | uVar3;\n    return (int)(uVar1 & uVar2) >> (param_2 & 0x1f);\n  }\n  return param_2 & 1;\n}" ({ "{") (declaration "uint uVar1;" (type_identifier "uint") (identifier "uVar1") (; ";")) (declaration "uint uVar2;" (type_identifier "uint") (identifier "uVar2") (; ";")) (declaration "uint uVar3;" (type_identifier "uint") (identifier "uVar3") (; ";")) (if_statement "if (param_1 == 0) {\n    return 1;\n  }" (if "if") (parenthesized_expression "(param_1 == 0)" (( "(") (binary_expression "param_1 == 0" (identifier "param_1") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    return 1;\n  }" ({ "{") (return_statement "return 1;" (return "return") (number_literal "1") (; ";")) (} "}"))) (if_statement "if (0xb < param_2) {\n    return 1;\n  }" (if "if") (parenthesized_expression "(0xb < param_2)" (( "(") (binary_expression "0xb < param_2" (number_literal "0xb") (< "<") (identifier "param_2")) () ")")) (compound_statement "{\n    return 1;\n  }" ({ "{") (return_statement "return 1;" (return "return") (number_literal "1") (; ";")) (} "}"))) (if_statement "if ((param_2 & 1) == 0) {\n    uVar1 = 3 << (param_2 & 0x1f);\n    uVar3 = uVar1;\n    if (param_3 == 0) {\n      uVar3 = 2 << (param_2 & 0x1f);\n    }\n    uVar2 = *(uint *)(param_1 + 700);\n    *(uint *)(param_1 + 700) = ~uVar1 & uVar2 | uVar3;\n    return (int)(uVar1 & uVar2) >> (param_2 & 0x1f);\n  }" (if "if") (parenthesized_expression "((param_2 & 1) == 0)" (( "(") (binary_expression "(param_2 & 1) == 0" (parenthesized_expression "(param_2 & 1)" (( "(") (binary_expression "param_2 & 1" (identifier "param_2") (& "&") (number_literal "1")) () ")")) (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    uVar1 = 3 << (param_2 & 0x1f);\n    uVar3 = uVar1;\n    if (param_3 == 0) {\n      uVar3 = 2 << (param_2 & 0x1f);\n    }\n    uVar2 = *(uint *)(param_1 + 700);\n    *(uint *)(param_1 + 700) = ~uVar1 & uVar2 | uVar3;\n    return (int)(uVar1 & uVar2) >> (param_2 & 0x1f);\n  }" ({ "{") (expression_statement "uVar1 = 3 << (param_2 & 0x1f);" (assignment_expression "uVar1 = 3 << (param_2 & 0x1f)" (identifier "uVar1") (= "=") (binary_expression "3 << (param_2 & 0x1f)" (number_literal "3") (<< "<<") (parenthesized_expression "(param_2 & 0x1f)" (( "(") (binary_expression "param_2 & 0x1f" (identifier "param_2") (& "&") (number_literal "0x1f")) () ")")))) (; ";")) (expression_statement "uVar3 = uVar1;" (assignment_expression "uVar3 = uVar1" (identifier "uVar3") (= "=") (identifier "uVar1")) (; ";")) (if_statement "if (param_3 == 0) {\n      uVar3 = 2 << (param_2 & 0x1f);\n    }" (if "if") (parenthesized_expression "(param_3 == 0)" (( "(") (binary_expression "param_3 == 0" (identifier "param_3") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n      uVar3 = 2 << (param_2 & 0x1f);\n    }" ({ "{") (expression_statement "uVar3 = 2 << (param_2 & 0x1f);" (assignment_expression "uVar3 = 2 << (param_2 & 0x1f)" (identifier "uVar3") (= "=") (binary_expression "2 << (param_2 & 0x1f)" (number_literal "2") (<< "<<") (parenthesized_expression "(param_2 & 0x1f)" (( "(") (binary_expression "param_2 & 0x1f" (identifier "param_2") (& "&") (number_literal "0x1f")) () ")")))) (; ";")) (} "}"))) (expression_statement "uVar2 = *(uint *)(param_1 + 700);" (assignment_expression "uVar2 = *(uint *)(param_1 + 700)" (identifier "uVar2") (= "=") (pointer_expression "*(uint *)(param_1 + 700)" (* "*") (cast_expression "(uint *)(param_1 + 700)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 700)" (( "(") (binary_expression "param_1 + 700" (identifier "param_1") (+ "+") (number_literal "700")) () ")"))))) (; ";")) (expression_statement "*(uint *)(param_1 + 700) = ~uVar1 & uVar2 | uVar3;" (assignment_expression "*(uint *)(param_1 + 700) = ~uVar1 & uVar2 | uVar3" (pointer_expression "*(uint *)(param_1 + 700)" (* "*") (cast_expression "(uint *)(param_1 + 700)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 700)" (( "(") (binary_expression "param_1 + 700" (identifier "param_1") (+ "+") (number_literal "700")) () ")")))) (= "=") (binary_expression "~uVar1 & uVar2 | uVar3" (binary_expression "~uVar1 & uVar2" (unary_expression "~uVar1" (~ "~") (identifier "uVar1")) (& "&") (identifier "uVar2")) (| "|") (identifier "uVar3"))) (; ";")) (return_statement "return (int)(uVar1 & uVar2) >> (param_2 & 0x1f);" (return "return") (binary_expression "(int)(uVar1 & uVar2) >> (param_2 & 0x1f)" (cast_expression "(int)(uVar1 & uVar2)" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (parenthesized_expression "(uVar1 & uVar2)" (( "(") (binary_expression "uVar1 & uVar2" (identifier "uVar1") (& "&") (identifier "uVar2")) () ")"))) (>> ">>") (parenthesized_expression "(param_2 & 0x1f)" (( "(") (binary_expression "param_2 & 0x1f" (identifier "param_2") (& "&") (number_literal "0x1f")) () ")"))) (; ";")) (} "}"))) (return_statement "return param_2 & 1;" (return "return") (binary_expression "param_2 & 1" (identifier "param_2") (& "&") (number_literal "1")) (; ";")) (} "}")))

int function_1(type_1 var_1,int var_2,int var_3)

{
  type_2 var_6;
  type_2 var_4;
  type_2 var_5;
  
  if (var_1 == (type_1)0x0) {
    return 1;
  }
  if (0xb < (type_2)var_2) {
    return 1;
  }
  if ((var_2 & 1U) == 0) {
    var_6 = 3 << (var_2 & 0x1fU);
    var_5 = var_6;
    if (var_3 == 0) {
      var_5 = 2 << (var_2 & 0x1fU);
    }
    var_4 = var_1->options;
    var_1->options = ~var_6 & var_4 | var_5;
    return (int)(var_6 & var_4) >> (var_2 & 0x1fU);
  }
  return var_2 & 1U;
}


(translation_unit (function_definition type: (type_identifier) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (primitive_type) declarator: (identifier)) (parameter_declaration type: (type_identifier) declarator: (identifier)) (parameter_declaration type: (primitive_type) declarator: (identifier)))) body: (compound_statement (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (return_statement (number_literal)))) (if_statement condition: (parenthesized_expression (binary_expression left: (number_literal) right: (identifier))) consequence: (compound_statement (return_statement (number_literal)))) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (number_literal) right: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal)))))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (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: (number_literal) right: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal)))))))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))) (expression_statement (assignment_expression left: (pointer_expression argument: (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: (binary_expression left: (unary_expression argument: (identifier)) right: (identifier)) right: (identifier)))) (return_statement (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (parenthesized_expression (binary_expression left: (identifier) right: (identifier)))) right: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))) (return_statement (binary_expression left: (identifier) right: (number_literal))))))

uint MASKED(int param_1,uint param_2,int param_3)

{
  uint uVar1;
  uint uVar2;
  uint uVar3;
  
  if (param_1 == 0) {
    return 1;
  }
  if (0xb < param_2) {
    return 1;
  }
  if ((param_2 & 1) == 0) {
    uVar1 = 3 << (param_2 & 0x1f);
    uVar3 = uVar1;
    if (param_3 == 0) {
      uVar3 = 2 << (param_2 & 0x1f);
    }
    uVar2 = *(uint *)(param_1 + 700);
    *(uint *)(param_1 + 700) = ~uVar1 & uVar2 | uVar3;
    return (int)(uVar1 & uVar2) >> (param_2 & 0x1f);
  }
  return param_2 & 1;
}

