
/* WARNING: Unknown calling convention */

pid_t coproc_active(void)

{
  if ((*(uint *)(PTR_sh_coproc_00144c5c + 0x18) & 2) == 0) {
    return *(pid_t *)(PTR_sh_coproc_00144c5c + 4);
  }
  return -1;
}



undefined4 coproc_active(void)

{
  if ((*(uint *)(PTR_sh_coproc_00144c5c + 0x18) & 2) == 0) {
    return *(undefined4 *)(PTR_sh_coproc_00144c5c + 4);
  }
  return 0xffffffff;
}


lui gp,0x10
addiu gp,gp,0x221c
addu gp,gp,t9
lw v1,-0x78e4(gp)
lw v0,0x18(v1)
andi v0,v0,0x2
bne v0,zero,0x0004a34c
_nop
jr ra
_lw v0,0x4(v1)
jr ra
_li v0,-0x1
(translation_unit "undefined4 coproc_active(void)\n\n{\n  if ((*(uint *)(PTR_sh_coproc_00144c5c + 0x18) & 2) == 0) {\n    return *(undefined4 *)(PTR_sh_coproc_00144c5c + 4);\n  }\n  return 0xffffffff;\n}\n\n" (function_definition "undefined4 coproc_active(void)\n\n{\n  if ((*(uint *)(PTR_sh_coproc_00144c5c + 0x18) & 2) == 0) {\n    return *(undefined4 *)(PTR_sh_coproc_00144c5c + 4);\n  }\n  return 0xffffffff;\n}" type_identifier (function_declarator "coproc_active(void)" identifier (parameter_list "(void)" ( (parameter_declaration "void" primitive_type) ))) (compound_statement "{\n  if ((*(uint *)(PTR_sh_coproc_00144c5c + 0x18) & 2) == 0) {\n    return *(undefined4 *)(PTR_sh_coproc_00144c5c + 4);\n  }\n  return 0xffffffff;\n}" { (if_statement "if ((*(uint *)(PTR_sh_coproc_00144c5c + 0x18) & 2) == 0) {\n    return *(undefined4 *)(PTR_sh_coproc_00144c5c + 4);\n  }" if (parenthesized_expression "((*(uint *)(PTR_sh_coproc_00144c5c + 0x18) & 2) == 0)" ( (binary_expression "(*(uint *)(PTR_sh_coproc_00144c5c + 0x18) & 2) == 0" (parenthesized_expression "(*(uint *)(PTR_sh_coproc_00144c5c + 0x18) & 2)" ( (binary_expression "*(uint *)(PTR_sh_coproc_00144c5c + 0x18) & 2" (pointer_expression "*(uint *)(PTR_sh_coproc_00144c5c + 0x18)" * (cast_expression "(uint *)(PTR_sh_coproc_00144c5c + 0x18)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(PTR_sh_coproc_00144c5c + 0x18)" ( (binary_expression "PTR_sh_coproc_00144c5c + 0x18" identifier + number_literal) )))) & number_literal) )) == number_literal) )) (compound_statement "{\n    return *(undefined4 *)(PTR_sh_coproc_00144c5c + 4);\n  }" { (return_statement "return *(undefined4 *)(PTR_sh_coproc_00144c5c + 4);" return (pointer_expression "*(undefined4 *)(PTR_sh_coproc_00144c5c + 4)" * (cast_expression "(undefined4 *)(PTR_sh_coproc_00144c5c + 4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(PTR_sh_coproc_00144c5c + 4)" ( (binary_expression "PTR_sh_coproc_00144c5c + 4" identifier + number_literal) )))) ;) })) (return_statement "return 0xffffffff;" return number_literal ;) })))
(translation_unit "/* WARNING: Unknown calling convention */\n\npid_t coproc_active(void)\n\n{\n  if ((*(uint *)(PTR_sh_coproc_00144c5c + 0x18) & 2) == 0) {\n    return *(pid_t *)(PTR_sh_coproc_00144c5c + 4);\n  }\n  return -1;\n}\n\n" comment (function_definition "pid_t coproc_active(void)\n\n{\n  if ((*(uint *)(PTR_sh_coproc_00144c5c + 0x18) & 2) == 0) {\n    return *(pid_t *)(PTR_sh_coproc_00144c5c + 4);\n  }\n  return -1;\n}" type_identifier (function_declarator "coproc_active(void)" identifier (parameter_list "(void)" ( (parameter_declaration "void" primitive_type) ))) (compound_statement "{\n  if ((*(uint *)(PTR_sh_coproc_00144c5c + 0x18) & 2) == 0) {\n    return *(pid_t *)(PTR_sh_coproc_00144c5c + 4);\n  }\n  return -1;\n}" { (if_statement "if ((*(uint *)(PTR_sh_coproc_00144c5c + 0x18) & 2) == 0) {\n    return *(pid_t *)(PTR_sh_coproc_00144c5c + 4);\n  }" if (parenthesized_expression "((*(uint *)(PTR_sh_coproc_00144c5c + 0x18) & 2) == 0)" ( (binary_expression "(*(uint *)(PTR_sh_coproc_00144c5c + 0x18) & 2) == 0" (parenthesized_expression "(*(uint *)(PTR_sh_coproc_00144c5c + 0x18) & 2)" ( (binary_expression "*(uint *)(PTR_sh_coproc_00144c5c + 0x18) & 2" (pointer_expression "*(uint *)(PTR_sh_coproc_00144c5c + 0x18)" * (cast_expression "(uint *)(PTR_sh_coproc_00144c5c + 0x18)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(PTR_sh_coproc_00144c5c + 0x18)" ( (binary_expression "PTR_sh_coproc_00144c5c + 0x18" identifier + number_literal) )))) & number_literal) )) == number_literal) )) (compound_statement "{\n    return *(pid_t *)(PTR_sh_coproc_00144c5c + 4);\n  }" { (return_statement "return *(pid_t *)(PTR_sh_coproc_00144c5c + 4);" return (pointer_expression "*(pid_t *)(PTR_sh_coproc_00144c5c + 4)" * (cast_expression "(pid_t *)(PTR_sh_coproc_00144c5c + 4)" ( (type_descriptor "pid_t *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(PTR_sh_coproc_00144c5c + 4)" ( (binary_expression "PTR_sh_coproc_00144c5c + 4" identifier + number_literal) )))) ;) })) (return_statement "return -1;" return number_literal ;) })))
(translation_unit "undefined4 coproc_active(void)\n\n{\n  if ((*(uint *)(PTR_sh_coproc_00144c5c + 0x18) & 2) == 0) {\n    return *(undefined4 *)(PTR_sh_coproc_00144c5c + 4);\n  }\n  return 0xffffffff;\n}\n\n" (function_definition "undefined4 coproc_active(void)\n\n{\n  if ((*(uint *)(PTR_sh_coproc_00144c5c + 0x18) & 2) == 0) {\n    return *(undefined4 *)(PTR_sh_coproc_00144c5c + 4);\n  }\n  return 0xffffffff;\n}" type_identifier (function_declarator "coproc_active(void)" identifier (parameter_list "(void)" ( (parameter_declaration "void" primitive_type) ))) (compound_statement "{\n  if ((*(uint *)(PTR_sh_coproc_00144c5c + 0x18) & 2) == 0) {\n    return *(undefined4 *)(PTR_sh_coproc_00144c5c + 4);\n  }\n  return 0xffffffff;\n}" { (if_statement "if ((*(uint *)(PTR_sh_coproc_00144c5c + 0x18) & 2) == 0) {\n    return *(undefined4 *)(PTR_sh_coproc_00144c5c + 4);\n  }" if (parenthesized_expression "((*(uint *)(PTR_sh_coproc_00144c5c + 0x18) & 2) == 0)" ( (binary_expression "(*(uint *)(PTR_sh_coproc_00144c5c + 0x18) & 2) == 0" (parenthesized_expression "(*(uint *)(PTR_sh_coproc_00144c5c + 0x18) & 2)" ( (binary_expression "*(uint *)(PTR_sh_coproc_00144c5c + 0x18) & 2" (pointer_expression "*(uint *)(PTR_sh_coproc_00144c5c + 0x18)" * (cast_expression "(uint *)(PTR_sh_coproc_00144c5c + 0x18)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(PTR_sh_coproc_00144c5c + 0x18)" ( (binary_expression "PTR_sh_coproc_00144c5c + 0x18" identifier + number_literal) )))) & number_literal) )) == number_literal) )) (compound_statement "{\n    return *(undefined4 *)(PTR_sh_coproc_00144c5c + 4);\n  }" { (return_statement "return *(undefined4 *)(PTR_sh_coproc_00144c5c + 4);" return (pointer_expression "*(undefined4 *)(PTR_sh_coproc_00144c5c + 4)" * (cast_expression "(undefined4 *)(PTR_sh_coproc_00144c5c + 4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(PTR_sh_coproc_00144c5c + 4)" ( (binary_expression "PTR_sh_coproc_00144c5c + 4" identifier + number_literal) )))) ;) })) (return_statement "return 0xffffffff;" return number_literal ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE) ))) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) & LIT) )) == LIT) )) (compound_statement { (return_statement return (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) ;) })) (return_statement return LIT ;) })))
(function_definition "undefined4 coproc_active(void)\n\n{\n  if ((*(uint *)(PTR_sh_coproc_00144c5c + 0x18) & 2) == 0) {\n    return *(undefined4 *)(PTR_sh_coproc_00144c5c + 4);\n  }\n  return 0xffffffff;\n}" (type_identifier "undefined4") (function_declarator "coproc_active(void)" (identifier "coproc_active") (parameter_list "(void)" (( "(") (parameter_declaration "void" (primitive_type "void")) () ")"))) (compound_statement "{\n  if ((*(uint *)(PTR_sh_coproc_00144c5c + 0x18) & 2) == 0) {\n    return *(undefined4 *)(PTR_sh_coproc_00144c5c + 4);\n  }\n  return 0xffffffff;\n}" ({ "{") (if_statement "if ((*(uint *)(PTR_sh_coproc_00144c5c + 0x18) & 2) == 0) {\n    return *(undefined4 *)(PTR_sh_coproc_00144c5c + 4);\n  }" (if "if") (parenthesized_expression "((*(uint *)(PTR_sh_coproc_00144c5c + 0x18) & 2) == 0)" (( "(") (binary_expression "(*(uint *)(PTR_sh_coproc_00144c5c + 0x18) & 2) == 0" (parenthesized_expression "(*(uint *)(PTR_sh_coproc_00144c5c + 0x18) & 2)" (( "(") (binary_expression "*(uint *)(PTR_sh_coproc_00144c5c + 0x18) & 2" (pointer_expression "*(uint *)(PTR_sh_coproc_00144c5c + 0x18)" (* "*") (cast_expression "(uint *)(PTR_sh_coproc_00144c5c + 0x18)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(PTR_sh_coproc_00144c5c + 0x18)" (( "(") (binary_expression "PTR_sh_coproc_00144c5c + 0x18" (identifier "PTR_sh_coproc_00144c5c") (+ "+") (number_literal "0x18")) () ")")))) (& "&") (number_literal "2")) () ")")) (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    return *(undefined4 *)(PTR_sh_coproc_00144c5c + 4);\n  }" ({ "{") (return_statement "return *(undefined4 *)(PTR_sh_coproc_00144c5c + 4);" (return "return") (pointer_expression "*(undefined4 *)(PTR_sh_coproc_00144c5c + 4)" (* "*") (cast_expression "(undefined4 *)(PTR_sh_coproc_00144c5c + 4)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(PTR_sh_coproc_00144c5c + 4)" (( "(") (binary_expression "PTR_sh_coproc_00144c5c + 4" (identifier "PTR_sh_coproc_00144c5c") (+ "+") (number_literal "4")) () ")")))) (; ";")) (} "}"))) (return_statement "return 0xffffffff;" (return "return") (number_literal "0xffffffff") (; ";")) (} "}")))

/* WARNING: Unknown calling convention */

type_1 function_1(void)

{
  if ((*(type_2 *)(var_1 + 0x18) & 2) == 0) {
    return *(type_1 *)(var_1 + 4);
  }
  return -1;
}


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

undefined4 MASKED(void)

{
  if ((*(uint *)(PTR_sh_coproc_00144c5c + 0x18) & 2) == 0) {
    return *(undefined4 *)(PTR_sh_coproc_00144c5c + 4);
  }
  return 0xffffffff;
}

