
/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* WARNING: Unknown calling convention */

int rl_do_undo(void)

{
  UNDO_LIST *pUVar1;
  undo_code uVar2;
  char *line;
  HIST_ENTRY *pHVar3;
  int which;
  UNDO_LIST *pUVar4;
  UNDO_LIST *pUVar5;
  int iVar6;
  int local_30;
  int local_2c;
  
  iVar6 = 0;
  local_2c = 0;
  local_30 = 0;
  do {
    if (rl_undo_list == (UNDO_LIST *)0x0) {
      return 0;
    }
    uVar2 = rl_undo_list->what;
    _rl_doing_an_undo = 1;
    rl_readline_state = rl_readline_state | 0x10000;
    if (uVar2 < UNDO_BEGIN) {
      local_30 = rl_undo_list->start;
      if (local_30 == -1) {
        local_30 = rl_point;
      }
      else if (local_30 == -2) {
        local_30 = rl_end;
      }
      local_2c = rl_undo_list->end;
      if (local_2c == -1) {
        local_2c = rl_point;
        goto LAB_000fea70;
      }
      if (local_2c != -2) goto LAB_000fea70;
      local_2c = rl_end;
      if (uVar2 != UNDO_INSERT) goto LAB_000fea79;
LAB_000feba0:
      rl_delete_text(local_30,local_2c);
      rl_point = local_30;
      pUVar5 = rl_undo_list;
    }
    else {
LAB_000fea70:
      if (uVar2 == UNDO_INSERT) goto LAB_000feba0;
LAB_000fea79:
      if (uVar2 == UNDO_DELETE) {
        rl_point = local_30;
        rl_insert_text(rl_undo_list->text);
        xfree(rl_undo_list->text);
        pUVar5 = rl_undo_list;
      }
      else {
        pUVar5 = rl_undo_list;
        if (uVar2 == UNDO_BEGIN) {
          if (iVar6 == 0) {
            rl_ding();
            pUVar5 = rl_undo_list;
          }
          else {
            iVar6 = iVar6 + -1;
          }
        }
        else {
          iVar6 = iVar6 + (uint)(uVar2 == UNDO_END);
        }
      }
    }
    _rl_doing_an_undo = 0;
    rl_readline_state = rl_readline_state & 0xfffeffff;
    rl_undo_list = pUVar5->next;
    pUVar5->next = (undo_list *)0x0;
    pHVar3 = current_history();
    pUVar1 = rl_undo_list;
    line = rl_line_buffer;
    if (((pHVar3 != (HIST_ENTRY *)0x0) && ((UNDO_LIST *)pHVar3->data == pUVar5)) &&
       ((UNDO_LIST *)pHVar3->data != (UNDO_LIST *)0x0)) {
      which = where_history();
      pHVar3 = replace_history_entry(which,line,pUVar1);
      xfree(pHVar3->line);
      if (pHVar3->timestamp != (char *)0x0) {
        free(pHVar3->timestamp);
      }
      xfree(pHVar3);
    }
    _hs_replace_history_data(-1,&pUVar5->next,&rl_undo_list->next);
    if ((_rl_saved_line_for_history == (HIST_ENTRY *)0x0) ||
       (pUVar1 = (UNDO_LIST *)_rl_saved_line_for_history->data, pUVar1 == (UNDO_LIST *)0x0)) {
LAB_000feb0a:
      xfree(pUVar5);
    }
    else {
      if (pUVar1 == pUVar5) {
        _rl_saved_line_for_history->data = rl_undo_list;
        goto LAB_000feb0a;
      }
      do {
        pUVar4 = pUVar1;
        pUVar1 = pUVar4->next;
        if (pUVar1 == (undo_list *)0x0) goto LAB_000feb0a;
      } while (pUVar1 != pUVar5);
      pUVar4->next = rl_undo_list;
      xfree(pUVar5);
    }
    if (iVar6 == 0) {
      return 1;
    }
  } while( true );
}



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

undefined4 rl_do_undo(void)

{
  uint uVar1;
  undefined4 uVar2;
  int iVar3;
  undefined4 uVar4;
  undefined4 *puVar5;
  undefined4 *puVar6;
  undefined4 *puVar7;
  int iVar8;
  int local_30;
  int local_2c;
  
  iVar8 = 0;
  local_2c = 0;
  local_30 = 0;
  do {
    if (rl_undo_list == (undefined4 *)0x0) {
      return 0;
    }
    uVar1 = rl_undo_list[4];
    _rl_doing_an_undo = 1;
    rl_readline_state = rl_readline_state | 0x10000;
    if (uVar1 < 2) {
      local_30 = rl_undo_list[1];
      if (local_30 == -1) {
        local_30 = rl_point;
      }
      else if (local_30 == -2) {
        local_30 = rl_end;
      }
      local_2c = rl_undo_list[2];
      if (local_2c == -1) {
        local_2c = rl_point;
        goto LAB_000fea70;
      }
      if (local_2c != -2) goto LAB_000fea70;
      local_2c = rl_end;
      if (uVar1 != 1) goto LAB_000fea79;
LAB_000feba0:
      rl_delete_text(local_30,local_2c);
      rl_point = local_30;
      puVar7 = rl_undo_list;
    }
    else {
LAB_000fea70:
      if (uVar1 == 1) goto LAB_000feba0;
LAB_000fea79:
      if (uVar1 == 0) {
        rl_point = local_30;
        rl_insert_text(rl_undo_list[3]);
        xfree(rl_undo_list[3]);
        puVar7 = rl_undo_list;
      }
      else {
        puVar7 = rl_undo_list;
        if (uVar1 == 2) {
          if (iVar8 == 0) {
            rl_ding();
            puVar7 = rl_undo_list;
          }
          else {
            iVar8 = iVar8 + -1;
          }
        }
        else {
          iVar8 = iVar8 + (uint)(uVar1 == 3);
        }
      }
    }
    _rl_doing_an_undo = 0;
    rl_readline_state = rl_readline_state & 0xfffeffff;
    rl_undo_list = (undefined4 *)*puVar7;
    *puVar7 = 0;
    iVar3 = current_history();
    puVar5 = rl_undo_list;
    uVar2 = rl_line_buffer;
    if (((iVar3 != 0) && (*(undefined4 **)(iVar3 + 8) == puVar7)) &&
       (*(undefined4 **)(iVar3 + 8) != (undefined4 *)0x0)) {
      uVar4 = where_history();
      puVar5 = (undefined4 *)replace_history_entry(uVar4,uVar2,puVar5);
      xfree(*puVar5);
      if ((void *)puVar5[1] != (void *)0x0) {
        free((void *)puVar5[1]);
      }
      xfree(puVar5);
    }
    _hs_replace_history_data(0xffffffff,puVar7,rl_undo_list);
    if ((_rl_saved_line_for_history == 0) ||
       (puVar5 = *(undefined4 **)(_rl_saved_line_for_history + 8), puVar5 == (undefined4 *)0x0)) {
LAB_000feb0a:
      xfree(puVar7);
    }
    else {
      if (puVar5 == puVar7) {
        *(undefined4 **)(_rl_saved_line_for_history + 8) = rl_undo_list;
        goto LAB_000feb0a;
      }
      do {
        puVar6 = puVar5;
        puVar5 = (undefined4 *)*puVar6;
        if (puVar5 == (undefined4 *)0x0) goto LAB_000feb0a;
      } while (puVar5 != puVar7);
      *puVar6 = rl_undo_list;
      xfree(puVar7);
    }
    if (iVar8 == 0) {
      return 1;
    }
  } while( true );
}


