
/* WARNING: Unknown calling convention */

int history_set_pos(int pos)

{
  if ((pos <= *(int *)PTR_history_length_001454d0) && (-1 < pos)) {
    if (*(int *)(PTR___environ_00145154 + -0x5448) != 0) {
      *(int *)PTR_history_offset_00146190 = pos;
      return 1;
    }
    return 0;
  }
  return 0;
}



undefined4 history_set_pos(int param_1)

{
  if ((param_1 <= *(int *)PTR_history_length_001454d0) && (-1 < param_1)) {
    if (*(int *)(PTR___environ_00145154 + -0x5448) != 0) {
      *(int *)PTR_history_offset_00146190 = param_1;
      return 1;
    }
    return 0;
  }
  return 0;
}


lui gp,0x4
addiu gp,gp,0x275c
addu gp,gp,t9
lw v0,-0x7070(gp)
lw v0,0x0(v0)
slt v0,v0,a0
bne v0,zero,0x00109e28
_nop
bltz a0,0x00109e28
_nop
lw v0,-0x73ec(gp)
lw v0,-0x5448(v0)
beq v0,zero,0x00109e30
_lw v1,-0x63b0(gp)
li v0,0x1
jr ra
_sw a0,0x0(v1)
jr ra
_or v0,zero,zero
jr ra
_or v0,zero,zero
(translation_unit "undefined4 history_set_pos(int param_1)\n\n{\n  if ((param_1 <= *(int *)PTR_history_length_001454d0) && (-1 < param_1)) {\n    if (*(int *)(PTR___environ_00145154 + -0x5448) != 0) {\n      *(int *)PTR_history_offset_00146190 = param_1;\n      return 1;\n    }\n    return 0;\n  }\n  return 0;\n}\n\n" (function_definition "undefined4 history_set_pos(int param_1)\n\n{\n  if ((param_1 <= *(int *)PTR_history_length_001454d0) && (-1 < param_1)) {\n    if (*(int *)(PTR___environ_00145154 + -0x5448) != 0) {\n      *(int *)PTR_history_offset_00146190 = param_1;\n      return 1;\n    }\n    return 0;\n  }\n  return 0;\n}" type_identifier (function_declarator "history_set_pos(int param_1)" identifier (parameter_list "(int param_1)" ( (parameter_declaration "int param_1" primitive_type identifier) ))) (compound_statement "{\n  if ((param_1 <= *(int *)PTR_history_length_001454d0) && (-1 < param_1)) {\n    if (*(int *)(PTR___environ_00145154 + -0x5448) != 0) {\n      *(int *)PTR_history_offset_00146190 = param_1;\n      return 1;\n    }\n    return 0;\n  }\n  return 0;\n}" { (if_statement "if ((param_1 <= *(int *)PTR_history_length_001454d0) && (-1 < param_1)) {\n    if (*(int *)(PTR___environ_00145154 + -0x5448) != 0) {\n      *(int *)PTR_history_offset_00146190 = param_1;\n      return 1;\n    }\n    return 0;\n  }" if (parenthesized_expression "((param_1 <= *(int *)PTR_history_length_001454d0) && (-1 < param_1))" ( (binary_expression "(param_1 <= *(int *)PTR_history_length_001454d0) && (-1 < param_1)" (parenthesized_expression "(param_1 <= *(int *)PTR_history_length_001454d0)" ( (binary_expression "param_1 <= *(int *)PTR_history_length_001454d0" identifier <= (pointer_expression "*(int *)PTR_history_length_001454d0" * (cast_expression "(int *)PTR_history_length_001454d0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier))) )) && (parenthesized_expression "(-1 < param_1)" ( (binary_expression "-1 < param_1" number_literal < identifier) ))) )) (compound_statement "{\n    if (*(int *)(PTR___environ_00145154 + -0x5448) != 0) {\n      *(int *)PTR_history_offset_00146190 = param_1;\n      return 1;\n    }\n    return 0;\n  }" { (if_statement "if (*(int *)(PTR___environ_00145154 + -0x5448) != 0) {\n      *(int *)PTR_history_offset_00146190 = param_1;\n      return 1;\n    }" if (parenthesized_expression "(*(int *)(PTR___environ_00145154 + -0x5448) != 0)" ( (binary_expression "*(int *)(PTR___environ_00145154 + -0x5448) != 0" (pointer_expression "*(int *)(PTR___environ_00145154 + -0x5448)" * (cast_expression "(int *)(PTR___environ_00145154 + -0x5448)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(PTR___environ_00145154 + -0x5448)" ( (binary_expression "PTR___environ_00145154 + -0x5448" identifier + number_literal) )))) != number_literal) )) (compound_statement "{\n      *(int *)PTR_history_offset_00146190 = param_1;\n      return 1;\n    }" { (expression_statement "*(int *)PTR_history_offset_00146190 = param_1;" (assignment_expression "*(int *)PTR_history_offset_00146190 = param_1" (pointer_expression "*(int *)PTR_history_offset_00146190" * (cast_expression "(int *)PTR_history_offset_00146190" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier)) = identifier) ;) (return_statement "return 1;" return number_literal ;) })) (return_statement "return 0;" return number_literal ;) })) (return_statement "return 0;" return number_literal ;) })))
(translation_unit "/* WARNING: Unknown calling convention */\n\nint history_set_pos(int pos)\n\n{\n  if ((pos <= *(int *)PTR_history_length_001454d0) && (-1 < pos)) {\n    if (*(int *)(PTR___environ_00145154 + -0x5448) != 0) {\n      *(int *)PTR_history_offset_00146190 = pos;\n      return 1;\n    }\n    return 0;\n  }\n  return 0;\n}\n\n" comment (function_definition "int history_set_pos(int pos)\n\n{\n  if ((pos <= *(int *)PTR_history_length_001454d0) && (-1 < pos)) {\n    if (*(int *)(PTR___environ_00145154 + -0x5448) != 0) {\n      *(int *)PTR_history_offset_00146190 = pos;\n      return 1;\n    }\n    return 0;\n  }\n  return 0;\n}" primitive_type (function_declarator "history_set_pos(int pos)" identifier (parameter_list "(int pos)" ( (parameter_declaration "int pos" primitive_type identifier) ))) (compound_statement "{\n  if ((pos <= *(int *)PTR_history_length_001454d0) && (-1 < pos)) {\n    if (*(int *)(PTR___environ_00145154 + -0x5448) != 0) {\n      *(int *)PTR_history_offset_00146190 = pos;\n      return 1;\n    }\n    return 0;\n  }\n  return 0;\n}" { (if_statement "if ((pos <= *(int *)PTR_history_length_001454d0) && (-1 < pos)) {\n    if (*(int *)(PTR___environ_00145154 + -0x5448) != 0) {\n      *(int *)PTR_history_offset_00146190 = pos;\n      return 1;\n    }\n    return 0;\n  }" if (parenthesized_expression "((pos <= *(int *)PTR_history_length_001454d0) && (-1 < pos))" ( (binary_expression "(pos <= *(int *)PTR_history_length_001454d0) && (-1 < pos)" (parenthesized_expression "(pos <= *(int *)PTR_history_length_001454d0)" ( (binary_expression "pos <= *(int *)PTR_history_length_001454d0" identifier <= (pointer_expression "*(int *)PTR_history_length_001454d0" * (cast_expression "(int *)PTR_history_length_001454d0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier))) )) && (parenthesized_expression "(-1 < pos)" ( (binary_expression "-1 < pos" number_literal < identifier) ))) )) (compound_statement "{\n    if (*(int *)(PTR___environ_00145154 + -0x5448) != 0) {\n      *(int *)PTR_history_offset_00146190 = pos;\n      return 1;\n    }\n    return 0;\n  }" { (if_statement "if (*(int *)(PTR___environ_00145154 + -0x5448) != 0) {\n      *(int *)PTR_history_offset_00146190 = pos;\n      return 1;\n    }" if (parenthesized_expression "(*(int *)(PTR___environ_00145154 + -0x5448) != 0)" ( (binary_expression "*(int *)(PTR___environ_00145154 + -0x5448) != 0" (pointer_expression "*(int *)(PTR___environ_00145154 + -0x5448)" * (cast_expression "(int *)(PTR___environ_00145154 + -0x5448)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(PTR___environ_00145154 + -0x5448)" ( (binary_expression "PTR___environ_00145154 + -0x5448" identifier + number_literal) )))) != number_literal) )) (compound_statement "{\n      *(int *)PTR_history_offset_00146190 = pos;\n      return 1;\n    }" { (expression_statement "*(int *)PTR_history_offset_00146190 = pos;" (assignment_expression "*(int *)PTR_history_offset_00146190 = pos" (pointer_expression "*(int *)PTR_history_offset_00146190" * (cast_expression "(int *)PTR_history_offset_00146190" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier)) = identifier) ;) (return_statement "return 1;" return number_literal ;) })) (return_statement "return 0;" return number_literal ;) })) (return_statement "return 0;" return number_literal ;) })))
(translation_unit "undefined4 history_set_pos(int param_1)\n\n{\n  if ((param_1 <= *(int *)PTR_history_length_001454d0) && (-1 < param_1)) {\n    if (*(int *)(PTR___environ_00145154 + -0x5448) != 0) {\n      *(int *)PTR_history_offset_00146190 = param_1;\n      return 1;\n    }\n    return 0;\n  }\n  return 0;\n}\n\n" (function_definition "undefined4 history_set_pos(int param_1)\n\n{\n  if ((param_1 <= *(int *)PTR_history_length_001454d0) && (-1 < param_1)) {\n    if (*(int *)(PTR___environ_00145154 + -0x5448) != 0) {\n      *(int *)PTR_history_offset_00146190 = param_1;\n      return 1;\n    }\n    return 0;\n  }\n  return 0;\n}" type_identifier (function_declarator "history_set_pos(int param_1)" identifier (parameter_list "(int param_1)" ( (parameter_declaration "int param_1" primitive_type identifier) ))) (compound_statement "{\n  if ((param_1 <= *(int *)PTR_history_length_001454d0) && (-1 < param_1)) {\n    if (*(int *)(PTR___environ_00145154 + -0x5448) != 0) {\n      *(int *)PTR_history_offset_00146190 = param_1;\n      return 1;\n    }\n    return 0;\n  }\n  return 0;\n}" { (if_statement "if ((param_1 <= *(int *)PTR_history_length_001454d0) && (-1 < param_1)) {\n    if (*(int *)(PTR___environ_00145154 + -0x5448) != 0) {\n      *(int *)PTR_history_offset_00146190 = param_1;\n      return 1;\n    }\n    return 0;\n  }" if (parenthesized_expression "((param_1 <= *(int *)PTR_history_length_001454d0) && (-1 < param_1))" ( (binary_expression "(param_1 <= *(int *)PTR_history_length_001454d0) && (-1 < param_1)" (parenthesized_expression "(param_1 <= *(int *)PTR_history_length_001454d0)" ( (binary_expression "param_1 <= *(int *)PTR_history_length_001454d0" identifier <= (pointer_expression "*(int *)PTR_history_length_001454d0" * (cast_expression "(int *)PTR_history_length_001454d0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier))) )) && (parenthesized_expression "(-1 < param_1)" ( (binary_expression "-1 < param_1" number_literal < identifier) ))) )) (compound_statement "{\n    if (*(int *)(PTR___environ_00145154 + -0x5448) != 0) {\n      *(int *)PTR_history_offset_00146190 = param_1;\n      return 1;\n    }\n    return 0;\n  }" { (if_statement "if (*(int *)(PTR___environ_00145154 + -0x5448) != 0) {\n      *(int *)PTR_history_offset_00146190 = param_1;\n      return 1;\n    }" if (parenthesized_expression "(*(int *)(PTR___environ_00145154 + -0x5448) != 0)" ( (binary_expression "*(int *)(PTR___environ_00145154 + -0x5448) != 0" (pointer_expression "*(int *)(PTR___environ_00145154 + -0x5448)" * (cast_expression "(int *)(PTR___environ_00145154 + -0x5448)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(PTR___environ_00145154 + -0x5448)" ( (binary_expression "PTR___environ_00145154 + -0x5448" identifier + number_literal) )))) != number_literal) )) (compound_statement "{\n      *(int *)PTR_history_offset_00146190 = param_1;\n      return 1;\n    }" { (expression_statement "*(int *)PTR_history_offset_00146190 = param_1;" (assignment_expression "*(int *)PTR_history_offset_00146190 = param_1" (pointer_expression "*(int *)PTR_history_offset_00146190" * (cast_expression "(int *)PTR_history_offset_00146190" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier)) = identifier) ;) (return_statement "return 1;" return number_literal ;) })) (return_statement "return 0;" return number_literal ;) })) (return_statement "return 0;" return number_literal ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) ))) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT <= (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT))) )) && (parenthesized_expression ( (binary_expression LIT < 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 { (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) = IDENT) ;) (return_statement return LIT ;) })) (return_statement return LIT ;) })) (return_statement return LIT ;) })))
(function_definition "undefined4 history_set_pos(int param_1)\n\n{\n  if ((param_1 <= *(int *)PTR_history_length_001454d0) && (-1 < param_1)) {\n    if (*(int *)(PTR___environ_00145154 + -0x5448) != 0) {\n      *(int *)PTR_history_offset_00146190 = param_1;\n      return 1;\n    }\n    return 0;\n  }\n  return 0;\n}" (type_identifier "undefined4") (function_declarator "history_set_pos(int param_1)" (identifier "history_set_pos") (parameter_list "(int param_1)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) () ")"))) (compound_statement "{\n  if ((param_1 <= *(int *)PTR_history_length_001454d0) && (-1 < param_1)) {\n    if (*(int *)(PTR___environ_00145154 + -0x5448) != 0) {\n      *(int *)PTR_history_offset_00146190 = param_1;\n      return 1;\n    }\n    return 0;\n  }\n  return 0;\n}" ({ "{") (if_statement "if ((param_1 <= *(int *)PTR_history_length_001454d0) && (-1 < param_1)) {\n    if (*(int *)(PTR___environ_00145154 + -0x5448) != 0) {\n      *(int *)PTR_history_offset_00146190 = param_1;\n      return 1;\n    }\n    return 0;\n  }" (if "if") (parenthesized_expression "((param_1 <= *(int *)PTR_history_length_001454d0) && (-1 < param_1))" (( "(") (binary_expression "(param_1 <= *(int *)PTR_history_length_001454d0) && (-1 < param_1)" (parenthesized_expression "(param_1 <= *(int *)PTR_history_length_001454d0)" (( "(") (binary_expression "param_1 <= *(int *)PTR_history_length_001454d0" (identifier "param_1") (<= "<=") (pointer_expression "*(int *)PTR_history_length_001454d0" (* "*") (cast_expression "(int *)PTR_history_length_001454d0" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_history_length_001454d0")))) () ")")) (&& "&&") (parenthesized_expression "(-1 < param_1)" (( "(") (binary_expression "-1 < param_1" (number_literal "-1") (< "<") (identifier "param_1")) () ")"))) () ")")) (compound_statement "{\n    if (*(int *)(PTR___environ_00145154 + -0x5448) != 0) {\n      *(int *)PTR_history_offset_00146190 = param_1;\n      return 1;\n    }\n    return 0;\n  }" ({ "{") (if_statement "if (*(int *)(PTR___environ_00145154 + -0x5448) != 0) {\n      *(int *)PTR_history_offset_00146190 = param_1;\n      return 1;\n    }" (if "if") (parenthesized_expression "(*(int *)(PTR___environ_00145154 + -0x5448) != 0)" (( "(") (binary_expression "*(int *)(PTR___environ_00145154 + -0x5448) != 0" (pointer_expression "*(int *)(PTR___environ_00145154 + -0x5448)" (* "*") (cast_expression "(int *)(PTR___environ_00145154 + -0x5448)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(PTR___environ_00145154 + -0x5448)" (( "(") (binary_expression "PTR___environ_00145154 + -0x5448" (identifier "PTR___environ_00145154") (+ "+") (number_literal "-0x5448")) () ")")))) (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n      *(int *)PTR_history_offset_00146190 = param_1;\n      return 1;\n    }" ({ "{") (expression_statement "*(int *)PTR_history_offset_00146190 = param_1;" (assignment_expression "*(int *)PTR_history_offset_00146190 = param_1" (pointer_expression "*(int *)PTR_history_offset_00146190" (* "*") (cast_expression "(int *)PTR_history_offset_00146190" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_history_offset_00146190"))) (= "=") (identifier "param_1")) (; ";")) (return_statement "return 1;" (return "return") (number_literal "1") (; ";")) (} "}"))) (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}"))) (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}")))

/* WARNING: Unknown calling convention */

int function_1(int var_1)

{
  if ((var_1 <= *(int *)PTR_history_length_001454d0) && (-1 < var_1)) {
    if (*(int *)(var_2 + -0x5448) != 0) {
      *(int *)PTR_history_offset_00146190 = var_1;
      return 1;
    }
    return 0;
  }
  return 0;
}


(translation_unit (function_definition type: (type_identifier) 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: (parenthesized_expression (binary_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (identifier))))) right: (parenthesized_expression (binary_expression left: (number_literal) right: (identifier))))) consequence: (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 (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (identifier))) right: (identifier))) (return_statement (number_literal)))) (return_statement (number_literal)))) (return_statement (number_literal)))))

undefined4 MASKED(int param_1)

{
  if ((param_1 <= *(int *)PTR_history_length_001454d0) && (-1 < param_1)) {
    if (*(int *)(PTR___environ_00145154 + -0x5448) != 0) {
      *(int *)PTR_history_offset_00146190 = param_1;
      return 1;
    }
    return 0;
  }
  return 0;
}

