
/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* WARNING: Unknown calling convention -- yet parameter storage is locked */

void _rl_revert_all_lines(void)

{
  UNDO_LIST *pUVar1;
  size_t sVar2;
  char *pcVar3;
  char *pcVar4;
  int pos;
  HIST_ENTRY *entry;
  char *__dest;
  UNDO_LIST *pUVar5;
  
  pcVar4 = rl_line_buffer;
  sVar2 = strlen(rl_line_buffer);
  pcVar3 = (char *)xmalloc(sVar2 + 1);
  pcVar4 = strcpy(pcVar3,pcVar4);
  pUVar5 = rl_undo_list;
  pos = where_history();
  if (history_length == pos) goto LAB_000e4f28;
  entry = current_history();
  while (entry != (HIST_ENTRY *)0x0) {
    if ((UNDO_LIST *)entry->data != (UNDO_LIST *)0x0) {
      if ((UNDO_LIST *)entry->data == pUVar5) {
        pUVar5 = (UNDO_LIST *)0x0;
      }
      rl_replace_from_history(entry,0);
      pUVar1 = rl_undo_list;
      entry->data = (histdata_t)0x0;
      while (pUVar1 != (UNDO_LIST *)0x0) {
        rl_do_undo();
        pUVar1 = rl_undo_list;
      }
      if (entry->line != (char *)0x0) {
        free(entry->line);
      }
      pcVar3 = rl_line_buffer;
      sVar2 = strlen(rl_line_buffer);
      __dest = (char *)xmalloc(sVar2 + 1);
      pcVar3 = strcpy(__dest,pcVar3);
      entry->line = pcVar3;
    }
LAB_000e4f28:
    entry = previous_history();
  }
  rl_undo_list = pUVar5;
  history_set_pos(pos);
  rl_replace_line(pcVar4,0);
  _rl_set_the_line();
  xfree(pcVar4);
  return;
}



/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */

void _rl_revert_all_lines(void)

{
  int iVar1;
  size_t sVar2;
  char *pcVar3;
  char *pcVar4;
  int iVar5;
  undefined4 *puVar6;
  char *__dest;
  int iVar7;
  
  pcVar4 = rl_line_buffer;
  sVar2 = strlen(rl_line_buffer);
  pcVar3 = (char *)xmalloc(sVar2 + 1);
  pcVar4 = strcpy(pcVar3,pcVar4);
  iVar7 = rl_undo_list;
  iVar5 = where_history();
  if (history_length == iVar5) goto LAB_000e4f28;
  puVar6 = (undefined4 *)current_history();
  while (puVar6 != (undefined4 *)0x0) {
    if (puVar6[2] != 0) {
      if (puVar6[2] == iVar7) {
        iVar7 = 0;
      }
      rl_replace_from_history(puVar6,0);
      iVar1 = rl_undo_list;
      puVar6[2] = 0;
      while (iVar1 != 0) {
        rl_do_undo();
        iVar1 = rl_undo_list;
      }
      if ((void *)*puVar6 != (void *)0x0) {
        free((void *)*puVar6);
      }
      pcVar3 = rl_line_buffer;
      sVar2 = strlen(rl_line_buffer);
      __dest = (char *)xmalloc(sVar2 + 1);
      pcVar3 = strcpy(__dest,pcVar3);
      *puVar6 = pcVar3;
    }
LAB_000e4f28:
    puVar6 = (undefined4 *)previous_history();
  }
  rl_undo_list = iVar7;
  history_set_pos(iVar5);
  rl_replace_line(pcVar4,0);
  _rl_set_the_line();
  xfree(pcVar4);
  return;
}


