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

int __regparm3 rl_search_history(int direction,int invoking_key)

{
  HIST_ENTRY **ppHVar1;
  HIST_ENTRY *pHVar2;
  _rl_search_cxt *cxt;
  HIST_ENTRY **ppHVar3;
  char **ppcVar4;
  char *pcVar5;
  size_t sVar6;
  int iVar7;
  char **ppcVar8;
  int where;
  int iVar9;
  size_t bytes;
  int local_2c;
  int local_28;
  
  rl_readline_state = rl_readline_state | 0x80;
  cxt = _rl_scxt_alloc(1,0);
  if (direction < 0) {
    cxt->sflags = cxt->sflags | 1;
  }
  pcVar5 = _rl_isearch_terminators;
  if (_rl_isearch_terminators == (char *)0x0) {
    pcVar5 = "\x1b\n";
  }
  cxt->search_terminators = pcVar5;
  ppHVar3 = history_list();
  rl_maybe_replace_line();
  if ((ppHVar3 == (HIST_ENTRY **)0x0) || (*ppHVar3 == (HIST_ENTRY *)0x0)) {
    bytes = 4;
    iVar7 = 0;
  }
  else {
    iVar7 = 0;
    do {
      iVar9 = iVar7;
      iVar7 = iVar9 + 1;
    } while (ppHVar3[iVar7] != (HIST_ENTRY *)0x0);
    bytes = iVar9 * 4 + 8;
  }
  cxt->hlen = iVar7;
  ppcVar4 = (char **)xmalloc(bytes);
  local_2c = cxt->hlen;
  cxt->lines = ppcVar4;
  if (local_2c < 1) {
    local_28 = 0;
  }
  else {
    local_28 = local_2c * 4;
    ppHVar1 = ppHVar3 + local_2c;
    ppcVar8 = ppcVar4;
    do {
      pHVar2 = *ppHVar3;
      ppHVar3 = ppHVar3 + 1;
      *ppcVar8 = pHVar2->line;
      ppcVar8 = ppcVar8 + 1;
    } while (ppHVar1 != ppHVar3);
  }
  if (_rl_saved_line_for_history == (HIST_ENTRY *)0x0) {
    sVar6 = strlen(rl_line_buffer);
    pcVar5 = (char *)xmalloc(sVar6 + 1);
    cxt->allocated_line = pcVar5;
    strcpy(pcVar5,rl_line_buffer);
    *(char **)((int)cxt->lines + local_28) = cxt->allocated_line;
    local_2c = cxt->hlen;
  }
  else {
    *(char **)((int)ppcVar4 + local_28) = _rl_saved_line_for_history->line;
  }
  cxt->hlen = local_2c + 1;
  cxt->history_pos = cxt->save_line;
  rl_save_prompt();
  cxt->search_string_size = 0x80;
  pcVar5 = (char *)xmalloc(0x80);
  cxt->search_string_index = 0;
  cxt->search_string = pcVar5;
  *pcVar5 = '\0';
  cxt->direction = direction >> 0x1f | 1;
  pcVar5 = rl_line_buffer;
  cxt->sline = rl_line_buffer;
  sVar6 = strlen(pcVar5);
  _rl_iscxt = cxt;
  cxt->sline_len = sVar6;
  cxt->sline_index = rl_point;
  rl_display_search(cxt->search_string,cxt->sflags,where);
  iVar7 = 0;
  if ((rl_readline_state & 0x80000) == 0) {
    do {
      _rl_search_getchar(cxt);
      iVar7 = _rl_isearch_dispatch(cxt,cxt->lastc);
    } while (0 < iVar7);
    iVar7 = _rl_isearch_cleanup(cxt,iVar7);
  }
  return iVar7;
}



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

undefined4 __regparm3 FUN_000d64e0(int param_1)

{
  int *piVar1;
  undefined4 *puVar2;
  int iVar3;
  undefined *puVar4;
  int *piVar5;
  undefined4 *puVar6;
  undefined1 *puVar7;
  size_t sVar8;
  undefined4 uVar9;
  int iVar10;
  char *pcVar11;
  undefined4 *puVar12;
  int iVar13;
  int local_2c;
  int local_28;
  
  rl_readline_state = rl_readline_state | 0x80;
  iVar3 = _rl_scxt_alloc(1,0);
  if (param_1 < 0) {
    *(uint *)(iVar3 + 4) = *(uint *)(iVar3 + 4) | 1;
  }
  puVar4 = _rl_isearch_terminators;
  if (_rl_isearch_terminators == (undefined *)0x0) {
    puVar4 = &DAT_00106480;
  }
  *(undefined **)(iVar3 + 0x80) = puVar4;
  piVar5 = (int *)history_list();
  rl_maybe_replace_line();
  if ((piVar5 == (int *)0x0) || (*piVar5 == 0)) {
    iVar13 = 4;
    iVar10 = 0;
  }
  else {
    iVar10 = 0;
    do {
      iVar13 = iVar10;
      iVar10 = iVar13 + 1;
    } while (piVar5[iVar10] != 0);
    iVar13 = iVar13 * 4 + 8;
  }
  *(int *)(iVar3 + 0x1c) = iVar10;
  puVar6 = (undefined4 *)xmalloc(iVar13);
  local_2c = *(int *)(iVar3 + 0x1c);
  *(undefined4 **)(iVar3 + 0x14) = puVar6;
  if (local_2c < 1) {
    local_28 = 0;
  }
  else {
    local_28 = local_2c * 4;
    piVar1 = piVar5 + local_2c;
    puVar12 = puVar6;
    do {
      puVar2 = (undefined4 *)*piVar5;
      piVar5 = piVar5 + 1;
      *puVar12 = *puVar2;
      puVar12 = puVar12 + 1;
    } while (piVar1 != piVar5);
  }
  if (_rl_saved_line_for_history == (undefined4 *)0x0) {
    sVar8 = strlen(rl_line_buffer);
    pcVar11 = (char *)xmalloc(sVar8 + 1);
    *(char **)(iVar3 + 0x18) = pcVar11;
    strcpy(pcVar11,rl_line_buffer);
    *(undefined4 *)(*(int *)(iVar3 + 0x14) + local_28) = *(undefined4 *)(iVar3 + 0x18);
    local_2c = *(int *)(iVar3 + 0x1c);
  }
  else {
    *(undefined4 *)((int)puVar6 + local_28) = *_rl_saved_line_for_history;
  }
  *(int *)(iVar3 + 0x1c) = local_2c + 1;
  *(undefined4 *)(iVar3 + 0x44) = *(undefined4 *)(iVar3 + 0x2c);
  rl_save_prompt();
  *(undefined4 *)(iVar3 + 0x10) = 0x80;
  puVar7 = (undefined1 *)xmalloc(0x80);
  *(undefined4 *)(iVar3 + 0xc) = 0;
  *(undefined1 **)(iVar3 + 8) = puVar7;
  *puVar7 = 0;
  *(uint *)(iVar3 + 0x48) = param_1 >> 0x1f | 1;
  pcVar11 = rl_line_buffer;
  *(char **)(iVar3 + 0x74) = rl_line_buffer;
  sVar8 = strlen(pcVar11);
  _rl_iscxt = iVar3;
  *(size_t *)(iVar3 + 0x78) = sVar8;
  *(undefined4 *)(iVar3 + 0x7c) = rl_point;
  FUN_000d5450();
  uVar9 = 0;
  if ((rl_readline_state & 0x80000) == 0) {
    do {
      _rl_search_getchar(iVar3);
      iVar10 = _rl_isearch_dispatch(iVar3,*(undefined4 *)(iVar3 + 0x50));
    } while (0 < iVar10);
    uVar9 = _rl_isearch_cleanup(iVar3,iVar10);
  }
  return uVar9;
}


