
/* WARNING: Unknown calling convention */

HIST_ENTRY * previous_history(void)

{
  int iVar1;
  
  if (*(int *)PTR_history_offset_00146190 != 0) {
    iVar1 = *(int *)PTR_history_offset_00146190 + -1;
    *(int *)PTR_history_offset_00146190 = iVar1;
    return *(HIST_ENTRY **)(*(int *)(PTR___environ_00145154 + -0x5448) + iVar1 * 4);
  }
  return (HIST_ENTRY *)0x0;
}



undefined4 previous_history(void)

{
  int iVar1;
  
  if (*(int *)PTR_history_offset_00146190 != 0) {
    iVar1 = *(int *)PTR_history_offset_00146190 + -1;
    *(int *)PTR_history_offset_00146190 = iVar1;
    return *(undefined4 *)(*(int *)(PTR___environ_00145154 + -0x5448) + iVar1 * 4);
  }
  return 0;
}


lui gp,0x4
addiu gp,gp,0x26a8
addu gp,gp,t9
lw v1,-0x63b0(gp)
lw v0,0x0(v1)
beq v0,zero,0x00109ed4
_nop
addiu v0,v0,-0x1
sll a0,v0,0x2
sw v0,0x0(v1)
lw v0,-0x73ec(gp)
lw v0,-0x5448(v0)
addu v0,v0,a0
jr ra
_lw v0,0x0(v0)
jr ra
_or v0,zero,zero
(translation_unit "undefined4 previous_history(void)\n\n{\n  int iVar1;\n  \n  if (*(int *)PTR_history_offset_00146190 != 0) {\n    iVar1 = *(int *)PTR_history_offset_00146190 + -1;\n    *(int *)PTR_history_offset_00146190 = iVar1;\n    return *(undefined4 *)(*(int *)(PTR___environ_00145154 + -0x5448) + iVar1 * 4);\n  }\n  return 0;\n}\n\n" (function_definition "undefined4 previous_history(void)\n\n{\n  int iVar1;\n  \n  if (*(int *)PTR_history_offset_00146190 != 0) {\n    iVar1 = *(int *)PTR_history_offset_00146190 + -1;\n    *(int *)PTR_history_offset_00146190 = iVar1;\n    return *(undefined4 *)(*(int *)(PTR___environ_00145154 + -0x5448) + iVar1 * 4);\n  }\n  return 0;\n}" type_identifier (function_declarator "previous_history(void)" identifier (parameter_list "(void)" ( (parameter_declaration "void" primitive_type) ))) (compound_statement "{\n  int iVar1;\n  \n  if (*(int *)PTR_history_offset_00146190 != 0) {\n    iVar1 = *(int *)PTR_history_offset_00146190 + -1;\n    *(int *)PTR_history_offset_00146190 = iVar1;\n    return *(undefined4 *)(*(int *)(PTR___environ_00145154 + -0x5448) + iVar1 * 4);\n  }\n  return 0;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (if_statement "if (*(int *)PTR_history_offset_00146190 != 0) {\n    iVar1 = *(int *)PTR_history_offset_00146190 + -1;\n    *(int *)PTR_history_offset_00146190 = iVar1;\n    return *(undefined4 *)(*(int *)(PTR___environ_00145154 + -0x5448) + iVar1 * 4);\n  }" if (parenthesized_expression "(*(int *)PTR_history_offset_00146190 != 0)" ( (binary_expression "*(int *)PTR_history_offset_00146190 != 0" (pointer_expression "*(int *)PTR_history_offset_00146190" * (cast_expression "(int *)PTR_history_offset_00146190" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier)) != number_literal) )) (compound_statement "{\n    iVar1 = *(int *)PTR_history_offset_00146190 + -1;\n    *(int *)PTR_history_offset_00146190 = iVar1;\n    return *(undefined4 *)(*(int *)(PTR___environ_00145154 + -0x5448) + iVar1 * 4);\n  }" { (expression_statement "iVar1 = *(int *)PTR_history_offset_00146190 + -1;" (assignment_expression "iVar1 = *(int *)PTR_history_offset_00146190 + -1" identifier = (binary_expression "*(int *)PTR_history_offset_00146190 + -1" (pointer_expression "*(int *)PTR_history_offset_00146190" * (cast_expression "(int *)PTR_history_offset_00146190" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier)) + number_literal)) ;) (expression_statement "*(int *)PTR_history_offset_00146190 = iVar1;" (assignment_expression "*(int *)PTR_history_offset_00146190 = iVar1" (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 *(undefined4 *)(*(int *)(PTR___environ_00145154 + -0x5448) + iVar1 * 4);" return (pointer_expression "*(undefined4 *)(*(int *)(PTR___environ_00145154 + -0x5448) + iVar1 * 4)" * (cast_expression "(undefined4 *)(*(int *)(PTR___environ_00145154 + -0x5448) + iVar1 * 4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)(PTR___environ_00145154 + -0x5448) + iVar1 * 4)" ( (binary_expression "*(int *)(PTR___environ_00145154 + -0x5448) + iVar1 * 4" (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) )))) + (binary_expression "iVar1 * 4" identifier * number_literal)) )))) ;) })) (return_statement "return 0;" return number_literal ;) })))
(translation_unit "/* WARNING: Unknown calling convention */\n\nHIST_ENTRY * previous_history(void)\n\n{\n  int iVar1;\n  \n  if (*(int *)PTR_history_offset_00146190 != 0) {\n    iVar1 = *(int *)PTR_history_offset_00146190 + -1;\n    *(int *)PTR_history_offset_00146190 = iVar1;\n    return *(HIST_ENTRY **)(*(int *)(PTR___environ_00145154 + -0x5448) + iVar1 * 4);\n  }\n  return (HIST_ENTRY *)0x0;\n}\n\n" comment (function_definition "HIST_ENTRY * previous_history(void)\n\n{\n  int iVar1;\n  \n  if (*(int *)PTR_history_offset_00146190 != 0) {\n    iVar1 = *(int *)PTR_history_offset_00146190 + -1;\n    *(int *)PTR_history_offset_00146190 = iVar1;\n    return *(HIST_ENTRY **)(*(int *)(PTR___environ_00145154 + -0x5448) + iVar1 * 4);\n  }\n  return (HIST_ENTRY *)0x0;\n}" type_identifier (pointer_declarator "* previous_history(void)" * (function_declarator "previous_history(void)" identifier (parameter_list "(void)" ( (parameter_declaration "void" primitive_type) )))) (compound_statement "{\n  int iVar1;\n  \n  if (*(int *)PTR_history_offset_00146190 != 0) {\n    iVar1 = *(int *)PTR_history_offset_00146190 + -1;\n    *(int *)PTR_history_offset_00146190 = iVar1;\n    return *(HIST_ENTRY **)(*(int *)(PTR___environ_00145154 + -0x5448) + iVar1 * 4);\n  }\n  return (HIST_ENTRY *)0x0;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (if_statement "if (*(int *)PTR_history_offset_00146190 != 0) {\n    iVar1 = *(int *)PTR_history_offset_00146190 + -1;\n    *(int *)PTR_history_offset_00146190 = iVar1;\n    return *(HIST_ENTRY **)(*(int *)(PTR___environ_00145154 + -0x5448) + iVar1 * 4);\n  }" if (parenthesized_expression "(*(int *)PTR_history_offset_00146190 != 0)" ( (binary_expression "*(int *)PTR_history_offset_00146190 != 0" (pointer_expression "*(int *)PTR_history_offset_00146190" * (cast_expression "(int *)PTR_history_offset_00146190" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier)) != number_literal) )) (compound_statement "{\n    iVar1 = *(int *)PTR_history_offset_00146190 + -1;\n    *(int *)PTR_history_offset_00146190 = iVar1;\n    return *(HIST_ENTRY **)(*(int *)(PTR___environ_00145154 + -0x5448) + iVar1 * 4);\n  }" { (expression_statement "iVar1 = *(int *)PTR_history_offset_00146190 + -1;" (assignment_expression "iVar1 = *(int *)PTR_history_offset_00146190 + -1" identifier = (binary_expression "*(int *)PTR_history_offset_00146190 + -1" (pointer_expression "*(int *)PTR_history_offset_00146190" * (cast_expression "(int *)PTR_history_offset_00146190" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier)) + number_literal)) ;) (expression_statement "*(int *)PTR_history_offset_00146190 = iVar1;" (assignment_expression "*(int *)PTR_history_offset_00146190 = iVar1" (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 *(HIST_ENTRY **)(*(int *)(PTR___environ_00145154 + -0x5448) + iVar1 * 4);" return (pointer_expression "*(HIST_ENTRY **)(*(int *)(PTR___environ_00145154 + -0x5448) + iVar1 * 4)" * (cast_expression "(HIST_ENTRY **)(*(int *)(PTR___environ_00145154 + -0x5448) + iVar1 * 4)" ( (type_descriptor "HIST_ENTRY **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*(int *)(PTR___environ_00145154 + -0x5448) + iVar1 * 4)" ( (binary_expression "*(int *)(PTR___environ_00145154 + -0x5448) + iVar1 * 4" (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) )))) + (binary_expression "iVar1 * 4" identifier * number_literal)) )))) ;) })) (return_statement "return (HIST_ENTRY *)0x0;" return (cast_expression "(HIST_ENTRY *)0x0" ( (type_descriptor "HIST_ENTRY *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal) ;) })))
(translation_unit "undefined4 previous_history(void)\n\n{\n  int iVar1;\n  \n  if (*(int *)PTR_history_offset_00146190 != 0) {\n    iVar1 = *(int *)PTR_history_offset_00146190 + -1;\n    *(int *)PTR_history_offset_00146190 = iVar1;\n    return *(undefined4 *)(*(int *)(PTR___environ_00145154 + -0x5448) + iVar1 * 4);\n  }\n  return 0;\n}\n\n" (function_definition "undefined4 previous_history(void)\n\n{\n  int iVar1;\n  \n  if (*(int *)PTR_history_offset_00146190 != 0) {\n    iVar1 = *(int *)PTR_history_offset_00146190 + -1;\n    *(int *)PTR_history_offset_00146190 = iVar1;\n    return *(undefined4 *)(*(int *)(PTR___environ_00145154 + -0x5448) + iVar1 * 4);\n  }\n  return 0;\n}" type_identifier (function_declarator "previous_history(void)" identifier (parameter_list "(void)" ( (parameter_declaration "void" primitive_type) ))) (compound_statement "{\n  int iVar1;\n  \n  if (*(int *)PTR_history_offset_00146190 != 0) {\n    iVar1 = *(int *)PTR_history_offset_00146190 + -1;\n    *(int *)PTR_history_offset_00146190 = iVar1;\n    return *(undefined4 *)(*(int *)(PTR___environ_00145154 + -0x5448) + iVar1 * 4);\n  }\n  return 0;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (if_statement "if (*(int *)PTR_history_offset_00146190 != 0) {\n    iVar1 = *(int *)PTR_history_offset_00146190 + -1;\n    *(int *)PTR_history_offset_00146190 = iVar1;\n    return *(undefined4 *)(*(int *)(PTR___environ_00145154 + -0x5448) + iVar1 * 4);\n  }" if (parenthesized_expression "(*(int *)PTR_history_offset_00146190 != 0)" ( (binary_expression "*(int *)PTR_history_offset_00146190 != 0" (pointer_expression "*(int *)PTR_history_offset_00146190" * (cast_expression "(int *)PTR_history_offset_00146190" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier)) != number_literal) )) (compound_statement "{\n    iVar1 = *(int *)PTR_history_offset_00146190 + -1;\n    *(int *)PTR_history_offset_00146190 = iVar1;\n    return *(undefined4 *)(*(int *)(PTR___environ_00145154 + -0x5448) + iVar1 * 4);\n  }" { (expression_statement "iVar1 = *(int *)PTR_history_offset_00146190 + -1;" (assignment_expression "iVar1 = *(int *)PTR_history_offset_00146190 + -1" identifier = (binary_expression "*(int *)PTR_history_offset_00146190 + -1" (pointer_expression "*(int *)PTR_history_offset_00146190" * (cast_expression "(int *)PTR_history_offset_00146190" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier)) + number_literal)) ;) (expression_statement "*(int *)PTR_history_offset_00146190 = iVar1;" (assignment_expression "*(int *)PTR_history_offset_00146190 = iVar1" (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 *(undefined4 *)(*(int *)(PTR___environ_00145154 + -0x5448) + iVar1 * 4);" return (pointer_expression "*(undefined4 *)(*(int *)(PTR___environ_00145154 + -0x5448) + iVar1 * 4)" * (cast_expression "(undefined4 *)(*(int *)(PTR___environ_00145154 + -0x5448) + iVar1 * 4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)(PTR___environ_00145154 + -0x5448) + iVar1 * 4)" ( (binary_expression "*(int *)(PTR___environ_00145154 + -0x5448) + iVar1 * 4" (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) )))) + (binary_expression "iVar1 * 4" identifier * number_literal)) )))) ;) })) (return_statement "return 0;" return number_literal ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE) ))) (compound_statement { (declaration TYPE IDENT ;) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) != LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) + LIT)) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) = IDENT) ;) (return_statement return (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) + (binary_expression IDENT * LIT)) )))) ;) })) (return_statement return LIT ;) })))
(function_definition "undefined4 previous_history(void)\n\n{\n  int iVar1;\n  \n  if (*(int *)PTR_history_offset_00146190 != 0) {\n    iVar1 = *(int *)PTR_history_offset_00146190 + -1;\n    *(int *)PTR_history_offset_00146190 = iVar1;\n    return *(undefined4 *)(*(int *)(PTR___environ_00145154 + -0x5448) + iVar1 * 4);\n  }\n  return 0;\n}" (type_identifier "undefined4") (function_declarator "previous_history(void)" (identifier "previous_history") (parameter_list "(void)" (( "(") (parameter_declaration "void" (primitive_type "void")) () ")"))) (compound_statement "{\n  int iVar1;\n  \n  if (*(int *)PTR_history_offset_00146190 != 0) {\n    iVar1 = *(int *)PTR_history_offset_00146190 + -1;\n    *(int *)PTR_history_offset_00146190 = iVar1;\n    return *(undefined4 *)(*(int *)(PTR___environ_00145154 + -0x5448) + iVar1 * 4);\n  }\n  return 0;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (if_statement "if (*(int *)PTR_history_offset_00146190 != 0) {\n    iVar1 = *(int *)PTR_history_offset_00146190 + -1;\n    *(int *)PTR_history_offset_00146190 = iVar1;\n    return *(undefined4 *)(*(int *)(PTR___environ_00145154 + -0x5448) + iVar1 * 4);\n  }" (if "if") (parenthesized_expression "(*(int *)PTR_history_offset_00146190 != 0)" (( "(") (binary_expression "*(int *)PTR_history_offset_00146190 != 0" (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"))) (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    iVar1 = *(int *)PTR_history_offset_00146190 + -1;\n    *(int *)PTR_history_offset_00146190 = iVar1;\n    return *(undefined4 *)(*(int *)(PTR___environ_00145154 + -0x5448) + iVar1 * 4);\n  }" ({ "{") (expression_statement "iVar1 = *(int *)PTR_history_offset_00146190 + -1;" (assignment_expression "iVar1 = *(int *)PTR_history_offset_00146190 + -1" (identifier "iVar1") (= "=") (binary_expression "*(int *)PTR_history_offset_00146190 + -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"))) (+ "+") (number_literal "-1"))) (; ";")) (expression_statement "*(int *)PTR_history_offset_00146190 = iVar1;" (assignment_expression "*(int *)PTR_history_offset_00146190 = iVar1" (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 "iVar1")) (; ";")) (return_statement "return *(undefined4 *)(*(int *)(PTR___environ_00145154 + -0x5448) + iVar1 * 4);" (return "return") (pointer_expression "*(undefined4 *)(*(int *)(PTR___environ_00145154 + -0x5448) + iVar1 * 4)" (* "*") (cast_expression "(undefined4 *)(*(int *)(PTR___environ_00145154 + -0x5448) + iVar1 * 4)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(*(int *)(PTR___environ_00145154 + -0x5448) + iVar1 * 4)" (( "(") (binary_expression "*(int *)(PTR___environ_00145154 + -0x5448) + iVar1 * 4" (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")) () ")")))) (+ "+") (binary_expression "iVar1 * 4" (identifier "iVar1") (* "*") (number_literal "4"))) () ")")))) (; ";")) (} "}"))) (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}")))
(translation_unit (function_definition type: (type_identifier) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (primitive_type)))) body: (compound_statement (declaration type: (primitive_type) 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: (identifier))) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (identifier))) right: (number_literal)))) (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 (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (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: (binary_expression left: (identifier) right: (number_literal))))))))) (return_statement (number_literal)))))

undefined4 MASKED(void)

{
  int iVar1;
  
  if (*(int *)PTR_history_offset_00146190 != 0) {
    iVar1 = *(int *)PTR_history_offset_00146190 + -1;
    *(int *)PTR_history_offset_00146190 = iVar1;
    return *(undefined4 *)(*(int *)(PTR___environ_00145154 + -0x5448) + iVar1 * 4);
  }
  return 0;
}