PUSH EBP
PUSH EDI
PUSH ESI
PUSH EBX
CALL 0x00031ed0
ADD EBX,0x65137
SUB ESP,0x28
LEA EAX,[EBX + 0x7afc]
MOV ESI,dword ptr [EAX]
MOV dword ptr [ESP + 0x10],EAX
PUSH ESI
CALL 0x0002f760
ADD EAX,0x1
MOV dword ptr [ESP],EAX
CALL 0x00099200
POP EDX
POP ECX
PUSH ESI
PUSH EAX
CALL 0x0002f580
LEA EDI,[EBX + 0x8730]
MOV dword ptr [ESP + 0x1c],EAX
MOV EBP,dword ptr [EDI]
CALL 0x000e5530
MOV dword ptr [ESP + 0x18],EAX
MOV ECX,EAX
LEA EAX,[EBX + 0xdacc]
ADD ESP,0x10
CMP dword ptr [EAX],ECX
JZ 0x000e4f28
CALL 0x000e55b0
MOV ESI,EAX
JMP 0x000e4f2f
CALL 0x000e55f0
MOV ESI,EAX
TEST ESI,ESI
JZ 0x000e4fc0
MOV EAX,dword ptr [ESI + 0x8]
TEST EAX,EAX
JZ 0x000e4f28
CMP EAX,EBP
MOV EAX,0x0
CMOVZ EBP,EAX
SUB ESP,0x8
PUSH 0x0
PUSH ESI
CALL 0x000e4e50
MOV EAX,dword ptr [EDI]
MOV dword ptr [ESI + 0x8],0x0
ADD ESP,0x10
TEST EAX,EAX
JZ 0x000e4f73
LEA ESI,[ESI]
NOP
CALL 0x000de9f0
MOV ECX,dword ptr [EDI]
TEST ECX,ECX
JNZ 0x000e4f68
MOV EAX,dword ptr [ESI]
TEST EAX,EAX
JZ 0x000e4f85
SUB ESP,0xc
PUSH EAX
CALL 0x0002f200
ADD ESP,0x10
MOV EAX,dword ptr [ESP + 0x4]
SUB ESP,0xc
MOV EDX,dword ptr [EAX]
PUSH EDX
MOV dword ptr [ESP + 0x10],EDX
CALL 0x0002f760
ADD EAX,0x1
MOV dword ptr [ESP],EAX
CALL 0x00099200
POP ECX
POP EDX
MOV EDX,dword ptr [ESP + 0x8]
PUSH EDX
PUSH EAX
CALL 0x0002f580
ADD ESP,0x10
MOV dword ptr [ESI],EAX
JMP 0x000e4f28
SUB ESP,0xc
MOV dword ptr [EDI],EBP
PUSH dword ptr [ESP + 0x14]
CALL 0x000e5550
POP EAX
POP EDX
PUSH 0x0
MOV EDI,dword ptr [ESP + 0x18]
PUSH EDI
CALL 0x000e2740
CALL 0x000c46b0
MOV dword ptr [ESP],EDI
CALL 0x000992e0
ADD ESP,0x2c
POP EBX
POP ESI
POP EDI
POP EBP
RET
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nvoid _rl_revert_all_lines(void)\n\n{\n  int iVar1;\n  size_t sVar2;\n  char *pcVar3;\n  char *pcVar4;\n  int iVar5;\n  undefined4 *puVar6;\n  char *__dest;\n  int iVar7;\n  \n  pcVar4 = rl_line_buffer;\n  sVar2 = strlen(rl_line_buffer);\n  pcVar3 = (char *)xmalloc(sVar2 + 1);\n  pcVar4 = strcpy(pcVar3,pcVar4);\n  iVar7 = rl_undo_list;\n  iVar5 = where_history();\n  if (history_length == iVar5) goto LAB_000e4f28;\n  puVar6 = (undefined4 *)current_history();\n  while (puVar6 != (undefined4 *)0x0) {\n    if (puVar6[2] != 0) {\n      if (puVar6[2] == iVar7) {\n        iVar7 = 0;\n      }\n      rl_replace_from_history(puVar6,0);\n      iVar1 = rl_undo_list;\n      puVar6[2] = 0;\n      while (iVar1 != 0) {\n        rl_do_undo();\n        iVar1 = rl_undo_list;\n      }\n      if ((void *)*puVar6 != (void *)0x0) {\n        free((void *)*puVar6);\n      }\n      pcVar3 = rl_line_buffer;\n      sVar2 = strlen(rl_line_buffer);\n      __dest = (char *)xmalloc(sVar2 + 1);\n      pcVar3 = strcpy(__dest,pcVar3);\n      *puVar6 = pcVar3;\n    }\nLAB_000e4f28:\n    puVar6 = (undefined4 *)previous_history();\n  }\n  rl_undo_list = iVar7;\n  history_set_pos(iVar5);\n  rl_replace_line(pcVar4,0);\n  _rl_set_the_line();\n  xfree(pcVar4);\n  return;\n}\n\n" comment (function_definition "void _rl_revert_all_lines(void)\n\n{\n  int iVar1;\n  size_t sVar2;\n  char *pcVar3;\n  char *pcVar4;\n  int iVar5;\n  undefined4 *puVar6;\n  char *__dest;\n  int iVar7;\n  \n  pcVar4 = rl_line_buffer;\n  sVar2 = strlen(rl_line_buffer);\n  pcVar3 = (char *)xmalloc(sVar2 + 1);\n  pcVar4 = strcpy(pcVar3,pcVar4);\n  iVar7 = rl_undo_list;\n  iVar5 = where_history();\n  if (history_length == iVar5) goto LAB_000e4f28;\n  puVar6 = (undefined4 *)current_history();\n  while (puVar6 != (undefined4 *)0x0) {\n    if (puVar6[2] != 0) {\n      if (puVar6[2] == iVar7) {\n        iVar7 = 0;\n      }\n      rl_replace_from_history(puVar6,0);\n      iVar1 = rl_undo_list;\n      puVar6[2] = 0;\n      while (iVar1 != 0) {\n        rl_do_undo();\n        iVar1 = rl_undo_list;\n      }\n      if ((void *)*puVar6 != (void *)0x0) {\n        free((void *)*puVar6);\n      }\n      pcVar3 = rl_line_buffer;\n      sVar2 = strlen(rl_line_buffer);\n      __dest = (char *)xmalloc(sVar2 + 1);\n      pcVar3 = strcpy(__dest,pcVar3);\n      *puVar6 = pcVar3;\n    }\nLAB_000e4f28:\n    puVar6 = (undefined4 *)previous_history();\n  }\n  rl_undo_list = iVar7;\n  history_set_pos(iVar5);\n  rl_replace_line(pcVar4,0);\n  _rl_set_the_line();\n  xfree(pcVar4);\n  return;\n}" primitive_type (function_declarator "_rl_revert_all_lines(void)" identifier (parameter_list "(void)" ( (parameter_declaration "void" primitive_type) ))) (compound_statement "{\n  int iVar1;\n  size_t sVar2;\n  char *pcVar3;\n  char *pcVar4;\n  int iVar5;\n  undefined4 *puVar6;\n  char *__dest;\n  int iVar7;\n  \n  pcVar4 = rl_line_buffer;\n  sVar2 = strlen(rl_line_buffer);\n  pcVar3 = (char *)xmalloc(sVar2 + 1);\n  pcVar4 = strcpy(pcVar3,pcVar4);\n  iVar7 = rl_undo_list;\n  iVar5 = where_history();\n  if (history_length == iVar5) goto LAB_000e4f28;\n  puVar6 = (undefined4 *)current_history();\n  while (puVar6 != (undefined4 *)0x0) {\n    if (puVar6[2] != 0) {\n      if (puVar6[2] == iVar7) {\n        iVar7 = 0;\n      }\n      rl_replace_from_history(puVar6,0);\n      iVar1 = rl_undo_list;\n      puVar6[2] = 0;\n      while (iVar1 != 0) {\n        rl_do_undo();\n        iVar1 = rl_undo_list;\n      }\n      if ((void *)*puVar6 != (void *)0x0) {\n        free((void *)*puVar6);\n      }\n      pcVar3 = rl_line_buffer;\n      sVar2 = strlen(rl_line_buffer);\n      __dest = (char *)xmalloc(sVar2 + 1);\n      pcVar3 = strcpy(__dest,pcVar3);\n      *puVar6 = pcVar3;\n    }\nLAB_000e4f28:\n    puVar6 = (undefined4 *)previous_history();\n  }\n  rl_undo_list = iVar7;\n  history_set_pos(iVar5);\n  rl_replace_line(pcVar4,0);\n  _rl_set_the_line();\n  xfree(pcVar4);\n  return;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "size_t sVar2;" primitive_type identifier ;) (declaration "char *pcVar3;" primitive_type (pointer_declarator "*pcVar3" * identifier) ;) (declaration "char *pcVar4;" primitive_type (pointer_declarator "*pcVar4" * identifier) ;) (declaration "int iVar5;" primitive_type identifier ;) (declaration "undefined4 *puVar6;" type_identifier (pointer_declarator "*puVar6" * identifier) ;) (declaration "char *__dest;" primitive_type (pointer_declarator "*__dest" * identifier) ;) (declaration "int iVar7;" primitive_type identifier ;) (expression_statement "pcVar4 = rl_line_buffer;" (assignment_expression "pcVar4 = rl_line_buffer" identifier = identifier) ;) (expression_statement "sVar2 = strlen(rl_line_buffer);" (assignment_expression "sVar2 = strlen(rl_line_buffer)" identifier = (call_expression "strlen(rl_line_buffer)" identifier (argument_list "(rl_line_buffer)" ( identifier )))) ;) (expression_statement "pcVar3 = (char *)xmalloc(sVar2 + 1);" (assignment_expression "pcVar3 = (char *)xmalloc(sVar2 + 1)" identifier = (cast_expression "(char *)xmalloc(sVar2 + 1)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "xmalloc(sVar2 + 1)" identifier (argument_list "(sVar2 + 1)" ( (binary_expression "sVar2 + 1" identifier + number_literal) ))))) ;) (expression_statement "pcVar4 = strcpy(pcVar3,pcVar4);" (assignment_expression "pcVar4 = strcpy(pcVar3,pcVar4)" identifier = (call_expression "strcpy(pcVar3,pcVar4)" identifier (argument_list "(pcVar3,pcVar4)" ( identifier , identifier )))) ;) (expression_statement "iVar7 = rl_undo_list;" (assignment_expression "iVar7 = rl_undo_list" identifier = identifier) ;) (expression_statement "iVar5 = where_history();" (assignment_expression "iVar5 = where_history()" identifier = (call_expression "where_history()" identifier (argument_list "()" ( )))) ;) (if_statement "if (history_length == iVar5) goto LAB_000e4f28;" if (parenthesized_expression "(history_length == iVar5)" ( (binary_expression "history_length == iVar5" identifier == identifier) )) (goto_statement "goto LAB_000e4f28;" goto statement_identifier ;)) (expression_statement "puVar6 = (undefined4 *)current_history();" (assignment_expression "puVar6 = (undefined4 *)current_history()" identifier = (cast_expression "(undefined4 *)current_history()" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "current_history()" identifier (argument_list "()" ( ))))) ;) (while_statement "while (puVar6 != (undefined4 *)0x0) {\n    if (puVar6[2] != 0) {\n      if (puVar6[2] == iVar7) {\n        iVar7 = 0;\n      }\n      rl_replace_from_history(puVar6,0);\n      iVar1 = rl_undo_list;\n      puVar6[2] = 0;\n      while (iVar1 != 0) {\n        rl_do_undo();\n        iVar1 = rl_undo_list;\n      }\n      if ((void *)*puVar6 != (void *)0x0) {\n        free((void *)*puVar6);\n      }\n      pcVar3 = rl_line_buffer;\n      sVar2 = strlen(rl_line_buffer);\n      __dest = (char *)xmalloc(sVar2 + 1);\n      pcVar3 = strcpy(__dest,pcVar3);\n      *puVar6 = pcVar3;\n    }\nLAB_000e4f28:\n    puVar6 = (undefined4 *)previous_history();\n  }" while (parenthesized_expression "(puVar6 != (undefined4 *)0x0)" ( (binary_expression "puVar6 != (undefined4 *)0x0" identifier != (cast_expression "(undefined4 *)0x0" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    if (puVar6[2] != 0) {\n      if (puVar6[2] == iVar7) {\n        iVar7 = 0;\n      }\n      rl_replace_from_history(puVar6,0);\n      iVar1 = rl_undo_list;\n      puVar6[2] = 0;\n      while (iVar1 != 0) {\n        rl_do_undo();\n        iVar1 = rl_undo_list;\n      }\n      if ((void *)*puVar6 != (void *)0x0) {\n        free((void *)*puVar6);\n      }\n      pcVar3 = rl_line_buffer;\n      sVar2 = strlen(rl_line_buffer);\n      __dest = (char *)xmalloc(sVar2 + 1);\n      pcVar3 = strcpy(__dest,pcVar3);\n      *puVar6 = pcVar3;\n    }\nLAB_000e4f28:\n    puVar6 = (undefined4 *)previous_history();\n  }" { (if_statement "if (puVar6[2] != 0) {\n      if (puVar6[2] == iVar7) {\n        iVar7 = 0;\n      }\n      rl_replace_from_history(puVar6,0);\n      iVar1 = rl_undo_list;\n      puVar6[2] = 0;\n      while (iVar1 != 0) {\n        rl_do_undo();\n        iVar1 = rl_undo_list;\n      }\n      if ((void *)*puVar6 != (void *)0x0) {\n        free((void *)*puVar6);\n      }\n      pcVar3 = rl_line_buffer;\n      sVar2 = strlen(rl_line_buffer);\n      __dest = (char *)xmalloc(sVar2 + 1);\n      pcVar3 = strcpy(__dest,pcVar3);\n      *puVar6 = pcVar3;\n    }" if (parenthesized_expression "(puVar6[2] != 0)" ( (binary_expression "puVar6[2] != 0" (subscript_expression "puVar6[2]" identifier [ number_literal ]) != number_literal) )) (compound_statement "{\n      if (puVar6[2] == iVar7) {\n        iVar7 = 0;\n      }\n      rl_replace_from_history(puVar6,0);\n      iVar1 = rl_undo_list;\n      puVar6[2] = 0;\n      while (iVar1 != 0) {\n        rl_do_undo();\n        iVar1 = rl_undo_list;\n      }\n      if ((void *)*puVar6 != (void *)0x0) {\n        free((void *)*puVar6);\n      }\n      pcVar3 = rl_line_buffer;\n      sVar2 = strlen(rl_line_buffer);\n      __dest = (char *)xmalloc(sVar2 + 1);\n      pcVar3 = strcpy(__dest,pcVar3);\n      *puVar6 = pcVar3;\n    }" { (if_statement "if (puVar6[2] == iVar7) {\n        iVar7 = 0;\n      }" if (parenthesized_expression "(puVar6[2] == iVar7)" ( (binary_expression "puVar6[2] == iVar7" (subscript_expression "puVar6[2]" identifier [ number_literal ]) == identifier) )) (compound_statement "{\n        iVar7 = 0;\n      }" { (expression_statement "iVar7 = 0;" (assignment_expression "iVar7 = 0" identifier = number_literal) ;) })) (expression_statement "rl_replace_from_history(puVar6,0);" (call_expression "rl_replace_from_history(puVar6,0)" identifier (argument_list "(puVar6,0)" ( identifier , number_literal ))) ;) (expression_statement "iVar1 = rl_undo_list;" (assignment_expression "iVar1 = rl_undo_list" identifier = identifier) ;) (expression_statement "puVar6[2] = 0;" (assignment_expression "puVar6[2] = 0" (subscript_expression "puVar6[2]" identifier [ number_literal ]) = number_literal) ;) (while_statement "while (iVar1 != 0) {\n        rl_do_undo();\n        iVar1 = rl_undo_list;\n      }" while (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) (compound_statement "{\n        rl_do_undo();\n        iVar1 = rl_undo_list;\n      }" { (expression_statement "rl_do_undo();" (call_expression "rl_do_undo()" identifier (argument_list "()" ( ))) ;) (expression_statement "iVar1 = rl_undo_list;" (assignment_expression "iVar1 = rl_undo_list" identifier = identifier) ;) })) (if_statement "if ((void *)*puVar6 != (void *)0x0) {\n        free((void *)*puVar6);\n      }" if (parenthesized_expression "((void *)*puVar6 != (void *)0x0)" ( (binary_expression "(void *)*puVar6 != (void *)0x0" (cast_expression "(void *)*puVar6" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "*puVar6" * identifier)) != (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n        free((void *)*puVar6);\n      }" { (expression_statement "free((void *)*puVar6);" (call_expression "free((void *)*puVar6)" identifier (argument_list "((void *)*puVar6)" ( (cast_expression "(void *)*puVar6" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "*puVar6" * identifier)) ))) ;) })) (expression_statement "pcVar3 = rl_line_buffer;" (assignment_expression "pcVar3 = rl_line_buffer" identifier = identifier) ;) (expression_statement "sVar2 = strlen(rl_line_buffer);" (assignment_expression "sVar2 = strlen(rl_line_buffer)" identifier = (call_expression "strlen(rl_line_buffer)" identifier (argument_list "(rl_line_buffer)" ( identifier )))) ;) (expression_statement "__dest = (char *)xmalloc(sVar2 + 1);" (assignment_expression "__dest = (char *)xmalloc(sVar2 + 1)" identifier = (cast_expression "(char *)xmalloc(sVar2 + 1)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "xmalloc(sVar2 + 1)" identifier (argument_list "(sVar2 + 1)" ( (binary_expression "sVar2 + 1" identifier + number_literal) ))))) ;) (expression_statement "pcVar3 = strcpy(__dest,pcVar3);" (assignment_expression "pcVar3 = strcpy(__dest,pcVar3)" identifier = (call_expression "strcpy(__dest,pcVar3)" identifier (argument_list "(__dest,pcVar3)" ( identifier , identifier )))) ;) (expression_statement "*puVar6 = pcVar3;" (assignment_expression "*puVar6 = pcVar3" (pointer_expression "*puVar6" * identifier) = identifier) ;) })) (labeled_statement "LAB_000e4f28:\n    puVar6 = (undefined4 *)previous_history();" statement_identifier : (expression_statement "puVar6 = (undefined4 *)previous_history();" (assignment_expression "puVar6 = (undefined4 *)previous_history()" identifier = (cast_expression "(undefined4 *)previous_history()" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "previous_history()" identifier (argument_list "()" ( ))))) ;)) })) (expression_statement "rl_undo_list = iVar7;" (assignment_expression "rl_undo_list = iVar7" identifier = identifier) ;) (expression_statement "history_set_pos(iVar5);" (call_expression "history_set_pos(iVar5)" identifier (argument_list "(iVar5)" ( identifier ))) ;) (expression_statement "rl_replace_line(pcVar4,0);" (call_expression "rl_replace_line(pcVar4,0)" identifier (argument_list "(pcVar4,0)" ( identifier , number_literal ))) ;) (expression_statement "_rl_set_the_line();" (call_expression "_rl_set_the_line()" identifier (argument_list "()" ( ))) ;) (expression_statement "xfree(pcVar4);" (call_expression "xfree(pcVar4)" identifier (argument_list "(pcVar4)" ( identifier ))) ;) (return_statement "return;" return ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* WARNING: Unknown calling convention -- yet parameter storage is locked */\n\nvoid _rl_revert_all_lines(void)\n\n{\n  UNDO_LIST *pUVar1;\n  size_t sVar2;\n  char *pcVar3;\n  char *pcVar4;\n  int pos;\n  HIST_ENTRY *entry;\n  char *__dest;\n  UNDO_LIST *pUVar5;\n  \n  pcVar4 = rl_line_buffer;\n  sVar2 = strlen(rl_line_buffer);\n  pcVar3 = (char *)xmalloc(sVar2 + 1);\n  pcVar4 = strcpy(pcVar3,pcVar4);\n  pUVar5 = rl_undo_list;\n  pos = where_history();\n  if (history_length == pos) goto LAB_000e4f28;\n  entry = current_history();\n  while (entry != (HIST_ENTRY *)0x0) {\n    if ((UNDO_LIST *)entry->data != (UNDO_LIST *)0x0) {\n      if ((UNDO_LIST *)entry->data == pUVar5) {\n        pUVar5 = (UNDO_LIST *)0x0;\n      }\n      rl_replace_from_history(entry,0);\n      pUVar1 = rl_undo_list;\n      entry->data = (histdata_t)0x0;\n      while (pUVar1 != (UNDO_LIST *)0x0) {\n        rl_do_undo();\n        pUVar1 = rl_undo_list;\n      }\n      if (entry->line != (char *)0x0) {\n        free(entry->line);\n      }\n      pcVar3 = rl_line_buffer;\n      sVar2 = strlen(rl_line_buffer);\n      __dest = (char *)xmalloc(sVar2 + 1);\n      pcVar3 = strcpy(__dest,pcVar3);\n      entry->line = pcVar3;\n    }\nLAB_000e4f28:\n    entry = previous_history();\n  }\n  rl_undo_list = pUVar5;\n  history_set_pos(pos);\n  rl_replace_line(pcVar4,0);\n  _rl_set_the_line();\n  xfree(pcVar4);\n  return;\n}\n\n" comment comment (function_definition "void _rl_revert_all_lines(void)\n\n{\n  UNDO_LIST *pUVar1;\n  size_t sVar2;\n  char *pcVar3;\n  char *pcVar4;\n  int pos;\n  HIST_ENTRY *entry;\n  char *__dest;\n  UNDO_LIST *pUVar5;\n  \n  pcVar4 = rl_line_buffer;\n  sVar2 = strlen(rl_line_buffer);\n  pcVar3 = (char *)xmalloc(sVar2 + 1);\n  pcVar4 = strcpy(pcVar3,pcVar4);\n  pUVar5 = rl_undo_list;\n  pos = where_history();\n  if (history_length == pos) goto LAB_000e4f28;\n  entry = current_history();\n  while (entry != (HIST_ENTRY *)0x0) {\n    if ((UNDO_LIST *)entry->data != (UNDO_LIST *)0x0) {\n      if ((UNDO_LIST *)entry->data == pUVar5) {\n        pUVar5 = (UNDO_LIST *)0x0;\n      }\n      rl_replace_from_history(entry,0);\n      pUVar1 = rl_undo_list;\n      entry->data = (histdata_t)0x0;\n      while (pUVar1 != (UNDO_LIST *)0x0) {\n        rl_do_undo();\n        pUVar1 = rl_undo_list;\n      }\n      if (entry->line != (char *)0x0) {\n        free(entry->line);\n      }\n      pcVar3 = rl_line_buffer;\n      sVar2 = strlen(rl_line_buffer);\n      __dest = (char *)xmalloc(sVar2 + 1);\n      pcVar3 = strcpy(__dest,pcVar3);\n      entry->line = pcVar3;\n    }\nLAB_000e4f28:\n    entry = previous_history();\n  }\n  rl_undo_list = pUVar5;\n  history_set_pos(pos);\n  rl_replace_line(pcVar4,0);\n  _rl_set_the_line();\n  xfree(pcVar4);\n  return;\n}" primitive_type (function_declarator "_rl_revert_all_lines(void)" identifier (parameter_list "(void)" ( (parameter_declaration "void" primitive_type) ))) (compound_statement "{\n  UNDO_LIST *pUVar1;\n  size_t sVar2;\n  char *pcVar3;\n  char *pcVar4;\n  int pos;\n  HIST_ENTRY *entry;\n  char *__dest;\n  UNDO_LIST *pUVar5;\n  \n  pcVar4 = rl_line_buffer;\n  sVar2 = strlen(rl_line_buffer);\n  pcVar3 = (char *)xmalloc(sVar2 + 1);\n  pcVar4 = strcpy(pcVar3,pcVar4);\n  pUVar5 = rl_undo_list;\n  pos = where_history();\n  if (history_length == pos) goto LAB_000e4f28;\n  entry = current_history();\n  while (entry != (HIST_ENTRY *)0x0) {\n    if ((UNDO_LIST *)entry->data != (UNDO_LIST *)0x0) {\n      if ((UNDO_LIST *)entry->data == pUVar5) {\n        pUVar5 = (UNDO_LIST *)0x0;\n      }\n      rl_replace_from_history(entry,0);\n      pUVar1 = rl_undo_list;\n      entry->data = (histdata_t)0x0;\n      while (pUVar1 != (UNDO_LIST *)0x0) {\n        rl_do_undo();\n        pUVar1 = rl_undo_list;\n      }\n      if (entry->line != (char *)0x0) {\n        free(entry->line);\n      }\n      pcVar3 = rl_line_buffer;\n      sVar2 = strlen(rl_line_buffer);\n      __dest = (char *)xmalloc(sVar2 + 1);\n      pcVar3 = strcpy(__dest,pcVar3);\n      entry->line = pcVar3;\n    }\nLAB_000e4f28:\n    entry = previous_history();\n  }\n  rl_undo_list = pUVar5;\n  history_set_pos(pos);\n  rl_replace_line(pcVar4,0);\n  _rl_set_the_line();\n  xfree(pcVar4);\n  return;\n}" { (declaration "UNDO_LIST *pUVar1;" type_identifier (pointer_declarator "*pUVar1" * identifier) ;) (declaration "size_t sVar2;" primitive_type identifier ;) (declaration "char *pcVar3;" primitive_type (pointer_declarator "*pcVar3" * identifier) ;) (declaration "char *pcVar4;" primitive_type (pointer_declarator "*pcVar4" * identifier) ;) (declaration "int pos;" primitive_type identifier ;) (declaration "HIST_ENTRY *entry;" type_identifier (pointer_declarator "*entry" * identifier) ;) (declaration "char *__dest;" primitive_type (pointer_declarator "*__dest" * identifier) ;) (declaration "UNDO_LIST *pUVar5;" type_identifier (pointer_declarator "*pUVar5" * identifier) ;) (expression_statement "pcVar4 = rl_line_buffer;" (assignment_expression "pcVar4 = rl_line_buffer" identifier = identifier) ;) (expression_statement "sVar2 = strlen(rl_line_buffer);" (assignment_expression "sVar2 = strlen(rl_line_buffer)" identifier = (call_expression "strlen(rl_line_buffer)" identifier (argument_list "(rl_line_buffer)" ( identifier )))) ;) (expression_statement "pcVar3 = (char *)xmalloc(sVar2 + 1);" (assignment_expression "pcVar3 = (char *)xmalloc(sVar2 + 1)" identifier = (cast_expression "(char *)xmalloc(sVar2 + 1)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "xmalloc(sVar2 + 1)" identifier (argument_list "(sVar2 + 1)" ( (binary_expression "sVar2 + 1" identifier + number_literal) ))))) ;) (expression_statement "pcVar4 = strcpy(pcVar3,pcVar4);" (assignment_expression "pcVar4 = strcpy(pcVar3,pcVar4)" identifier = (call_expression "strcpy(pcVar3,pcVar4)" identifier (argument_list "(pcVar3,pcVar4)" ( identifier , identifier )))) ;) (expression_statement "pUVar5 = rl_undo_list;" (assignment_expression "pUVar5 = rl_undo_list" identifier = identifier) ;) (expression_statement "pos = where_history();" (assignment_expression "pos = where_history()" identifier = (call_expression "where_history()" identifier (argument_list "()" ( )))) ;) (if_statement "if (history_length == pos) goto LAB_000e4f28;" if (parenthesized_expression "(history_length == pos)" ( (binary_expression "history_length == pos" identifier == identifier) )) (goto_statement "goto LAB_000e4f28;" goto statement_identifier ;)) (expression_statement "entry = current_history();" (assignment_expression "entry = current_history()" identifier = (call_expression "current_history()" identifier (argument_list "()" ( )))) ;) (while_statement "while (entry != (HIST_ENTRY *)0x0) {\n    if ((UNDO_LIST *)entry->data != (UNDO_LIST *)0x0) {\n      if ((UNDO_LIST *)entry->data == pUVar5) {\n        pUVar5 = (UNDO_LIST *)0x0;\n      }\n      rl_replace_from_history(entry,0);\n      pUVar1 = rl_undo_list;\n      entry->data = (histdata_t)0x0;\n      while (pUVar1 != (UNDO_LIST *)0x0) {\n        rl_do_undo();\n        pUVar1 = rl_undo_list;\n      }\n      if (entry->line != (char *)0x0) {\n        free(entry->line);\n      }\n      pcVar3 = rl_line_buffer;\n      sVar2 = strlen(rl_line_buffer);\n      __dest = (char *)xmalloc(sVar2 + 1);\n      pcVar3 = strcpy(__dest,pcVar3);\n      entry->line = pcVar3;\n    }\nLAB_000e4f28:\n    entry = previous_history();\n  }" while (parenthesized_expression "(entry != (HIST_ENTRY *)0x0)" ( (binary_expression "entry != (HIST_ENTRY *)0x0" identifier != (cast_expression "(HIST_ENTRY *)0x0" ( (type_descriptor "HIST_ENTRY *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    if ((UNDO_LIST *)entry->data != (UNDO_LIST *)0x0) {\n      if ((UNDO_LIST *)entry->data == pUVar5) {\n        pUVar5 = (UNDO_LIST *)0x0;\n      }\n      rl_replace_from_history(entry,0);\n      pUVar1 = rl_undo_list;\n      entry->data = (histdata_t)0x0;\n      while (pUVar1 != (UNDO_LIST *)0x0) {\n        rl_do_undo();\n        pUVar1 = rl_undo_list;\n      }\n      if (entry->line != (char *)0x0) {\n        free(entry->line);\n      }\n      pcVar3 = rl_line_buffer;\n      sVar2 = strlen(rl_line_buffer);\n      __dest = (char *)xmalloc(sVar2 + 1);\n      pcVar3 = strcpy(__dest,pcVar3);\n      entry->line = pcVar3;\n    }\nLAB_000e4f28:\n    entry = previous_history();\n  }" { (if_statement "if ((UNDO_LIST *)entry->data != (UNDO_LIST *)0x0) {\n      if ((UNDO_LIST *)entry->data == pUVar5) {\n        pUVar5 = (UNDO_LIST *)0x0;\n      }\n      rl_replace_from_history(entry,0);\n      pUVar1 = rl_undo_list;\n      entry->data = (histdata_t)0x0;\n      while (pUVar1 != (UNDO_LIST *)0x0) {\n        rl_do_undo();\n        pUVar1 = rl_undo_list;\n      }\n      if (entry->line != (char *)0x0) {\n        free(entry->line);\n      }\n      pcVar3 = rl_line_buffer;\n      sVar2 = strlen(rl_line_buffer);\n      __dest = (char *)xmalloc(sVar2 + 1);\n      pcVar3 = strcpy(__dest,pcVar3);\n      entry->line = pcVar3;\n    }" if (parenthesized_expression "((UNDO_LIST *)entry->data != (UNDO_LIST *)0x0)" ( (binary_expression "(UNDO_LIST *)entry->data != (UNDO_LIST *)0x0" (cast_expression "(UNDO_LIST *)entry->data" ( (type_descriptor "UNDO_LIST *" type_identifier (abstract_pointer_declarator "*" *)) ) (field_expression "entry->data" identifier -> field_identifier)) != (cast_expression "(UNDO_LIST *)0x0" ( (type_descriptor "UNDO_LIST *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      if ((UNDO_LIST *)entry->data == pUVar5) {\n        pUVar5 = (UNDO_LIST *)0x0;\n      }\n      rl_replace_from_history(entry,0);\n      pUVar1 = rl_undo_list;\n      entry->data = (histdata_t)0x0;\n      while (pUVar1 != (UNDO_LIST *)0x0) {\n        rl_do_undo();\n        pUVar1 = rl_undo_list;\n      }\n      if (entry->line != (char *)0x0) {\n        free(entry->line);\n      }\n      pcVar3 = rl_line_buffer;\n      sVar2 = strlen(rl_line_buffer);\n      __dest = (char *)xmalloc(sVar2 + 1);\n      pcVar3 = strcpy(__dest,pcVar3);\n      entry->line = pcVar3;\n    }" { (if_statement "if ((UNDO_LIST *)entry->data == pUVar5) {\n        pUVar5 = (UNDO_LIST *)0x0;\n      }" if (parenthesized_expression "((UNDO_LIST *)entry->data == pUVar5)" ( (binary_expression "(UNDO_LIST *)entry->data == pUVar5" (cast_expression "(UNDO_LIST *)entry->data" ( (type_descriptor "UNDO_LIST *" type_identifier (abstract_pointer_declarator "*" *)) ) (field_expression "entry->data" identifier -> field_identifier)) == identifier) )) (compound_statement "{\n        pUVar5 = (UNDO_LIST *)0x0;\n      }" { (expression_statement "pUVar5 = (UNDO_LIST *)0x0;" (assignment_expression "pUVar5 = (UNDO_LIST *)0x0" identifier = (cast_expression "(UNDO_LIST *)0x0" ( (type_descriptor "UNDO_LIST *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) ;) })) (expression_statement "rl_replace_from_history(entry,0);" (call_expression "rl_replace_from_history(entry,0)" identifier (argument_list "(entry,0)" ( identifier , number_literal ))) ;) (expression_statement "pUVar1 = rl_undo_list;" (assignment_expression "pUVar1 = rl_undo_list" identifier = identifier) ;) (expression_statement "entry->data = (histdata_t)0x0;" (assignment_expression "entry->data = (histdata_t)0x0" (field_expression "entry->data" identifier -> field_identifier) = (cast_expression "(histdata_t)0x0" ( (type_descriptor "histdata_t" type_identifier) ) number_literal)) ;) (while_statement "while (pUVar1 != (UNDO_LIST *)0x0) {\n        rl_do_undo();\n        pUVar1 = rl_undo_list;\n      }" while (parenthesized_expression "(pUVar1 != (UNDO_LIST *)0x0)" ( (binary_expression "pUVar1 != (UNDO_LIST *)0x0" identifier != (cast_expression "(UNDO_LIST *)0x0" ( (type_descriptor "UNDO_LIST *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n        rl_do_undo();\n        pUVar1 = rl_undo_list;\n      }" { (expression_statement "rl_do_undo();" (call_expression "rl_do_undo()" identifier (argument_list "()" ( ))) ;) (expression_statement "pUVar1 = rl_undo_list;" (assignment_expression "pUVar1 = rl_undo_list" identifier = identifier) ;) })) (if_statement "if (entry->line != (char *)0x0) {\n        free(entry->line);\n      }" if (parenthesized_expression "(entry->line != (char *)0x0)" ( (binary_expression "entry->line != (char *)0x0" (field_expression "entry->line" identifier -> field_identifier) != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n        free(entry->line);\n      }" { (expression_statement "free(entry->line);" (call_expression "free(entry->line)" identifier (argument_list "(entry->line)" ( (field_expression "entry->line" identifier -> field_identifier) ))) ;) })) (expression_statement "pcVar3 = rl_line_buffer;" (assignment_expression "pcVar3 = rl_line_buffer" identifier = identifier) ;) (expression_statement "sVar2 = strlen(rl_line_buffer);" (assignment_expression "sVar2 = strlen(rl_line_buffer)" identifier = (call_expression "strlen(rl_line_buffer)" identifier (argument_list "(rl_line_buffer)" ( identifier )))) ;) (expression_statement "__dest = (char *)xmalloc(sVar2 + 1);" (assignment_expression "__dest = (char *)xmalloc(sVar2 + 1)" identifier = (cast_expression "(char *)xmalloc(sVar2 + 1)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "xmalloc(sVar2 + 1)" identifier (argument_list "(sVar2 + 1)" ( (binary_expression "sVar2 + 1" identifier + number_literal) ))))) ;) (expression_statement "pcVar3 = strcpy(__dest,pcVar3);" (assignment_expression "pcVar3 = strcpy(__dest,pcVar3)" identifier = (call_expression "strcpy(__dest,pcVar3)" identifier (argument_list "(__dest,pcVar3)" ( identifier , identifier )))) ;) (expression_statement "entry->line = pcVar3;" (assignment_expression "entry->line = pcVar3" (field_expression "entry->line" identifier -> field_identifier) = identifier) ;) })) (labeled_statement "LAB_000e4f28:\n    entry = previous_history();" statement_identifier : (expression_statement "entry = previous_history();" (assignment_expression "entry = previous_history()" identifier = (call_expression "previous_history()" identifier (argument_list "()" ( )))) ;)) })) (expression_statement "rl_undo_list = pUVar5;" (assignment_expression "rl_undo_list = pUVar5" identifier = identifier) ;) (expression_statement "history_set_pos(pos);" (call_expression "history_set_pos(pos)" identifier (argument_list "(pos)" ( identifier ))) ;) (expression_statement "rl_replace_line(pcVar4,0);" (call_expression "rl_replace_line(pcVar4,0)" identifier (argument_list "(pcVar4,0)" ( identifier , number_literal ))) ;) (expression_statement "_rl_set_the_line();" (call_expression "_rl_set_the_line()" identifier (argument_list "()" ( ))) ;) (expression_statement "xfree(pcVar4);" (call_expression "xfree(pcVar4)" identifier (argument_list "(pcVar4)" ( identifier ))) ;) (return_statement "return;" return ;) })))
(translation_unit "void _rl_revert_all_lines(void)\n\n{\n  int iVar1;\n  size_t sVar2;\n  char *pcVar3;\n  char *pcVar4;\n  int iVar5;\n  undefined4 *puVar6;\n  char *__dest;\n  int iVar7;\n  \n  pcVar4 = rl_line_buffer;\n  sVar2 = strlen(rl_line_buffer);\n  pcVar3 = (char *)xmalloc(sVar2 + 1);\n  pcVar4 = strcpy(pcVar3,pcVar4);\n  iVar7 = rl_undo_list;\n  iVar5 = where_history();\n  if (history_length == iVar5) goto LAB_000e4f28;\n  puVar6 = (undefined4 *)current_history();\n  while (puVar6 != (undefined4 *)0x0) {\n    if (puVar6[2] != 0) {\n      if (puVar6[2] == iVar7) {\n        iVar7 = 0;\n      }\n      rl_replace_from_history(puVar6,0);\n      iVar1 = rl_undo_list;\n      puVar6[2] = 0;\n      while (iVar1 != 0) {\n        rl_do_undo();\n        iVar1 = rl_undo_list;\n      }\n      if ((void *)*puVar6 != (void *)0x0) {\n        free((void *)*puVar6);\n      }\n      pcVar3 = rl_line_buffer;\n      sVar2 = strlen(rl_line_buffer);\n      __dest = (char *)xmalloc(sVar2 + 1);\n      pcVar3 = strcpy(__dest,pcVar3);\n      *puVar6 = pcVar3;\n    }\nLAB_000e4f28:\n    puVar6 = (undefined4 *)previous_history();\n  }\n  rl_undo_list = iVar7;\n  history_set_pos(iVar5);\n  rl_replace_line(pcVar4,0);\n  _rl_set_the_line();\n  xfree(pcVar4);\n  return;\n}\n\n" (function_definition "void _rl_revert_all_lines(void)\n\n{\n  int iVar1;\n  size_t sVar2;\n  char *pcVar3;\n  char *pcVar4;\n  int iVar5;\n  undefined4 *puVar6;\n  char *__dest;\n  int iVar7;\n  \n  pcVar4 = rl_line_buffer;\n  sVar2 = strlen(rl_line_buffer);\n  pcVar3 = (char *)xmalloc(sVar2 + 1);\n  pcVar4 = strcpy(pcVar3,pcVar4);\n  iVar7 = rl_undo_list;\n  iVar5 = where_history();\n  if (history_length == iVar5) goto LAB_000e4f28;\n  puVar6 = (undefined4 *)current_history();\n  while (puVar6 != (undefined4 *)0x0) {\n    if (puVar6[2] != 0) {\n      if (puVar6[2] == iVar7) {\n        iVar7 = 0;\n      }\n      rl_replace_from_history(puVar6,0);\n      iVar1 = rl_undo_list;\n      puVar6[2] = 0;\n      while (iVar1 != 0) {\n        rl_do_undo();\n        iVar1 = rl_undo_list;\n      }\n      if ((void *)*puVar6 != (void *)0x0) {\n        free((void *)*puVar6);\n      }\n      pcVar3 = rl_line_buffer;\n      sVar2 = strlen(rl_line_buffer);\n      __dest = (char *)xmalloc(sVar2 + 1);\n      pcVar3 = strcpy(__dest,pcVar3);\n      *puVar6 = pcVar3;\n    }\nLAB_000e4f28:\n    puVar6 = (undefined4 *)previous_history();\n  }\n  rl_undo_list = iVar7;\n  history_set_pos(iVar5);\n  rl_replace_line(pcVar4,0);\n  _rl_set_the_line();\n  xfree(pcVar4);\n  return;\n}" primitive_type (function_declarator "_rl_revert_all_lines(void)" identifier (parameter_list "(void)" ( (parameter_declaration "void" primitive_type) ))) (compound_statement "{\n  int iVar1;\n  size_t sVar2;\n  char *pcVar3;\n  char *pcVar4;\n  int iVar5;\n  undefined4 *puVar6;\n  char *__dest;\n  int iVar7;\n  \n  pcVar4 = rl_line_buffer;\n  sVar2 = strlen(rl_line_buffer);\n  pcVar3 = (char *)xmalloc(sVar2 + 1);\n  pcVar4 = strcpy(pcVar3,pcVar4);\n  iVar7 = rl_undo_list;\n  iVar5 = where_history();\n  if (history_length == iVar5) goto LAB_000e4f28;\n  puVar6 = (undefined4 *)current_history();\n  while (puVar6 != (undefined4 *)0x0) {\n    if (puVar6[2] != 0) {\n      if (puVar6[2] == iVar7) {\n        iVar7 = 0;\n      }\n      rl_replace_from_history(puVar6,0);\n      iVar1 = rl_undo_list;\n      puVar6[2] = 0;\n      while (iVar1 != 0) {\n        rl_do_undo();\n        iVar1 = rl_undo_list;\n      }\n      if ((void *)*puVar6 != (void *)0x0) {\n        free((void *)*puVar6);\n      }\n      pcVar3 = rl_line_buffer;\n      sVar2 = strlen(rl_line_buffer);\n      __dest = (char *)xmalloc(sVar2 + 1);\n      pcVar3 = strcpy(__dest,pcVar3);\n      *puVar6 = pcVar3;\n    }\nLAB_000e4f28:\n    puVar6 = (undefined4 *)previous_history();\n  }\n  rl_undo_list = iVar7;\n  history_set_pos(iVar5);\n  rl_replace_line(pcVar4,0);\n  _rl_set_the_line();\n  xfree(pcVar4);\n  return;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "size_t sVar2;" primitive_type identifier ;) (declaration "char *pcVar3;" primitive_type (pointer_declarator "*pcVar3" * identifier) ;) (declaration "char *pcVar4;" primitive_type (pointer_declarator "*pcVar4" * identifier) ;) (declaration "int iVar5;" primitive_type identifier ;) (declaration "undefined4 *puVar6;" type_identifier (pointer_declarator "*puVar6" * identifier) ;) (declaration "char *__dest;" primitive_type (pointer_declarator "*__dest" * identifier) ;) (declaration "int iVar7;" primitive_type identifier ;) (expression_statement "pcVar4 = rl_line_buffer;" (assignment_expression "pcVar4 = rl_line_buffer" identifier = identifier) ;) (expression_statement "sVar2 = strlen(rl_line_buffer);" (assignment_expression "sVar2 = strlen(rl_line_buffer)" identifier = (call_expression "strlen(rl_line_buffer)" identifier (argument_list "(rl_line_buffer)" ( identifier )))) ;) (expression_statement "pcVar3 = (char *)xmalloc(sVar2 + 1);" (assignment_expression "pcVar3 = (char *)xmalloc(sVar2 + 1)" identifier = (cast_expression "(char *)xmalloc(sVar2 + 1)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "xmalloc(sVar2 + 1)" identifier (argument_list "(sVar2 + 1)" ( (binary_expression "sVar2 + 1" identifier + number_literal) ))))) ;) (expression_statement "pcVar4 = strcpy(pcVar3,pcVar4);" (assignment_expression "pcVar4 = strcpy(pcVar3,pcVar4)" identifier = (call_expression "strcpy(pcVar3,pcVar4)" identifier (argument_list "(pcVar3,pcVar4)" ( identifier , identifier )))) ;) (expression_statement "iVar7 = rl_undo_list;" (assignment_expression "iVar7 = rl_undo_list" identifier = identifier) ;) (expression_statement "iVar5 = where_history();" (assignment_expression "iVar5 = where_history()" identifier = (call_expression "where_history()" identifier (argument_list "()" ( )))) ;) (if_statement "if (history_length == iVar5) goto LAB_000e4f28;" if (parenthesized_expression "(history_length == iVar5)" ( (binary_expression "history_length == iVar5" identifier == identifier) )) (goto_statement "goto LAB_000e4f28;" goto statement_identifier ;)) (expression_statement "puVar6 = (undefined4 *)current_history();" (assignment_expression "puVar6 = (undefined4 *)current_history()" identifier = (cast_expression "(undefined4 *)current_history()" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "current_history()" identifier (argument_list "()" ( ))))) ;) (while_statement "while (puVar6 != (undefined4 *)0x0) {\n    if (puVar6[2] != 0) {\n      if (puVar6[2] == iVar7) {\n        iVar7 = 0;\n      }\n      rl_replace_from_history(puVar6,0);\n      iVar1 = rl_undo_list;\n      puVar6[2] = 0;\n      while (iVar1 != 0) {\n        rl_do_undo();\n        iVar1 = rl_undo_list;\n      }\n      if ((void *)*puVar6 != (void *)0x0) {\n        free((void *)*puVar6);\n      }\n      pcVar3 = rl_line_buffer;\n      sVar2 = strlen(rl_line_buffer);\n      __dest = (char *)xmalloc(sVar2 + 1);\n      pcVar3 = strcpy(__dest,pcVar3);\n      *puVar6 = pcVar3;\n    }\nLAB_000e4f28:\n    puVar6 = (undefined4 *)previous_history();\n  }" while (parenthesized_expression "(puVar6 != (undefined4 *)0x0)" ( (binary_expression "puVar6 != (undefined4 *)0x0" identifier != (cast_expression "(undefined4 *)0x0" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    if (puVar6[2] != 0) {\n      if (puVar6[2] == iVar7) {\n        iVar7 = 0;\n      }\n      rl_replace_from_history(puVar6,0);\n      iVar1 = rl_undo_list;\n      puVar6[2] = 0;\n      while (iVar1 != 0) {\n        rl_do_undo();\n        iVar1 = rl_undo_list;\n      }\n      if ((void *)*puVar6 != (void *)0x0) {\n        free((void *)*puVar6);\n      }\n      pcVar3 = rl_line_buffer;\n      sVar2 = strlen(rl_line_buffer);\n      __dest = (char *)xmalloc(sVar2 + 1);\n      pcVar3 = strcpy(__dest,pcVar3);\n      *puVar6 = pcVar3;\n    }\nLAB_000e4f28:\n    puVar6 = (undefined4 *)previous_history();\n  }" { (if_statement "if (puVar6[2] != 0) {\n      if (puVar6[2] == iVar7) {\n        iVar7 = 0;\n      }\n      rl_replace_from_history(puVar6,0);\n      iVar1 = rl_undo_list;\n      puVar6[2] = 0;\n      while (iVar1 != 0) {\n        rl_do_undo();\n        iVar1 = rl_undo_list;\n      }\n      if ((void *)*puVar6 != (void *)0x0) {\n        free((void *)*puVar6);\n      }\n      pcVar3 = rl_line_buffer;\n      sVar2 = strlen(rl_line_buffer);\n      __dest = (char *)xmalloc(sVar2 + 1);\n      pcVar3 = strcpy(__dest,pcVar3);\n      *puVar6 = pcVar3;\n    }" if (parenthesized_expression "(puVar6[2] != 0)" ( (binary_expression "puVar6[2] != 0" (subscript_expression "puVar6[2]" identifier [ number_literal ]) != number_literal) )) (compound_statement "{\n      if (puVar6[2] == iVar7) {\n        iVar7 = 0;\n      }\n      rl_replace_from_history(puVar6,0);\n      iVar1 = rl_undo_list;\n      puVar6[2] = 0;\n      while (iVar1 != 0) {\n        rl_do_undo();\n        iVar1 = rl_undo_list;\n      }\n      if ((void *)*puVar6 != (void *)0x0) {\n        free((void *)*puVar6);\n      }\n      pcVar3 = rl_line_buffer;\n      sVar2 = strlen(rl_line_buffer);\n      __dest = (char *)xmalloc(sVar2 + 1);\n      pcVar3 = strcpy(__dest,pcVar3);\n      *puVar6 = pcVar3;\n    }" { (if_statement "if (puVar6[2] == iVar7) {\n        iVar7 = 0;\n      }" if (parenthesized_expression "(puVar6[2] == iVar7)" ( (binary_expression "puVar6[2] == iVar7" (subscript_expression "puVar6[2]" identifier [ number_literal ]) == identifier) )) (compound_statement "{\n        iVar7 = 0;\n      }" { (expression_statement "iVar7 = 0;" (assignment_expression "iVar7 = 0" identifier = number_literal) ;) })) (expression_statement "rl_replace_from_history(puVar6,0);" (call_expression "rl_replace_from_history(puVar6,0)" identifier (argument_list "(puVar6,0)" ( identifier , number_literal ))) ;) (expression_statement "iVar1 = rl_undo_list;" (assignment_expression "iVar1 = rl_undo_list" identifier = identifier) ;) (expression_statement "puVar6[2] = 0;" (assignment_expression "puVar6[2] = 0" (subscript_expression "puVar6[2]" identifier [ number_literal ]) = number_literal) ;) (while_statement "while (iVar1 != 0) {\n        rl_do_undo();\n        iVar1 = rl_undo_list;\n      }" while (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) (compound_statement "{\n        rl_do_undo();\n        iVar1 = rl_undo_list;\n      }" { (expression_statement "rl_do_undo();" (call_expression "rl_do_undo()" identifier (argument_list "()" ( ))) ;) (expression_statement "iVar1 = rl_undo_list;" (assignment_expression "iVar1 = rl_undo_list" identifier = identifier) ;) })) (if_statement "if ((void *)*puVar6 != (void *)0x0) {\n        free((void *)*puVar6);\n      }" if (parenthesized_expression "((void *)*puVar6 != (void *)0x0)" ( (binary_expression "(void *)*puVar6 != (void *)0x0" (cast_expression "(void *)*puVar6" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "*puVar6" * identifier)) != (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n        free((void *)*puVar6);\n      }" { (expression_statement "free((void *)*puVar6);" (call_expression "free((void *)*puVar6)" identifier (argument_list "((void *)*puVar6)" ( (cast_expression "(void *)*puVar6" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "*puVar6" * identifier)) ))) ;) })) (expression_statement "pcVar3 = rl_line_buffer;" (assignment_expression "pcVar3 = rl_line_buffer" identifier = identifier) ;) (expression_statement "sVar2 = strlen(rl_line_buffer);" (assignment_expression "sVar2 = strlen(rl_line_buffer)" identifier = (call_expression "strlen(rl_line_buffer)" identifier (argument_list "(rl_line_buffer)" ( identifier )))) ;) (expression_statement "__dest = (char *)xmalloc(sVar2 + 1);" (assignment_expression "__dest = (char *)xmalloc(sVar2 + 1)" identifier = (cast_expression "(char *)xmalloc(sVar2 + 1)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "xmalloc(sVar2 + 1)" identifier (argument_list "(sVar2 + 1)" ( (binary_expression "sVar2 + 1" identifier + number_literal) ))))) ;) (expression_statement "pcVar3 = strcpy(__dest,pcVar3);" (assignment_expression "pcVar3 = strcpy(__dest,pcVar3)" identifier = (call_expression "strcpy(__dest,pcVar3)" identifier (argument_list "(__dest,pcVar3)" ( identifier , identifier )))) ;) (expression_statement "*puVar6 = pcVar3;" (assignment_expression "*puVar6 = pcVar3" (pointer_expression "*puVar6" * identifier) = identifier) ;) })) (labeled_statement "LAB_000e4f28:\n    puVar6 = (undefined4 *)previous_history();" statement_identifier : (expression_statement "puVar6 = (undefined4 *)previous_history();" (assignment_expression "puVar6 = (undefined4 *)previous_history()" identifier = (cast_expression "(undefined4 *)previous_history()" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "previous_history()" identifier (argument_list "()" ( ))))) ;)) })) (expression_statement "rl_undo_list = iVar7;" (assignment_expression "rl_undo_list = iVar7" identifier = identifier) ;) (expression_statement "history_set_pos(iVar5);" (call_expression "history_set_pos(iVar5)" identifier (argument_list "(iVar5)" ( identifier ))) ;) (expression_statement "rl_replace_line(pcVar4,0);" (call_expression "rl_replace_line(pcVar4,0)" identifier (argument_list "(pcVar4,0)" ( identifier , number_literal ))) ;) (expression_statement "_rl_set_the_line();" (call_expression "_rl_set_the_line()" identifier (argument_list "()" ( ))) ;) (expression_statement "xfree(pcVar4);" (call_expression "xfree(pcVar4)" identifier (argument_list "(pcVar4)" ( identifier ))) ;) (return_statement "return;" return ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT )))) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == IDENT) )) (goto_statement goto statement_identifier ;)) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( ))))) ;) (while_statement while (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) != LIT) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) == IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) })) (expression_statement (call_expression IDENT (argument_list ( IDENT , LIT ))) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;) (while_statement while (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( ))) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) })) (if_statement if (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (pointer_expression * IDENT)) != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (pointer_expression * IDENT)) ))) ;) })) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT )))) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) })) (labeled_statement statement_identifier : (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( ))))) ;)) })) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , LIT ))) ;) (expression_statement (call_expression IDENT (argument_list ( ))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (return_statement return ;) })))
(function_definition "void _rl_revert_all_lines(void)\n\n{\n  int iVar1;\n  size_t sVar2;\n  char *pcVar3;\n  char *pcVar4;\n  int iVar5;\n  undefined4 *puVar6;\n  char *__dest;\n  int iVar7;\n  \n  pcVar4 = rl_line_buffer;\n  sVar2 = strlen(rl_line_buffer);\n  pcVar3 = (char *)xmalloc(sVar2 + 1);\n  pcVar4 = strcpy(pcVar3,pcVar4);\n  iVar7 = rl_undo_list;\n  iVar5 = where_history();\n  if (history_length == iVar5) goto LAB_000e4f28;\n  puVar6 = (undefined4 *)current_history();\n  while (puVar6 != (undefined4 *)0x0) {\n    if (puVar6[2] != 0) {\n      if (puVar6[2] == iVar7) {\n        iVar7 = 0;\n      }\n      rl_replace_from_history(puVar6,0);\n      iVar1 = rl_undo_list;\n      puVar6[2] = 0;\n      while (iVar1 != 0) {\n        rl_do_undo();\n        iVar1 = rl_undo_list;\n      }\n      if ((void *)*puVar6 != (void *)0x0) {\n        free((void *)*puVar6);\n      }\n      pcVar3 = rl_line_buffer;\n      sVar2 = strlen(rl_line_buffer);\n      __dest = (char *)xmalloc(sVar2 + 1);\n      pcVar3 = strcpy(__dest,pcVar3);\n      *puVar6 = pcVar3;\n    }\nLAB_000e4f28:\n    puVar6 = (undefined4 *)previous_history();\n  }\n  rl_undo_list = iVar7;\n  history_set_pos(iVar5);\n  rl_replace_line(pcVar4,0);\n  _rl_set_the_line();\n  xfree(pcVar4);\n  return;\n}" (primitive_type "void") (function_declarator "_rl_revert_all_lines(void)" (identifier "_rl_revert_all_lines") (parameter_list "(void)" (( "(") (parameter_declaration "void" (primitive_type "void")) () ")"))) (compound_statement "{\n  int iVar1;\n  size_t sVar2;\n  char *pcVar3;\n  char *pcVar4;\n  int iVar5;\n  undefined4 *puVar6;\n  char *__dest;\n  int iVar7;\n  \n  pcVar4 = rl_line_buffer;\n  sVar2 = strlen(rl_line_buffer);\n  pcVar3 = (char *)xmalloc(sVar2 + 1);\n  pcVar4 = strcpy(pcVar3,pcVar4);\n  iVar7 = rl_undo_list;\n  iVar5 = where_history();\n  if (history_length == iVar5) goto LAB_000e4f28;\n  puVar6 = (undefined4 *)current_history();\n  while (puVar6 != (undefined4 *)0x0) {\n    if (puVar6[2] != 0) {\n      if (puVar6[2] == iVar7) {\n        iVar7 = 0;\n      }\n      rl_replace_from_history(puVar6,0);\n      iVar1 = rl_undo_list;\n      puVar6[2] = 0;\n      while (iVar1 != 0) {\n        rl_do_undo();\n        iVar1 = rl_undo_list;\n      }\n      if ((void *)*puVar6 != (void *)0x0) {\n        free((void *)*puVar6);\n      }\n      pcVar3 = rl_line_buffer;\n      sVar2 = strlen(rl_line_buffer);\n      __dest = (char *)xmalloc(sVar2 + 1);\n      pcVar3 = strcpy(__dest,pcVar3);\n      *puVar6 = pcVar3;\n    }\nLAB_000e4f28:\n    puVar6 = (undefined4 *)previous_history();\n  }\n  rl_undo_list = iVar7;\n  history_set_pos(iVar5);\n  rl_replace_line(pcVar4,0);\n  _rl_set_the_line();\n  xfree(pcVar4);\n  return;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "size_t sVar2;" (primitive_type "size_t") (identifier "sVar2") (; ";")) (declaration "char *pcVar3;" (primitive_type "char") (pointer_declarator "*pcVar3" (* "*") (identifier "pcVar3")) (; ";")) (declaration "char *pcVar4;" (primitive_type "char") (pointer_declarator "*pcVar4" (* "*") (identifier "pcVar4")) (; ";")) (declaration "int iVar5;" (primitive_type "int") (identifier "iVar5") (; ";")) (declaration "undefined4 *puVar6;" (type_identifier "undefined4") (pointer_declarator "*puVar6" (* "*") (identifier "puVar6")) (; ";")) (declaration "char *__dest;" (primitive_type "char") (pointer_declarator "*__dest" (* "*") (identifier "__dest")) (; ";")) (declaration "int iVar7;" (primitive_type "int") (identifier "iVar7") (; ";")) (expression_statement "pcVar4 = rl_line_buffer;" (assignment_expression "pcVar4 = rl_line_buffer" (identifier "pcVar4") (= "=") (identifier "rl_line_buffer")) (; ";")) (expression_statement "sVar2 = strlen(rl_line_buffer);" (assignment_expression "sVar2 = strlen(rl_line_buffer)" (identifier "sVar2") (= "=") (call_expression "strlen(rl_line_buffer)" (identifier "strlen") (argument_list "(rl_line_buffer)" (( "(") (identifier "rl_line_buffer") () ")")))) (; ";")) (expression_statement "pcVar3 = (char *)xmalloc(sVar2 + 1);" (assignment_expression "pcVar3 = (char *)xmalloc(sVar2 + 1)" (identifier "pcVar3") (= "=") (cast_expression "(char *)xmalloc(sVar2 + 1)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "xmalloc(sVar2 + 1)" (identifier "xmalloc") (argument_list "(sVar2 + 1)" (( "(") (binary_expression "sVar2 + 1" (identifier "sVar2") (+ "+") (number_literal "1")) () ")"))))) (; ";")) (expression_statement "pcVar4 = strcpy(pcVar3,pcVar4);" (assignment_expression "pcVar4 = strcpy(pcVar3,pcVar4)" (identifier "pcVar4") (= "=") (call_expression "strcpy(pcVar3,pcVar4)" (identifier "strcpy") (argument_list "(pcVar3,pcVar4)" (( "(") (identifier "pcVar3") (, ",") (identifier "pcVar4") () ")")))) (; ";")) (expression_statement "iVar7 = rl_undo_list;" (assignment_expression "iVar7 = rl_undo_list" (identifier "iVar7") (= "=") (identifier "rl_undo_list")) (; ";")) (expression_statement "iVar5 = where_history();" (assignment_expression "iVar5 = where_history()" (identifier "iVar5") (= "=") (call_expression "where_history()" (identifier "where_history") (argument_list "()" (( "(") () ")")))) (; ";")) (if_statement "if (history_length == iVar5) goto LAB_000e4f28;" (if "if") (parenthesized_expression "(history_length == iVar5)" (( "(") (binary_expression "history_length == iVar5" (identifier "history_length") (== "==") (identifier "iVar5")) () ")")) (goto_statement "goto LAB_000e4f28;" (goto "goto") (statement_identifier "LAB_000e4f28") (; ";"))) (expression_statement "puVar6 = (undefined4 *)current_history();" (assignment_expression "puVar6 = (undefined4 *)current_history()" (identifier "puVar6") (= "=") (cast_expression "(undefined4 *)current_history()" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "current_history()" (identifier "current_history") (argument_list "()" (( "(") () ")"))))) (; ";")) (while_statement "while (puVar6 != (undefined4 *)0x0) {\n    if (puVar6[2] != 0) {\n      if (puVar6[2] == iVar7) {\n        iVar7 = 0;\n      }\n      rl_replace_from_history(puVar6,0);\n      iVar1 = rl_undo_list;\n      puVar6[2] = 0;\n      while (iVar1 != 0) {\n        rl_do_undo();\n        iVar1 = rl_undo_list;\n      }\n      if ((void *)*puVar6 != (void *)0x0) {\n        free((void *)*puVar6);\n      }\n      pcVar3 = rl_line_buffer;\n      sVar2 = strlen(rl_line_buffer);\n      __dest = (char *)xmalloc(sVar2 + 1);\n      pcVar3 = strcpy(__dest,pcVar3);\n      *puVar6 = pcVar3;\n    }\nLAB_000e4f28:\n    puVar6 = (undefined4 *)previous_history();\n  }" (while "while") (parenthesized_expression "(puVar6 != (undefined4 *)0x0)" (( "(") (binary_expression "puVar6 != (undefined4 *)0x0" (identifier "puVar6") (!= "!=") (cast_expression "(undefined4 *)0x0" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n    if (puVar6[2] != 0) {\n      if (puVar6[2] == iVar7) {\n        iVar7 = 0;\n      }\n      rl_replace_from_history(puVar6,0);\n      iVar1 = rl_undo_list;\n      puVar6[2] = 0;\n      while (iVar1 != 0) {\n        rl_do_undo();\n        iVar1 = rl_undo_list;\n      }\n      if ((void *)*puVar6 != (void *)0x0) {\n        free((void *)*puVar6);\n      }\n      pcVar3 = rl_line_buffer;\n      sVar2 = strlen(rl_line_buffer);\n      __dest = (char *)xmalloc(sVar2 + 1);\n      pcVar3 = strcpy(__dest,pcVar3);\n      *puVar6 = pcVar3;\n    }\nLAB_000e4f28:\n    puVar6 = (undefined4 *)previous_history();\n  }" ({ "{") (if_statement "if (puVar6[2] != 0) {\n      if (puVar6[2] == iVar7) {\n        iVar7 = 0;\n      }\n      rl_replace_from_history(puVar6,0);\n      iVar1 = rl_undo_list;\n      puVar6[2] = 0;\n      while (iVar1 != 0) {\n        rl_do_undo();\n        iVar1 = rl_undo_list;\n      }\n      if ((void *)*puVar6 != (void *)0x0) {\n        free((void *)*puVar6);\n      }\n      pcVar3 = rl_line_buffer;\n      sVar2 = strlen(rl_line_buffer);\n      __dest = (char *)xmalloc(sVar2 + 1);\n      pcVar3 = strcpy(__dest,pcVar3);\n      *puVar6 = pcVar3;\n    }" (if "if") (parenthesized_expression "(puVar6[2] != 0)" (( "(") (binary_expression "puVar6[2] != 0" (subscript_expression "puVar6[2]" (identifier "puVar6") ([ "[") (number_literal "2") (] "]")) (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n      if (puVar6[2] == iVar7) {\n        iVar7 = 0;\n      }\n      rl_replace_from_history(puVar6,0);\n      iVar1 = rl_undo_list;\n      puVar6[2] = 0;\n      while (iVar1 != 0) {\n        rl_do_undo();\n        iVar1 = rl_undo_list;\n      }\n      if ((void *)*puVar6 != (void *)0x0) {\n        free((void *)*puVar6);\n      }\n      pcVar3 = rl_line_buffer;\n      sVar2 = strlen(rl_line_buffer);\n      __dest = (char *)xmalloc(sVar2 + 1);\n      pcVar3 = strcpy(__dest,pcVar3);\n      *puVar6 = pcVar3;\n    }" ({ "{") (if_statement "if (puVar6[2] == iVar7) {\n        iVar7 = 0;\n      }" (if "if") (parenthesized_expression "(puVar6[2] == iVar7)" (( "(") (binary_expression "puVar6[2] == iVar7" (subscript_expression "puVar6[2]" (identifier "puVar6") ([ "[") (number_literal "2") (] "]")) (== "==") (identifier "iVar7")) () ")")) (compound_statement "{\n        iVar7 = 0;\n      }" ({ "{") (expression_statement "iVar7 = 0;" (assignment_expression "iVar7 = 0" (identifier "iVar7") (= "=") (number_literal "0")) (; ";")) (} "}"))) (expression_statement "rl_replace_from_history(puVar6,0);" (call_expression "rl_replace_from_history(puVar6,0)" (identifier "rl_replace_from_history") (argument_list "(puVar6,0)" (( "(") (identifier "puVar6") (, ",") (number_literal "0") () ")"))) (; ";")) (expression_statement "iVar1 = rl_undo_list;" (assignment_expression "iVar1 = rl_undo_list" (identifier "iVar1") (= "=") (identifier "rl_undo_list")) (; ";")) (expression_statement "puVar6[2] = 0;" (assignment_expression "puVar6[2] = 0" (subscript_expression "puVar6[2]" (identifier "puVar6") ([ "[") (number_literal "2") (] "]")) (= "=") (number_literal "0")) (; ";")) (while_statement "while (iVar1 != 0) {\n        rl_do_undo();\n        iVar1 = rl_undo_list;\n      }" (while "while") (parenthesized_expression "(iVar1 != 0)" (( "(") (binary_expression "iVar1 != 0" (identifier "iVar1") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n        rl_do_undo();\n        iVar1 = rl_undo_list;\n      }" ({ "{") (expression_statement "rl_do_undo();" (call_expression "rl_do_undo()" (identifier "rl_do_undo") (argument_list "()" (( "(") () ")"))) (; ";")) (expression_statement "iVar1 = rl_undo_list;" (assignment_expression "iVar1 = rl_undo_list" (identifier "iVar1") (= "=") (identifier "rl_undo_list")) (; ";")) (} "}"))) (if_statement "if ((void *)*puVar6 != (void *)0x0) {\n        free((void *)*puVar6);\n      }" (if "if") (parenthesized_expression "((void *)*puVar6 != (void *)0x0)" (( "(") (binary_expression "(void *)*puVar6 != (void *)0x0" (cast_expression "(void *)*puVar6" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (pointer_expression "*puVar6" (* "*") (identifier "puVar6"))) (!= "!=") (cast_expression "(void *)0x0" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n        free((void *)*puVar6);\n      }" ({ "{") (expression_statement "free((void *)*puVar6);" (call_expression "free((void *)*puVar6)" (identifier "free") (argument_list "((void *)*puVar6)" (( "(") (cast_expression "(void *)*puVar6" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (pointer_expression "*puVar6" (* "*") (identifier "puVar6"))) () ")"))) (; ";")) (} "}"))) (expression_statement "pcVar3 = rl_line_buffer;" (assignment_expression "pcVar3 = rl_line_buffer" (identifier "pcVar3") (= "=") (identifier "rl_line_buffer")) (; ";")) (expression_statement "sVar2 = strlen(rl_line_buffer);" (assignment_expression "sVar2 = strlen(rl_line_buffer)" (identifier "sVar2") (= "=") (call_expression "strlen(rl_line_buffer)" (identifier "strlen") (argument_list "(rl_line_buffer)" (( "(") (identifier "rl_line_buffer") () ")")))) (; ";")) (expression_statement "__dest = (char *)xmalloc(sVar2 + 1);" (assignment_expression "__dest = (char *)xmalloc(sVar2 + 1)" (identifier "__dest") (= "=") (cast_expression "(char *)xmalloc(sVar2 + 1)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "xmalloc(sVar2 + 1)" (identifier "xmalloc") (argument_list "(sVar2 + 1)" (( "(") (binary_expression "sVar2 + 1" (identifier "sVar2") (+ "+") (number_literal "1")) () ")"))))) (; ";")) (expression_statement "pcVar3 = strcpy(__dest,pcVar3);" (assignment_expression "pcVar3 = strcpy(__dest,pcVar3)" (identifier "pcVar3") (= "=") (call_expression "strcpy(__dest,pcVar3)" (identifier "strcpy") (argument_list "(__dest,pcVar3)" (( "(") (identifier "__dest") (, ",") (identifier "pcVar3") () ")")))) (; ";")) (expression_statement "*puVar6 = pcVar3;" (assignment_expression "*puVar6 = pcVar3" (pointer_expression "*puVar6" (* "*") (identifier "puVar6")) (= "=") (identifier "pcVar3")) (; ";")) (} "}"))) (labeled_statement "LAB_000e4f28:\n    puVar6 = (undefined4 *)previous_history();" (statement_identifier "LAB_000e4f28") (: ":") (expression_statement "puVar6 = (undefined4 *)previous_history();" (assignment_expression "puVar6 = (undefined4 *)previous_history()" (identifier "puVar6") (= "=") (cast_expression "(undefined4 *)previous_history()" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "previous_history()" (identifier "previous_history") (argument_list "()" (( "(") () ")"))))) (; ";"))) (} "}"))) (expression_statement "rl_undo_list = iVar7;" (assignment_expression "rl_undo_list = iVar7" (identifier "rl_undo_list") (= "=") (identifier "iVar7")) (; ";")) (expression_statement "history_set_pos(iVar5);" (call_expression "history_set_pos(iVar5)" (identifier "history_set_pos") (argument_list "(iVar5)" (( "(") (identifier "iVar5") () ")"))) (; ";")) (expression_statement "rl_replace_line(pcVar4,0);" (call_expression "rl_replace_line(pcVar4,0)" (identifier "rl_replace_line") (argument_list "(pcVar4,0)" (( "(") (identifier "pcVar4") (, ",") (number_literal "0") () ")"))) (; ";")) (expression_statement "_rl_set_the_line();" (call_expression "_rl_set_the_line()" (identifier "_rl_set_the_line") (argument_list "()" (( "(") () ")"))) (; ";")) (expression_statement "xfree(pcVar4);" (call_expression "xfree(pcVar4)" (identifier "xfree") (argument_list "(pcVar4)" (( "(") (identifier "pcVar4") () ")"))) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}")))

/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* WARNING: Unknown calling convention -- yet parameter storage is locked */

void function_1(void)

{
  type_1 *var_12;
  size_t var_3;
  char *pcVar3;
  char *pcVar4;
  int var_7;
  type_2 *var_9;
  char *__dest;
  type_1 *var_10;
  
  pcVar4 = rl_line_buffer;
  var_3 = var_1(rl_line_buffer);
  pcVar3 = (char *)var_2(var_3 + 1);
  pcVar4 = var_4(pcVar3,pcVar4);
  var_10 = rl_undo_list;
  var_7 = var_5();
  if (var_6 == var_7) goto LAB_000e4f28;
  var_9 = var_8();
  while (var_9 != (type_2 *)0x0) {
    if ((type_1 *)var_9->data != (type_1 *)0x0) {
      if ((type_1 *)var_9->data == var_10) {
        var_10 = (type_1 *)0x0;
      }
      var_11(var_9,0);
      var_12 = rl_undo_list;
      var_9->data = (type_3)0x0;
      while (var_12 != (type_1 *)0x0) {
        var_13();
        var_12 = rl_undo_list;
      }
      if (var_9->line != (char *)0x0) {
        var_14(var_9->line);
      }
      pcVar3 = rl_line_buffer;
      var_3 = var_1(rl_line_buffer);
      __dest = (char *)var_2(var_3 + 1);
      pcVar3 = var_4(__dest,pcVar3);
      var_9->line = pcVar3;
    }
LAB_000e4f28:
    var_9 = var_15();
  }
  rl_undo_list = var_10;
  var_16(var_7);
  var_17(pcVar4,0);
  var_18();
  var_19(pcVar4);
  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)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (primitive_type) declarator: (identifier)) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier))))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (call_expression function: (identifier) arguments: (argument_list (binary_expression left: (identifier) right: (number_literal))))))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier))))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (goto_statement label: (statement_identifier))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (call_expression function: (identifier) arguments: (argument_list))))) (while_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (number_literal)))) body: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (number_literal))) consequence: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (identifier))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (number_literal))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (number_literal))) (while_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) body: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list))) (expression_statement (assignment_expression left: (identifier) right: (identifier))))) (if_statement condition: (parenthesized_expression (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (pointer_expression argument: (identifier))) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (number_literal)))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (pointer_expression argument: (identifier)))))))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier))))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (call_expression function: (identifier) arguments: (argument_list (binary_expression left: (identifier) right: (number_literal))))))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier))))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (identifier))))) (labeled_statement label: (statement_identifier) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (call_expression function: (identifier) arguments: (argument_list)))))))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier)))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (number_literal)))) (expression_statement (call_expression function: (identifier) arguments: (argument_list))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier)))) (return_statement))))

