
/* WARNING: Enum "anon_enum_32": Some values do not have unique names */

void term_schedule_tblink(Terminal *term)

{
  ulong uVar1;
  
  if (term->tblink_pending != 0) {
    term->tblink_pending = 1;
    return;
  }
  uVar1 = schedule_timer(0x1c2,(timer_fn_t)(PTR_LAB_000a745c + 0x1318),term);
  term->next_tblink = uVar1;
  term->tblink_pending = 1;
  return;
}



void FUN_0003dbd0(int param_1)

{
  undefined4 uVar1;
  
  if (*(int *)(param_1 + 0x10a4) != 0) {
    *(undefined4 *)(param_1 + 0x10a4) = 1;
    return;
  }
  uVar1 = schedule_timer(0x1c2,PTR_LAB_000a745c + 0x1318,param_1);
  *(undefined4 *)(param_1 + 0x10ac) = uVar1;
  *(undefined4 *)(param_1 + 0x10a4) = 1;
  return;
}


lui gp,0x7
addiu gp,gp,0x14c0
addu gp,gp,t9
addiu sp,sp,-0x20
lw v0,0x10a4(a0)
sw gp,0x10(sp)
sw s0,0x18(sp)
or s0,a0,zero
beq v0,zero,0x0003dc10
_sw ra,0x1c(sp)
lw ra,0x1c(sp)
li v0,0x1
sw v0,0x10a4(s0)
lw s0,0x18(sp)
jr ra
_addiu sp,sp,0x20
lw a1,-0x7c34(gp)
li a0,0x1c2
lw t9,-0x7c20(gp)
or a2,s0,zero
bal 0x0004a71c
_addiu a1,a1,0x1318
lw ra,0x1c(sp)
sw v0,0x10ac(s0)
li v0,0x1
sw v0,0x10a4(s0)
lw s0,0x18(sp)
jr ra
_addiu sp,sp,0x20
(translation_unit "void FUN_0003dbd0(int param_1)\n\n{\n  undefined4 uVar1;\n  \n  if (*(int *)(param_1 + 0x10a4) != 0) {\n    *(undefined4 *)(param_1 + 0x10a4) = 1;\n    return;\n  }\n  uVar1 = schedule_timer(0x1c2,PTR_LAB_000a745c + 0x1318,param_1);\n  *(undefined4 *)(param_1 + 0x10ac) = uVar1;\n  *(undefined4 *)(param_1 + 0x10a4) = 1;\n  return;\n}\n\n" (function_definition "void FUN_0003dbd0(int param_1)\n\n{\n  undefined4 uVar1;\n  \n  if (*(int *)(param_1 + 0x10a4) != 0) {\n    *(undefined4 *)(param_1 + 0x10a4) = 1;\n    return;\n  }\n  uVar1 = schedule_timer(0x1c2,PTR_LAB_000a745c + 0x1318,param_1);\n  *(undefined4 *)(param_1 + 0x10ac) = uVar1;\n  *(undefined4 *)(param_1 + 0x10a4) = 1;\n  return;\n}" primitive_type (function_declarator "FUN_0003dbd0(int param_1)" identifier (parameter_list "(int param_1)" ( (parameter_declaration "int param_1" primitive_type identifier) ))) (compound_statement "{\n  undefined4 uVar1;\n  \n  if (*(int *)(param_1 + 0x10a4) != 0) {\n    *(undefined4 *)(param_1 + 0x10a4) = 1;\n    return;\n  }\n  uVar1 = schedule_timer(0x1c2,PTR_LAB_000a745c + 0x1318,param_1);\n  *(undefined4 *)(param_1 + 0x10ac) = uVar1;\n  *(undefined4 *)(param_1 + 0x10a4) = 1;\n  return;\n}" { (declaration "undefined4 uVar1;" type_identifier identifier ;) (if_statement "if (*(int *)(param_1 + 0x10a4) != 0) {\n    *(undefined4 *)(param_1 + 0x10a4) = 1;\n    return;\n  }" if (parenthesized_expression "(*(int *)(param_1 + 0x10a4) != 0)" ( (binary_expression "*(int *)(param_1 + 0x10a4) != 0" (pointer_expression "*(int *)(param_1 + 0x10a4)" * (cast_expression "(int *)(param_1 + 0x10a4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x10a4)" ( (binary_expression "param_1 + 0x10a4" identifier + number_literal) )))) != number_literal) )) (compound_statement "{\n    *(undefined4 *)(param_1 + 0x10a4) = 1;\n    return;\n  }" { (expression_statement "*(undefined4 *)(param_1 + 0x10a4) = 1;" (assignment_expression "*(undefined4 *)(param_1 + 0x10a4) = 1" (pointer_expression "*(undefined4 *)(param_1 + 0x10a4)" * (cast_expression "(undefined4 *)(param_1 + 0x10a4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x10a4)" ( (binary_expression "param_1 + 0x10a4" identifier + number_literal) )))) = number_literal) ;) (return_statement "return;" return ;) })) (expression_statement "uVar1 = schedule_timer(0x1c2,PTR_LAB_000a745c + 0x1318,param_1);" (assignment_expression "uVar1 = schedule_timer(0x1c2,PTR_LAB_000a745c + 0x1318,param_1)" identifier = (call_expression "schedule_timer(0x1c2,PTR_LAB_000a745c + 0x1318,param_1)" identifier (argument_list "(0x1c2,PTR_LAB_000a745c + 0x1318,param_1)" ( number_literal , (binary_expression "PTR_LAB_000a745c + 0x1318" identifier + number_literal) , identifier )))) ;) (expression_statement "*(undefined4 *)(param_1 + 0x10ac) = uVar1;" (assignment_expression "*(undefined4 *)(param_1 + 0x10ac) = uVar1" (pointer_expression "*(undefined4 *)(param_1 + 0x10ac)" * (cast_expression "(undefined4 *)(param_1 + 0x10ac)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x10ac)" ( (binary_expression "param_1 + 0x10ac" identifier + number_literal) )))) = identifier) ;) (expression_statement "*(undefined4 *)(param_1 + 0x10a4) = 1;" (assignment_expression "*(undefined4 *)(param_1 + 0x10a4) = 1" (pointer_expression "*(undefined4 *)(param_1 + 0x10a4)" * (cast_expression "(undefined4 *)(param_1 + 0x10a4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x10a4)" ( (binary_expression "param_1 + 0x10a4" identifier + number_literal) )))) = number_literal) ;) (return_statement "return;" return ;) })))
(translation_unit "/* WARNING: Enum "anon_enum_32": Some values do not have unique names */\n\nvoid term_schedule_tblink(Terminal *term)\n\n{\n  ulong uVar1;\n  \n  if (term->tblink_pending != 0) {\n    term->tblink_pending = 1;\n    return;\n  }\n  uVar1 = schedule_timer(0x1c2,(timer_fn_t)(PTR_LAB_000a745c + 0x1318),term);\n  term->next_tblink = uVar1;\n  term->tblink_pending = 1;\n  return;\n}\n\n" comment (function_definition "void term_schedule_tblink(Terminal *term)\n\n{\n  ulong uVar1;\n  \n  if (term->tblink_pending != 0) {\n    term->tblink_pending = 1;\n    return;\n  }\n  uVar1 = schedule_timer(0x1c2,(timer_fn_t)(PTR_LAB_000a745c + 0x1318),term);\n  term->next_tblink = uVar1;\n  term->tblink_pending = 1;\n  return;\n}" primitive_type (function_declarator "term_schedule_tblink(Terminal *term)" identifier (parameter_list "(Terminal *term)" ( (parameter_declaration "Terminal *term" type_identifier (pointer_declarator "*term" * identifier)) ))) (compound_statement "{\n  ulong uVar1;\n  \n  if (term->tblink_pending != 0) {\n    term->tblink_pending = 1;\n    return;\n  }\n  uVar1 = schedule_timer(0x1c2,(timer_fn_t)(PTR_LAB_000a745c + 0x1318),term);\n  term->next_tblink = uVar1;\n  term->tblink_pending = 1;\n  return;\n}" { (declaration "ulong uVar1;" type_identifier identifier ;) (if_statement "if (term->tblink_pending != 0) {\n    term->tblink_pending = 1;\n    return;\n  }" if (parenthesized_expression "(term->tblink_pending != 0)" ( (binary_expression "term->tblink_pending != 0" (field_expression "term->tblink_pending" identifier -> field_identifier) != number_literal) )) (compound_statement "{\n    term->tblink_pending = 1;\n    return;\n  }" { (expression_statement "term->tblink_pending = 1;" (assignment_expression "term->tblink_pending = 1" (field_expression "term->tblink_pending" identifier -> field_identifier) = number_literal) ;) (return_statement "return;" return ;) })) (expression_statement "uVar1 = schedule_timer(0x1c2,(timer_fn_t)(PTR_LAB_000a745c + 0x1318),term);" (assignment_expression "uVar1 = schedule_timer(0x1c2,(timer_fn_t)(PTR_LAB_000a745c + 0x1318),term)" identifier = (call_expression "schedule_timer(0x1c2,(timer_fn_t)(PTR_LAB_000a745c + 0x1318),term)" identifier (argument_list "(0x1c2,(timer_fn_t)(PTR_LAB_000a745c + 0x1318),term)" ( number_literal , (call_expression "(timer_fn_t)(PTR_LAB_000a745c + 0x1318)" (parenthesized_expression "(timer_fn_t)" ( identifier )) (argument_list "(PTR_LAB_000a745c + 0x1318)" ( (binary_expression "PTR_LAB_000a745c + 0x1318" identifier + number_literal) ))) , identifier )))) ;) (expression_statement "term->next_tblink = uVar1;" (assignment_expression "term->next_tblink = uVar1" (field_expression "term->next_tblink" identifier -> field_identifier) = identifier) ;) (expression_statement "term->tblink_pending = 1;" (assignment_expression "term->tblink_pending = 1" (field_expression "term->tblink_pending" identifier -> field_identifier) = number_literal) ;) (return_statement "return;" return ;) })))
(translation_unit "void FUN_0003dbd0(int param_1)\n\n{\n  undefined4 uVar1;\n  \n  if (*(int *)(param_1 + 0x10a4) != 0) {\n    *(undefined4 *)(param_1 + 0x10a4) = 1;\n    return;\n  }\n  uVar1 = schedule_timer(0x1c2,PTR_LAB_000a745c + 0x1318,param_1);\n  *(undefined4 *)(param_1 + 0x10ac) = uVar1;\n  *(undefined4 *)(param_1 + 0x10a4) = 1;\n  return;\n}\n\n" (function_definition "void FUN_0003dbd0(int param_1)\n\n{\n  undefined4 uVar1;\n  \n  if (*(int *)(param_1 + 0x10a4) != 0) {\n    *(undefined4 *)(param_1 + 0x10a4) = 1;\n    return;\n  }\n  uVar1 = schedule_timer(0x1c2,PTR_LAB_000a745c + 0x1318,param_1);\n  *(undefined4 *)(param_1 + 0x10ac) = uVar1;\n  *(undefined4 *)(param_1 + 0x10a4) = 1;\n  return;\n}" primitive_type (function_declarator "FUN_0003dbd0(int param_1)" identifier (parameter_list "(int param_1)" ( (parameter_declaration "int param_1" primitive_type identifier) ))) (compound_statement "{\n  undefined4 uVar1;\n  \n  if (*(int *)(param_1 + 0x10a4) != 0) {\n    *(undefined4 *)(param_1 + 0x10a4) = 1;\n    return;\n  }\n  uVar1 = schedule_timer(0x1c2,PTR_LAB_000a745c + 0x1318,param_1);\n  *(undefined4 *)(param_1 + 0x10ac) = uVar1;\n  *(undefined4 *)(param_1 + 0x10a4) = 1;\n  return;\n}" { (declaration "undefined4 uVar1;" type_identifier identifier ;) (if_statement "if (*(int *)(param_1 + 0x10a4) != 0) {\n    *(undefined4 *)(param_1 + 0x10a4) = 1;\n    return;\n  }" if (parenthesized_expression "(*(int *)(param_1 + 0x10a4) != 0)" ( (binary_expression "*(int *)(param_1 + 0x10a4) != 0" (pointer_expression "*(int *)(param_1 + 0x10a4)" * (cast_expression "(int *)(param_1 + 0x10a4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x10a4)" ( (binary_expression "param_1 + 0x10a4" identifier + number_literal) )))) != number_literal) )) (compound_statement "{\n    *(undefined4 *)(param_1 + 0x10a4) = 1;\n    return;\n  }" { (expression_statement "*(undefined4 *)(param_1 + 0x10a4) = 1;" (assignment_expression "*(undefined4 *)(param_1 + 0x10a4) = 1" (pointer_expression "*(undefined4 *)(param_1 + 0x10a4)" * (cast_expression "(undefined4 *)(param_1 + 0x10a4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x10a4)" ( (binary_expression "param_1 + 0x10a4" identifier + number_literal) )))) = number_literal) ;) (return_statement "return;" return ;) })) (expression_statement "uVar1 = schedule_timer(0x1c2,PTR_LAB_000a745c + 0x1318,param_1);" (assignment_expression "uVar1 = schedule_timer(0x1c2,PTR_LAB_000a745c + 0x1318,param_1)" identifier = (call_expression "schedule_timer(0x1c2,PTR_LAB_000a745c + 0x1318,param_1)" identifier (argument_list "(0x1c2,PTR_LAB_000a745c + 0x1318,param_1)" ( number_literal , (binary_expression "PTR_LAB_000a745c + 0x1318" identifier + number_literal) , identifier )))) ;) (expression_statement "*(undefined4 *)(param_1 + 0x10ac) = uVar1;" (assignment_expression "*(undefined4 *)(param_1 + 0x10ac) = uVar1" (pointer_expression "*(undefined4 *)(param_1 + 0x10ac)" * (cast_expression "(undefined4 *)(param_1 + 0x10ac)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x10ac)" ( (binary_expression "param_1 + 0x10ac" identifier + number_literal) )))) = identifier) ;) (expression_statement "*(undefined4 *)(param_1 + 0x10a4) = 1;" (assignment_expression "*(undefined4 *)(param_1 + 0x10a4) = 1" (pointer_expression "*(undefined4 *)(param_1 + 0x10a4)" * (cast_expression "(undefined4 *)(param_1 + 0x10a4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x10a4)" ( (binary_expression "param_1 + 0x10a4" identifier + number_literal) )))) = number_literal) ;) (return_statement "return;" return ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (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 { (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = LIT) ;) (return_statement return ;) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( LIT , (binary_expression IDENT + LIT) , IDENT )))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = LIT) ;) (return_statement return ;) })))
(function_definition "void FUN_0003dbd0(int param_1)\n\n{\n  undefined4 uVar1;\n  \n  if (*(int *)(param_1 + 0x10a4) != 0) {\n    *(undefined4 *)(param_1 + 0x10a4) = 1;\n    return;\n  }\n  uVar1 = schedule_timer(0x1c2,PTR_LAB_000a745c + 0x1318,param_1);\n  *(undefined4 *)(param_1 + 0x10ac) = uVar1;\n  *(undefined4 *)(param_1 + 0x10a4) = 1;\n  return;\n}" (primitive_type "void") (function_declarator "FUN_0003dbd0(int param_1)" (identifier "FUN_0003dbd0") (parameter_list "(int param_1)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) () ")"))) (compound_statement "{\n  undefined4 uVar1;\n  \n  if (*(int *)(param_1 + 0x10a4) != 0) {\n    *(undefined4 *)(param_1 + 0x10a4) = 1;\n    return;\n  }\n  uVar1 = schedule_timer(0x1c2,PTR_LAB_000a745c + 0x1318,param_1);\n  *(undefined4 *)(param_1 + 0x10ac) = uVar1;\n  *(undefined4 *)(param_1 + 0x10a4) = 1;\n  return;\n}" ({ "{") (declaration "undefined4 uVar1;" (type_identifier "undefined4") (identifier "uVar1") (; ";")) (if_statement "if (*(int *)(param_1 + 0x10a4) != 0) {\n    *(undefined4 *)(param_1 + 0x10a4) = 1;\n    return;\n  }" (if "if") (parenthesized_expression "(*(int *)(param_1 + 0x10a4) != 0)" (( "(") (binary_expression "*(int *)(param_1 + 0x10a4) != 0" (pointer_expression "*(int *)(param_1 + 0x10a4)" (* "*") (cast_expression "(int *)(param_1 + 0x10a4)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x10a4)" (( "(") (binary_expression "param_1 + 0x10a4" (identifier "param_1") (+ "+") (number_literal "0x10a4")) () ")")))) (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    *(undefined4 *)(param_1 + 0x10a4) = 1;\n    return;\n  }" ({ "{") (expression_statement "*(undefined4 *)(param_1 + 0x10a4) = 1;" (assignment_expression "*(undefined4 *)(param_1 + 0x10a4) = 1" (pointer_expression "*(undefined4 *)(param_1 + 0x10a4)" (* "*") (cast_expression "(undefined4 *)(param_1 + 0x10a4)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x10a4)" (( "(") (binary_expression "param_1 + 0x10a4" (identifier "param_1") (+ "+") (number_literal "0x10a4")) () ")")))) (= "=") (number_literal "1")) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}"))) (expression_statement "uVar1 = schedule_timer(0x1c2,PTR_LAB_000a745c + 0x1318,param_1);" (assignment_expression "uVar1 = schedule_timer(0x1c2,PTR_LAB_000a745c + 0x1318,param_1)" (identifier "uVar1") (= "=") (call_expression "schedule_timer(0x1c2,PTR_LAB_000a745c + 0x1318,param_1)" (identifier "schedule_timer") (argument_list "(0x1c2,PTR_LAB_000a745c + 0x1318,param_1)" (( "(") (number_literal "0x1c2") (, ",") (binary_expression "PTR_LAB_000a745c + 0x1318" (identifier "PTR_LAB_000a745c") (+ "+") (number_literal "0x1318")) (, ",") (identifier "param_1") () ")")))) (; ";")) (expression_statement "*(undefined4 *)(param_1 + 0x10ac) = uVar1;" (assignment_expression "*(undefined4 *)(param_1 + 0x10ac) = uVar1" (pointer_expression "*(undefined4 *)(param_1 + 0x10ac)" (* "*") (cast_expression "(undefined4 *)(param_1 + 0x10ac)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x10ac)" (( "(") (binary_expression "param_1 + 0x10ac" (identifier "param_1") (+ "+") (number_literal "0x10ac")) () ")")))) (= "=") (identifier "uVar1")) (; ";")) (expression_statement "*(undefined4 *)(param_1 + 0x10a4) = 1;" (assignment_expression "*(undefined4 *)(param_1 + 0x10a4) = 1" (pointer_expression "*(undefined4 *)(param_1 + 0x10a4)" (* "*") (cast_expression "(undefined4 *)(param_1 + 0x10a4)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x10a4)" (( "(") (binary_expression "param_1 + 0x10a4" (identifier "param_1") (+ "+") (number_literal "0x10a4")) () ")")))) (= "=") (number_literal "1")) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}")))

