
/* WARNING: Unknown calling convention */

void shell_ungetc(int c)

{
  long lVar1;
  
  if ((shell_input_line != (char *)0x0) && (shell_input_line_index != 0)) {
    lVar1 = shell_input_line_index - 1;
    shell_input_line_index = shell_input_line_index - 1;
    shell_input_line[lVar1] = (char)c;
    return;
  }
  eol_ungetc_lookahead = c;
  return;
}



void FUN_00130a73(undefined4 param_1)

{
  undefined1 *puVar1;
  
  if ((DAT_00213168 != 0) && (DAT_00213160 != 0)) {
    puVar1 = (undefined1 *)(DAT_00213168 + -1 + DAT_00213160);
    DAT_00213160 = DAT_00213160 + -1;
    *puVar1 = (char)param_1;
    return;
  }
  DAT_00212ef0 = param_1;
  return;
}


MOV RAX,qword ptr [0x00213168]
TEST RAX,RAX
JZ 0x00130a9c
MOV RDX,qword ptr [0x00213160]
TEST RDX,RDX
JZ 0x00130a9c
LEA RCX,[RDX + -0x1]
MOV qword ptr [0x00213160],RCX
MOV byte ptr [RAX + RDX*0x1 + -0x1],DIL
RET
MOV dword ptr [0x00212ef0],EDI
RET
(translation_unit "void FUN_00130a73(undefined4 param_1)\n\n{\n  undefined1 *puVar1;\n  \n  if ((DAT_00213168 != 0) && (DAT_00213160 != 0)) {\n    puVar1 = (undefined1 *)(DAT_00213168 + -1 + DAT_00213160);\n    DAT_00213160 = DAT_00213160 + -1;\n    *puVar1 = (char)param_1;\n    return;\n  }\n  DAT_00212ef0 = param_1;\n  return;\n}\n\n" (function_definition "void FUN_00130a73(undefined4 param_1)\n\n{\n  undefined1 *puVar1;\n  \n  if ((DAT_00213168 != 0) && (DAT_00213160 != 0)) {\n    puVar1 = (undefined1 *)(DAT_00213168 + -1 + DAT_00213160);\n    DAT_00213160 = DAT_00213160 + -1;\n    *puVar1 = (char)param_1;\n    return;\n  }\n  DAT_00212ef0 = param_1;\n  return;\n}" primitive_type (function_declarator "FUN_00130a73(undefined4 param_1)" identifier (parameter_list "(undefined4 param_1)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) ))) (compound_statement "{\n  undefined1 *puVar1;\n  \n  if ((DAT_00213168 != 0) && (DAT_00213160 != 0)) {\n    puVar1 = (undefined1 *)(DAT_00213168 + -1 + DAT_00213160);\n    DAT_00213160 = DAT_00213160 + -1;\n    *puVar1 = (char)param_1;\n    return;\n  }\n  DAT_00212ef0 = param_1;\n  return;\n}" { (declaration "undefined1 *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (if_statement "if ((DAT_00213168 != 0) && (DAT_00213160 != 0)) {\n    puVar1 = (undefined1 *)(DAT_00213168 + -1 + DAT_00213160);\n    DAT_00213160 = DAT_00213160 + -1;\n    *puVar1 = (char)param_1;\n    return;\n  }" if (parenthesized_expression "((DAT_00213168 != 0) && (DAT_00213160 != 0))" ( (binary_expression "(DAT_00213168 != 0) && (DAT_00213160 != 0)" (parenthesized_expression "(DAT_00213168 != 0)" ( (binary_expression "DAT_00213168 != 0" identifier != number_literal) )) && (parenthesized_expression "(DAT_00213160 != 0)" ( (binary_expression "DAT_00213160 != 0" identifier != number_literal) ))) )) (compound_statement "{\n    puVar1 = (undefined1 *)(DAT_00213168 + -1 + DAT_00213160);\n    DAT_00213160 = DAT_00213160 + -1;\n    *puVar1 = (char)param_1;\n    return;\n  }" { (expression_statement "puVar1 = (undefined1 *)(DAT_00213168 + -1 + DAT_00213160);" (assignment_expression "puVar1 = (undefined1 *)(DAT_00213168 + -1 + DAT_00213160)" identifier = (cast_expression "(undefined1 *)(DAT_00213168 + -1 + DAT_00213160)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(DAT_00213168 + -1 + DAT_00213160)" ( (binary_expression "DAT_00213168 + -1 + DAT_00213160" (binary_expression "DAT_00213168 + -1" identifier + number_literal) + identifier) )))) ;) (expression_statement "DAT_00213160 = DAT_00213160 + -1;" (assignment_expression "DAT_00213160 = DAT_00213160 + -1" identifier = (binary_expression "DAT_00213160 + -1" identifier + number_literal)) ;) (expression_statement "*puVar1 = (char)param_1;" (assignment_expression "*puVar1 = (char)param_1" (pointer_expression "*puVar1" * identifier) = (cast_expression "(char)param_1" ( (type_descriptor "char" primitive_type) ) identifier)) ;) (return_statement "return;" return ;) })) (expression_statement "DAT_00212ef0 = param_1;" (assignment_expression "DAT_00212ef0 = param_1" identifier = identifier) ;) (return_statement "return;" return ;) })))
(translation_unit "/* WARNING: Unknown calling convention */\n\nvoid shell_ungetc(int c)\n\n{\n  long lVar1;\n  \n  if ((shell_input_line != (char *)0x0) && (shell_input_line_index != 0)) {\n    lVar1 = shell_input_line_index - 1;\n    shell_input_line_index = shell_input_line_index - 1;\n    shell_input_line[lVar1] = (char)c;\n    return;\n  }\n  eol_ungetc_lookahead = c;\n  return;\n}\n\n" comment (function_definition "void shell_ungetc(int c)\n\n{\n  long lVar1;\n  \n  if ((shell_input_line != (char *)0x0) && (shell_input_line_index != 0)) {\n    lVar1 = shell_input_line_index - 1;\n    shell_input_line_index = shell_input_line_index - 1;\n    shell_input_line[lVar1] = (char)c;\n    return;\n  }\n  eol_ungetc_lookahead = c;\n  return;\n}" primitive_type (function_declarator "shell_ungetc(int c)" identifier (parameter_list "(int c)" ( (parameter_declaration "int c" primitive_type identifier) ))) (compound_statement "{\n  long lVar1;\n  \n  if ((shell_input_line != (char *)0x0) && (shell_input_line_index != 0)) {\n    lVar1 = shell_input_line_index - 1;\n    shell_input_line_index = shell_input_line_index - 1;\n    shell_input_line[lVar1] = (char)c;\n    return;\n  }\n  eol_ungetc_lookahead = c;\n  return;\n}" { (declaration "long lVar1;" (sized_type_specifier "long" long) identifier ;) (if_statement "if ((shell_input_line != (char *)0x0) && (shell_input_line_index != 0)) {\n    lVar1 = shell_input_line_index - 1;\n    shell_input_line_index = shell_input_line_index - 1;\n    shell_input_line[lVar1] = (char)c;\n    return;\n  }" if (parenthesized_expression "((shell_input_line != (char *)0x0) && (shell_input_line_index != 0))" ( (binary_expression "(shell_input_line != (char *)0x0) && (shell_input_line_index != 0)" (parenthesized_expression "(shell_input_line != (char *)0x0)" ( (binary_expression "shell_input_line != (char *)0x0" identifier != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) && (parenthesized_expression "(shell_input_line_index != 0)" ( (binary_expression "shell_input_line_index != 0" identifier != number_literal) ))) )) (compound_statement "{\n    lVar1 = shell_input_line_index - 1;\n    shell_input_line_index = shell_input_line_index - 1;\n    shell_input_line[lVar1] = (char)c;\n    return;\n  }" { (expression_statement "lVar1 = shell_input_line_index - 1;" (assignment_expression "lVar1 = shell_input_line_index - 1" identifier = (binary_expression "shell_input_line_index - 1" identifier - number_literal)) ;) (expression_statement "shell_input_line_index = shell_input_line_index - 1;" (assignment_expression "shell_input_line_index = shell_input_line_index - 1" identifier = (binary_expression "shell_input_line_index - 1" identifier - number_literal)) ;) (expression_statement "shell_input_line[lVar1] = (char)c;" (assignment_expression "shell_input_line[lVar1] = (char)c" (subscript_expression "shell_input_line[lVar1]" identifier [ identifier ]) = (cast_expression "(char)c" ( (type_descriptor "char" primitive_type) ) identifier)) ;) (return_statement "return;" return ;) })) (expression_statement "eol_ungetc_lookahead = c;" (assignment_expression "eol_ungetc_lookahead = c" identifier = identifier) ;) (return_statement "return;" return ;) })))
(translation_unit "void FUN_00130a73(undefined4 param_1)\n\n{\n  undefined1 *puVar1;\n  \n  if ((DAT_00213168 != 0) && (DAT_00213160 != 0)) {\n    puVar1 = (undefined1 *)(DAT_00213168 + -1 + DAT_00213160);\n    DAT_00213160 = DAT_00213160 + -1;\n    *puVar1 = (char)param_1;\n    return;\n  }\n  DAT_00212ef0 = param_1;\n  return;\n}\n\n" (function_definition "void FUN_00130a73(undefined4 param_1)\n\n{\n  undefined1 *puVar1;\n  \n  if ((DAT_00213168 != 0) && (DAT_00213160 != 0)) {\n    puVar1 = (undefined1 *)(DAT_00213168 + -1 + DAT_00213160);\n    DAT_00213160 = DAT_00213160 + -1;\n    *puVar1 = (char)param_1;\n    return;\n  }\n  DAT_00212ef0 = param_1;\n  return;\n}" primitive_type (function_declarator "FUN_00130a73(undefined4 param_1)" identifier (parameter_list "(undefined4 param_1)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) ))) (compound_statement "{\n  undefined1 *puVar1;\n  \n  if ((DAT_00213168 != 0) && (DAT_00213160 != 0)) {\n    puVar1 = (undefined1 *)(DAT_00213168 + -1 + DAT_00213160);\n    DAT_00213160 = DAT_00213160 + -1;\n    *puVar1 = (char)param_1;\n    return;\n  }\n  DAT_00212ef0 = param_1;\n  return;\n}" { (declaration "undefined1 *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (if_statement "if ((DAT_00213168 != 0) && (DAT_00213160 != 0)) {\n    puVar1 = (undefined1 *)(DAT_00213168 + -1 + DAT_00213160);\n    DAT_00213160 = DAT_00213160 + -1;\n    *puVar1 = (char)param_1;\n    return;\n  }" if (parenthesized_expression "((DAT_00213168 != 0) && (DAT_00213160 != 0))" ( (binary_expression "(DAT_00213168 != 0) && (DAT_00213160 != 0)" (parenthesized_expression "(DAT_00213168 != 0)" ( (binary_expression "DAT_00213168 != 0" identifier != number_literal) )) && (parenthesized_expression "(DAT_00213160 != 0)" ( (binary_expression "DAT_00213160 != 0" identifier != number_literal) ))) )) (compound_statement "{\n    puVar1 = (undefined1 *)(DAT_00213168 + -1 + DAT_00213160);\n    DAT_00213160 = DAT_00213160 + -1;\n    *puVar1 = (char)param_1;\n    return;\n  }" { (expression_statement "puVar1 = (undefined1 *)(DAT_00213168 + -1 + DAT_00213160);" (assignment_expression "puVar1 = (undefined1 *)(DAT_00213168 + -1 + DAT_00213160)" identifier = (cast_expression "(undefined1 *)(DAT_00213168 + -1 + DAT_00213160)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(DAT_00213168 + -1 + DAT_00213160)" ( (binary_expression "DAT_00213168 + -1 + DAT_00213160" (binary_expression "DAT_00213168 + -1" identifier + number_literal) + identifier) )))) ;) (expression_statement "DAT_00213160 = DAT_00213160 + -1;" (assignment_expression "DAT_00213160 = DAT_00213160 + -1" identifier = (binary_expression "DAT_00213160 + -1" identifier + number_literal)) ;) (expression_statement "*puVar1 = (char)param_1;" (assignment_expression "*puVar1 = (char)param_1" (pointer_expression "*puVar1" * identifier) = (cast_expression "(char)param_1" ( (type_descriptor "char" primitive_type) ) identifier)) ;) (return_statement "return;" return ;) })) (expression_statement "DAT_00212ef0 = param_1;" (assignment_expression "DAT_00212ef0 = param_1" identifier = identifier) ;) (return_statement "return;" return ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT != LIT) )) && (parenthesized_expression ( (binary_expression IDENT != LIT) ))) )) (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (binary_expression IDENT + LIT) + IDENT) )))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = (cast_expression ( (type_descriptor TYPE) ) IDENT)) ;) (return_statement return ;) })) (expression_statement (assignment_expression IDENT = IDENT) ;) (return_statement return ;) })))
(function_definition "void FUN_00130a73(undefined4 param_1)\n\n{\n  undefined1 *puVar1;\n  \n  if ((DAT_00213168 != 0) && (DAT_00213160 != 0)) {\n    puVar1 = (undefined1 *)(DAT_00213168 + -1 + DAT_00213160);\n    DAT_00213160 = DAT_00213160 + -1;\n    *puVar1 = (char)param_1;\n    return;\n  }\n  DAT_00212ef0 = param_1;\n  return;\n}" (primitive_type "void") (function_declarator "FUN_00130a73(undefined4 param_1)" (identifier "FUN_00130a73") (parameter_list "(undefined4 param_1)" (( "(") (parameter_declaration "undefined4 param_1" (type_identifier "undefined4") (identifier "param_1")) () ")"))) (compound_statement "{\n  undefined1 *puVar1;\n  \n  if ((DAT_00213168 != 0) && (DAT_00213160 != 0)) {\n    puVar1 = (undefined1 *)(DAT_00213168 + -1 + DAT_00213160);\n    DAT_00213160 = DAT_00213160 + -1;\n    *puVar1 = (char)param_1;\n    return;\n  }\n  DAT_00212ef0 = param_1;\n  return;\n}" ({ "{") (declaration "undefined1 *puVar1;" (type_identifier "undefined1") (pointer_declarator "*puVar1" (* "*") (identifier "puVar1")) (; ";")) (if_statement "if ((DAT_00213168 != 0) && (DAT_00213160 != 0)) {\n    puVar1 = (undefined1 *)(DAT_00213168 + -1 + DAT_00213160);\n    DAT_00213160 = DAT_00213160 + -1;\n    *puVar1 = (char)param_1;\n    return;\n  }" (if "if") (parenthesized_expression "((DAT_00213168 != 0) && (DAT_00213160 != 0))" (( "(") (binary_expression "(DAT_00213168 != 0) && (DAT_00213160 != 0)" (parenthesized_expression "(DAT_00213168 != 0)" (( "(") (binary_expression "DAT_00213168 != 0" (identifier "DAT_00213168") (!= "!=") (number_literal "0")) () ")")) (&& "&&") (parenthesized_expression "(DAT_00213160 != 0)" (( "(") (binary_expression "DAT_00213160 != 0" (identifier "DAT_00213160") (!= "!=") (number_literal "0")) () ")"))) () ")")) (compound_statement "{\n    puVar1 = (undefined1 *)(DAT_00213168 + -1 + DAT_00213160);\n    DAT_00213160 = DAT_00213160 + -1;\n    *puVar1 = (char)param_1;\n    return;\n  }" ({ "{") (expression_statement "puVar1 = (undefined1 *)(DAT_00213168 + -1 + DAT_00213160);" (assignment_expression "puVar1 = (undefined1 *)(DAT_00213168 + -1 + DAT_00213160)" (identifier "puVar1") (= "=") (cast_expression "(undefined1 *)(DAT_00213168 + -1 + DAT_00213160)" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(DAT_00213168 + -1 + DAT_00213160)" (( "(") (binary_expression "DAT_00213168 + -1 + DAT_00213160" (binary_expression "DAT_00213168 + -1" (identifier "DAT_00213168") (+ "+") (number_literal "-1")) (+ "+") (identifier "DAT_00213160")) () ")")))) (; ";")) (expression_statement "DAT_00213160 = DAT_00213160 + -1;" (assignment_expression "DAT_00213160 = DAT_00213160 + -1" (identifier "DAT_00213160") (= "=") (binary_expression "DAT_00213160 + -1" (identifier "DAT_00213160") (+ "+") (number_literal "-1"))) (; ";")) (expression_statement "*puVar1 = (char)param_1;" (assignment_expression "*puVar1 = (char)param_1" (pointer_expression "*puVar1" (* "*") (identifier "puVar1")) (= "=") (cast_expression "(char)param_1" (( "(") (type_descriptor "char" (primitive_type "char")) () ")") (identifier "param_1"))) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}"))) (expression_statement "DAT_00212ef0 = param_1;" (assignment_expression "DAT_00212ef0 = param_1" (identifier "DAT_00212ef0") (= "=") (identifier "param_1")) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}")))

/* WARNING: Unknown calling convention */

void function_1(int c)

{
  long lVar1;
  
  if ((var_1 != (char *)0x0) && (var_2 != 0)) {
    lVar1 = var_2 - 1;
    var_2 = var_2 - 1;
    var_1[lVar1] = (char)c;
    return;
  }
  eol_ungetc_lookahead = c;
  return;
}


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

void MASKED(undefined4 param_1)

{
  undefined1 *puVar1;
  
  if ((DAT_00213168 != 0) && (DAT_00213160 != 0)) {
    puVar1 = (undefined1 *)(DAT_00213168 + -1 + DAT_00213160);
    DAT_00213160 = DAT_00213160 + -1;
    *puVar1 = (char)param_1;
    return;
  }
  DAT_00212ef0 = param_1;
  return;
}

