
_Bool writable_destination(char *file,mode_t mode)

{
  undefined3 extraout_var;
  _Bool _Var2;
  int iVar1;
  
  if ((mode & 0xf000) == 0xa000) {
    return true;
  }
  _Var2 = can_write_any_file();
  if (CONCAT31(extraout_var,_Var2) != 0) {
    return true;
  }
  iVar1 = (*(code *)PTR_euidaccess_000464d0)(file,2);
  return iVar1 == 0;
}



bool FUN_00016560(undefined4 param_1,uint param_2)

{
  int iVar1;
  
  if ((param_2 & 0xf000) == 0xa000) {
    return true;
  }
  iVar1 = can_write_any_file();
  if (iVar1 != 0) {
    return true;
  }
  iVar1 = (*(code *)PTR_euidaccess_000464d0)(param_1,2);
  return iVar1 == 0;
}


lui gp,0x3
addiu gp,gp,0x7bb0
addu gp,gp,t9
ori v0,zero,0xa000
andi a1,a1,0xf000
bne a1,v0,0x00016584
_li v0,0x1
jr ra
_nop
addiu sp,sp,-0x20
lw t9,-0x7f2c(gp)
sw gp,0x10(sp)
sw s0,0x18(sp)
sw ra,0x1c(sp)
bal 0x000285d0
_or s0,a0,zero
beq v0,zero,0x000165bc
_lw gp,0x10(sp)
lw ra,0x1c(sp)
li v0,0x1
lw s0,0x18(sp)
jr ra
_addiu sp,sp,0x20
lw t9,-0x7c40(gp)
li a1,0x2
jalr t9
_or a0,s0,zero
lw ra,0x1c(sp)
sltiu v0,v0,0x1
lw s0,0x18(sp)
jr ra
_addiu sp,sp,0x20
(translation_unit "bool FUN_00016560(undefined4 param_1,uint param_2)\n\n{\n  int iVar1;\n  \n  if ((param_2 & 0xf000) == 0xa000) {\n    return true;\n  }\n  iVar1 = can_write_any_file();\n  if (iVar1 != 0) {\n    return true;\n  }\n  iVar1 = (*(code *)PTR_euidaccess_000464d0)(param_1,2);\n  return iVar1 == 0;\n}\n\n" (function_definition "bool FUN_00016560(undefined4 param_1,uint param_2)\n\n{\n  int iVar1;\n  \n  if ((param_2 & 0xf000) == 0xa000) {\n    return true;\n  }\n  iVar1 = can_write_any_file();\n  if (iVar1 != 0) {\n    return true;\n  }\n  iVar1 = (*(code *)PTR_euidaccess_000464d0)(param_1,2);\n  return iVar1 == 0;\n}" primitive_type (function_declarator "FUN_00016560(undefined4 param_1,uint param_2)" identifier (parameter_list "(undefined4 param_1,uint param_2)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "uint param_2" type_identifier identifier) ))) (compound_statement "{\n  int iVar1;\n  \n  if ((param_2 & 0xf000) == 0xa000) {\n    return true;\n  }\n  iVar1 = can_write_any_file();\n  if (iVar1 != 0) {\n    return true;\n  }\n  iVar1 = (*(code *)PTR_euidaccess_000464d0)(param_1,2);\n  return iVar1 == 0;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (if_statement "if ((param_2 & 0xf000) == 0xa000) {\n    return true;\n  }" if (parenthesized_expression "((param_2 & 0xf000) == 0xa000)" ( (binary_expression "(param_2 & 0xf000) == 0xa000" (parenthesized_expression "(param_2 & 0xf000)" ( (binary_expression "param_2 & 0xf000" identifier & number_literal) )) == number_literal) )) (compound_statement "{\n    return true;\n  }" { (return_statement "return true;" return true ;) })) (expression_statement "iVar1 = can_write_any_file();" (assignment_expression "iVar1 = can_write_any_file()" identifier = (call_expression "can_write_any_file()" identifier (argument_list "()" ( )))) ;) (if_statement "if (iVar1 != 0) {\n    return true;\n  }" if (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) (compound_statement "{\n    return true;\n  }" { (return_statement "return true;" return true ;) })) (expression_statement "iVar1 = (*(code *)PTR_euidaccess_000464d0)(param_1,2);" (assignment_expression "iVar1 = (*(code *)PTR_euidaccess_000464d0)(param_1,2)" identifier = (call_expression "(*(code *)PTR_euidaccess_000464d0)(param_1,2)" (parenthesized_expression "(*(code *)PTR_euidaccess_000464d0)" ( (pointer_expression "*(code *)PTR_euidaccess_000464d0" * (cast_expression "(code *)PTR_euidaccess_000464d0" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(param_1,2)" ( identifier , number_literal )))) ;) (return_statement "return iVar1 == 0;" return (binary_expression "iVar1 == 0" identifier == number_literal) ;) })))
(translation_unit "_Bool writable_destination(char *file,mode_t mode)\n\n{\n  undefined3 extraout_var;\n  _Bool _Var2;\n  int iVar1;\n  \n  if ((mode & 0xf000) == 0xa000) {\n    return true;\n  }\n  _Var2 = can_write_any_file();\n  if (CONCAT31(extraout_var,_Var2) != 0) {\n    return true;\n  }\n  iVar1 = (*(code *)PTR_euidaccess_000464d0)(file,2);\n  return iVar1 == 0;\n}\n\n" (function_definition "_Bool writable_destination(char *file,mode_t mode)\n\n{\n  undefined3 extraout_var;\n  _Bool _Var2;\n  int iVar1;\n  \n  if ((mode & 0xf000) == 0xa000) {\n    return true;\n  }\n  _Var2 = can_write_any_file();\n  if (CONCAT31(extraout_var,_Var2) != 0) {\n    return true;\n  }\n  iVar1 = (*(code *)PTR_euidaccess_000464d0)(file,2);\n  return iVar1 == 0;\n}" type_identifier (function_declarator "writable_destination(char *file,mode_t mode)" identifier (parameter_list "(char *file,mode_t mode)" ( (parameter_declaration "char *file" primitive_type (pointer_declarator "*file" * identifier)) , (parameter_declaration "mode_t mode" type_identifier identifier) ))) (compound_statement "{\n  undefined3 extraout_var;\n  _Bool _Var2;\n  int iVar1;\n  \n  if ((mode & 0xf000) == 0xa000) {\n    return true;\n  }\n  _Var2 = can_write_any_file();\n  if (CONCAT31(extraout_var,_Var2) != 0) {\n    return true;\n  }\n  iVar1 = (*(code *)PTR_euidaccess_000464d0)(file,2);\n  return iVar1 == 0;\n}" { (declaration "undefined3 extraout_var;" type_identifier identifier ;) (declaration "_Bool _Var2;" type_identifier identifier ;) (declaration "int iVar1;" primitive_type identifier ;) (if_statement "if ((mode & 0xf000) == 0xa000) {\n    return true;\n  }" if (parenthesized_expression "((mode & 0xf000) == 0xa000)" ( (binary_expression "(mode & 0xf000) == 0xa000" (parenthesized_expression "(mode & 0xf000)" ( (binary_expression "mode & 0xf000" identifier & number_literal) )) == number_literal) )) (compound_statement "{\n    return true;\n  }" { (return_statement "return true;" return true ;) })) (expression_statement "_Var2 = can_write_any_file();" (assignment_expression "_Var2 = can_write_any_file()" identifier = (call_expression "can_write_any_file()" identifier (argument_list "()" ( )))) ;) (if_statement "if (CONCAT31(extraout_var,_Var2) != 0) {\n    return true;\n  }" if (parenthesized_expression "(CONCAT31(extraout_var,_Var2) != 0)" ( (binary_expression "CONCAT31(extraout_var,_Var2) != 0" (call_expression "CONCAT31(extraout_var,_Var2)" identifier (argument_list "(extraout_var,_Var2)" ( identifier , identifier ))) != number_literal) )) (compound_statement "{\n    return true;\n  }" { (return_statement "return true;" return true ;) })) (expression_statement "iVar1 = (*(code *)PTR_euidaccess_000464d0)(file,2);" (assignment_expression "iVar1 = (*(code *)PTR_euidaccess_000464d0)(file,2)" identifier = (call_expression "(*(code *)PTR_euidaccess_000464d0)(file,2)" (parenthesized_expression "(*(code *)PTR_euidaccess_000464d0)" ( (pointer_expression "*(code *)PTR_euidaccess_000464d0" * (cast_expression "(code *)PTR_euidaccess_000464d0" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(file,2)" ( identifier , number_literal )))) ;) (return_statement "return iVar1 == 0;" return (binary_expression "iVar1 == 0" identifier == number_literal) ;) })))
(translation_unit "bool FUN_00016560(undefined4 param_1,uint param_2)\n\n{\n  int iVar1;\n  \n  if ((param_2 & 0xf000) == 0xa000) {\n    return true;\n  }\n  iVar1 = can_write_any_file();\n  if (iVar1 != 0) {\n    return true;\n  }\n  iVar1 = (*(code *)PTR_euidaccess_000464d0)(param_1,2);\n  return iVar1 == 0;\n}\n\n" (function_definition "bool FUN_00016560(undefined4 param_1,uint param_2)\n\n{\n  int iVar1;\n  \n  if ((param_2 & 0xf000) == 0xa000) {\n    return true;\n  }\n  iVar1 = can_write_any_file();\n  if (iVar1 != 0) {\n    return true;\n  }\n  iVar1 = (*(code *)PTR_euidaccess_000464d0)(param_1,2);\n  return iVar1 == 0;\n}" primitive_type (function_declarator "FUN_00016560(undefined4 param_1,uint param_2)" identifier (parameter_list "(undefined4 param_1,uint param_2)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "uint param_2" type_identifier identifier) ))) (compound_statement "{\n  int iVar1;\n  \n  if ((param_2 & 0xf000) == 0xa000) {\n    return true;\n  }\n  iVar1 = can_write_any_file();\n  if (iVar1 != 0) {\n    return true;\n  }\n  iVar1 = (*(code *)PTR_euidaccess_000464d0)(param_1,2);\n  return iVar1 == 0;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (if_statement "if ((param_2 & 0xf000) == 0xa000) {\n    return true;\n  }" if (parenthesized_expression "((param_2 & 0xf000) == 0xa000)" ( (binary_expression "(param_2 & 0xf000) == 0xa000" (parenthesized_expression "(param_2 & 0xf000)" ( (binary_expression "param_2 & 0xf000" identifier & number_literal) )) == number_literal) )) (compound_statement "{\n    return true;\n  }" { (return_statement "return true;" return true ;) })) (expression_statement "iVar1 = can_write_any_file();" (assignment_expression "iVar1 = can_write_any_file()" identifier = (call_expression "can_write_any_file()" identifier (argument_list "()" ( )))) ;) (if_statement "if (iVar1 != 0) {\n    return true;\n  }" if (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) (compound_statement "{\n    return true;\n  }" { (return_statement "return true;" return true ;) })) (expression_statement "iVar1 = (*(code *)PTR_euidaccess_000464d0)(param_1,2);" (assignment_expression "iVar1 = (*(code *)PTR_euidaccess_000464d0)(param_1,2)" identifier = (call_expression "(*(code *)PTR_euidaccess_000464d0)(param_1,2)" (parenthesized_expression "(*(code *)PTR_euidaccess_000464d0)" ( (pointer_expression "*(code *)PTR_euidaccess_000464d0" * (cast_expression "(code *)PTR_euidaccess_000464d0" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(param_1,2)" ( identifier , number_literal )))) ;) (return_statement "return iVar1 == 0;" return (binary_expression "iVar1 == 0" identifier == number_literal) ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT & LIT) )) == LIT) )) (compound_statement { (return_statement return BOOL ;) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (return_statement return BOOL ;) })) (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( IDENT , LIT )))) ;) (return_statement return (binary_expression IDENT == LIT) ;) })))
(function_definition "bool FUN_00016560(undefined4 param_1,uint param_2)\n\n{\n  int iVar1;\n  \n  if ((param_2 & 0xf000) == 0xa000) {\n    return true;\n  }\n  iVar1 = can_write_any_file();\n  if (iVar1 != 0) {\n    return true;\n  }\n  iVar1 = (*(code *)PTR_euidaccess_000464d0)(param_1,2);\n  return iVar1 == 0;\n}" (primitive_type "bool") (function_declarator "FUN_00016560(undefined4 param_1,uint param_2)" (identifier "FUN_00016560") (parameter_list "(undefined4 param_1,uint param_2)" (( "(") (parameter_declaration "undefined4 param_1" (type_identifier "undefined4") (identifier "param_1")) (, ",") (parameter_declaration "uint param_2" (type_identifier "uint") (identifier "param_2")) () ")"))) (compound_statement "{\n  int iVar1;\n  \n  if ((param_2 & 0xf000) == 0xa000) {\n    return true;\n  }\n  iVar1 = can_write_any_file();\n  if (iVar1 != 0) {\n    return true;\n  }\n  iVar1 = (*(code *)PTR_euidaccess_000464d0)(param_1,2);\n  return iVar1 == 0;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (if_statement "if ((param_2 & 0xf000) == 0xa000) {\n    return true;\n  }" (if "if") (parenthesized_expression "((param_2 & 0xf000) == 0xa000)" (( "(") (binary_expression "(param_2 & 0xf000) == 0xa000" (parenthesized_expression "(param_2 & 0xf000)" (( "(") (binary_expression "param_2 & 0xf000" (identifier "param_2") (& "&") (number_literal "0xf000")) () ")")) (== "==") (number_literal "0xa000")) () ")")) (compound_statement "{\n    return true;\n  }" ({ "{") (return_statement "return true;" (return "return") (true "true") (; ";")) (} "}"))) (expression_statement "iVar1 = can_write_any_file();" (assignment_expression "iVar1 = can_write_any_file()" (identifier "iVar1") (= "=") (call_expression "can_write_any_file()" (identifier "can_write_any_file") (argument_list "()" (( "(") () ")")))) (; ";")) (if_statement "if (iVar1 != 0) {\n    return true;\n  }" (if "if") (parenthesized_expression "(iVar1 != 0)" (( "(") (binary_expression "iVar1 != 0" (identifier "iVar1") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    return true;\n  }" ({ "{") (return_statement "return true;" (return "return") (true "true") (; ";")) (} "}"))) (expression_statement "iVar1 = (*(code *)PTR_euidaccess_000464d0)(param_1,2);" (assignment_expression "iVar1 = (*(code *)PTR_euidaccess_000464d0)(param_1,2)" (identifier "iVar1") (= "=") (call_expression "(*(code *)PTR_euidaccess_000464d0)(param_1,2)" (parenthesized_expression "(*(code *)PTR_euidaccess_000464d0)" (( "(") (pointer_expression "*(code *)PTR_euidaccess_000464d0" (* "*") (cast_expression "(code *)PTR_euidaccess_000464d0" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_euidaccess_000464d0"))) () ")")) (argument_list "(param_1,2)" (( "(") (identifier "param_1") (, ",") (number_literal "2") () ")")))) (; ";")) (return_statement "return iVar1 == 0;" (return "return") (binary_expression "iVar1 == 0" (identifier "iVar1") (== "==") (number_literal "0")) (; ";")) (} "}")))

type_1 function_1(char *file,type_2 var_1)

{
  type_3 extraout_var;
  type_1 _Var2;
  int var_4;
  
  if ((var_1 & 0xf000) == 0xa000) {
    return true;
  }
  _Var2 = var_2();
  if (var_3(extraout_var,_Var2) != 0) {
    return true;
  }
  var_4 = (*(type_4 *)PTR_euidaccess_000464d0)(file,2);
  return var_4 == 0;
}


(translation_unit (function_definition type: (primitive_type) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (type_identifier) declarator: (identifier)) (parameter_declaration type: (type_identifier) declarator: (identifier)))) body: (compound_statement (declaration type: (primitive_type) declarator: (identifier)) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) right: (number_literal))) consequence: (compound_statement (return_statement (true)))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (return_statement (true)))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (parenthesized_expression (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (identifier)))) arguments: (argument_list (identifier) (number_literal))))) (return_statement (binary_expression left: (identifier) right: (number_literal))))))

bool MASKED(undefined4 param_1,uint param_2)

{
  int iVar1;
  
  if ((param_2 & 0xf000) == 0xa000) {
    return true;
  }
  iVar1 = can_write_any_file();
  if (iVar1 != 0) {
    return true;
  }
  iVar1 = (*(code *)PTR_euidaccess_000464d0)(param_1,2);
  return iVar1 == 0;
}

