
int pollwrap_get_fd_rwx(pollwrapper *pw,int fd)

{
  uint uVar1;
  uint uVar2;
  
  uVar1 = pollwrap_get_fd_events(pw,fd);
  uVar2 = (uint)((uVar1 & 0xd9) != 0);
  if ((uVar1 & 0x10c) != 0) {
    uVar2 = uVar2 | 2;
  }
  if ((uVar1 & 2) != 0) {
    uVar2 = uVar2 | 4;
  }
  return uVar2;
}



byte pollwrap_get_fd_rwx(void)

{
  uint uVar1;
  byte bVar2;
  
  uVar1 = pollwrap_get_fd_events();
  bVar2 = (uVar1 & 0xd9) != 0;
  if ((uVar1 & 0x10c) != 0) {
    bVar2 = bVar2 | 2;
  }
  if ((uVar1 & 2) != 0) {
    bVar2 = bVar2 | 4;
  }
  return bVar2;
}


lui gp,0x3
addiu gp,gp,0x3e50
addu gp,gp,t9
addiu sp,sp,-0x20
lw t9,-0x782c(gp)
sw gp,0x10(sp)
sw ra,0x1c(sp)
bal 0x0008137c
_nop
andi v1,v0,0xd9
andi a0,v0,0x10c
beq a0,zero,0x00081478
_sltu v1,zero,v1
ori v1,v1,0x2
andi v0,v0,0x2
beq v0,zero,0x00081488
_lw ra,0x1c(sp)
ori v1,v1,0x4
or v0,v1,zero
jr ra
_addiu sp,sp,0x20
(translation_unit "byte pollwrap_get_fd_rwx(void)\n\n{\n  uint uVar1;\n  byte bVar2;\n  \n  uVar1 = pollwrap_get_fd_events();\n  bVar2 = (uVar1 & 0xd9) != 0;\n  if ((uVar1 & 0x10c) != 0) {\n    bVar2 = bVar2 | 2;\n  }\n  if ((uVar1 & 2) != 0) {\n    bVar2 = bVar2 | 4;\n  }\n  return bVar2;\n}\n\n" (function_definition "byte pollwrap_get_fd_rwx(void)\n\n{\n  uint uVar1;\n  byte bVar2;\n  \n  uVar1 = pollwrap_get_fd_events();\n  bVar2 = (uVar1 & 0xd9) != 0;\n  if ((uVar1 & 0x10c) != 0) {\n    bVar2 = bVar2 | 2;\n  }\n  if ((uVar1 & 2) != 0) {\n    bVar2 = bVar2 | 4;\n  }\n  return bVar2;\n}" type_identifier (function_declarator "pollwrap_get_fd_rwx(void)" identifier (parameter_list "(void)" ( (parameter_declaration "void" primitive_type) ))) (compound_statement "{\n  uint uVar1;\n  byte bVar2;\n  \n  uVar1 = pollwrap_get_fd_events();\n  bVar2 = (uVar1 & 0xd9) != 0;\n  if ((uVar1 & 0x10c) != 0) {\n    bVar2 = bVar2 | 2;\n  }\n  if ((uVar1 & 2) != 0) {\n    bVar2 = bVar2 | 4;\n  }\n  return bVar2;\n}" { (declaration "uint uVar1;" type_identifier identifier ;) (declaration "byte bVar2;" type_identifier identifier ;) (expression_statement "uVar1 = pollwrap_get_fd_events();" (assignment_expression "uVar1 = pollwrap_get_fd_events()" identifier = (call_expression "pollwrap_get_fd_events()" identifier (argument_list "()" ( )))) ;) (expression_statement "bVar2 = (uVar1 & 0xd9) != 0;" (assignment_expression "bVar2 = (uVar1 & 0xd9) != 0" identifier = (binary_expression "(uVar1 & 0xd9) != 0" (parenthesized_expression "(uVar1 & 0xd9)" ( (binary_expression "uVar1 & 0xd9" identifier & number_literal) )) != number_literal)) ;) (if_statement "if ((uVar1 & 0x10c) != 0) {\n    bVar2 = bVar2 | 2;\n  }" if (parenthesized_expression "((uVar1 & 0x10c) != 0)" ( (binary_expression "(uVar1 & 0x10c) != 0" (parenthesized_expression "(uVar1 & 0x10c)" ( (binary_expression "uVar1 & 0x10c" identifier & number_literal) )) != number_literal) )) (compound_statement "{\n    bVar2 = bVar2 | 2;\n  }" { (expression_statement "bVar2 = bVar2 | 2;" (assignment_expression "bVar2 = bVar2 | 2" identifier = (binary_expression "bVar2 | 2" identifier | number_literal)) ;) })) (if_statement "if ((uVar1 & 2) != 0) {\n    bVar2 = bVar2 | 4;\n  }" if (parenthesized_expression "((uVar1 & 2) != 0)" ( (binary_expression "(uVar1 & 2) != 0" (parenthesized_expression "(uVar1 & 2)" ( (binary_expression "uVar1 & 2" identifier & number_literal) )) != number_literal) )) (compound_statement "{\n    bVar2 = bVar2 | 4;\n  }" { (expression_statement "bVar2 = bVar2 | 4;" (assignment_expression "bVar2 = bVar2 | 4" identifier = (binary_expression "bVar2 | 4" identifier | number_literal)) ;) })) (return_statement "return bVar2;" return identifier ;) })))
(translation_unit "int pollwrap_get_fd_rwx(pollwrapper *pw,int fd)\n\n{\n  uint uVar1;\n  uint uVar2;\n  \n  uVar1 = pollwrap_get_fd_events(pw,fd);\n  uVar2 = (uint)((uVar1 & 0xd9) != 0);\n  if ((uVar1 & 0x10c) != 0) {\n    uVar2 = uVar2 | 2;\n  }\n  if ((uVar1 & 2) != 0) {\n    uVar2 = uVar2 | 4;\n  }\n  return uVar2;\n}\n\n" (function_definition "int pollwrap_get_fd_rwx(pollwrapper *pw,int fd)\n\n{\n  uint uVar1;\n  uint uVar2;\n  \n  uVar1 = pollwrap_get_fd_events(pw,fd);\n  uVar2 = (uint)((uVar1 & 0xd9) != 0);\n  if ((uVar1 & 0x10c) != 0) {\n    uVar2 = uVar2 | 2;\n  }\n  if ((uVar1 & 2) != 0) {\n    uVar2 = uVar2 | 4;\n  }\n  return uVar2;\n}" primitive_type (function_declarator "pollwrap_get_fd_rwx(pollwrapper *pw,int fd)" identifier (parameter_list "(pollwrapper *pw,int fd)" ( (parameter_declaration "pollwrapper *pw" type_identifier (pointer_declarator "*pw" * identifier)) , (parameter_declaration "int fd" primitive_type identifier) ))) (compound_statement "{\n  uint uVar1;\n  uint uVar2;\n  \n  uVar1 = pollwrap_get_fd_events(pw,fd);\n  uVar2 = (uint)((uVar1 & 0xd9) != 0);\n  if ((uVar1 & 0x10c) != 0) {\n    uVar2 = uVar2 | 2;\n  }\n  if ((uVar1 & 2) != 0) {\n    uVar2 = uVar2 | 4;\n  }\n  return uVar2;\n}" { (declaration "uint uVar1;" type_identifier identifier ;) (declaration "uint uVar2;" type_identifier identifier ;) (expression_statement "uVar1 = pollwrap_get_fd_events(pw,fd);" (assignment_expression "uVar1 = pollwrap_get_fd_events(pw,fd)" identifier = (call_expression "pollwrap_get_fd_events(pw,fd)" identifier (argument_list "(pw,fd)" ( identifier , identifier )))) ;) (expression_statement "uVar2 = (uint)((uVar1 & 0xd9) != 0);" (assignment_expression "uVar2 = (uint)((uVar1 & 0xd9) != 0)" identifier = (call_expression "(uint)((uVar1 & 0xd9) != 0)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "((uVar1 & 0xd9) != 0)" ( (binary_expression "(uVar1 & 0xd9) != 0" (parenthesized_expression "(uVar1 & 0xd9)" ( (binary_expression "uVar1 & 0xd9" identifier & number_literal) )) != number_literal) )))) ;) (if_statement "if ((uVar1 & 0x10c) != 0) {\n    uVar2 = uVar2 | 2;\n  }" if (parenthesized_expression "((uVar1 & 0x10c) != 0)" ( (binary_expression "(uVar1 & 0x10c) != 0" (parenthesized_expression "(uVar1 & 0x10c)" ( (binary_expression "uVar1 & 0x10c" identifier & number_literal) )) != number_literal) )) (compound_statement "{\n    uVar2 = uVar2 | 2;\n  }" { (expression_statement "uVar2 = uVar2 | 2;" (assignment_expression "uVar2 = uVar2 | 2" identifier = (binary_expression "uVar2 | 2" identifier | number_literal)) ;) })) (if_statement "if ((uVar1 & 2) != 0) {\n    uVar2 = uVar2 | 4;\n  }" if (parenthesized_expression "((uVar1 & 2) != 0)" ( (binary_expression "(uVar1 & 2) != 0" (parenthesized_expression "(uVar1 & 2)" ( (binary_expression "uVar1 & 2" identifier & number_literal) )) != number_literal) )) (compound_statement "{\n    uVar2 = uVar2 | 4;\n  }" { (expression_statement "uVar2 = uVar2 | 4;" (assignment_expression "uVar2 = uVar2 | 4" identifier = (binary_expression "uVar2 | 4" identifier | number_literal)) ;) })) (return_statement "return uVar2;" return identifier ;) })))
(translation_unit "byte pollwrap_get_fd_rwx(void)\n\n{\n  uint uVar1;\n  byte bVar2;\n  \n  uVar1 = pollwrap_get_fd_events();\n  bVar2 = (uVar1 & 0xd9) != 0;\n  if ((uVar1 & 0x10c) != 0) {\n    bVar2 = bVar2 | 2;\n  }\n  if ((uVar1 & 2) != 0) {\n    bVar2 = bVar2 | 4;\n  }\n  return bVar2;\n}\n\n" (function_definition "byte pollwrap_get_fd_rwx(void)\n\n{\n  uint uVar1;\n  byte bVar2;\n  \n  uVar1 = pollwrap_get_fd_events();\n  bVar2 = (uVar1 & 0xd9) != 0;\n  if ((uVar1 & 0x10c) != 0) {\n    bVar2 = bVar2 | 2;\n  }\n  if ((uVar1 & 2) != 0) {\n    bVar2 = bVar2 | 4;\n  }\n  return bVar2;\n}" type_identifier (function_declarator "pollwrap_get_fd_rwx(void)" identifier (parameter_list "(void)" ( (parameter_declaration "void" primitive_type) ))) (compound_statement "{\n  uint uVar1;\n  byte bVar2;\n  \n  uVar1 = pollwrap_get_fd_events();\n  bVar2 = (uVar1 & 0xd9) != 0;\n  if ((uVar1 & 0x10c) != 0) {\n    bVar2 = bVar2 | 2;\n  }\n  if ((uVar1 & 2) != 0) {\n    bVar2 = bVar2 | 4;\n  }\n  return bVar2;\n}" { (declaration "uint uVar1;" type_identifier identifier ;) (declaration "byte bVar2;" type_identifier identifier ;) (expression_statement "uVar1 = pollwrap_get_fd_events();" (assignment_expression "uVar1 = pollwrap_get_fd_events()" identifier = (call_expression "pollwrap_get_fd_events()" identifier (argument_list "()" ( )))) ;) (expression_statement "bVar2 = (uVar1 & 0xd9) != 0;" (assignment_expression "bVar2 = (uVar1 & 0xd9) != 0" identifier = (binary_expression "(uVar1 & 0xd9) != 0" (parenthesized_expression "(uVar1 & 0xd9)" ( (binary_expression "uVar1 & 0xd9" identifier & number_literal) )) != number_literal)) ;) (if_statement "if ((uVar1 & 0x10c) != 0) {\n    bVar2 = bVar2 | 2;\n  }" if (parenthesized_expression "((uVar1 & 0x10c) != 0)" ( (binary_expression "(uVar1 & 0x10c) != 0" (parenthesized_expression "(uVar1 & 0x10c)" ( (binary_expression "uVar1 & 0x10c" identifier & number_literal) )) != number_literal) )) (compound_statement "{\n    bVar2 = bVar2 | 2;\n  }" { (expression_statement "bVar2 = bVar2 | 2;" (assignment_expression "bVar2 = bVar2 | 2" identifier = (binary_expression "bVar2 | 2" identifier | number_literal)) ;) })) (if_statement "if ((uVar1 & 2) != 0) {\n    bVar2 = bVar2 | 4;\n  }" if (parenthesized_expression "((uVar1 & 2) != 0)" ( (binary_expression "(uVar1 & 2) != 0" (parenthesized_expression "(uVar1 & 2)" ( (binary_expression "uVar1 & 2" identifier & number_literal) )) != number_literal) )) (compound_statement "{\n    bVar2 = bVar2 | 4;\n  }" { (expression_statement "bVar2 = bVar2 | 4;" (assignment_expression "bVar2 = bVar2 | 4" identifier = (binary_expression "bVar2 | 4" identifier | number_literal)) ;) })) (return_statement "return bVar2;" return identifier ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (expression_statement (assignment_expression IDENT = (binary_expression (parenthesized_expression ( (binary_expression IDENT & LIT) )) != 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)) ;) })) (return_statement return IDENT ;) })))
(function_definition "byte pollwrap_get_fd_rwx(void)\n\n{\n  uint uVar1;\n  byte bVar2;\n  \n  uVar1 = pollwrap_get_fd_events();\n  bVar2 = (uVar1 & 0xd9) != 0;\n  if ((uVar1 & 0x10c) != 0) {\n    bVar2 = bVar2 | 2;\n  }\n  if ((uVar1 & 2) != 0) {\n    bVar2 = bVar2 | 4;\n  }\n  return bVar2;\n}" (type_identifier "byte") (function_declarator "pollwrap_get_fd_rwx(void)" (identifier "pollwrap_get_fd_rwx") (parameter_list "(void)" (( "(") (parameter_declaration "void" (primitive_type "void")) () ")"))) (compound_statement "{\n  uint uVar1;\n  byte bVar2;\n  \n  uVar1 = pollwrap_get_fd_events();\n  bVar2 = (uVar1 & 0xd9) != 0;\n  if ((uVar1 & 0x10c) != 0) {\n    bVar2 = bVar2 | 2;\n  }\n  if ((uVar1 & 2) != 0) {\n    bVar2 = bVar2 | 4;\n  }\n  return bVar2;\n}" ({ "{") (declaration "uint uVar1;" (type_identifier "uint") (identifier "uVar1") (; ";")) (declaration "byte bVar2;" (type_identifier "byte") (identifier "bVar2") (; ";")) (expression_statement "uVar1 = pollwrap_get_fd_events();" (assignment_expression "uVar1 = pollwrap_get_fd_events()" (identifier "uVar1") (= "=") (call_expression "pollwrap_get_fd_events()" (identifier "pollwrap_get_fd_events") (argument_list "()" (( "(") () ")")))) (; ";")) (expression_statement "bVar2 = (uVar1 & 0xd9) != 0;" (assignment_expression "bVar2 = (uVar1 & 0xd9) != 0" (identifier "bVar2") (= "=") (binary_expression "(uVar1 & 0xd9) != 0" (parenthesized_expression "(uVar1 & 0xd9)" (( "(") (binary_expression "uVar1 & 0xd9" (identifier "uVar1") (& "&") (number_literal "0xd9")) () ")")) (!= "!=") (number_literal "0"))) (; ";")) (if_statement "if ((uVar1 & 0x10c) != 0) {\n    bVar2 = bVar2 | 2;\n  }" (if "if") (parenthesized_expression "((uVar1 & 0x10c) != 0)" (( "(") (binary_expression "(uVar1 & 0x10c) != 0" (parenthesized_expression "(uVar1 & 0x10c)" (( "(") (binary_expression "uVar1 & 0x10c" (identifier "uVar1") (& "&") (number_literal "0x10c")) () ")")) (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    bVar2 = bVar2 | 2;\n  }" ({ "{") (expression_statement "bVar2 = bVar2 | 2;" (assignment_expression "bVar2 = bVar2 | 2" (identifier "bVar2") (= "=") (binary_expression "bVar2 | 2" (identifier "bVar2") (| "|") (number_literal "2"))) (; ";")) (} "}"))) (if_statement "if ((uVar1 & 2) != 0) {\n    bVar2 = bVar2 | 4;\n  }" (if "if") (parenthesized_expression "((uVar1 & 2) != 0)" (( "(") (binary_expression "(uVar1 & 2) != 0" (parenthesized_expression "(uVar1 & 2)" (( "(") (binary_expression "uVar1 & 2" (identifier "uVar1") (& "&") (number_literal "2")) () ")")) (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    bVar2 = bVar2 | 4;\n  }" ({ "{") (expression_statement "bVar2 = bVar2 | 4;" (assignment_expression "bVar2 = bVar2 | 4" (identifier "bVar2") (= "=") (binary_expression "bVar2 | 4" (identifier "bVar2") (| "|") (number_literal "4"))) (; ";")) (} "}"))) (return_statement "return bVar2;" (return "return") (identifier "bVar2") (; ";")) (} "}")))
(translation_unit (function_definition type: (type_identifier) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (primitive_type)))) body: (compound_statement (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list)))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) 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)))))) (return_statement (identifier)))))

byte MASKED(void)

{
  uint uVar1;
  byte bVar2;
  
  uVar1 = pollwrap_get_fd_events();
  bVar2 = (uVar1 & 0xd9) != 0;
  if ((uVar1 & 0x10c) != 0) {
    bVar2 = bVar2 | 2;
  }
  if ((uVar1 & 2) != 0) {
    bVar2 = bVar2 | 4;
  }
  return bVar2;
}

