
void u_interrupt(int type)

{
  int iVar1;
  
  bell();
  (*(code *)PTR_signal_0004f364)(2,PTR_LAB_0004ec08 + 0x38bc);
  iVar1 = *(int *)PTR_reading_0004f1c8;
  *(uint *)PTR_sigs_0004edb0 = *(uint *)PTR_sigs_0004edb0 | 1;
  if (iVar1 == 0) {
    return;
  }
  intread();
  return;
}



void FUN_000338bc(void)

{
  int iVar1;
  
  bell();
  (*(code *)PTR_signal_0004f364)(2,PTR_LAB_0004ec08 + 0x38bc);
  iVar1 = *(int *)PTR_reading_0004f1c8;
  *(uint *)PTR_sigs_0004edb0 = *(uint *)PTR_sigs_0004edb0 | 1;
  if (iVar1 == 0) {
    return;
  }
  intread();
  return;
}


lui gp,0x2
addiu gp,gp,0x3314
addu gp,gp,t9
addiu sp,sp,-0x20
lw t9,-0x7d8c(gp)
sw gp,0x10(sp)
sw ra,0x1c(sp)
bal 0x00017348
_nop
li a0,0x2
lw gp,0x10(sp)
lw a1,-0x7fc8(gp)
lw t9,-0x786c(gp)
jalr t9
_addiu a1,a1,0x38bc
lw gp,0x10(sp)
lw v1,-0x7e20(gp)
lw a0,-0x7a08(gp)
lw v0,0x0(v1)
lw a0,0x0(a0)
ori v0,v0,0x1
bne a0,zero,0x00033924
_sw v0,0x0(v1)
lw ra,0x1c(sp)
jr ra
_addiu sp,sp,0x20
lw ra,0x1c(sp)
lw t9,-0x7994(gp)
b 0x0002dff8
_addiu sp,sp,0x20
(translation_unit "void FUN_000338bc(void)\n\n{\n  int iVar1;\n  \n  bell();\n  (*(code *)PTR_signal_0004f364)(2,PTR_LAB_0004ec08 + 0x38bc);\n  iVar1 = *(int *)PTR_reading_0004f1c8;\n  *(uint *)PTR_sigs_0004edb0 = *(uint *)PTR_sigs_0004edb0 | 1;\n  if (iVar1 == 0) {\n    return;\n  }\n  intread();\n  return;\n}\n\n" (function_definition "void FUN_000338bc(void)\n\n{\n  int iVar1;\n  \n  bell();\n  (*(code *)PTR_signal_0004f364)(2,PTR_LAB_0004ec08 + 0x38bc);\n  iVar1 = *(int *)PTR_reading_0004f1c8;\n  *(uint *)PTR_sigs_0004edb0 = *(uint *)PTR_sigs_0004edb0 | 1;\n  if (iVar1 == 0) {\n    return;\n  }\n  intread();\n  return;\n}" primitive_type (function_declarator "FUN_000338bc(void)" identifier (parameter_list "(void)" ( (parameter_declaration "void" primitive_type) ))) (compound_statement "{\n  int iVar1;\n  \n  bell();\n  (*(code *)PTR_signal_0004f364)(2,PTR_LAB_0004ec08 + 0x38bc);\n  iVar1 = *(int *)PTR_reading_0004f1c8;\n  *(uint *)PTR_sigs_0004edb0 = *(uint *)PTR_sigs_0004edb0 | 1;\n  if (iVar1 == 0) {\n    return;\n  }\n  intread();\n  return;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (expression_statement "bell();" (call_expression "bell()" identifier (argument_list "()" ( ))) ;) (expression_statement "(*(code *)PTR_signal_0004f364)(2,PTR_LAB_0004ec08 + 0x38bc);" (call_expression "(*(code *)PTR_signal_0004f364)(2,PTR_LAB_0004ec08 + 0x38bc)" (parenthesized_expression "(*(code *)PTR_signal_0004f364)" ( (pointer_expression "*(code *)PTR_signal_0004f364" * (cast_expression "(code *)PTR_signal_0004f364" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(2,PTR_LAB_0004ec08 + 0x38bc)" ( number_literal , (binary_expression "PTR_LAB_0004ec08 + 0x38bc" identifier + number_literal) ))) ;) (expression_statement "iVar1 = *(int *)PTR_reading_0004f1c8;" (assignment_expression "iVar1 = *(int *)PTR_reading_0004f1c8" identifier = (pointer_expression "*(int *)PTR_reading_0004f1c8" * (cast_expression "(int *)PTR_reading_0004f1c8" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier))) ;) (expression_statement "*(uint *)PTR_sigs_0004edb0 = *(uint *)PTR_sigs_0004edb0 | 1;" (assignment_expression "*(uint *)PTR_sigs_0004edb0 = *(uint *)PTR_sigs_0004edb0 | 1" (pointer_expression "*(uint *)PTR_sigs_0004edb0" * (cast_expression "(uint *)PTR_sigs_0004edb0" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) = (binary_expression "*(uint *)PTR_sigs_0004edb0 | 1" (pointer_expression "*(uint *)PTR_sigs_0004edb0" * (cast_expression "(uint *)PTR_sigs_0004edb0" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) | number_literal)) ;) (if_statement "if (iVar1 == 0) {\n    return;\n  }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n    return;\n  }" { (return_statement "return;" return ;) })) (expression_statement "intread();" (call_expression "intread()" identifier (argument_list "()" ( ))) ;) (return_statement "return;" return ;) })))
(translation_unit "void u_interrupt(int type)\n\n{\n  int iVar1;\n  \n  bell();\n  (*(code *)PTR_signal_0004f364)(2,PTR_LAB_0004ec08 + 0x38bc);\n  iVar1 = *(int *)PTR_reading_0004f1c8;\n  *(uint *)PTR_sigs_0004edb0 = *(uint *)PTR_sigs_0004edb0 | 1;\n  if (iVar1 == 0) {\n    return;\n  }\n  intread();\n  return;\n}\n\n" (function_definition "void u_interrupt(int type)\n\n{\n  int iVar1;\n  \n  bell();\n  (*(code *)PTR_signal_0004f364)(2,PTR_LAB_0004ec08 + 0x38bc);\n  iVar1 = *(int *)PTR_reading_0004f1c8;\n  *(uint *)PTR_sigs_0004edb0 = *(uint *)PTR_sigs_0004edb0 | 1;\n  if (iVar1 == 0) {\n    return;\n  }\n  intread();\n  return;\n}" primitive_type (function_declarator "u_interrupt(int type)" identifier (parameter_list "(int type)" ( (parameter_declaration "int type" primitive_type identifier) ))) (compound_statement "{\n  int iVar1;\n  \n  bell();\n  (*(code *)PTR_signal_0004f364)(2,PTR_LAB_0004ec08 + 0x38bc);\n  iVar1 = *(int *)PTR_reading_0004f1c8;\n  *(uint *)PTR_sigs_0004edb0 = *(uint *)PTR_sigs_0004edb0 | 1;\n  if (iVar1 == 0) {\n    return;\n  }\n  intread();\n  return;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (expression_statement "bell();" (call_expression "bell()" identifier (argument_list "()" ( ))) ;) (expression_statement "(*(code *)PTR_signal_0004f364)(2,PTR_LAB_0004ec08 + 0x38bc);" (call_expression "(*(code *)PTR_signal_0004f364)(2,PTR_LAB_0004ec08 + 0x38bc)" (parenthesized_expression "(*(code *)PTR_signal_0004f364)" ( (pointer_expression "*(code *)PTR_signal_0004f364" * (cast_expression "(code *)PTR_signal_0004f364" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(2,PTR_LAB_0004ec08 + 0x38bc)" ( number_literal , (binary_expression "PTR_LAB_0004ec08 + 0x38bc" identifier + number_literal) ))) ;) (expression_statement "iVar1 = *(int *)PTR_reading_0004f1c8;" (assignment_expression "iVar1 = *(int *)PTR_reading_0004f1c8" identifier = (pointer_expression "*(int *)PTR_reading_0004f1c8" * (cast_expression "(int *)PTR_reading_0004f1c8" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier))) ;) (expression_statement "*(uint *)PTR_sigs_0004edb0 = *(uint *)PTR_sigs_0004edb0 | 1;" (assignment_expression "*(uint *)PTR_sigs_0004edb0 = *(uint *)PTR_sigs_0004edb0 | 1" (pointer_expression "*(uint *)PTR_sigs_0004edb0" * (cast_expression "(uint *)PTR_sigs_0004edb0" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) = (binary_expression "*(uint *)PTR_sigs_0004edb0 | 1" (pointer_expression "*(uint *)PTR_sigs_0004edb0" * (cast_expression "(uint *)PTR_sigs_0004edb0" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) | number_literal)) ;) (if_statement "if (iVar1 == 0) {\n    return;\n  }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n    return;\n  }" { (return_statement "return;" return ;) })) (expression_statement "intread();" (call_expression "intread()" identifier (argument_list "()" ( ))) ;) (return_statement "return;" return ;) })))
(translation_unit "void FUN_000338bc(void)\n\n{\n  int iVar1;\n  \n  bell();\n  (*(code *)PTR_signal_0004f364)(2,PTR_LAB_0004ec08 + 0x38bc);\n  iVar1 = *(int *)PTR_reading_0004f1c8;\n  *(uint *)PTR_sigs_0004edb0 = *(uint *)PTR_sigs_0004edb0 | 1;\n  if (iVar1 == 0) {\n    return;\n  }\n  intread();\n  return;\n}\n\n" (function_definition "void FUN_000338bc(void)\n\n{\n  int iVar1;\n  \n  bell();\n  (*(code *)PTR_signal_0004f364)(2,PTR_LAB_0004ec08 + 0x38bc);\n  iVar1 = *(int *)PTR_reading_0004f1c8;\n  *(uint *)PTR_sigs_0004edb0 = *(uint *)PTR_sigs_0004edb0 | 1;\n  if (iVar1 == 0) {\n    return;\n  }\n  intread();\n  return;\n}" primitive_type (function_declarator "FUN_000338bc(void)" identifier (parameter_list "(void)" ( (parameter_declaration "void" primitive_type) ))) (compound_statement "{\n  int iVar1;\n  \n  bell();\n  (*(code *)PTR_signal_0004f364)(2,PTR_LAB_0004ec08 + 0x38bc);\n  iVar1 = *(int *)PTR_reading_0004f1c8;\n  *(uint *)PTR_sigs_0004edb0 = *(uint *)PTR_sigs_0004edb0 | 1;\n  if (iVar1 == 0) {\n    return;\n  }\n  intread();\n  return;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (expression_statement "bell();" (call_expression "bell()" identifier (argument_list "()" ( ))) ;) (expression_statement "(*(code *)PTR_signal_0004f364)(2,PTR_LAB_0004ec08 + 0x38bc);" (call_expression "(*(code *)PTR_signal_0004f364)(2,PTR_LAB_0004ec08 + 0x38bc)" (parenthesized_expression "(*(code *)PTR_signal_0004f364)" ( (pointer_expression "*(code *)PTR_signal_0004f364" * (cast_expression "(code *)PTR_signal_0004f364" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(2,PTR_LAB_0004ec08 + 0x38bc)" ( number_literal , (binary_expression "PTR_LAB_0004ec08 + 0x38bc" identifier + number_literal) ))) ;) (expression_statement "iVar1 = *(int *)PTR_reading_0004f1c8;" (assignment_expression "iVar1 = *(int *)PTR_reading_0004f1c8" identifier = (pointer_expression "*(int *)PTR_reading_0004f1c8" * (cast_expression "(int *)PTR_reading_0004f1c8" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier))) ;) (expression_statement "*(uint *)PTR_sigs_0004edb0 = *(uint *)PTR_sigs_0004edb0 | 1;" (assignment_expression "*(uint *)PTR_sigs_0004edb0 = *(uint *)PTR_sigs_0004edb0 | 1" (pointer_expression "*(uint *)PTR_sigs_0004edb0" * (cast_expression "(uint *)PTR_sigs_0004edb0" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) = (binary_expression "*(uint *)PTR_sigs_0004edb0 | 1" (pointer_expression "*(uint *)PTR_sigs_0004edb0" * (cast_expression "(uint *)PTR_sigs_0004edb0" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) | number_literal)) ;) (if_statement "if (iVar1 == 0) {\n    return;\n  }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n    return;\n  }" { (return_statement "return;" return ;) })) (expression_statement "intread();" (call_expression "intread()" identifier (argument_list "()" ( ))) ;) (return_statement "return;" return ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE) ))) (compound_statement { (declaration TYPE IDENT ;) (expression_statement (call_expression IDENT (argument_list ( ))) ;) (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( LIT , (binary_expression IDENT + LIT) ))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) = (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) | LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (return_statement return ;) })) (expression_statement (call_expression IDENT (argument_list ( ))) ;) (return_statement return ;) })))
(function_definition "void FUN_000338bc(void)\n\n{\n  int iVar1;\n  \n  bell();\n  (*(code *)PTR_signal_0004f364)(2,PTR_LAB_0004ec08 + 0x38bc);\n  iVar1 = *(int *)PTR_reading_0004f1c8;\n  *(uint *)PTR_sigs_0004edb0 = *(uint *)PTR_sigs_0004edb0 | 1;\n  if (iVar1 == 0) {\n    return;\n  }\n  intread();\n  return;\n}" (primitive_type "void") (function_declarator "FUN_000338bc(void)" (identifier "FUN_000338bc") (parameter_list "(void)" (( "(") (parameter_declaration "void" (primitive_type "void")) () ")"))) (compound_statement "{\n  int iVar1;\n  \n  bell();\n  (*(code *)PTR_signal_0004f364)(2,PTR_LAB_0004ec08 + 0x38bc);\n  iVar1 = *(int *)PTR_reading_0004f1c8;\n  *(uint *)PTR_sigs_0004edb0 = *(uint *)PTR_sigs_0004edb0 | 1;\n  if (iVar1 == 0) {\n    return;\n  }\n  intread();\n  return;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (expression_statement "bell();" (call_expression "bell()" (identifier "bell") (argument_list "()" (( "(") () ")"))) (; ";")) (expression_statement "(*(code *)PTR_signal_0004f364)(2,PTR_LAB_0004ec08 + 0x38bc);" (call_expression "(*(code *)PTR_signal_0004f364)(2,PTR_LAB_0004ec08 + 0x38bc)" (parenthesized_expression "(*(code *)PTR_signal_0004f364)" (( "(") (pointer_expression "*(code *)PTR_signal_0004f364" (* "*") (cast_expression "(code *)PTR_signal_0004f364" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_signal_0004f364"))) () ")")) (argument_list "(2,PTR_LAB_0004ec08 + 0x38bc)" (( "(") (number_literal "2") (, ",") (binary_expression "PTR_LAB_0004ec08 + 0x38bc" (identifier "PTR_LAB_0004ec08") (+ "+") (number_literal "0x38bc")) () ")"))) (; ";")) (expression_statement "iVar1 = *(int *)PTR_reading_0004f1c8;" (assignment_expression "iVar1 = *(int *)PTR_reading_0004f1c8" (identifier "iVar1") (= "=") (pointer_expression "*(int *)PTR_reading_0004f1c8" (* "*") (cast_expression "(int *)PTR_reading_0004f1c8" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_reading_0004f1c8")))) (; ";")) (expression_statement "*(uint *)PTR_sigs_0004edb0 = *(uint *)PTR_sigs_0004edb0 | 1;" (assignment_expression "*(uint *)PTR_sigs_0004edb0 = *(uint *)PTR_sigs_0004edb0 | 1" (pointer_expression "*(uint *)PTR_sigs_0004edb0" (* "*") (cast_expression "(uint *)PTR_sigs_0004edb0" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_sigs_0004edb0"))) (= "=") (binary_expression "*(uint *)PTR_sigs_0004edb0 | 1" (pointer_expression "*(uint *)PTR_sigs_0004edb0" (* "*") (cast_expression "(uint *)PTR_sigs_0004edb0" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_sigs_0004edb0"))) (| "|") (number_literal "1"))) (; ";")) (if_statement "if (iVar1 == 0) {\n    return;\n  }" (if "if") (parenthesized_expression "(iVar1 == 0)" (( "(") (binary_expression "iVar1 == 0" (identifier "iVar1") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    return;\n  }" ({ "{") (return_statement "return;" (return "return") (; ";")) (} "}"))) (expression_statement "intread();" (call_expression "intread()" (identifier "intread") (argument_list "()" (( "(") () ")"))) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}")))

void function_1(int type)

{
  int var_3;
  
  var_1();
  (*(type_1 *)PTR_signal_0004f364)(2,var_2 + 0x38bc);
  var_3 = *(int *)PTR_reading_0004f1c8;
  *(type_2 *)PTR_sigs_0004edb0 = *(type_2 *)PTR_sigs_0004edb0 | 1;
  if (var_3 == 0) {
    return;
  }
  var_4();
  return;
}


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

void MASKED(void)

{
  int iVar1;
  
  bell();
  (*(code *)PTR_signal_0004f364)(2,PTR_LAB_0004ec08 + 0x38bc);
  iVar1 = *(int *)PTR_reading_0004f1c8;
  *(uint *)PTR_sigs_0004edb0 = *(uint *)PTR_sigs_0004edb0 | 1;
  if (iVar1 == 0) {
    return;
  }
  intread();
  return;
}

