
/* WARNING: Unknown calling convention */

termios * ttattr(int fd)

{
  if (*(int *)(PTR___environ_00145154 + -0x65c0) == 0) {
    return (termios *)0x0;
  }
  if (fd != 0) {
    if (fd == 1) {
      return (termios *)(PTR___environ_00145154 + -0x65bc);
    }
    return (termios *)0x0;
  }
  return (termios *)(PTR___environ_00145154 + -0x6588);
}



undefined * ttattr(int param_1)

{
  if (*(int *)(PTR___environ_00145154 + -0x65c0) == 0) {
    return (undefined *)0x0;
  }
  if (param_1 != 0) {
    if (param_1 == 1) {
      return PTR___environ_00145154 + -0x65bc;
    }
    return (undefined *)0x0;
  }
  return PTR___environ_00145154 + -0x6588;
}


lui gp,0x7
addiu gp,gp,0x5988
addu gp,gp,t9
lw v0,-0x73ec(gp)
lw v0,-0x65c0(v0)
beq v0,zero,0x000d6c04
_nop
beq a0,zero,0x000d6bfc
_lw v0,-0x73ec(gp)
li v0,0x1
bne a0,v0,0x000d6bf4
_nop
lw v0,-0x73ec(gp)
jr ra
_addiu v0,v0,-0x65bc
jr ra
_or v0,zero,zero
jr ra
_addiu v0,v0,-0x6588
jr ra
_or v0,zero,zero
(translation_unit "undefined * ttattr(int param_1)\n\n{\n  if (*(int *)(PTR___environ_00145154 + -0x65c0) == 0) {\n    return (undefined *)0x0;\n  }\n  if (param_1 != 0) {\n    if (param_1 == 1) {\n      return PTR___environ_00145154 + -0x65bc;\n    }\n    return (undefined *)0x0;\n  }\n  return PTR___environ_00145154 + -0x6588;\n}\n\n" (function_definition "undefined * ttattr(int param_1)\n\n{\n  if (*(int *)(PTR___environ_00145154 + -0x65c0) == 0) {\n    return (undefined *)0x0;\n  }\n  if (param_1 != 0) {\n    if (param_1 == 1) {\n      return PTR___environ_00145154 + -0x65bc;\n    }\n    return (undefined *)0x0;\n  }\n  return PTR___environ_00145154 + -0x6588;\n}" type_identifier (pointer_declarator "* ttattr(int param_1)" * (function_declarator "ttattr(int param_1)" identifier (parameter_list "(int param_1)" ( (parameter_declaration "int param_1" primitive_type identifier) )))) (compound_statement "{\n  if (*(int *)(PTR___environ_00145154 + -0x65c0) == 0) {\n    return (undefined *)0x0;\n  }\n  if (param_1 != 0) {\n    if (param_1 == 1) {\n      return PTR___environ_00145154 + -0x65bc;\n    }\n    return (undefined *)0x0;\n  }\n  return PTR___environ_00145154 + -0x6588;\n}" { (if_statement "if (*(int *)(PTR___environ_00145154 + -0x65c0) == 0) {\n    return (undefined *)0x0;\n  }" if (parenthesized_expression "(*(int *)(PTR___environ_00145154 + -0x65c0) == 0)" ( (binary_expression "*(int *)(PTR___environ_00145154 + -0x65c0) == 0" (pointer_expression "*(int *)(PTR___environ_00145154 + -0x65c0)" * (cast_expression "(int *)(PTR___environ_00145154 + -0x65c0)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(PTR___environ_00145154 + -0x65c0)" ( (binary_expression "PTR___environ_00145154 + -0x65c0" identifier + number_literal) )))) == number_literal) )) (compound_statement "{\n    return (undefined *)0x0;\n  }" { (return_statement "return (undefined *)0x0;" return (cast_expression "(undefined *)0x0" ( (type_descriptor "undefined *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal) ;) })) (if_statement "if (param_1 != 0) {\n    if (param_1 == 1) {\n      return PTR___environ_00145154 + -0x65bc;\n    }\n    return (undefined *)0x0;\n  }" if (parenthesized_expression "(param_1 != 0)" ( (binary_expression "param_1 != 0" identifier != number_literal) )) (compound_statement "{\n    if (param_1 == 1) {\n      return PTR___environ_00145154 + -0x65bc;\n    }\n    return (undefined *)0x0;\n  }" { (if_statement "if (param_1 == 1) {\n      return PTR___environ_00145154 + -0x65bc;\n    }" if (parenthesized_expression "(param_1 == 1)" ( (binary_expression "param_1 == 1" identifier == number_literal) )) (compound_statement "{\n      return PTR___environ_00145154 + -0x65bc;\n    }" { (return_statement "return PTR___environ_00145154 + -0x65bc;" return (binary_expression "PTR___environ_00145154 + -0x65bc" identifier + number_literal) ;) })) (return_statement "return (undefined *)0x0;" return (cast_expression "(undefined *)0x0" ( (type_descriptor "undefined *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal) ;) })) (return_statement "return PTR___environ_00145154 + -0x6588;" return (binary_expression "PTR___environ_00145154 + -0x6588" identifier + number_literal) ;) })))
(translation_unit "/* WARNING: Unknown calling convention */\n\ntermios * ttattr(int fd)\n\n{\n  if (*(int *)(PTR___environ_00145154 + -0x65c0) == 0) {\n    return (termios *)0x0;\n  }\n  if (fd != 0) {\n    if (fd == 1) {\n      return (termios *)(PTR___environ_00145154 + -0x65bc);\n    }\n    return (termios *)0x0;\n  }\n  return (termios *)(PTR___environ_00145154 + -0x6588);\n}\n\n" comment (function_definition "termios * ttattr(int fd)\n\n{\n  if (*(int *)(PTR___environ_00145154 + -0x65c0) == 0) {\n    return (termios *)0x0;\n  }\n  if (fd != 0) {\n    if (fd == 1) {\n      return (termios *)(PTR___environ_00145154 + -0x65bc);\n    }\n    return (termios *)0x0;\n  }\n  return (termios *)(PTR___environ_00145154 + -0x6588);\n}" type_identifier (pointer_declarator "* ttattr(int fd)" * (function_declarator "ttattr(int fd)" identifier (parameter_list "(int fd)" ( (parameter_declaration "int fd" primitive_type identifier) )))) (compound_statement "{\n  if (*(int *)(PTR___environ_00145154 + -0x65c0) == 0) {\n    return (termios *)0x0;\n  }\n  if (fd != 0) {\n    if (fd == 1) {\n      return (termios *)(PTR___environ_00145154 + -0x65bc);\n    }\n    return (termios *)0x0;\n  }\n  return (termios *)(PTR___environ_00145154 + -0x6588);\n}" { (if_statement "if (*(int *)(PTR___environ_00145154 + -0x65c0) == 0) {\n    return (termios *)0x0;\n  }" if (parenthesized_expression "(*(int *)(PTR___environ_00145154 + -0x65c0) == 0)" ( (binary_expression "*(int *)(PTR___environ_00145154 + -0x65c0) == 0" (pointer_expression "*(int *)(PTR___environ_00145154 + -0x65c0)" * (cast_expression "(int *)(PTR___environ_00145154 + -0x65c0)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(PTR___environ_00145154 + -0x65c0)" ( (binary_expression "PTR___environ_00145154 + -0x65c0" identifier + number_literal) )))) == number_literal) )) (compound_statement "{\n    return (termios *)0x0;\n  }" { (return_statement "return (termios *)0x0;" return (cast_expression "(termios *)0x0" ( (type_descriptor "termios *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal) ;) })) (if_statement "if (fd != 0) {\n    if (fd == 1) {\n      return (termios *)(PTR___environ_00145154 + -0x65bc);\n    }\n    return (termios *)0x0;\n  }" if (parenthesized_expression "(fd != 0)" ( (binary_expression "fd != 0" identifier != number_literal) )) (compound_statement "{\n    if (fd == 1) {\n      return (termios *)(PTR___environ_00145154 + -0x65bc);\n    }\n    return (termios *)0x0;\n  }" { (if_statement "if (fd == 1) {\n      return (termios *)(PTR___environ_00145154 + -0x65bc);\n    }" if (parenthesized_expression "(fd == 1)" ( (binary_expression "fd == 1" identifier == number_literal) )) (compound_statement "{\n      return (termios *)(PTR___environ_00145154 + -0x65bc);\n    }" { (return_statement "return (termios *)(PTR___environ_00145154 + -0x65bc);" return (cast_expression "(termios *)(PTR___environ_00145154 + -0x65bc)" ( (type_descriptor "termios *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(PTR___environ_00145154 + -0x65bc)" ( (binary_expression "PTR___environ_00145154 + -0x65bc" identifier + number_literal) ))) ;) })) (return_statement "return (termios *)0x0;" return (cast_expression "(termios *)0x0" ( (type_descriptor "termios *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal) ;) })) (return_statement "return (termios *)(PTR___environ_00145154 + -0x6588);" return (cast_expression "(termios *)(PTR___environ_00145154 + -0x6588)" ( (type_descriptor "termios *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(PTR___environ_00145154 + -0x6588)" ( (binary_expression "PTR___environ_00145154 + -0x6588" identifier + number_literal) ))) ;) })))
(translation_unit "undefined * ttattr(int param_1)\n\n{\n  if (*(int *)(PTR___environ_00145154 + -0x65c0) == 0) {\n    return (undefined *)0x0;\n  }\n  if (param_1 != 0) {\n    if (param_1 == 1) {\n      return PTR___environ_00145154 + -0x65bc;\n    }\n    return (undefined *)0x0;\n  }\n  return PTR___environ_00145154 + -0x6588;\n}\n\n" (function_definition "undefined * ttattr(int param_1)\n\n{\n  if (*(int *)(PTR___environ_00145154 + -0x65c0) == 0) {\n    return (undefined *)0x0;\n  }\n  if (param_1 != 0) {\n    if (param_1 == 1) {\n      return PTR___environ_00145154 + -0x65bc;\n    }\n    return (undefined *)0x0;\n  }\n  return PTR___environ_00145154 + -0x6588;\n}" type_identifier (pointer_declarator "* ttattr(int param_1)" * (function_declarator "ttattr(int param_1)" identifier (parameter_list "(int param_1)" ( (parameter_declaration "int param_1" primitive_type identifier) )))) (compound_statement "{\n  if (*(int *)(PTR___environ_00145154 + -0x65c0) == 0) {\n    return (undefined *)0x0;\n  }\n  if (param_1 != 0) {\n    if (param_1 == 1) {\n      return PTR___environ_00145154 + -0x65bc;\n    }\n    return (undefined *)0x0;\n  }\n  return PTR___environ_00145154 + -0x6588;\n}" { (if_statement "if (*(int *)(PTR___environ_00145154 + -0x65c0) == 0) {\n    return (undefined *)0x0;\n  }" if (parenthesized_expression "(*(int *)(PTR___environ_00145154 + -0x65c0) == 0)" ( (binary_expression "*(int *)(PTR___environ_00145154 + -0x65c0) == 0" (pointer_expression "*(int *)(PTR___environ_00145154 + -0x65c0)" * (cast_expression "(int *)(PTR___environ_00145154 + -0x65c0)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(PTR___environ_00145154 + -0x65c0)" ( (binary_expression "PTR___environ_00145154 + -0x65c0" identifier + number_literal) )))) == number_literal) )) (compound_statement "{\n    return (undefined *)0x0;\n  }" { (return_statement "return (undefined *)0x0;" return (cast_expression "(undefined *)0x0" ( (type_descriptor "undefined *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal) ;) })) (if_statement "if (param_1 != 0) {\n    if (param_1 == 1) {\n      return PTR___environ_00145154 + -0x65bc;\n    }\n    return (undefined *)0x0;\n  }" if (parenthesized_expression "(param_1 != 0)" ( (binary_expression "param_1 != 0" identifier != number_literal) )) (compound_statement "{\n    if (param_1 == 1) {\n      return PTR___environ_00145154 + -0x65bc;\n    }\n    return (undefined *)0x0;\n  }" { (if_statement "if (param_1 == 1) {\n      return PTR___environ_00145154 + -0x65bc;\n    }" if (parenthesized_expression "(param_1 == 1)" ( (binary_expression "param_1 == 1" identifier == number_literal) )) (compound_statement "{\n      return PTR___environ_00145154 + -0x65bc;\n    }" { (return_statement "return PTR___environ_00145154 + -0x65bc;" return (binary_expression "PTR___environ_00145154 + -0x65bc" identifier + number_literal) ;) })) (return_statement "return (undefined *)0x0;" return (cast_expression "(undefined *)0x0" ( (type_descriptor "undefined *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal) ;) })) (return_statement "return PTR___environ_00145154 + -0x6588;" return (binary_expression "PTR___environ_00145154 + -0x6588" identifier + number_literal) ;) })))
(translation_unit (function_definition TYPE (pointer_declarator * (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) )))) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) == LIT) )) (compound_statement { (return_statement return (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT) ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (return_statement return (binary_expression IDENT + LIT) ;) })) (return_statement return (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT) ;) })) (return_statement return (binary_expression IDENT + LIT) ;) })))
(function_definition "undefined * ttattr(int param_1)\n\n{\n  if (*(int *)(PTR___environ_00145154 + -0x65c0) == 0) {\n    return (undefined *)0x0;\n  }\n  if (param_1 != 0) {\n    if (param_1 == 1) {\n      return PTR___environ_00145154 + -0x65bc;\n    }\n    return (undefined *)0x0;\n  }\n  return PTR___environ_00145154 + -0x6588;\n}" (type_identifier "undefined") (pointer_declarator "* ttattr(int param_1)" (* "*") (function_declarator "ttattr(int param_1)" (identifier "ttattr") (parameter_list "(int param_1)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) () ")")))) (compound_statement "{\n  if (*(int *)(PTR___environ_00145154 + -0x65c0) == 0) {\n    return (undefined *)0x0;\n  }\n  if (param_1 != 0) {\n    if (param_1 == 1) {\n      return PTR___environ_00145154 + -0x65bc;\n    }\n    return (undefined *)0x0;\n  }\n  return PTR___environ_00145154 + -0x6588;\n}" ({ "{") (if_statement "if (*(int *)(PTR___environ_00145154 + -0x65c0) == 0) {\n    return (undefined *)0x0;\n  }" (if "if") (parenthesized_expression "(*(int *)(PTR___environ_00145154 + -0x65c0) == 0)" (( "(") (binary_expression "*(int *)(PTR___environ_00145154 + -0x65c0) == 0" (pointer_expression "*(int *)(PTR___environ_00145154 + -0x65c0)" (* "*") (cast_expression "(int *)(PTR___environ_00145154 + -0x65c0)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(PTR___environ_00145154 + -0x65c0)" (( "(") (binary_expression "PTR___environ_00145154 + -0x65c0" (identifier "PTR___environ_00145154") (+ "+") (number_literal "-0x65c0")) () ")")))) (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    return (undefined *)0x0;\n  }" ({ "{") (return_statement "return (undefined *)0x0;" (return "return") (cast_expression "(undefined *)0x0" (( "(") (type_descriptor "undefined *" (type_identifier "undefined") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0")) (; ";")) (} "}"))) (if_statement "if (param_1 != 0) {\n    if (param_1 == 1) {\n      return PTR___environ_00145154 + -0x65bc;\n    }\n    return (undefined *)0x0;\n  }" (if "if") (parenthesized_expression "(param_1 != 0)" (( "(") (binary_expression "param_1 != 0" (identifier "param_1") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    if (param_1 == 1) {\n      return PTR___environ_00145154 + -0x65bc;\n    }\n    return (undefined *)0x0;\n  }" ({ "{") (if_statement "if (param_1 == 1) {\n      return PTR___environ_00145154 + -0x65bc;\n    }" (if "if") (parenthesized_expression "(param_1 == 1)" (( "(") (binary_expression "param_1 == 1" (identifier "param_1") (== "==") (number_literal "1")) () ")")) (compound_statement "{\n      return PTR___environ_00145154 + -0x65bc;\n    }" ({ "{") (return_statement "return PTR___environ_00145154 + -0x65bc;" (return "return") (binary_expression "PTR___environ_00145154 + -0x65bc" (identifier "PTR___environ_00145154") (+ "+") (number_literal "-0x65bc")) (; ";")) (} "}"))) (return_statement "return (undefined *)0x0;" (return "return") (cast_expression "(undefined *)0x0" (( "(") (type_descriptor "undefined *" (type_identifier "undefined") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0")) (; ";")) (} "}"))) (return_statement "return PTR___environ_00145154 + -0x6588;" (return "return") (binary_expression "PTR___environ_00145154 + -0x6588" (identifier "PTR___environ_00145154") (+ "+") (number_literal "-0x6588")) (; ";")) (} "}")))

/* WARNING: Unknown calling convention */

type_1 * function_1(int var_2)

{
  if (*(int *)(var_1 + -0x65c0) == 0) {
    return (type_1 *)0x0;
  }
  if (var_2 != 0) {
    if (var_2 == 1) {
      return (type_1 *)(var_1 + -0x65bc);
    }
    return (type_1 *)0x0;
  }
  return (type_1 *)(var_1 + -0x6588);
}


(translation_unit (function_definition type: (type_identifier) declarator: (pointer_declarator declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (primitive_type) declarator: (identifier))))) body: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (number_literal))) consequence: (compound_statement (return_statement (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (number_literal))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (return_statement (binary_expression left: (identifier) right: (number_literal))))) (return_statement (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (number_literal))))) (return_statement (binary_expression left: (identifier) right: (number_literal))))))

undefined * MASKED(int param_1)

{
  if (*(int *)(PTR___environ_00145154 + -0x65c0) == 0) {
    return (undefined *)0x0;
  }
  if (param_1 != 0) {
    if (param_1 == 1) {
      return PTR___environ_00145154 + -0x65bc;
    }
    return (undefined *)0x0;
  }
  return PTR___environ_00145154 + -0x6588;
}