/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */

void MASKED(void)

{
  int iVar1;
  size_t sVar2;
  char *pcVar3;
  char *pcVar4;
  int iVar5;
  undefined4 *puVar6;
  char *__dest;
  int iVar7;
  
  pcVar4 = rl_line_buffer;
  sVar2 = strlen(rl_line_buffer);
  pcVar3 = (char *)xmalloc(sVar2 + 1);
  pcVar4 = strcpy(pcVar3,pcVar4);
  iVar7 = rl_undo_list;
  iVar5 = where_history();
  if (history_length == iVar5) goto LAB_000e4f28;
  puVar6 = (undefined4 *)current_history();
  while (puVar6 != (undefined4 *)0x0) {
    if (puVar6[2] != 0) {
      if (puVar6[2] == iVar7) {
        iVar7 = 0;
      }
      rl_replace_from_history(puVar6,0);
      iVar1 = rl_undo_list;
      puVar6[2] = 0;
      while (iVar1 != 0) {
        rl_do_undo();
        iVar1 = rl_undo_list;
      }
      if ((void *)*puVar6 != (void *)0x0) {
        free((void *)*puVar6);
      }
      pcVar3 = rl_line_buffer;
      sVar2 = strlen(rl_line_buffer);
      __dest = (char *)xmalloc(sVar2 + 1);
      pcVar3 = strcpy(__dest,pcVar3);
      *puVar6 = pcVar3;
    }
LAB_000e4f28:
    puVar6 = (undefined4 *)previous_history();
  }
  rl_undo_list = iVar7;
  history_set_pos(iVar5);
  rl_replace_line(pcVar4,0);
  _rl_set_the_line();
  xfree(pcVar4);
  return;
}

