
/* DWARF original prototype: int diropen(FTS * sp, char * dir, FTS * sp) */

int diropen(FTS *sp,char *dir,FTS *sp_1)

{
  int iVar1;
  uint flags;
  
  flags = ((uint)dir & 0x10) << 0xd | ((uint)dir & 0x800) << 7 | 0x90880;
  if (((uint)dir & 0x200) != 0) {
    iVar1 = openat_safer((int)sp,(char *)sp_1,flags);
    return iVar1;
  }
  iVar1 = open_safer((char *)sp_1,flags);
  return iVar1;
}



void FUN_00028630(undefined4 param_1,uint param_2,undefined4 param_3)

{
  if ((param_2 & 0x200) != 0) {
    openat_safer(param_1,param_3);
    return;
  }
  open_safer(param_3,(param_2 & 0x10) << 0xd | (param_2 & 0x800) << 7 | 0x90880);
  return;
}


lui gp,0x2
addiu gp,gp,0x2ac0
addu gp,gp,t9
sll v0,a1,0xd
lui a3,0x2
sll v1,a1,0x7
and v0,v0,a3
lui a3,0x4
andi a1,a1,0x200
and v1,v1,a3
or v0,v0,v1
or v1,a2,zero
lui a2,0x9
addiu a2,a2,0x880
beq a1,zero,0x0002867c
_or a2,v0,a2
lw t9,-0x7d58(gp)
b 0x0002d670
_or a1,v1,zero
lw t9,-0x7ec4(gp)
or a1,a2,zero
b 0x0001f9b0
_or a0,v1,zero
(translation_unit "void FUN_00028630(undefined4 param_1,uint param_2,undefined4 param_3)\n\n{\n  if ((param_2 & 0x200) != 0) {\n    openat_safer(param_1,param_3);\n    return;\n  }\n  open_safer(param_3,(param_2 & 0x10) << 0xd | (param_2 & 0x800) << 7 | 0x90880);\n  return;\n}\n\n" (function_definition "void FUN_00028630(undefined4 param_1,uint param_2,undefined4 param_3)\n\n{\n  if ((param_2 & 0x200) != 0) {\n    openat_safer(param_1,param_3);\n    return;\n  }\n  open_safer(param_3,(param_2 & 0x10) << 0xd | (param_2 & 0x800) << 7 | 0x90880);\n  return;\n}" primitive_type (function_declarator "FUN_00028630(undefined4 param_1,uint param_2,undefined4 param_3)" identifier (parameter_list "(undefined4 param_1,uint param_2,undefined4 param_3)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "uint param_2" type_identifier identifier) , (parameter_declaration "undefined4 param_3" type_identifier identifier) ))) (compound_statement "{\n  if ((param_2 & 0x200) != 0) {\n    openat_safer(param_1,param_3);\n    return;\n  }\n  open_safer(param_3,(param_2 & 0x10) << 0xd | (param_2 & 0x800) << 7 | 0x90880);\n  return;\n}" { (if_statement "if ((param_2 & 0x200) != 0) {\n    openat_safer(param_1,param_3);\n    return;\n  }" if (parenthesized_expression "((param_2 & 0x200) != 0)" ( (binary_expression "(param_2 & 0x200) != 0" (parenthesized_expression "(param_2 & 0x200)" ( (binary_expression "param_2 & 0x200" identifier & number_literal) )) != number_literal) )) (compound_statement "{\n    openat_safer(param_1,param_3);\n    return;\n  }" { (expression_statement "openat_safer(param_1,param_3);" (call_expression "openat_safer(param_1,param_3)" identifier (argument_list "(param_1,param_3)" ( identifier , identifier ))) ;) (return_statement "return;" return ;) })) (expression_statement "open_safer(param_3,(param_2 & 0x10) << 0xd | (param_2 & 0x800) << 7 | 0x90880);" (call_expression "open_safer(param_3,(param_2 & 0x10) << 0xd | (param_2 & 0x800) << 7 | 0x90880)" identifier (argument_list "(param_3,(param_2 & 0x10) << 0xd | (param_2 & 0x800) << 7 | 0x90880)" ( identifier , (binary_expression "(param_2 & 0x10) << 0xd | (param_2 & 0x800) << 7 | 0x90880" (binary_expression "(param_2 & 0x10) << 0xd | (param_2 & 0x800) << 7" (binary_expression "(param_2 & 0x10) << 0xd" (parenthesized_expression "(param_2 & 0x10)" ( (binary_expression "param_2 & 0x10" identifier & number_literal) )) << number_literal) | (binary_expression "(param_2 & 0x800) << 7" (parenthesized_expression "(param_2 & 0x800)" ( (binary_expression "param_2 & 0x800" identifier & number_literal) )) << number_literal)) | number_literal) ))) ;) (return_statement "return;" return ;) })))
(translation_unit "/* DWARF original prototype: int diropen(FTS * sp, char * dir, FTS * sp) */\n\nint diropen(FTS *sp,char *dir,FTS *sp_1)\n\n{\n  int iVar1;\n  uint flags;\n  \n  flags = ((uint)dir & 0x10) << 0xd | ((uint)dir & 0x800) << 7 | 0x90880;\n  if (((uint)dir & 0x200) != 0) {\n    iVar1 = openat_safer((int)sp,(char *)sp_1,flags);\n    return iVar1;\n  }\n  iVar1 = open_safer((char *)sp_1,flags);\n  return iVar1;\n}\n\n" comment (function_definition "int diropen(FTS *sp,char *dir,FTS *sp_1)\n\n{\n  int iVar1;\n  uint flags;\n  \n  flags = ((uint)dir & 0x10) << 0xd | ((uint)dir & 0x800) << 7 | 0x90880;\n  if (((uint)dir & 0x200) != 0) {\n    iVar1 = openat_safer((int)sp,(char *)sp_1,flags);\n    return iVar1;\n  }\n  iVar1 = open_safer((char *)sp_1,flags);\n  return iVar1;\n}" primitive_type (function_declarator "diropen(FTS *sp,char *dir,FTS *sp_1)" identifier (parameter_list "(FTS *sp,char *dir,FTS *sp_1)" ( (parameter_declaration "FTS *sp" type_identifier (pointer_declarator "*sp" * identifier)) , (parameter_declaration "char *dir" primitive_type (pointer_declarator "*dir" * identifier)) , (parameter_declaration "FTS *sp_1" type_identifier (pointer_declarator "*sp_1" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  uint flags;\n  \n  flags = ((uint)dir & 0x10) << 0xd | ((uint)dir & 0x800) << 7 | 0x90880;\n  if (((uint)dir & 0x200) != 0) {\n    iVar1 = openat_safer((int)sp,(char *)sp_1,flags);\n    return iVar1;\n  }\n  iVar1 = open_safer((char *)sp_1,flags);\n  return iVar1;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "uint flags;" type_identifier identifier ;) (expression_statement "flags = ((uint)dir & 0x10) << 0xd | ((uint)dir & 0x800) << 7 | 0x90880;" (assignment_expression "flags = ((uint)dir & 0x10) << 0xd | ((uint)dir & 0x800) << 7 | 0x90880" identifier = (binary_expression "((uint)dir & 0x10) << 0xd | ((uint)dir & 0x800) << 7 | 0x90880" (binary_expression "((uint)dir & 0x10) << 0xd | ((uint)dir & 0x800) << 7" (binary_expression "((uint)dir & 0x10) << 0xd" (parenthesized_expression "((uint)dir & 0x10)" ( (binary_expression "(uint)dir & 0x10" (cast_expression "(uint)dir" ( (type_descriptor "uint" type_identifier) ) identifier) & number_literal) )) << number_literal) | (binary_expression "((uint)dir & 0x800) << 7" (parenthesized_expression "((uint)dir & 0x800)" ( (binary_expression "(uint)dir & 0x800" (cast_expression "(uint)dir" ( (type_descriptor "uint" type_identifier) ) identifier) & number_literal) )) << number_literal)) | number_literal)) ;) (if_statement "if (((uint)dir & 0x200) != 0) {\n    iVar1 = openat_safer((int)sp,(char *)sp_1,flags);\n    return iVar1;\n  }" if (parenthesized_expression "(((uint)dir & 0x200) != 0)" ( (binary_expression "((uint)dir & 0x200) != 0" (parenthesized_expression "((uint)dir & 0x200)" ( (binary_expression "(uint)dir & 0x200" (cast_expression "(uint)dir" ( (type_descriptor "uint" type_identifier) ) identifier) & number_literal) )) != number_literal) )) (compound_statement "{\n    iVar1 = openat_safer((int)sp,(char *)sp_1,flags);\n    return iVar1;\n  }" { (expression_statement "iVar1 = openat_safer((int)sp,(char *)sp_1,flags);" (assignment_expression "iVar1 = openat_safer((int)sp,(char *)sp_1,flags)" identifier = (call_expression "openat_safer((int)sp,(char *)sp_1,flags)" identifier (argument_list "((int)sp,(char *)sp_1,flags)" ( (cast_expression "(int)sp" ( (type_descriptor "int" primitive_type) ) identifier) , (cast_expression "(char *)sp_1" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier) , identifier )))) ;) (return_statement "return iVar1;" return identifier ;) })) (expression_statement "iVar1 = open_safer((char *)sp_1,flags);" (assignment_expression "iVar1 = open_safer((char *)sp_1,flags)" identifier = (call_expression "open_safer((char *)sp_1,flags)" identifier (argument_list "((char *)sp_1,flags)" ( (cast_expression "(char *)sp_1" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier) , identifier )))) ;) (return_statement "return iVar1;" return identifier ;) })))
(translation_unit "void FUN_00028630(undefined4 param_1,uint param_2,undefined4 param_3)\n\n{\n  if ((param_2 & 0x200) != 0) {\n    openat_safer(param_1,param_3);\n    return;\n  }\n  open_safer(param_3,(param_2 & 0x10) << 0xd | (param_2 & 0x800) << 7 | 0x90880);\n  return;\n}\n\n" (function_definition "void FUN_00028630(undefined4 param_1,uint param_2,undefined4 param_3)\n\n{\n  if ((param_2 & 0x200) != 0) {\n    openat_safer(param_1,param_3);\n    return;\n  }\n  open_safer(param_3,(param_2 & 0x10) << 0xd | (param_2 & 0x800) << 7 | 0x90880);\n  return;\n}" primitive_type (function_declarator "FUN_00028630(undefined4 param_1,uint param_2,undefined4 param_3)" identifier (parameter_list "(undefined4 param_1,uint param_2,undefined4 param_3)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "uint param_2" type_identifier identifier) , (parameter_declaration "undefined4 param_3" type_identifier identifier) ))) (compound_statement "{\n  if ((param_2 & 0x200) != 0) {\n    openat_safer(param_1,param_3);\n    return;\n  }\n  open_safer(param_3,(param_2 & 0x10) << 0xd | (param_2 & 0x800) << 7 | 0x90880);\n  return;\n}" { (if_statement "if ((param_2 & 0x200) != 0) {\n    openat_safer(param_1,param_3);\n    return;\n  }" if (parenthesized_expression "((param_2 & 0x200) != 0)" ( (binary_expression "(param_2 & 0x200) != 0" (parenthesized_expression "(param_2 & 0x200)" ( (binary_expression "param_2 & 0x200" identifier & number_literal) )) != number_literal) )) (compound_statement "{\n    openat_safer(param_1,param_3);\n    return;\n  }" { (expression_statement "openat_safer(param_1,param_3);" (call_expression "openat_safer(param_1,param_3)" identifier (argument_list "(param_1,param_3)" ( identifier , identifier ))) ;) (return_statement "return;" return ;) })) (expression_statement "open_safer(param_3,(param_2 & 0x10) << 0xd | (param_2 & 0x800) << 7 | 0x90880);" (call_expression "open_safer(param_3,(param_2 & 0x10) << 0xd | (param_2 & 0x800) << 7 | 0x90880)" identifier (argument_list "(param_3,(param_2 & 0x10) << 0xd | (param_2 & 0x800) << 7 | 0x90880)" ( identifier , (binary_expression "(param_2 & 0x10) << 0xd | (param_2 & 0x800) << 7 | 0x90880" (binary_expression "(param_2 & 0x10) << 0xd | (param_2 & 0x800) << 7" (binary_expression "(param_2 & 0x10) << 0xd" (parenthesized_expression "(param_2 & 0x10)" ( (binary_expression "param_2 & 0x10" identifier & number_literal) )) << number_literal) | (binary_expression "(param_2 & 0x800) << 7" (parenthesized_expression "(param_2 & 0x800)" ( (binary_expression "param_2 & 0x800" identifier & number_literal) )) << 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) ))) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT & LIT) )) != LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT ))) ;) (return_statement return ;) })) (expression_statement (call_expression IDENT (argument_list ( IDENT , (binary_expression (binary_expression (binary_expression (parenthesized_expression ( (binary_expression IDENT & LIT) )) << LIT) | (binary_expression (parenthesized_expression ( (binary_expression IDENT & LIT) )) << LIT)) | LIT) ))) ;) (return_statement return ;) })))
(function_definition "void FUN_00028630(undefined4 param_1,uint param_2,undefined4 param_3)\n\n{\n  if ((param_2 & 0x200) != 0) {\n    openat_safer(param_1,param_3);\n    return;\n  }\n  open_safer(param_3,(param_2 & 0x10) << 0xd | (param_2 & 0x800) << 7 | 0x90880);\n  return;\n}" (primitive_type "void") (function_declarator "FUN_00028630(undefined4 param_1,uint param_2,undefined4 param_3)" (identifier "FUN_00028630") (parameter_list "(undefined4 param_1,uint param_2,undefined4 param_3)" (( "(") (parameter_declaration "undefined4 param_1" (type_identifier "undefined4") (identifier "param_1")) (, ",") (parameter_declaration "uint param_2" (type_identifier "uint") (identifier "param_2")) (, ",") (parameter_declaration "undefined4 param_3" (type_identifier "undefined4") (identifier "param_3")) () ")"))) (compound_statement "{\n  if ((param_2 & 0x200) != 0) {\n    openat_safer(param_1,param_3);\n    return;\n  }\n  open_safer(param_3,(param_2 & 0x10) << 0xd | (param_2 & 0x800) << 7 | 0x90880);\n  return;\n}" ({ "{") (if_statement "if ((param_2 & 0x200) != 0) {\n    openat_safer(param_1,param_3);\n    return;\n  }" (if "if") (parenthesized_expression "((param_2 & 0x200) != 0)" (( "(") (binary_expression "(param_2 & 0x200) != 0" (parenthesized_expression "(param_2 & 0x200)" (( "(") (binary_expression "param_2 & 0x200" (identifier "param_2") (& "&") (number_literal "0x200")) () ")")) (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    openat_safer(param_1,param_3);\n    return;\n  }" ({ "{") (expression_statement "openat_safer(param_1,param_3);" (call_expression "openat_safer(param_1,param_3)" (identifier "openat_safer") (argument_list "(param_1,param_3)" (( "(") (identifier "param_1") (, ",") (identifier "param_3") () ")"))) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}"))) (expression_statement "open_safer(param_3,(param_2 & 0x10) << 0xd | (param_2 & 0x800) << 7 | 0x90880);" (call_expression "open_safer(param_3,(param_2 & 0x10) << 0xd | (param_2 & 0x800) << 7 | 0x90880)" (identifier "open_safer") (argument_list "(param_3,(param_2 & 0x10) << 0xd | (param_2 & 0x800) << 7 | 0x90880)" (( "(") (identifier "param_3") (, ",") (binary_expression "(param_2 & 0x10) << 0xd | (param_2 & 0x800) << 7 | 0x90880" (binary_expression "(param_2 & 0x10) << 0xd | (param_2 & 0x800) << 7" (binary_expression "(param_2 & 0x10) << 0xd" (parenthesized_expression "(param_2 & 0x10)" (( "(") (binary_expression "param_2 & 0x10" (identifier "param_2") (& "&") (number_literal "0x10")) () ")")) (<< "<<") (number_literal "0xd")) (| "|") (binary_expression "(param_2 & 0x800) << 7" (parenthesized_expression "(param_2 & 0x800)" (( "(") (binary_expression "param_2 & 0x800" (identifier "param_2") (& "&") (number_literal "0x800")) () ")")) (<< "<<") (number_literal "7"))) (| "|") (number_literal "0x90880")) () ")"))) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}")))

/* DWARF original prototype: int diropen(FTS * sp, char * dir, FTS * sp) */

int function_1(type_1 *sp,char *dir,type_1 *sp_1)

{
  int iVar1;
  type_2 flags;
  
  flags = ((type_2)dir & 0x10) << 0xd | ((type_2)dir & 0x800) << 7 | 0x90880;
  if (((type_2)dir & 0x200) != 0) {
    iVar1 = var_1((int)sp,(char *)sp_1,flags);
    return iVar1;
  }
  iVar1 = var_2((char *)sp_1,flags);
  return iVar1;
}


(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)) (parameter_declaration type: (type_identifier) declarator: (identifier)))) body: (compound_statement (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 (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier)))) (return_statement))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (binary_expression left: (binary_expression left: (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) right: (number_literal)) right: (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) right: (number_literal))) right: (number_literal))))) (return_statement))))

void MASKED(undefined4 param_1,uint param_2,undefined4 param_3)

{
  if ((param_2 & 0x200) != 0) {
    openat_safer(param_1,param_3);
    return;
  }
  open_safer(param_3,(param_2 & 0x10) << 0xd | (param_2 & 0x800) << 7 | 0x90880);
  return;
}