PUSH EBP
PUSH EDI
XOR EDI,EDI
PUSH ESI
PUSH EBX
CALL 0x000312b0
ADD EBX,0x735c5
SUB ESP,0x2c
MOV dword ptr [ESP + 0x10],0x0
MOV dword ptr [ESP + 0xc],0x0
LEA EAX,[EBX + 0xd988]
LEA EBP,[EBX + 0x7b44]
MOV dword ptr [ESP + 0x14],EAX
JMP 0x000feb1e
CMP EDX,0x1
JZ 0x000feba0
TEST EDX,EDX
JZ 0x000fec30
CMP EDX,0x2
JZ 0x000fec20
CMP EDX,0x3
SETZ DL
MOVZX EDX,DL
ADD EDI,EDX
MOV dword ptr [EBX + 0x8738],0x0
AND EAX,0xfffeffff
MOV dword ptr [EBP],EAX
MOV EAX,dword ptr [ESI]
MOV dword ptr [EBX + 0x8730],EAX
MOV dword ptr [ESI],0x0
CALL 0x00107a80
TEST EAX,EAX
JZ 0x000fec10
MOV EAX,dword ptr [EAX + 0x8]
MOV EDX,dword ptr [EBX + 0x8730]
CMP EAX,ESI
JNZ 0x000fead7
TEST EAX,EAX
JNZ 0x000fec98
SUB ESP,0x4
PUSH EDX
PUSH ESI
PUSH -0x1
CALL 0x001081e0
LEA EAX,[EBX + 0x8adc]
ADD ESP,0x10
MOV EAX,dword ptr [EAX]
TEST EAX,EAX
JZ 0x000feb0a
MOV EDX,dword ptr [EAX + 0x8]
TEST EDX,EDX
JZ 0x000feb0a
CMP EDX,ESI
JNZ 0x000febd2
MOV EDX,dword ptr [EBX + 0x8730]
MOV dword ptr [EAX + 0x8],EDX
SUB ESP,0xc
PUSH ESI
CALL 0x000ad7e0
ADD ESP,0x10
TEST EDI,EDI
JZ 0x000febfc
MOV ESI,dword ptr [EBX + 0x8730]
TEST ESI,ESI
JZ 0x000fed20
MOV EAX,dword ptr [EBP]
MOV EDX,dword ptr [ESI + 0x10]
MOV dword ptr [EBX + 0x8738],0x1
OR EAX,0x10000
MOV dword ptr [EBP],EAX
CMP EDX,0x1
JA 0x000fea70
MOV ECX,dword ptr [ESI + 0x4]
MOV dword ptr [ESP + 0xc],ECX
CMP ECX,-0x1
JZ 0x000fec80
CMP ECX,-0x2
JNZ 0x000feb6e
LEA ECX,[EBX + 0xd8cc]
MOV ECX,dword ptr [ECX]
MOV dword ptr [ESP + 0xc],ECX
MOV ECX,dword ptr [ESI + 0x8]
MOV dword ptr [ESP + 0x10],ECX
CMP ECX,-0x1
JZ 0x000fec70
CMP ECX,-0x2
JNZ 0x000fea70
LEA ECX,[EBX + 0xd8cc]
MOV ECX,dword ptr [ECX]
MOV dword ptr [ESP + 0x10],ECX
CMP EDX,0x1
JNZ 0x000fea79
LEA ESI,[ESI]
SUB ESP,0x8
PUSH dword ptr [ESP + 0x18]
MOV ESI,dword ptr [ESP + 0x18]
PUSH ESI
CALL 0x001034c0
LEA EAX,[EBX + 0xd988]
ADD ESP,0x10
MOV dword ptr [EAX],ESI
MOV EAX,dword ptr [EBP]
MOV ESI,dword ptr [EBX + 0x8730]
JMP 0x000fea95
MOV EDX,EAX
MOV EAX,dword ptr [EDX]
TEST EAX,EAX
JZ 0x000feb0a
CMP EAX,ESI
JNZ 0x000febd0
MOV EAX,dword ptr [EBX + 0x8730]
SUB ESP,0xc
MOV dword ptr [EDX],EAX
PUSH ESI
CALL 0x000ad7e0
ADD ESP,0x10
TEST EDI,EDI
JNZ 0x000feb1e
ADD ESP,0x2c
MOV EAX,0x1
POP EBX
POP ESI
POP EDI
POP EBP
RET
MOV EDX,dword ptr [EBX + 0x8730]
JMP 0x000fead7
TEST EDI,EDI
JZ 0x000fed08
SUB EDI,0x1
JMP 0x000fea95
MOV ECX,dword ptr [ESP + 0xc]
LEA EAX,[EBX + 0xd988]
SUB ESP,0xc
MOV dword ptr [EAX],ECX
PUSH dword ptr [ESI + 0xc]
CALL 0x00102c80
MOV EAX,dword ptr [EBX + 0x8730]
POP ECX
PUSH dword ptr [EAX + 0xc]
CALL 0x000ad7e0
MOV EAX,dword ptr [EBP]
MOV ESI,dword ptr [EBX + 0x8730]
ADD ESP,0x10
JMP 0x000fea95
MOV ECX,dword ptr [ESP + 0x14]
MOV ECX,dword ptr [ECX]
MOV dword ptr [ESP + 0x10],ECX
JMP 0x000fea70
LEA ECX,[EBX + 0xd988]
MOV ECX,dword ptr [ECX]
MOV dword ptr [ESP + 0xc],ECX
JMP 0x000feb6e
LEA EAX,[EBX + 0x7afc]
MOV dword ptr [ESP + 0x1c],EDX
MOV ECX,dword ptr [EAX]
MOV dword ptr [ESP + 0x18],ECX
CALL 0x00107a00
SUB ESP,0x4
MOV EDX,dword ptr [ESP + 0x20]
PUSH EDX
MOV ECX,dword ptr [ESP + 0x20]
PUSH ECX
PUSH EAX
CALL 0x00108090
POP EDX
PUSH dword ptr [EAX]
MOV dword ptr [ESP + 0x28],EAX
CALL 0x000ad7e0
MOV EAX,dword ptr [ESP + 0x28]
ADD ESP,0x10
MOV EDX,dword ptr [EAX + 0x4]
TEST EDX,EDX
JZ 0x000fecee
MOV dword ptr [ESP + 0x18],EAX
SUB ESP,0xc
PUSH EDX
CALL 0x0002e200
ADD ESP,0x10
MOV EAX,dword ptr [ESP + 0x18]
SUB ESP,0xc
PUSH EAX
CALL 0x000ad7e0
MOV EDX,dword ptr [EBX + 0x8730]
ADD ESP,0x10
JMP 0x000fead7
CALL 0x00102470
MOV EAX,dword ptr [EBP]
MOV ESI,dword ptr [EBX + 0x8730]
JMP 0x000fea95
ADD ESP,0x2c
XOR EAX,EAX
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\nundefined4 rl_do_undo(void)\n\n{\n  uint uVar1;\n  undefined4 uVar2;\n  int iVar3;\n  undefined4 uVar4;\n  undefined4 *puVar5;\n  undefined4 *puVar6;\n  undefined4 *puVar7;\n  int iVar8;\n  int local_30;\n  int local_2c;\n  \n  iVar8 = 0;\n  local_2c = 0;\n  local_30 = 0;\n  do {\n    if (rl_undo_list == (undefined4 *)0x0) {\n      return 0;\n    }\n    uVar1 = rl_undo_list[4];\n    _rl_doing_an_undo = 1;\n    rl_readline_state = rl_readline_state | 0x10000;\n    if (uVar1 < 2) {\n      local_30 = rl_undo_list[1];\n      if (local_30 == -1) {\n        local_30 = rl_point;\n      }\n      else if (local_30 == -2) {\n        local_30 = rl_end;\n      }\n      local_2c = rl_undo_list[2];\n      if (local_2c == -1) {\n        local_2c = rl_point;\n        goto LAB_000fea70;\n      }\n      if (local_2c != -2) goto LAB_000fea70;\n      local_2c = rl_end;\n      if (uVar1 != 1) goto LAB_000fea79;\nLAB_000feba0:\n      rl_delete_text(local_30,local_2c);\n      rl_point = local_30;\n      puVar7 = rl_undo_list;\n    }\n    else {\nLAB_000fea70:\n      if (uVar1 == 1) goto LAB_000feba0;\nLAB_000fea79:\n      if (uVar1 == 0) {\n        rl_point = local_30;\n        rl_insert_text(rl_undo_list[3]);\n        xfree(rl_undo_list[3]);\n        puVar7 = rl_undo_list;\n      }\n      else {\n        puVar7 = rl_undo_list;\n        if (uVar1 == 2) {\n          if (iVar8 == 0) {\n            rl_ding();\n            puVar7 = rl_undo_list;\n          }\n          else {\n            iVar8 = iVar8 + -1;\n          }\n        }\n        else {\n          iVar8 = iVar8 + (uint)(uVar1 == 3);\n        }\n      }\n    }\n    _rl_doing_an_undo = 0;\n    rl_readline_state = rl_readline_state & 0xfffeffff;\n    rl_undo_list = (undefined4 *)*puVar7;\n    *puVar7 = 0;\n    iVar3 = current_history();\n    puVar5 = rl_undo_list;\n    uVar2 = rl_line_buffer;\n    if (((iVar3 != 0) && (*(undefined4 **)(iVar3 + 8) == puVar7)) &&\n       (*(undefined4 **)(iVar3 + 8) != (undefined4 *)0x0)) {\n      uVar4 = where_history();\n      puVar5 = (undefined4 *)replace_history_entry(uVar4,uVar2,puVar5);\n      xfree(*puVar5);\n      if ((void *)puVar5[1] != (void *)0x0) {\n        free((void *)puVar5[1]);\n      }\n      xfree(puVar5);\n    }\n    _hs_replace_history_data(0xffffffff,puVar7,rl_undo_list);\n    if ((_rl_saved_line_for_history == 0) ||\n       (puVar5 = *(undefined4 **)(_rl_saved_line_for_history + 8), puVar5 == (undefined4 *)0x0)) {\nLAB_000feb0a:\n      xfree(puVar7);\n    }\n    else {\n      if (puVar5 == puVar7) {\n        *(undefined4 **)(_rl_saved_line_for_history + 8) = rl_undo_list;\n        goto LAB_000feb0a;\n      }\n      do {\n        puVar6 = puVar5;\n        puVar5 = (undefined4 *)*puVar6;\n        if (puVar5 == (undefined4 *)0x0) goto LAB_000feb0a;\n      } while (puVar5 != puVar7);\n      *puVar6 = rl_undo_list;\n      xfree(puVar7);\n    }\n    if (iVar8 == 0) {\n      return 1;\n    }\n  } while( true );\n}\n\n" comment (function_definition "undefined4 rl_do_undo(void)\n\n{\n  uint uVar1;\n  undefined4 uVar2;\n  int iVar3;\n  undefined4 uVar4;\n  undefined4 *puVar5;\n  undefined4 *puVar6;\n  undefined4 *puVar7;\n  int iVar8;\n  int local_30;\n  int local_2c;\n  \n  iVar8 = 0;\n  local_2c = 0;\n  local_30 = 0;\n  do {\n    if (rl_undo_list == (undefined4 *)0x0) {\n      return 0;\n    }\n    uVar1 = rl_undo_list[4];\n    _rl_doing_an_undo = 1;\n    rl_readline_state = rl_readline_state | 0x10000;\n    if (uVar1 < 2) {\n      local_30 = rl_undo_list[1];\n      if (local_30 == -1) {\n        local_30 = rl_point;\n      }\n      else if (local_30 == -2) {\n        local_30 = rl_end;\n      }\n      local_2c = rl_undo_list[2];\n      if (local_2c == -1) {\n        local_2c = rl_point;\n        goto LAB_000fea70;\n      }\n      if (local_2c != -2) goto LAB_000fea70;\n      local_2c = rl_end;\n      if (uVar1 != 1) goto LAB_000fea79;\nLAB_000feba0:\n      rl_delete_text(local_30,local_2c);\n      rl_point = local_30;\n      puVar7 = rl_undo_list;\n    }\n    else {\nLAB_000fea70:\n      if (uVar1 == 1) goto LAB_000feba0;\nLAB_000fea79:\n      if (uVar1 == 0) {\n        rl_point = local_30;\n        rl_insert_text(rl_undo_list[3]);\n        xfree(rl_undo_list[3]);\n        puVar7 = rl_undo_list;\n      }\n      else {\n        puVar7 = rl_undo_list;\n        if (uVar1 == 2) {\n          if (iVar8 == 0) {\n            rl_ding();\n            puVar7 = rl_undo_list;\n          }\n          else {\n            iVar8 = iVar8 + -1;\n          }\n        }\n        else {\n          iVar8 = iVar8 + (uint)(uVar1 == 3);\n        }\n      }\n    }\n    _rl_doing_an_undo = 0;\n    rl_readline_state = rl_readline_state & 0xfffeffff;\n    rl_undo_list = (undefined4 *)*puVar7;\n    *puVar7 = 0;\n    iVar3 = current_history();\n    puVar5 = rl_undo_list;\n    uVar2 = rl_line_buffer;\n    if (((iVar3 != 0) && (*(undefined4 **)(iVar3 + 8) == puVar7)) &&\n       (*(undefined4 **)(iVar3 + 8) != (undefined4 *)0x0)) {\n      uVar4 = where_history();\n      puVar5 = (undefined4 *)replace_history_entry(uVar4,uVar2,puVar5);\n      xfree(*puVar5);\n      if ((void *)puVar5[1] != (void *)0x0) {\n        free((void *)puVar5[1]);\n      }\n      xfree(puVar5);\n    }\n    _hs_replace_history_data(0xffffffff,puVar7,rl_undo_list);\n    if ((_rl_saved_line_for_history == 0) ||\n       (puVar5 = *(undefined4 **)(_rl_saved_line_for_history + 8), puVar5 == (undefined4 *)0x0)) {\nLAB_000feb0a:\n      xfree(puVar7);\n    }\n    else {\n      if (puVar5 == puVar7) {\n        *(undefined4 **)(_rl_saved_line_for_history + 8) = rl_undo_list;\n        goto LAB_000feb0a;\n      }\n      do {\n        puVar6 = puVar5;\n        puVar5 = (undefined4 *)*puVar6;\n        if (puVar5 == (undefined4 *)0x0) goto LAB_000feb0a;\n      } while (puVar5 != puVar7);\n      *puVar6 = rl_undo_list;\n      xfree(puVar7);\n    }\n    if (iVar8 == 0) {\n      return 1;\n    }\n  } while( true );\n}" type_identifier (function_declarator "rl_do_undo(void)" identifier (parameter_list "(void)" ( (parameter_declaration "void" primitive_type) ))) (compound_statement "{\n  uint uVar1;\n  undefined4 uVar2;\n  int iVar3;\n  undefined4 uVar4;\n  undefined4 *puVar5;\n  undefined4 *puVar6;\n  undefined4 *puVar7;\n  int iVar8;\n  int local_30;\n  int local_2c;\n  \n  iVar8 = 0;\n  local_2c = 0;\n  local_30 = 0;\n  do {\n    if (rl_undo_list == (undefined4 *)0x0) {\n      return 0;\n    }\n    uVar1 = rl_undo_list[4];\n    _rl_doing_an_undo = 1;\n    rl_readline_state = rl_readline_state | 0x10000;\n    if (uVar1 < 2) {\n      local_30 = rl_undo_list[1];\n      if (local_30 == -1) {\n        local_30 = rl_point;\n      }\n      else if (local_30 == -2) {\n        local_30 = rl_end;\n      }\n      local_2c = rl_undo_list[2];\n      if (local_2c == -1) {\n        local_2c = rl_point;\n        goto LAB_000fea70;\n      }\n      if (local_2c != -2) goto LAB_000fea70;\n      local_2c = rl_end;\n      if (uVar1 != 1) goto LAB_000fea79;\nLAB_000feba0:\n      rl_delete_text(local_30,local_2c);\n      rl_point = local_30;\n      puVar7 = rl_undo_list;\n    }\n    else {\nLAB_000fea70:\n      if (uVar1 == 1) goto LAB_000feba0;\nLAB_000fea79:\n      if (uVar1 == 0) {\n        rl_point = local_30;\n        rl_insert_text(rl_undo_list[3]);\n        xfree(rl_undo_list[3]);\n        puVar7 = rl_undo_list;\n      }\n      else {\n        puVar7 = rl_undo_list;\n        if (uVar1 == 2) {\n          if (iVar8 == 0) {\n            rl_ding();\n            puVar7 = rl_undo_list;\n          }\n          else {\n            iVar8 = iVar8 + -1;\n          }\n        }\n        else {\n          iVar8 = iVar8 + (uint)(uVar1 == 3);\n        }\n      }\n    }\n    _rl_doing_an_undo = 0;\n    rl_readline_state = rl_readline_state & 0xfffeffff;\n    rl_undo_list = (undefined4 *)*puVar7;\n    *puVar7 = 0;\n    iVar3 = current_history();\n    puVar5 = rl_undo_list;\n    uVar2 = rl_line_buffer;\n    if (((iVar3 != 0) && (*(undefined4 **)(iVar3 + 8) == puVar7)) &&\n       (*(undefined4 **)(iVar3 + 8) != (undefined4 *)0x0)) {\n      uVar4 = where_history();\n      puVar5 = (undefined4 *)replace_history_entry(uVar4,uVar2,puVar5);\n      xfree(*puVar5);\n      if ((void *)puVar5[1] != (void *)0x0) {\n        free((void *)puVar5[1]);\n      }\n      xfree(puVar5);\n    }\n    _hs_replace_history_data(0xffffffff,puVar7,rl_undo_list);\n    if ((_rl_saved_line_for_history == 0) ||\n       (puVar5 = *(undefined4 **)(_rl_saved_line_for_history + 8), puVar5 == (undefined4 *)0x0)) {\nLAB_000feb0a:\n      xfree(puVar7);\n    }\n    else {\n      if (puVar5 == puVar7) {\n        *(undefined4 **)(_rl_saved_line_for_history + 8) = rl_undo_list;\n        goto LAB_000feb0a;\n      }\n      do {\n        puVar6 = puVar5;\n        puVar5 = (undefined4 *)*puVar6;\n        if (puVar5 == (undefined4 *)0x0) goto LAB_000feb0a;\n      } while (puVar5 != puVar7);\n      *puVar6 = rl_undo_list;\n      xfree(puVar7);\n    }\n    if (iVar8 == 0) {\n      return 1;\n    }\n  } while( true );\n}" { (declaration "uint uVar1;" type_identifier identifier ;) (declaration "undefined4 uVar2;" type_identifier identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "undefined4 uVar4;" type_identifier identifier ;) (declaration "undefined4 *puVar5;" type_identifier (pointer_declarator "*puVar5" * identifier) ;) (declaration "undefined4 *puVar6;" type_identifier (pointer_declarator "*puVar6" * identifier) ;) (declaration "undefined4 *puVar7;" type_identifier (pointer_declarator "*puVar7" * identifier) ;) (declaration "int iVar8;" primitive_type identifier ;) (declaration "int local_30;" primitive_type identifier ;) (declaration "int local_2c;" primitive_type identifier ;) (expression_statement "iVar8 = 0;" (assignment_expression "iVar8 = 0" identifier = number_literal) ;) (expression_statement "local_2c = 0;" (assignment_expression "local_2c = 0" identifier = number_literal) ;) (expression_statement "local_30 = 0;" (assignment_expression "local_30 = 0" identifier = number_literal) ;) (do_statement "do {\n    if (rl_undo_list == (undefined4 *)0x0) {\n      return 0;\n    }\n    uVar1 = rl_undo_list[4];\n    _rl_doing_an_undo = 1;\n    rl_readline_state = rl_readline_state | 0x10000;\n    if (uVar1 < 2) {\n      local_30 = rl_undo_list[1];\n      if (local_30 == -1) {\n        local_30 = rl_point;\n      }\n      else if (local_30 == -2) {\n        local_30 = rl_end;\n      }\n      local_2c = rl_undo_list[2];\n      if (local_2c == -1) {\n        local_2c = rl_point;\n        goto LAB_000fea70;\n      }\n      if (local_2c != -2) goto LAB_000fea70;\n      local_2c = rl_end;\n      if (uVar1 != 1) goto LAB_000fea79;\nLAB_000feba0:\n      rl_delete_text(local_30,local_2c);\n      rl_point = local_30;\n      puVar7 = rl_undo_list;\n    }\n    else {\nLAB_000fea70:\n      if (uVar1 == 1) goto LAB_000feba0;\nLAB_000fea79:\n      if (uVar1 == 0) {\n        rl_point = local_30;\n        rl_insert_text(rl_undo_list[3]);\n        xfree(rl_undo_list[3]);\n        puVar7 = rl_undo_list;\n      }\n      else {\n        puVar7 = rl_undo_list;\n        if (uVar1 == 2) {\n          if (iVar8 == 0) {\n            rl_ding();\n            puVar7 = rl_undo_list;\n          }\n          else {\n            iVar8 = iVar8 + -1;\n          }\n        }\n        else {\n          iVar8 = iVar8 + (uint)(uVar1 == 3);\n        }\n      }\n    }\n    _rl_doing_an_undo = 0;\n    rl_readline_state = rl_readline_state & 0xfffeffff;\n    rl_undo_list = (undefined4 *)*puVar7;\n    *puVar7 = 0;\n    iVar3 = current_history();\n    puVar5 = rl_undo_list;\n    uVar2 = rl_line_buffer;\n    if (((iVar3 != 0) && (*(undefined4 **)(iVar3 + 8) == puVar7)) &&\n       (*(undefined4 **)(iVar3 + 8) != (undefined4 *)0x0)) {\n      uVar4 = where_history();\n      puVar5 = (undefined4 *)replace_history_entry(uVar4,uVar2,puVar5);\n      xfree(*puVar5);\n      if ((void *)puVar5[1] != (void *)0x0) {\n        free((void *)puVar5[1]);\n      }\n      xfree(puVar5);\n    }\n    _hs_replace_history_data(0xffffffff,puVar7,rl_undo_list);\n    if ((_rl_saved_line_for_history == 0) ||\n       (puVar5 = *(undefined4 **)(_rl_saved_line_for_history + 8), puVar5 == (undefined4 *)0x0)) {\nLAB_000feb0a:\n      xfree(puVar7);\n    }\n    else {\n      if (puVar5 == puVar7) {\n        *(undefined4 **)(_rl_saved_line_for_history + 8) = rl_undo_list;\n        goto LAB_000feb0a;\n      }\n      do {\n        puVar6 = puVar5;\n        puVar5 = (undefined4 *)*puVar6;\n        if (puVar5 == (undefined4 *)0x0) goto LAB_000feb0a;\n      } while (puVar5 != puVar7);\n      *puVar6 = rl_undo_list;\n      xfree(puVar7);\n    }\n    if (iVar8 == 0) {\n      return 1;\n    }\n  } while( true );" do (compound_statement "{\n    if (rl_undo_list == (undefined4 *)0x0) {\n      return 0;\n    }\n    uVar1 = rl_undo_list[4];\n    _rl_doing_an_undo = 1;\n    rl_readline_state = rl_readline_state | 0x10000;\n    if (uVar1 < 2) {\n      local_30 = rl_undo_list[1];\n      if (local_30 == -1) {\n        local_30 = rl_point;\n      }\n      else if (local_30 == -2) {\n        local_30 = rl_end;\n      }\n      local_2c = rl_undo_list[2];\n      if (local_2c == -1) {\n        local_2c = rl_point;\n        goto LAB_000fea70;\n      }\n      if (local_2c != -2) goto LAB_000fea70;\n      local_2c = rl_end;\n      if (uVar1 != 1) goto LAB_000fea79;\nLAB_000feba0:\n      rl_delete_text(local_30,local_2c);\n      rl_point = local_30;\n      puVar7 = rl_undo_list;\n    }\n    else {\nLAB_000fea70:\n      if (uVar1 == 1) goto LAB_000feba0;\nLAB_000fea79:\n      if (uVar1 == 0) {\n        rl_point = local_30;\n        rl_insert_text(rl_undo_list[3]);\n        xfree(rl_undo_list[3]);\n        puVar7 = rl_undo_list;\n      }\n      else {\n        puVar7 = rl_undo_list;\n        if (uVar1 == 2) {\n          if (iVar8 == 0) {\n            rl_ding();\n            puVar7 = rl_undo_list;\n          }\n          else {\n            iVar8 = iVar8 + -1;\n          }\n        }\n        else {\n          iVar8 = iVar8 + (uint)(uVar1 == 3);\n        }\n      }\n    }\n    _rl_doing_an_undo = 0;\n    rl_readline_state = rl_readline_state & 0xfffeffff;\n    rl_undo_list = (undefined4 *)*puVar7;\n    *puVar7 = 0;\n    iVar3 = current_history();\n    puVar5 = rl_undo_list;\n    uVar2 = rl_line_buffer;\n    if (((iVar3 != 0) && (*(undefined4 **)(iVar3 + 8) == puVar7)) &&\n       (*(undefined4 **)(iVar3 + 8) != (undefined4 *)0x0)) {\n      uVar4 = where_history();\n      puVar5 = (undefined4 *)replace_history_entry(uVar4,uVar2,puVar5);\n      xfree(*puVar5);\n      if ((void *)puVar5[1] != (void *)0x0) {\n        free((void *)puVar5[1]);\n      }\n      xfree(puVar5);\n    }\n    _hs_replace_history_data(0xffffffff,puVar7,rl_undo_list);\n    if ((_rl_saved_line_for_history == 0) ||\n       (puVar5 = *(undefined4 **)(_rl_saved_line_for_history + 8), puVar5 == (undefined4 *)0x0)) {\nLAB_000feb0a:\n      xfree(puVar7);\n    }\n    else {\n      if (puVar5 == puVar7) {\n        *(undefined4 **)(_rl_saved_line_for_history + 8) = rl_undo_list;\n        goto LAB_000feb0a;\n      }\n      do {\n        puVar6 = puVar5;\n        puVar5 = (undefined4 *)*puVar6;\n        if (puVar5 == (undefined4 *)0x0) goto LAB_000feb0a;\n      } while (puVar5 != puVar7);\n      *puVar6 = rl_undo_list;\n      xfree(puVar7);\n    }\n    if (iVar8 == 0) {\n      return 1;\n    }\n  }" { (if_statement "if (rl_undo_list == (undefined4 *)0x0) {\n      return 0;\n    }" if (parenthesized_expression "(rl_undo_list == (undefined4 *)0x0)" ( (binary_expression "rl_undo_list == (undefined4 *)0x0" identifier == (cast_expression "(undefined4 *)0x0" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      return 0;\n    }" { (return_statement "return 0;" return number_literal ;) })) (expression_statement "uVar1 = rl_undo_list[4];" (assignment_expression "uVar1 = rl_undo_list[4]" identifier = (subscript_expression "rl_undo_list[4]" identifier [ number_literal ])) ;) (expression_statement "_rl_doing_an_undo = 1;" (assignment_expression "_rl_doing_an_undo = 1" identifier = number_literal) ;) (expression_statement "rl_readline_state = rl_readline_state | 0x10000;" (assignment_expression "rl_readline_state = rl_readline_state | 0x10000" identifier = (binary_expression "rl_readline_state | 0x10000" identifier | number_literal)) ;) (if_statement "if (uVar1 < 2) {\n      local_30 = rl_undo_list[1];\n      if (local_30 == -1) {\n        local_30 = rl_point;\n      }\n      else if (local_30 == -2) {\n        local_30 = rl_end;\n      }\n      local_2c = rl_undo_list[2];\n      if (local_2c == -1) {\n        local_2c = rl_point;\n        goto LAB_000fea70;\n      }\n      if (local_2c != -2) goto LAB_000fea70;\n      local_2c = rl_end;\n      if (uVar1 != 1) goto LAB_000fea79;\nLAB_000feba0:\n      rl_delete_text(local_30,local_2c);\n      rl_point = local_30;\n      puVar7 = rl_undo_list;\n    }\n    else {\nLAB_000fea70:\n      if (uVar1 == 1) goto LAB_000feba0;\nLAB_000fea79:\n      if (uVar1 == 0) {\n        rl_point = local_30;\n        rl_insert_text(rl_undo_list[3]);\n        xfree(rl_undo_list[3]);\n        puVar7 = rl_undo_list;\n      }\n      else {\n        puVar7 = rl_undo_list;\n        if (uVar1 == 2) {\n          if (iVar8 == 0) {\n            rl_ding();\n            puVar7 = rl_undo_list;\n          }\n          else {\n            iVar8 = iVar8 + -1;\n          }\n        }\n        else {\n          iVar8 = iVar8 + (uint)(uVar1 == 3);\n        }\n      }\n    }" if (parenthesized_expression "(uVar1 < 2)" ( (binary_expression "uVar1 < 2" identifier < number_literal) )) (compound_statement "{\n      local_30 = rl_undo_list[1];\n      if (local_30 == -1) {\n        local_30 = rl_point;\n      }\n      else if (local_30 == -2) {\n        local_30 = rl_end;\n      }\n      local_2c = rl_undo_list[2];\n      if (local_2c == -1) {\n        local_2c = rl_point;\n        goto LAB_000fea70;\n      }\n      if (local_2c != -2) goto LAB_000fea70;\n      local_2c = rl_end;\n      if (uVar1 != 1) goto LAB_000fea79;\nLAB_000feba0:\n      rl_delete_text(local_30,local_2c);\n      rl_point = local_30;\n      puVar7 = rl_undo_list;\n    }" { (expression_statement "local_30 = rl_undo_list[1];" (assignment_expression "local_30 = rl_undo_list[1]" identifier = (subscript_expression "rl_undo_list[1]" identifier [ number_literal ])) ;) (if_statement "if (local_30 == -1) {\n        local_30 = rl_point;\n      }\n      else if (local_30 == -2) {\n        local_30 = rl_end;\n      }" if (parenthesized_expression "(local_30 == -1)" ( (binary_expression "local_30 == -1" identifier == number_literal) )) (compound_statement "{\n        local_30 = rl_point;\n      }" { (expression_statement "local_30 = rl_point;" (assignment_expression "local_30 = rl_point" identifier = identifier) ;) }) (else_clause "else if (local_30 == -2) {\n        local_30 = rl_end;\n      }" else (if_statement "if (local_30 == -2) {\n        local_30 = rl_end;\n      }" if (parenthesized_expression "(local_30 == -2)" ( (binary_expression "local_30 == -2" identifier == number_literal) )) (compound_statement "{\n        local_30 = rl_end;\n      }" { (expression_statement "local_30 = rl_end;" (assignment_expression "local_30 = rl_end" identifier = identifier) ;) })))) (expression_statement "local_2c = rl_undo_list[2];" (assignment_expression "local_2c = rl_undo_list[2]" identifier = (subscript_expression "rl_undo_list[2]" identifier [ number_literal ])) ;) (if_statement "if (local_2c == -1) {\n        local_2c = rl_point;\n        goto LAB_000fea70;\n      }" if (parenthesized_expression "(local_2c == -1)" ( (binary_expression "local_2c == -1" identifier == number_literal) )) (compound_statement "{\n        local_2c = rl_point;\n        goto LAB_000fea70;\n      }" { (expression_statement "local_2c = rl_point;" (assignment_expression "local_2c = rl_point" identifier = identifier) ;) (goto_statement "goto LAB_000fea70;" goto statement_identifier ;) })) (if_statement "if (local_2c != -2) goto LAB_000fea70;" if (parenthesized_expression "(local_2c != -2)" ( (binary_expression "local_2c != -2" identifier != number_literal) )) (goto_statement "goto LAB_000fea70;" goto statement_identifier ;)) (expression_statement "local_2c = rl_end;" (assignment_expression "local_2c = rl_end" identifier = identifier) ;) (if_statement "if (uVar1 != 1) goto LAB_000fea79;" if (parenthesized_expression "(uVar1 != 1)" ( (binary_expression "uVar1 != 1" identifier != number_literal) )) (goto_statement "goto LAB_000fea79;" goto statement_identifier ;)) (labeled_statement "LAB_000feba0:\n      rl_delete_text(local_30,local_2c);" statement_identifier : (expression_statement "rl_delete_text(local_30,local_2c);" (call_expression "rl_delete_text(local_30,local_2c)" identifier (argument_list "(local_30,local_2c)" ( identifier , identifier ))) ;)) (expression_statement "rl_point = local_30;" (assignment_expression "rl_point = local_30" identifier = identifier) ;) (expression_statement "puVar7 = rl_undo_list;" (assignment_expression "puVar7 = rl_undo_list" identifier = identifier) ;) }) (else_clause "else {\nLAB_000fea70:\n      if (uVar1 == 1) goto LAB_000feba0;\nLAB_000fea79:\n      if (uVar1 == 0) {\n        rl_point = local_30;\n        rl_insert_text(rl_undo_list[3]);\n        xfree(rl_undo_list[3]);\n        puVar7 = rl_undo_list;\n      }\n      else {\n        puVar7 = rl_undo_list;\n        if (uVar1 == 2) {\n          if (iVar8 == 0) {\n            rl_ding();\n            puVar7 = rl_undo_list;\n          }\n          else {\n            iVar8 = iVar8 + -1;\n          }\n        }\n        else {\n          iVar8 = iVar8 + (uint)(uVar1 == 3);\n        }\n      }\n    }" else (compound_statement "{\nLAB_000fea70:\n      if (uVar1 == 1) goto LAB_000feba0;\nLAB_000fea79:\n      if (uVar1 == 0) {\n        rl_point = local_30;\n        rl_insert_text(rl_undo_list[3]);\n        xfree(rl_undo_list[3]);\n        puVar7 = rl_undo_list;\n      }\n      else {\n        puVar7 = rl_undo_list;\n        if (uVar1 == 2) {\n          if (iVar8 == 0) {\n            rl_ding();\n            puVar7 = rl_undo_list;\n          }\n          else {\n            iVar8 = iVar8 + -1;\n          }\n        }\n        else {\n          iVar8 = iVar8 + (uint)(uVar1 == 3);\n        }\n      }\n    }" { (labeled_statement "LAB_000fea70:\n      if (uVar1 == 1) goto LAB_000feba0;" statement_identifier : (if_statement "if (uVar1 == 1) goto LAB_000feba0;" if (parenthesized_expression "(uVar1 == 1)" ( (binary_expression "uVar1 == 1" identifier == number_literal) )) (goto_statement "goto LAB_000feba0;" goto statement_identifier ;))) (labeled_statement "LAB_000fea79:\n      if (uVar1 == 0) {\n        rl_point = local_30;\n        rl_insert_text(rl_undo_list[3]);\n        xfree(rl_undo_list[3]);\n        puVar7 = rl_undo_list;\n      }\n      else {\n        puVar7 = rl_undo_list;\n        if (uVar1 == 2) {\n          if (iVar8 == 0) {\n            rl_ding();\n            puVar7 = rl_undo_list;\n          }\n          else {\n            iVar8 = iVar8 + -1;\n          }\n        }\n        else {\n          iVar8 = iVar8 + (uint)(uVar1 == 3);\n        }\n      }" statement_identifier : (if_statement "if (uVar1 == 0) {\n        rl_point = local_30;\n        rl_insert_text(rl_undo_list[3]);\n        xfree(rl_undo_list[3]);\n        puVar7 = rl_undo_list;\n      }\n      else {\n        puVar7 = rl_undo_list;\n        if (uVar1 == 2) {\n          if (iVar8 == 0) {\n            rl_ding();\n            puVar7 = rl_undo_list;\n          }\n          else {\n            iVar8 = iVar8 + -1;\n          }\n        }\n        else {\n          iVar8 = iVar8 + (uint)(uVar1 == 3);\n        }\n      }" if (parenthesized_expression "(uVar1 == 0)" ( (binary_expression "uVar1 == 0" identifier == number_literal) )) (compound_statement "{\n        rl_point = local_30;\n        rl_insert_text(rl_undo_list[3]);\n        xfree(rl_undo_list[3]);\n        puVar7 = rl_undo_list;\n      }" { (expression_statement "rl_point = local_30;" (assignment_expression "rl_point = local_30" identifier = identifier) ;) (expression_statement "rl_insert_text(rl_undo_list[3]);" (call_expression "rl_insert_text(rl_undo_list[3])" identifier (argument_list "(rl_undo_list[3])" ( (subscript_expression "rl_undo_list[3]" identifier [ number_literal ]) ))) ;) (expression_statement "xfree(rl_undo_list[3]);" (call_expression "xfree(rl_undo_list[3])" identifier (argument_list "(rl_undo_list[3])" ( (subscript_expression "rl_undo_list[3]" identifier [ number_literal ]) ))) ;) (expression_statement "puVar7 = rl_undo_list;" (assignment_expression "puVar7 = rl_undo_list" identifier = identifier) ;) }) (else_clause "else {\n        puVar7 = rl_undo_list;\n        if (uVar1 == 2) {\n          if (iVar8 == 0) {\n            rl_ding();\n            puVar7 = rl_undo_list;\n          }\n          else {\n            iVar8 = iVar8 + -1;\n          }\n        }\n        else {\n          iVar8 = iVar8 + (uint)(uVar1 == 3);\n        }\n      }" else (compound_statement "{\n        puVar7 = rl_undo_list;\n        if (uVar1 == 2) {\n          if (iVar8 == 0) {\n            rl_ding();\n            puVar7 = rl_undo_list;\n          }\n          else {\n            iVar8 = iVar8 + -1;\n          }\n        }\n        else {\n          iVar8 = iVar8 + (uint)(uVar1 == 3);\n        }\n      }" { (expression_statement "puVar7 = rl_undo_list;" (assignment_expression "puVar7 = rl_undo_list" identifier = identifier) ;) (if_statement "if (uVar1 == 2) {\n          if (iVar8 == 0) {\n            rl_ding();\n            puVar7 = rl_undo_list;\n          }\n          else {\n            iVar8 = iVar8 + -1;\n          }\n        }\n        else {\n          iVar8 = iVar8 + (uint)(uVar1 == 3);\n        }" if (parenthesized_expression "(uVar1 == 2)" ( (binary_expression "uVar1 == 2" identifier == number_literal) )) (compound_statement "{\n          if (iVar8 == 0) {\n            rl_ding();\n            puVar7 = rl_undo_list;\n          }\n          else {\n            iVar8 = iVar8 + -1;\n          }\n        }" { (if_statement "if (iVar8 == 0) {\n            rl_ding();\n            puVar7 = rl_undo_list;\n          }\n          else {\n            iVar8 = iVar8 + -1;\n          }" if (parenthesized_expression "(iVar8 == 0)" ( (binary_expression "iVar8 == 0" identifier == number_literal) )) (compound_statement "{\n            rl_ding();\n            puVar7 = rl_undo_list;\n          }" { (expression_statement "rl_ding();" (call_expression "rl_ding()" identifier (argument_list "()" ( ))) ;) (expression_statement "puVar7 = rl_undo_list;" (assignment_expression "puVar7 = rl_undo_list" identifier = identifier) ;) }) (else_clause "else {\n            iVar8 = iVar8 + -1;\n          }" else (compound_statement "{\n            iVar8 = iVar8 + -1;\n          }" { (expression_statement "iVar8 = iVar8 + -1;" (assignment_expression "iVar8 = iVar8 + -1" identifier = (binary_expression "iVar8 + -1" identifier + number_literal)) ;) }))) }) (else_clause "else {\n          iVar8 = iVar8 + (uint)(uVar1 == 3);\n        }" else (compound_statement "{\n          iVar8 = iVar8 + (uint)(uVar1 == 3);\n        }" { (expression_statement "iVar8 = iVar8 + (uint)(uVar1 == 3);" (assignment_expression "iVar8 = iVar8 + (uint)(uVar1 == 3)" identifier = (binary_expression "iVar8 + (uint)(uVar1 == 3)" identifier + (call_expression "(uint)(uVar1 == 3)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(uVar1 == 3)" ( (binary_expression "uVar1 == 3" identifier == number_literal) ))))) ;) }))) })))) }))) (expression_statement "_rl_doing_an_undo = 0;" (assignment_expression "_rl_doing_an_undo = 0" identifier = number_literal) ;) (expression_statement "rl_readline_state = rl_readline_state & 0xfffeffff;" (assignment_expression "rl_readline_state = rl_readline_state & 0xfffeffff" identifier = (binary_expression "rl_readline_state & 0xfffeffff" identifier & number_literal)) ;) (expression_statement "rl_undo_list = (undefined4 *)*puVar7;" (assignment_expression "rl_undo_list = (undefined4 *)*puVar7" identifier = (cast_expression "(undefined4 *)*puVar7" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "*puVar7" * identifier))) ;) (expression_statement "*puVar7 = 0;" (assignment_expression "*puVar7 = 0" (pointer_expression "*puVar7" * identifier) = number_literal) ;) (expression_statement "iVar3 = current_history();" (assignment_expression "iVar3 = current_history()" identifier = (call_expression "current_history()" identifier (argument_list "()" ( )))) ;) (expression_statement "puVar5 = rl_undo_list;" (assignment_expression "puVar5 = rl_undo_list" identifier = identifier) ;) (expression_statement "uVar2 = rl_line_buffer;" (assignment_expression "uVar2 = rl_line_buffer" identifier = identifier) ;) (if_statement "if (((iVar3 != 0) && (*(undefined4 **)(iVar3 + 8) == puVar7)) &&\n       (*(undefined4 **)(iVar3 + 8) != (undefined4 *)0x0)) {\n      uVar4 = where_history();\n      puVar5 = (undefined4 *)replace_history_entry(uVar4,uVar2,puVar5);\n      xfree(*puVar5);\n      if ((void *)puVar5[1] != (void *)0x0) {\n        free((void *)puVar5[1]);\n      }\n      xfree(puVar5);\n    }" if (parenthesized_expression "(((iVar3 != 0) && (*(undefined4 **)(iVar3 + 8) == puVar7)) &&\n       (*(undefined4 **)(iVar3 + 8) != (undefined4 *)0x0))" ( (binary_expression "((iVar3 != 0) && (*(undefined4 **)(iVar3 + 8) == puVar7)) &&\n       (*(undefined4 **)(iVar3 + 8) != (undefined4 *)0x0)" (parenthesized_expression "((iVar3 != 0) && (*(undefined4 **)(iVar3 + 8) == puVar7))" ( (binary_expression "(iVar3 != 0) && (*(undefined4 **)(iVar3 + 8) == puVar7)" (parenthesized_expression "(iVar3 != 0)" ( (binary_expression "iVar3 != 0" identifier != number_literal) )) && (parenthesized_expression "(*(undefined4 **)(iVar3 + 8) == puVar7)" ( (binary_expression "*(undefined4 **)(iVar3 + 8) == puVar7" (pointer_expression "*(undefined4 **)(iVar3 + 8)" * (cast_expression "(undefined4 **)(iVar3 + 8)" ( (type_descriptor "undefined4 **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(iVar3 + 8)" ( (binary_expression "iVar3 + 8" identifier + number_literal) )))) == identifier) ))) )) && (parenthesized_expression "(*(undefined4 **)(iVar3 + 8) != (undefined4 *)0x0)" ( (binary_expression "*(undefined4 **)(iVar3 + 8) != (undefined4 *)0x0" (pointer_expression "*(undefined4 **)(iVar3 + 8)" * (cast_expression "(undefined4 **)(iVar3 + 8)" ( (type_descriptor "undefined4 **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(iVar3 + 8)" ( (binary_expression "iVar3 + 8" identifier + number_literal) )))) != (cast_expression "(undefined4 *)0x0" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) ))) )) (compound_statement "{\n      uVar4 = where_history();\n      puVar5 = (undefined4 *)replace_history_entry(uVar4,uVar2,puVar5);\n      xfree(*puVar5);\n      if ((void *)puVar5[1] != (void *)0x0) {\n        free((void *)puVar5[1]);\n      }\n      xfree(puVar5);\n    }" { (expression_statement "uVar4 = where_history();" (assignment_expression "uVar4 = where_history()" identifier = (call_expression "where_history()" identifier (argument_list "()" ( )))) ;) (expression_statement "puVar5 = (undefined4 *)replace_history_entry(uVar4,uVar2,puVar5);" (assignment_expression "puVar5 = (undefined4 *)replace_history_entry(uVar4,uVar2,puVar5)" identifier = (cast_expression "(undefined4 *)replace_history_entry(uVar4,uVar2,puVar5)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "replace_history_entry(uVar4,uVar2,puVar5)" identifier (argument_list "(uVar4,uVar2,puVar5)" ( identifier , identifier , identifier ))))) ;) (expression_statement "xfree(*puVar5);" (call_expression "xfree(*puVar5)" identifier (argument_list "(*puVar5)" ( (pointer_expression "*puVar5" * identifier) ))) ;) (if_statement "if ((void *)puVar5[1] != (void *)0x0) {\n        free((void *)puVar5[1]);\n      }" if (parenthesized_expression "((void *)puVar5[1] != (void *)0x0)" ( (binary_expression "(void *)puVar5[1] != (void *)0x0" (cast_expression "(void *)puVar5[1]" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (subscript_expression "puVar5[1]" identifier [ number_literal ])) != (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n        free((void *)puVar5[1]);\n      }" { (expression_statement "free((void *)puVar5[1]);" (call_expression "free((void *)puVar5[1])" identifier (argument_list "((void *)puVar5[1])" ( (cast_expression "(void *)puVar5[1]" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (subscript_expression "puVar5[1]" identifier [ number_literal ])) ))) ;) })) (expression_statement "xfree(puVar5);" (call_expression "xfree(puVar5)" identifier (argument_list "(puVar5)" ( identifier ))) ;) })) (expression_statement "_hs_replace_history_data(0xffffffff,puVar7,rl_undo_list);" (call_expression "_hs_replace_history_data(0xffffffff,puVar7,rl_undo_list)" identifier (argument_list "(0xffffffff,puVar7,rl_undo_list)" ( number_literal , identifier , identifier ))) ;) (if_statement "if ((_rl_saved_line_for_history == 0) ||\n       (puVar5 = *(undefined4 **)(_rl_saved_line_for_history + 8), puVar5 == (undefined4 *)0x0)) {\nLAB_000feb0a:\n      xfree(puVar7);\n    }\n    else {\n      if (puVar5 == puVar7) {\n        *(undefined4 **)(_rl_saved_line_for_history + 8) = rl_undo_list;\n        goto LAB_000feb0a;\n      }\n      do {\n        puVar6 = puVar5;\n        puVar5 = (undefined4 *)*puVar6;\n        if (puVar5 == (undefined4 *)0x0) goto LAB_000feb0a;\n      } while (puVar5 != puVar7);\n      *puVar6 = rl_undo_list;\n      xfree(puVar7);\n    }" if (parenthesized_expression "((_rl_saved_line_for_history == 0) ||\n       (puVar5 = *(undefined4 **)(_rl_saved_line_for_history + 8), puVar5 == (undefined4 *)0x0))" ( (binary_expression "(_rl_saved_line_for_history == 0) ||\n       (puVar5 = *(undefined4 **)(_rl_saved_line_for_history + 8), puVar5 == (undefined4 *)0x0)" (parenthesized_expression "(_rl_saved_line_for_history == 0)" ( (binary_expression "_rl_saved_line_for_history == 0" identifier == number_literal) )) || (parenthesized_expression "(puVar5 = *(undefined4 **)(_rl_saved_line_for_history + 8), puVar5 == (undefined4 *)0x0)" ( (comma_expression "puVar5 = *(undefined4 **)(_rl_saved_line_for_history + 8), puVar5 == (undefined4 *)0x0" (assignment_expression "puVar5 = *(undefined4 **)(_rl_saved_line_for_history + 8)" identifier = (pointer_expression "*(undefined4 **)(_rl_saved_line_for_history + 8)" * (cast_expression "(undefined4 **)(_rl_saved_line_for_history + 8)" ( (type_descriptor "undefined4 **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(_rl_saved_line_for_history + 8)" ( (binary_expression "_rl_saved_line_for_history + 8" identifier + number_literal) ))))) , (binary_expression "puVar5 == (undefined4 *)0x0" identifier == (cast_expression "(undefined4 *)0x0" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal))) ))) )) (compound_statement "{\nLAB_000feb0a:\n      xfree(puVar7);\n    }" { (labeled_statement "LAB_000feb0a:\n      xfree(puVar7);" statement_identifier : (expression_statement "xfree(puVar7);" (call_expression "xfree(puVar7)" identifier (argument_list "(puVar7)" ( identifier ))) ;)) }) (else_clause "else {\n      if (puVar5 == puVar7) {\n        *(undefined4 **)(_rl_saved_line_for_history + 8) = rl_undo_list;\n        goto LAB_000feb0a;\n      }\n      do {\n        puVar6 = puVar5;\n        puVar5 = (undefined4 *)*puVar6;\n        if (puVar5 == (undefined4 *)0x0) goto LAB_000feb0a;\n      } while (puVar5 != puVar7);\n      *puVar6 = rl_undo_list;\n      xfree(puVar7);\n    }" else (compound_statement "{\n      if (puVar5 == puVar7) {\n        *(undefined4 **)(_rl_saved_line_for_history + 8) = rl_undo_list;\n        goto LAB_000feb0a;\n      }\n      do {\n        puVar6 = puVar5;\n        puVar5 = (undefined4 *)*puVar6;\n        if (puVar5 == (undefined4 *)0x0) goto LAB_000feb0a;\n      } while (puVar5 != puVar7);\n      *puVar6 = rl_undo_list;\n      xfree(puVar7);\n    }" { (if_statement "if (puVar5 == puVar7) {\n        *(undefined4 **)(_rl_saved_line_for_history + 8) = rl_undo_list;\n        goto LAB_000feb0a;\n      }" if (parenthesized_expression "(puVar5 == puVar7)" ( (binary_expression "puVar5 == puVar7" identifier == identifier) )) (compound_statement "{\n        *(undefined4 **)(_rl_saved_line_for_history + 8) = rl_undo_list;\n        goto LAB_000feb0a;\n      }" { (expression_statement "*(undefined4 **)(_rl_saved_line_for_history + 8) = rl_undo_list;" (assignment_expression "*(undefined4 **)(_rl_saved_line_for_history + 8) = rl_undo_list" (pointer_expression "*(undefined4 **)(_rl_saved_line_for_history + 8)" * (cast_expression "(undefined4 **)(_rl_saved_line_for_history + 8)" ( (type_descriptor "undefined4 **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(_rl_saved_line_for_history + 8)" ( (binary_expression "_rl_saved_line_for_history + 8" identifier + number_literal) )))) = identifier) ;) (goto_statement "goto LAB_000feb0a;" goto statement_identifier ;) })) (do_statement "do {\n        puVar6 = puVar5;\n        puVar5 = (undefined4 *)*puVar6;\n        if (puVar5 == (undefined4 *)0x0) goto LAB_000feb0a;\n      } while (puVar5 != puVar7);" do (compound_statement "{\n        puVar6 = puVar5;\n        puVar5 = (undefined4 *)*puVar6;\n        if (puVar5 == (undefined4 *)0x0) goto LAB_000feb0a;\n      }" { (expression_statement "puVar6 = puVar5;" (assignment_expression "puVar6 = puVar5" identifier = identifier) ;) (expression_statement "puVar5 = (undefined4 *)*puVar6;" (assignment_expression "puVar5 = (undefined4 *)*puVar6" identifier = (cast_expression "(undefined4 *)*puVar6" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "*puVar6" * identifier))) ;) (if_statement "if (puVar5 == (undefined4 *)0x0) goto LAB_000feb0a;" if (parenthesized_expression "(puVar5 == (undefined4 *)0x0)" ( (binary_expression "puVar5 == (undefined4 *)0x0" identifier == (cast_expression "(undefined4 *)0x0" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (goto_statement "goto LAB_000feb0a;" goto statement_identifier ;)) }) while (parenthesized_expression "(puVar5 != puVar7)" ( (binary_expression "puVar5 != puVar7" identifier != identifier) )) ;) (expression_statement "*puVar6 = rl_undo_list;" (assignment_expression "*puVar6 = rl_undo_list" (pointer_expression "*puVar6" * identifier) = identifier) ;) (expression_statement "xfree(puVar7);" (call_expression "xfree(puVar7)" identifier (argument_list "(puVar7)" ( identifier ))) ;) }))) (if_statement "if (iVar8 == 0) {\n      return 1;\n    }" if (parenthesized_expression "(iVar8 == 0)" ( (binary_expression "iVar8 == 0" identifier == number_literal) )) (compound_statement "{\n      return 1;\n    }" { (return_statement "return 1;" return number_literal ;) })) }) while (parenthesized_expression "( true )" ( true )) ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* WARNING: Unknown calling convention */\n\nint rl_do_undo(void)\n\n{\n  UNDO_LIST *pUVar1;\n  undo_code uVar2;\n  char *line;\n  HIST_ENTRY *pHVar3;\n  int which;\n  UNDO_LIST *pUVar4;\n  UNDO_LIST *pUVar5;\n  int iVar6;\n  int local_30;\n  int local_2c;\n  \n  iVar6 = 0;\n  local_2c = 0;\n  local_30 = 0;\n  do {\n    if (rl_undo_list == (UNDO_LIST *)0x0) {\n      return 0;\n    }\n    uVar2 = rl_undo_list->what;\n    _rl_doing_an_undo = 1;\n    rl_readline_state = rl_readline_state | 0x10000;\n    if (uVar2 < UNDO_BEGIN) {\n      local_30 = rl_undo_list->start;\n      if (local_30 == -1) {\n        local_30 = rl_point;\n      }\n      else if (local_30 == -2) {\n        local_30 = rl_end;\n      }\n      local_2c = rl_undo_list->end;\n      if (local_2c == -1) {\n        local_2c = rl_point;\n        goto LAB_000fea70;\n      }\n      if (local_2c != -2) goto LAB_000fea70;\n      local_2c = rl_end;\n      if (uVar2 != UNDO_INSERT) goto LAB_000fea79;\nLAB_000feba0:\n      rl_delete_text(local_30,local_2c);\n      rl_point = local_30;\n      pUVar5 = rl_undo_list;\n    }\n    else {\nLAB_000fea70:\n      if (uVar2 == UNDO_INSERT) goto LAB_000feba0;\nLAB_000fea79:\n      if (uVar2 == UNDO_DELETE) {\n        rl_point = local_30;\n        rl_insert_text(rl_undo_list->text);\n        xfree(rl_undo_list->text);\n        pUVar5 = rl_undo_list;\n      }\n      else {\n        pUVar5 = rl_undo_list;\n        if (uVar2 == UNDO_BEGIN) {\n          if (iVar6 == 0) {\n            rl_ding();\n            pUVar5 = rl_undo_list;\n          }\n          else {\n            iVar6 = iVar6 + -1;\n          }\n        }\n        else {\n          iVar6 = iVar6 + (uint)(uVar2 == UNDO_END);\n        }\n      }\n    }\n    _rl_doing_an_undo = 0;\n    rl_readline_state = rl_readline_state & 0xfffeffff;\n    rl_undo_list = pUVar5->next;\n    pUVar5->next = (undo_list *)0x0;\n    pHVar3 = current_history();\n    pUVar1 = rl_undo_list;\n    line = rl_line_buffer;\n    if (((pHVar3 != (HIST_ENTRY *)0x0) && ((UNDO_LIST *)pHVar3->data == pUVar5)) &&\n       ((UNDO_LIST *)pHVar3->data != (UNDO_LIST *)0x0)) {\n      which = where_history();\n      pHVar3 = replace_history_entry(which,line,pUVar1);\n      xfree(pHVar3->line);\n      if (pHVar3->timestamp != (char *)0x0) {\n        free(pHVar3->timestamp);\n      }\n      xfree(pHVar3);\n    }\n    _hs_replace_history_data(-1,&pUVar5->next,&rl_undo_list->next);\n    if ((_rl_saved_line_for_history == (HIST_ENTRY *)0x0) ||\n       (pUVar1 = (UNDO_LIST *)_rl_saved_line_for_history->data, pUVar1 == (UNDO_LIST *)0x0)) {\nLAB_000feb0a:\n      xfree(pUVar5);\n    }\n    else {\n      if (pUVar1 == pUVar5) {\n        _rl_saved_line_for_history->data = rl_undo_list;\n        goto LAB_000feb0a;\n      }\n      do {\n        pUVar4 = pUVar1;\n        pUVar1 = pUVar4->next;\n        if (pUVar1 == (undo_list *)0x0) goto LAB_000feb0a;\n      } while (pUVar1 != pUVar5);\n      pUVar4->next = rl_undo_list;\n      xfree(pUVar5);\n    }\n    if (iVar6 == 0) {\n      return 1;\n    }\n  } while( true );\n}\n\n" comment comment (function_definition "int rl_do_undo(void)\n\n{\n  UNDO_LIST *pUVar1;\n  undo_code uVar2;\n  char *line;\n  HIST_ENTRY *pHVar3;\n  int which;\n  UNDO_LIST *pUVar4;\n  UNDO_LIST *pUVar5;\n  int iVar6;\n  int local_30;\n  int local_2c;\n  \n  iVar6 = 0;\n  local_2c = 0;\n  local_30 = 0;\n  do {\n    if (rl_undo_list == (UNDO_LIST *)0x0) {\n      return 0;\n    }\n    uVar2 = rl_undo_list->what;\n    _rl_doing_an_undo = 1;\n    rl_readline_state = rl_readline_state | 0x10000;\n    if (uVar2 < UNDO_BEGIN) {\n      local_30 = rl_undo_list->start;\n      if (local_30 == -1) {\n        local_30 = rl_point;\n      }\n      else if (local_30 == -2) {\n        local_30 = rl_end;\n      }\n      local_2c = rl_undo_list->end;\n      if (local_2c == -1) {\n        local_2c = rl_point;\n        goto LAB_000fea70;\n      }\n      if (local_2c != -2) goto LAB_000fea70;\n      local_2c = rl_end;\n      if (uVar2 != UNDO_INSERT) goto LAB_000fea79;\nLAB_000feba0:\n      rl_delete_text(local_30,local_2c);\n      rl_point = local_30;\n      pUVar5 = rl_undo_list;\n    }\n    else {\nLAB_000fea70:\n      if (uVar2 == UNDO_INSERT) goto LAB_000feba0;\nLAB_000fea79:\n      if (uVar2 == UNDO_DELETE) {\n        rl_point = local_30;\n        rl_insert_text(rl_undo_list->text);\n        xfree(rl_undo_list->text);\n        pUVar5 = rl_undo_list;\n      }\n      else {\n        pUVar5 = rl_undo_list;\n        if (uVar2 == UNDO_BEGIN) {\n          if (iVar6 == 0) {\n            rl_ding();\n            pUVar5 = rl_undo_list;\n          }\n          else {\n            iVar6 = iVar6 + -1;\n          }\n        }\n        else {\n          iVar6 = iVar6 + (uint)(uVar2 == UNDO_END);\n        }\n      }\n    }\n    _rl_doing_an_undo = 0;\n    rl_readline_state = rl_readline_state & 0xfffeffff;\n    rl_undo_list = pUVar5->next;\n    pUVar5->next = (undo_list *)0x0;\n    pHVar3 = current_history();\n    pUVar1 = rl_undo_list;\n    line = rl_line_buffer;\n    if (((pHVar3 != (HIST_ENTRY *)0x0) && ((UNDO_LIST *)pHVar3->data == pUVar5)) &&\n       ((UNDO_LIST *)pHVar3->data != (UNDO_LIST *)0x0)) {\n      which = where_history();\n      pHVar3 = replace_history_entry(which,line,pUVar1);\n      xfree(pHVar3->line);\n      if (pHVar3->timestamp != (char *)0x0) {\n        free(pHVar3->timestamp);\n      }\n      xfree(pHVar3);\n    }\n    _hs_replace_history_data(-1,&pUVar5->next,&rl_undo_list->next);\n    if ((_rl_saved_line_for_history == (HIST_ENTRY *)0x0) ||\n       (pUVar1 = (UNDO_LIST *)_rl_saved_line_for_history->data, pUVar1 == (UNDO_LIST *)0x0)) {\nLAB_000feb0a:\n      xfree(pUVar5);\n    }\n    else {\n      if (pUVar1 == pUVar5) {\n        _rl_saved_line_for_history->data = rl_undo_list;\n        goto LAB_000feb0a;\n      }\n      do {\n        pUVar4 = pUVar1;\n        pUVar1 = pUVar4->next;\n        if (pUVar1 == (undo_list *)0x0) goto LAB_000feb0a;\n      } while (pUVar1 != pUVar5);\n      pUVar4->next = rl_undo_list;\n      xfree(pUVar5);\n    }\n    if (iVar6 == 0) {\n      return 1;\n    }\n  } while( true );\n}" primitive_type (function_declarator "rl_do_undo(void)" identifier (parameter_list "(void)" ( (parameter_declaration "void" primitive_type) ))) (compound_statement "{\n  UNDO_LIST *pUVar1;\n  undo_code uVar2;\n  char *line;\n  HIST_ENTRY *pHVar3;\n  int which;\n  UNDO_LIST *pUVar4;\n  UNDO_LIST *pUVar5;\n  int iVar6;\n  int local_30;\n  int local_2c;\n  \n  iVar6 = 0;\n  local_2c = 0;\n  local_30 = 0;\n  do {\n    if (rl_undo_list == (UNDO_LIST *)0x0) {\n      return 0;\n    }\n    uVar2 = rl_undo_list->what;\n    _rl_doing_an_undo = 1;\n    rl_readline_state = rl_readline_state | 0x10000;\n    if (uVar2 < UNDO_BEGIN) {\n      local_30 = rl_undo_list->start;\n      if (local_30 == -1) {\n        local_30 = rl_point;\n      }\n      else if (local_30 == -2) {\n        local_30 = rl_end;\n      }\n      local_2c = rl_undo_list->end;\n      if (local_2c == -1) {\n        local_2c = rl_point;\n        goto LAB_000fea70;\n      }\n      if (local_2c != -2) goto LAB_000fea70;\n      local_2c = rl_end;\n      if (uVar2 != UNDO_INSERT) goto LAB_000fea79;\nLAB_000feba0:\n      rl_delete_text(local_30,local_2c);\n      rl_point = local_30;\n      pUVar5 = rl_undo_list;\n    }\n    else {\nLAB_000fea70:\n      if (uVar2 == UNDO_INSERT) goto LAB_000feba0;\nLAB_000fea79:\n      if (uVar2 == UNDO_DELETE) {\n        rl_point = local_30;\n        rl_insert_text(rl_undo_list->text);\n        xfree(rl_undo_list->text);\n        pUVar5 = rl_undo_list;\n      }\n      else {\n        pUVar5 = rl_undo_list;\n        if (uVar2 == UNDO_BEGIN) {\n          if (iVar6 == 0) {\n            rl_ding();\n            pUVar5 = rl_undo_list;\n          }\n          else {\n            iVar6 = iVar6 + -1;\n          }\n        }\n        else {\n          iVar6 = iVar6 + (uint)(uVar2 == UNDO_END);\n        }\n      }\n    }\n    _rl_doing_an_undo = 0;\n    rl_readline_state = rl_readline_state & 0xfffeffff;\n    rl_undo_list = pUVar5->next;\n    pUVar5->next = (undo_list *)0x0;\n    pHVar3 = current_history();\n    pUVar1 = rl_undo_list;\n    line = rl_line_buffer;\n    if (((pHVar3 != (HIST_ENTRY *)0x0) && ((UNDO_LIST *)pHVar3->data == pUVar5)) &&\n       ((UNDO_LIST *)pHVar3->data != (UNDO_LIST *)0x0)) {\n      which = where_history();\n      pHVar3 = replace_history_entry(which,line,pUVar1);\n      xfree(pHVar3->line);\n      if (pHVar3->timestamp != (char *)0x0) {\n        free(pHVar3->timestamp);\n      }\n      xfree(pHVar3);\n    }\n    _hs_replace_history_data(-1,&pUVar5->next,&rl_undo_list->next);\n    if ((_rl_saved_line_for_history == (HIST_ENTRY *)0x0) ||\n       (pUVar1 = (UNDO_LIST *)_rl_saved_line_for_history->data, pUVar1 == (UNDO_LIST *)0x0)) {\nLAB_000feb0a:\n      xfree(pUVar5);\n    }\n    else {\n      if (pUVar1 == pUVar5) {\n        _rl_saved_line_for_history->data = rl_undo_list;\n        goto LAB_000feb0a;\n      }\n      do {\n        pUVar4 = pUVar1;\n        pUVar1 = pUVar4->next;\n        if (pUVar1 == (undo_list *)0x0) goto LAB_000feb0a;\n      } while (pUVar1 != pUVar5);\n      pUVar4->next = rl_undo_list;\n      xfree(pUVar5);\n    }\n    if (iVar6 == 0) {\n      return 1;\n    }\n  } while( true );\n}" { (declaration "UNDO_LIST *pUVar1;" type_identifier (pointer_declarator "*pUVar1" * identifier) ;) (declaration "undo_code uVar2;" type_identifier identifier ;) (declaration "char *line;" primitive_type (pointer_declarator "*line" * identifier) ;) (declaration "HIST_ENTRY *pHVar3;" type_identifier (pointer_declarator "*pHVar3" * identifier) ;) (declaration "int which;" primitive_type identifier ;) (declaration "UNDO_LIST *pUVar4;" type_identifier (pointer_declarator "*pUVar4" * identifier) ;) (declaration "UNDO_LIST *pUVar5;" type_identifier (pointer_declarator "*pUVar5" * identifier) ;) (declaration "int iVar6;" primitive_type identifier ;) (declaration "int local_30;" primitive_type identifier ;) (declaration "int local_2c;" primitive_type identifier ;) (expression_statement "iVar6 = 0;" (assignment_expression "iVar6 = 0" identifier = number_literal) ;) (expression_statement "local_2c = 0;" (assignment_expression "local_2c = 0" identifier = number_literal) ;) (expression_statement "local_30 = 0;" (assignment_expression "local_30 = 0" identifier = number_literal) ;) (do_statement "do {\n    if (rl_undo_list == (UNDO_LIST *)0x0) {\n      return 0;\n    }\n    uVar2 = rl_undo_list->what;\n    _rl_doing_an_undo = 1;\n    rl_readline_state = rl_readline_state | 0x10000;\n    if (uVar2 < UNDO_BEGIN) {\n      local_30 = rl_undo_list->start;\n      if (local_30 == -1) {\n        local_30 = rl_point;\n      }\n      else if (local_30 == -2) {\n        local_30 = rl_end;\n      }\n      local_2c = rl_undo_list->end;\n      if (local_2c == -1) {\n        local_2c = rl_point;\n        goto LAB_000fea70;\n      }\n      if (local_2c != -2) goto LAB_000fea70;\n      local_2c = rl_end;\n      if (uVar2 != UNDO_INSERT) goto LAB_000fea79;\nLAB_000feba0:\n      rl_delete_text(local_30,local_2c);\n      rl_point = local_30;\n      pUVar5 = rl_undo_list;\n    }\n    else {\nLAB_000fea70:\n      if (uVar2 == UNDO_INSERT) goto LAB_000feba0;\nLAB_000fea79:\n      if (uVar2 == UNDO_DELETE) {\n        rl_point = local_30;\n        rl_insert_text(rl_undo_list->text);\n        xfree(rl_undo_list->text);\n        pUVar5 = rl_undo_list;\n      }\n      else {\n        pUVar5 = rl_undo_list;\n        if (uVar2 == UNDO_BEGIN) {\n          if (iVar6 == 0) {\n            rl_ding();\n            pUVar5 = rl_undo_list;\n          }\n          else {\n            iVar6 = iVar6 + -1;\n          }\n        }\n        else {\n          iVar6 = iVar6 + (uint)(uVar2 == UNDO_END);\n        }\n      }\n    }\n    _rl_doing_an_undo = 0;\n    rl_readline_state = rl_readline_state & 0xfffeffff;\n    rl_undo_list = pUVar5->next;\n    pUVar5->next = (undo_list *)0x0;\n    pHVar3 = current_history();\n    pUVar1 = rl_undo_list;\n    line = rl_line_buffer;\n    if (((pHVar3 != (HIST_ENTRY *)0x0) && ((UNDO_LIST *)pHVar3->data == pUVar5)) &&\n       ((UNDO_LIST *)pHVar3->data != (UNDO_LIST *)0x0)) {\n      which = where_history();\n      pHVar3 = replace_history_entry(which,line,pUVar1);\n      xfree(pHVar3->line);\n      if (pHVar3->timestamp != (char *)0x0) {\n        free(pHVar3->timestamp);\n      }\n      xfree(pHVar3);\n    }\n    _hs_replace_history_data(-1,&pUVar5->next,&rl_undo_list->next);\n    if ((_rl_saved_line_for_history == (HIST_ENTRY *)0x0) ||\n       (pUVar1 = (UNDO_LIST *)_rl_saved_line_for_history->data, pUVar1 == (UNDO_LIST *)0x0)) {\nLAB_000feb0a:\n      xfree(pUVar5);\n    }\n    else {\n      if (pUVar1 == pUVar5) {\n        _rl_saved_line_for_history->data = rl_undo_list;\n        goto LAB_000feb0a;\n      }\n      do {\n        pUVar4 = pUVar1;\n        pUVar1 = pUVar4->next;\n        if (pUVar1 == (undo_list *)0x0) goto LAB_000feb0a;\n      } while (pUVar1 != pUVar5);\n      pUVar4->next = rl_undo_list;\n      xfree(pUVar5);\n    }\n    if (iVar6 == 0) {\n      return 1;\n    }\n  } while( true );" do (compound_statement "{\n    if (rl_undo_list == (UNDO_LIST *)0x0) {\n      return 0;\n    }\n    uVar2 = rl_undo_list->what;\n    _rl_doing_an_undo = 1;\n    rl_readline_state = rl_readline_state | 0x10000;\n    if (uVar2 < UNDO_BEGIN) {\n      local_30 = rl_undo_list->start;\n      if (local_30 == -1) {\n        local_30 = rl_point;\n      }\n      else if (local_30 == -2) {\n        local_30 = rl_end;\n      }\n      local_2c = rl_undo_list->end;\n      if (local_2c == -1) {\n        local_2c = rl_point;\n        goto LAB_000fea70;\n      }\n      if (local_2c != -2) goto LAB_000fea70;\n      local_2c = rl_end;\n      if (uVar2 != UNDO_INSERT) goto LAB_000fea79;\nLAB_000feba0:\n      rl_delete_text(local_30,local_2c);\n      rl_point = local_30;\n      pUVar5 = rl_undo_list;\n    }\n    else {\nLAB_000fea70:\n      if (uVar2 == UNDO_INSERT) goto LAB_000feba0;\nLAB_000fea79:\n      if (uVar2 == UNDO_DELETE) {\n        rl_point = local_30;\n        rl_insert_text(rl_undo_list->text);\n        xfree(rl_undo_list->text);\n        pUVar5 = rl_undo_list;\n      }\n      else {\n        pUVar5 = rl_undo_list;\n        if (uVar2 == UNDO_BEGIN) {\n          if (iVar6 == 0) {\n            rl_ding();\n            pUVar5 = rl_undo_list;\n          }\n          else {\n            iVar6 = iVar6 + -1;\n          }\n        }\n        else {\n          iVar6 = iVar6 + (uint)(uVar2 == UNDO_END);\n        }\n      }\n    }\n    _rl_doing_an_undo = 0;\n    rl_readline_state = rl_readline_state & 0xfffeffff;\n    rl_undo_list = pUVar5->next;\n    pUVar5->next = (undo_list *)0x0;\n    pHVar3 = current_history();\n    pUVar1 = rl_undo_list;\n    line = rl_line_buffer;\n    if (((pHVar3 != (HIST_ENTRY *)0x0) && ((UNDO_LIST *)pHVar3->data == pUVar5)) &&\n       ((UNDO_LIST *)pHVar3->data != (UNDO_LIST *)0x0)) {\n      which = where_history();\n      pHVar3 = replace_history_entry(which,line,pUVar1);\n      xfree(pHVar3->line);\n      if (pHVar3->timestamp != (char *)0x0) {\n        free(pHVar3->timestamp);\n      }\n      xfree(pHVar3);\n    }\n    _hs_replace_history_data(-1,&pUVar5->next,&rl_undo_list->next);\n    if ((_rl_saved_line_for_history == (HIST_ENTRY *)0x0) ||\n       (pUVar1 = (UNDO_LIST *)_rl_saved_line_for_history->data, pUVar1 == (UNDO_LIST *)0x0)) {\nLAB_000feb0a:\n      xfree(pUVar5);\n    }\n    else {\n      if (pUVar1 == pUVar5) {\n        _rl_saved_line_for_history->data = rl_undo_list;\n        goto LAB_000feb0a;\n      }\n      do {\n        pUVar4 = pUVar1;\n        pUVar1 = pUVar4->next;\n        if (pUVar1 == (undo_list *)0x0) goto LAB_000feb0a;\n      } while (pUVar1 != pUVar5);\n      pUVar4->next = rl_undo_list;\n      xfree(pUVar5);\n    }\n    if (iVar6 == 0) {\n      return 1;\n    }\n  }" { (if_statement "if (rl_undo_list == (UNDO_LIST *)0x0) {\n      return 0;\n    }" if (parenthesized_expression "(rl_undo_list == (UNDO_LIST *)0x0)" ( (binary_expression "rl_undo_list == (UNDO_LIST *)0x0" identifier == (cast_expression "(UNDO_LIST *)0x0" ( (type_descriptor "UNDO_LIST *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      return 0;\n    }" { (return_statement "return 0;" return number_literal ;) })) (expression_statement "uVar2 = rl_undo_list->what;" (assignment_expression "uVar2 = rl_undo_list->what" identifier = (field_expression "rl_undo_list->what" identifier -> field_identifier)) ;) (expression_statement "_rl_doing_an_undo = 1;" (assignment_expression "_rl_doing_an_undo = 1" identifier = number_literal) ;) (expression_statement "rl_readline_state = rl_readline_state | 0x10000;" (assignment_expression "rl_readline_state = rl_readline_state | 0x10000" identifier = (binary_expression "rl_readline_state | 0x10000" identifier | number_literal)) ;) (if_statement "if (uVar2 < UNDO_BEGIN) {\n      local_30 = rl_undo_list->start;\n      if (local_30 == -1) {\n        local_30 = rl_point;\n      }\n      else if (local_30 == -2) {\n        local_30 = rl_end;\n      }\n      local_2c = rl_undo_list->end;\n      if (local_2c == -1) {\n        local_2c = rl_point;\n        goto LAB_000fea70;\n      }\n      if (local_2c != -2) goto LAB_000fea70;\n      local_2c = rl_end;\n      if (uVar2 != UNDO_INSERT) goto LAB_000fea79;\nLAB_000feba0:\n      rl_delete_text(local_30,local_2c);\n      rl_point = local_30;\n      pUVar5 = rl_undo_list;\n    }\n    else {\nLAB_000fea70:\n      if (uVar2 == UNDO_INSERT) goto LAB_000feba0;\nLAB_000fea79:\n      if (uVar2 == UNDO_DELETE) {\n        rl_point = local_30;\n        rl_insert_text(rl_undo_list->text);\n        xfree(rl_undo_list->text);\n        pUVar5 = rl_undo_list;\n      }\n      else {\n        pUVar5 = rl_undo_list;\n        if (uVar2 == UNDO_BEGIN) {\n          if (iVar6 == 0) {\n            rl_ding();\n            pUVar5 = rl_undo_list;\n          }\n          else {\n            iVar6 = iVar6 + -1;\n          }\n        }\n        else {\n          iVar6 = iVar6 + (uint)(uVar2 == UNDO_END);\n        }\n      }\n    }" if (parenthesized_expression "(uVar2 < UNDO_BEGIN)" ( (binary_expression "uVar2 < UNDO_BEGIN" identifier < identifier) )) (compound_statement "{\n      local_30 = rl_undo_list->start;\n      if (local_30 == -1) {\n        local_30 = rl_point;\n      }\n      else if (local_30 == -2) {\n        local_30 = rl_end;\n      }\n      local_2c = rl_undo_list->end;\n      if (local_2c == -1) {\n        local_2c = rl_point;\n        goto LAB_000fea70;\n      }\n      if (local_2c != -2) goto LAB_000fea70;\n      local_2c = rl_end;\n      if (uVar2 != UNDO_INSERT) goto LAB_000fea79;\nLAB_000feba0:\n      rl_delete_text(local_30,local_2c);\n      rl_point = local_30;\n      pUVar5 = rl_undo_list;\n    }" { (expression_statement "local_30 = rl_undo_list->start;" (assignment_expression "local_30 = rl_undo_list->start" identifier = (field_expression "rl_undo_list->start" identifier -> field_identifier)) ;) (if_statement "if (local_30 == -1) {\n        local_30 = rl_point;\n      }\n      else if (local_30 == -2) {\n        local_30 = rl_end;\n      }" if (parenthesized_expression "(local_30 == -1)" ( (binary_expression "local_30 == -1" identifier == number_literal) )) (compound_statement "{\n        local_30 = rl_point;\n      }" { (expression_statement "local_30 = rl_point;" (assignment_expression "local_30 = rl_point" identifier = identifier) ;) }) (else_clause "else if (local_30 == -2) {\n        local_30 = rl_end;\n      }" else (if_statement "if (local_30 == -2) {\n        local_30 = rl_end;\n      }" if (parenthesized_expression "(local_30 == -2)" ( (binary_expression "local_30 == -2" identifier == number_literal) )) (compound_statement "{\n        local_30 = rl_end;\n      }" { (expression_statement "local_30 = rl_end;" (assignment_expression "local_30 = rl_end" identifier = identifier) ;) })))) (expression_statement "local_2c = rl_undo_list->end;" (assignment_expression "local_2c = rl_undo_list->end" identifier = (field_expression "rl_undo_list->end" identifier -> field_identifier)) ;) (if_statement "if (local_2c == -1) {\n        local_2c = rl_point;\n        goto LAB_000fea70;\n      }" if (parenthesized_expression "(local_2c == -1)" ( (binary_expression "local_2c == -1" identifier == number_literal) )) (compound_statement "{\n        local_2c = rl_point;\n        goto LAB_000fea70;\n      }" { (expression_statement "local_2c = rl_point;" (assignment_expression "local_2c = rl_point" identifier = identifier) ;) (goto_statement "goto LAB_000fea70;" goto statement_identifier ;) })) (if_statement "if (local_2c != -2) goto LAB_000fea70;" if (parenthesized_expression "(local_2c != -2)" ( (binary_expression "local_2c != -2" identifier != number_literal) )) (goto_statement "goto LAB_000fea70;" goto statement_identifier ;)) (expression_statement "local_2c = rl_end;" (assignment_expression "local_2c = rl_end" identifier = identifier) ;) (if_statement "if (uVar2 != UNDO_INSERT) goto LAB_000fea79;" if (parenthesized_expression "(uVar2 != UNDO_INSERT)" ( (binary_expression "uVar2 != UNDO_INSERT" identifier != identifier) )) (goto_statement "goto LAB_000fea79;" goto statement_identifier ;)) (labeled_statement "LAB_000feba0:\n      rl_delete_text(local_30,local_2c);" statement_identifier : (expression_statement "rl_delete_text(local_30,local_2c);" (call_expression "rl_delete_text(local_30,local_2c)" identifier (argument_list "(local_30,local_2c)" ( identifier , identifier ))) ;)) (expression_statement "rl_point = local_30;" (assignment_expression "rl_point = local_30" identifier = identifier) ;) (expression_statement "pUVar5 = rl_undo_list;" (assignment_expression "pUVar5 = rl_undo_list" identifier = identifier) ;) }) (else_clause "else {\nLAB_000fea70:\n      if (uVar2 == UNDO_INSERT) goto LAB_000feba0;\nLAB_000fea79:\n      if (uVar2 == UNDO_DELETE) {\n        rl_point = local_30;\n        rl_insert_text(rl_undo_list->text);\n        xfree(rl_undo_list->text);\n        pUVar5 = rl_undo_list;\n      }\n      else {\n        pUVar5 = rl_undo_list;\n        if (uVar2 == UNDO_BEGIN) {\n          if (iVar6 == 0) {\n            rl_ding();\n            pUVar5 = rl_undo_list;\n          }\n          else {\n            iVar6 = iVar6 + -1;\n          }\n        }\n        else {\n          iVar6 = iVar6 + (uint)(uVar2 == UNDO_END);\n        }\n      }\n    }" else (compound_statement "{\nLAB_000fea70:\n      if (uVar2 == UNDO_INSERT) goto LAB_000feba0;\nLAB_000fea79:\n      if (uVar2 == UNDO_DELETE) {\n        rl_point = local_30;\n        rl_insert_text(rl_undo_list->text);\n        xfree(rl_undo_list->text);\n        pUVar5 = rl_undo_list;\n      }\n      else {\n        pUVar5 = rl_undo_list;\n        if (uVar2 == UNDO_BEGIN) {\n          if (iVar6 == 0) {\n            rl_ding();\n            pUVar5 = rl_undo_list;\n          }\n          else {\n            iVar6 = iVar6 + -1;\n          }\n        }\n        else {\n          iVar6 = iVar6 + (uint)(uVar2 == UNDO_END);\n        }\n      }\n    }" { (labeled_statement "LAB_000fea70:\n      if (uVar2 == UNDO_INSERT) goto LAB_000feba0;" statement_identifier : (if_statement "if (uVar2 == UNDO_INSERT) goto LAB_000feba0;" if (parenthesized_expression "(uVar2 == UNDO_INSERT)" ( (binary_expression "uVar2 == UNDO_INSERT" identifier == identifier) )) (goto_statement "goto LAB_000feba0;" goto statement_identifier ;))) (labeled_statement "LAB_000fea79:\n      if (uVar2 == UNDO_DELETE) {\n        rl_point = local_30;\n        rl_insert_text(rl_undo_list->text);\n        xfree(rl_undo_list->text);\n        pUVar5 = rl_undo_list;\n      }\n      else {\n        pUVar5 = rl_undo_list;\n        if (uVar2 == UNDO_BEGIN) {\n          if (iVar6 == 0) {\n            rl_ding();\n            pUVar5 = rl_undo_list;\n          }\n          else {\n            iVar6 = iVar6 + -1;\n          }\n        }\n        else {\n          iVar6 = iVar6 + (uint)(uVar2 == UNDO_END);\n        }\n      }" statement_identifier : (if_statement "if (uVar2 == UNDO_DELETE) {\n        rl_point = local_30;\n        rl_insert_text(rl_undo_list->text);\n        xfree(rl_undo_list->text);\n        pUVar5 = rl_undo_list;\n      }\n      else {\n        pUVar5 = rl_undo_list;\n        if (uVar2 == UNDO_BEGIN) {\n          if (iVar6 == 0) {\n            rl_ding();\n            pUVar5 = rl_undo_list;\n          }\n          else {\n            iVar6 = iVar6 + -1;\n          }\n        }\n        else {\n          iVar6 = iVar6 + (uint)(uVar2 == UNDO_END);\n        }\n      }" if (parenthesized_expression "(uVar2 == UNDO_DELETE)" ( (binary_expression "uVar2 == UNDO_DELETE" identifier == identifier) )) (compound_statement "{\n        rl_point = local_30;\n        rl_insert_text(rl_undo_list->text);\n        xfree(rl_undo_list->text);\n        pUVar5 = rl_undo_list;\n      }" { (expression_statement "rl_point = local_30;" (assignment_expression "rl_point = local_30" identifier = identifier) ;) (expression_statement "rl_insert_text(rl_undo_list->text);" (call_expression "rl_insert_text(rl_undo_list->text)" identifier (argument_list "(rl_undo_list->text)" ( (field_expression "rl_undo_list->text" identifier -> field_identifier) ))) ;) (expression_statement "xfree(rl_undo_list->text);" (call_expression "xfree(rl_undo_list->text)" identifier (argument_list "(rl_undo_list->text)" ( (field_expression "rl_undo_list->text" identifier -> field_identifier) ))) ;) (expression_statement "pUVar5 = rl_undo_list;" (assignment_expression "pUVar5 = rl_undo_list" identifier = identifier) ;) }) (else_clause "else {\n        pUVar5 = rl_undo_list;\n        if (uVar2 == UNDO_BEGIN) {\n          if (iVar6 == 0) {\n            rl_ding();\n            pUVar5 = rl_undo_list;\n          }\n          else {\n            iVar6 = iVar6 + -1;\n          }\n        }\n        else {\n          iVar6 = iVar6 + (uint)(uVar2 == UNDO_END);\n        }\n      }" else (compound_statement "{\n        pUVar5 = rl_undo_list;\n        if (uVar2 == UNDO_BEGIN) {\n          if (iVar6 == 0) {\n            rl_ding();\n            pUVar5 = rl_undo_list;\n          }\n          else {\n            iVar6 = iVar6 + -1;\n          }\n        }\n        else {\n          iVar6 = iVar6 + (uint)(uVar2 == UNDO_END);\n        }\n      }" { (expression_statement "pUVar5 = rl_undo_list;" (assignment_expression "pUVar5 = rl_undo_list" identifier = identifier) ;) (if_statement "if (uVar2 == UNDO_BEGIN) {\n          if (iVar6 == 0) {\n            rl_ding();\n            pUVar5 = rl_undo_list;\n          }\n          else {\n            iVar6 = iVar6 + -1;\n          }\n        }\n        else {\n          iVar6 = iVar6 + (uint)(uVar2 == UNDO_END);\n        }" if (parenthesized_expression "(uVar2 == UNDO_BEGIN)" ( (binary_expression "uVar2 == UNDO_BEGIN" identifier == identifier) )) (compound_statement "{\n          if (iVar6 == 0) {\n            rl_ding();\n            pUVar5 = rl_undo_list;\n          }\n          else {\n            iVar6 = iVar6 + -1;\n          }\n        }" { (if_statement "if (iVar6 == 0) {\n            rl_ding();\n            pUVar5 = rl_undo_list;\n          }\n          else {\n            iVar6 = iVar6 + -1;\n          }" if (parenthesized_expression "(iVar6 == 0)" ( (binary_expression "iVar6 == 0" identifier == number_literal) )) (compound_statement "{\n            rl_ding();\n            pUVar5 = rl_undo_list;\n          }" { (expression_statement "rl_ding();" (call_expression "rl_ding()" identifier (argument_list "()" ( ))) ;) (expression_statement "pUVar5 = rl_undo_list;" (assignment_expression "pUVar5 = rl_undo_list" identifier = identifier) ;) }) (else_clause "else {\n            iVar6 = iVar6 + -1;\n          }" else (compound_statement "{\n            iVar6 = iVar6 + -1;\n          }" { (expression_statement "iVar6 = iVar6 + -1;" (assignment_expression "iVar6 = iVar6 + -1" identifier = (binary_expression "iVar6 + -1" identifier + number_literal)) ;) }))) }) (else_clause "else {\n          iVar6 = iVar6 + (uint)(uVar2 == UNDO_END);\n        }" else (compound_statement "{\n          iVar6 = iVar6 + (uint)(uVar2 == UNDO_END);\n        }" { (expression_statement "iVar6 = iVar6 + (uint)(uVar2 == UNDO_END);" (assignment_expression "iVar6 = iVar6 + (uint)(uVar2 == UNDO_END)" identifier = (binary_expression "iVar6 + (uint)(uVar2 == UNDO_END)" identifier + (call_expression "(uint)(uVar2 == UNDO_END)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(uVar2 == UNDO_END)" ( (binary_expression "uVar2 == UNDO_END" identifier == identifier) ))))) ;) }))) })))) }))) (expression_statement "_rl_doing_an_undo = 0;" (assignment_expression "_rl_doing_an_undo = 0" identifier = number_literal) ;) (expression_statement "rl_readline_state = rl_readline_state & 0xfffeffff;" (assignment_expression "rl_readline_state = rl_readline_state & 0xfffeffff" identifier = (binary_expression "rl_readline_state & 0xfffeffff" identifier & number_literal)) ;) (expression_statement "rl_undo_list = pUVar5->next;" (assignment_expression "rl_undo_list = pUVar5->next" identifier = (field_expression "pUVar5->next" identifier -> field_identifier)) ;) (expression_statement "pUVar5->next = (undo_list *)0x0;" (assignment_expression "pUVar5->next = (undo_list *)0x0" (field_expression "pUVar5->next" identifier -> field_identifier) = (cast_expression "(undo_list *)0x0" ( (type_descriptor "undo_list *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (expression_statement "pHVar3 = current_history();" (assignment_expression "pHVar3 = current_history()" identifier = (call_expression "current_history()" identifier (argument_list "()" ( )))) ;) (expression_statement "pUVar1 = rl_undo_list;" (assignment_expression "pUVar1 = rl_undo_list" identifier = identifier) ;) (expression_statement "line = rl_line_buffer;" (assignment_expression "line = rl_line_buffer" identifier = identifier) ;) (if_statement "if (((pHVar3 != (HIST_ENTRY *)0x0) && ((UNDO_LIST *)pHVar3->data == pUVar5)) &&\n       ((UNDO_LIST *)pHVar3->data != (UNDO_LIST *)0x0)) {\n      which = where_history();\n      pHVar3 = replace_history_entry(which,line,pUVar1);\n      xfree(pHVar3->line);\n      if (pHVar3->timestamp != (char *)0x0) {\n        free(pHVar3->timestamp);\n      }\n      xfree(pHVar3);\n    }" if (parenthesized_expression "(((pHVar3 != (HIST_ENTRY *)0x0) && ((UNDO_LIST *)pHVar3->data == pUVar5)) &&\n       ((UNDO_LIST *)pHVar3->data != (UNDO_LIST *)0x0))" ( (binary_expression "((pHVar3 != (HIST_ENTRY *)0x0) && ((UNDO_LIST *)pHVar3->data == pUVar5)) &&\n       ((UNDO_LIST *)pHVar3->data != (UNDO_LIST *)0x0)" (parenthesized_expression "((pHVar3 != (HIST_ENTRY *)0x0) && ((UNDO_LIST *)pHVar3->data == pUVar5))" ( (binary_expression "(pHVar3 != (HIST_ENTRY *)0x0) && ((UNDO_LIST *)pHVar3->data == pUVar5)" (parenthesized_expression "(pHVar3 != (HIST_ENTRY *)0x0)" ( (binary_expression "pHVar3 != (HIST_ENTRY *)0x0" identifier != (cast_expression "(HIST_ENTRY *)0x0" ( (type_descriptor "HIST_ENTRY *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) && (parenthesized_expression "((UNDO_LIST *)pHVar3->data == pUVar5)" ( (binary_expression "(UNDO_LIST *)pHVar3->data == pUVar5" (cast_expression "(UNDO_LIST *)pHVar3->data" ( (type_descriptor "UNDO_LIST *" type_identifier (abstract_pointer_declarator "*" *)) ) (field_expression "pHVar3->data" identifier -> field_identifier)) == identifier) ))) )) && (parenthesized_expression "((UNDO_LIST *)pHVar3->data != (UNDO_LIST *)0x0)" ( (binary_expression "(UNDO_LIST *)pHVar3->data != (UNDO_LIST *)0x0" (cast_expression "(UNDO_LIST *)pHVar3->data" ( (type_descriptor "UNDO_LIST *" type_identifier (abstract_pointer_declarator "*" *)) ) (field_expression "pHVar3->data" identifier -> field_identifier)) != (cast_expression "(UNDO_LIST *)0x0" ( (type_descriptor "UNDO_LIST *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) ))) )) (compound_statement "{\n      which = where_history();\n      pHVar3 = replace_history_entry(which,line,pUVar1);\n      xfree(pHVar3->line);\n      if (pHVar3->timestamp != (char *)0x0) {\n        free(pHVar3->timestamp);\n      }\n      xfree(pHVar3);\n    }" { (expression_statement "which = where_history();" (assignment_expression "which = where_history()" identifier = (call_expression "where_history()" identifier (argument_list "()" ( )))) ;) (expression_statement "pHVar3 = replace_history_entry(which,line,pUVar1);" (assignment_expression "pHVar3 = replace_history_entry(which,line,pUVar1)" identifier = (call_expression "replace_history_entry(which,line,pUVar1)" identifier (argument_list "(which,line,pUVar1)" ( identifier , identifier , identifier )))) ;) (expression_statement "xfree(pHVar3->line);" (call_expression "xfree(pHVar3->line)" identifier (argument_list "(pHVar3->line)" ( (field_expression "pHVar3->line" identifier -> field_identifier) ))) ;) (if_statement "if (pHVar3->timestamp != (char *)0x0) {\n        free(pHVar3->timestamp);\n      }" if (parenthesized_expression "(pHVar3->timestamp != (char *)0x0)" ( (binary_expression "pHVar3->timestamp != (char *)0x0" (field_expression "pHVar3->timestamp" identifier -> field_identifier) != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n        free(pHVar3->timestamp);\n      }" { (expression_statement "free(pHVar3->timestamp);" (call_expression "free(pHVar3->timestamp)" identifier (argument_list "(pHVar3->timestamp)" ( (field_expression "pHVar3->timestamp" identifier -> field_identifier) ))) ;) })) (expression_statement "xfree(pHVar3);" (call_expression "xfree(pHVar3)" identifier (argument_list "(pHVar3)" ( identifier ))) ;) })) (expression_statement "_hs_replace_history_data(-1,&pUVar5->next,&rl_undo_list->next);" (call_expression "_hs_replace_history_data(-1,&pUVar5->next,&rl_undo_list->next)" identifier (argument_list "(-1,&pUVar5->next,&rl_undo_list->next)" ( number_literal , (pointer_expression "&pUVar5->next" & (field_expression "pUVar5->next" identifier -> field_identifier)) , (pointer_expression "&rl_undo_list->next" & (field_expression "rl_undo_list->next" identifier -> field_identifier)) ))) ;) (if_statement "if ((_rl_saved_line_for_history == (HIST_ENTRY *)0x0) ||\n       (pUVar1 = (UNDO_LIST *)_rl_saved_line_for_history->data, pUVar1 == (UNDO_LIST *)0x0)) {\nLAB_000feb0a:\n      xfree(pUVar5);\n    }\n    else {\n      if (pUVar1 == pUVar5) {\n        _rl_saved_line_for_history->data = rl_undo_list;\n        goto LAB_000feb0a;\n      }\n      do {\n        pUVar4 = pUVar1;\n        pUVar1 = pUVar4->next;\n        if (pUVar1 == (undo_list *)0x0) goto LAB_000feb0a;\n      } while (pUVar1 != pUVar5);\n      pUVar4->next = rl_undo_list;\n      xfree(pUVar5);\n    }" if (parenthesized_expression "((_rl_saved_line_for_history == (HIST_ENTRY *)0x0) ||\n       (pUVar1 = (UNDO_LIST *)_rl_saved_line_for_history->data, pUVar1 == (UNDO_LIST *)0x0))" ( (binary_expression "(_rl_saved_line_for_history == (HIST_ENTRY *)0x0) ||\n       (pUVar1 = (UNDO_LIST *)_rl_saved_line_for_history->data, pUVar1 == (UNDO_LIST *)0x0)" (parenthesized_expression "(_rl_saved_line_for_history == (HIST_ENTRY *)0x0)" ( (binary_expression "_rl_saved_line_for_history == (HIST_ENTRY *)0x0" identifier == (cast_expression "(HIST_ENTRY *)0x0" ( (type_descriptor "HIST_ENTRY *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) || (parenthesized_expression "(pUVar1 = (UNDO_LIST *)_rl_saved_line_for_history->data, pUVar1 == (UNDO_LIST *)0x0)" ( (comma_expression "pUVar1 = (UNDO_LIST *)_rl_saved_line_for_history->data, pUVar1 == (UNDO_LIST *)0x0" (assignment_expression "pUVar1 = (UNDO_LIST *)_rl_saved_line_for_history->data" identifier = (cast_expression "(UNDO_LIST *)_rl_saved_line_for_history->data" ( (type_descriptor "UNDO_LIST *" type_identifier (abstract_pointer_declarator "*" *)) ) (field_expression "_rl_saved_line_for_history->data" identifier -> field_identifier))) , (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 "{\nLAB_000feb0a:\n      xfree(pUVar5);\n    }" { (labeled_statement "LAB_000feb0a:\n      xfree(pUVar5);" statement_identifier : (expression_statement "xfree(pUVar5);" (call_expression "xfree(pUVar5)" identifier (argument_list "(pUVar5)" ( identifier ))) ;)) }) (else_clause "else {\n      if (pUVar1 == pUVar5) {\n        _rl_saved_line_for_history->data = rl_undo_list;\n        goto LAB_000feb0a;\n      }\n      do {\n        pUVar4 = pUVar1;\n        pUVar1 = pUVar4->next;\n        if (pUVar1 == (undo_list *)0x0) goto LAB_000feb0a;\n      } while (pUVar1 != pUVar5);\n      pUVar4->next = rl_undo_list;\n      xfree(pUVar5);\n    }" else (compound_statement "{\n      if (pUVar1 == pUVar5) {\n        _rl_saved_line_for_history->data = rl_undo_list;\n        goto LAB_000feb0a;\n      }\n      do {\n        pUVar4 = pUVar1;\n        pUVar1 = pUVar4->next;\n        if (pUVar1 == (undo_list *)0x0) goto LAB_000feb0a;\n      } while (pUVar1 != pUVar5);\n      pUVar4->next = rl_undo_list;\n      xfree(pUVar5);\n    }" { (if_statement "if (pUVar1 == pUVar5) {\n        _rl_saved_line_for_history->data = rl_undo_list;\n        goto LAB_000feb0a;\n      }" if (parenthesized_expression "(pUVar1 == pUVar5)" ( (binary_expression "pUVar1 == pUVar5" identifier == identifier) )) (compound_statement "{\n        _rl_saved_line_for_history->data = rl_undo_list;\n        goto LAB_000feb0a;\n      }" { (expression_statement "_rl_saved_line_for_history->data = rl_undo_list;" (assignment_expression "_rl_saved_line_for_history->data = rl_undo_list" (field_expression "_rl_saved_line_for_history->data" identifier -> field_identifier) = identifier) ;) (goto_statement "goto LAB_000feb0a;" goto statement_identifier ;) })) (do_statement "do {\n        pUVar4 = pUVar1;\n        pUVar1 = pUVar4->next;\n        if (pUVar1 == (undo_list *)0x0) goto LAB_000feb0a;\n      } while (pUVar1 != pUVar5);" do (compound_statement "{\n        pUVar4 = pUVar1;\n        pUVar1 = pUVar4->next;\n        if (pUVar1 == (undo_list *)0x0) goto LAB_000feb0a;\n      }" { (expression_statement "pUVar4 = pUVar1;" (assignment_expression "pUVar4 = pUVar1" identifier = identifier) ;) (expression_statement "pUVar1 = pUVar4->next;" (assignment_expression "pUVar1 = pUVar4->next" identifier = (field_expression "pUVar4->next" identifier -> field_identifier)) ;) (if_statement "if (pUVar1 == (undo_list *)0x0) goto LAB_000feb0a;" if (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)) )) (goto_statement "goto LAB_000feb0a;" goto statement_identifier ;)) }) while (parenthesized_expression "(pUVar1 != pUVar5)" ( (binary_expression "pUVar1 != pUVar5" identifier != identifier) )) ;) (expression_statement "pUVar4->next = rl_undo_list;" (assignment_expression "pUVar4->next = rl_undo_list" (field_expression "pUVar4->next" identifier -> field_identifier) = identifier) ;) (expression_statement "xfree(pUVar5);" (call_expression "xfree(pUVar5)" identifier (argument_list "(pUVar5)" ( identifier ))) ;) }))) (if_statement "if (iVar6 == 0) {\n      return 1;\n    }" if (parenthesized_expression "(iVar6 == 0)" ( (binary_expression "iVar6 == 0" identifier == number_literal) )) (compound_statement "{\n      return 1;\n    }" { (return_statement "return 1;" return number_literal ;) })) }) while (parenthesized_expression "( true )" ( true )) ;) })))
(translation_unit "undefined4 rl_do_undo(void)\n\n{\n  uint uVar1;\n  undefined4 uVar2;\n  int iVar3;\n  undefined4 uVar4;\n  undefined4 *puVar5;\n  undefined4 *puVar6;\n  undefined4 *puVar7;\n  int iVar8;\n  int local_30;\n  int local_2c;\n  \n  iVar8 = 0;\n  local_2c = 0;\n  local_30 = 0;\n  do {\n    if (rl_undo_list == (undefined4 *)0x0) {\n      return 0;\n    }\n    uVar1 = rl_undo_list[4];\n    _rl_doing_an_undo = 1;\n    rl_readline_state = rl_readline_state | 0x10000;\n    if (uVar1 < 2) {\n      local_30 = rl_undo_list[1];\n      if (local_30 == -1) {\n        local_30 = rl_point;\n      }\n      else if (local_30 == -2) {\n        local_30 = rl_end;\n      }\n      local_2c = rl_undo_list[2];\n      if (local_2c == -1) {\n        local_2c = rl_point;\n        goto LAB_000fea70;\n      }\n      if (local_2c != -2) goto LAB_000fea70;\n      local_2c = rl_end;\n      if (uVar1 != 1) goto LAB_000fea79;\nLAB_000feba0:\n      rl_delete_text(local_30,local_2c);\n      rl_point = local_30;\n      puVar7 = rl_undo_list;\n    }\n    else {\nLAB_000fea70:\n      if (uVar1 == 1) goto LAB_000feba0;\nLAB_000fea79:\n      if (uVar1 == 0) {\n        rl_point = local_30;\n        rl_insert_text(rl_undo_list[3]);\n        xfree(rl_undo_list[3]);\n        puVar7 = rl_undo_list;\n      }\n      else {\n        puVar7 = rl_undo_list;\n        if (uVar1 == 2) {\n          if (iVar8 == 0) {\n            rl_ding();\n            puVar7 = rl_undo_list;\n          }\n          else {\n            iVar8 = iVar8 + -1;\n          }\n        }\n        else {\n          iVar8 = iVar8 + (uint)(uVar1 == 3);\n        }\n      }\n    }\n    _rl_doing_an_undo = 0;\n    rl_readline_state = rl_readline_state & 0xfffeffff;\n    rl_undo_list = (undefined4 *)*puVar7;\n    *puVar7 = 0;\n    iVar3 = current_history();\n    puVar5 = rl_undo_list;\n    uVar2 = rl_line_buffer;\n    if (((iVar3 != 0) && (*(undefined4 **)(iVar3 + 8) == puVar7)) &&\n       (*(undefined4 **)(iVar3 + 8) != (undefined4 *)0x0)) {\n      uVar4 = where_history();\n      puVar5 = (undefined4 *)replace_history_entry(uVar4,uVar2,puVar5);\n      xfree(*puVar5);\n      if ((void *)puVar5[1] != (void *)0x0) {\n        free((void *)puVar5[1]);\n      }\n      xfree(puVar5);\n    }\n    _hs_replace_history_data(0xffffffff,puVar7,rl_undo_list);\n    if ((_rl_saved_line_for_history == 0) ||\n       (puVar5 = *(undefined4 **)(_rl_saved_line_for_history + 8), puVar5 == (undefined4 *)0x0)) {\nLAB_000feb0a:\n      xfree(puVar7);\n    }\n    else {\n      if (puVar5 == puVar7) {\n        *(undefined4 **)(_rl_saved_line_for_history + 8) = rl_undo_list;\n        goto LAB_000feb0a;\n      }\n      do {\n        puVar6 = puVar5;\n        puVar5 = (undefined4 *)*puVar6;\n        if (puVar5 == (undefined4 *)0x0) goto LAB_000feb0a;\n      } while (puVar5 != puVar7);\n      *puVar6 = rl_undo_list;\n      xfree(puVar7);\n    }\n    if (iVar8 == 0) {\n      return 1;\n    }\n  } while( true );\n}\n\n" (function_definition "undefined4 rl_do_undo(void)\n\n{\n  uint uVar1;\n  undefined4 uVar2;\n  int iVar3;\n  undefined4 uVar4;\n  undefined4 *puVar5;\n  undefined4 *puVar6;\n  undefined4 *puVar7;\n  int iVar8;\n  int local_30;\n  int local_2c;\n  \n  iVar8 = 0;\n  local_2c = 0;\n  local_30 = 0;\n  do {\n    if (rl_undo_list == (undefined4 *)0x0) {\n      return 0;\n    }\n    uVar1 = rl_undo_list[4];\n    _rl_doing_an_undo = 1;\n    rl_readline_state = rl_readline_state | 0x10000;\n    if (uVar1 < 2) {\n      local_30 = rl_undo_list[1];\n      if (local_30 == -1) {\n        local_30 = rl_point;\n      }\n      else if (local_30 == -2) {\n        local_30 = rl_end;\n      }\n      local_2c = rl_undo_list[2];\n      if (local_2c == -1) {\n        local_2c = rl_point;\n        goto LAB_000fea70;\n      }\n      if (local_2c != -2) goto LAB_000fea70;\n      local_2c = rl_end;\n      if (uVar1 != 1) goto LAB_000fea79;\nLAB_000feba0:\n      rl_delete_text(local_30,local_2c);\n      rl_point = local_30;\n      puVar7 = rl_undo_list;\n    }\n    else {\nLAB_000fea70:\n      if (uVar1 == 1) goto LAB_000feba0;\nLAB_000fea79:\n      if (uVar1 == 0) {\n        rl_point = local_30;\n        rl_insert_text(rl_undo_list[3]);\n        xfree(rl_undo_list[3]);\n        puVar7 = rl_undo_list;\n      }\n      else {\n        puVar7 = rl_undo_list;\n        if (uVar1 == 2) {\n          if (iVar8 == 0) {\n            rl_ding();\n            puVar7 = rl_undo_list;\n          }\n          else {\n            iVar8 = iVar8 + -1;\n          }\n        }\n        else {\n          iVar8 = iVar8 + (uint)(uVar1 == 3);\n        }\n      }\n    }\n    _rl_doing_an_undo = 0;\n    rl_readline_state = rl_readline_state & 0xfffeffff;\n    rl_undo_list = (undefined4 *)*puVar7;\n    *puVar7 = 0;\n    iVar3 = current_history();\n    puVar5 = rl_undo_list;\n    uVar2 = rl_line_buffer;\n    if (((iVar3 != 0) && (*(undefined4 **)(iVar3 + 8) == puVar7)) &&\n       (*(undefined4 **)(iVar3 + 8) != (undefined4 *)0x0)) {\n      uVar4 = where_history();\n      puVar5 = (undefined4 *)replace_history_entry(uVar4,uVar2,puVar5);\n      xfree(*puVar5);\n      if ((void *)puVar5[1] != (void *)0x0) {\n        free((void *)puVar5[1]);\n      }\n      xfree(puVar5);\n    }\n    _hs_replace_history_data(0xffffffff,puVar7,rl_undo_list);\n    if ((_rl_saved_line_for_history == 0) ||\n       (puVar5 = *(undefined4 **)(_rl_saved_line_for_history + 8), puVar5 == (undefined4 *)0x0)) {\nLAB_000feb0a:\n      xfree(puVar7);\n    }\n    else {\n      if (puVar5 == puVar7) {\n        *(undefined4 **)(_rl_saved_line_for_history + 8) = rl_undo_list;\n        goto LAB_000feb0a;\n      }\n      do {\n        puVar6 = puVar5;\n        puVar5 = (undefined4 *)*puVar6;\n        if (puVar5 == (undefined4 *)0x0) goto LAB_000feb0a;\n      } while (puVar5 != puVar7);\n      *puVar6 = rl_undo_list;\n      xfree(puVar7);\n    }\n    if (iVar8 == 0) {\n      return 1;\n    }\n  } while( true );\n}" type_identifier (function_declarator "rl_do_undo(void)" identifier (parameter_list "(void)" ( (parameter_declaration "void" primitive_type) ))) (compound_statement "{\n  uint uVar1;\n  undefined4 uVar2;\n  int iVar3;\n  undefined4 uVar4;\n  undefined4 *puVar5;\n  undefined4 *puVar6;\n  undefined4 *puVar7;\n  int iVar8;\n  int local_30;\n  int local_2c;\n  \n  iVar8 = 0;\n  local_2c = 0;\n  local_30 = 0;\n  do {\n    if (rl_undo_list == (undefined4 *)0x0) {\n      return 0;\n    }\n    uVar1 = rl_undo_list[4];\n    _rl_doing_an_undo = 1;\n    rl_readline_state = rl_readline_state | 0x10000;\n    if (uVar1 < 2) {\n      local_30 = rl_undo_list[1];\n      if (local_30 == -1) {\n        local_30 = rl_point;\n      }\n      else if (local_30 == -2) {\n        local_30 = rl_end;\n      }\n      local_2c = rl_undo_list[2];\n      if (local_2c == -1) {\n        local_2c = rl_point;\n        goto LAB_000fea70;\n      }\n      if (local_2c != -2) goto LAB_000fea70;\n      local_2c = rl_end;\n      if (uVar1 != 1) goto LAB_000fea79;\nLAB_000feba0:\n      rl_delete_text(local_30,local_2c);\n      rl_point = local_30;\n      puVar7 = rl_undo_list;\n    }\n    else {\nLAB_000fea70:\n      if (uVar1 == 1) goto LAB_000feba0;\nLAB_000fea79:\n      if (uVar1 == 0) {\n        rl_point = local_30;\n        rl_insert_text(rl_undo_list[3]);\n        xfree(rl_undo_list[3]);\n        puVar7 = rl_undo_list;\n      }\n      else {\n        puVar7 = rl_undo_list;\n        if (uVar1 == 2) {\n          if (iVar8 == 0) {\n            rl_ding();\n            puVar7 = rl_undo_list;\n          }\n          else {\n            iVar8 = iVar8 + -1;\n          }\n        }\n        else {\n          iVar8 = iVar8 + (uint)(uVar1 == 3);\n        }\n      }\n    }\n    _rl_doing_an_undo = 0;\n    rl_readline_state = rl_readline_state & 0xfffeffff;\n    rl_undo_list = (undefined4 *)*puVar7;\n    *puVar7 = 0;\n    iVar3 = current_history();\n    puVar5 = rl_undo_list;\n    uVar2 = rl_line_buffer;\n    if (((iVar3 != 0) && (*(undefined4 **)(iVar3 + 8) == puVar7)) &&\n       (*(undefined4 **)(iVar3 + 8) != (undefined4 *)0x0)) {\n      uVar4 = where_history();\n      puVar5 = (undefined4 *)replace_history_entry(uVar4,uVar2,puVar5);\n      xfree(*puVar5);\n      if ((void *)puVar5[1] != (void *)0x0) {\n        free((void *)puVar5[1]);\n      }\n      xfree(puVar5);\n    }\n    _hs_replace_history_data(0xffffffff,puVar7,rl_undo_list);\n    if ((_rl_saved_line_for_history == 0) ||\n       (puVar5 = *(undefined4 **)(_rl_saved_line_for_history + 8), puVar5 == (undefined4 *)0x0)) {\nLAB_000feb0a:\n      xfree(puVar7);\n    }\n    else {\n      if (puVar5 == puVar7) {\n        *(undefined4 **)(_rl_saved_line_for_history + 8) = rl_undo_list;\n        goto LAB_000feb0a;\n      }\n      do {\n        puVar6 = puVar5;\n        puVar5 = (undefined4 *)*puVar6;\n        if (puVar5 == (undefined4 *)0x0) goto LAB_000feb0a;\n      } while (puVar5 != puVar7);\n      *puVar6 = rl_undo_list;\n      xfree(puVar7);\n    }\n    if (iVar8 == 0) {\n      return 1;\n    }\n  } while( true );\n}" { (declaration "uint uVar1;" type_identifier identifier ;) (declaration "undefined4 uVar2;" type_identifier identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "undefined4 uVar4;" type_identifier identifier ;) (declaration "undefined4 *puVar5;" type_identifier (pointer_declarator "*puVar5" * identifier) ;) (declaration "undefined4 *puVar6;" type_identifier (pointer_declarator "*puVar6" * identifier) ;) (declaration "undefined4 *puVar7;" type_identifier (pointer_declarator "*puVar7" * identifier) ;) (declaration "int iVar8;" primitive_type identifier ;) (declaration "int local_30;" primitive_type identifier ;) (declaration "int local_2c;" primitive_type identifier ;) (expression_statement "iVar8 = 0;" (assignment_expression "iVar8 = 0" identifier = number_literal) ;) (expression_statement "local_2c = 0;" (assignment_expression "local_2c = 0" identifier = number_literal) ;) (expression_statement "local_30 = 0;" (assignment_expression "local_30 = 0" identifier = number_literal) ;) (do_statement "do {\n    if (rl_undo_list == (undefined4 *)0x0) {\n      return 0;\n    }\n    uVar1 = rl_undo_list[4];\n    _rl_doing_an_undo = 1;\n    rl_readline_state = rl_readline_state | 0x10000;\n    if (uVar1 < 2) {\n      local_30 = rl_undo_list[1];\n      if (local_30 == -1) {\n        local_30 = rl_point;\n      }\n      else if (local_30 == -2) {\n        local_30 = rl_end;\n      }\n      local_2c = rl_undo_list[2];\n      if (local_2c == -1) {\n        local_2c = rl_point;\n        goto LAB_000fea70;\n      }\n      if (local_2c != -2) goto LAB_000fea70;\n      local_2c = rl_end;\n      if (uVar1 != 1) goto LAB_000fea79;\nLAB_000feba0:\n      rl_delete_text(local_30,local_2c);\n      rl_point = local_30;\n      puVar7 = rl_undo_list;\n    }\n    else {\nLAB_000fea70:\n      if (uVar1 == 1) goto LAB_000feba0;\nLAB_000fea79:\n      if (uVar1 == 0) {\n        rl_point = local_30;\n        rl_insert_text(rl_undo_list[3]);\n        xfree(rl_undo_list[3]);\n        puVar7 = rl_undo_list;\n      }\n      else {\n        puVar7 = rl_undo_list;\n        if (uVar1 == 2) {\n          if (iVar8 == 0) {\n            rl_ding();\n            puVar7 = rl_undo_list;\n          }\n          else {\n            iVar8 = iVar8 + -1;\n          }\n        }\n        else {\n          iVar8 = iVar8 + (uint)(uVar1 == 3);\n        }\n      }\n    }\n    _rl_doing_an_undo = 0;\n    rl_readline_state = rl_readline_state & 0xfffeffff;\n    rl_undo_list = (undefined4 *)*puVar7;\n    *puVar7 = 0;\n    iVar3 = current_history();\n    puVar5 = rl_undo_list;\n    uVar2 = rl_line_buffer;\n    if (((iVar3 != 0) && (*(undefined4 **)(iVar3 + 8) == puVar7)) &&\n       (*(undefined4 **)(iVar3 + 8) != (undefined4 *)0x0)) {\n      uVar4 = where_history();\n      puVar5 = (undefined4 *)replace_history_entry(uVar4,uVar2,puVar5);\n      xfree(*puVar5);\n      if ((void *)puVar5[1] != (void *)0x0) {\n        free((void *)puVar5[1]);\n      }\n      xfree(puVar5);\n    }\n    _hs_replace_history_data(0xffffffff,puVar7,rl_undo_list);\n    if ((_rl_saved_line_for_history == 0) ||\n       (puVar5 = *(undefined4 **)(_rl_saved_line_for_history + 8), puVar5 == (undefined4 *)0x0)) {\nLAB_000feb0a:\n      xfree(puVar7);\n    }\n    else {\n      if (puVar5 == puVar7) {\n        *(undefined4 **)(_rl_saved_line_for_history + 8) = rl_undo_list;\n        goto LAB_000feb0a;\n      }\n      do {\n        puVar6 = puVar5;\n        puVar5 = (undefined4 *)*puVar6;\n        if (puVar5 == (undefined4 *)0x0) goto LAB_000feb0a;\n      } while (puVar5 != puVar7);\n      *puVar6 = rl_undo_list;\n      xfree(puVar7);\n    }\n    if (iVar8 == 0) {\n      return 1;\n    }\n  } while( true );" do (compound_statement "{\n    if (rl_undo_list == (undefined4 *)0x0) {\n      return 0;\n    }\n    uVar1 = rl_undo_list[4];\n    _rl_doing_an_undo = 1;\n    rl_readline_state = rl_readline_state | 0x10000;\n    if (uVar1 < 2) {\n      local_30 = rl_undo_list[1];\n      if (local_30 == -1) {\n        local_30 = rl_point;\n      }\n      else if (local_30 == -2) {\n        local_30 = rl_end;\n      }\n      local_2c = rl_undo_list[2];\n      if (local_2c == -1) {\n        local_2c = rl_point;\n        goto LAB_000fea70;\n      }\n      if (local_2c != -2) goto LAB_000fea70;\n      local_2c = rl_end;\n      if (uVar1 != 1) goto LAB_000fea79;\nLAB_000feba0:\n      rl_delete_text(local_30,local_2c);\n      rl_point = local_30;\n      puVar7 = rl_undo_list;\n    }\n    else {\nLAB_000fea70:\n      if (uVar1 == 1) goto LAB_000feba0;\nLAB_000fea79:\n      if (uVar1 == 0) {\n        rl_point = local_30;\n        rl_insert_text(rl_undo_list[3]);\n        xfree(rl_undo_list[3]);\n        puVar7 = rl_undo_list;\n      }\n      else {\n        puVar7 = rl_undo_list;\n        if (uVar1 == 2) {\n          if (iVar8 == 0) {\n            rl_ding();\n            puVar7 = rl_undo_list;\n          }\n          else {\n            iVar8 = iVar8 + -1;\n          }\n        }\n        else {\n          iVar8 = iVar8 + (uint)(uVar1 == 3);\n        }\n      }\n    }\n    _rl_doing_an_undo = 0;\n    rl_readline_state = rl_readline_state & 0xfffeffff;\n    rl_undo_list = (undefined4 *)*puVar7;\n    *puVar7 = 0;\n    iVar3 = current_history();\n    puVar5 = rl_undo_list;\n    uVar2 = rl_line_buffer;\n    if (((iVar3 != 0) && (*(undefined4 **)(iVar3 + 8) == puVar7)) &&\n       (*(undefined4 **)(iVar3 + 8) != (undefined4 *)0x0)) {\n      uVar4 = where_history();\n      puVar5 = (undefined4 *)replace_history_entry(uVar4,uVar2,puVar5);\n      xfree(*puVar5);\n      if ((void *)puVar5[1] != (void *)0x0) {\n        free((void *)puVar5[1]);\n      }\n      xfree(puVar5);\n    }\n    _hs_replace_history_data(0xffffffff,puVar7,rl_undo_list);\n    if ((_rl_saved_line_for_history == 0) ||\n       (puVar5 = *(undefined4 **)(_rl_saved_line_for_history + 8), puVar5 == (undefined4 *)0x0)) {\nLAB_000feb0a:\n      xfree(puVar7);\n    }\n    else {\n      if (puVar5 == puVar7) {\n        *(undefined4 **)(_rl_saved_line_for_history + 8) = rl_undo_list;\n        goto LAB_000feb0a;\n      }\n      do {\n        puVar6 = puVar5;\n        puVar5 = (undefined4 *)*puVar6;\n        if (puVar5 == (undefined4 *)0x0) goto LAB_000feb0a;\n      } while (puVar5 != puVar7);\n      *puVar6 = rl_undo_list;\n      xfree(puVar7);\n    }\n    if (iVar8 == 0) {\n      return 1;\n    }\n  }" { (if_statement "if (rl_undo_list == (undefined4 *)0x0) {\n      return 0;\n    }" if (parenthesized_expression "(rl_undo_list == (undefined4 *)0x0)" ( (binary_expression "rl_undo_list == (undefined4 *)0x0" identifier == (cast_expression "(undefined4 *)0x0" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      return 0;\n    }" { (return_statement "return 0;" return number_literal ;) })) (expression_statement "uVar1 = rl_undo_list[4];" (assignment_expression "uVar1 = rl_undo_list[4]" identifier = (subscript_expression "rl_undo_list[4]" identifier [ number_literal ])) ;) (expression_statement "_rl_doing_an_undo = 1;" (assignment_expression "_rl_doing_an_undo = 1" identifier = number_literal) ;) (expression_statement "rl_readline_state = rl_readline_state | 0x10000;" (assignment_expression "rl_readline_state = rl_readline_state | 0x10000" identifier = (binary_expression "rl_readline_state | 0x10000" identifier | number_literal)) ;) (if_statement "if (uVar1 < 2) {\n      local_30 = rl_undo_list[1];\n      if (local_30 == -1) {\n        local_30 = rl_point;\n      }\n      else if (local_30 == -2) {\n        local_30 = rl_end;\n      }\n      local_2c = rl_undo_list[2];\n      if (local_2c == -1) {\n        local_2c = rl_point;\n        goto LAB_000fea70;\n      }\n      if (local_2c != -2) goto LAB_000fea70;\n      local_2c = rl_end;\n      if (uVar1 != 1) goto LAB_000fea79;\nLAB_000feba0:\n      rl_delete_text(local_30,local_2c);\n      rl_point = local_30;\n      puVar7 = rl_undo_list;\n    }\n    else {\nLAB_000fea70:\n      if (uVar1 == 1) goto LAB_000feba0;\nLAB_000fea79:\n      if (uVar1 == 0) {\n        rl_point = local_30;\n        rl_insert_text(rl_undo_list[3]);\n        xfree(rl_undo_list[3]);\n        puVar7 = rl_undo_list;\n      }\n      else {\n        puVar7 = rl_undo_list;\n        if (uVar1 == 2) {\n          if (iVar8 == 0) {\n            rl_ding();\n            puVar7 = rl_undo_list;\n          }\n          else {\n            iVar8 = iVar8 + -1;\n          }\n        }\n        else {\n          iVar8 = iVar8 + (uint)(uVar1 == 3);\n        }\n      }\n    }" if (parenthesized_expression "(uVar1 < 2)" ( (binary_expression "uVar1 < 2" identifier < number_literal) )) (compound_statement "{\n      local_30 = rl_undo_list[1];\n      if (local_30 == -1) {\n        local_30 = rl_point;\n      }\n      else if (local_30 == -2) {\n        local_30 = rl_end;\n      }\n      local_2c = rl_undo_list[2];\n      if (local_2c == -1) {\n        local_2c = rl_point;\n        goto LAB_000fea70;\n      }\n      if (local_2c != -2) goto LAB_000fea70;\n      local_2c = rl_end;\n      if (uVar1 != 1) goto LAB_000fea79;\nLAB_000feba0:\n      rl_delete_text(local_30,local_2c);\n      rl_point = local_30;\n      puVar7 = rl_undo_list;\n    }" { (expression_statement "local_30 = rl_undo_list[1];" (assignment_expression "local_30 = rl_undo_list[1]" identifier = (subscript_expression "rl_undo_list[1]" identifier [ number_literal ])) ;) (if_statement "if (local_30 == -1) {\n        local_30 = rl_point;\n      }\n      else if (local_30 == -2) {\n        local_30 = rl_end;\n      }" if (parenthesized_expression "(local_30 == -1)" ( (binary_expression "local_30 == -1" identifier == number_literal) )) (compound_statement "{\n        local_30 = rl_point;\n      }" { (expression_statement "local_30 = rl_point;" (assignment_expression "local_30 = rl_point" identifier = identifier) ;) }) (else_clause "else if (local_30 == -2) {\n        local_30 = rl_end;\n      }" else (if_statement "if (local_30 == -2) {\n        local_30 = rl_end;\n      }" if (parenthesized_expression "(local_30 == -2)" ( (binary_expression "local_30 == -2" identifier == number_literal) )) (compound_statement "{\n        local_30 = rl_end;\n      }" { (expression_statement "local_30 = rl_end;" (assignment_expression "local_30 = rl_end" identifier = identifier) ;) })))) (expression_statement "local_2c = rl_undo_list[2];" (assignment_expression "local_2c = rl_undo_list[2]" identifier = (subscript_expression "rl_undo_list[2]" identifier [ number_literal ])) ;) (if_statement "if (local_2c == -1) {\n        local_2c = rl_point;\n        goto LAB_000fea70;\n      }" if (parenthesized_expression "(local_2c == -1)" ( (binary_expression "local_2c == -1" identifier == number_literal) )) (compound_statement "{\n        local_2c = rl_point;\n        goto LAB_000fea70;\n      }" { (expression_statement "local_2c = rl_point;" (assignment_expression "local_2c = rl_point" identifier = identifier) ;) (goto_statement "goto LAB_000fea70;" goto statement_identifier ;) })) (if_statement "if (local_2c != -2) goto LAB_000fea70;" if (parenthesized_expression "(local_2c != -2)" ( (binary_expression "local_2c != -2" identifier != number_literal) )) (goto_statement "goto LAB_000fea70;" goto statement_identifier ;)) (expression_statement "local_2c = rl_end;" (assignment_expression "local_2c = rl_end" identifier = identifier) ;) (if_statement "if (uVar1 != 1) goto LAB_000fea79;" if (parenthesized_expression "(uVar1 != 1)" ( (binary_expression "uVar1 != 1" identifier != number_literal) )) (goto_statement "goto LAB_000fea79;" goto statement_identifier ;)) (labeled_statement "LAB_000feba0:\n      rl_delete_text(local_30,local_2c);" statement_identifier : (expression_statement "rl_delete_text(local_30,local_2c);" (call_expression "rl_delete_text(local_30,local_2c)" identifier (argument_list "(local_30,local_2c)" ( identifier , identifier ))) ;)) (expression_statement "rl_point = local_30;" (assignment_expression "rl_point = local_30" identifier = identifier) ;) (expression_statement "puVar7 = rl_undo_list;" (assignment_expression "puVar7 = rl_undo_list" identifier = identifier) ;) }) (else_clause "else {\nLAB_000fea70:\n      if (uVar1 == 1) goto LAB_000feba0;\nLAB_000fea79:\n      if (uVar1 == 0) {\n        rl_point = local_30;\n        rl_insert_text(rl_undo_list[3]);\n        xfree(rl_undo_list[3]);\n        puVar7 = rl_undo_list;\n      }\n      else {\n        puVar7 = rl_undo_list;\n        if (uVar1 == 2) {\n          if (iVar8 == 0) {\n            rl_ding();\n            puVar7 = rl_undo_list;\n          }\n          else {\n            iVar8 = iVar8 + -1;\n          }\n        }\n        else {\n          iVar8 = iVar8 + (uint)(uVar1 == 3);\n        }\n      }\n    }" else (compound_statement "{\nLAB_000fea70:\n      if (uVar1 == 1) goto LAB_000feba0;\nLAB_000fea79:\n      if (uVar1 == 0) {\n        rl_point = local_30;\n        rl_insert_text(rl_undo_list[3]);\n        xfree(rl_undo_list[3]);\n        puVar7 = rl_undo_list;\n      }\n      else {\n        puVar7 = rl_undo_list;\n        if (uVar1 == 2) {\n          if (iVar8 == 0) {\n            rl_ding();\n            puVar7 = rl_undo_list;\n          }\n          else {\n            iVar8 = iVar8 + -1;\n          }\n        }\n        else {\n          iVar8 = iVar8 + (uint)(uVar1 == 3);\n        }\n      }\n    }" { (labeled_statement "LAB_000fea70:\n      if (uVar1 == 1) goto LAB_000feba0;" statement_identifier : (if_statement "if (uVar1 == 1) goto LAB_000feba0;" if (parenthesized_expression "(uVar1 == 1)" ( (binary_expression "uVar1 == 1" identifier == number_literal) )) (goto_statement "goto LAB_000feba0;" goto statement_identifier ;))) (labeled_statement "LAB_000fea79:\n      if (uVar1 == 0) {\n        rl_point = local_30;\n        rl_insert_text(rl_undo_list[3]);\n        xfree(rl_undo_list[3]);\n        puVar7 = rl_undo_list;\n      }\n      else {\n        puVar7 = rl_undo_list;\n        if (uVar1 == 2) {\n          if (iVar8 == 0) {\n            rl_ding();\n            puVar7 = rl_undo_list;\n          }\n          else {\n            iVar8 = iVar8 + -1;\n          }\n        }\n        else {\n          iVar8 = iVar8 + (uint)(uVar1 == 3);\n        }\n      }" statement_identifier : (if_statement "if (uVar1 == 0) {\n        rl_point = local_30;\n        rl_insert_text(rl_undo_list[3]);\n        xfree(rl_undo_list[3]);\n        puVar7 = rl_undo_list;\n      }\n      else {\n        puVar7 = rl_undo_list;\n        if (uVar1 == 2) {\n          if (iVar8 == 0) {\n            rl_ding();\n            puVar7 = rl_undo_list;\n          }\n          else {\n            iVar8 = iVar8 + -1;\n          }\n        }\n        else {\n          iVar8 = iVar8 + (uint)(uVar1 == 3);\n        }\n      }" if (parenthesized_expression "(uVar1 == 0)" ( (binary_expression "uVar1 == 0" identifier == number_literal) )) (compound_statement "{\n        rl_point = local_30;\n        rl_insert_text(rl_undo_list[3]);\n        xfree(rl_undo_list[3]);\n        puVar7 = rl_undo_list;\n      }" { (expression_statement "rl_point = local_30;" (assignment_expression "rl_point = local_30" identifier = identifier) ;) (expression_statement "rl_insert_text(rl_undo_list[3]);" (call_expression "rl_insert_text(rl_undo_list[3])" identifier (argument_list "(rl_undo_list[3])" ( (subscript_expression "rl_undo_list[3]" identifier [ number_literal ]) ))) ;) (expression_statement "xfree(rl_undo_list[3]);" (call_expression "xfree(rl_undo_list[3])" identifier (argument_list "(rl_undo_list[3])" ( (subscript_expression "rl_undo_list[3]" identifier [ number_literal ]) ))) ;) (expression_statement "puVar7 = rl_undo_list;" (assignment_expression "puVar7 = rl_undo_list" identifier = identifier) ;) }) (else_clause "else {\n        puVar7 = rl_undo_list;\n        if (uVar1 == 2) {\n          if (iVar8 == 0) {\n            rl_ding();\n            puVar7 = rl_undo_list;\n          }\n          else {\n            iVar8 = iVar8 + -1;\n          }\n        }\n        else {\n          iVar8 = iVar8 + (uint)(uVar1 == 3);\n        }\n      }" else (compound_statement "{\n        puVar7 = rl_undo_list;\n        if (uVar1 == 2) {\n          if (iVar8 == 0) {\n            rl_ding();\n            puVar7 = rl_undo_list;\n          }\n          else {\n            iVar8 = iVar8 + -1;\n          }\n        }\n        else {\n          iVar8 = iVar8 + (uint)(uVar1 == 3);\n        }\n      }" { (expression_statement "puVar7 = rl_undo_list;" (assignment_expression "puVar7 = rl_undo_list" identifier = identifier) ;) (if_statement "if (uVar1 == 2) {\n          if (iVar8 == 0) {\n            rl_ding();\n            puVar7 = rl_undo_list;\n          }\n          else {\n            iVar8 = iVar8 + -1;\n          }\n        }\n        else {\n          iVar8 = iVar8 + (uint)(uVar1 == 3);\n        }" if (parenthesized_expression "(uVar1 == 2)" ( (binary_expression "uVar1 == 2" identifier == number_literal) )) (compound_statement "{\n          if (iVar8 == 0) {\n            rl_ding();\n            puVar7 = rl_undo_list;\n          }\n          else {\n            iVar8 = iVar8 + -1;\n          }\n        }" { (if_statement "if (iVar8 == 0) {\n            rl_ding();\n            puVar7 = rl_undo_list;\n          }\n          else {\n            iVar8 = iVar8 + -1;\n          }" if (parenthesized_expression "(iVar8 == 0)" ( (binary_expression "iVar8 == 0" identifier == number_literal) )) (compound_statement "{\n            rl_ding();\n            puVar7 = rl_undo_list;\n          }" { (expression_statement "rl_ding();" (call_expression "rl_ding()" identifier (argument_list "()" ( ))) ;) (expression_statement "puVar7 = rl_undo_list;" (assignment_expression "puVar7 = rl_undo_list" identifier = identifier) ;) }) (else_clause "else {\n            iVar8 = iVar8 + -1;\n          }" else (compound_statement "{\n            iVar8 = iVar8 + -1;\n          }" { (expression_statement "iVar8 = iVar8 + -1;" (assignment_expression "iVar8 = iVar8 + -1" identifier = (binary_expression "iVar8 + -1" identifier + number_literal)) ;) }))) }) (else_clause "else {\n          iVar8 = iVar8 + (uint)(uVar1 == 3);\n        }" else (compound_statement "{\n          iVar8 = iVar8 + (uint)(uVar1 == 3);\n        }" { (expression_statement "iVar8 = iVar8 + (uint)(uVar1 == 3);" (assignment_expression "iVar8 = iVar8 + (uint)(uVar1 == 3)" identifier = (binary_expression "iVar8 + (uint)(uVar1 == 3)" identifier + (call_expression "(uint)(uVar1 == 3)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(uVar1 == 3)" ( (binary_expression "uVar1 == 3" identifier == number_literal) ))))) ;) }))) })))) }))) (expression_statement "_rl_doing_an_undo = 0;" (assignment_expression "_rl_doing_an_undo = 0" identifier = number_literal) ;) (expression_statement "rl_readline_state = rl_readline_state & 0xfffeffff;" (assignment_expression "rl_readline_state = rl_readline_state & 0xfffeffff" identifier = (binary_expression "rl_readline_state & 0xfffeffff" identifier & number_literal)) ;) (expression_statement "rl_undo_list = (undefined4 *)*puVar7;" (assignment_expression "rl_undo_list = (undefined4 *)*puVar7" identifier = (cast_expression "(undefined4 *)*puVar7" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "*puVar7" * identifier))) ;) (expression_statement "*puVar7 = 0;" (assignment_expression "*puVar7 = 0" (pointer_expression "*puVar7" * identifier) = number_literal) ;) (expression_statement "iVar3 = current_history();" (assignment_expression "iVar3 = current_history()" identifier = (call_expression "current_history()" identifier (argument_list "()" ( )))) ;) (expression_statement "puVar5 = rl_undo_list;" (assignment_expression "puVar5 = rl_undo_list" identifier = identifier) ;) (expression_statement "uVar2 = rl_line_buffer;" (assignment_expression "uVar2 = rl_line_buffer" identifier = identifier) ;) (if_statement "if (((iVar3 != 0) && (*(undefined4 **)(iVar3 + 8) == puVar7)) &&\n       (*(undefined4 **)(iVar3 + 8) != (undefined4 *)0x0)) {\n      uVar4 = where_history();\n      puVar5 = (undefined4 *)replace_history_entry(uVar4,uVar2,puVar5);\n      xfree(*puVar5);\n      if ((void *)puVar5[1] != (void *)0x0) {\n        free((void *)puVar5[1]);\n      }\n      xfree(puVar5);\n    }" if (parenthesized_expression "(((iVar3 != 0) && (*(undefined4 **)(iVar3 + 8) == puVar7)) &&\n       (*(undefined4 **)(iVar3 + 8) != (undefined4 *)0x0))" ( (binary_expression "((iVar3 != 0) && (*(undefined4 **)(iVar3 + 8) == puVar7)) &&\n       (*(undefined4 **)(iVar3 + 8) != (undefined4 *)0x0)" (parenthesized_expression "((iVar3 != 0) && (*(undefined4 **)(iVar3 + 8) == puVar7))" ( (binary_expression "(iVar3 != 0) && (*(undefined4 **)(iVar3 + 8) == puVar7)" (parenthesized_expression "(iVar3 != 0)" ( (binary_expression "iVar3 != 0" identifier != number_literal) )) && (parenthesized_expression "(*(undefined4 **)(iVar3 + 8) == puVar7)" ( (binary_expression "*(undefined4 **)(iVar3 + 8) == puVar7" (pointer_expression "*(undefined4 **)(iVar3 + 8)" * (cast_expression "(undefined4 **)(iVar3 + 8)" ( (type_descriptor "undefined4 **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(iVar3 + 8)" ( (binary_expression "iVar3 + 8" identifier + number_literal) )))) == identifier) ))) )) && (parenthesized_expression "(*(undefined4 **)(iVar3 + 8) != (undefined4 *)0x0)" ( (binary_expression "*(undefined4 **)(iVar3 + 8) != (undefined4 *)0x0" (pointer_expression "*(undefined4 **)(iVar3 + 8)" * (cast_expression "(undefined4 **)(iVar3 + 8)" ( (type_descriptor "undefined4 **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(iVar3 + 8)" ( (binary_expression "iVar3 + 8" identifier + number_literal) )))) != (cast_expression "(undefined4 *)0x0" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) ))) )) (compound_statement "{\n      uVar4 = where_history();\n      puVar5 = (undefined4 *)replace_history_entry(uVar4,uVar2,puVar5);\n      xfree(*puVar5);\n      if ((void *)puVar5[1] != (void *)0x0) {\n        free((void *)puVar5[1]);\n      }\n      xfree(puVar5);\n    }" { (expression_statement "uVar4 = where_history();" (assignment_expression "uVar4 = where_history()" identifier = (call_expression "where_history()" identifier (argument_list "()" ( )))) ;) (expression_statement "puVar5 = (undefined4 *)replace_history_entry(uVar4,uVar2,puVar5);" (assignment_expression "puVar5 = (undefined4 *)replace_history_entry(uVar4,uVar2,puVar5)" identifier = (cast_expression "(undefined4 *)replace_history_entry(uVar4,uVar2,puVar5)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "replace_history_entry(uVar4,uVar2,puVar5)" identifier (argument_list "(uVar4,uVar2,puVar5)" ( identifier , identifier , identifier ))))) ;) (expression_statement "xfree(*puVar5);" (call_expression "xfree(*puVar5)" identifier (argument_list "(*puVar5)" ( (pointer_expression "*puVar5" * identifier) ))) ;) (if_statement "if ((void *)puVar5[1] != (void *)0x0) {\n        free((void *)puVar5[1]);\n      }" if (parenthesized_expression "((void *)puVar5[1] != (void *)0x0)" ( (binary_expression "(void *)puVar5[1] != (void *)0x0" (cast_expression "(void *)puVar5[1]" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (subscript_expression "puVar5[1]" identifier [ number_literal ])) != (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n        free((void *)puVar5[1]);\n      }" { (expression_statement "free((void *)puVar5[1]);" (call_expression "free((void *)puVar5[1])" identifier (argument_list "((void *)puVar5[1])" ( (cast_expression "(void *)puVar5[1]" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (subscript_expression "puVar5[1]" identifier [ number_literal ])) ))) ;) })) (expression_statement "xfree(puVar5);" (call_expression "xfree(puVar5)" identifier (argument_list "(puVar5)" ( identifier ))) ;) })) (expression_statement "_hs_replace_history_data(0xffffffff,puVar7,rl_undo_list);" (call_expression "_hs_replace_history_data(0xffffffff,puVar7,rl_undo_list)" identifier (argument_list "(0xffffffff,puVar7,rl_undo_list)" ( number_literal , identifier , identifier ))) ;) (if_statement "if ((_rl_saved_line_for_history == 0) ||\n       (puVar5 = *(undefined4 **)(_rl_saved_line_for_history + 8), puVar5 == (undefined4 *)0x0)) {\nLAB_000feb0a:\n      xfree(puVar7);\n    }\n    else {\n      if (puVar5 == puVar7) {\n        *(undefined4 **)(_rl_saved_line_for_history + 8) = rl_undo_list;\n        goto LAB_000feb0a;\n      }\n      do {\n        puVar6 = puVar5;\n        puVar5 = (undefined4 *)*puVar6;\n        if (puVar5 == (undefined4 *)0x0) goto LAB_000feb0a;\n      } while (puVar5 != puVar7);\n      *puVar6 = rl_undo_list;\n      xfree(puVar7);\n    }" if (parenthesized_expression "((_rl_saved_line_for_history == 0) ||\n       (puVar5 = *(undefined4 **)(_rl_saved_line_for_history + 8), puVar5 == (undefined4 *)0x0))" ( (binary_expression "(_rl_saved_line_for_history == 0) ||\n       (puVar5 = *(undefined4 **)(_rl_saved_line_for_history + 8), puVar5 == (undefined4 *)0x0)" (parenthesized_expression "(_rl_saved_line_for_history == 0)" ( (binary_expression "_rl_saved_line_for_history == 0" identifier == number_literal) )) || (parenthesized_expression "(puVar5 = *(undefined4 **)(_rl_saved_line_for_history + 8), puVar5 == (undefined4 *)0x0)" ( (comma_expression "puVar5 = *(undefined4 **)(_rl_saved_line_for_history + 8), puVar5 == (undefined4 *)0x0" (assignment_expression "puVar5 = *(undefined4 **)(_rl_saved_line_for_history + 8)" identifier = (pointer_expression "*(undefined4 **)(_rl_saved_line_for_history + 8)" * (cast_expression "(undefined4 **)(_rl_saved_line_for_history + 8)" ( (type_descriptor "undefined4 **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(_rl_saved_line_for_history + 8)" ( (binary_expression "_rl_saved_line_for_history + 8" identifier + number_literal) ))))) , (binary_expression "puVar5 == (undefined4 *)0x0" identifier == (cast_expression "(undefined4 *)0x0" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal))) ))) )) (compound_statement "{\nLAB_000feb0a:\n      xfree(puVar7);\n    }" { (labeled_statement "LAB_000feb0a:\n      xfree(puVar7);" statement_identifier : (expression_statement "xfree(puVar7);" (call_expression "xfree(puVar7)" identifier (argument_list "(puVar7)" ( identifier ))) ;)) }) (else_clause "else {\n      if (puVar5 == puVar7) {\n        *(undefined4 **)(_rl_saved_line_for_history + 8) = rl_undo_list;\n        goto LAB_000feb0a;\n      }\n      do {\n        puVar6 = puVar5;\n        puVar5 = (undefined4 *)*puVar6;\n        if (puVar5 == (undefined4 *)0x0) goto LAB_000feb0a;\n      } while (puVar5 != puVar7);\n      *puVar6 = rl_undo_list;\n      xfree(puVar7);\n    }" else (compound_statement "{\n      if (puVar5 == puVar7) {\n        *(undefined4 **)(_rl_saved_line_for_history + 8) = rl_undo_list;\n        goto LAB_000feb0a;\n      }\n      do {\n        puVar6 = puVar5;\n        puVar5 = (undefined4 *)*puVar6;\n        if (puVar5 == (undefined4 *)0x0) goto LAB_000feb0a;\n      } while (puVar5 != puVar7);\n      *puVar6 = rl_undo_list;\n      xfree(puVar7);\n    }" { (if_statement "if (puVar5 == puVar7) {\n        *(undefined4 **)(_rl_saved_line_for_history + 8) = rl_undo_list;\n        goto LAB_000feb0a;\n      }" if (parenthesized_expression "(puVar5 == puVar7)" ( (binary_expression "puVar5 == puVar7" identifier == identifier) )) (compound_statement "{\n        *(undefined4 **)(_rl_saved_line_for_history + 8) = rl_undo_list;\n        goto LAB_000feb0a;\n      }" { (expression_statement "*(undefined4 **)(_rl_saved_line_for_history + 8) = rl_undo_list;" (assignment_expression "*(undefined4 **)(_rl_saved_line_for_history + 8) = rl_undo_list" (pointer_expression "*(undefined4 **)(_rl_saved_line_for_history + 8)" * (cast_expression "(undefined4 **)(_rl_saved_line_for_history + 8)" ( (type_descriptor "undefined4 **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(_rl_saved_line_for_history + 8)" ( (binary_expression "_rl_saved_line_for_history + 8" identifier + number_literal) )))) = identifier) ;) (goto_statement "goto LAB_000feb0a;" goto statement_identifier ;) })) (do_statement "do {\n        puVar6 = puVar5;\n        puVar5 = (undefined4 *)*puVar6;\n        if (puVar5 == (undefined4 *)0x0) goto LAB_000feb0a;\n      } while (puVar5 != puVar7);" do (compound_statement "{\n        puVar6 = puVar5;\n        puVar5 = (undefined4 *)*puVar6;\n        if (puVar5 == (undefined4 *)0x0) goto LAB_000feb0a;\n      }" { (expression_statement "puVar6 = puVar5;" (assignment_expression "puVar6 = puVar5" identifier = identifier) ;) (expression_statement "puVar5 = (undefined4 *)*puVar6;" (assignment_expression "puVar5 = (undefined4 *)*puVar6" identifier = (cast_expression "(undefined4 *)*puVar6" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "*puVar6" * identifier))) ;) (if_statement "if (puVar5 == (undefined4 *)0x0) goto LAB_000feb0a;" if (parenthesized_expression "(puVar5 == (undefined4 *)0x0)" ( (binary_expression "puVar5 == (undefined4 *)0x0" identifier == (cast_expression "(undefined4 *)0x0" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (goto_statement "goto LAB_000feb0a;" goto statement_identifier ;)) }) while (parenthesized_expression "(puVar5 != puVar7)" ( (binary_expression "puVar5 != puVar7" identifier != identifier) )) ;) (expression_statement "*puVar6 = rl_undo_list;" (assignment_expression "*puVar6 = rl_undo_list" (pointer_expression "*puVar6" * identifier) = identifier) ;) (expression_statement "xfree(puVar7);" (call_expression "xfree(puVar7)" identifier (argument_list "(puVar7)" ( identifier ))) ;) }))) (if_statement "if (iVar8 == 0) {\n      return 1;\n    }" if (parenthesized_expression "(iVar8 == 0)" ( (binary_expression "iVar8 == 0" identifier == number_literal) )) (compound_statement "{\n      return 1;\n    }" { (return_statement "return 1;" return number_literal ;) })) }) while (parenthesized_expression "( true )" ( true )) ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (do_statement do (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (return_statement return LIT ;) })) (expression_statement (assignment_expression IDENT = (subscript_expression IDENT [ LIT ])) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT | LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (subscript_expression IDENT [ LIT ])) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = IDENT) ;) }) (else_clause else (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = IDENT) ;) })))) (expression_statement (assignment_expression IDENT = (subscript_expression IDENT [ LIT ])) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = IDENT) ;) (goto_statement goto statement_identifier ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (goto_statement goto statement_identifier ;)) (expression_statement (assignment_expression IDENT = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (goto_statement goto statement_identifier ;)) (labeled_statement statement_identifier : (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT ))) ;)) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) }) (else_clause else (compound_statement { (labeled_statement statement_identifier : (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (goto_statement goto statement_identifier ;))) (labeled_statement statement_identifier : (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (call_expression IDENT (argument_list ( (subscript_expression IDENT [ LIT ]) ))) ;) (expression_statement (call_expression IDENT (argument_list ( (subscript_expression IDENT [ LIT ]) ))) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( ))) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) }))) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT + (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression IDENT == LIT) ))))) ;) }))) })))) }))) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT & LIT)) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (pointer_expression * IDENT))) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = LIT) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT != LIT) )) && (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) == IDENT) ))) )) && (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) ))) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( IDENT , IDENT , IDENT ))))) ;) (expression_statement (call_expression IDENT (argument_list ( (pointer_expression * IDENT) ))) ;) (if_statement if (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (subscript_expression IDENT [ LIT ])) != (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 *)) ) (subscript_expression IDENT [ LIT ])) ))) ;) })) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) })) (expression_statement (call_expression IDENT (argument_list ( LIT , IDENT , IDENT ))) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT == LIT) )) || (parenthesized_expression ( (comma_expression (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) , (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT))) ))) )) (compound_statement { (labeled_statement statement_identifier : (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;)) }) (else_clause else (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT == IDENT) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) (goto_statement goto statement_identifier ;) })) (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (pointer_expression * IDENT))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (goto_statement goto statement_identifier ;)) }) while (parenthesized_expression ( (binary_expression IDENT != IDENT) )) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) }))) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (return_statement return LIT ;) })) }) while (parenthesized_expression ( BOOL )) ;) })))
(function_definition "undefined4 rl_do_undo(void)\n\n{\n  uint uVar1;\n  undefined4 uVar2;\n  int iVar3;\n  undefined4 uVar4;\n  undefined4 *puVar5;\n  undefined4 *puVar6;\n  undefined4 *puVar7;\n  int iVar8;\n  int local_30;\n  int local_2c;\n  \n  iVar8 = 0;\n  local_2c = 0;\n  local_30 = 0;\n  do {\n    if (rl_undo_list == (undefined4 *)0x0) {\n      return 0;\n    }\n    uVar1 = rl_undo_list[4];\n    _rl_doing_an_undo = 1;\n    rl_readline_state = rl_readline_state | 0x10000;\n    if (uVar1 < 2) {\n      local_30 = rl_undo_list[1];\n      if (local_30 == -1) {\n        local_30 = rl_point;\n      }\n      else if (local_30 == -2) {\n        local_30 = rl_end;\n      }\n      local_2c = rl_undo_list[2];\n      if (local_2c == -1) {\n        local_2c = rl_point;\n        goto LAB_000fea70;\n      }\n      if (local_2c != -2) goto LAB_000fea70;\n      local_2c = rl_end;\n      if (uVar1 != 1) goto LAB_000fea79;\nLAB_000feba0:\n      rl_delete_text(local_30,local_2c);\n      rl_point = local_30;\n      puVar7 = rl_undo_list;\n    }\n    else {\nLAB_000fea70:\n      if (uVar1 == 1) goto LAB_000feba0;\nLAB_000fea79:\n      if (uVar1 == 0) {\n        rl_point = local_30;\n        rl_insert_text(rl_undo_list[3]);\n        xfree(rl_undo_list[3]);\n        puVar7 = rl_undo_list;\n      }\n      else {\n        puVar7 = rl_undo_list;\n        if (uVar1 == 2) {\n          if (iVar8 == 0) {\n            rl_ding();\n            puVar7 = rl_undo_list;\n          }\n          else {\n            iVar8 = iVar8 + -1;\n          }\n        }\n        else {\n          iVar8 = iVar8 + (uint)(uVar1 == 3);\n        }\n      }\n    }\n    _rl_doing_an_undo = 0;\n    rl_readline_state = rl_readline_state & 0xfffeffff;\n    rl_undo_list = (undefined4 *)*puVar7;\n    *puVar7 = 0;\n    iVar3 = current_history();\n    puVar5 = rl_undo_list;\n    uVar2 = rl_line_buffer;\n    if (((iVar3 != 0) && (*(undefined4 **)(iVar3 + 8) == puVar7)) &&\n       (*(undefined4 **)(iVar3 + 8) != (undefined4 *)0x0)) {\n      uVar4 = where_history();\n      puVar5 = (undefined4 *)replace_history_entry(uVar4,uVar2,puVar5);\n      xfree(*puVar5);\n      if ((void *)puVar5[1] != (void *)0x0) {\n        free((void *)puVar5[1]);\n      }\n      xfree(puVar5);\n    }\n    _hs_replace_history_data(0xffffffff,puVar7,rl_undo_list);\n    if ((_rl_saved_line_for_history == 0) ||\n       (puVar5 = *(undefined4 **)(_rl_saved_line_for_history + 8), puVar5 == (undefined4 *)0x0)) {\nLAB_000feb0a:\n      xfree(puVar7);\n    }\n    else {\n      if (puVar5 == puVar7) {\n        *(undefined4 **)(_rl_saved_line_for_history + 8) = rl_undo_list;\n        goto LAB_000feb0a;\n      }\n      do {\n        puVar6 = puVar5;\n        puVar5 = (undefined4 *)*puVar6;\n        if (puVar5 == (undefined4 *)0x0) goto LAB_000feb0a;\n      } while (puVar5 != puVar7);\n      *puVar6 = rl_undo_list;\n      xfree(puVar7);\n    }\n    if (iVar8 == 0) {\n      return 1;\n    }\n  } while( true );\n}" (type_identifier "undefined4") (function_declarator "rl_do_undo(void)" (identifier "rl_do_undo") (parameter_list "(void)" (( "(") (parameter_declaration "void" (primitive_type "void")) () ")"))) (compound_statement "{\n  uint uVar1;\n  undefined4 uVar2;\n  int iVar3;\n  undefined4 uVar4;\n  undefined4 *puVar5;\n  undefined4 *puVar6;\n  undefined4 *puVar7;\n  int iVar8;\n  int local_30;\n  int local_2c;\n  \n  iVar8 = 0;\n  local_2c = 0;\n  local_30 = 0;\n  do {\n    if (rl_undo_list == (undefined4 *)0x0) {\n      return 0;\n    }\n    uVar1 = rl_undo_list[4];\n    _rl_doing_an_undo = 1;\n    rl_readline_state = rl_readline_state | 0x10000;\n    if (uVar1 < 2) {\n      local_30 = rl_undo_list[1];\n      if (local_30 == -1) {\n        local_30 = rl_point;\n      }\n      else if (local_30 == -2) {\n        local_30 = rl_end;\n      }\n      local_2c = rl_undo_list[2];\n      if (local_2c == -1) {\n        local_2c = rl_point;\n        goto LAB_000fea70;\n      }\n      if (local_2c != -2) goto LAB_000fea70;\n      local_2c = rl_end;\n      if (uVar1 != 1) goto LAB_000fea79;\nLAB_000feba0:\n      rl_delete_text(local_30,local_2c);\n      rl_point = local_30;\n      puVar7 = rl_undo_list;\n    }\n    else {\nLAB_000fea70:\n      if (uVar1 == 1) goto LAB_000feba0;\nLAB_000fea79:\n      if (uVar1 == 0) {\n        rl_point = local_30;\n        rl_insert_text(rl_undo_list[3]);\n        xfree(rl_undo_list[3]);\n        puVar7 = rl_undo_list;\n      }\n      else {\n        puVar7 = rl_undo_list;\n        if (uVar1 == 2) {\n          if (iVar8 == 0) {\n            rl_ding();\n            puVar7 = rl_undo_list;\n          }\n          else {\n            iVar8 = iVar8 + -1;\n          }\n        }\n        else {\n          iVar8 = iVar8 + (uint)(uVar1 == 3);\n        }\n      }\n    }\n    _rl_doing_an_undo = 0;\n    rl_readline_state = rl_readline_state & 0xfffeffff;\n    rl_undo_list = (undefined4 *)*puVar7;\n    *puVar7 = 0;\n    iVar3 = current_history();\n    puVar5 = rl_undo_list;\n    uVar2 = rl_line_buffer;\n    if (((iVar3 != 0) && (*(undefined4 **)(iVar3 + 8) == puVar7)) &&\n       (*(undefined4 **)(iVar3 + 8) != (undefined4 *)0x0)) {\n      uVar4 = where_history();\n      puVar5 = (undefined4 *)replace_history_entry(uVar4,uVar2,puVar5);\n      xfree(*puVar5);\n      if ((void *)puVar5[1] != (void *)0x0) {\n        free((void *)puVar5[1]);\n      }\n      xfree(puVar5);\n    }\n    _hs_replace_history_data(0xffffffff,puVar7,rl_undo_list);\n    if ((_rl_saved_line_for_history == 0) ||\n       (puVar5 = *(undefined4 **)(_rl_saved_line_for_history + 8), puVar5 == (undefined4 *)0x0)) {\nLAB_000feb0a:\n      xfree(puVar7);\n    }\n    else {\n      if (puVar5 == puVar7) {\n        *(undefined4 **)(_rl_saved_line_for_history + 8) = rl_undo_list;\n        goto LAB_000feb0a;\n      }\n      do {\n        puVar6 = puVar5;\n        puVar5 = (undefined4 *)*puVar6;\n        if (puVar5 == (undefined4 *)0x0) goto LAB_000feb0a;\n      } while (puVar5 != puVar7);\n      *puVar6 = rl_undo_list;\n      xfree(puVar7);\n    }\n    if (iVar8 == 0) {\n      return 1;\n    }\n  } while( true );\n}" ({ "{") (declaration "uint uVar1;" (type_identifier "uint") (identifier "uVar1") (; ";")) (declaration "undefined4 uVar2;" (type_identifier "undefined4") (identifier "uVar2") (; ";")) (declaration "int iVar3;" (primitive_type "int") (identifier "iVar3") (; ";")) (declaration "undefined4 uVar4;" (type_identifier "undefined4") (identifier "uVar4") (; ";")) (declaration "undefined4 *puVar5;" (type_identifier "undefined4") (pointer_declarator "*puVar5" (* "*") (identifier "puVar5")) (; ";")) (declaration "undefined4 *puVar6;" (type_identifier "undefined4") (pointer_declarator "*puVar6" (* "*") (identifier "puVar6")) (; ";")) (declaration "undefined4 *puVar7;" (type_identifier "undefined4") (pointer_declarator "*puVar7" (* "*") (identifier "puVar7")) (; ";")) (declaration "int iVar8;" (primitive_type "int") (identifier "iVar8") (; ";")) (declaration "int local_30;" (primitive_type "int") (identifier "local_30") (; ";")) (declaration "int local_2c;" (primitive_type "int") (identifier "local_2c") (; ";")) (expression_statement "iVar8 = 0;" (assignment_expression "iVar8 = 0" (identifier "iVar8") (= "=") (number_literal "0")) (; ";")) (expression_statement "local_2c = 0;" (assignment_expression "local_2c = 0" (identifier "local_2c") (= "=") (number_literal "0")) (; ";")) (expression_statement "local_30 = 0;" (assignment_expression "local_30 = 0" (identifier "local_30") (= "=") (number_literal "0")) (; ";")) (do_statement "do {\n    if (rl_undo_list == (undefined4 *)0x0) {\n      return 0;\n    }\n    uVar1 = rl_undo_list[4];\n    _rl_doing_an_undo = 1;\n    rl_readline_state = rl_readline_state | 0x10000;\n    if (uVar1 < 2) {\n      local_30 = rl_undo_list[1];\n      if (local_30 == -1) {\n        local_30 = rl_point;\n      }\n      else if (local_30 == -2) {\n        local_30 = rl_end;\n      }\n      local_2c = rl_undo_list[2];\n      if (local_2c == -1) {\n        local_2c = rl_point;\n        goto LAB_000fea70;\n      }\n      if (local_2c != -2) goto LAB_000fea70;\n      local_2c = rl_end;\n      if (uVar1 != 1) goto LAB_000fea79;\nLAB_000feba0:\n      rl_delete_text(local_30,local_2c);\n      rl_point = local_30;\n      puVar7 = rl_undo_list;\n    }\n    else {\nLAB_000fea70:\n      if (uVar1 == 1) goto LAB_000feba0;\nLAB_000fea79:\n      if (uVar1 == 0) {\n        rl_point = local_30;\n        rl_insert_text(rl_undo_list[3]);\n        xfree(rl_undo_list[3]);\n        puVar7 = rl_undo_list;\n      }\n      else {\n        puVar7 = rl_undo_list;\n        if (uVar1 == 2) {\n          if (iVar8 == 0) {\n            rl_ding();\n            puVar7 = rl_undo_list;\n          }\n          else {\n            iVar8 = iVar8 + -1;\n          }\n        }\n        else {\n          iVar8 = iVar8 + (uint)(uVar1 == 3);\n        }\n      }\n    }\n    _rl_doing_an_undo = 0;\n    rl_readline_state = rl_readline_state & 0xfffeffff;\n    rl_undo_list = (undefined4 *)*puVar7;\n    *puVar7 = 0;\n    iVar3 = current_history();\n    puVar5 = rl_undo_list;\n    uVar2 = rl_line_buffer;\n    if (((iVar3 != 0) && (*(undefined4 **)(iVar3 + 8) == puVar7)) &&\n       (*(undefined4 **)(iVar3 + 8) != (undefined4 *)0x0)) {\n      uVar4 = where_history();\n      puVar5 = (undefined4 *)replace_history_entry(uVar4,uVar2,puVar5);\n      xfree(*puVar5);\n      if ((void *)puVar5[1] != (void *)0x0) {\n        free((void *)puVar5[1]);\n      }\n      xfree(puVar5);\n    }\n    _hs_replace_history_data(0xffffffff,puVar7,rl_undo_list);\n    if ((_rl_saved_line_for_history == 0) ||\n       (puVar5 = *(undefined4 **)(_rl_saved_line_for_history + 8), puVar5 == (undefined4 *)0x0)) {\nLAB_000feb0a:\n      xfree(puVar7);\n    }\n    else {\n      if (puVar5 == puVar7) {\n        *(undefined4 **)(_rl_saved_line_for_history + 8) = rl_undo_list;\n        goto LAB_000feb0a;\n      }\n      do {\n        puVar6 = puVar5;\n        puVar5 = (undefined4 *)*puVar6;\n        if (puVar5 == (undefined4 *)0x0) goto LAB_000feb0a;\n      } while (puVar5 != puVar7);\n      *puVar6 = rl_undo_list;\n      xfree(puVar7);\n    }\n    if (iVar8 == 0) {\n      return 1;\n    }\n  } while( true );" (do "do") (compound_statement "{\n    if (rl_undo_list == (undefined4 *)0x0) {\n      return 0;\n    }\n    uVar1 = rl_undo_list[4];\n    _rl_doing_an_undo = 1;\n    rl_readline_state = rl_readline_state | 0x10000;\n    if (uVar1 < 2) {\n      local_30 = rl_undo_list[1];\n      if (local_30 == -1) {\n        local_30 = rl_point;\n      }\n      else if (local_30 == -2) {\n        local_30 = rl_end;\n      }\n      local_2c = rl_undo_list[2];\n      if (local_2c == -1) {\n        local_2c = rl_point;\n        goto LAB_000fea70;\n      }\n      if (local_2c != -2) goto LAB_000fea70;\n      local_2c = rl_end;\n      if (uVar1 != 1) goto LAB_000fea79;\nLAB_000feba0:\n      rl_delete_text(local_30,local_2c);\n      rl_point = local_30;\n      puVar7 = rl_undo_list;\n    }\n    else {\nLAB_000fea70:\n      if (uVar1 == 1) goto LAB_000feba0;\nLAB_000fea79:\n      if (uVar1 == 0) {\n        rl_point = local_30;\n        rl_insert_text(rl_undo_list[3]);\n        xfree(rl_undo_list[3]);\n        puVar7 = rl_undo_list;\n      }\n      else {\n        puVar7 = rl_undo_list;\n        if (uVar1 == 2) {\n          if (iVar8 == 0) {\n            rl_ding();\n            puVar7 = rl_undo_list;\n          }\n          else {\n            iVar8 = iVar8 + -1;\n          }\n        }\n        else {\n          iVar8 = iVar8 + (uint)(uVar1 == 3);\n        }\n      }\n    }\n    _rl_doing_an_undo = 0;\n    rl_readline_state = rl_readline_state & 0xfffeffff;\n    rl_undo_list = (undefined4 *)*puVar7;\n    *puVar7 = 0;\n    iVar3 = current_history();\n    puVar5 = rl_undo_list;\n    uVar2 = rl_line_buffer;\n    if (((iVar3 != 0) && (*(undefined4 **)(iVar3 + 8) == puVar7)) &&\n       (*(undefined4 **)(iVar3 + 8) != (undefined4 *)0x0)) {\n      uVar4 = where_history();\n      puVar5 = (undefined4 *)replace_history_entry(uVar4,uVar2,puVar5);\n      xfree(*puVar5);\n      if ((void *)puVar5[1] != (void *)0x0) {\n        free((void *)puVar5[1]);\n      }\n      xfree(puVar5);\n    }\n    _hs_replace_history_data(0xffffffff,puVar7,rl_undo_list);\n    if ((_rl_saved_line_for_history == 0) ||\n       (puVar5 = *(undefined4 **)(_rl_saved_line_for_history + 8), puVar5 == (undefined4 *)0x0)) {\nLAB_000feb0a:\n      xfree(puVar7);\n    }\n    else {\n      if (puVar5 == puVar7) {\n        *(undefined4 **)(_rl_saved_line_for_history + 8) = rl_undo_list;\n        goto LAB_000feb0a;\n      }\n      do {\n        puVar6 = puVar5;\n        puVar5 = (undefined4 *)*puVar6;\n        if (puVar5 == (undefined4 *)0x0) goto LAB_000feb0a;\n      } while (puVar5 != puVar7);\n      *puVar6 = rl_undo_list;\n      xfree(puVar7);\n    }\n    if (iVar8 == 0) {\n      return 1;\n    }\n  }" ({ "{") (if_statement "if (rl_undo_list == (undefined4 *)0x0) {\n      return 0;\n    }" (if "if") (parenthesized_expression "(rl_undo_list == (undefined4 *)0x0)" (( "(") (binary_expression "rl_undo_list == (undefined4 *)0x0" (identifier "rl_undo_list") (== "==") (cast_expression "(undefined4 *)0x0" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n      return 0;\n    }" ({ "{") (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}"))) (expression_statement "uVar1 = rl_undo_list[4];" (assignment_expression "uVar1 = rl_undo_list[4]" (identifier "uVar1") (= "=") (subscript_expression "rl_undo_list[4]" (identifier "rl_undo_list") ([ "[") (number_literal "4") (] "]"))) (; ";")) (expression_statement "_rl_doing_an_undo = 1;" (assignment_expression "_rl_doing_an_undo = 1" (identifier "_rl_doing_an_undo") (= "=") (number_literal "1")) (; ";")) (expression_statement "rl_readline_state = rl_readline_state | 0x10000;" (assignment_expression "rl_readline_state = rl_readline_state | 0x10000" (identifier "rl_readline_state") (= "=") (binary_expression "rl_readline_state | 0x10000" (identifier "rl_readline_state") (| "|") (number_literal "0x10000"))) (; ";")) (if_statement "if (uVar1 < 2) {\n      local_30 = rl_undo_list[1];\n      if (local_30 == -1) {\n        local_30 = rl_point;\n      }\n      else if (local_30 == -2) {\n        local_30 = rl_end;\n      }\n      local_2c = rl_undo_list[2];\n      if (local_2c == -1) {\n        local_2c = rl_point;\n        goto LAB_000fea70;\n      }\n      if (local_2c != -2) goto LAB_000fea70;\n      local_2c = rl_end;\n      if (uVar1 != 1) goto LAB_000fea79;\nLAB_000feba0:\n      rl_delete_text(local_30,local_2c);\n      rl_point = local_30;\n      puVar7 = rl_undo_list;\n    }\n    else {\nLAB_000fea70:\n      if (uVar1 == 1) goto LAB_000feba0;\nLAB_000fea79:\n      if (uVar1 == 0) {\n        rl_point = local_30;\n        rl_insert_text(rl_undo_list[3]);\n        xfree(rl_undo_list[3]);\n        puVar7 = rl_undo_list;\n      }\n      else {\n        puVar7 = rl_undo_list;\n        if (uVar1 == 2) {\n          if (iVar8 == 0) {\n            rl_ding();\n            puVar7 = rl_undo_list;\n          }\n          else {\n            iVar8 = iVar8 + -1;\n          }\n        }\n        else {\n          iVar8 = iVar8 + (uint)(uVar1 == 3);\n        }\n      }\n    }" (if "if") (parenthesized_expression "(uVar1 < 2)" (( "(") (binary_expression "uVar1 < 2" (identifier "uVar1") (< "<") (number_literal "2")) () ")")) (compound_statement "{\n      local_30 = rl_undo_list[1];\n      if (local_30 == -1) {\n        local_30 = rl_point;\n      }\n      else if (local_30 == -2) {\n        local_30 = rl_end;\n      }\n      local_2c = rl_undo_list[2];\n      if (local_2c == -1) {\n        local_2c = rl_point;\n        goto LAB_000fea70;\n      }\n      if (local_2c != -2) goto LAB_000fea70;\n      local_2c = rl_end;\n      if (uVar1 != 1) goto LAB_000fea79;\nLAB_000feba0:\n      rl_delete_text(local_30,local_2c);\n      rl_point = local_30;\n      puVar7 = rl_undo_list;\n    }" ({ "{") (expression_statement "local_30 = rl_undo_list[1];" (assignment_expression "local_30 = rl_undo_list[1]" (identifier "local_30") (= "=") (subscript_expression "rl_undo_list[1]" (identifier "rl_undo_list") ([ "[") (number_literal "1") (] "]"))) (; ";")) (if_statement "if (local_30 == -1) {\n        local_30 = rl_point;\n      }\n      else if (local_30 == -2) {\n        local_30 = rl_end;\n      }" (if "if") (parenthesized_expression "(local_30 == -1)" (( "(") (binary_expression "local_30 == -1" (identifier "local_30") (== "==") (number_literal "-1")) () ")")) (compound_statement "{\n        local_30 = rl_point;\n      }" ({ "{") (expression_statement "local_30 = rl_point;" (assignment_expression "local_30 = rl_point" (identifier "local_30") (= "=") (identifier "rl_point")) (; ";")) (} "}")) (else_clause "else if (local_30 == -2) {\n        local_30 = rl_end;\n      }" (else "else") (if_statement "if (local_30 == -2) {\n        local_30 = rl_end;\n      }" (if "if") (parenthesized_expression "(local_30 == -2)" (( "(") (binary_expression "local_30 == -2" (identifier "local_30") (== "==") (number_literal "-2")) () ")")) (compound_statement "{\n        local_30 = rl_end;\n      }" ({ "{") (expression_statement "local_30 = rl_end;" (assignment_expression "local_30 = rl_end" (identifier "local_30") (= "=") (identifier "rl_end")) (; ";")) (} "}"))))) (expression_statement "local_2c = rl_undo_list[2];" (assignment_expression "local_2c = rl_undo_list[2]" (identifier "local_2c") (= "=") (subscript_expression "rl_undo_list[2]" (identifier "rl_undo_list") ([ "[") (number_literal "2") (] "]"))) (; ";")) (if_statement "if (local_2c == -1) {\n        local_2c = rl_point;\n        goto LAB_000fea70;\n      }" (if "if") (parenthesized_expression "(local_2c == -1)" (( "(") (binary_expression "local_2c == -1" (identifier "local_2c") (== "==") (number_literal "-1")) () ")")) (compound_statement "{\n        local_2c = rl_point;\n        goto LAB_000fea70;\n      }" ({ "{") (expression_statement "local_2c = rl_point;" (assignment_expression "local_2c = rl_point" (identifier "local_2c") (= "=") (identifier "rl_point")) (; ";")) (goto_statement "goto LAB_000fea70;" (goto "goto") (statement_identifier "LAB_000fea70") (; ";")) (} "}"))) (if_statement "if (local_2c != -2) goto LAB_000fea70;" (if "if") (parenthesized_expression "(local_2c != -2)" (( "(") (binary_expression "local_2c != -2" (identifier "local_2c") (!= "!=") (number_literal "-2")) () ")")) (goto_statement "goto LAB_000fea70;" (goto "goto") (statement_identifier "LAB_000fea70") (; ";"))) (expression_statement "local_2c = rl_end;" (assignment_expression "local_2c = rl_end" (identifier "local_2c") (= "=") (identifier "rl_end")) (; ";")) (if_statement "if (uVar1 != 1) goto LAB_000fea79;" (if "if") (parenthesized_expression "(uVar1 != 1)" (( "(") (binary_expression "uVar1 != 1" (identifier "uVar1") (!= "!=") (number_literal "1")) () ")")) (goto_statement "goto LAB_000fea79;" (goto "goto") (statement_identifier "LAB_000fea79") (; ";"))) (labeled_statement "LAB_000feba0:\n      rl_delete_text(local_30,local_2c);" (statement_identifier "LAB_000feba0") (: ":") (expression_statement "rl_delete_text(local_30,local_2c);" (call_expression "rl_delete_text(local_30,local_2c)" (identifier "rl_delete_text") (argument_list "(local_30,local_2c)" (( "(") (identifier "local_30") (, ",") (identifier "local_2c") () ")"))) (; ";"))) (expression_statement "rl_point = local_30;" (assignment_expression "rl_point = local_30" (identifier "rl_point") (= "=") (identifier "local_30")) (; ";")) (expression_statement "puVar7 = rl_undo_list;" (assignment_expression "puVar7 = rl_undo_list" (identifier "puVar7") (= "=") (identifier "rl_undo_list")) (; ";")) (} "}")) (else_clause "else {\nLAB_000fea70:\n      if (uVar1 == 1) goto LAB_000feba0;\nLAB_000fea79:\n      if (uVar1 == 0) {\n        rl_point = local_30;\n        rl_insert_text(rl_undo_list[3]);\n        xfree(rl_undo_list[3]);\n        puVar7 = rl_undo_list;\n      }\n      else {\n        puVar7 = rl_undo_list;\n        if (uVar1 == 2) {\n          if (iVar8 == 0) {\n            rl_ding();\n            puVar7 = rl_undo_list;\n          }\n          else {\n            iVar8 = iVar8 + -1;\n          }\n        }\n        else {\n          iVar8 = iVar8 + (uint)(uVar1 == 3);\n        }\n      }\n    }" (else "else") (compound_statement "{\nLAB_000fea70:\n      if (uVar1 == 1) goto LAB_000feba0;\nLAB_000fea79:\n      if (uVar1 == 0) {\n        rl_point = local_30;\n        rl_insert_text(rl_undo_list[3]);\n        xfree(rl_undo_list[3]);\n        puVar7 = rl_undo_list;\n      }\n      else {\n        puVar7 = rl_undo_list;\n        if (uVar1 == 2) {\n          if (iVar8 == 0) {\n            rl_ding();\n            puVar7 = rl_undo_list;\n          }\n          else {\n            iVar8 = iVar8 + -1;\n          }\n        }\n        else {\n          iVar8 = iVar8 + (uint)(uVar1 == 3);\n        }\n      }\n    }" ({ "{") (labeled_statement "LAB_000fea70:\n      if (uVar1 == 1) goto LAB_000feba0;" (statement_identifier "LAB_000fea70") (: ":") (if_statement "if (uVar1 == 1) goto LAB_000feba0;" (if "if") (parenthesized_expression "(uVar1 == 1)" (( "(") (binary_expression "uVar1 == 1" (identifier "uVar1") (== "==") (number_literal "1")) () ")")) (goto_statement "goto LAB_000feba0;" (goto "goto") (statement_identifier "LAB_000feba0") (; ";")))) (labeled_statement "LAB_000fea79:\n      if (uVar1 == 0) {\n        rl_point = local_30;\n        rl_insert_text(rl_undo_list[3]);\n        xfree(rl_undo_list[3]);\n        puVar7 = rl_undo_list;\n      }\n      else {\n        puVar7 = rl_undo_list;\n        if (uVar1 == 2) {\n          if (iVar8 == 0) {\n            rl_ding();\n            puVar7 = rl_undo_list;\n          }\n          else {\n            iVar8 = iVar8 + -1;\n          }\n        }\n        else {\n          iVar8 = iVar8 + (uint)(uVar1 == 3);\n        }\n      }" (statement_identifier "LAB_000fea79") (: ":") (if_statement "if (uVar1 == 0) {\n        rl_point = local_30;\n        rl_insert_text(rl_undo_list[3]);\n        xfree(rl_undo_list[3]);\n        puVar7 = rl_undo_list;\n      }\n      else {\n        puVar7 = rl_undo_list;\n        if (uVar1 == 2) {\n          if (iVar8 == 0) {\n            rl_ding();\n            puVar7 = rl_undo_list;\n          }\n          else {\n            iVar8 = iVar8 + -1;\n          }\n        }\n        else {\n          iVar8 = iVar8 + (uint)(uVar1 == 3);\n        }\n      }" (if "if") (parenthesized_expression "(uVar1 == 0)" (( "(") (binary_expression "uVar1 == 0" (identifier "uVar1") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n        rl_point = local_30;\n        rl_insert_text(rl_undo_list[3]);\n        xfree(rl_undo_list[3]);\n        puVar7 = rl_undo_list;\n      }" ({ "{") (expression_statement "rl_point = local_30;" (assignment_expression "rl_point = local_30" (identifier "rl_point") (= "=") (identifier "local_30")) (; ";")) (expression_statement "rl_insert_text(rl_undo_list[3]);" (call_expression "rl_insert_text(rl_undo_list[3])" (identifier "rl_insert_text") (argument_list "(rl_undo_list[3])" (( "(") (subscript_expression "rl_undo_list[3]" (identifier "rl_undo_list") ([ "[") (number_literal "3") (] "]")) () ")"))) (; ";")) (expression_statement "xfree(rl_undo_list[3]);" (call_expression "xfree(rl_undo_list[3])" (identifier "xfree") (argument_list "(rl_undo_list[3])" (( "(") (subscript_expression "rl_undo_list[3]" (identifier "rl_undo_list") ([ "[") (number_literal "3") (] "]")) () ")"))) (; ";")) (expression_statement "puVar7 = rl_undo_list;" (assignment_expression "puVar7 = rl_undo_list" (identifier "puVar7") (= "=") (identifier "rl_undo_list")) (; ";")) (} "}")) (else_clause "else {\n        puVar7 = rl_undo_list;\n        if (uVar1 == 2) {\n          if (iVar8 == 0) {\n            rl_ding();\n            puVar7 = rl_undo_list;\n          }\n          else {\n            iVar8 = iVar8 + -1;\n          }\n        }\n        else {\n          iVar8 = iVar8 + (uint)(uVar1 == 3);\n        }\n      }" (else "else") (compound_statement "{\n        puVar7 = rl_undo_list;\n        if (uVar1 == 2) {\n          if (iVar8 == 0) {\n            rl_ding();\n            puVar7 = rl_undo_list;\n          }\n          else {\n            iVar8 = iVar8 + -1;\n          }\n        }\n        else {\n          iVar8 = iVar8 + (uint)(uVar1 == 3);\n        }\n      }" ({ "{") (expression_statement "puVar7 = rl_undo_list;" (assignment_expression "puVar7 = rl_undo_list" (identifier "puVar7") (= "=") (identifier "rl_undo_list")) (; ";")) (if_statement "if (uVar1 == 2) {\n          if (iVar8 == 0) {\n            rl_ding();\n            puVar7 = rl_undo_list;\n          }\n          else {\n            iVar8 = iVar8 + -1;\n          }\n        }\n        else {\n          iVar8 = iVar8 + (uint)(uVar1 == 3);\n        }" (if "if") (parenthesized_expression "(uVar1 == 2)" (( "(") (binary_expression "uVar1 == 2" (identifier "uVar1") (== "==") (number_literal "2")) () ")")) (compound_statement "{\n          if (iVar8 == 0) {\n            rl_ding();\n            puVar7 = rl_undo_list;\n          }\n          else {\n            iVar8 = iVar8 + -1;\n          }\n        }" ({ "{") (if_statement "if (iVar8 == 0) {\n            rl_ding();\n            puVar7 = rl_undo_list;\n          }\n          else {\n            iVar8 = iVar8 + -1;\n          }" (if "if") (parenthesized_expression "(iVar8 == 0)" (( "(") (binary_expression "iVar8 == 0" (identifier "iVar8") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n            rl_ding();\n            puVar7 = rl_undo_list;\n          }" ({ "{") (expression_statement "rl_ding();" (call_expression "rl_ding()" (identifier "rl_ding") (argument_list "()" (( "(") () ")"))) (; ";")) (expression_statement "puVar7 = rl_undo_list;" (assignment_expression "puVar7 = rl_undo_list" (identifier "puVar7") (= "=") (identifier "rl_undo_list")) (; ";")) (} "}")) (else_clause "else {\n            iVar8 = iVar8 + -1;\n          }" (else "else") (compound_statement "{\n            iVar8 = iVar8 + -1;\n          }" ({ "{") (expression_statement "iVar8 = iVar8 + -1;" (assignment_expression "iVar8 = iVar8 + -1" (identifier "iVar8") (= "=") (binary_expression "iVar8 + -1" (identifier "iVar8") (+ "+") (number_literal "-1"))) (; ";")) (} "}")))) (} "}")) (else_clause "else {\n          iVar8 = iVar8 + (uint)(uVar1 == 3);\n        }" (else "else") (compound_statement "{\n          iVar8 = iVar8 + (uint)(uVar1 == 3);\n        }" ({ "{") (expression_statement "iVar8 = iVar8 + (uint)(uVar1 == 3);" (assignment_expression "iVar8 = iVar8 + (uint)(uVar1 == 3)" (identifier "iVar8") (= "=") (binary_expression "iVar8 + (uint)(uVar1 == 3)" (identifier "iVar8") (+ "+") (call_expression "(uint)(uVar1 == 3)" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (argument_list "(uVar1 == 3)" (( "(") (binary_expression "uVar1 == 3" (identifier "uVar1") (== "==") (number_literal "3")) () ")"))))) (; ";")) (} "}")))) (} "}"))))) (} "}")))) (expression_statement "_rl_doing_an_undo = 0;" (assignment_expression "_rl_doing_an_undo = 0" (identifier "_rl_doing_an_undo") (= "=") (number_literal "0")) (; ";")) (expression_statement "rl_readline_state = rl_readline_state & 0xfffeffff;" (assignment_expression "rl_readline_state = rl_readline_state & 0xfffeffff" (identifier "rl_readline_state") (= "=") (binary_expression "rl_readline_state & 0xfffeffff" (identifier "rl_readline_state") (& "&") (number_literal "0xfffeffff"))) (; ";")) (expression_statement "rl_undo_list = (undefined4 *)*puVar7;" (assignment_expression "rl_undo_list = (undefined4 *)*puVar7" (identifier "rl_undo_list") (= "=") (cast_expression "(undefined4 *)*puVar7" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (pointer_expression "*puVar7" (* "*") (identifier "puVar7")))) (; ";")) (expression_statement "*puVar7 = 0;" (assignment_expression "*puVar7 = 0" (pointer_expression "*puVar7" (* "*") (identifier "puVar7")) (= "=") (number_literal "0")) (; ";")) (expression_statement "iVar3 = current_history();" (assignment_expression "iVar3 = current_history()" (identifier "iVar3") (= "=") (call_expression "current_history()" (identifier "current_history") (argument_list "()" (( "(") () ")")))) (; ";")) (expression_statement "puVar5 = rl_undo_list;" (assignment_expression "puVar5 = rl_undo_list" (identifier "puVar5") (= "=") (identifier "rl_undo_list")) (; ";")) (expression_statement "uVar2 = rl_line_buffer;" (assignment_expression "uVar2 = rl_line_buffer" (identifier "uVar2") (= "=") (identifier "rl_line_buffer")) (; ";")) (if_statement "if (((iVar3 != 0) && (*(undefined4 **)(iVar3 + 8) == puVar7)) &&\n       (*(undefined4 **)(iVar3 + 8) != (undefined4 *)0x0)) {\n      uVar4 = where_history();\n      puVar5 = (undefined4 *)replace_history_entry(uVar4,uVar2,puVar5);\n      xfree(*puVar5);\n      if ((void *)puVar5[1] != (void *)0x0) {\n        free((void *)puVar5[1]);\n      }\n      xfree(puVar5);\n    }" (if "if") (parenthesized_expression "(((iVar3 != 0) && (*(undefined4 **)(iVar3 + 8) == puVar7)) &&\n       (*(undefined4 **)(iVar3 + 8) != (undefined4 *)0x0))" (( "(") (binary_expression "((iVar3 != 0) && (*(undefined4 **)(iVar3 + 8) == puVar7)) &&\n       (*(undefined4 **)(iVar3 + 8) != (undefined4 *)0x0)" (parenthesized_expression "((iVar3 != 0) && (*(undefined4 **)(iVar3 + 8) == puVar7))" (( "(") (binary_expression "(iVar3 != 0) && (*(undefined4 **)(iVar3 + 8) == puVar7)" (parenthesized_expression "(iVar3 != 0)" (( "(") (binary_expression "iVar3 != 0" (identifier "iVar3") (!= "!=") (number_literal "0")) () ")")) (&& "&&") (parenthesized_expression "(*(undefined4 **)(iVar3 + 8) == puVar7)" (( "(") (binary_expression "*(undefined4 **)(iVar3 + 8) == puVar7" (pointer_expression "*(undefined4 **)(iVar3 + 8)" (* "*") (cast_expression "(undefined4 **)(iVar3 + 8)" (( "(") (type_descriptor "undefined4 **" (type_identifier "undefined4") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(iVar3 + 8)" (( "(") (binary_expression "iVar3 + 8" (identifier "iVar3") (+ "+") (number_literal "8")) () ")")))) (== "==") (identifier "puVar7")) () ")"))) () ")")) (&& "&&") (parenthesized_expression "(*(undefined4 **)(iVar3 + 8) != (undefined4 *)0x0)" (( "(") (binary_expression "*(undefined4 **)(iVar3 + 8) != (undefined4 *)0x0" (pointer_expression "*(undefined4 **)(iVar3 + 8)" (* "*") (cast_expression "(undefined4 **)(iVar3 + 8)" (( "(") (type_descriptor "undefined4 **" (type_identifier "undefined4") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(iVar3 + 8)" (( "(") (binary_expression "iVar3 + 8" (identifier "iVar3") (+ "+") (number_literal "8")) () ")")))) (!= "!=") (cast_expression "(undefined4 *)0x0" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")"))) () ")")) (compound_statement "{\n      uVar4 = where_history();\n      puVar5 = (undefined4 *)replace_history_entry(uVar4,uVar2,puVar5);\n      xfree(*puVar5);\n      if ((void *)puVar5[1] != (void *)0x0) {\n        free((void *)puVar5[1]);\n      }\n      xfree(puVar5);\n    }" ({ "{") (expression_statement "uVar4 = where_history();" (assignment_expression "uVar4 = where_history()" (identifier "uVar4") (= "=") (call_expression "where_history()" (identifier "where_history") (argument_list "()" (( "(") () ")")))) (; ";")) (expression_statement "puVar5 = (undefined4 *)replace_history_entry(uVar4,uVar2,puVar5);" (assignment_expression "puVar5 = (undefined4 *)replace_history_entry(uVar4,uVar2,puVar5)" (identifier "puVar5") (= "=") (cast_expression "(undefined4 *)replace_history_entry(uVar4,uVar2,puVar5)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "replace_history_entry(uVar4,uVar2,puVar5)" (identifier "replace_history_entry") (argument_list "(uVar4,uVar2,puVar5)" (( "(") (identifier "uVar4") (, ",") (identifier "uVar2") (, ",") (identifier "puVar5") () ")"))))) (; ";")) (expression_statement "xfree(*puVar5);" (call_expression "xfree(*puVar5)" (identifier "xfree") (argument_list "(*puVar5)" (( "(") (pointer_expression "*puVar5" (* "*") (identifier "puVar5")) () ")"))) (; ";")) (if_statement "if ((void *)puVar5[1] != (void *)0x0) {\n        free((void *)puVar5[1]);\n      }" (if "if") (parenthesized_expression "((void *)puVar5[1] != (void *)0x0)" (( "(") (binary_expression "(void *)puVar5[1] != (void *)0x0" (cast_expression "(void *)puVar5[1]" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (subscript_expression "puVar5[1]" (identifier "puVar5") ([ "[") (number_literal "1") (] "]"))) (!= "!=") (cast_expression "(void *)0x0" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n        free((void *)puVar5[1]);\n      }" ({ "{") (expression_statement "free((void *)puVar5[1]);" (call_expression "free((void *)puVar5[1])" (identifier "free") (argument_list "((void *)puVar5[1])" (( "(") (cast_expression "(void *)puVar5[1]" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (subscript_expression "puVar5[1]" (identifier "puVar5") ([ "[") (number_literal "1") (] "]"))) () ")"))) (; ";")) (} "}"))) (expression_statement "xfree(puVar5);" (call_expression "xfree(puVar5)" (identifier "xfree") (argument_list "(puVar5)" (( "(") (identifier "puVar5") () ")"))) (; ";")) (} "}"))) (expression_statement "_hs_replace_history_data(0xffffffff,puVar7,rl_undo_list);" (call_expression "_hs_replace_history_data(0xffffffff,puVar7,rl_undo_list)" (identifier "_hs_replace_history_data") (argument_list "(0xffffffff,puVar7,rl_undo_list)" (( "(") (number_literal "0xffffffff") (, ",") (identifier "puVar7") (, ",") (identifier "rl_undo_list") () ")"))) (; ";")) (if_statement "if ((_rl_saved_line_for_history == 0) ||\n       (puVar5 = *(undefined4 **)(_rl_saved_line_for_history + 8), puVar5 == (undefined4 *)0x0)) {\nLAB_000feb0a:\n      xfree(puVar7);\n    }\n    else {\n      if (puVar5 == puVar7) {\n        *(undefined4 **)(_rl_saved_line_for_history + 8) = rl_undo_list;\n        goto LAB_000feb0a;\n      }\n      do {\n        puVar6 = puVar5;\n        puVar5 = (undefined4 *)*puVar6;\n        if (puVar5 == (undefined4 *)0x0) goto LAB_000feb0a;\n      } while (puVar5 != puVar7);\n      *puVar6 = rl_undo_list;\n      xfree(puVar7);\n    }" (if "if") (parenthesized_expression "((_rl_saved_line_for_history == 0) ||\n       (puVar5 = *(undefined4 **)(_rl_saved_line_for_history + 8), puVar5 == (undefined4 *)0x0))" (( "(") (binary_expression "(_rl_saved_line_for_history == 0) ||\n       (puVar5 = *(undefined4 **)(_rl_saved_line_for_history + 8), puVar5 == (undefined4 *)0x0)" (parenthesized_expression "(_rl_saved_line_for_history == 0)" (( "(") (binary_expression "_rl_saved_line_for_history == 0" (identifier "_rl_saved_line_for_history") (== "==") (number_literal "0")) () ")")) (|| "||") (parenthesized_expression "(puVar5 = *(undefined4 **)(_rl_saved_line_for_history + 8), puVar5 == (undefined4 *)0x0)" (( "(") (comma_expression "puVar5 = *(undefined4 **)(_rl_saved_line_for_history + 8), puVar5 == (undefined4 *)0x0" (assignment_expression "puVar5 = *(undefined4 **)(_rl_saved_line_for_history + 8)" (identifier "puVar5") (= "=") (pointer_expression "*(undefined4 **)(_rl_saved_line_for_history + 8)" (* "*") (cast_expression "(undefined4 **)(_rl_saved_line_for_history + 8)" (( "(") (type_descriptor "undefined4 **" (type_identifier "undefined4") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(_rl_saved_line_for_history + 8)" (( "(") (binary_expression "_rl_saved_line_for_history + 8" (identifier "_rl_saved_line_for_history") (+ "+") (number_literal "8")) () ")"))))) (, ",") (binary_expression "puVar5 == (undefined4 *)0x0" (identifier "puVar5") (== "==") (cast_expression "(undefined4 *)0x0" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0")))) () ")"))) () ")")) (compound_statement "{\nLAB_000feb0a:\n      xfree(puVar7);\n    }" ({ "{") (labeled_statement "LAB_000feb0a:\n      xfree(puVar7);" (statement_identifier "LAB_000feb0a") (: ":") (expression_statement "xfree(puVar7);" (call_expression "xfree(puVar7)" (identifier "xfree") (argument_list "(puVar7)" (( "(") (identifier "puVar7") () ")"))) (; ";"))) (} "}")) (else_clause "else {\n      if (puVar5 == puVar7) {\n        *(undefined4 **)(_rl_saved_line_for_history + 8) = rl_undo_list;\n        goto LAB_000feb0a;\n      }\n      do {\n        puVar6 = puVar5;\n        puVar5 = (undefined4 *)*puVar6;\n        if (puVar5 == (undefined4 *)0x0) goto LAB_000feb0a;\n      } while (puVar5 != puVar7);\n      *puVar6 = rl_undo_list;\n      xfree(puVar7);\n    }" (else "else") (compound_statement "{\n      if (puVar5 == puVar7) {\n        *(undefined4 **)(_rl_saved_line_for_history + 8) = rl_undo_list;\n        goto LAB_000feb0a;\n      }\n      do {\n        puVar6 = puVar5;\n        puVar5 = (undefined4 *)*puVar6;\n        if (puVar5 == (undefined4 *)0x0) goto LAB_000feb0a;\n      } while (puVar5 != puVar7);\n      *puVar6 = rl_undo_list;\n      xfree(puVar7);\n    }" ({ "{") (if_statement "if (puVar5 == puVar7) {\n        *(undefined4 **)(_rl_saved_line_for_history + 8) = rl_undo_list;\n        goto LAB_000feb0a;\n      }" (if "if") (parenthesized_expression "(puVar5 == puVar7)" (( "(") (binary_expression "puVar5 == puVar7" (identifier "puVar5") (== "==") (identifier "puVar7")) () ")")) (compound_statement "{\n        *(undefined4 **)(_rl_saved_line_for_history + 8) = rl_undo_list;\n        goto LAB_000feb0a;\n      }" ({ "{") (expression_statement "*(undefined4 **)(_rl_saved_line_for_history + 8) = rl_undo_list;" (assignment_expression "*(undefined4 **)(_rl_saved_line_for_history + 8) = rl_undo_list" (pointer_expression "*(undefined4 **)(_rl_saved_line_for_history + 8)" (* "*") (cast_expression "(undefined4 **)(_rl_saved_line_for_history + 8)" (( "(") (type_descriptor "undefined4 **" (type_identifier "undefined4") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(_rl_saved_line_for_history + 8)" (( "(") (binary_expression "_rl_saved_line_for_history + 8" (identifier "_rl_saved_line_for_history") (+ "+") (number_literal "8")) () ")")))) (= "=") (identifier "rl_undo_list")) (; ";")) (goto_statement "goto LAB_000feb0a;" (goto "goto") (statement_identifier "LAB_000feb0a") (; ";")) (} "}"))) (do_statement "do {\n        puVar6 = puVar5;\n        puVar5 = (undefined4 *)*puVar6;\n        if (puVar5 == (undefined4 *)0x0) goto LAB_000feb0a;\n      } while (puVar5 != puVar7);" (do "do") (compound_statement "{\n        puVar6 = puVar5;\n        puVar5 = (undefined4 *)*puVar6;\n        if (puVar5 == (undefined4 *)0x0) goto LAB_000feb0a;\n      }" ({ "{") (expression_statement "puVar6 = puVar5;" (assignment_expression "puVar6 = puVar5" (identifier "puVar6") (= "=") (identifier "puVar5")) (; ";")) (expression_statement "puVar5 = (undefined4 *)*puVar6;" (assignment_expression "puVar5 = (undefined4 *)*puVar6" (identifier "puVar5") (= "=") (cast_expression "(undefined4 *)*puVar6" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (pointer_expression "*puVar6" (* "*") (identifier "puVar6")))) (; ";")) (if_statement "if (puVar5 == (undefined4 *)0x0) goto LAB_000feb0a;" (if "if") (parenthesized_expression "(puVar5 == (undefined4 *)0x0)" (( "(") (binary_expression "puVar5 == (undefined4 *)0x0" (identifier "puVar5") (== "==") (cast_expression "(undefined4 *)0x0" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (goto_statement "goto LAB_000feb0a;" (goto "goto") (statement_identifier "LAB_000feb0a") (; ";"))) (} "}")) (while "while") (parenthesized_expression "(puVar5 != puVar7)" (( "(") (binary_expression "puVar5 != puVar7" (identifier "puVar5") (!= "!=") (identifier "puVar7")) () ")")) (; ";")) (expression_statement "*puVar6 = rl_undo_list;" (assignment_expression "*puVar6 = rl_undo_list" (pointer_expression "*puVar6" (* "*") (identifier "puVar6")) (= "=") (identifier "rl_undo_list")) (; ";")) (expression_statement "xfree(puVar7);" (call_expression "xfree(puVar7)" (identifier "xfree") (argument_list "(puVar7)" (( "(") (identifier "puVar7") () ")"))) (; ";")) (} "}")))) (if_statement "if (iVar8 == 0) {\n      return 1;\n    }" (if "if") (parenthesized_expression "(iVar8 == 0)" (( "(") (binary_expression "iVar8 == 0" (identifier "iVar8") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n      return 1;\n    }" ({ "{") (return_statement "return 1;" (return "return") (number_literal "1") (; ";")) (} "}"))) (} "}")) (while "while") (parenthesized_expression "( true )" (( "(") (true "true") () ")")) (; ";")) (} "}")))

/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* WARNING: Unknown calling convention */

int function_1(void)

{
  type_1 *var_23;
  type_2 var_3;
  char *line;
  type_3 *var_16;
  int which;
  type_1 *pUVar4;
  type_1 *var_17;
  int var_12;
  int var_5;
  int var_6;
  
  var_12 = 0;
  var_6 = 0;
  var_5 = 0;
  do {
    if (var_1 == (type_1 *)0x0) {
      return 0;
    }
    var_3 = var_1->what;
    _rl_doing_an_undo = 1;
    var_2 = var_2 | 0x10000;
    if (var_3 < var_4) {
      var_5 = var_1->start;
      if (var_5 == -1) {
        var_5 = rl_point;
      }
      else if (var_5 == -2) {
        var_5 = rl_end;
      }
      var_6 = var_1->end;
      if (var_6 == -1) {
        var_6 = rl_point;
        goto LAB_000fea70;
      }
      if (var_6 != -2) goto LAB_000fea70;
      var_6 = rl_end;
      if (var_3 != var_7) goto LAB_000fea79;
LAB_000feba0:
      var_8(var_5,var_6);
      rl_point = var_5;
      var_17 = var_1;
    }
    else {
LAB_000fea70:
      if (var_3 == var_7) goto LAB_000feba0;
LAB_000fea79:
      if (var_3 == var_9) {
        rl_point = var_5;
        var_10(var_1->text);
        var_11(var_1->text);
        var_17 = var_1;
      }
      else {
        var_17 = var_1;
        if (var_3 == var_4) {
          if (var_12 == 0) {
            var_13();
            var_17 = var_1;
          }
          else {
            var_12 = var_12 + -1;
          }
        }
        else {
          var_12 = var_12 + (uint)(var_3 == var_14);
        }
      }
    }
    _rl_doing_an_undo = 0;
    var_2 = var_2 & 0xfffeffff;
    var_1 = var_17->next;
    var_17->next = (type_4 *)0x0;
    var_16 = var_15();
    var_23 = var_1;
    line = rl_line_buffer;
    if (((var_16 != (type_3 *)0x0) && ((type_1 *)var_16->data == var_17)) &&
       ((type_1 *)var_16->data != (type_1 *)0x0)) {
      which = var_18();
      var_16 = var_19(which,line,var_23);
      var_11(var_16->line);
      if (var_16->timestamp != (char *)0x0) {
        var_20(var_16->timestamp);
      }
      var_11(var_16);
    }
    var_21(-1,&var_17->next,&var_1->next);
    if ((var_22 == (type_3 *)0x0) ||
       (var_23 = (type_1 *)var_22->data, var_23 == (type_1 *)0x0)) {
LAB_000feb0a:
      var_11(var_17);
    }
    else {
      if (var_23 == var_17) {
        var_22->data = var_1;
        goto LAB_000feb0a;
      }
      do {
        pUVar4 = var_23;
        var_23 = pUVar4->next;
        if (var_23 == (type_4 *)0x0) goto LAB_000feb0a;
      } while (var_23 != var_17);
      pUVar4->next = var_1;
      var_11(var_17);
    }
    if (var_12 == 0) {
      return 1;
    }
  } while( true );
}


(translation_unit (function_definition type: (type_identifier) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (primitive_type)))) body: (compound_statement (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (do_statement body: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (number_literal)))) consequence: (compound_statement (return_statement (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (subscript_expression argument: (identifier) index: (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (subscript_expression argument: (identifier) index: (number_literal)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (identifier)))) alternative: (else_clause (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (identifier))))))) (expression_statement (assignment_expression left: (identifier) right: (subscript_expression argument: (identifier) index: (number_literal)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (identifier))) (goto_statement label: (statement_identifier)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (goto_statement label: (statement_identifier))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (goto_statement label: (statement_identifier))) (labeled_statement label: (statement_identifier) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier))))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (identifier)))) alternative: (else_clause (compound_statement (labeled_statement label: (statement_identifier) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (goto_statement label: (statement_identifier)))) (labeled_statement label: (statement_identifier) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (identifier))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (subscript_expression argument: (identifier) index: (number_literal))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (subscript_expression argument: (identifier) index: (number_literal))))) (expression_statement (assignment_expression left: (identifier) right: (identifier)))) alternative: (else_clause (compound_statement (expression_statement (assignment_expression left: (identifier) right: (identifier))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list))) (expression_statement (assignment_expression left: (identifier) right: (identifier)))) alternative: (else_clause (compound_statement (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))))))) alternative: (else_clause (compound_statement (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (call_expression function: (parenthesized_expression (identifier)) arguments: (argument_list (binary_expression left: (identifier) right: (number_literal))))))))))))))))) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (pointer_expression argument: (identifier))))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list)))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) right: (parenthesized_expression (binary_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator declarator: (abstract_pointer_declarator))) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (identifier))))) right: (parenthesized_expression (binary_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator declarator: (abstract_pointer_declarator))) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (number_literal)))))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list)))) (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 (identifier) (identifier) (identifier)))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (pointer_expression argument: (identifier))))) (if_statement condition: (parenthesized_expression (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (subscript_expression argument: (identifier) index: (number_literal))) 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: (subscript_expression argument: (identifier) index: (number_literal)))))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier)))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (number_literal) (identifier) (identifier)))) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) right: (parenthesized_expression (comma_expression left: (assignment_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator declarator: (abstract_pointer_declarator))) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal)))))) right: (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (number_literal))))))) consequence: (compound_statement (labeled_statement label: (statement_identifier) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier)))))) alternative: (else_clause (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (compound_statement (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator declarator: (abstract_pointer_declarator))) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (identifier))) (goto_statement label: (statement_identifier)))) (do_statement body: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (pointer_expression argument: (identifier))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (number_literal)))) consequence: (goto_statement label: (statement_identifier)))) condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier)))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (identifier))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (return_statement (number_literal))))) condition: (parenthesized_expression (true))))))

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

