
void pollwrap_add_fd_rwx(pollwrapper *pw,int fd,int rwx)

{
  uint events;
  
  events = rwx & 1;
  if (events != 0) {
    events = 0xc1;
  }
  if ((rwx & 2U) != 0) {
    events = events | 0x104;
  }
  if ((rwx & 4U) != 0) {
    events = events | 2;
  }
  pollwrap_add_fd_events(pw,fd,events);
  return;
}



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

{
  uint uVar1;
  
  uVar1 = param_3 & 1;
  if (uVar1 != 0) {
    uVar1 = 0xc1;
  }
  if ((param_3 & 2) != 0) {
    uVar1 = uVar1 | 0x104;
  }
  if ((param_3 & 4) != 0) {
    uVar1 = uVar1 | 2;
  }
  pollwrap_add_fd_events(param_1,param_2,uVar1);
  return;
}


lui gp,0x3
addiu gp,gp,0x38c4
addu gp,gp,t9
or v0,a2,zero
andi a2,a2,0x1
beq a2,zero,0x000848ac
_andi v1,v0,0x2
li a2,0xc1
beq v1,zero,0x000848b8
_nop
ori a2,a2,0x104
andi v0,v0,0x4
beq v0,zero,0x000848c8
_lw t9,-0x7730(gp)
ori a2,a2,0x2
b 0x000846e8
_nop
(translation_unit "void pollwrap_add_fd_rwx(undefined4 param_1,undefined4 param_2,uint param_3)\n\n{\n  uint uVar1;\n  \n  uVar1 = param_3 & 1;\n  if (uVar1 != 0) {\n    uVar1 = 0xc1;\n  }\n  if ((param_3 & 2) != 0) {\n    uVar1 = uVar1 | 0x104;\n  }\n  if ((param_3 & 4) != 0) {\n    uVar1 = uVar1 | 2;\n  }\n  pollwrap_add_fd_events(param_1,param_2,uVar1);\n  return;\n}\n\n" (function_definition "void pollwrap_add_fd_rwx(undefined4 param_1,undefined4 param_2,uint param_3)\n\n{\n  uint uVar1;\n  \n  uVar1 = param_3 & 1;\n  if (uVar1 != 0) {\n    uVar1 = 0xc1;\n  }\n  if ((param_3 & 2) != 0) {\n    uVar1 = uVar1 | 0x104;\n  }\n  if ((param_3 & 4) != 0) {\n    uVar1 = uVar1 | 2;\n  }\n  pollwrap_add_fd_events(param_1,param_2,uVar1);\n  return;\n}" primitive_type (function_declarator "pollwrap_add_fd_rwx(undefined4 param_1,undefined4 param_2,uint param_3)" identifier (parameter_list "(undefined4 param_1,undefined4 param_2,uint param_3)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "undefined4 param_2" type_identifier identifier) , (parameter_declaration "uint param_3" type_identifier identifier) ))) (compound_statement "{\n  uint uVar1;\n  \n  uVar1 = param_3 & 1;\n  if (uVar1 != 0) {\n    uVar1 = 0xc1;\n  }\n  if ((param_3 & 2) != 0) {\n    uVar1 = uVar1 | 0x104;\n  }\n  if ((param_3 & 4) != 0) {\n    uVar1 = uVar1 | 2;\n  }\n  pollwrap_add_fd_events(param_1,param_2,uVar1);\n  return;\n}" { (declaration "uint uVar1;" type_identifier identifier ;) (expression_statement "uVar1 = param_3 & 1;" (assignment_expression "uVar1 = param_3 & 1" identifier = (binary_expression "param_3 & 1" identifier & number_literal)) ;) (if_statement "if (uVar1 != 0) {\n    uVar1 = 0xc1;\n  }" if (parenthesized_expression "(uVar1 != 0)" ( (binary_expression "uVar1 != 0" identifier != number_literal) )) (compound_statement "{\n    uVar1 = 0xc1;\n  }" { (expression_statement "uVar1 = 0xc1;" (assignment_expression "uVar1 = 0xc1" identifier = number_literal) ;) })) (if_statement "if ((param_3 & 2) != 0) {\n    uVar1 = uVar1 | 0x104;\n  }" if (parenthesized_expression "((param_3 & 2) != 0)" ( (binary_expression "(param_3 & 2) != 0" (parenthesized_expression "(param_3 & 2)" ( (binary_expression "param_3 & 2" identifier & number_literal) )) != number_literal) )) (compound_statement "{\n    uVar1 = uVar1 | 0x104;\n  }" { (expression_statement "uVar1 = uVar1 | 0x104;" (assignment_expression "uVar1 = uVar1 | 0x104" identifier = (binary_expression "uVar1 | 0x104" identifier | number_literal)) ;) })) (if_statement "if ((param_3 & 4) != 0) {\n    uVar1 = uVar1 | 2;\n  }" if (parenthesized_expression "((param_3 & 4) != 0)" ( (binary_expression "(param_3 & 4) != 0" (parenthesized_expression "(param_3 & 4)" ( (binary_expression "param_3 & 4" identifier & number_literal) )) != number_literal) )) (compound_statement "{\n    uVar1 = uVar1 | 2;\n  }" { (expression_statement "uVar1 = uVar1 | 2;" (assignment_expression "uVar1 = uVar1 | 2" identifier = (binary_expression "uVar1 | 2" identifier | number_literal)) ;) })) (expression_statement "pollwrap_add_fd_events(param_1,param_2,uVar1);" (call_expression "pollwrap_add_fd_events(param_1,param_2,uVar1)" identifier (argument_list "(param_1,param_2,uVar1)" ( identifier , identifier , identifier ))) ;) (return_statement "return;" return ;) })))
(translation_unit "void pollwrap_add_fd_rwx(pollwrapper *pw,int fd,int rwx)\n\n{\n  uint events;\n  \n  events = rwx & 1;\n  if (events != 0) {\n    events = 0xc1;\n  }\n  if ((rwx & 2U) != 0) {\n    events = events | 0x104;\n  }\n  if ((rwx & 4U) != 0) {\n    events = events | 2;\n  }\n  pollwrap_add_fd_events(pw,fd,events);\n  return;\n}\n\n" (function_definition "void pollwrap_add_fd_rwx(pollwrapper *pw,int fd,int rwx)\n\n{\n  uint events;\n  \n  events = rwx & 1;\n  if (events != 0) {\n    events = 0xc1;\n  }\n  if ((rwx & 2U) != 0) {\n    events = events | 0x104;\n  }\n  if ((rwx & 4U) != 0) {\n    events = events | 2;\n  }\n  pollwrap_add_fd_events(pw,fd,events);\n  return;\n}" primitive_type (function_declarator "pollwrap_add_fd_rwx(pollwrapper *pw,int fd,int rwx)" identifier (parameter_list "(pollwrapper *pw,int fd,int rwx)" ( (parameter_declaration "pollwrapper *pw" type_identifier (pointer_declarator "*pw" * identifier)) , (parameter_declaration "int fd" primitive_type identifier) , (parameter_declaration "int rwx" primitive_type identifier) ))) (compound_statement "{\n  uint events;\n  \n  events = rwx & 1;\n  if (events != 0) {\n    events = 0xc1;\n  }\n  if ((rwx & 2U) != 0) {\n    events = events | 0x104;\n  }\n  if ((rwx & 4U) != 0) {\n    events = events | 2;\n  }\n  pollwrap_add_fd_events(pw,fd,events);\n  return;\n}" { (declaration "uint events;" type_identifier identifier ;) (expression_statement "events = rwx & 1;" (assignment_expression "events = rwx & 1" identifier = (binary_expression "rwx & 1" identifier & number_literal)) ;) (if_statement "if (events != 0) {\n    events = 0xc1;\n  }" if (parenthesized_expression "(events != 0)" ( (binary_expression "events != 0" identifier != number_literal) )) (compound_statement "{\n    events = 0xc1;\n  }" { (expression_statement "events = 0xc1;" (assignment_expression "events = 0xc1" identifier = number_literal) ;) })) (if_statement "if ((rwx & 2U) != 0) {\n    events = events | 0x104;\n  }" if (parenthesized_expression "((rwx & 2U) != 0)" ( (binary_expression "(rwx & 2U) != 0" (parenthesized_expression "(rwx & 2U)" ( (binary_expression "rwx & 2U" identifier & number_literal) )) != number_literal) )) (compound_statement "{\n    events = events | 0x104;\n  }" { (expression_statement "events = events | 0x104;" (assignment_expression "events = events | 0x104" identifier = (binary_expression "events | 0x104" identifier | number_literal)) ;) })) (if_statement "if ((rwx & 4U) != 0) {\n    events = events | 2;\n  }" if (parenthesized_expression "((rwx & 4U) != 0)" ( (binary_expression "(rwx & 4U) != 0" (parenthesized_expression "(rwx & 4U)" ( (binary_expression "rwx & 4U" identifier & number_literal) )) != number_literal) )) (compound_statement "{\n    events = events | 2;\n  }" { (expression_statement "events = events | 2;" (assignment_expression "events = events | 2" identifier = (binary_expression "events | 2" identifier | number_literal)) ;) })) (expression_statement "pollwrap_add_fd_events(pw,fd,events);" (call_expression "pollwrap_add_fd_events(pw,fd,events)" identifier (argument_list "(pw,fd,events)" ( identifier , identifier , identifier ))) ;) (return_statement "return;" return ;) })))
(translation_unit "void pollwrap_add_fd_rwx(undefined4 param_1,undefined4 param_2,uint param_3)\n\n{\n  uint uVar1;\n  \n  uVar1 = param_3 & 1;\n  if (uVar1 != 0) {\n    uVar1 = 0xc1;\n  }\n  if ((param_3 & 2) != 0) {\n    uVar1 = uVar1 | 0x104;\n  }\n  if ((param_3 & 4) != 0) {\n    uVar1 = uVar1 | 2;\n  }\n  pollwrap_add_fd_events(param_1,param_2,uVar1);\n  return;\n}\n\n" (function_definition "void pollwrap_add_fd_rwx(undefined4 param_1,undefined4 param_2,uint param_3)\n\n{\n  uint uVar1;\n  \n  uVar1 = param_3 & 1;\n  if (uVar1 != 0) {\n    uVar1 = 0xc1;\n  }\n  if ((param_3 & 2) != 0) {\n    uVar1 = uVar1 | 0x104;\n  }\n  if ((param_3 & 4) != 0) {\n    uVar1 = uVar1 | 2;\n  }\n  pollwrap_add_fd_events(param_1,param_2,uVar1);\n  return;\n}" primitive_type (function_declarator "pollwrap_add_fd_rwx(undefined4 param_1,undefined4 param_2,uint param_3)" identifier (parameter_list "(undefined4 param_1,undefined4 param_2,uint param_3)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "undefined4 param_2" type_identifier identifier) , (parameter_declaration "uint param_3" type_identifier identifier) ))) (compound_statement "{\n  uint uVar1;\n  \n  uVar1 = param_3 & 1;\n  if (uVar1 != 0) {\n    uVar1 = 0xc1;\n  }\n  if ((param_3 & 2) != 0) {\n    uVar1 = uVar1 | 0x104;\n  }\n  if ((param_3 & 4) != 0) {\n    uVar1 = uVar1 | 2;\n  }\n  pollwrap_add_fd_events(param_1,param_2,uVar1);\n  return;\n}" { (declaration "uint uVar1;" type_identifier identifier ;) (expression_statement "uVar1 = param_3 & 1;" (assignment_expression "uVar1 = param_3 & 1" identifier = (binary_expression "param_3 & 1" identifier & number_literal)) ;) (if_statement "if (uVar1 != 0) {\n    uVar1 = 0xc1;\n  }" if (parenthesized_expression "(uVar1 != 0)" ( (binary_expression "uVar1 != 0" identifier != number_literal) )) (compound_statement "{\n    uVar1 = 0xc1;\n  }" { (expression_statement "uVar1 = 0xc1;" (assignment_expression "uVar1 = 0xc1" identifier = number_literal) ;) })) (if_statement "if ((param_3 & 2) != 0) {\n    uVar1 = uVar1 | 0x104;\n  }" if (parenthesized_expression "((param_3 & 2) != 0)" ( (binary_expression "(param_3 & 2) != 0" (parenthesized_expression "(param_3 & 2)" ( (binary_expression "param_3 & 2" identifier & number_literal) )) != number_literal) )) (compound_statement "{\n    uVar1 = uVar1 | 0x104;\n  }" { (expression_statement "uVar1 = uVar1 | 0x104;" (assignment_expression "uVar1 = uVar1 | 0x104" identifier = (binary_expression "uVar1 | 0x104" identifier | number_literal)) ;) })) (if_statement "if ((param_3 & 4) != 0) {\n    uVar1 = uVar1 | 2;\n  }" if (parenthesized_expression "((param_3 & 4) != 0)" ( (binary_expression "(param_3 & 4) != 0" (parenthesized_expression "(param_3 & 4)" ( (binary_expression "param_3 & 4" identifier & number_literal) )) != number_literal) )) (compound_statement "{\n    uVar1 = uVar1 | 2;\n  }" { (expression_statement "uVar1 = uVar1 | 2;" (assignment_expression "uVar1 = uVar1 | 2" identifier = (binary_expression "uVar1 | 2" identifier | number_literal)) ;) })) (expression_statement "pollwrap_add_fd_events(param_1,param_2,uVar1);" (call_expression "pollwrap_add_fd_events(param_1,param_2,uVar1)" identifier (argument_list "(param_1,param_2,uVar1)" ( identifier , identifier , identifier ))) ;) (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 { (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT & LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) })) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT & LIT) )) != LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT | LIT)) ;) })) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT & LIT) )) != LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT | LIT)) ;) })) (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT , IDENT ))) ;) (return_statement return ;) })))
(function_definition "void pollwrap_add_fd_rwx(undefined4 param_1,undefined4 param_2,uint param_3)\n\n{\n  uint uVar1;\n  \n  uVar1 = param_3 & 1;\n  if (uVar1 != 0) {\n    uVar1 = 0xc1;\n  }\n  if ((param_3 & 2) != 0) {\n    uVar1 = uVar1 | 0x104;\n  }\n  if ((param_3 & 4) != 0) {\n    uVar1 = uVar1 | 2;\n  }\n  pollwrap_add_fd_events(param_1,param_2,uVar1);\n  return;\n}" (primitive_type "void") (function_declarator "pollwrap_add_fd_rwx(undefined4 param_1,undefined4 param_2,uint param_3)" (identifier "pollwrap_add_fd_rwx") (parameter_list "(undefined4 param_1,undefined4 param_2,uint param_3)" (( "(") (parameter_declaration "undefined4 param_1" (type_identifier "undefined4") (identifier "param_1")) (, ",") (parameter_declaration "undefined4 param_2" (type_identifier "undefined4") (identifier "param_2")) (, ",") (parameter_declaration "uint param_3" (type_identifier "uint") (identifier "param_3")) () ")"))) (compound_statement "{\n  uint uVar1;\n  \n  uVar1 = param_3 & 1;\n  if (uVar1 != 0) {\n    uVar1 = 0xc1;\n  }\n  if ((param_3 & 2) != 0) {\n    uVar1 = uVar1 | 0x104;\n  }\n  if ((param_3 & 4) != 0) {\n    uVar1 = uVar1 | 2;\n  }\n  pollwrap_add_fd_events(param_1,param_2,uVar1);\n  return;\n}" ({ "{") (declaration "uint uVar1;" (type_identifier "uint") (identifier "uVar1") (; ";")) (expression_statement "uVar1 = param_3 & 1;" (assignment_expression "uVar1 = param_3 & 1" (identifier "uVar1") (= "=") (binary_expression "param_3 & 1" (identifier "param_3") (& "&") (number_literal "1"))) (; ";")) (if_statement "if (uVar1 != 0) {\n    uVar1 = 0xc1;\n  }" (if "if") (parenthesized_expression "(uVar1 != 0)" (( "(") (binary_expression "uVar1 != 0" (identifier "uVar1") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    uVar1 = 0xc1;\n  }" ({ "{") (expression_statement "uVar1 = 0xc1;" (assignment_expression "uVar1 = 0xc1" (identifier "uVar1") (= "=") (number_literal "0xc1")) (; ";")) (} "}"))) (if_statement "if ((param_3 & 2) != 0) {\n    uVar1 = uVar1 | 0x104;\n  }" (if "if") (parenthesized_expression "((param_3 & 2) != 0)" (( "(") (binary_expression "(param_3 & 2) != 0" (parenthesized_expression "(param_3 & 2)" (( "(") (binary_expression "param_3 & 2" (identifier "param_3") (& "&") (number_literal "2")) () ")")) (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    uVar1 = uVar1 | 0x104;\n  }" ({ "{") (expression_statement "uVar1 = uVar1 | 0x104;" (assignment_expression "uVar1 = uVar1 | 0x104" (identifier "uVar1") (= "=") (binary_expression "uVar1 | 0x104" (identifier "uVar1") (| "|") (number_literal "0x104"))) (; ";")) (} "}"))) (if_statement "if ((param_3 & 4) != 0) {\n    uVar1 = uVar1 | 2;\n  }" (if "if") (parenthesized_expression "((param_3 & 4) != 0)" (( "(") (binary_expression "(param_3 & 4) != 0" (parenthesized_expression "(param_3 & 4)" (( "(") (binary_expression "param_3 & 4" (identifier "param_3") (& "&") (number_literal "4")) () ")")) (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    uVar1 = uVar1 | 2;\n  }" ({ "{") (expression_statement "uVar1 = uVar1 | 2;" (assignment_expression "uVar1 = uVar1 | 2" (identifier "uVar1") (= "=") (binary_expression "uVar1 | 2" (identifier "uVar1") (| "|") (number_literal "2"))) (; ";")) (} "}"))) (expression_statement "pollwrap_add_fd_events(param_1,param_2,uVar1);" (call_expression "pollwrap_add_fd_events(param_1,param_2,uVar1)" (identifier "pollwrap_add_fd_events") (argument_list "(param_1,param_2,uVar1)" (( "(") (identifier "param_1") (, ",") (identifier "param_2") (, ",") (identifier "uVar1") () ")"))) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}")))

void function_1(type_1 *pw,int fd,int var_1)

{
  type_2 var_2;
  
  var_2 = var_1 & 1;
  if (var_2 != 0) {
    var_2 = 0xc1;
  }
  if ((var_1 & 2U) != 0) {
    var_2 = var_2 | 0x104;
  }
  if ((var_1 & 4U) != 0) {
    var_2 = var_2 | 2;
  }
  var_3(pw,fd,var_2);
  return;
}


(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 (declaration type: (type_identifier) declarator: (identifier)) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (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: (identifier) right: (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: (identifier) right: (number_literal)))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier) (identifier)))) (return_statement))))

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

{
  uint uVar1;
  
  uVar1 = param_3 & 1;
  if (uVar1 != 0) {
    uVar1 = 0xc1;
  }
  if ((param_3 & 2) != 0) {
    uVar1 = uVar1 | 0x104;
  }
  if ((param_3 & 4) != 0) {
    uVar1 = uVar1 | 2;
  }
  pollwrap_add_fd_events(param_1,param_2,uVar1);
  return;
}