PUSH EBP
PUSH EDI
MOV EDI,EAX
PUSH ESI
PUSH EBX
CALL 0x00031ed0
ADD EBX,0x73b15
SUB ESP,0x24
MOV dword ptr [ESP + 0x10],EAX
LEA ECX,[EBX + 0x7b44]
MOV dword ptr [ESP + 0x14],ECX
OR dword ptr [ECX],0x80
PUSH 0x0
PUSH 0x1
CALL 0x000d5580
ADD ESP,0x10
MOV ESI,EAX
TEST EDI,EDI
JNS 0x000d651e
OR dword ptr [EAX + 0x4],0x1
MOV EAX,dword ptr [EBX + 0x7eb4]
LEA EDX,[EBX + 0xfffbc480]
TEST EAX,EAX
CMOVZ EAX,EDX
MOV dword ptr [ESI + 0x80],EAX
CALL 0x000e5590
MOV EDI,EAX
CALL 0x000e4cf0
TEST EDI,EDI
JZ 0x000d66a0
MOV EBP,dword ptr [EDI]
TEST EBP,EBP
JZ 0x000d66a0
XOR EDX,EDX
JMP 0x000d6562
MOV EDX,EAX
LEA EAX,[EDX + 0x1]
MOV ECX,dword ptr [EDI + EAX*0x4]
TEST ECX,ECX
JNZ 0x000d6560
LEA EDX,[EDX*0x4 + 0x8]
SUB ESP,0xc
MOV dword ptr [ESI + 0x1c],EAX
PUSH EDX
CALL 0x00099200
MOV EBP,dword ptr [ESI + 0x1c]
MOV dword ptr [ESI + 0x14],EAX
MOV dword ptr [ESP + 0x10],EBP
ADD ESP,0x10
TEST EBP,EBP
JLE 0x000d66f8
MOV EDX,EDI
LEA EDI,[EBP*0x4 + 0x0]
MOV ECX,EAX
MOV dword ptr [ESP + 0x4],EDI
LEA EBP,[EDX + EDI*0x1]
LEA ESI,[ESI]
LEA ESI,[ESI]
MOV EDI,dword ptr [EDX]
ADD EDX,0x4
ADD ECX,0x4
MOV EDI,dword ptr [EDI]
MOV dword ptr [ECX + -0x4],EDI
CMP EBP,EDX
JNZ 0x000d65b0
LEA EDX,[EBX + 0x8adc]
MOV EDX,dword ptr [EDX]
TEST EDX,EDX
JZ 0x000d66b0
MOV EDX,dword ptr [EDX]
MOV ECX,dword ptr [ESP + 0x4]
LEA EDI,[EBX + 0x7afc]
MOV dword ptr [EAX + ECX*0x1],EDX
MOV EAX,dword ptr [ESP]
ADD EAX,0x1
MOV dword ptr [ESI + 0x1c],EAX
MOV EAX,dword ptr [ESI + 0x2c]
MOV dword ptr [ESI + 0x44],EAX
CALL 0x000d7ef0
SUB ESP,0xc
MOV dword ptr [ESI + 0x10],0x80
PUSH 0x80
CALL 0x00099200
MOV dword ptr [ESI + 0xc],0x0
MOV dword ptr [ESI + 0x8],EAX
MOV byte ptr [EAX],0x0
MOV EAX,dword ptr [ESP + 0x18]
SAR EAX,0x1f
OR EAX,0x1
MOV dword ptr [ESI + 0x48],EAX
MOV EAX,dword ptr [EDI]
MOV dword ptr [ESI + 0x74],EAX
MOV dword ptr [ESP],EAX
CALL 0x0002f760
MOV EDX,dword ptr [ESI + 0x4]
ADD ESP,0x10
MOV dword ptr [EBX + 0x7eb0],ESI
MOV dword ptr [ESI + 0x78],EAX
LEA EAX,[EBX + 0xd988]
MOV EAX,dword ptr [EAX]
MOV dword ptr [ESI + 0x7c],EAX
MOV EAX,dword ptr [ESI + 0x8]
CALL 0x000d5450
MOV EAX,dword ptr [ESP + 0xc]
MOV EDX,dword ptr [EAX]
XOR EAX,EAX
AND EDX,0x80000
JNZ 0x000d6690
LEA ESI,[ESI]
SUB ESP,0xc
PUSH ESI
CALL 0x000d56c0
POP EAX
POP EDX
PUSH dword ptr [ESI + 0x50]
PUSH ESI
CALL 0x000d5760
ADD ESP,0x10
TEST EAX,EAX
JG 0x000d6668
SUB ESP,0x8
PUSH EAX
PUSH ESI
CALL 0x000d63b0
ADD ESP,0x10
ADD ESP,0x1c
POP EBX
POP ESI
POP EDI
POP EBP
RET
MOV EDX,0x4
XOR EAX,EAX
JMP 0x000d6573
LEA EDI,[EBX + 0x7afc]
SUB ESP,0xc
PUSH dword ptr [EDI]
CALL 0x0002f760
ADD EAX,0x1
MOV dword ptr [ESP],EAX
CALL 0x00099200
MOV dword ptr [ESI + 0x18],EAX
POP ECX
POP EBP
PUSH dword ptr [EDI]
PUSH EAX
CALL 0x0002f580
MOV EAX,dword ptr [ESI + 0x14]
MOV ECX,dword ptr [ESP + 0x14]
MOV EDX,dword ptr [ESI + 0x18]
MOV dword ptr [EAX + ECX*0x1],EDX
MOV EAX,dword ptr [ESI + 0x1c]
MOV dword ptr [ESP + 0x10],EAX
ADD ESP,0x10
JMP 0x000d65e0
MOV dword ptr [ESP + 0x4],0x0
JMP 0x000d65c1
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nundefined4 __regparm3 FUN_000d64e0(int param_1)\n\n{\n  int *piVar1;\n  undefined4 *puVar2;\n  int iVar3;\n  undefined *puVar4;\n  int *piVar5;\n  undefined4 *puVar6;\n  undefined1 *puVar7;\n  size_t sVar8;\n  undefined4 uVar9;\n  int iVar10;\n  char *pcVar11;\n  undefined4 *puVar12;\n  int iVar13;\n  int local_2c;\n  int local_28;\n  \n  rl_readline_state = rl_readline_state | 0x80;\n  iVar3 = _rl_scxt_alloc(1,0);\n  if (param_1 < 0) {\n    *(uint *)(iVar3 + 4) = *(uint *)(iVar3 + 4) | 1;\n  }\n  puVar4 = _rl_isearch_terminators;\n  if (_rl_isearch_terminators == (undefined *)0x0) {\n    puVar4 = &DAT_00106480;\n  }\n  *(undefined **)(iVar3 + 0x80) = puVar4;\n  piVar5 = (int *)history_list();\n  rl_maybe_replace_line();\n  if ((piVar5 == (int *)0x0) || (*piVar5 == 0)) {\n    iVar13 = 4;\n    iVar10 = 0;\n  }\n  else {\n    iVar10 = 0;\n    do {\n      iVar13 = iVar10;\n      iVar10 = iVar13 + 1;\n    } while (piVar5[iVar10] != 0);\n    iVar13 = iVar13 * 4 + 8;\n  }\n  *(int *)(iVar3 + 0x1c) = iVar10;\n  puVar6 = (undefined4 *)xmalloc(iVar13);\n  local_2c = *(int *)(iVar3 + 0x1c);\n  *(undefined4 **)(iVar3 + 0x14) = puVar6;\n  if (local_2c < 1) {\n    local_28 = 0;\n  }\n  else {\n    local_28 = local_2c * 4;\n    piVar1 = piVar5 + local_2c;\n    puVar12 = puVar6;\n    do {\n      puVar2 = (undefined4 *)*piVar5;\n      piVar5 = piVar5 + 1;\n      *puVar12 = *puVar2;\n      puVar12 = puVar12 + 1;\n    } while (piVar1 != piVar5);\n  }\n  if (_rl_saved_line_for_history == (undefined4 *)0x0) {\n    sVar8 = strlen(rl_line_buffer);\n    pcVar11 = (char *)xmalloc(sVar8 + 1);\n    *(char **)(iVar3 + 0x18) = pcVar11;\n    strcpy(pcVar11,rl_line_buffer);\n    *(undefined4 *)(*(int *)(iVar3 + 0x14) + local_28) = *(undefined4 *)(iVar3 + 0x18);\n    local_2c = *(int *)(iVar3 + 0x1c);\n  }\n  else {\n    *(undefined4 *)((int)puVar6 + local_28) = *_rl_saved_line_for_history;\n  }\n  *(int *)(iVar3 + 0x1c) = local_2c + 1;\n  *(undefined4 *)(iVar3 + 0x44) = *(undefined4 *)(iVar3 + 0x2c);\n  rl_save_prompt();\n  *(undefined4 *)(iVar3 + 0x10) = 0x80;\n  puVar7 = (undefined1 *)xmalloc(0x80);\n  *(undefined4 *)(iVar3 + 0xc) = 0;\n  *(undefined1 **)(iVar3 + 8) = puVar7;\n  *puVar7 = 0;\n  *(uint *)(iVar3 + 0x48) = param_1 >> 0x1f | 1;\n  pcVar11 = rl_line_buffer;\n  *(char **)(iVar3 + 0x74) = rl_line_buffer;\n  sVar8 = strlen(pcVar11);\n  _rl_iscxt = iVar3;\n  *(size_t *)(iVar3 + 0x78) = sVar8;\n  *(undefined4 *)(iVar3 + 0x7c) = rl_point;\n  FUN_000d5450();\n  uVar9 = 0;\n  if ((rl_readline_state & 0x80000) == 0) {\n    do {\n      _rl_search_getchar(iVar3);\n      iVar10 = _rl_isearch_dispatch(iVar3,*(undefined4 *)(iVar3 + 0x50));\n    } while (0 < iVar10);\n    uVar9 = _rl_isearch_cleanup(iVar3,iVar10);\n  }\n  return uVar9;\n}\n\n" comment (function_definition "undefined4 __regparm3 FUN_000d64e0(int param_1)\n\n{\n  int *piVar1;\n  undefined4 *puVar2;\n  int iVar3;\n  undefined *puVar4;\n  int *piVar5;\n  undefined4 *puVar6;\n  undefined1 *puVar7;\n  size_t sVar8;\n  undefined4 uVar9;\n  int iVar10;\n  char *pcVar11;\n  undefined4 *puVar12;\n  int iVar13;\n  int local_2c;\n  int local_28;\n  \n  rl_readline_state = rl_readline_state | 0x80;\n  iVar3 = _rl_scxt_alloc(1,0);\n  if (param_1 < 0) {\n    *(uint *)(iVar3 + 4) = *(uint *)(iVar3 + 4) | 1;\n  }\n  puVar4 = _rl_isearch_terminators;\n  if (_rl_isearch_terminators == (undefined *)0x0) {\n    puVar4 = &DAT_00106480;\n  }\n  *(undefined **)(iVar3 + 0x80) = puVar4;\n  piVar5 = (int *)history_list();\n  rl_maybe_replace_line();\n  if ((piVar5 == (int *)0x0) || (*piVar5 == 0)) {\n    iVar13 = 4;\n    iVar10 = 0;\n  }\n  else {\n    iVar10 = 0;\n    do {\n      iVar13 = iVar10;\n      iVar10 = iVar13 + 1;\n    } while (piVar5[iVar10] != 0);\n    iVar13 = iVar13 * 4 + 8;\n  }\n  *(int *)(iVar3 + 0x1c) = iVar10;\n  puVar6 = (undefined4 *)xmalloc(iVar13);\n  local_2c = *(int *)(iVar3 + 0x1c);\n  *(undefined4 **)(iVar3 + 0x14) = puVar6;\n  if (local_2c < 1) {\n    local_28 = 0;\n  }\n  else {\n    local_28 = local_2c * 4;\n    piVar1 = piVar5 + local_2c;\n    puVar12 = puVar6;\n    do {\n      puVar2 = (undefined4 *)*piVar5;\n      piVar5 = piVar5 + 1;\n      *puVar12 = *puVar2;\n      puVar12 = puVar12 + 1;\n    } while (piVar1 != piVar5);\n  }\n  if (_rl_saved_line_for_history == (undefined4 *)0x0) {\n    sVar8 = strlen(rl_line_buffer);\n    pcVar11 = (char *)xmalloc(sVar8 + 1);\n    *(char **)(iVar3 + 0x18) = pcVar11;\n    strcpy(pcVar11,rl_line_buffer);\n    *(undefined4 *)(*(int *)(iVar3 + 0x14) + local_28) = *(undefined4 *)(iVar3 + 0x18);\n    local_2c = *(int *)(iVar3 + 0x1c);\n  }\n  else {\n    *(undefined4 *)((int)puVar6 + local_28) = *_rl_saved_line_for_history;\n  }\n  *(int *)(iVar3 + 0x1c) = local_2c + 1;\n  *(undefined4 *)(iVar3 + 0x44) = *(undefined4 *)(iVar3 + 0x2c);\n  rl_save_prompt();\n  *(undefined4 *)(iVar3 + 0x10) = 0x80;\n  puVar7 = (undefined1 *)xmalloc(0x80);\n  *(undefined4 *)(iVar3 + 0xc) = 0;\n  *(undefined1 **)(iVar3 + 8) = puVar7;\n  *puVar7 = 0;\n  *(uint *)(iVar3 + 0x48) = param_1 >> 0x1f | 1;\n  pcVar11 = rl_line_buffer;\n  *(char **)(iVar3 + 0x74) = rl_line_buffer;\n  sVar8 = strlen(pcVar11);\n  _rl_iscxt = iVar3;\n  *(size_t *)(iVar3 + 0x78) = sVar8;\n  *(undefined4 *)(iVar3 + 0x7c) = rl_point;\n  FUN_000d5450();\n  uVar9 = 0;\n  if ((rl_readline_state & 0x80000) == 0) {\n    do {\n      _rl_search_getchar(iVar3);\n      iVar10 = _rl_isearch_dispatch(iVar3,*(undefined4 *)(iVar3 + 0x50));\n    } while (0 < iVar10);\n    uVar9 = _rl_isearch_cleanup(iVar3,iVar10);\n  }\n  return uVar9;\n}" type_identifier (ERROR "__regparm3" identifier) (function_declarator "FUN_000d64e0(int param_1)" identifier (parameter_list "(int param_1)" ( (parameter_declaration "int param_1" primitive_type identifier) ))) (compound_statement "{\n  int *piVar1;\n  undefined4 *puVar2;\n  int iVar3;\n  undefined *puVar4;\n  int *piVar5;\n  undefined4 *puVar6;\n  undefined1 *puVar7;\n  size_t sVar8;\n  undefined4 uVar9;\n  int iVar10;\n  char *pcVar11;\n  undefined4 *puVar12;\n  int iVar13;\n  int local_2c;\n  int local_28;\n  \n  rl_readline_state = rl_readline_state | 0x80;\n  iVar3 = _rl_scxt_alloc(1,0);\n  if (param_1 < 0) {\n    *(uint *)(iVar3 + 4) = *(uint *)(iVar3 + 4) | 1;\n  }\n  puVar4 = _rl_isearch_terminators;\n  if (_rl_isearch_terminators == (undefined *)0x0) {\n    puVar4 = &DAT_00106480;\n  }\n  *(undefined **)(iVar3 + 0x80) = puVar4;\n  piVar5 = (int *)history_list();\n  rl_maybe_replace_line();\n  if ((piVar5 == (int *)0x0) || (*piVar5 == 0)) {\n    iVar13 = 4;\n    iVar10 = 0;\n  }\n  else {\n    iVar10 = 0;\n    do {\n      iVar13 = iVar10;\n      iVar10 = iVar13 + 1;\n    } while (piVar5[iVar10] != 0);\n    iVar13 = iVar13 * 4 + 8;\n  }\n  *(int *)(iVar3 + 0x1c) = iVar10;\n  puVar6 = (undefined4 *)xmalloc(iVar13);\n  local_2c = *(int *)(iVar3 + 0x1c);\n  *(undefined4 **)(iVar3 + 0x14) = puVar6;\n  if (local_2c < 1) {\n    local_28 = 0;\n  }\n  else {\n    local_28 = local_2c * 4;\n    piVar1 = piVar5 + local_2c;\n    puVar12 = puVar6;\n    do {\n      puVar2 = (undefined4 *)*piVar5;\n      piVar5 = piVar5 + 1;\n      *puVar12 = *puVar2;\n      puVar12 = puVar12 + 1;\n    } while (piVar1 != piVar5);\n  }\n  if (_rl_saved_line_for_history == (undefined4 *)0x0) {\n    sVar8 = strlen(rl_line_buffer);\n    pcVar11 = (char *)xmalloc(sVar8 + 1);\n    *(char **)(iVar3 + 0x18) = pcVar11;\n    strcpy(pcVar11,rl_line_buffer);\n    *(undefined4 *)(*(int *)(iVar3 + 0x14) + local_28) = *(undefined4 *)(iVar3 + 0x18);\n    local_2c = *(int *)(iVar3 + 0x1c);\n  }\n  else {\n    *(undefined4 *)((int)puVar6 + local_28) = *_rl_saved_line_for_history;\n  }\n  *(int *)(iVar3 + 0x1c) = local_2c + 1;\n  *(undefined4 *)(iVar3 + 0x44) = *(undefined4 *)(iVar3 + 0x2c);\n  rl_save_prompt();\n  *(undefined4 *)(iVar3 + 0x10) = 0x80;\n  puVar7 = (undefined1 *)xmalloc(0x80);\n  *(undefined4 *)(iVar3 + 0xc) = 0;\n  *(undefined1 **)(iVar3 + 8) = puVar7;\n  *puVar7 = 0;\n  *(uint *)(iVar3 + 0x48) = param_1 >> 0x1f | 1;\n  pcVar11 = rl_line_buffer;\n  *(char **)(iVar3 + 0x74) = rl_line_buffer;\n  sVar8 = strlen(pcVar11);\n  _rl_iscxt = iVar3;\n  *(size_t *)(iVar3 + 0x78) = sVar8;\n  *(undefined4 *)(iVar3 + 0x7c) = rl_point;\n  FUN_000d5450();\n  uVar9 = 0;\n  if ((rl_readline_state & 0x80000) == 0) {\n    do {\n      _rl_search_getchar(iVar3);\n      iVar10 = _rl_isearch_dispatch(iVar3,*(undefined4 *)(iVar3 + 0x50));\n    } while (0 < iVar10);\n    uVar9 = _rl_isearch_cleanup(iVar3,iVar10);\n  }\n  return uVar9;\n}" { (declaration "int *piVar1;" primitive_type (pointer_declarator "*piVar1" * identifier) ;) (declaration "undefined4 *puVar2;" type_identifier (pointer_declarator "*puVar2" * identifier) ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "undefined *puVar4;" type_identifier (pointer_declarator "*puVar4" * identifier) ;) (declaration "int *piVar5;" primitive_type (pointer_declarator "*piVar5" * identifier) ;) (declaration "undefined4 *puVar6;" type_identifier (pointer_declarator "*puVar6" * identifier) ;) (declaration "undefined1 *puVar7;" type_identifier (pointer_declarator "*puVar7" * identifier) ;) (declaration "size_t sVar8;" primitive_type identifier ;) (declaration "undefined4 uVar9;" type_identifier identifier ;) (declaration "int iVar10;" primitive_type identifier ;) (declaration "char *pcVar11;" primitive_type (pointer_declarator "*pcVar11" * identifier) ;) (declaration "undefined4 *puVar12;" type_identifier (pointer_declarator "*puVar12" * identifier) ;) (declaration "int iVar13;" primitive_type identifier ;) (declaration "int local_2c;" primitive_type identifier ;) (declaration "int local_28;" primitive_type identifier ;) (expression_statement "rl_readline_state = rl_readline_state | 0x80;" (assignment_expression "rl_readline_state = rl_readline_state | 0x80" identifier = (binary_expression "rl_readline_state | 0x80" identifier | number_literal)) ;) (expression_statement "iVar3 = _rl_scxt_alloc(1,0);" (assignment_expression "iVar3 = _rl_scxt_alloc(1,0)" identifier = (call_expression "_rl_scxt_alloc(1,0)" identifier (argument_list "(1,0)" ( number_literal , number_literal )))) ;) (if_statement "if (param_1 < 0) {\n    *(uint *)(iVar3 + 4) = *(uint *)(iVar3 + 4) | 1;\n  }" if (parenthesized_expression "(param_1 < 0)" ( (binary_expression "param_1 < 0" identifier < number_literal) )) (compound_statement "{\n    *(uint *)(iVar3 + 4) = *(uint *)(iVar3 + 4) | 1;\n  }" { (expression_statement "*(uint *)(iVar3 + 4) = *(uint *)(iVar3 + 4) | 1;" (assignment_expression "*(uint *)(iVar3 + 4) = *(uint *)(iVar3 + 4) | 1" (pointer_expression "*(uint *)(iVar3 + 4)" * (cast_expression "(uint *)(iVar3 + 4)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + 4)" ( (binary_expression "iVar3 + 4" identifier + number_literal) )))) = (binary_expression "*(uint *)(iVar3 + 4) | 1" (pointer_expression "*(uint *)(iVar3 + 4)" * (cast_expression "(uint *)(iVar3 + 4)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + 4)" ( (binary_expression "iVar3 + 4" identifier + number_literal) )))) | number_literal)) ;) })) (expression_statement "puVar4 = _rl_isearch_terminators;" (assignment_expression "puVar4 = _rl_isearch_terminators" identifier = identifier) ;) (if_statement "if (_rl_isearch_terminators == (undefined *)0x0) {\n    puVar4 = &DAT_00106480;\n  }" if (parenthesized_expression "(_rl_isearch_terminators == (undefined *)0x0)" ( (binary_expression "_rl_isearch_terminators == (undefined *)0x0" identifier == (cast_expression "(undefined *)0x0" ( (type_descriptor "undefined *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    puVar4 = &DAT_00106480;\n  }" { (expression_statement "puVar4 = &DAT_00106480;" (assignment_expression "puVar4 = &DAT_00106480" identifier = (pointer_expression "&DAT_00106480" & identifier)) ;) })) (expression_statement "*(undefined **)(iVar3 + 0x80) = puVar4;" (assignment_expression "*(undefined **)(iVar3 + 0x80) = puVar4" (pointer_expression "*(undefined **)(iVar3 + 0x80)" * (cast_expression "(undefined **)(iVar3 + 0x80)" ( (type_descriptor "undefined **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(iVar3 + 0x80)" ( (binary_expression "iVar3 + 0x80" identifier + number_literal) )))) = identifier) ;) (expression_statement "piVar5 = (int *)history_list();" (assignment_expression "piVar5 = (int *)history_list()" identifier = (cast_expression "(int *)history_list()" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "history_list()" identifier (argument_list "()" ( ))))) ;) (expression_statement "rl_maybe_replace_line();" (call_expression "rl_maybe_replace_line()" identifier (argument_list "()" ( ))) ;) (if_statement "if ((piVar5 == (int *)0x0) || (*piVar5 == 0)) {\n    iVar13 = 4;\n    iVar10 = 0;\n  }\n  else {\n    iVar10 = 0;\n    do {\n      iVar13 = iVar10;\n      iVar10 = iVar13 + 1;\n    } while (piVar5[iVar10] != 0);\n    iVar13 = iVar13 * 4 + 8;\n  }" if (parenthesized_expression "((piVar5 == (int *)0x0) || (*piVar5 == 0))" ( (binary_expression "(piVar5 == (int *)0x0) || (*piVar5 == 0)" (parenthesized_expression "(piVar5 == (int *)0x0)" ( (binary_expression "piVar5 == (int *)0x0" identifier == (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) || (parenthesized_expression "(*piVar5 == 0)" ( (binary_expression "*piVar5 == 0" (pointer_expression "*piVar5" * identifier) == number_literal) ))) )) (compound_statement "{\n    iVar13 = 4;\n    iVar10 = 0;\n  }" { (expression_statement "iVar13 = 4;" (assignment_expression "iVar13 = 4" identifier = number_literal) ;) (expression_statement "iVar10 = 0;" (assignment_expression "iVar10 = 0" identifier = number_literal) ;) }) (else_clause "else {\n    iVar10 = 0;\n    do {\n      iVar13 = iVar10;\n      iVar10 = iVar13 + 1;\n    } while (piVar5[iVar10] != 0);\n    iVar13 = iVar13 * 4 + 8;\n  }" else (compound_statement "{\n    iVar10 = 0;\n    do {\n      iVar13 = iVar10;\n      iVar10 = iVar13 + 1;\n    } while (piVar5[iVar10] != 0);\n    iVar13 = iVar13 * 4 + 8;\n  }" { (expression_statement "iVar10 = 0;" (assignment_expression "iVar10 = 0" identifier = number_literal) ;) (do_statement "do {\n      iVar13 = iVar10;\n      iVar10 = iVar13 + 1;\n    } while (piVar5[iVar10] != 0);" do (compound_statement "{\n      iVar13 = iVar10;\n      iVar10 = iVar13 + 1;\n    }" { (expression_statement "iVar13 = iVar10;" (assignment_expression "iVar13 = iVar10" identifier = identifier) ;) (expression_statement "iVar10 = iVar13 + 1;" (assignment_expression "iVar10 = iVar13 + 1" identifier = (binary_expression "iVar13 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(piVar5[iVar10] != 0)" ( (binary_expression "piVar5[iVar10] != 0" (subscript_expression "piVar5[iVar10]" identifier [ identifier ]) != number_literal) )) ;) (expression_statement "iVar13 = iVar13 * 4 + 8;" (assignment_expression "iVar13 = iVar13 * 4 + 8" identifier = (binary_expression "iVar13 * 4 + 8" (binary_expression "iVar13 * 4" identifier * number_literal) + number_literal)) ;) }))) (expression_statement "*(int *)(iVar3 + 0x1c) = iVar10;" (assignment_expression "*(int *)(iVar3 + 0x1c) = iVar10" (pointer_expression "*(int *)(iVar3 + 0x1c)" * (cast_expression "(int *)(iVar3 + 0x1c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + 0x1c)" ( (binary_expression "iVar3 + 0x1c" identifier + number_literal) )))) = identifier) ;) (expression_statement "puVar6 = (undefined4 *)xmalloc(iVar13);" (assignment_expression "puVar6 = (undefined4 *)xmalloc(iVar13)" identifier = (cast_expression "(undefined4 *)xmalloc(iVar13)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "xmalloc(iVar13)" identifier (argument_list "(iVar13)" ( identifier ))))) ;) (expression_statement "local_2c = *(int *)(iVar3 + 0x1c);" (assignment_expression "local_2c = *(int *)(iVar3 + 0x1c)" identifier = (pointer_expression "*(int *)(iVar3 + 0x1c)" * (cast_expression "(int *)(iVar3 + 0x1c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + 0x1c)" ( (binary_expression "iVar3 + 0x1c" identifier + number_literal) ))))) ;) (expression_statement "*(undefined4 **)(iVar3 + 0x14) = puVar6;" (assignment_expression "*(undefined4 **)(iVar3 + 0x14) = puVar6" (pointer_expression "*(undefined4 **)(iVar3 + 0x14)" * (cast_expression "(undefined4 **)(iVar3 + 0x14)" ( (type_descriptor "undefined4 **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(iVar3 + 0x14)" ( (binary_expression "iVar3 + 0x14" identifier + number_literal) )))) = identifier) ;) (if_statement "if (local_2c < 1) {\n    local_28 = 0;\n  }\n  else {\n    local_28 = local_2c * 4;\n    piVar1 = piVar5 + local_2c;\n    puVar12 = puVar6;\n    do {\n      puVar2 = (undefined4 *)*piVar5;\n      piVar5 = piVar5 + 1;\n      *puVar12 = *puVar2;\n      puVar12 = puVar12 + 1;\n    } while (piVar1 != piVar5);\n  }" if (parenthesized_expression "(local_2c < 1)" ( (binary_expression "local_2c < 1" identifier < number_literal) )) (compound_statement "{\n    local_28 = 0;\n  }" { (expression_statement "local_28 = 0;" (assignment_expression "local_28 = 0" identifier = number_literal) ;) }) (else_clause "else {\n    local_28 = local_2c * 4;\n    piVar1 = piVar5 + local_2c;\n    puVar12 = puVar6;\n    do {\n      puVar2 = (undefined4 *)*piVar5;\n      piVar5 = piVar5 + 1;\n      *puVar12 = *puVar2;\n      puVar12 = puVar12 + 1;\n    } while (piVar1 != piVar5);\n  }" else (compound_statement "{\n    local_28 = local_2c * 4;\n    piVar1 = piVar5 + local_2c;\n    puVar12 = puVar6;\n    do {\n      puVar2 = (undefined4 *)*piVar5;\n      piVar5 = piVar5 + 1;\n      *puVar12 = *puVar2;\n      puVar12 = puVar12 + 1;\n    } while (piVar1 != piVar5);\n  }" { (expression_statement "local_28 = local_2c * 4;" (assignment_expression "local_28 = local_2c * 4" identifier = (binary_expression "local_2c * 4" identifier * number_literal)) ;) (expression_statement "piVar1 = piVar5 + local_2c;" (assignment_expression "piVar1 = piVar5 + local_2c" identifier = (binary_expression "piVar5 + local_2c" identifier + identifier)) ;) (expression_statement "puVar12 = puVar6;" (assignment_expression "puVar12 = puVar6" identifier = identifier) ;) (do_statement "do {\n      puVar2 = (undefined4 *)*piVar5;\n      piVar5 = piVar5 + 1;\n      *puVar12 = *puVar2;\n      puVar12 = puVar12 + 1;\n    } while (piVar1 != piVar5);" do (compound_statement "{\n      puVar2 = (undefined4 *)*piVar5;\n      piVar5 = piVar5 + 1;\n      *puVar12 = *puVar2;\n      puVar12 = puVar12 + 1;\n    }" { (expression_statement "puVar2 = (undefined4 *)*piVar5;" (assignment_expression "puVar2 = (undefined4 *)*piVar5" identifier = (cast_expression "(undefined4 *)*piVar5" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "*piVar5" * identifier))) ;) (expression_statement "piVar5 = piVar5 + 1;" (assignment_expression "piVar5 = piVar5 + 1" identifier = (binary_expression "piVar5 + 1" identifier + number_literal)) ;) (expression_statement "*puVar12 = *puVar2;" (assignment_expression "*puVar12 = *puVar2" (pointer_expression "*puVar12" * identifier) = (pointer_expression "*puVar2" * identifier)) ;) (expression_statement "puVar12 = puVar12 + 1;" (assignment_expression "puVar12 = puVar12 + 1" identifier = (binary_expression "puVar12 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(piVar1 != piVar5)" ( (binary_expression "piVar1 != piVar5" identifier != identifier) )) ;) }))) (if_statement "if (_rl_saved_line_for_history == (undefined4 *)0x0) {\n    sVar8 = strlen(rl_line_buffer);\n    pcVar11 = (char *)xmalloc(sVar8 + 1);\n    *(char **)(iVar3 + 0x18) = pcVar11;\n    strcpy(pcVar11,rl_line_buffer);\n    *(undefined4 *)(*(int *)(iVar3 + 0x14) + local_28) = *(undefined4 *)(iVar3 + 0x18);\n    local_2c = *(int *)(iVar3 + 0x1c);\n  }\n  else {\n    *(undefined4 *)((int)puVar6 + local_28) = *_rl_saved_line_for_history;\n  }" if (parenthesized_expression "(_rl_saved_line_for_history == (undefined4 *)0x0)" ( (binary_expression "_rl_saved_line_for_history == (undefined4 *)0x0" identifier == (cast_expression "(undefined4 *)0x0" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    sVar8 = strlen(rl_line_buffer);\n    pcVar11 = (char *)xmalloc(sVar8 + 1);\n    *(char **)(iVar3 + 0x18) = pcVar11;\n    strcpy(pcVar11,rl_line_buffer);\n    *(undefined4 *)(*(int *)(iVar3 + 0x14) + local_28) = *(undefined4 *)(iVar3 + 0x18);\n    local_2c = *(int *)(iVar3 + 0x1c);\n  }" { (expression_statement "sVar8 = strlen(rl_line_buffer);" (assignment_expression "sVar8 = strlen(rl_line_buffer)" identifier = (call_expression "strlen(rl_line_buffer)" identifier (argument_list "(rl_line_buffer)" ( identifier )))) ;) (expression_statement "pcVar11 = (char *)xmalloc(sVar8 + 1);" (assignment_expression "pcVar11 = (char *)xmalloc(sVar8 + 1)" identifier = (cast_expression "(char *)xmalloc(sVar8 + 1)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "xmalloc(sVar8 + 1)" identifier (argument_list "(sVar8 + 1)" ( (binary_expression "sVar8 + 1" identifier + number_literal) ))))) ;) (expression_statement "*(char **)(iVar3 + 0x18) = pcVar11;" (assignment_expression "*(char **)(iVar3 + 0x18) = pcVar11" (pointer_expression "*(char **)(iVar3 + 0x18)" * (cast_expression "(char **)(iVar3 + 0x18)" ( (type_descriptor "char **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(iVar3 + 0x18)" ( (binary_expression "iVar3 + 0x18" identifier + number_literal) )))) = identifier) ;) (expression_statement "strcpy(pcVar11,rl_line_buffer);" (call_expression "strcpy(pcVar11,rl_line_buffer)" identifier (argument_list "(pcVar11,rl_line_buffer)" ( identifier , identifier ))) ;) (expression_statement "*(undefined4 *)(*(int *)(iVar3 + 0x14) + local_28) = *(undefined4 *)(iVar3 + 0x18);" (assignment_expression "*(undefined4 *)(*(int *)(iVar3 + 0x14) + local_28) = *(undefined4 *)(iVar3 + 0x18)" (pointer_expression "*(undefined4 *)(*(int *)(iVar3 + 0x14) + local_28)" * (cast_expression "(undefined4 *)(*(int *)(iVar3 + 0x14) + local_28)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)(iVar3 + 0x14) + local_28)" ( (binary_expression "*(int *)(iVar3 + 0x14) + local_28" (pointer_expression "*(int *)(iVar3 + 0x14)" * (cast_expression "(int *)(iVar3 + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + 0x14)" ( (binary_expression "iVar3 + 0x14" identifier + number_literal) )))) + identifier) )))) = (pointer_expression "*(undefined4 *)(iVar3 + 0x18)" * (cast_expression "(undefined4 *)(iVar3 + 0x18)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + 0x18)" ( (binary_expression "iVar3 + 0x18" identifier + number_literal) ))))) ;) (expression_statement "local_2c = *(int *)(iVar3 + 0x1c);" (assignment_expression "local_2c = *(int *)(iVar3 + 0x1c)" identifier = (pointer_expression "*(int *)(iVar3 + 0x1c)" * (cast_expression "(int *)(iVar3 + 0x1c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + 0x1c)" ( (binary_expression "iVar3 + 0x1c" identifier + number_literal) ))))) ;) }) (else_clause "else {\n    *(undefined4 *)((int)puVar6 + local_28) = *_rl_saved_line_for_history;\n  }" else (compound_statement "{\n    *(undefined4 *)((int)puVar6 + local_28) = *_rl_saved_line_for_history;\n  }" { (expression_statement "*(undefined4 *)((int)puVar6 + local_28) = *_rl_saved_line_for_history;" (assignment_expression "*(undefined4 *)((int)puVar6 + local_28) = *_rl_saved_line_for_history" (pointer_expression "*(undefined4 *)((int)puVar6 + local_28)" * (cast_expression "(undefined4 *)((int)puVar6 + local_28)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)puVar6 + local_28)" ( (binary_expression "(int)puVar6 + local_28" (cast_expression "(int)puVar6" ( (type_descriptor "int" primitive_type) ) identifier) + identifier) )))) = (pointer_expression "*_rl_saved_line_for_history" * identifier)) ;) }))) (expression_statement "*(int *)(iVar3 + 0x1c) = local_2c + 1;" (assignment_expression "*(int *)(iVar3 + 0x1c) = local_2c + 1" (pointer_expression "*(int *)(iVar3 + 0x1c)" * (cast_expression "(int *)(iVar3 + 0x1c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + 0x1c)" ( (binary_expression "iVar3 + 0x1c" identifier + number_literal) )))) = (binary_expression "local_2c + 1" identifier + number_literal)) ;) (expression_statement "*(undefined4 *)(iVar3 + 0x44) = *(undefined4 *)(iVar3 + 0x2c);" (assignment_expression "*(undefined4 *)(iVar3 + 0x44) = *(undefined4 *)(iVar3 + 0x2c)" (pointer_expression "*(undefined4 *)(iVar3 + 0x44)" * (cast_expression "(undefined4 *)(iVar3 + 0x44)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + 0x44)" ( (binary_expression "iVar3 + 0x44" identifier + number_literal) )))) = (pointer_expression "*(undefined4 *)(iVar3 + 0x2c)" * (cast_expression "(undefined4 *)(iVar3 + 0x2c)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + 0x2c)" ( (binary_expression "iVar3 + 0x2c" identifier + number_literal) ))))) ;) (expression_statement "rl_save_prompt();" (call_expression "rl_save_prompt()" identifier (argument_list "()" ( ))) ;) (expression_statement "*(undefined4 *)(iVar3 + 0x10) = 0x80;" (assignment_expression "*(undefined4 *)(iVar3 + 0x10) = 0x80" (pointer_expression "*(undefined4 *)(iVar3 + 0x10)" * (cast_expression "(undefined4 *)(iVar3 + 0x10)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + 0x10)" ( (binary_expression "iVar3 + 0x10" identifier + number_literal) )))) = number_literal) ;) (expression_statement "puVar7 = (undefined1 *)xmalloc(0x80);" (assignment_expression "puVar7 = (undefined1 *)xmalloc(0x80)" identifier = (cast_expression "(undefined1 *)xmalloc(0x80)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "xmalloc(0x80)" identifier (argument_list "(0x80)" ( number_literal ))))) ;) (expression_statement "*(undefined4 *)(iVar3 + 0xc) = 0;" (assignment_expression "*(undefined4 *)(iVar3 + 0xc) = 0" (pointer_expression "*(undefined4 *)(iVar3 + 0xc)" * (cast_expression "(undefined4 *)(iVar3 + 0xc)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + 0xc)" ( (binary_expression "iVar3 + 0xc" identifier + number_literal) )))) = number_literal) ;) (expression_statement "*(undefined1 **)(iVar3 + 8) = puVar7;" (assignment_expression "*(undefined1 **)(iVar3 + 8) = puVar7" (pointer_expression "*(undefined1 **)(iVar3 + 8)" * (cast_expression "(undefined1 **)(iVar3 + 8)" ( (type_descriptor "undefined1 **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(iVar3 + 8)" ( (binary_expression "iVar3 + 8" identifier + number_literal) )))) = identifier) ;) (expression_statement "*puVar7 = 0;" (assignment_expression "*puVar7 = 0" (pointer_expression "*puVar7" * identifier) = number_literal) ;) (expression_statement "*(uint *)(iVar3 + 0x48) = param_1 >> 0x1f | 1;" (assignment_expression "*(uint *)(iVar3 + 0x48) = param_1 >> 0x1f | 1" (pointer_expression "*(uint *)(iVar3 + 0x48)" * (cast_expression "(uint *)(iVar3 + 0x48)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + 0x48)" ( (binary_expression "iVar3 + 0x48" identifier + number_literal) )))) = (binary_expression "param_1 >> 0x1f | 1" (binary_expression "param_1 >> 0x1f" identifier >> number_literal) | number_literal)) ;) (expression_statement "pcVar11 = rl_line_buffer;" (assignment_expression "pcVar11 = rl_line_buffer" identifier = identifier) ;) (expression_statement "*(char **)(iVar3 + 0x74) = rl_line_buffer;" (assignment_expression "*(char **)(iVar3 + 0x74) = rl_line_buffer" (pointer_expression "*(char **)(iVar3 + 0x74)" * (cast_expression "(char **)(iVar3 + 0x74)" ( (type_descriptor "char **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(iVar3 + 0x74)" ( (binary_expression "iVar3 + 0x74" identifier + number_literal) )))) = identifier) ;) (expression_statement "sVar8 = strlen(pcVar11);" (assignment_expression "sVar8 = strlen(pcVar11)" identifier = (call_expression "strlen(pcVar11)" identifier (argument_list "(pcVar11)" ( identifier )))) ;) (expression_statement "_rl_iscxt = iVar3;" (assignment_expression "_rl_iscxt = iVar3" identifier = identifier) ;) (expression_statement "*(size_t *)(iVar3 + 0x78) = sVar8;" (assignment_expression "*(size_t *)(iVar3 + 0x78) = sVar8" (pointer_expression "*(size_t *)(iVar3 + 0x78)" * (cast_expression "(size_t *)(iVar3 + 0x78)" ( (type_descriptor "size_t *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + 0x78)" ( (binary_expression "iVar3 + 0x78" identifier + number_literal) )))) = identifier) ;) (expression_statement "*(undefined4 *)(iVar3 + 0x7c) = rl_point;" (assignment_expression "*(undefined4 *)(iVar3 + 0x7c) = rl_point" (pointer_expression "*(undefined4 *)(iVar3 + 0x7c)" * (cast_expression "(undefined4 *)(iVar3 + 0x7c)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + 0x7c)" ( (binary_expression "iVar3 + 0x7c" identifier + number_literal) )))) = identifier) ;) (expression_statement "FUN_000d5450();" (call_expression "FUN_000d5450()" identifier (argument_list "()" ( ))) ;) (expression_statement "uVar9 = 0;" (assignment_expression "uVar9 = 0" identifier = number_literal) ;) (if_statement "if ((rl_readline_state & 0x80000) == 0) {\n    do {\n      _rl_search_getchar(iVar3);\n      iVar10 = _rl_isearch_dispatch(iVar3,*(undefined4 *)(iVar3 + 0x50));\n    } while (0 < iVar10);\n    uVar9 = _rl_isearch_cleanup(iVar3,iVar10);\n  }" if (parenthesized_expression "((rl_readline_state & 0x80000) == 0)" ( (binary_expression "(rl_readline_state & 0x80000) == 0" (parenthesized_expression "(rl_readline_state & 0x80000)" ( (binary_expression "rl_readline_state & 0x80000" identifier & number_literal) )) == number_literal) )) (compound_statement "{\n    do {\n      _rl_search_getchar(iVar3);\n      iVar10 = _rl_isearch_dispatch(iVar3,*(undefined4 *)(iVar3 + 0x50));\n    } while (0 < iVar10);\n    uVar9 = _rl_isearch_cleanup(iVar3,iVar10);\n  }" { (do_statement "do {\n      _rl_search_getchar(iVar3);\n      iVar10 = _rl_isearch_dispatch(iVar3,*(undefined4 *)(iVar3 + 0x50));\n    } while (0 < iVar10);" do (compound_statement "{\n      _rl_search_getchar(iVar3);\n      iVar10 = _rl_isearch_dispatch(iVar3,*(undefined4 *)(iVar3 + 0x50));\n    }" { (expression_statement "_rl_search_getchar(iVar3);" (call_expression "_rl_search_getchar(iVar3)" identifier (argument_list "(iVar3)" ( identifier ))) ;) (expression_statement "iVar10 = _rl_isearch_dispatch(iVar3,*(undefined4 *)(iVar3 + 0x50));" (assignment_expression "iVar10 = _rl_isearch_dispatch(iVar3,*(undefined4 *)(iVar3 + 0x50))" identifier = (call_expression "_rl_isearch_dispatch(iVar3,*(undefined4 *)(iVar3 + 0x50))" identifier (argument_list "(iVar3,*(undefined4 *)(iVar3 + 0x50))" ( identifier , (pointer_expression "*(undefined4 *)(iVar3 + 0x50)" * (cast_expression "(undefined4 *)(iVar3 + 0x50)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + 0x50)" ( (binary_expression "iVar3 + 0x50" identifier + number_literal) )))) )))) ;) }) while (parenthesized_expression "(0 < iVar10)" ( (binary_expression "0 < iVar10" number_literal < identifier) )) ;) (expression_statement "uVar9 = _rl_isearch_cleanup(iVar3,iVar10);" (assignment_expression "uVar9 = _rl_isearch_cleanup(iVar3,iVar10)" identifier = (call_expression "_rl_isearch_cleanup(iVar3,iVar10)" identifier (argument_list "(iVar3,iVar10)" ( identifier , identifier )))) ;) })) (return_statement "return uVar9;" return identifier ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nint __regparm3 rl_search_history(int direction,int invoking_key)\n\n{\n  HIST_ENTRY **ppHVar1;\n  HIST_ENTRY *pHVar2;\n  _rl_search_cxt *cxt;\n  HIST_ENTRY **ppHVar3;\n  char **ppcVar4;\n  char *pcVar5;\n  size_t sVar6;\n  int iVar7;\n  char **ppcVar8;\n  int where;\n  int iVar9;\n  size_t bytes;\n  int local_2c;\n  int local_28;\n  \n  rl_readline_state = rl_readline_state | 0x80;\n  cxt = _rl_scxt_alloc(1,0);\n  if (direction < 0) {\n    cxt->sflags = cxt->sflags | 1;\n  }\n  pcVar5 = _rl_isearch_terminators;\n  if (_rl_isearch_terminators == (char *)0x0) {\n    pcVar5 = "\x1b\n";\n  }\n  cxt->search_terminators = pcVar5;\n  ppHVar3 = history_list();\n  rl_maybe_replace_line();\n  if ((ppHVar3 == (HIST_ENTRY **)0x0) || (*ppHVar3 == (HIST_ENTRY *)0x0)) {\n    bytes = 4;\n    iVar7 = 0;\n  }\n  else {\n    iVar7 = 0;\n    do {\n      iVar9 = iVar7;\n      iVar7 = iVar9 + 1;\n    } while (ppHVar3[iVar7] != (HIST_ENTRY *)0x0);\n    bytes = iVar9 * 4 + 8;\n  }\n  cxt->hlen = iVar7;\n  ppcVar4 = (char **)xmalloc(bytes);\n  local_2c = cxt->hlen;\n  cxt->lines = ppcVar4;\n  if (local_2c < 1) {\n    local_28 = 0;\n  }\n  else {\n    local_28 = local_2c * 4;\n    ppHVar1 = ppHVar3 + local_2c;\n    ppcVar8 = ppcVar4;\n    do {\n      pHVar2 = *ppHVar3;\n      ppHVar3 = ppHVar3 + 1;\n      *ppcVar8 = pHVar2->line;\n      ppcVar8 = ppcVar8 + 1;\n    } while (ppHVar1 != ppHVar3);\n  }\n  if (_rl_saved_line_for_history == (HIST_ENTRY *)0x0) {\n    sVar6 = strlen(rl_line_buffer);\n    pcVar5 = (char *)xmalloc(sVar6 + 1);\n    cxt->allocated_line = pcVar5;\n    strcpy(pcVar5,rl_line_buffer);\n    *(char **)((int)cxt->lines + local_28) = cxt->allocated_line;\n    local_2c = cxt->hlen;\n  }\n  else {\n    *(char **)((int)ppcVar4 + local_28) = _rl_saved_line_for_history->line;\n  }\n  cxt->hlen = local_2c + 1;\n  cxt->history_pos = cxt->save_line;\n  rl_save_prompt();\n  cxt->search_string_size = 0x80;\n  pcVar5 = (char *)xmalloc(0x80);\n  cxt->search_string_index = 0;\n  cxt->search_string = pcVar5;\n  *pcVar5 = '\0';\n  cxt->direction = direction >> 0x1f | 1;\n  pcVar5 = rl_line_buffer;\n  cxt->sline = rl_line_buffer;\n  sVar6 = strlen(pcVar5);\n  _rl_iscxt = cxt;\n  cxt->sline_len = sVar6;\n  cxt->sline_index = rl_point;\n  rl_display_search(cxt->search_string,cxt->sflags,where);\n  iVar7 = 0;\n  if ((rl_readline_state & 0x80000) == 0) {\n    do {\n      _rl_search_getchar(cxt);\n      iVar7 = _rl_isearch_dispatch(cxt,cxt->lastc);\n    } while (0 < iVar7);\n    iVar7 = _rl_isearch_cleanup(cxt,iVar7);\n  }\n  return iVar7;\n}\n\n" comment (function_definition "int __regparm3 rl_search_history(int direction,int invoking_key)\n\n{\n  HIST_ENTRY **ppHVar1;\n  HIST_ENTRY *pHVar2;\n  _rl_search_cxt *cxt;\n  HIST_ENTRY **ppHVar3;\n  char **ppcVar4;\n  char *pcVar5;\n  size_t sVar6;\n  int iVar7;\n  char **ppcVar8;\n  int where;\n  int iVar9;\n  size_t bytes;\n  int local_2c;\n  int local_28;\n  \n  rl_readline_state = rl_readline_state | 0x80;\n  cxt = _rl_scxt_alloc(1,0);\n  if (direction < 0) {\n    cxt->sflags = cxt->sflags | 1;\n  }\n  pcVar5 = _rl_isearch_terminators;\n  if (_rl_isearch_terminators == (char *)0x0) {\n    pcVar5 = "\x1b\n";\n  }\n  cxt->search_terminators = pcVar5;\n  ppHVar3 = history_list();\n  rl_maybe_replace_line();\n  if ((ppHVar3 == (HIST_ENTRY **)0x0) || (*ppHVar3 == (HIST_ENTRY *)0x0)) {\n    bytes = 4;\n    iVar7 = 0;\n  }\n  else {\n    iVar7 = 0;\n    do {\n      iVar9 = iVar7;\n      iVar7 = iVar9 + 1;\n    } while (ppHVar3[iVar7] != (HIST_ENTRY *)0x0);\n    bytes = iVar9 * 4 + 8;\n  }\n  cxt->hlen = iVar7;\n  ppcVar4 = (char **)xmalloc(bytes);\n  local_2c = cxt->hlen;\n  cxt->lines = ppcVar4;\n  if (local_2c < 1) {\n    local_28 = 0;\n  }\n  else {\n    local_28 = local_2c * 4;\n    ppHVar1 = ppHVar3 + local_2c;\n    ppcVar8 = ppcVar4;\n    do {\n      pHVar2 = *ppHVar3;\n      ppHVar3 = ppHVar3 + 1;\n      *ppcVar8 = pHVar2->line;\n      ppcVar8 = ppcVar8 + 1;\n    } while (ppHVar1 != ppHVar3);\n  }\n  if (_rl_saved_line_for_history == (HIST_ENTRY *)0x0) {\n    sVar6 = strlen(rl_line_buffer);\n    pcVar5 = (char *)xmalloc(sVar6 + 1);\n    cxt->allocated_line = pcVar5;\n    strcpy(pcVar5,rl_line_buffer);\n    *(char **)((int)cxt->lines + local_28) = cxt->allocated_line;\n    local_2c = cxt->hlen;\n  }\n  else {\n    *(char **)((int)ppcVar4 + local_28) = _rl_saved_line_for_history->line;\n  }\n  cxt->hlen = local_2c + 1;\n  cxt->history_pos = cxt->save_line;\n  rl_save_prompt();\n  cxt->search_string_size = 0x80;\n  pcVar5 = (char *)xmalloc(0x80);\n  cxt->search_string_index = 0;\n  cxt->search_string = pcVar5;\n  *pcVar5 = '\0';\n  cxt->direction = direction >> 0x1f | 1;\n  pcVar5 = rl_line_buffer;\n  cxt->sline = rl_line_buffer;\n  sVar6 = strlen(pcVar5);\n  _rl_iscxt = cxt;\n  cxt->sline_len = sVar6;\n  cxt->sline_index = rl_point;\n  rl_display_search(cxt->search_string,cxt->sflags,where);\n  iVar7 = 0;\n  if ((rl_readline_state & 0x80000) == 0) {\n    do {\n      _rl_search_getchar(cxt);\n      iVar7 = _rl_isearch_dispatch(cxt,cxt->lastc);\n    } while (0 < iVar7);\n    iVar7 = _rl_isearch_cleanup(cxt,iVar7);\n  }\n  return iVar7;\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "rl_search_history(int direction,int invoking_key)" identifier (parameter_list "(int direction,int invoking_key)" ( (parameter_declaration "int direction" primitive_type identifier) , (parameter_declaration "int invoking_key" primitive_type identifier) ))) (compound_statement "{\n  HIST_ENTRY **ppHVar1;\n  HIST_ENTRY *pHVar2;\n  _rl_search_cxt *cxt;\n  HIST_ENTRY **ppHVar3;\n  char **ppcVar4;\n  char *pcVar5;\n  size_t sVar6;\n  int iVar7;\n  char **ppcVar8;\n  int where;\n  int iVar9;\n  size_t bytes;\n  int local_2c;\n  int local_28;\n  \n  rl_readline_state = rl_readline_state | 0x80;\n  cxt = _rl_scxt_alloc(1,0);\n  if (direction < 0) {\n    cxt->sflags = cxt->sflags | 1;\n  }\n  pcVar5 = _rl_isearch_terminators;\n  if (_rl_isearch_terminators == (char *)0x0) {\n    pcVar5 = "\x1b\n";\n  }\n  cxt->search_terminators = pcVar5;\n  ppHVar3 = history_list();\n  rl_maybe_replace_line();\n  if ((ppHVar3 == (HIST_ENTRY **)0x0) || (*ppHVar3 == (HIST_ENTRY *)0x0)) {\n    bytes = 4;\n    iVar7 = 0;\n  }\n  else {\n    iVar7 = 0;\n    do {\n      iVar9 = iVar7;\n      iVar7 = iVar9 + 1;\n    } while (ppHVar3[iVar7] != (HIST_ENTRY *)0x0);\n    bytes = iVar9 * 4 + 8;\n  }\n  cxt->hlen = iVar7;\n  ppcVar4 = (char **)xmalloc(bytes);\n  local_2c = cxt->hlen;\n  cxt->lines = ppcVar4;\n  if (local_2c < 1) {\n    local_28 = 0;\n  }\n  else {\n    local_28 = local_2c * 4;\n    ppHVar1 = ppHVar3 + local_2c;\n    ppcVar8 = ppcVar4;\n    do {\n      pHVar2 = *ppHVar3;\n      ppHVar3 = ppHVar3 + 1;\n      *ppcVar8 = pHVar2->line;\n      ppcVar8 = ppcVar8 + 1;\n    } while (ppHVar1 != ppHVar3);\n  }\n  if (_rl_saved_line_for_history == (HIST_ENTRY *)0x0) {\n    sVar6 = strlen(rl_line_buffer);\n    pcVar5 = (char *)xmalloc(sVar6 + 1);\n    cxt->allocated_line = pcVar5;\n    strcpy(pcVar5,rl_line_buffer);\n    *(char **)((int)cxt->lines + local_28) = cxt->allocated_line;\n    local_2c = cxt->hlen;\n  }\n  else {\n    *(char **)((int)ppcVar4 + local_28) = _rl_saved_line_for_history->line;\n  }\n  cxt->hlen = local_2c + 1;\n  cxt->history_pos = cxt->save_line;\n  rl_save_prompt();\n  cxt->search_string_size = 0x80;\n  pcVar5 = (char *)xmalloc(0x80);\n  cxt->search_string_index = 0;\n  cxt->search_string = pcVar5;\n  *pcVar5 = '\0';\n  cxt->direction = direction >> 0x1f | 1;\n  pcVar5 = rl_line_buffer;\n  cxt->sline = rl_line_buffer;\n  sVar6 = strlen(pcVar5);\n  _rl_iscxt = cxt;\n  cxt->sline_len = sVar6;\n  cxt->sline_index = rl_point;\n  rl_display_search(cxt->search_string,cxt->sflags,where);\n  iVar7 = 0;\n  if ((rl_readline_state & 0x80000) == 0) {\n    do {\n      _rl_search_getchar(cxt);\n      iVar7 = _rl_isearch_dispatch(cxt,cxt->lastc);\n    } while (0 < iVar7);\n    iVar7 = _rl_isearch_cleanup(cxt,iVar7);\n  }\n  return iVar7;\n}" { (declaration "HIST_ENTRY **ppHVar1;" type_identifier (pointer_declarator "**ppHVar1" * (pointer_declarator "*ppHVar1" * identifier)) ;) (declaration "HIST_ENTRY *pHVar2;" type_identifier (pointer_declarator "*pHVar2" * identifier) ;) (declaration "_rl_search_cxt *cxt;" type_identifier (pointer_declarator "*cxt" * identifier) ;) (declaration "HIST_ENTRY **ppHVar3;" type_identifier (pointer_declarator "**ppHVar3" * (pointer_declarator "*ppHVar3" * identifier)) ;) (declaration "char **ppcVar4;" primitive_type (pointer_declarator "**ppcVar4" * (pointer_declarator "*ppcVar4" * identifier)) ;) (declaration "char *pcVar5;" primitive_type (pointer_declarator "*pcVar5" * identifier) ;) (declaration "size_t sVar6;" primitive_type identifier ;) (declaration "int iVar7;" primitive_type identifier ;) (declaration "char **ppcVar8;" primitive_type (pointer_declarator "**ppcVar8" * (pointer_declarator "*ppcVar8" * identifier)) ;) (declaration "int where;" primitive_type identifier ;) (declaration "int iVar9;" primitive_type identifier ;) (declaration "size_t bytes;" primitive_type identifier ;) (declaration "int local_2c;" primitive_type identifier ;) (declaration "int local_28;" primitive_type identifier ;) (expression_statement "rl_readline_state = rl_readline_state | 0x80;" (assignment_expression "rl_readline_state = rl_readline_state | 0x80" identifier = (binary_expression "rl_readline_state | 0x80" identifier | number_literal)) ;) (expression_statement "cxt = _rl_scxt_alloc(1,0);" (assignment_expression "cxt = _rl_scxt_alloc(1,0)" identifier = (call_expression "_rl_scxt_alloc(1,0)" identifier (argument_list "(1,0)" ( number_literal , number_literal )))) ;) (if_statement "if (direction < 0) {\n    cxt->sflags = cxt->sflags | 1;\n  }" if (parenthesized_expression "(direction < 0)" ( (binary_expression "direction < 0" identifier < number_literal) )) (compound_statement "{\n    cxt->sflags = cxt->sflags | 1;\n  }" { (expression_statement "cxt->sflags = cxt->sflags | 1;" (assignment_expression "cxt->sflags = cxt->sflags | 1" (field_expression "cxt->sflags" identifier -> field_identifier) = (binary_expression "cxt->sflags | 1" (field_expression "cxt->sflags" identifier -> field_identifier) | number_literal)) ;) })) (expression_statement "pcVar5 = _rl_isearch_terminators;" (assignment_expression "pcVar5 = _rl_isearch_terminators" identifier = identifier) ;) (if_statement "if (_rl_isearch_terminators == (char *)0x0) {\n    pcVar5 = "\x1b\n";\n  }" if (parenthesized_expression "(_rl_isearch_terminators == (char *)0x0)" ( (binary_expression "_rl_isearch_terminators == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    pcVar5 = "\x1b\n";\n  }" { (expression_statement "pcVar5 = "\x1b\n";" (assignment_expression "pcVar5 = "\x1b\n"" identifier = (string_literal ""\x1b\n"" " escape_sequence escape_sequence ")) ;) })) (expression_statement "cxt->search_terminators = pcVar5;" (assignment_expression "cxt->search_terminators = pcVar5" (field_expression "cxt->search_terminators" identifier -> field_identifier) = identifier) ;) (expression_statement "ppHVar3 = history_list();" (assignment_expression "ppHVar3 = history_list()" identifier = (call_expression "history_list()" identifier (argument_list "()" ( )))) ;) (expression_statement "rl_maybe_replace_line();" (call_expression "rl_maybe_replace_line()" identifier (argument_list "()" ( ))) ;) (if_statement "if ((ppHVar3 == (HIST_ENTRY **)0x0) || (*ppHVar3 == (HIST_ENTRY *)0x0)) {\n    bytes = 4;\n    iVar7 = 0;\n  }\n  else {\n    iVar7 = 0;\n    do {\n      iVar9 = iVar7;\n      iVar7 = iVar9 + 1;\n    } while (ppHVar3[iVar7] != (HIST_ENTRY *)0x0);\n    bytes = iVar9 * 4 + 8;\n  }" if (parenthesized_expression "((ppHVar3 == (HIST_ENTRY **)0x0) || (*ppHVar3 == (HIST_ENTRY *)0x0))" ( (binary_expression "(ppHVar3 == (HIST_ENTRY **)0x0) || (*ppHVar3 == (HIST_ENTRY *)0x0)" (parenthesized_expression "(ppHVar3 == (HIST_ENTRY **)0x0)" ( (binary_expression "ppHVar3 == (HIST_ENTRY **)0x0" identifier == (cast_expression "(HIST_ENTRY **)0x0" ( (type_descriptor "HIST_ENTRY **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) number_literal)) )) || (parenthesized_expression "(*ppHVar3 == (HIST_ENTRY *)0x0)" ( (binary_expression "*ppHVar3 == (HIST_ENTRY *)0x0" (pointer_expression "*ppHVar3" * identifier) == (cast_expression "(HIST_ENTRY *)0x0" ( (type_descriptor "HIST_ENTRY *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) ))) )) (compound_statement "{\n    bytes = 4;\n    iVar7 = 0;\n  }" { (expression_statement "bytes = 4;" (assignment_expression "bytes = 4" identifier = number_literal) ;) (expression_statement "iVar7 = 0;" (assignment_expression "iVar7 = 0" identifier = number_literal) ;) }) (else_clause "else {\n    iVar7 = 0;\n    do {\n      iVar9 = iVar7;\n      iVar7 = iVar9 + 1;\n    } while (ppHVar3[iVar7] != (HIST_ENTRY *)0x0);\n    bytes = iVar9 * 4 + 8;\n  }" else (compound_statement "{\n    iVar7 = 0;\n    do {\n      iVar9 = iVar7;\n      iVar7 = iVar9 + 1;\n    } while (ppHVar3[iVar7] != (HIST_ENTRY *)0x0);\n    bytes = iVar9 * 4 + 8;\n  }" { (expression_statement "iVar7 = 0;" (assignment_expression "iVar7 = 0" identifier = number_literal) ;) (do_statement "do {\n      iVar9 = iVar7;\n      iVar7 = iVar9 + 1;\n    } while (ppHVar3[iVar7] != (HIST_ENTRY *)0x0);" do (compound_statement "{\n      iVar9 = iVar7;\n      iVar7 = iVar9 + 1;\n    }" { (expression_statement "iVar9 = iVar7;" (assignment_expression "iVar9 = iVar7" identifier = identifier) ;) (expression_statement "iVar7 = iVar9 + 1;" (assignment_expression "iVar7 = iVar9 + 1" identifier = (binary_expression "iVar9 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(ppHVar3[iVar7] != (HIST_ENTRY *)0x0)" ( (binary_expression "ppHVar3[iVar7] != (HIST_ENTRY *)0x0" (subscript_expression "ppHVar3[iVar7]" identifier [ identifier ]) != (cast_expression "(HIST_ENTRY *)0x0" ( (type_descriptor "HIST_ENTRY *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) ;) (expression_statement "bytes = iVar9 * 4 + 8;" (assignment_expression "bytes = iVar9 * 4 + 8" identifier = (binary_expression "iVar9 * 4 + 8" (binary_expression "iVar9 * 4" identifier * number_literal) + number_literal)) ;) }))) (expression_statement "cxt->hlen = iVar7;" (assignment_expression "cxt->hlen = iVar7" (field_expression "cxt->hlen" identifier -> field_identifier) = identifier) ;) (expression_statement "ppcVar4 = (char **)xmalloc(bytes);" (assignment_expression "ppcVar4 = (char **)xmalloc(bytes)" identifier = (cast_expression "(char **)xmalloc(bytes)" ( (type_descriptor "char **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (call_expression "xmalloc(bytes)" identifier (argument_list "(bytes)" ( identifier ))))) ;) (expression_statement "local_2c = cxt->hlen;" (assignment_expression "local_2c = cxt->hlen" identifier = (field_expression "cxt->hlen" identifier -> field_identifier)) ;) (expression_statement "cxt->lines = ppcVar4;" (assignment_expression "cxt->lines = ppcVar4" (field_expression "cxt->lines" identifier -> field_identifier) = identifier) ;) (if_statement "if (local_2c < 1) {\n    local_28 = 0;\n  }\n  else {\n    local_28 = local_2c * 4;\n    ppHVar1 = ppHVar3 + local_2c;\n    ppcVar8 = ppcVar4;\n    do {\n      pHVar2 = *ppHVar3;\n      ppHVar3 = ppHVar3 + 1;\n      *ppcVar8 = pHVar2->line;\n      ppcVar8 = ppcVar8 + 1;\n    } while (ppHVar1 != ppHVar3);\n  }" if (parenthesized_expression "(local_2c < 1)" ( (binary_expression "local_2c < 1" identifier < number_literal) )) (compound_statement "{\n    local_28 = 0;\n  }" { (expression_statement "local_28 = 0;" (assignment_expression "local_28 = 0" identifier = number_literal) ;) }) (else_clause "else {\n    local_28 = local_2c * 4;\n    ppHVar1 = ppHVar3 + local_2c;\n    ppcVar8 = ppcVar4;\n    do {\n      pHVar2 = *ppHVar3;\n      ppHVar3 = ppHVar3 + 1;\n      *ppcVar8 = pHVar2->line;\n      ppcVar8 = ppcVar8 + 1;\n    } while (ppHVar1 != ppHVar3);\n  }" else (compound_statement "{\n    local_28 = local_2c * 4;\n    ppHVar1 = ppHVar3 + local_2c;\n    ppcVar8 = ppcVar4;\n    do {\n      pHVar2 = *ppHVar3;\n      ppHVar3 = ppHVar3 + 1;\n      *ppcVar8 = pHVar2->line;\n      ppcVar8 = ppcVar8 + 1;\n    } while (ppHVar1 != ppHVar3);\n  }" { (expression_statement "local_28 = local_2c * 4;" (assignment_expression "local_28 = local_2c * 4" identifier = (binary_expression "local_2c * 4" identifier * number_literal)) ;) (expression_statement "ppHVar1 = ppHVar3 + local_2c;" (assignment_expression "ppHVar1 = ppHVar3 + local_2c" identifier = (binary_expression "ppHVar3 + local_2c" identifier + identifier)) ;) (expression_statement "ppcVar8 = ppcVar4;" (assignment_expression "ppcVar8 = ppcVar4" identifier = identifier) ;) (do_statement "do {\n      pHVar2 = *ppHVar3;\n      ppHVar3 = ppHVar3 + 1;\n      *ppcVar8 = pHVar2->line;\n      ppcVar8 = ppcVar8 + 1;\n    } while (ppHVar1 != ppHVar3);" do (compound_statement "{\n      pHVar2 = *ppHVar3;\n      ppHVar3 = ppHVar3 + 1;\n      *ppcVar8 = pHVar2->line;\n      ppcVar8 = ppcVar8 + 1;\n    }" { (expression_statement "pHVar2 = *ppHVar3;" (assignment_expression "pHVar2 = *ppHVar3" identifier = (pointer_expression "*ppHVar3" * identifier)) ;) (expression_statement "ppHVar3 = ppHVar3 + 1;" (assignment_expression "ppHVar3 = ppHVar3 + 1" identifier = (binary_expression "ppHVar3 + 1" identifier + number_literal)) ;) (expression_statement "*ppcVar8 = pHVar2->line;" (assignment_expression "*ppcVar8 = pHVar2->line" (pointer_expression "*ppcVar8" * identifier) = (field_expression "pHVar2->line" identifier -> field_identifier)) ;) (expression_statement "ppcVar8 = ppcVar8 + 1;" (assignment_expression "ppcVar8 = ppcVar8 + 1" identifier = (binary_expression "ppcVar8 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(ppHVar1 != ppHVar3)" ( (binary_expression "ppHVar1 != ppHVar3" identifier != identifier) )) ;) }))) (if_statement "if (_rl_saved_line_for_history == (HIST_ENTRY *)0x0) {\n    sVar6 = strlen(rl_line_buffer);\n    pcVar5 = (char *)xmalloc(sVar6 + 1);\n    cxt->allocated_line = pcVar5;\n    strcpy(pcVar5,rl_line_buffer);\n    *(char **)((int)cxt->lines + local_28) = cxt->allocated_line;\n    local_2c = cxt->hlen;\n  }\n  else {\n    *(char **)((int)ppcVar4 + local_28) = _rl_saved_line_for_history->line;\n  }" if (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)) )) (compound_statement "{\n    sVar6 = strlen(rl_line_buffer);\n    pcVar5 = (char *)xmalloc(sVar6 + 1);\n    cxt->allocated_line = pcVar5;\n    strcpy(pcVar5,rl_line_buffer);\n    *(char **)((int)cxt->lines + local_28) = cxt->allocated_line;\n    local_2c = cxt->hlen;\n  }" { (expression_statement "sVar6 = strlen(rl_line_buffer);" (assignment_expression "sVar6 = strlen(rl_line_buffer)" identifier = (call_expression "strlen(rl_line_buffer)" identifier (argument_list "(rl_line_buffer)" ( identifier )))) ;) (expression_statement "pcVar5 = (char *)xmalloc(sVar6 + 1);" (assignment_expression "pcVar5 = (char *)xmalloc(sVar6 + 1)" identifier = (cast_expression "(char *)xmalloc(sVar6 + 1)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "xmalloc(sVar6 + 1)" identifier (argument_list "(sVar6 + 1)" ( (binary_expression "sVar6 + 1" identifier + number_literal) ))))) ;) (expression_statement "cxt->allocated_line = pcVar5;" (assignment_expression "cxt->allocated_line = pcVar5" (field_expression "cxt->allocated_line" identifier -> field_identifier) = identifier) ;) (expression_statement "strcpy(pcVar5,rl_line_buffer);" (call_expression "strcpy(pcVar5,rl_line_buffer)" identifier (argument_list "(pcVar5,rl_line_buffer)" ( identifier , identifier ))) ;) (expression_statement "*(char **)((int)cxt->lines + local_28) = cxt->allocated_line;" (assignment_expression "*(char **)((int)cxt->lines + local_28) = cxt->allocated_line" (pointer_expression "*(char **)((int)cxt->lines + local_28)" * (cast_expression "(char **)((int)cxt->lines + local_28)" ( (type_descriptor "char **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "((int)cxt->lines + local_28)" ( (binary_expression "(int)cxt->lines + local_28" (cast_expression "(int)cxt->lines" ( (type_descriptor "int" primitive_type) ) (field_expression "cxt->lines" identifier -> field_identifier)) + identifier) )))) = (field_expression "cxt->allocated_line" identifier -> field_identifier)) ;) (expression_statement "local_2c = cxt->hlen;" (assignment_expression "local_2c = cxt->hlen" identifier = (field_expression "cxt->hlen" identifier -> field_identifier)) ;) }) (else_clause "else {\n    *(char **)((int)ppcVar4 + local_28) = _rl_saved_line_for_history->line;\n  }" else (compound_statement "{\n    *(char **)((int)ppcVar4 + local_28) = _rl_saved_line_for_history->line;\n  }" { (expression_statement "*(char **)((int)ppcVar4 + local_28) = _rl_saved_line_for_history->line;" (assignment_expression "*(char **)((int)ppcVar4 + local_28) = _rl_saved_line_for_history->line" (pointer_expression "*(char **)((int)ppcVar4 + local_28)" * (cast_expression "(char **)((int)ppcVar4 + local_28)" ( (type_descriptor "char **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "((int)ppcVar4 + local_28)" ( (binary_expression "(int)ppcVar4 + local_28" (cast_expression "(int)ppcVar4" ( (type_descriptor "int" primitive_type) ) identifier) + identifier) )))) = (field_expression "_rl_saved_line_for_history->line" identifier -> field_identifier)) ;) }))) (expression_statement "cxt->hlen = local_2c + 1;" (assignment_expression "cxt->hlen = local_2c + 1" (field_expression "cxt->hlen" identifier -> field_identifier) = (binary_expression "local_2c + 1" identifier + number_literal)) ;) (expression_statement "cxt->history_pos = cxt->save_line;" (assignment_expression "cxt->history_pos = cxt->save_line" (field_expression "cxt->history_pos" identifier -> field_identifier) = (field_expression "cxt->save_line" identifier -> field_identifier)) ;) (expression_statement "rl_save_prompt();" (call_expression "rl_save_prompt()" identifier (argument_list "()" ( ))) ;) (expression_statement "cxt->search_string_size = 0x80;" (assignment_expression "cxt->search_string_size = 0x80" (field_expression "cxt->search_string_size" identifier -> field_identifier) = number_literal) ;) (expression_statement "pcVar5 = (char *)xmalloc(0x80);" (assignment_expression "pcVar5 = (char *)xmalloc(0x80)" identifier = (cast_expression "(char *)xmalloc(0x80)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "xmalloc(0x80)" identifier (argument_list "(0x80)" ( number_literal ))))) ;) (expression_statement "cxt->search_string_index = 0;" (assignment_expression "cxt->search_string_index = 0" (field_expression "cxt->search_string_index" identifier -> field_identifier) = number_literal) ;) (expression_statement "cxt->search_string = pcVar5;" (assignment_expression "cxt->search_string = pcVar5" (field_expression "cxt->search_string" identifier -> field_identifier) = identifier) ;) (expression_statement "*pcVar5 = '\0';" (assignment_expression "*pcVar5 = '\0'" (pointer_expression "*pcVar5" * identifier) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "cxt->direction = direction >> 0x1f | 1;" (assignment_expression "cxt->direction = direction >> 0x1f | 1" (field_expression "cxt->direction" identifier -> field_identifier) = (binary_expression "direction >> 0x1f | 1" (binary_expression "direction >> 0x1f" identifier >> number_literal) | number_literal)) ;) (expression_statement "pcVar5 = rl_line_buffer;" (assignment_expression "pcVar5 = rl_line_buffer" identifier = identifier) ;) (expression_statement "cxt->sline = rl_line_buffer;" (assignment_expression "cxt->sline = rl_line_buffer" (field_expression "cxt->sline" identifier -> field_identifier) = identifier) ;) (expression_statement "sVar6 = strlen(pcVar5);" (assignment_expression "sVar6 = strlen(pcVar5)" identifier = (call_expression "strlen(pcVar5)" identifier (argument_list "(pcVar5)" ( identifier )))) ;) (expression_statement "_rl_iscxt = cxt;" (assignment_expression "_rl_iscxt = cxt" identifier = identifier) ;) (expression_statement "cxt->sline_len = sVar6;" (assignment_expression "cxt->sline_len = sVar6" (field_expression "cxt->sline_len" identifier -> field_identifier) = identifier) ;) (expression_statement "cxt->sline_index = rl_point;" (assignment_expression "cxt->sline_index = rl_point" (field_expression "cxt->sline_index" identifier -> field_identifier) = identifier) ;) (expression_statement "rl_display_search(cxt->search_string,cxt->sflags,where);" (call_expression "rl_display_search(cxt->search_string,cxt->sflags,where)" identifier (argument_list "(cxt->search_string,cxt->sflags,where)" ( (field_expression "cxt->search_string" identifier -> field_identifier) , (field_expression "cxt->sflags" identifier -> field_identifier) , identifier ))) ;) (expression_statement "iVar7 = 0;" (assignment_expression "iVar7 = 0" identifier = number_literal) ;) (if_statement "if ((rl_readline_state & 0x80000) == 0) {\n    do {\n      _rl_search_getchar(cxt);\n      iVar7 = _rl_isearch_dispatch(cxt,cxt->lastc);\n    } while (0 < iVar7);\n    iVar7 = _rl_isearch_cleanup(cxt,iVar7);\n  }" if (parenthesized_expression "((rl_readline_state & 0x80000) == 0)" ( (binary_expression "(rl_readline_state & 0x80000) == 0" (parenthesized_expression "(rl_readline_state & 0x80000)" ( (binary_expression "rl_readline_state & 0x80000" identifier & number_literal) )) == number_literal) )) (compound_statement "{\n    do {\n      _rl_search_getchar(cxt);\n      iVar7 = _rl_isearch_dispatch(cxt,cxt->lastc);\n    } while (0 < iVar7);\n    iVar7 = _rl_isearch_cleanup(cxt,iVar7);\n  }" { (do_statement "do {\n      _rl_search_getchar(cxt);\n      iVar7 = _rl_isearch_dispatch(cxt,cxt->lastc);\n    } while (0 < iVar7);" do (compound_statement "{\n      _rl_search_getchar(cxt);\n      iVar7 = _rl_isearch_dispatch(cxt,cxt->lastc);\n    }" { (expression_statement "_rl_search_getchar(cxt);" (call_expression "_rl_search_getchar(cxt)" identifier (argument_list "(cxt)" ( identifier ))) ;) (expression_statement "iVar7 = _rl_isearch_dispatch(cxt,cxt->lastc);" (assignment_expression "iVar7 = _rl_isearch_dispatch(cxt,cxt->lastc)" identifier = (call_expression "_rl_isearch_dispatch(cxt,cxt->lastc)" identifier (argument_list "(cxt,cxt->lastc)" ( identifier , (field_expression "cxt->lastc" identifier -> field_identifier) )))) ;) }) while (parenthesized_expression "(0 < iVar7)" ( (binary_expression "0 < iVar7" number_literal < identifier) )) ;) (expression_statement "iVar7 = _rl_isearch_cleanup(cxt,iVar7);" (assignment_expression "iVar7 = _rl_isearch_cleanup(cxt,iVar7)" identifier = (call_expression "_rl_isearch_cleanup(cxt,iVar7)" identifier (argument_list "(cxt,iVar7)" ( identifier , identifier )))) ;) })) (return_statement "return iVar7;" return identifier ;) })))
(translation_unit "undefined4 __regparm3 FUN_000d64e0(int param_1)\n\n{\n  int *piVar1;\n  undefined4 *puVar2;\n  int iVar3;\n  undefined *puVar4;\n  int *piVar5;\n  undefined4 *puVar6;\n  undefined1 *puVar7;\n  size_t sVar8;\n  undefined4 uVar9;\n  int iVar10;\n  char *pcVar11;\n  undefined4 *puVar12;\n  int iVar13;\n  int local_2c;\n  int local_28;\n  \n  rl_readline_state = rl_readline_state | 0x80;\n  iVar3 = _rl_scxt_alloc(1,0);\n  if (param_1 < 0) {\n    *(uint *)(iVar3 + 4) = *(uint *)(iVar3 + 4) | 1;\n  }\n  puVar4 = _rl_isearch_terminators;\n  if (_rl_isearch_terminators == (undefined *)0x0) {\n    puVar4 = &DAT_00106480;\n  }\n  *(undefined **)(iVar3 + 0x80) = puVar4;\n  piVar5 = (int *)history_list();\n  rl_maybe_replace_line();\n  if ((piVar5 == (int *)0x0) || (*piVar5 == 0)) {\n    iVar13 = 4;\n    iVar10 = 0;\n  }\n  else {\n    iVar10 = 0;\n    do {\n      iVar13 = iVar10;\n      iVar10 = iVar13 + 1;\n    } while (piVar5[iVar10] != 0);\n    iVar13 = iVar13 * 4 + 8;\n  }\n  *(int *)(iVar3 + 0x1c) = iVar10;\n  puVar6 = (undefined4 *)xmalloc(iVar13);\n  local_2c = *(int *)(iVar3 + 0x1c);\n  *(undefined4 **)(iVar3 + 0x14) = puVar6;\n  if (local_2c < 1) {\n    local_28 = 0;\n  }\n  else {\n    local_28 = local_2c * 4;\n    piVar1 = piVar5 + local_2c;\n    puVar12 = puVar6;\n    do {\n      puVar2 = (undefined4 *)*piVar5;\n      piVar5 = piVar5 + 1;\n      *puVar12 = *puVar2;\n      puVar12 = puVar12 + 1;\n    } while (piVar1 != piVar5);\n  }\n  if (_rl_saved_line_for_history == (undefined4 *)0x0) {\n    sVar8 = strlen(rl_line_buffer);\n    pcVar11 = (char *)xmalloc(sVar8 + 1);\n    *(char **)(iVar3 + 0x18) = pcVar11;\n    strcpy(pcVar11,rl_line_buffer);\n    *(undefined4 *)(*(int *)(iVar3 + 0x14) + local_28) = *(undefined4 *)(iVar3 + 0x18);\n    local_2c = *(int *)(iVar3 + 0x1c);\n  }\n  else {\n    *(undefined4 *)((int)puVar6 + local_28) = *_rl_saved_line_for_history;\n  }\n  *(int *)(iVar3 + 0x1c) = local_2c + 1;\n  *(undefined4 *)(iVar3 + 0x44) = *(undefined4 *)(iVar3 + 0x2c);\n  rl_save_prompt();\n  *(undefined4 *)(iVar3 + 0x10) = 0x80;\n  puVar7 = (undefined1 *)xmalloc(0x80);\n  *(undefined4 *)(iVar3 + 0xc) = 0;\n  *(undefined1 **)(iVar3 + 8) = puVar7;\n  *puVar7 = 0;\n  *(uint *)(iVar3 + 0x48) = param_1 >> 0x1f | 1;\n  pcVar11 = rl_line_buffer;\n  *(char **)(iVar3 + 0x74) = rl_line_buffer;\n  sVar8 = strlen(pcVar11);\n  _rl_iscxt = iVar3;\n  *(size_t *)(iVar3 + 0x78) = sVar8;\n  *(undefined4 *)(iVar3 + 0x7c) = rl_point;\n  FUN_000d5450();\n  uVar9 = 0;\n  if ((rl_readline_state & 0x80000) == 0) {\n    do {\n      _rl_search_getchar(iVar3);\n      iVar10 = _rl_isearch_dispatch(iVar3,*(undefined4 *)(iVar3 + 0x50));\n    } while (0 < iVar10);\n    uVar9 = _rl_isearch_cleanup(iVar3,iVar10);\n  }\n  return uVar9;\n}\n\n" (function_definition "undefined4 __regparm3 FUN_000d64e0(int param_1)\n\n{\n  int *piVar1;\n  undefined4 *puVar2;\n  int iVar3;\n  undefined *puVar4;\n  int *piVar5;\n  undefined4 *puVar6;\n  undefined1 *puVar7;\n  size_t sVar8;\n  undefined4 uVar9;\n  int iVar10;\n  char *pcVar11;\n  undefined4 *puVar12;\n  int iVar13;\n  int local_2c;\n  int local_28;\n  \n  rl_readline_state = rl_readline_state | 0x80;\n  iVar3 = _rl_scxt_alloc(1,0);\n  if (param_1 < 0) {\n    *(uint *)(iVar3 + 4) = *(uint *)(iVar3 + 4) | 1;\n  }\n  puVar4 = _rl_isearch_terminators;\n  if (_rl_isearch_terminators == (undefined *)0x0) {\n    puVar4 = &DAT_00106480;\n  }\n  *(undefined **)(iVar3 + 0x80) = puVar4;\n  piVar5 = (int *)history_list();\n  rl_maybe_replace_line();\n  if ((piVar5 == (int *)0x0) || (*piVar5 == 0)) {\n    iVar13 = 4;\n    iVar10 = 0;\n  }\n  else {\n    iVar10 = 0;\n    do {\n      iVar13 = iVar10;\n      iVar10 = iVar13 + 1;\n    } while (piVar5[iVar10] != 0);\n    iVar13 = iVar13 * 4 + 8;\n  }\n  *(int *)(iVar3 + 0x1c) = iVar10;\n  puVar6 = (undefined4 *)xmalloc(iVar13);\n  local_2c = *(int *)(iVar3 + 0x1c);\n  *(undefined4 **)(iVar3 + 0x14) = puVar6;\n  if (local_2c < 1) {\n    local_28 = 0;\n  }\n  else {\n    local_28 = local_2c * 4;\n    piVar1 = piVar5 + local_2c;\n    puVar12 = puVar6;\n    do {\n      puVar2 = (undefined4 *)*piVar5;\n      piVar5 = piVar5 + 1;\n      *puVar12 = *puVar2;\n      puVar12 = puVar12 + 1;\n    } while (piVar1 != piVar5);\n  }\n  if (_rl_saved_line_for_history == (undefined4 *)0x0) {\n    sVar8 = strlen(rl_line_buffer);\n    pcVar11 = (char *)xmalloc(sVar8 + 1);\n    *(char **)(iVar3 + 0x18) = pcVar11;\n    strcpy(pcVar11,rl_line_buffer);\n    *(undefined4 *)(*(int *)(iVar3 + 0x14) + local_28) = *(undefined4 *)(iVar3 + 0x18);\n    local_2c = *(int *)(iVar3 + 0x1c);\n  }\n  else {\n    *(undefined4 *)((int)puVar6 + local_28) = *_rl_saved_line_for_history;\n  }\n  *(int *)(iVar3 + 0x1c) = local_2c + 1;\n  *(undefined4 *)(iVar3 + 0x44) = *(undefined4 *)(iVar3 + 0x2c);\n  rl_save_prompt();\n  *(undefined4 *)(iVar3 + 0x10) = 0x80;\n  puVar7 = (undefined1 *)xmalloc(0x80);\n  *(undefined4 *)(iVar3 + 0xc) = 0;\n  *(undefined1 **)(iVar3 + 8) = puVar7;\n  *puVar7 = 0;\n  *(uint *)(iVar3 + 0x48) = param_1 >> 0x1f | 1;\n  pcVar11 = rl_line_buffer;\n  *(char **)(iVar3 + 0x74) = rl_line_buffer;\n  sVar8 = strlen(pcVar11);\n  _rl_iscxt = iVar3;\n  *(size_t *)(iVar3 + 0x78) = sVar8;\n  *(undefined4 *)(iVar3 + 0x7c) = rl_point;\n  FUN_000d5450();\n  uVar9 = 0;\n  if ((rl_readline_state & 0x80000) == 0) {\n    do {\n      _rl_search_getchar(iVar3);\n      iVar10 = _rl_isearch_dispatch(iVar3,*(undefined4 *)(iVar3 + 0x50));\n    } while (0 < iVar10);\n    uVar9 = _rl_isearch_cleanup(iVar3,iVar10);\n  }\n  return uVar9;\n}" type_identifier (ERROR "__regparm3" identifier) (function_declarator "FUN_000d64e0(int param_1)" identifier (parameter_list "(int param_1)" ( (parameter_declaration "int param_1" primitive_type identifier) ))) (compound_statement "{\n  int *piVar1;\n  undefined4 *puVar2;\n  int iVar3;\n  undefined *puVar4;\n  int *piVar5;\n  undefined4 *puVar6;\n  undefined1 *puVar7;\n  size_t sVar8;\n  undefined4 uVar9;\n  int iVar10;\n  char *pcVar11;\n  undefined4 *puVar12;\n  int iVar13;\n  int local_2c;\n  int local_28;\n  \n  rl_readline_state = rl_readline_state | 0x80;\n  iVar3 = _rl_scxt_alloc(1,0);\n  if (param_1 < 0) {\n    *(uint *)(iVar3 + 4) = *(uint *)(iVar3 + 4) | 1;\n  }\n  puVar4 = _rl_isearch_terminators;\n  if (_rl_isearch_terminators == (undefined *)0x0) {\n    puVar4 = &DAT_00106480;\n  }\n  *(undefined **)(iVar3 + 0x80) = puVar4;\n  piVar5 = (int *)history_list();\n  rl_maybe_replace_line();\n  if ((piVar5 == (int *)0x0) || (*piVar5 == 0)) {\n    iVar13 = 4;\n    iVar10 = 0;\n  }\n  else {\n    iVar10 = 0;\n    do {\n      iVar13 = iVar10;\n      iVar10 = iVar13 + 1;\n    } while (piVar5[iVar10] != 0);\n    iVar13 = iVar13 * 4 + 8;\n  }\n  *(int *)(iVar3 + 0x1c) = iVar10;\n  puVar6 = (undefined4 *)xmalloc(iVar13);\n  local_2c = *(int *)(iVar3 + 0x1c);\n  *(undefined4 **)(iVar3 + 0x14) = puVar6;\n  if (local_2c < 1) {\n    local_28 = 0;\n  }\n  else {\n    local_28 = local_2c * 4;\n    piVar1 = piVar5 + local_2c;\n    puVar12 = puVar6;\n    do {\n      puVar2 = (undefined4 *)*piVar5;\n      piVar5 = piVar5 + 1;\n      *puVar12 = *puVar2;\n      puVar12 = puVar12 + 1;\n    } while (piVar1 != piVar5);\n  }\n  if (_rl_saved_line_for_history == (undefined4 *)0x0) {\n    sVar8 = strlen(rl_line_buffer);\n    pcVar11 = (char *)xmalloc(sVar8 + 1);\n    *(char **)(iVar3 + 0x18) = pcVar11;\n    strcpy(pcVar11,rl_line_buffer);\n    *(undefined4 *)(*(int *)(iVar3 + 0x14) + local_28) = *(undefined4 *)(iVar3 + 0x18);\n    local_2c = *(int *)(iVar3 + 0x1c);\n  }\n  else {\n    *(undefined4 *)((int)puVar6 + local_28) = *_rl_saved_line_for_history;\n  }\n  *(int *)(iVar3 + 0x1c) = local_2c + 1;\n  *(undefined4 *)(iVar3 + 0x44) = *(undefined4 *)(iVar3 + 0x2c);\n  rl_save_prompt();\n  *(undefined4 *)(iVar3 + 0x10) = 0x80;\n  puVar7 = (undefined1 *)xmalloc(0x80);\n  *(undefined4 *)(iVar3 + 0xc) = 0;\n  *(undefined1 **)(iVar3 + 8) = puVar7;\n  *puVar7 = 0;\n  *(uint *)(iVar3 + 0x48) = param_1 >> 0x1f | 1;\n  pcVar11 = rl_line_buffer;\n  *(char **)(iVar3 + 0x74) = rl_line_buffer;\n  sVar8 = strlen(pcVar11);\n  _rl_iscxt = iVar3;\n  *(size_t *)(iVar3 + 0x78) = sVar8;\n  *(undefined4 *)(iVar3 + 0x7c) = rl_point;\n  FUN_000d5450();\n  uVar9 = 0;\n  if ((rl_readline_state & 0x80000) == 0) {\n    do {\n      _rl_search_getchar(iVar3);\n      iVar10 = _rl_isearch_dispatch(iVar3,*(undefined4 *)(iVar3 + 0x50));\n    } while (0 < iVar10);\n    uVar9 = _rl_isearch_cleanup(iVar3,iVar10);\n  }\n  return uVar9;\n}" { (declaration "int *piVar1;" primitive_type (pointer_declarator "*piVar1" * identifier) ;) (declaration "undefined4 *puVar2;" type_identifier (pointer_declarator "*puVar2" * identifier) ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "undefined *puVar4;" type_identifier (pointer_declarator "*puVar4" * identifier) ;) (declaration "int *piVar5;" primitive_type (pointer_declarator "*piVar5" * identifier) ;) (declaration "undefined4 *puVar6;" type_identifier (pointer_declarator "*puVar6" * identifier) ;) (declaration "undefined1 *puVar7;" type_identifier (pointer_declarator "*puVar7" * identifier) ;) (declaration "size_t sVar8;" primitive_type identifier ;) (declaration "undefined4 uVar9;" type_identifier identifier ;) (declaration "int iVar10;" primitive_type identifier ;) (declaration "char *pcVar11;" primitive_type (pointer_declarator "*pcVar11" * identifier) ;) (declaration "undefined4 *puVar12;" type_identifier (pointer_declarator "*puVar12" * identifier) ;) (declaration "int iVar13;" primitive_type identifier ;) (declaration "int local_2c;" primitive_type identifier ;) (declaration "int local_28;" primitive_type identifier ;) (expression_statement "rl_readline_state = rl_readline_state | 0x80;" (assignment_expression "rl_readline_state = rl_readline_state | 0x80" identifier = (binary_expression "rl_readline_state | 0x80" identifier | number_literal)) ;) (expression_statement "iVar3 = _rl_scxt_alloc(1,0);" (assignment_expression "iVar3 = _rl_scxt_alloc(1,0)" identifier = (call_expression "_rl_scxt_alloc(1,0)" identifier (argument_list "(1,0)" ( number_literal , number_literal )))) ;) (if_statement "if (param_1 < 0) {\n    *(uint *)(iVar3 + 4) = *(uint *)(iVar3 + 4) | 1;\n  }" if (parenthesized_expression "(param_1 < 0)" ( (binary_expression "param_1 < 0" identifier < number_literal) )) (compound_statement "{\n    *(uint *)(iVar3 + 4) = *(uint *)(iVar3 + 4) | 1;\n  }" { (expression_statement "*(uint *)(iVar3 + 4) = *(uint *)(iVar3 + 4) | 1;" (assignment_expression "*(uint *)(iVar3 + 4) = *(uint *)(iVar3 + 4) | 1" (pointer_expression "*(uint *)(iVar3 + 4)" * (cast_expression "(uint *)(iVar3 + 4)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + 4)" ( (binary_expression "iVar3 + 4" identifier + number_literal) )))) = (binary_expression "*(uint *)(iVar3 + 4) | 1" (pointer_expression "*(uint *)(iVar3 + 4)" * (cast_expression "(uint *)(iVar3 + 4)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + 4)" ( (binary_expression "iVar3 + 4" identifier + number_literal) )))) | number_literal)) ;) })) (expression_statement "puVar4 = _rl_isearch_terminators;" (assignment_expression "puVar4 = _rl_isearch_terminators" identifier = identifier) ;) (if_statement "if (_rl_isearch_terminators == (undefined *)0x0) {\n    puVar4 = &DAT_00106480;\n  }" if (parenthesized_expression "(_rl_isearch_terminators == (undefined *)0x0)" ( (binary_expression "_rl_isearch_terminators == (undefined *)0x0" identifier == (cast_expression "(undefined *)0x0" ( (type_descriptor "undefined *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    puVar4 = &DAT_00106480;\n  }" { (expression_statement "puVar4 = &DAT_00106480;" (assignment_expression "puVar4 = &DAT_00106480" identifier = (pointer_expression "&DAT_00106480" & identifier)) ;) })) (expression_statement "*(undefined **)(iVar3 + 0x80) = puVar4;" (assignment_expression "*(undefined **)(iVar3 + 0x80) = puVar4" (pointer_expression "*(undefined **)(iVar3 + 0x80)" * (cast_expression "(undefined **)(iVar3 + 0x80)" ( (type_descriptor "undefined **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(iVar3 + 0x80)" ( (binary_expression "iVar3 + 0x80" identifier + number_literal) )))) = identifier) ;) (expression_statement "piVar5 = (int *)history_list();" (assignment_expression "piVar5 = (int *)history_list()" identifier = (cast_expression "(int *)history_list()" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "history_list()" identifier (argument_list "()" ( ))))) ;) (expression_statement "rl_maybe_replace_line();" (call_expression "rl_maybe_replace_line()" identifier (argument_list "()" ( ))) ;) (if_statement "if ((piVar5 == (int *)0x0) || (*piVar5 == 0)) {\n    iVar13 = 4;\n    iVar10 = 0;\n  }\n  else {\n    iVar10 = 0;\n    do {\n      iVar13 = iVar10;\n      iVar10 = iVar13 + 1;\n    } while (piVar5[iVar10] != 0);\n    iVar13 = iVar13 * 4 + 8;\n  }" if (parenthesized_expression "((piVar5 == (int *)0x0) || (*piVar5 == 0))" ( (binary_expression "(piVar5 == (int *)0x0) || (*piVar5 == 0)" (parenthesized_expression "(piVar5 == (int *)0x0)" ( (binary_expression "piVar5 == (int *)0x0" identifier == (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) || (parenthesized_expression "(*piVar5 == 0)" ( (binary_expression "*piVar5 == 0" (pointer_expression "*piVar5" * identifier) == number_literal) ))) )) (compound_statement "{\n    iVar13 = 4;\n    iVar10 = 0;\n  }" { (expression_statement "iVar13 = 4;" (assignment_expression "iVar13 = 4" identifier = number_literal) ;) (expression_statement "iVar10 = 0;" (assignment_expression "iVar10 = 0" identifier = number_literal) ;) }) (else_clause "else {\n    iVar10 = 0;\n    do {\n      iVar13 = iVar10;\n      iVar10 = iVar13 + 1;\n    } while (piVar5[iVar10] != 0);\n    iVar13 = iVar13 * 4 + 8;\n  }" else (compound_statement "{\n    iVar10 = 0;\n    do {\n      iVar13 = iVar10;\n      iVar10 = iVar13 + 1;\n    } while (piVar5[iVar10] != 0);\n    iVar13 = iVar13 * 4 + 8;\n  }" { (expression_statement "iVar10 = 0;" (assignment_expression "iVar10 = 0" identifier = number_literal) ;) (do_statement "do {\n      iVar13 = iVar10;\n      iVar10 = iVar13 + 1;\n    } while (piVar5[iVar10] != 0);" do (compound_statement "{\n      iVar13 = iVar10;\n      iVar10 = iVar13 + 1;\n    }" { (expression_statement "iVar13 = iVar10;" (assignment_expression "iVar13 = iVar10" identifier = identifier) ;) (expression_statement "iVar10 = iVar13 + 1;" (assignment_expression "iVar10 = iVar13 + 1" identifier = (binary_expression "iVar13 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(piVar5[iVar10] != 0)" ( (binary_expression "piVar5[iVar10] != 0" (subscript_expression "piVar5[iVar10]" identifier [ identifier ]) != number_literal) )) ;) (expression_statement "iVar13 = iVar13 * 4 + 8;" (assignment_expression "iVar13 = iVar13 * 4 + 8" identifier = (binary_expression "iVar13 * 4 + 8" (binary_expression "iVar13 * 4" identifier * number_literal) + number_literal)) ;) }))) (expression_statement "*(int *)(iVar3 + 0x1c) = iVar10;" (assignment_expression "*(int *)(iVar3 + 0x1c) = iVar10" (pointer_expression "*(int *)(iVar3 + 0x1c)" * (cast_expression "(int *)(iVar3 + 0x1c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + 0x1c)" ( (binary_expression "iVar3 + 0x1c" identifier + number_literal) )))) = identifier) ;) (expression_statement "puVar6 = (undefined4 *)xmalloc(iVar13);" (assignment_expression "puVar6 = (undefined4 *)xmalloc(iVar13)" identifier = (cast_expression "(undefined4 *)xmalloc(iVar13)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "xmalloc(iVar13)" identifier (argument_list "(iVar13)" ( identifier ))))) ;) (expression_statement "local_2c = *(int *)(iVar3 + 0x1c);" (assignment_expression "local_2c = *(int *)(iVar3 + 0x1c)" identifier = (pointer_expression "*(int *)(iVar3 + 0x1c)" * (cast_expression "(int *)(iVar3 + 0x1c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + 0x1c)" ( (binary_expression "iVar3 + 0x1c" identifier + number_literal) ))))) ;) (expression_statement "*(undefined4 **)(iVar3 + 0x14) = puVar6;" (assignment_expression "*(undefined4 **)(iVar3 + 0x14) = puVar6" (pointer_expression "*(undefined4 **)(iVar3 + 0x14)" * (cast_expression "(undefined4 **)(iVar3 + 0x14)" ( (type_descriptor "undefined4 **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(iVar3 + 0x14)" ( (binary_expression "iVar3 + 0x14" identifier + number_literal) )))) = identifier) ;) (if_statement "if (local_2c < 1) {\n    local_28 = 0;\n  }\n  else {\n    local_28 = local_2c * 4;\n    piVar1 = piVar5 + local_2c;\n    puVar12 = puVar6;\n    do {\n      puVar2 = (undefined4 *)*piVar5;\n      piVar5 = piVar5 + 1;\n      *puVar12 = *puVar2;\n      puVar12 = puVar12 + 1;\n    } while (piVar1 != piVar5);\n  }" if (parenthesized_expression "(local_2c < 1)" ( (binary_expression "local_2c < 1" identifier < number_literal) )) (compound_statement "{\n    local_28 = 0;\n  }" { (expression_statement "local_28 = 0;" (assignment_expression "local_28 = 0" identifier = number_literal) ;) }) (else_clause "else {\n    local_28 = local_2c * 4;\n    piVar1 = piVar5 + local_2c;\n    puVar12 = puVar6;\n    do {\n      puVar2 = (undefined4 *)*piVar5;\n      piVar5 = piVar5 + 1;\n      *puVar12 = *puVar2;\n      puVar12 = puVar12 + 1;\n    } while (piVar1 != piVar5);\n  }" else (compound_statement "{\n    local_28 = local_2c * 4;\n    piVar1 = piVar5 + local_2c;\n    puVar12 = puVar6;\n    do {\n      puVar2 = (undefined4 *)*piVar5;\n      piVar5 = piVar5 + 1;\n      *puVar12 = *puVar2;\n      puVar12 = puVar12 + 1;\n    } while (piVar1 != piVar5);\n  }" { (expression_statement "local_28 = local_2c * 4;" (assignment_expression "local_28 = local_2c * 4" identifier = (binary_expression "local_2c * 4" identifier * number_literal)) ;) (expression_statement "piVar1 = piVar5 + local_2c;" (assignment_expression "piVar1 = piVar5 + local_2c" identifier = (binary_expression "piVar5 + local_2c" identifier + identifier)) ;) (expression_statement "puVar12 = puVar6;" (assignment_expression "puVar12 = puVar6" identifier = identifier) ;) (do_statement "do {\n      puVar2 = (undefined4 *)*piVar5;\n      piVar5 = piVar5 + 1;\n      *puVar12 = *puVar2;\n      puVar12 = puVar12 + 1;\n    } while (piVar1 != piVar5);" do (compound_statement "{\n      puVar2 = (undefined4 *)*piVar5;\n      piVar5 = piVar5 + 1;\n      *puVar12 = *puVar2;\n      puVar12 = puVar12 + 1;\n    }" { (expression_statement "puVar2 = (undefined4 *)*piVar5;" (assignment_expression "puVar2 = (undefined4 *)*piVar5" identifier = (cast_expression "(undefined4 *)*piVar5" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "*piVar5" * identifier))) ;) (expression_statement "piVar5 = piVar5 + 1;" (assignment_expression "piVar5 = piVar5 + 1" identifier = (binary_expression "piVar5 + 1" identifier + number_literal)) ;) (expression_statement "*puVar12 = *puVar2;" (assignment_expression "*puVar12 = *puVar2" (pointer_expression "*puVar12" * identifier) = (pointer_expression "*puVar2" * identifier)) ;) (expression_statement "puVar12 = puVar12 + 1;" (assignment_expression "puVar12 = puVar12 + 1" identifier = (binary_expression "puVar12 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(piVar1 != piVar5)" ( (binary_expression "piVar1 != piVar5" identifier != identifier) )) ;) }))) (if_statement "if (_rl_saved_line_for_history == (undefined4 *)0x0) {\n    sVar8 = strlen(rl_line_buffer);\n    pcVar11 = (char *)xmalloc(sVar8 + 1);\n    *(char **)(iVar3 + 0x18) = pcVar11;\n    strcpy(pcVar11,rl_line_buffer);\n    *(undefined4 *)(*(int *)(iVar3 + 0x14) + local_28) = *(undefined4 *)(iVar3 + 0x18);\n    local_2c = *(int *)(iVar3 + 0x1c);\n  }\n  else {\n    *(undefined4 *)((int)puVar6 + local_28) = *_rl_saved_line_for_history;\n  }" if (parenthesized_expression "(_rl_saved_line_for_history == (undefined4 *)0x0)" ( (binary_expression "_rl_saved_line_for_history == (undefined4 *)0x0" identifier == (cast_expression "(undefined4 *)0x0" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    sVar8 = strlen(rl_line_buffer);\n    pcVar11 = (char *)xmalloc(sVar8 + 1);\n    *(char **)(iVar3 + 0x18) = pcVar11;\n    strcpy(pcVar11,rl_line_buffer);\n    *(undefined4 *)(*(int *)(iVar3 + 0x14) + local_28) = *(undefined4 *)(iVar3 + 0x18);\n    local_2c = *(int *)(iVar3 + 0x1c);\n  }" { (expression_statement "sVar8 = strlen(rl_line_buffer);" (assignment_expression "sVar8 = strlen(rl_line_buffer)" identifier = (call_expression "strlen(rl_line_buffer)" identifier (argument_list "(rl_line_buffer)" ( identifier )))) ;) (expression_statement "pcVar11 = (char *)xmalloc(sVar8 + 1);" (assignment_expression "pcVar11 = (char *)xmalloc(sVar8 + 1)" identifier = (cast_expression "(char *)xmalloc(sVar8 + 1)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "xmalloc(sVar8 + 1)" identifier (argument_list "(sVar8 + 1)" ( (binary_expression "sVar8 + 1" identifier + number_literal) ))))) ;) (expression_statement "*(char **)(iVar3 + 0x18) = pcVar11;" (assignment_expression "*(char **)(iVar3 + 0x18) = pcVar11" (pointer_expression "*(char **)(iVar3 + 0x18)" * (cast_expression "(char **)(iVar3 + 0x18)" ( (type_descriptor "char **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(iVar3 + 0x18)" ( (binary_expression "iVar3 + 0x18" identifier + number_literal) )))) = identifier) ;) (expression_statement "strcpy(pcVar11,rl_line_buffer);" (call_expression "strcpy(pcVar11,rl_line_buffer)" identifier (argument_list "(pcVar11,rl_line_buffer)" ( identifier , identifier ))) ;) (expression_statement "*(undefined4 *)(*(int *)(iVar3 + 0x14) + local_28) = *(undefined4 *)(iVar3 + 0x18);" (assignment_expression "*(undefined4 *)(*(int *)(iVar3 + 0x14) + local_28) = *(undefined4 *)(iVar3 + 0x18)" (pointer_expression "*(undefined4 *)(*(int *)(iVar3 + 0x14) + local_28)" * (cast_expression "(undefined4 *)(*(int *)(iVar3 + 0x14) + local_28)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)(iVar3 + 0x14) + local_28)" ( (binary_expression "*(int *)(iVar3 + 0x14) + local_28" (pointer_expression "*(int *)(iVar3 + 0x14)" * (cast_expression "(int *)(iVar3 + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + 0x14)" ( (binary_expression "iVar3 + 0x14" identifier + number_literal) )))) + identifier) )))) = (pointer_expression "*(undefined4 *)(iVar3 + 0x18)" * (cast_expression "(undefined4 *)(iVar3 + 0x18)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + 0x18)" ( (binary_expression "iVar3 + 0x18" identifier + number_literal) ))))) ;) (expression_statement "local_2c = *(int *)(iVar3 + 0x1c);" (assignment_expression "local_2c = *(int *)(iVar3 + 0x1c)" identifier = (pointer_expression "*(int *)(iVar3 + 0x1c)" * (cast_expression "(int *)(iVar3 + 0x1c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + 0x1c)" ( (binary_expression "iVar3 + 0x1c" identifier + number_literal) ))))) ;) }) (else_clause "else {\n    *(undefined4 *)((int)puVar6 + local_28) = *_rl_saved_line_for_history;\n  }" else (compound_statement "{\n    *(undefined4 *)((int)puVar6 + local_28) = *_rl_saved_line_for_history;\n  }" { (expression_statement "*(undefined4 *)((int)puVar6 + local_28) = *_rl_saved_line_for_history;" (assignment_expression "*(undefined4 *)((int)puVar6 + local_28) = *_rl_saved_line_for_history" (pointer_expression "*(undefined4 *)((int)puVar6 + local_28)" * (cast_expression "(undefined4 *)((int)puVar6 + local_28)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)puVar6 + local_28)" ( (binary_expression "(int)puVar6 + local_28" (cast_expression "(int)puVar6" ( (type_descriptor "int" primitive_type) ) identifier) + identifier) )))) = (pointer_expression "*_rl_saved_line_for_history" * identifier)) ;) }))) (expression_statement "*(int *)(iVar3 + 0x1c) = local_2c + 1;" (assignment_expression "*(int *)(iVar3 + 0x1c) = local_2c + 1" (pointer_expression "*(int *)(iVar3 + 0x1c)" * (cast_expression "(int *)(iVar3 + 0x1c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + 0x1c)" ( (binary_expression "iVar3 + 0x1c" identifier + number_literal) )))) = (binary_expression "local_2c + 1" identifier + number_literal)) ;) (expression_statement "*(undefined4 *)(iVar3 + 0x44) = *(undefined4 *)(iVar3 + 0x2c);" (assignment_expression "*(undefined4 *)(iVar3 + 0x44) = *(undefined4 *)(iVar3 + 0x2c)" (pointer_expression "*(undefined4 *)(iVar3 + 0x44)" * (cast_expression "(undefined4 *)(iVar3 + 0x44)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + 0x44)" ( (binary_expression "iVar3 + 0x44" identifier + number_literal) )))) = (pointer_expression "*(undefined4 *)(iVar3 + 0x2c)" * (cast_expression "(undefined4 *)(iVar3 + 0x2c)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + 0x2c)" ( (binary_expression "iVar3 + 0x2c" identifier + number_literal) ))))) ;) (expression_statement "rl_save_prompt();" (call_expression "rl_save_prompt()" identifier (argument_list "()" ( ))) ;) (expression_statement "*(undefined4 *)(iVar3 + 0x10) = 0x80;" (assignment_expression "*(undefined4 *)(iVar3 + 0x10) = 0x80" (pointer_expression "*(undefined4 *)(iVar3 + 0x10)" * (cast_expression "(undefined4 *)(iVar3 + 0x10)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + 0x10)" ( (binary_expression "iVar3 + 0x10" identifier + number_literal) )))) = number_literal) ;) (expression_statement "puVar7 = (undefined1 *)xmalloc(0x80);" (assignment_expression "puVar7 = (undefined1 *)xmalloc(0x80)" identifier = (cast_expression "(undefined1 *)xmalloc(0x80)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "xmalloc(0x80)" identifier (argument_list "(0x80)" ( number_literal ))))) ;) (expression_statement "*(undefined4 *)(iVar3 + 0xc) = 0;" (assignment_expression "*(undefined4 *)(iVar3 + 0xc) = 0" (pointer_expression "*(undefined4 *)(iVar3 + 0xc)" * (cast_expression "(undefined4 *)(iVar3 + 0xc)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + 0xc)" ( (binary_expression "iVar3 + 0xc" identifier + number_literal) )))) = number_literal) ;) (expression_statement "*(undefined1 **)(iVar3 + 8) = puVar7;" (assignment_expression "*(undefined1 **)(iVar3 + 8) = puVar7" (pointer_expression "*(undefined1 **)(iVar3 + 8)" * (cast_expression "(undefined1 **)(iVar3 + 8)" ( (type_descriptor "undefined1 **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(iVar3 + 8)" ( (binary_expression "iVar3 + 8" identifier + number_literal) )))) = identifier) ;) (expression_statement "*puVar7 = 0;" (assignment_expression "*puVar7 = 0" (pointer_expression "*puVar7" * identifier) = number_literal) ;) (expression_statement "*(uint *)(iVar3 + 0x48) = param_1 >> 0x1f | 1;" (assignment_expression "*(uint *)(iVar3 + 0x48) = param_1 >> 0x1f | 1" (pointer_expression "*(uint *)(iVar3 + 0x48)" * (cast_expression "(uint *)(iVar3 + 0x48)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + 0x48)" ( (binary_expression "iVar3 + 0x48" identifier + number_literal) )))) = (binary_expression "param_1 >> 0x1f | 1" (binary_expression "param_1 >> 0x1f" identifier >> number_literal) | number_literal)) ;) (expression_statement "pcVar11 = rl_line_buffer;" (assignment_expression "pcVar11 = rl_line_buffer" identifier = identifier) ;) (expression_statement "*(char **)(iVar3 + 0x74) = rl_line_buffer;" (assignment_expression "*(char **)(iVar3 + 0x74) = rl_line_buffer" (pointer_expression "*(char **)(iVar3 + 0x74)" * (cast_expression "(char **)(iVar3 + 0x74)" ( (type_descriptor "char **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(iVar3 + 0x74)" ( (binary_expression "iVar3 + 0x74" identifier + number_literal) )))) = identifier) ;) (expression_statement "sVar8 = strlen(pcVar11);" (assignment_expression "sVar8 = strlen(pcVar11)" identifier = (call_expression "strlen(pcVar11)" identifier (argument_list "(pcVar11)" ( identifier )))) ;) (expression_statement "_rl_iscxt = iVar3;" (assignment_expression "_rl_iscxt = iVar3" identifier = identifier) ;) (expression_statement "*(size_t *)(iVar3 + 0x78) = sVar8;" (assignment_expression "*(size_t *)(iVar3 + 0x78) = sVar8" (pointer_expression "*(size_t *)(iVar3 + 0x78)" * (cast_expression "(size_t *)(iVar3 + 0x78)" ( (type_descriptor "size_t *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + 0x78)" ( (binary_expression "iVar3 + 0x78" identifier + number_literal) )))) = identifier) ;) (expression_statement "*(undefined4 *)(iVar3 + 0x7c) = rl_point;" (assignment_expression "*(undefined4 *)(iVar3 + 0x7c) = rl_point" (pointer_expression "*(undefined4 *)(iVar3 + 0x7c)" * (cast_expression "(undefined4 *)(iVar3 + 0x7c)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + 0x7c)" ( (binary_expression "iVar3 + 0x7c" identifier + number_literal) )))) = identifier) ;) (expression_statement "FUN_000d5450();" (call_expression "FUN_000d5450()" identifier (argument_list "()" ( ))) ;) (expression_statement "uVar9 = 0;" (assignment_expression "uVar9 = 0" identifier = number_literal) ;) (if_statement "if ((rl_readline_state & 0x80000) == 0) {\n    do {\n      _rl_search_getchar(iVar3);\n      iVar10 = _rl_isearch_dispatch(iVar3,*(undefined4 *)(iVar3 + 0x50));\n    } while (0 < iVar10);\n    uVar9 = _rl_isearch_cleanup(iVar3,iVar10);\n  }" if (parenthesized_expression "((rl_readline_state & 0x80000) == 0)" ( (binary_expression "(rl_readline_state & 0x80000) == 0" (parenthesized_expression "(rl_readline_state & 0x80000)" ( (binary_expression "rl_readline_state & 0x80000" identifier & number_literal) )) == number_literal) )) (compound_statement "{\n    do {\n      _rl_search_getchar(iVar3);\n      iVar10 = _rl_isearch_dispatch(iVar3,*(undefined4 *)(iVar3 + 0x50));\n    } while (0 < iVar10);\n    uVar9 = _rl_isearch_cleanup(iVar3,iVar10);\n  }" { (do_statement "do {\n      _rl_search_getchar(iVar3);\n      iVar10 = _rl_isearch_dispatch(iVar3,*(undefined4 *)(iVar3 + 0x50));\n    } while (0 < iVar10);" do (compound_statement "{\n      _rl_search_getchar(iVar3);\n      iVar10 = _rl_isearch_dispatch(iVar3,*(undefined4 *)(iVar3 + 0x50));\n    }" { (expression_statement "_rl_search_getchar(iVar3);" (call_expression "_rl_search_getchar(iVar3)" identifier (argument_list "(iVar3)" ( identifier ))) ;) (expression_statement "iVar10 = _rl_isearch_dispatch(iVar3,*(undefined4 *)(iVar3 + 0x50));" (assignment_expression "iVar10 = _rl_isearch_dispatch(iVar3,*(undefined4 *)(iVar3 + 0x50))" identifier = (call_expression "_rl_isearch_dispatch(iVar3,*(undefined4 *)(iVar3 + 0x50))" identifier (argument_list "(iVar3,*(undefined4 *)(iVar3 + 0x50))" ( identifier , (pointer_expression "*(undefined4 *)(iVar3 + 0x50)" * (cast_expression "(undefined4 *)(iVar3 + 0x50)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + 0x50)" ( (binary_expression "iVar3 + 0x50" identifier + number_literal) )))) )))) ;) }) while (parenthesized_expression "(0 < iVar10)" ( (binary_expression "0 < iVar10" number_literal < identifier) )) ;) (expression_statement "uVar9 = _rl_isearch_cleanup(iVar3,iVar10);" (assignment_expression "uVar9 = _rl_isearch_cleanup(iVar3,iVar10)" identifier = (call_expression "_rl_isearch_cleanup(iVar3,iVar10)" identifier (argument_list "(iVar3,iVar10)" ( identifier , identifier )))) ;) })) (return_statement "return uVar9;" return identifier ;) })))
(translation_unit (function_definition TYPE (ERROR IDENT) (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE 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 = (binary_expression IDENT | LIT)) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( LIT , LIT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < LIT) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) | LIT)) ;) })) (expression_statement (assignment_expression IDENT = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (assignment_expression IDENT = (pointer_expression & IDENT)) ;) })) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( ))))) ;) (expression_statement (call_expression IDENT (argument_list ( ))) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) || (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) == LIT) ))) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) }) while (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ IDENT ]) != LIT) )) ;) (expression_statement (assignment_expression IDENT = (binary_expression (binary_expression IDENT * LIT) + LIT)) ;) }))) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( IDENT ))))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT * LIT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + IDENT)) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (pointer_expression * IDENT))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = (pointer_expression * IDENT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) }) while (parenthesized_expression ( (binary_expression IDENT != IDENT) )) ;) }))) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT ))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) + IDENT) )))) = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) + IDENT) )))) = (pointer_expression * IDENT)) ;) }))) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (call_expression IDENT (argument_list ( ))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = LIT) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( LIT ))))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = LIT) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = LIT) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = (binary_expression (binary_expression IDENT >> LIT) | LIT)) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) (expression_statement (call_expression IDENT (argument_list ( ))) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT & LIT) )) == LIT) )) (compound_statement { (do_statement do (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) )))) ;) }) while (parenthesized_expression ( (binary_expression LIT < IDENT) )) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT )))) ;) })) (return_statement return IDENT ;) })))
(function_definition "undefined4 __regparm3 FUN_000d64e0(int param_1)\n\n{\n  int *piVar1;\n  undefined4 *puVar2;\n  int iVar3;\n  undefined *puVar4;\n  int *piVar5;\n  undefined4 *puVar6;\n  undefined1 *puVar7;\n  size_t sVar8;\n  undefined4 uVar9;\n  int iVar10;\n  char *pcVar11;\n  undefined4 *puVar12;\n  int iVar13;\n  int local_2c;\n  int local_28;\n  \n  rl_readline_state = rl_readline_state | 0x80;\n  iVar3 = _rl_scxt_alloc(1,0);\n  if (param_1 < 0) {\n    *(uint *)(iVar3 + 4) = *(uint *)(iVar3 + 4) | 1;\n  }\n  puVar4 = _rl_isearch_terminators;\n  if (_rl_isearch_terminators == (undefined *)0x0) {\n    puVar4 = &DAT_00106480;\n  }\n  *(undefined **)(iVar3 + 0x80) = puVar4;\n  piVar5 = (int *)history_list();\n  rl_maybe_replace_line();\n  if ((piVar5 == (int *)0x0) || (*piVar5 == 0)) {\n    iVar13 = 4;\n    iVar10 = 0;\n  }\n  else {\n    iVar10 = 0;\n    do {\n      iVar13 = iVar10;\n      iVar10 = iVar13 + 1;\n    } while (piVar5[iVar10] != 0);\n    iVar13 = iVar13 * 4 + 8;\n  }\n  *(int *)(iVar3 + 0x1c) = iVar10;\n  puVar6 = (undefined4 *)xmalloc(iVar13);\n  local_2c = *(int *)(iVar3 + 0x1c);\n  *(undefined4 **)(iVar3 + 0x14) = puVar6;\n  if (local_2c < 1) {\n    local_28 = 0;\n  }\n  else {\n    local_28 = local_2c * 4;\n    piVar1 = piVar5 + local_2c;\n    puVar12 = puVar6;\n    do {\n      puVar2 = (undefined4 *)*piVar5;\n      piVar5 = piVar5 + 1;\n      *puVar12 = *puVar2;\n      puVar12 = puVar12 + 1;\n    } while (piVar1 != piVar5);\n  }\n  if (_rl_saved_line_for_history == (undefined4 *)0x0) {\n    sVar8 = strlen(rl_line_buffer);\n    pcVar11 = (char *)xmalloc(sVar8 + 1);\n    *(char **)(iVar3 + 0x18) = pcVar11;\n    strcpy(pcVar11,rl_line_buffer);\n    *(undefined4 *)(*(int *)(iVar3 + 0x14) + local_28) = *(undefined4 *)(iVar3 + 0x18);\n    local_2c = *(int *)(iVar3 + 0x1c);\n  }\n  else {\n    *(undefined4 *)((int)puVar6 + local_28) = *_rl_saved_line_for_history;\n  }\n  *(int *)(iVar3 + 0x1c) = local_2c + 1;\n  *(undefined4 *)(iVar3 + 0x44) = *(undefined4 *)(iVar3 + 0x2c);\n  rl_save_prompt();\n  *(undefined4 *)(iVar3 + 0x10) = 0x80;\n  puVar7 = (undefined1 *)xmalloc(0x80);\n  *(undefined4 *)(iVar3 + 0xc) = 0;\n  *(undefined1 **)(iVar3 + 8) = puVar7;\n  *puVar7 = 0;\n  *(uint *)(iVar3 + 0x48) = param_1 >> 0x1f | 1;\n  pcVar11 = rl_line_buffer;\n  *(char **)(iVar3 + 0x74) = rl_line_buffer;\n  sVar8 = strlen(pcVar11);\n  _rl_iscxt = iVar3;\n  *(size_t *)(iVar3 + 0x78) = sVar8;\n  *(undefined4 *)(iVar3 + 0x7c) = rl_point;\n  FUN_000d5450();\n  uVar9 = 0;\n  if ((rl_readline_state & 0x80000) == 0) {\n    do {\n      _rl_search_getchar(iVar3);\n      iVar10 = _rl_isearch_dispatch(iVar3,*(undefined4 *)(iVar3 + 0x50));\n    } while (0 < iVar10);\n    uVar9 = _rl_isearch_cleanup(iVar3,iVar10);\n  }\n  return uVar9;\n}" (type_identifier "undefined4") (ERROR "__regparm3" (identifier "__regparm3")) (function_declarator "FUN_000d64e0(int param_1)" (identifier "FUN_000d64e0") (parameter_list "(int param_1)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) () ")"))) (compound_statement "{\n  int *piVar1;\n  undefined4 *puVar2;\n  int iVar3;\n  undefined *puVar4;\n  int *piVar5;\n  undefined4 *puVar6;\n  undefined1 *puVar7;\n  size_t sVar8;\n  undefined4 uVar9;\n  int iVar10;\n  char *pcVar11;\n  undefined4 *puVar12;\n  int iVar13;\n  int local_2c;\n  int local_28;\n  \n  rl_readline_state = rl_readline_state | 0x80;\n  iVar3 = _rl_scxt_alloc(1,0);\n  if (param_1 < 0) {\n    *(uint *)(iVar3 + 4) = *(uint *)(iVar3 + 4) | 1;\n  }\n  puVar4 = _rl_isearch_terminators;\n  if (_rl_isearch_terminators == (undefined *)0x0) {\n    puVar4 = &DAT_00106480;\n  }\n  *(undefined **)(iVar3 + 0x80) = puVar4;\n  piVar5 = (int *)history_list();\n  rl_maybe_replace_line();\n  if ((piVar5 == (int *)0x0) || (*piVar5 == 0)) {\n    iVar13 = 4;\n    iVar10 = 0;\n  }\n  else {\n    iVar10 = 0;\n    do {\n      iVar13 = iVar10;\n      iVar10 = iVar13 + 1;\n    } while (piVar5[iVar10] != 0);\n    iVar13 = iVar13 * 4 + 8;\n  }\n  *(int *)(iVar3 + 0x1c) = iVar10;\n  puVar6 = (undefined4 *)xmalloc(iVar13);\n  local_2c = *(int *)(iVar3 + 0x1c);\n  *(undefined4 **)(iVar3 + 0x14) = puVar6;\n  if (local_2c < 1) {\n    local_28 = 0;\n  }\n  else {\n    local_28 = local_2c * 4;\n    piVar1 = piVar5 + local_2c;\n    puVar12 = puVar6;\n    do {\n      puVar2 = (undefined4 *)*piVar5;\n      piVar5 = piVar5 + 1;\n      *puVar12 = *puVar2;\n      puVar12 = puVar12 + 1;\n    } while (piVar1 != piVar5);\n  }\n  if (_rl_saved_line_for_history == (undefined4 *)0x0) {\n    sVar8 = strlen(rl_line_buffer);\n    pcVar11 = (char *)xmalloc(sVar8 + 1);\n    *(char **)(iVar3 + 0x18) = pcVar11;\n    strcpy(pcVar11,rl_line_buffer);\n    *(undefined4 *)(*(int *)(iVar3 + 0x14) + local_28) = *(undefined4 *)(iVar3 + 0x18);\n    local_2c = *(int *)(iVar3 + 0x1c);\n  }\n  else {\n    *(undefined4 *)((int)puVar6 + local_28) = *_rl_saved_line_for_history;\n  }\n  *(int *)(iVar3 + 0x1c) = local_2c + 1;\n  *(undefined4 *)(iVar3 + 0x44) = *(undefined4 *)(iVar3 + 0x2c);\n  rl_save_prompt();\n  *(undefined4 *)(iVar3 + 0x10) = 0x80;\n  puVar7 = (undefined1 *)xmalloc(0x80);\n  *(undefined4 *)(iVar3 + 0xc) = 0;\n  *(undefined1 **)(iVar3 + 8) = puVar7;\n  *puVar7 = 0;\n  *(uint *)(iVar3 + 0x48) = param_1 >> 0x1f | 1;\n  pcVar11 = rl_line_buffer;\n  *(char **)(iVar3 + 0x74) = rl_line_buffer;\n  sVar8 = strlen(pcVar11);\n  _rl_iscxt = iVar3;\n  *(size_t *)(iVar3 + 0x78) = sVar8;\n  *(undefined4 *)(iVar3 + 0x7c) = rl_point;\n  FUN_000d5450();\n  uVar9 = 0;\n  if ((rl_readline_state & 0x80000) == 0) {\n    do {\n      _rl_search_getchar(iVar3);\n      iVar10 = _rl_isearch_dispatch(iVar3,*(undefined4 *)(iVar3 + 0x50));\n    } while (0 < iVar10);\n    uVar9 = _rl_isearch_cleanup(iVar3,iVar10);\n  }\n  return uVar9;\n}" ({ "{") (declaration "int *piVar1;" (primitive_type "int") (pointer_declarator "*piVar1" (* "*") (identifier "piVar1")) (; ";")) (declaration "undefined4 *puVar2;" (type_identifier "undefined4") (pointer_declarator "*puVar2" (* "*") (identifier "puVar2")) (; ";")) (declaration "int iVar3;" (primitive_type "int") (identifier "iVar3") (; ";")) (declaration "undefined *puVar4;" (type_identifier "undefined") (pointer_declarator "*puVar4" (* "*") (identifier "puVar4")) (; ";")) (declaration "int *piVar5;" (primitive_type "int") (pointer_declarator "*piVar5" (* "*") (identifier "piVar5")) (; ";")) (declaration "undefined4 *puVar6;" (type_identifier "undefined4") (pointer_declarator "*puVar6" (* "*") (identifier "puVar6")) (; ";")) (declaration "undefined1 *puVar7;" (type_identifier "undefined1") (pointer_declarator "*puVar7" (* "*") (identifier "puVar7")) (; ";")) (declaration "size_t sVar8;" (primitive_type "size_t") (identifier "sVar8") (; ";")) (declaration "undefined4 uVar9;" (type_identifier "undefined4") (identifier "uVar9") (; ";")) (declaration "int iVar10;" (primitive_type "int") (identifier "iVar10") (; ";")) (declaration "char *pcVar11;" (primitive_type "char") (pointer_declarator "*pcVar11" (* "*") (identifier "pcVar11")) (; ";")) (declaration "undefined4 *puVar12;" (type_identifier "undefined4") (pointer_declarator "*puVar12" (* "*") (identifier "puVar12")) (; ";")) (declaration "int iVar13;" (primitive_type "int") (identifier "iVar13") (; ";")) (declaration "int local_2c;" (primitive_type "int") (identifier "local_2c") (; ";")) (declaration "int local_28;" (primitive_type "int") (identifier "local_28") (; ";")) (expression_statement "rl_readline_state = rl_readline_state | 0x80;" (assignment_expression "rl_readline_state = rl_readline_state | 0x80" (identifier "rl_readline_state") (= "=") (binary_expression "rl_readline_state | 0x80" (identifier "rl_readline_state") (| "|") (number_literal "0x80"))) (; ";")) (expression_statement "iVar3 = _rl_scxt_alloc(1,0);" (assignment_expression "iVar3 = _rl_scxt_alloc(1,0)" (identifier "iVar3") (= "=") (call_expression "_rl_scxt_alloc(1,0)" (identifier "_rl_scxt_alloc") (argument_list "(1,0)" (( "(") (number_literal "1") (, ",") (number_literal "0") () ")")))) (; ";")) (if_statement "if (param_1 < 0) {\n    *(uint *)(iVar3 + 4) = *(uint *)(iVar3 + 4) | 1;\n  }" (if "if") (parenthesized_expression "(param_1 < 0)" (( "(") (binary_expression "param_1 < 0" (identifier "param_1") (< "<") (number_literal "0")) () ")")) (compound_statement "{\n    *(uint *)(iVar3 + 4) = *(uint *)(iVar3 + 4) | 1;\n  }" ({ "{") (expression_statement "*(uint *)(iVar3 + 4) = *(uint *)(iVar3 + 4) | 1;" (assignment_expression "*(uint *)(iVar3 + 4) = *(uint *)(iVar3 + 4) | 1" (pointer_expression "*(uint *)(iVar3 + 4)" (* "*") (cast_expression "(uint *)(iVar3 + 4)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar3 + 4)" (( "(") (binary_expression "iVar3 + 4" (identifier "iVar3") (+ "+") (number_literal "4")) () ")")))) (= "=") (binary_expression "*(uint *)(iVar3 + 4) | 1" (pointer_expression "*(uint *)(iVar3 + 4)" (* "*") (cast_expression "(uint *)(iVar3 + 4)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar3 + 4)" (( "(") (binary_expression "iVar3 + 4" (identifier "iVar3") (+ "+") (number_literal "4")) () ")")))) (| "|") (number_literal "1"))) (; ";")) (} "}"))) (expression_statement "puVar4 = _rl_isearch_terminators;" (assignment_expression "puVar4 = _rl_isearch_terminators" (identifier "puVar4") (= "=") (identifier "_rl_isearch_terminators")) (; ";")) (if_statement "if (_rl_isearch_terminators == (undefined *)0x0) {\n    puVar4 = &DAT_00106480;\n  }" (if "if") (parenthesized_expression "(_rl_isearch_terminators == (undefined *)0x0)" (( "(") (binary_expression "_rl_isearch_terminators == (undefined *)0x0" (identifier "_rl_isearch_terminators") (== "==") (cast_expression "(undefined *)0x0" (( "(") (type_descriptor "undefined *" (type_identifier "undefined") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n    puVar4 = &DAT_00106480;\n  }" ({ "{") (expression_statement "puVar4 = &DAT_00106480;" (assignment_expression "puVar4 = &DAT_00106480" (identifier "puVar4") (= "=") (pointer_expression "&DAT_00106480" (& "&") (identifier "DAT_00106480"))) (; ";")) (} "}"))) (expression_statement "*(undefined **)(iVar3 + 0x80) = puVar4;" (assignment_expression "*(undefined **)(iVar3 + 0x80) = puVar4" (pointer_expression "*(undefined **)(iVar3 + 0x80)" (* "*") (cast_expression "(undefined **)(iVar3 + 0x80)" (( "(") (type_descriptor "undefined **" (type_identifier "undefined") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(iVar3 + 0x80)" (( "(") (binary_expression "iVar3 + 0x80" (identifier "iVar3") (+ "+") (number_literal "0x80")) () ")")))) (= "=") (identifier "puVar4")) (; ";")) (expression_statement "piVar5 = (int *)history_list();" (assignment_expression "piVar5 = (int *)history_list()" (identifier "piVar5") (= "=") (cast_expression "(int *)history_list()" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "history_list()" (identifier "history_list") (argument_list "()" (( "(") () ")"))))) (; ";")) (expression_statement "rl_maybe_replace_line();" (call_expression "rl_maybe_replace_line()" (identifier "rl_maybe_replace_line") (argument_list "()" (( "(") () ")"))) (; ";")) (if_statement "if ((piVar5 == (int *)0x0) || (*piVar5 == 0)) {\n    iVar13 = 4;\n    iVar10 = 0;\n  }\n  else {\n    iVar10 = 0;\n    do {\n      iVar13 = iVar10;\n      iVar10 = iVar13 + 1;\n    } while (piVar5[iVar10] != 0);\n    iVar13 = iVar13 * 4 + 8;\n  }" (if "if") (parenthesized_expression "((piVar5 == (int *)0x0) || (*piVar5 == 0))" (( "(") (binary_expression "(piVar5 == (int *)0x0) || (*piVar5 == 0)" (parenthesized_expression "(piVar5 == (int *)0x0)" (( "(") (binary_expression "piVar5 == (int *)0x0" (identifier "piVar5") (== "==") (cast_expression "(int *)0x0" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (|| "||") (parenthesized_expression "(*piVar5 == 0)" (( "(") (binary_expression "*piVar5 == 0" (pointer_expression "*piVar5" (* "*") (identifier "piVar5")) (== "==") (number_literal "0")) () ")"))) () ")")) (compound_statement "{\n    iVar13 = 4;\n    iVar10 = 0;\n  }" ({ "{") (expression_statement "iVar13 = 4;" (assignment_expression "iVar13 = 4" (identifier "iVar13") (= "=") (number_literal "4")) (; ";")) (expression_statement "iVar10 = 0;" (assignment_expression "iVar10 = 0" (identifier "iVar10") (= "=") (number_literal "0")) (; ";")) (} "}")) (else_clause "else {\n    iVar10 = 0;\n    do {\n      iVar13 = iVar10;\n      iVar10 = iVar13 + 1;\n    } while (piVar5[iVar10] != 0);\n    iVar13 = iVar13 * 4 + 8;\n  }" (else "else") (compound_statement "{\n    iVar10 = 0;\n    do {\n      iVar13 = iVar10;\n      iVar10 = iVar13 + 1;\n    } while (piVar5[iVar10] != 0);\n    iVar13 = iVar13 * 4 + 8;\n  }" ({ "{") (expression_statement "iVar10 = 0;" (assignment_expression "iVar10 = 0" (identifier "iVar10") (= "=") (number_literal "0")) (; ";")) (do_statement "do {\n      iVar13 = iVar10;\n      iVar10 = iVar13 + 1;\n    } while (piVar5[iVar10] != 0);" (do "do") (compound_statement "{\n      iVar13 = iVar10;\n      iVar10 = iVar13 + 1;\n    }" ({ "{") (expression_statement "iVar13 = iVar10;" (assignment_expression "iVar13 = iVar10" (identifier "iVar13") (= "=") (identifier "iVar10")) (; ";")) (expression_statement "iVar10 = iVar13 + 1;" (assignment_expression "iVar10 = iVar13 + 1" (identifier "iVar10") (= "=") (binary_expression "iVar13 + 1" (identifier "iVar13") (+ "+") (number_literal "1"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(piVar5[iVar10] != 0)" (( "(") (binary_expression "piVar5[iVar10] != 0" (subscript_expression "piVar5[iVar10]" (identifier "piVar5") ([ "[") (identifier "iVar10") (] "]")) (!= "!=") (number_literal "0")) () ")")) (; ";")) (expression_statement "iVar13 = iVar13 * 4 + 8;" (assignment_expression "iVar13 = iVar13 * 4 + 8" (identifier "iVar13") (= "=") (binary_expression "iVar13 * 4 + 8" (binary_expression "iVar13 * 4" (identifier "iVar13") (* "*") (number_literal "4")) (+ "+") (number_literal "8"))) (; ";")) (} "}")))) (expression_statement "*(int *)(iVar3 + 0x1c) = iVar10;" (assignment_expression "*(int *)(iVar3 + 0x1c) = iVar10" (pointer_expression "*(int *)(iVar3 + 0x1c)" (* "*") (cast_expression "(int *)(iVar3 + 0x1c)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar3 + 0x1c)" (( "(") (binary_expression "iVar3 + 0x1c" (identifier "iVar3") (+ "+") (number_literal "0x1c")) () ")")))) (= "=") (identifier "iVar10")) (; ";")) (expression_statement "puVar6 = (undefined4 *)xmalloc(iVar13);" (assignment_expression "puVar6 = (undefined4 *)xmalloc(iVar13)" (identifier "puVar6") (= "=") (cast_expression "(undefined4 *)xmalloc(iVar13)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "xmalloc(iVar13)" (identifier "xmalloc") (argument_list "(iVar13)" (( "(") (identifier "iVar13") () ")"))))) (; ";")) (expression_statement "local_2c = *(int *)(iVar3 + 0x1c);" (assignment_expression "local_2c = *(int *)(iVar3 + 0x1c)" (identifier "local_2c") (= "=") (pointer_expression "*(int *)(iVar3 + 0x1c)" (* "*") (cast_expression "(int *)(iVar3 + 0x1c)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar3 + 0x1c)" (( "(") (binary_expression "iVar3 + 0x1c" (identifier "iVar3") (+ "+") (number_literal "0x1c")) () ")"))))) (; ";")) (expression_statement "*(undefined4 **)(iVar3 + 0x14) = puVar6;" (assignment_expression "*(undefined4 **)(iVar3 + 0x14) = puVar6" (pointer_expression "*(undefined4 **)(iVar3 + 0x14)" (* "*") (cast_expression "(undefined4 **)(iVar3 + 0x14)" (( "(") (type_descriptor "undefined4 **" (type_identifier "undefined4") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(iVar3 + 0x14)" (( "(") (binary_expression "iVar3 + 0x14" (identifier "iVar3") (+ "+") (number_literal "0x14")) () ")")))) (= "=") (identifier "puVar6")) (; ";")) (if_statement "if (local_2c < 1) {\n    local_28 = 0;\n  }\n  else {\n    local_28 = local_2c * 4;\n    piVar1 = piVar5 + local_2c;\n    puVar12 = puVar6;\n    do {\n      puVar2 = (undefined4 *)*piVar5;\n      piVar5 = piVar5 + 1;\n      *puVar12 = *puVar2;\n      puVar12 = puVar12 + 1;\n    } while (piVar1 != piVar5);\n  }" (if "if") (parenthesized_expression "(local_2c < 1)" (( "(") (binary_expression "local_2c < 1" (identifier "local_2c") (< "<") (number_literal "1")) () ")")) (compound_statement "{\n    local_28 = 0;\n  }" ({ "{") (expression_statement "local_28 = 0;" (assignment_expression "local_28 = 0" (identifier "local_28") (= "=") (number_literal "0")) (; ";")) (} "}")) (else_clause "else {\n    local_28 = local_2c * 4;\n    piVar1 = piVar5 + local_2c;\n    puVar12 = puVar6;\n    do {\n      puVar2 = (undefined4 *)*piVar5;\n      piVar5 = piVar5 + 1;\n      *puVar12 = *puVar2;\n      puVar12 = puVar12 + 1;\n    } while (piVar1 != piVar5);\n  }" (else "else") (compound_statement "{\n    local_28 = local_2c * 4;\n    piVar1 = piVar5 + local_2c;\n    puVar12 = puVar6;\n    do {\n      puVar2 = (undefined4 *)*piVar5;\n      piVar5 = piVar5 + 1;\n      *puVar12 = *puVar2;\n      puVar12 = puVar12 + 1;\n    } while (piVar1 != piVar5);\n  }" ({ "{") (expression_statement "local_28 = local_2c * 4;" (assignment_expression "local_28 = local_2c * 4" (identifier "local_28") (= "=") (binary_expression "local_2c * 4" (identifier "local_2c") (* "*") (number_literal "4"))) (; ";")) (expression_statement "piVar1 = piVar5 + local_2c;" (assignment_expression "piVar1 = piVar5 + local_2c" (identifier "piVar1") (= "=") (binary_expression "piVar5 + local_2c" (identifier "piVar5") (+ "+") (identifier "local_2c"))) (; ";")) (expression_statement "puVar12 = puVar6;" (assignment_expression "puVar12 = puVar6" (identifier "puVar12") (= "=") (identifier "puVar6")) (; ";")) (do_statement "do {\n      puVar2 = (undefined4 *)*piVar5;\n      piVar5 = piVar5 + 1;\n      *puVar12 = *puVar2;\n      puVar12 = puVar12 + 1;\n    } while (piVar1 != piVar5);" (do "do") (compound_statement "{\n      puVar2 = (undefined4 *)*piVar5;\n      piVar5 = piVar5 + 1;\n      *puVar12 = *puVar2;\n      puVar12 = puVar12 + 1;\n    }" ({ "{") (expression_statement "puVar2 = (undefined4 *)*piVar5;" (assignment_expression "puVar2 = (undefined4 *)*piVar5" (identifier "puVar2") (= "=") (cast_expression "(undefined4 *)*piVar5" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (pointer_expression "*piVar5" (* "*") (identifier "piVar5")))) (; ";")) (expression_statement "piVar5 = piVar5 + 1;" (assignment_expression "piVar5 = piVar5 + 1" (identifier "piVar5") (= "=") (binary_expression "piVar5 + 1" (identifier "piVar5") (+ "+") (number_literal "1"))) (; ";")) (expression_statement "*puVar12 = *puVar2;" (assignment_expression "*puVar12 = *puVar2" (pointer_expression "*puVar12" (* "*") (identifier "puVar12")) (= "=") (pointer_expression "*puVar2" (* "*") (identifier "puVar2"))) (; ";")) (expression_statement "puVar12 = puVar12 + 1;" (assignment_expression "puVar12 = puVar12 + 1" (identifier "puVar12") (= "=") (binary_expression "puVar12 + 1" (identifier "puVar12") (+ "+") (number_literal "1"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(piVar1 != piVar5)" (( "(") (binary_expression "piVar1 != piVar5" (identifier "piVar1") (!= "!=") (identifier "piVar5")) () ")")) (; ";")) (} "}")))) (if_statement "if (_rl_saved_line_for_history == (undefined4 *)0x0) {\n    sVar8 = strlen(rl_line_buffer);\n    pcVar11 = (char *)xmalloc(sVar8 + 1);\n    *(char **)(iVar3 + 0x18) = pcVar11;\n    strcpy(pcVar11,rl_line_buffer);\n    *(undefined4 *)(*(int *)(iVar3 + 0x14) + local_28) = *(undefined4 *)(iVar3 + 0x18);\n    local_2c = *(int *)(iVar3 + 0x1c);\n  }\n  else {\n    *(undefined4 *)((int)puVar6 + local_28) = *_rl_saved_line_for_history;\n  }" (if "if") (parenthesized_expression "(_rl_saved_line_for_history == (undefined4 *)0x0)" (( "(") (binary_expression "_rl_saved_line_for_history == (undefined4 *)0x0" (identifier "_rl_saved_line_for_history") (== "==") (cast_expression "(undefined4 *)0x0" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n    sVar8 = strlen(rl_line_buffer);\n    pcVar11 = (char *)xmalloc(sVar8 + 1);\n    *(char **)(iVar3 + 0x18) = pcVar11;\n    strcpy(pcVar11,rl_line_buffer);\n    *(undefined4 *)(*(int *)(iVar3 + 0x14) + local_28) = *(undefined4 *)(iVar3 + 0x18);\n    local_2c = *(int *)(iVar3 + 0x1c);\n  }" ({ "{") (expression_statement "sVar8 = strlen(rl_line_buffer);" (assignment_expression "sVar8 = strlen(rl_line_buffer)" (identifier "sVar8") (= "=") (call_expression "strlen(rl_line_buffer)" (identifier "strlen") (argument_list "(rl_line_buffer)" (( "(") (identifier "rl_line_buffer") () ")")))) (; ";")) (expression_statement "pcVar11 = (char *)xmalloc(sVar8 + 1);" (assignment_expression "pcVar11 = (char *)xmalloc(sVar8 + 1)" (identifier "pcVar11") (= "=") (cast_expression "(char *)xmalloc(sVar8 + 1)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "xmalloc(sVar8 + 1)" (identifier "xmalloc") (argument_list "(sVar8 + 1)" (( "(") (binary_expression "sVar8 + 1" (identifier "sVar8") (+ "+") (number_literal "1")) () ")"))))) (; ";")) (expression_statement "*(char **)(iVar3 + 0x18) = pcVar11;" (assignment_expression "*(char **)(iVar3 + 0x18) = pcVar11" (pointer_expression "*(char **)(iVar3 + 0x18)" (* "*") (cast_expression "(char **)(iVar3 + 0x18)" (( "(") (type_descriptor "char **" (primitive_type "char") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(iVar3 + 0x18)" (( "(") (binary_expression "iVar3 + 0x18" (identifier "iVar3") (+ "+") (number_literal "0x18")) () ")")))) (= "=") (identifier "pcVar11")) (; ";")) (expression_statement "strcpy(pcVar11,rl_line_buffer);" (call_expression "strcpy(pcVar11,rl_line_buffer)" (identifier "strcpy") (argument_list "(pcVar11,rl_line_buffer)" (( "(") (identifier "pcVar11") (, ",") (identifier "rl_line_buffer") () ")"))) (; ";")) (expression_statement "*(undefined4 *)(*(int *)(iVar3 + 0x14) + local_28) = *(undefined4 *)(iVar3 + 0x18);" (assignment_expression "*(undefined4 *)(*(int *)(iVar3 + 0x14) + local_28) = *(undefined4 *)(iVar3 + 0x18)" (pointer_expression "*(undefined4 *)(*(int *)(iVar3 + 0x14) + local_28)" (* "*") (cast_expression "(undefined4 *)(*(int *)(iVar3 + 0x14) + local_28)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(*(int *)(iVar3 + 0x14) + local_28)" (( "(") (binary_expression "*(int *)(iVar3 + 0x14) + local_28" (pointer_expression "*(int *)(iVar3 + 0x14)" (* "*") (cast_expression "(int *)(iVar3 + 0x14)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar3 + 0x14)" (( "(") (binary_expression "iVar3 + 0x14" (identifier "iVar3") (+ "+") (number_literal "0x14")) () ")")))) (+ "+") (identifier "local_28")) () ")")))) (= "=") (pointer_expression "*(undefined4 *)(iVar3 + 0x18)" (* "*") (cast_expression "(undefined4 *)(iVar3 + 0x18)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar3 + 0x18)" (( "(") (binary_expression "iVar3 + 0x18" (identifier "iVar3") (+ "+") (number_literal "0x18")) () ")"))))) (; ";")) (expression_statement "local_2c = *(int *)(iVar3 + 0x1c);" (assignment_expression "local_2c = *(int *)(iVar3 + 0x1c)" (identifier "local_2c") (= "=") (pointer_expression "*(int *)(iVar3 + 0x1c)" (* "*") (cast_expression "(int *)(iVar3 + 0x1c)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar3 + 0x1c)" (( "(") (binary_expression "iVar3 + 0x1c" (identifier "iVar3") (+ "+") (number_literal "0x1c")) () ")"))))) (; ";")) (} "}")) (else_clause "else {\n    *(undefined4 *)((int)puVar6 + local_28) = *_rl_saved_line_for_history;\n  }" (else "else") (compound_statement "{\n    *(undefined4 *)((int)puVar6 + local_28) = *_rl_saved_line_for_history;\n  }" ({ "{") (expression_statement "*(undefined4 *)((int)puVar6 + local_28) = *_rl_saved_line_for_history;" (assignment_expression "*(undefined4 *)((int)puVar6 + local_28) = *_rl_saved_line_for_history" (pointer_expression "*(undefined4 *)((int)puVar6 + local_28)" (* "*") (cast_expression "(undefined4 *)((int)puVar6 + local_28)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((int)puVar6 + local_28)" (( "(") (binary_expression "(int)puVar6 + local_28" (cast_expression "(int)puVar6" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "puVar6")) (+ "+") (identifier "local_28")) () ")")))) (= "=") (pointer_expression "*_rl_saved_line_for_history" (* "*") (identifier "_rl_saved_line_for_history"))) (; ";")) (} "}")))) (expression_statement "*(int *)(iVar3 + 0x1c) = local_2c + 1;" (assignment_expression "*(int *)(iVar3 + 0x1c) = local_2c + 1" (pointer_expression "*(int *)(iVar3 + 0x1c)" (* "*") (cast_expression "(int *)(iVar3 + 0x1c)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar3 + 0x1c)" (( "(") (binary_expression "iVar3 + 0x1c" (identifier "iVar3") (+ "+") (number_literal "0x1c")) () ")")))) (= "=") (binary_expression "local_2c + 1" (identifier "local_2c") (+ "+") (number_literal "1"))) (; ";")) (expression_statement "*(undefined4 *)(iVar3 + 0x44) = *(undefined4 *)(iVar3 + 0x2c);" (assignment_expression "*(undefined4 *)(iVar3 + 0x44) = *(undefined4 *)(iVar3 + 0x2c)" (pointer_expression "*(undefined4 *)(iVar3 + 0x44)" (* "*") (cast_expression "(undefined4 *)(iVar3 + 0x44)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar3 + 0x44)" (( "(") (binary_expression "iVar3 + 0x44" (identifier "iVar3") (+ "+") (number_literal "0x44")) () ")")))) (= "=") (pointer_expression "*(undefined4 *)(iVar3 + 0x2c)" (* "*") (cast_expression "(undefined4 *)(iVar3 + 0x2c)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar3 + 0x2c)" (( "(") (binary_expression "iVar3 + 0x2c" (identifier "iVar3") (+ "+") (number_literal "0x2c")) () ")"))))) (; ";")) (expression_statement "rl_save_prompt();" (call_expression "rl_save_prompt()" (identifier "rl_save_prompt") (argument_list "()" (( "(") () ")"))) (; ";")) (expression_statement "*(undefined4 *)(iVar3 + 0x10) = 0x80;" (assignment_expression "*(undefined4 *)(iVar3 + 0x10) = 0x80" (pointer_expression "*(undefined4 *)(iVar3 + 0x10)" (* "*") (cast_expression "(undefined4 *)(iVar3 + 0x10)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar3 + 0x10)" (( "(") (binary_expression "iVar3 + 0x10" (identifier "iVar3") (+ "+") (number_literal "0x10")) () ")")))) (= "=") (number_literal "0x80")) (; ";")) (expression_statement "puVar7 = (undefined1 *)xmalloc(0x80);" (assignment_expression "puVar7 = (undefined1 *)xmalloc(0x80)" (identifier "puVar7") (= "=") (cast_expression "(undefined1 *)xmalloc(0x80)" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "xmalloc(0x80)" (identifier "xmalloc") (argument_list "(0x80)" (( "(") (number_literal "0x80") () ")"))))) (; ";")) (expression_statement "*(undefined4 *)(iVar3 + 0xc) = 0;" (assignment_expression "*(undefined4 *)(iVar3 + 0xc) = 0" (pointer_expression "*(undefined4 *)(iVar3 + 0xc)" (* "*") (cast_expression "(undefined4 *)(iVar3 + 0xc)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar3 + 0xc)" (( "(") (binary_expression "iVar3 + 0xc" (identifier "iVar3") (+ "+") (number_literal "0xc")) () ")")))) (= "=") (number_literal "0")) (; ";")) (expression_statement "*(undefined1 **)(iVar3 + 8) = puVar7;" (assignment_expression "*(undefined1 **)(iVar3 + 8) = puVar7" (pointer_expression "*(undefined1 **)(iVar3 + 8)" (* "*") (cast_expression "(undefined1 **)(iVar3 + 8)" (( "(") (type_descriptor "undefined1 **" (type_identifier "undefined1") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(iVar3 + 8)" (( "(") (binary_expression "iVar3 + 8" (identifier "iVar3") (+ "+") (number_literal "8")) () ")")))) (= "=") (identifier "puVar7")) (; ";")) (expression_statement "*puVar7 = 0;" (assignment_expression "*puVar7 = 0" (pointer_expression "*puVar7" (* "*") (identifier "puVar7")) (= "=") (number_literal "0")) (; ";")) (expression_statement "*(uint *)(iVar3 + 0x48) = param_1 >> 0x1f | 1;" (assignment_expression "*(uint *)(iVar3 + 0x48) = param_1 >> 0x1f | 1" (pointer_expression "*(uint *)(iVar3 + 0x48)" (* "*") (cast_expression "(uint *)(iVar3 + 0x48)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar3 + 0x48)" (( "(") (binary_expression "iVar3 + 0x48" (identifier "iVar3") (+ "+") (number_literal "0x48")) () ")")))) (= "=") (binary_expression "param_1 >> 0x1f | 1" (binary_expression "param_1 >> 0x1f" (identifier "param_1") (>> ">>") (number_literal "0x1f")) (| "|") (number_literal "1"))) (; ";")) (expression_statement "pcVar11 = rl_line_buffer;" (assignment_expression "pcVar11 = rl_line_buffer" (identifier "pcVar11") (= "=") (identifier "rl_line_buffer")) (; ";")) (expression_statement "*(char **)(iVar3 + 0x74) = rl_line_buffer;" (assignment_expression "*(char **)(iVar3 + 0x74) = rl_line_buffer" (pointer_expression "*(char **)(iVar3 + 0x74)" (* "*") (cast_expression "(char **)(iVar3 + 0x74)" (( "(") (type_descriptor "char **" (primitive_type "char") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(iVar3 + 0x74)" (( "(") (binary_expression "iVar3 + 0x74" (identifier "iVar3") (+ "+") (number_literal "0x74")) () ")")))) (= "=") (identifier "rl_line_buffer")) (; ";")) (expression_statement "sVar8 = strlen(pcVar11);" (assignment_expression "sVar8 = strlen(pcVar11)" (identifier "sVar8") (= "=") (call_expression "strlen(pcVar11)" (identifier "strlen") (argument_list "(pcVar11)" (( "(") (identifier "pcVar11") () ")")))) (; ";")) (expression_statement "_rl_iscxt = iVar3;" (assignment_expression "_rl_iscxt = iVar3" (identifier "_rl_iscxt") (= "=") (identifier "iVar3")) (; ";")) (expression_statement "*(size_t *)(iVar3 + 0x78) = sVar8;" (assignment_expression "*(size_t *)(iVar3 + 0x78) = sVar8" (pointer_expression "*(size_t *)(iVar3 + 0x78)" (* "*") (cast_expression "(size_t *)(iVar3 + 0x78)" (( "(") (type_descriptor "size_t *" (primitive_type "size_t") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar3 + 0x78)" (( "(") (binary_expression "iVar3 + 0x78" (identifier "iVar3") (+ "+") (number_literal "0x78")) () ")")))) (= "=") (identifier "sVar8")) (; ";")) (expression_statement "*(undefined4 *)(iVar3 + 0x7c) = rl_point;" (assignment_expression "*(undefined4 *)(iVar3 + 0x7c) = rl_point" (pointer_expression "*(undefined4 *)(iVar3 + 0x7c)" (* "*") (cast_expression "(undefined4 *)(iVar3 + 0x7c)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar3 + 0x7c)" (( "(") (binary_expression "iVar3 + 0x7c" (identifier "iVar3") (+ "+") (number_literal "0x7c")) () ")")))) (= "=") (identifier "rl_point")) (; ";")) (expression_statement "FUN_000d5450();" (call_expression "FUN_000d5450()" (identifier "FUN_000d5450") (argument_list "()" (( "(") () ")"))) (; ";")) (expression_statement "uVar9 = 0;" (assignment_expression "uVar9 = 0" (identifier "uVar9") (= "=") (number_literal "0")) (; ";")) (if_statement "if ((rl_readline_state & 0x80000) == 0) {\n    do {\n      _rl_search_getchar(iVar3);\n      iVar10 = _rl_isearch_dispatch(iVar3,*(undefined4 *)(iVar3 + 0x50));\n    } while (0 < iVar10);\n    uVar9 = _rl_isearch_cleanup(iVar3,iVar10);\n  }" (if "if") (parenthesized_expression "((rl_readline_state & 0x80000) == 0)" (( "(") (binary_expression "(rl_readline_state & 0x80000) == 0" (parenthesized_expression "(rl_readline_state & 0x80000)" (( "(") (binary_expression "rl_readline_state & 0x80000" (identifier "rl_readline_state") (& "&") (number_literal "0x80000")) () ")")) (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    do {\n      _rl_search_getchar(iVar3);\n      iVar10 = _rl_isearch_dispatch(iVar3,*(undefined4 *)(iVar3 + 0x50));\n    } while (0 < iVar10);\n    uVar9 = _rl_isearch_cleanup(iVar3,iVar10);\n  }" ({ "{") (do_statement "do {\n      _rl_search_getchar(iVar3);\n      iVar10 = _rl_isearch_dispatch(iVar3,*(undefined4 *)(iVar3 + 0x50));\n    } while (0 < iVar10);" (do "do") (compound_statement "{\n      _rl_search_getchar(iVar3);\n      iVar10 = _rl_isearch_dispatch(iVar3,*(undefined4 *)(iVar3 + 0x50));\n    }" ({ "{") (expression_statement "_rl_search_getchar(iVar3);" (call_expression "_rl_search_getchar(iVar3)" (identifier "_rl_search_getchar") (argument_list "(iVar3)" (( "(") (identifier "iVar3") () ")"))) (; ";")) (expression_statement "iVar10 = _rl_isearch_dispatch(iVar3,*(undefined4 *)(iVar3 + 0x50));" (assignment_expression "iVar10 = _rl_isearch_dispatch(iVar3,*(undefined4 *)(iVar3 + 0x50))" (identifier "iVar10") (= "=") (call_expression "_rl_isearch_dispatch(iVar3,*(undefined4 *)(iVar3 + 0x50))" (identifier "_rl_isearch_dispatch") (argument_list "(iVar3,*(undefined4 *)(iVar3 + 0x50))" (( "(") (identifier "iVar3") (, ",") (pointer_expression "*(undefined4 *)(iVar3 + 0x50)" (* "*") (cast_expression "(undefined4 *)(iVar3 + 0x50)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar3 + 0x50)" (( "(") (binary_expression "iVar3 + 0x50" (identifier "iVar3") (+ "+") (number_literal "0x50")) () ")")))) () ")")))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(0 < iVar10)" (( "(") (binary_expression "0 < iVar10" (number_literal "0") (< "<") (identifier "iVar10")) () ")")) (; ";")) (expression_statement "uVar9 = _rl_isearch_cleanup(iVar3,iVar10);" (assignment_expression "uVar9 = _rl_isearch_cleanup(iVar3,iVar10)" (identifier "uVar9") (= "=") (call_expression "_rl_isearch_cleanup(iVar3,iVar10)" (identifier "_rl_isearch_cleanup") (argument_list "(iVar3,iVar10)" (( "(") (identifier "iVar3") (, ",") (identifier "iVar10") () ")")))) (; ";")) (} "}"))) (return_statement "return uVar9;" (return "return") (identifier "uVar9") (; ";")) (} "}")))

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

int __regparm3 function_1(int var_3,int invoking_key)

{
  type_1 **var_12;
  type_1 *pHVar2;
  type_2 *cxt;
  type_1 **var_7;
  char **ppcVar4;
  char *pcVar5;
  size_t var_15;
  int var_22;
  char **var_11;
  int where;
  int var_8;
  size_t bytes;
  int var_10;
  int var_17;
  
  var_1 = var_1 | 0x80;
  cxt = var_2(1,0);
  if (var_3 < 0) {
    cxt->sflags = cxt->sflags | 1;
  }
  pcVar5 = var_4;
  if (var_4 == (char *)0x0) {
    pcVar5 = "\x1b\n";
  }
  cxt->search_terminators = pcVar5;
  var_7 = var_5();
  var_6();
  if ((var_7 == (type_1 **)0x0) || (*var_7 == (type_1 *)0x0)) {
    bytes = 4;
    var_22 = 0;
  }
  else {
    var_22 = 0;
    do {
      var_8 = var_22;
      var_22 = var_8 + 1;
    } while (var_7[var_22] != (type_1 *)0x0);
    bytes = var_8 * 4 + 8;
  }
  cxt->hlen = var_22;
  ppcVar4 = (char **)var_9(bytes);
  var_10 = cxt->hlen;
  cxt->lines = ppcVar4;
  if (var_10 < 1) {
    var_17 = 0;
  }
  else {
    var_17 = var_10 * 4;
    var_12 = var_7 + var_10;
    var_11 = ppcVar4;
    do {
      pHVar2 = *var_7;
      var_7 = var_7 + 1;
      *var_11 = pHVar2->line;
      var_11 = var_11 + 1;
    } while (var_12 != var_7);
  }
  if (var_13 == (type_1 *)0x0) {
    var_15 = var_14(rl_line_buffer);
    pcVar5 = (char *)var_9(var_15 + 1);
    cxt->allocated_line = pcVar5;
    var_16(pcVar5,rl_line_buffer);
    *(char **)((int)cxt->lines + var_17) = cxt->allocated_line;
    var_10 = cxt->hlen;
  }
  else {
    *(char **)((int)ppcVar4 + var_17) = var_13->line;
  }
  cxt->hlen = var_10 + 1;
  cxt->history_pos = cxt->save_line;
  var_18();
  cxt->search_string_size = 0x80;
  pcVar5 = (char *)var_9(0x80);
  cxt->search_string_index = 0;
  cxt->search_string = pcVar5;
  *pcVar5 = '\0';
  cxt->var_3 = var_3 >> 0x1f | 1;
  pcVar5 = rl_line_buffer;
  cxt->sline = rl_line_buffer;
  var_15 = var_14(pcVar5);
  _rl_iscxt = cxt;
  cxt->sline_len = var_15;
  cxt->sline_index = rl_point;
  var_19(cxt->search_string,cxt->sflags,where);
  var_22 = 0;
  if ((var_1 & 0x80000) == 0) {
    do {
      var_20(cxt);
      var_22 = var_21(cxt,cxt->lastc);
    } while (0 < var_22);
    var_22 = var_23(cxt,var_22);
  }
  return var_22;
}


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

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

undefined4 __regparm3 MASKED(int param_1)

{
  int *piVar1;
  undefined4 *puVar2;
  int iVar3;
  undefined *puVar4;
  int *piVar5;
  undefined4 *puVar6;
  undefined1 *puVar7;
  size_t sVar8;
  undefined4 uVar9;
  int iVar10;
  char *pcVar11;
  undefined4 *puVar12;
  int iVar13;
  int local_2c;
  int local_28;
  
  rl_readline_state = rl_readline_state | 0x80;
  iVar3 = _rl_scxt_alloc(1,0);
  if (param_1 < 0) {
    *(uint *)(iVar3 + 4) = *(uint *)(iVar3 + 4) | 1;
  }
  puVar4 = _rl_isearch_terminators;
  if (_rl_isearch_terminators == (undefined *)0x0) {
    puVar4 = &DAT_00106480;
  }
  *(undefined **)(iVar3 + 0x80) = puVar4;
  piVar5 = (int *)history_list();
  rl_maybe_replace_line();
  if ((piVar5 == (int *)0x0) || (*piVar5 == 0)) {
    iVar13 = 4;
    iVar10 = 0;
  }
  else {
    iVar10 = 0;
    do {
      iVar13 = iVar10;
      iVar10 = iVar13 + 1;
    } while (piVar5[iVar10] != 0);
    iVar13 = iVar13 * 4 + 8;
  }
  *(int *)(iVar3 + 0x1c) = iVar10;
  puVar6 = (undefined4 *)xmalloc(iVar13);
  local_2c = *(int *)(iVar3 + 0x1c);
  *(undefined4 **)(iVar3 + 0x14) = puVar6;
  if (local_2c < 1) {
    local_28 = 0;
  }
  else {
    local_28 = local_2c * 4;
    piVar1 = piVar5 + local_2c;
    puVar12 = puVar6;
    do {
      puVar2 = (undefined4 *)*piVar5;
      piVar5 = piVar5 + 1;
      *puVar12 = *puVar2;
      puVar12 = puVar12 + 1;
    } while (piVar1 != piVar5);
  }
  if (_rl_saved_line_for_history == (undefined4 *)0x0) {
    sVar8 = strlen(rl_line_buffer);
    pcVar11 = (char *)xmalloc(sVar8 + 1);
    *(char **)(iVar3 + 0x18) = pcVar11;
    strcpy(pcVar11,rl_line_buffer);
    *(undefined4 *)(*(int *)(iVar3 + 0x14) + local_28) = *(undefined4 *)(iVar3 + 0x18);
    local_2c = *(int *)(iVar3 + 0x1c);
  }
  else {
    *(undefined4 *)((int)puVar6 + local_28) = *_rl_saved_line_for_history;
  }
  *(int *)(iVar3 + 0x1c) = local_2c + 1;
  *(undefined4 *)(iVar3 + 0x44) = *(undefined4 *)(iVar3 + 0x2c);
  rl_save_prompt();
  *(undefined4 *)(iVar3 + 0x10) = 0x80;
  puVar7 = (undefined1 *)xmalloc(0x80);
  *(undefined4 *)(iVar3 + 0xc) = 0;
  *(undefined1 **)(iVar3 + 8) = puVar7;
  *puVar7 = 0;
  *(uint *)(iVar3 + 0x48) = param_1 >> 0x1f | 1;
  pcVar11 = rl_line_buffer;
  *(char **)(iVar3 + 0x74) = rl_line_buffer;
  sVar8 = strlen(pcVar11);
  _rl_iscxt = iVar3;
  *(size_t *)(iVar3 + 0x78) = sVar8;
  *(undefined4 *)(iVar3 + 0x7c) = rl_point;
  FUN_000d5450();
  uVar9 = 0;
  if ((rl_readline_state & 0x80000) == 0) {
    do {
      _rl_search_getchar(iVar3);
      iVar10 = _rl_isearch_dispatch(iVar3,*(undefined4 *)(iVar3 + 0x50));
    } while (0 < iVar10);
    uVar9 = _rl_isearch_cleanup(iVar3,iVar10);
  }
  return uVar9;
}