undefined4 MASKED(void)

{
  uint uVar1;
  undefined4 uVar2;
  int iVar3;
  undefined4 uVar4;
  undefined4 *puVar5;
  undefined4 *puVar6;
  undefined4 *puVar7;
  int iVar8;
  int local_30;
  int local_2c;
  
  iVar8 = 0;
  local_2c = 0;
  local_30 = 0;
  do {
    if (rl_undo_list == (undefined4 *)0x0) {
      return 0;
    }
    uVar1 = rl_undo_list[4];
    _rl_doing_an_undo = 1;
    rl_readline_state = rl_readline_state | 0x10000;
    if (uVar1 < 2) {
      local_30 = rl_undo_list[1];
      if (local_30 == -1) {
        local_30 = rl_point;
      }
      else if (local_30 == -2) {
        local_30 = rl_end;
      }
      local_2c = rl_undo_list[2];
      if (local_2c == -1) {
        local_2c = rl_point;
        goto LAB_000fea70;
      }
      if (local_2c != -2) goto LAB_000fea70;
      local_2c = rl_end;
      if (uVar1 != 1) goto LAB_000fea79;
LAB_000feba0:
      rl_delete_text(local_30,local_2c);
      rl_point = local_30;
      puVar7 = rl_undo_list;
    }
    else {
LAB_000fea70:
      if (uVar1 == 1) goto LAB_000feba0;
LAB_000fea79:
      if (uVar1 == 0) {
        rl_point = local_30;
        rl_insert_text(rl_undo_list[3]);
        xfree(rl_undo_list[3]);
        puVar7 = rl_undo_list;
      }
      else {
        puVar7 = rl_undo_list;
        if (uVar1 == 2) {
          if (iVar8 == 0) {
            rl_ding();
            puVar7 = rl_undo_list;
          }
          else {
            iVar8 = iVar8 + -1;
          }
        }
        else {
          iVar8 = iVar8 + (uint)(uVar1 == 3);
        }
      }
    }
    _rl_doing_an_undo = 0;
    rl_readline_state = rl_readline_state & 0xfffeffff;
    rl_undo_list = (undefined4 *)*puVar7;
    *puVar7 = 0;
    iVar3 = current_history();
    puVar5 = rl_undo_list;
    uVar2 = rl_line_buffer;
    if (((iVar3 != 0) && (*(undefined4 **)(iVar3 + 8) == puVar7)) &&
       (*(undefined4 **)(iVar3 + 8) != (undefined4 *)0x0)) {
      uVar4 = where_history();
      puVar5 = (undefined4 *)replace_history_entry(uVar4,uVar2,puVar5);
      xfree(*puVar5);
      if ((void *)puVar5[1] != (void *)0x0) {
        free((void *)puVar5[1]);
      }
      xfree(puVar5);
    }
    _hs_replace_history_data(0xffffffff,puVar7,rl_undo_list);
    if ((_rl_saved_line_for_history == 0) ||
       (puVar5 = *(undefined4 **)(_rl_saved_line_for_history + 8), puVar5 == (undefined4 *)0x0)) {
LAB_000feb0a:
      xfree(puVar7);
    }
    else {
      if (puVar5 == puVar7) {
        *(undefined4 **)(_rl_saved_line_for_history + 8) = rl_undo_list;
        goto LAB_000feb0a;
      }
      do {
        puVar6 = puVar5;
        puVar5 = (undefined4 *)*puVar6;
        if (puVar5 == (undefined4 *)0x0) goto LAB_000feb0a;
      } while (puVar5 != puVar7);
      *puVar6 = rl_undo_list;
      xfree(puVar7);
    }
    if (iVar8 == 0) {
      return 1;
    }
  } while( true );
}