/* WARNING: Enum "anon_enum_32": Some values do not have unique names */

void function_1(type_1 *term)

{
  type_2 uVar1;
  
  if (term->tblink_pending != 0) {
    term->tblink_pending = 1;
    return;
  }
  uVar1 = var_1(0x1c2,(timer_fn_t)(var_2 + 0x1318),term);
  term->next_tblink = uVar1;
  term->tblink_pending = 1;
  return;
}


(translation_unit (function_definition type: (primitive_type) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (primitive_type) declarator: (identifier)))) body: (compound_statement (declaration type: (type_identifier) declarator: (identifier)) (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 (expression_statement (assignment_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))) (return_statement))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (number_literal) (binary_expression left: (identifier) right: (number_literal)) (identifier))))) (expression_statement (assignment_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: (identifier))) (expression_statement (assignment_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))) (return_statement))))

void MASKED(int param_1)

{
  undefined4 uVar1;
  
  if (*(int *)(param_1 + 0x10a4) != 0) {
    *(undefined4 *)(param_1 + 0x10a4) = 1;
    return;
  }
  uVar1 = schedule_timer(0x1c2,PTR_LAB_000a745c + 0x1318,param_1);
  *(undefined4 *)(param_1 + 0x10ac) = uVar1;
  *(undefined4 *)(param_1 + 0x10a4) = 1;
  return;
}

