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

char * _rl_make_prompt_for_search(int pchar)

{
  char *pcVar1;
  size_t sVar2;
  char *__dest;
  char *pcVar3;
  int iVar4;
  
  saved_local_prompt = local_prompt;
  saved_local_prefix = local_prompt_prefix;
  saved_local_length = local_prompt_len;
  saved_prefix_length = prompt_prefix_length;
  saved_visible_length = prompt_visible_length;
  saved_last_invisible = prompt_last_invisible;
  saved_invis_chars_first_line = prompt_invis_chars_first_line;
  saved_physical_chars = prompt_physical_chars;
  saved_local_prompt_newlines = local_prompt_newlines;
  pcVar3 = rl_prompt;
  local_prompt = (char *)0x0;
  local_prompt_prefix = (char *)0x0;
  prompt_prefix_length = 0;
  local_prompt_len = 0;
  prompt_last_invisible = 0;
  prompt_visible_length = 0;
  prompt_invis_chars_first_line = 0;
  prompt_physical_chars = 0;
  local_prompt_newlines = (int *)0x0;
  if (rl_prompt == (char *)0x0) {
LAB_000fb088:
    iVar4 = 1;
    pcVar3 = (char *)xmalloc(2);
    __dest = pcVar3;
  }
  else {
    pcVar1 = strrchr(rl_prompt,10);
    if (pcVar1 != (char *)0x0) {
      sVar2 = strlen(pcVar1 + 1);
      __dest = (char *)xmalloc(sVar2 + 2);
      if (sVar2 != 0) {
        strcpy(__dest,pcVar1 + 1);
      }
      __dest[sVar2 + 1] = '\0';
      __dest[sVar2] = (char)pchar;
      goto LAB_000fb00d;
    }
    if (*pcVar3 == '\0') goto LAB_000fb088;
    sVar2 = strlen(pcVar3);
    __dest = (char *)xmalloc(sVar2 + 2);
    iVar4 = sVar2 + 1;
    if (sVar2 == 0) {
      iVar4 = 1;
      pcVar3 = __dest;
    }
    else {
      strcpy(__dest,rl_prompt);
      pcVar3 = __dest + sVar2;
    }
  }
  *pcVar3 = (char)pchar;
  __dest[iVar4] = '\0';
LAB_000fb00d:
  prompt_physical_chars = saved_physical_chars + 1;
  return __dest;
}



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

char * _rl_make_prompt_for_search(char param_1)

{
  char *pcVar1;
  size_t sVar2;
  char *__dest;
  char *pcVar3;
  int iVar4;
  
  DAT_00179f00 = DAT_00179f38;
  DAT_00179efc = DAT_00179f34;
  DAT_00179ee8 = DAT_00179f30;
  DAT_00179eec = DAT_00179f2c;
  DAT_00179ef0 = DAT_00179f28;
  DAT_00179ef4 = DAT_00179f1c;
  DAT_00179ee4 = DAT_00179f14;
  DAT_00179ee0 = DAT_00179f0c;
  DAT_00179ef8 = DAT_00179f08;
  pcVar3 = rl_prompt;
  DAT_00179f38 = 0;
  DAT_00179f34 = 0;
  DAT_00179f2c = 0;
  DAT_00179f30 = 0;
  DAT_00179f1c = 0;
  DAT_00179f28 = 0;
  DAT_00179f14 = 0;
  DAT_00179f0c = 0;
  DAT_00179f08 = 0;
  if (rl_prompt == (char *)0x0) {
LAB_000fb088:
    iVar4 = 1;
    pcVar3 = (char *)xmalloc(2);
    __dest = pcVar3;
  }
  else {
    pcVar1 = strrchr(rl_prompt,10);
    if (pcVar1 != (char *)0x0) {
      sVar2 = strlen(pcVar1 + 1);
      __dest = (char *)xmalloc(sVar2 + 2);
      if (sVar2 != 0) {
        strcpy(__dest,pcVar1 + 1);
      }
      __dest[sVar2 + 1] = '\0';
      __dest[sVar2] = param_1;
      goto LAB_000fb00d;
    }
    if (*pcVar3 == '\0') goto LAB_000fb088;
    sVar2 = strlen(pcVar3);
    __dest = (char *)xmalloc(sVar2 + 2);
    iVar4 = sVar2 + 1;
    if (sVar2 == 0) {
      iVar4 = 1;
      pcVar3 = __dest;
    }
    else {
      strcpy(__dest,rl_prompt);
      pcVar3 = __dest + sVar2;
    }
  }
  *pcVar3 = param_1;
  __dest[iVar4] = '\0';
LAB_000fb00d:
  DAT_00179f0c = DAT_00179ee0 + 1;
  return __dest;
}


PUSH EBP
PUSH EDI
PUSH ESI
PUSH EBX
CALL 0x000312b0
ADD EBX,0x77117
SUB ESP,0x1c
MOV EAX,dword ptr [EBX + 0x7f38]
MOV dword ptr [EBX + 0x7f38],0x0
MOV dword ptr [EBX + 0x7f00],EAX
MOV EAX,dword ptr [EBX + 0x7f34]
MOV dword ptr [EBX + 0x7f34],0x0
MOV dword ptr [EBX + 0x7efc],EAX
MOV EAX,dword ptr [EBX + 0x7f2c]
MOV dword ptr [EBX + 0x7f2c],0x0
MOV dword ptr [EBX + 0x7eec],EAX
MOV EAX,dword ptr [EBX + 0x7f30]
MOV dword ptr [EBX + 0x7f30],0x0
MOV dword ptr [EBX + 0x7ee8],EAX
MOV EAX,dword ptr [EBX + 0x7f1c]
MOV dword ptr [EBX + 0x7f1c],0x0
MOV dword ptr [EBX + 0x7ef4],EAX
MOV EAX,dword ptr [EBX + 0x7f28]
MOV dword ptr [EBX + 0x7f28],0x0
MOV dword ptr [EBX + 0x7ef0],EAX
MOV EAX,dword ptr [EBX + 0x7f14]
MOV dword ptr [EBX + 0x7f14],0x0
MOV dword ptr [EBX + 0x7ee4],EAX
MOV EAX,dword ptr [EBX + 0x7f0c]
MOV dword ptr [EBX + 0x7f0c],0x0
MOV dword ptr [EBX + 0x7ee0],EAX
MOV EAX,dword ptr [EBX + 0x7f08]
MOV dword ptr [EBX + 0x7f08],0x0
MOV dword ptr [EBX + 0x7ef8],EAX
LEA EDI,[EBX + 0x7b30]
MOV ESI,dword ptr [EDI]
TEST ESI,ESI
JZ 0x000fb088
SUB ESP,0x8
PUSH 0xa
PUSH ESI
CALL 0x0002eab0
ADD ESP,0x10
TEST EAX,EAX
JZ 0x000fb030
SUB ESP,0xc
LEA EDI,[EAX + 0x1]
PUSH EDI
CALL 0x0002e760
MOV EBP,EAX
LEA EAX,[EAX + 0x2]
MOV dword ptr [ESP],EAX
CALL 0x000ad700
ADD ESP,0x10
MOV ESI,EAX
TEST EBP,EBP
JNZ 0x000fb0a0
MOVZX EAX,byte ptr [ESP + 0x30]
MOV byte ptr [ESI + EBP*0x1 + 0x1],0x0
MOV byte ptr [ESI + EBP*0x1],AL
MOV EAX,dword ptr [EBX + 0x7ee0]
ADD EAX,0x1
MOV dword ptr [EBX + 0x7f0c],EAX
ADD ESP,0x1c
MOV EAX,ESI
POP EBX
POP ESI
POP EDI
POP EBP
RET
CMP byte ptr [ESI],0x0
JZ 0x000fb088
SUB ESP,0xc
PUSH ESI
CALL 0x0002e760
MOV EDX,EAX
LEA EAX,[EAX + 0x2]
MOV dword ptr [ESP + 0x1c],EDX
MOV dword ptr [ESP],EAX
CALL 0x000ad700
MOV EDX,dword ptr [ESP + 0x1c]
ADD ESP,0x10
MOV ESI,EAX
TEST EDX,EDX
LEA EBP,[EDX + 0x1]
MOV dword ptr [ESP + 0xc],EDX
JZ 0x000fb0b8
SUB ESP,0x8
PUSH dword ptr [EDI]
PUSH EAX
CALL 0x0002e580
MOV EDX,dword ptr [ESP + 0x1c]
ADD ESP,0x10
LEA EAX,[ESI + EDX*0x1]
MOVZX ECX,byte ptr [ESP + 0x30]
MOV byte ptr [EAX],CL
MOV byte ptr [ESI + EBP*0x1],0x0
JMP 0x000fb00d
SUB ESP,0xc
MOV EBP,0x1
PUSH 0x2
CALL 0x000ad700
ADD ESP,0x10
MOV ESI,EAX
JMP 0x000fb078
SUB ESP,0x8
PUSH EDI
PUSH EAX
CALL 0x0002e580
ADD ESP,0x10
JMP 0x000fb000
MOV EBP,0x1
JMP 0x000fb078
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nchar * _rl_make_prompt_for_search(char param_1)\n\n{\n  char *pcVar1;\n  size_t sVar2;\n  char *__dest;\n  char *pcVar3;\n  int iVar4;\n  \n  DAT_00179f00 = DAT_00179f38;\n  DAT_00179efc = DAT_00179f34;\n  DAT_00179ee8 = DAT_00179f30;\n  DAT_00179eec = DAT_00179f2c;\n  DAT_00179ef0 = DAT_00179f28;\n  DAT_00179ef4 = DAT_00179f1c;\n  DAT_00179ee4 = DAT_00179f14;\n  DAT_00179ee0 = DAT_00179f0c;\n  DAT_00179ef8 = DAT_00179f08;\n  pcVar3 = rl_prompt;\n  DAT_00179f38 = 0;\n  DAT_00179f34 = 0;\n  DAT_00179f2c = 0;\n  DAT_00179f30 = 0;\n  DAT_00179f1c = 0;\n  DAT_00179f28 = 0;\n  DAT_00179f14 = 0;\n  DAT_00179f0c = 0;\n  DAT_00179f08 = 0;\n  if (rl_prompt == (char *)0x0) {\nLAB_000fb088:\n    iVar4 = 1;\n    pcVar3 = (char *)xmalloc(2);\n    __dest = pcVar3;\n  }\n  else {\n    pcVar1 = strrchr(rl_prompt,10);\n    if (pcVar1 != (char *)0x0) {\n      sVar2 = strlen(pcVar1 + 1);\n      __dest = (char *)xmalloc(sVar2 + 2);\n      if (sVar2 != 0) {\n        strcpy(__dest,pcVar1 + 1);\n      }\n      __dest[sVar2 + 1] = '\0';\n      __dest[sVar2] = param_1;\n      goto LAB_000fb00d;\n    }\n    if (*pcVar3 == '\0') goto LAB_000fb088;\n    sVar2 = strlen(pcVar3);\n    __dest = (char *)xmalloc(sVar2 + 2);\n    iVar4 = sVar2 + 1;\n    if (sVar2 == 0) {\n      iVar4 = 1;\n      pcVar3 = __dest;\n    }\n    else {\n      strcpy(__dest,rl_prompt);\n      pcVar3 = __dest + sVar2;\n    }\n  }\n  *pcVar3 = param_1;\n  __dest[iVar4] = '\0';\nLAB_000fb00d:\n  DAT_00179f0c = DAT_00179ee0 + 1;\n  return __dest;\n}\n\n" comment (function_definition "char * _rl_make_prompt_for_search(char param_1)\n\n{\n  char *pcVar1;\n  size_t sVar2;\n  char *__dest;\n  char *pcVar3;\n  int iVar4;\n  \n  DAT_00179f00 = DAT_00179f38;\n  DAT_00179efc = DAT_00179f34;\n  DAT_00179ee8 = DAT_00179f30;\n  DAT_00179eec = DAT_00179f2c;\n  DAT_00179ef0 = DAT_00179f28;\n  DAT_00179ef4 = DAT_00179f1c;\n  DAT_00179ee4 = DAT_00179f14;\n  DAT_00179ee0 = DAT_00179f0c;\n  DAT_00179ef8 = DAT_00179f08;\n  pcVar3 = rl_prompt;\n  DAT_00179f38 = 0;\n  DAT_00179f34 = 0;\n  DAT_00179f2c = 0;\n  DAT_00179f30 = 0;\n  DAT_00179f1c = 0;\n  DAT_00179f28 = 0;\n  DAT_00179f14 = 0;\n  DAT_00179f0c = 0;\n  DAT_00179f08 = 0;\n  if (rl_prompt == (char *)0x0) {\nLAB_000fb088:\n    iVar4 = 1;\n    pcVar3 = (char *)xmalloc(2);\n    __dest = pcVar3;\n  }\n  else {\n    pcVar1 = strrchr(rl_prompt,10);\n    if (pcVar1 != (char *)0x0) {\n      sVar2 = strlen(pcVar1 + 1);\n      __dest = (char *)xmalloc(sVar2 + 2);\n      if (sVar2 != 0) {\n        strcpy(__dest,pcVar1 + 1);\n      }\n      __dest[sVar2 + 1] = '\0';\n      __dest[sVar2] = param_1;\n      goto LAB_000fb00d;\n    }\n    if (*pcVar3 == '\0') goto LAB_000fb088;\n    sVar2 = strlen(pcVar3);\n    __dest = (char *)xmalloc(sVar2 + 2);\n    iVar4 = sVar2 + 1;\n    if (sVar2 == 0) {\n      iVar4 = 1;\n      pcVar3 = __dest;\n    }\n    else {\n      strcpy(__dest,rl_prompt);\n      pcVar3 = __dest + sVar2;\n    }\n  }\n  *pcVar3 = param_1;\n  __dest[iVar4] = '\0';\nLAB_000fb00d:\n  DAT_00179f0c = DAT_00179ee0 + 1;\n  return __dest;\n}" primitive_type (pointer_declarator "* _rl_make_prompt_for_search(char param_1)" * (function_declarator "_rl_make_prompt_for_search(char param_1)" identifier (parameter_list "(char param_1)" ( (parameter_declaration "char param_1" primitive_type identifier) )))) (compound_statement "{\n  char *pcVar1;\n  size_t sVar2;\n  char *__dest;\n  char *pcVar3;\n  int iVar4;\n  \n  DAT_00179f00 = DAT_00179f38;\n  DAT_00179efc = DAT_00179f34;\n  DAT_00179ee8 = DAT_00179f30;\n  DAT_00179eec = DAT_00179f2c;\n  DAT_00179ef0 = DAT_00179f28;\n  DAT_00179ef4 = DAT_00179f1c;\n  DAT_00179ee4 = DAT_00179f14;\n  DAT_00179ee0 = DAT_00179f0c;\n  DAT_00179ef8 = DAT_00179f08;\n  pcVar3 = rl_prompt;\n  DAT_00179f38 = 0;\n  DAT_00179f34 = 0;\n  DAT_00179f2c = 0;\n  DAT_00179f30 = 0;\n  DAT_00179f1c = 0;\n  DAT_00179f28 = 0;\n  DAT_00179f14 = 0;\n  DAT_00179f0c = 0;\n  DAT_00179f08 = 0;\n  if (rl_prompt == (char *)0x0) {\nLAB_000fb088:\n    iVar4 = 1;\n    pcVar3 = (char *)xmalloc(2);\n    __dest = pcVar3;\n  }\n  else {\n    pcVar1 = strrchr(rl_prompt,10);\n    if (pcVar1 != (char *)0x0) {\n      sVar2 = strlen(pcVar1 + 1);\n      __dest = (char *)xmalloc(sVar2 + 2);\n      if (sVar2 != 0) {\n        strcpy(__dest,pcVar1 + 1);\n      }\n      __dest[sVar2 + 1] = '\0';\n      __dest[sVar2] = param_1;\n      goto LAB_000fb00d;\n    }\n    if (*pcVar3 == '\0') goto LAB_000fb088;\n    sVar2 = strlen(pcVar3);\n    __dest = (char *)xmalloc(sVar2 + 2);\n    iVar4 = sVar2 + 1;\n    if (sVar2 == 0) {\n      iVar4 = 1;\n      pcVar3 = __dest;\n    }\n    else {\n      strcpy(__dest,rl_prompt);\n      pcVar3 = __dest + sVar2;\n    }\n  }\n  *pcVar3 = param_1;\n  __dest[iVar4] = '\0';\nLAB_000fb00d:\n  DAT_00179f0c = DAT_00179ee0 + 1;\n  return __dest;\n}" { (declaration "char *pcVar1;" primitive_type (pointer_declarator "*pcVar1" * identifier) ;) (declaration "size_t sVar2;" primitive_type identifier ;) (declaration "char *__dest;" primitive_type (pointer_declarator "*__dest" * identifier) ;) (declaration "char *pcVar3;" primitive_type (pointer_declarator "*pcVar3" * identifier) ;) (declaration "int iVar4;" primitive_type identifier ;) (expression_statement "DAT_00179f00 = DAT_00179f38;" (assignment_expression "DAT_00179f00 = DAT_00179f38" identifier = identifier) ;) (expression_statement "DAT_00179efc = DAT_00179f34;" (assignment_expression "DAT_00179efc = DAT_00179f34" identifier = identifier) ;) (expression_statement "DAT_00179ee8 = DAT_00179f30;" (assignment_expression "DAT_00179ee8 = DAT_00179f30" identifier = identifier) ;) (expression_statement "DAT_00179eec = DAT_00179f2c;" (assignment_expression "DAT_00179eec = DAT_00179f2c" identifier = identifier) ;) (expression_statement "DAT_00179ef0 = DAT_00179f28;" (assignment_expression "DAT_00179ef0 = DAT_00179f28" identifier = identifier) ;) (expression_statement "DAT_00179ef4 = DAT_00179f1c;" (assignment_expression "DAT_00179ef4 = DAT_00179f1c" identifier = identifier) ;) (expression_statement "DAT_00179ee4 = DAT_00179f14;" (assignment_expression "DAT_00179ee4 = DAT_00179f14" identifier = identifier) ;) (expression_statement "DAT_00179ee0 = DAT_00179f0c;" (assignment_expression "DAT_00179ee0 = DAT_00179f0c" identifier = identifier) ;) (expression_statement "DAT_00179ef8 = DAT_00179f08;" (assignment_expression "DAT_00179ef8 = DAT_00179f08" identifier = identifier) ;) (expression_statement "pcVar3 = rl_prompt;" (assignment_expression "pcVar3 = rl_prompt" identifier = identifier) ;) (expression_statement "DAT_00179f38 = 0;" (assignment_expression "DAT_00179f38 = 0" identifier = number_literal) ;) (expression_statement "DAT_00179f34 = 0;" (assignment_expression "DAT_00179f34 = 0" identifier = number_literal) ;) (expression_statement "DAT_00179f2c = 0;" (assignment_expression "DAT_00179f2c = 0" identifier = number_literal) ;) (expression_statement "DAT_00179f30 = 0;" (assignment_expression "DAT_00179f30 = 0" identifier = number_literal) ;) (expression_statement "DAT_00179f1c = 0;" (assignment_expression "DAT_00179f1c = 0" identifier = number_literal) ;) (expression_statement "DAT_00179f28 = 0;" (assignment_expression "DAT_00179f28 = 0" identifier = number_literal) ;) (expression_statement "DAT_00179f14 = 0;" (assignment_expression "DAT_00179f14 = 0" identifier = number_literal) ;) (expression_statement "DAT_00179f0c = 0;" (assignment_expression "DAT_00179f0c = 0" identifier = number_literal) ;) (expression_statement "DAT_00179f08 = 0;" (assignment_expression "DAT_00179f08 = 0" identifier = number_literal) ;) (if_statement "if (rl_prompt == (char *)0x0) {\nLAB_000fb088:\n    iVar4 = 1;\n    pcVar3 = (char *)xmalloc(2);\n    __dest = pcVar3;\n  }\n  else {\n    pcVar1 = strrchr(rl_prompt,10);\n    if (pcVar1 != (char *)0x0) {\n      sVar2 = strlen(pcVar1 + 1);\n      __dest = (char *)xmalloc(sVar2 + 2);\n      if (sVar2 != 0) {\n        strcpy(__dest,pcVar1 + 1);\n      }\n      __dest[sVar2 + 1] = '\0';\n      __dest[sVar2] = param_1;\n      goto LAB_000fb00d;\n    }\n    if (*pcVar3 == '\0') goto LAB_000fb088;\n    sVar2 = strlen(pcVar3);\n    __dest = (char *)xmalloc(sVar2 + 2);\n    iVar4 = sVar2 + 1;\n    if (sVar2 == 0) {\n      iVar4 = 1;\n      pcVar3 = __dest;\n    }\n    else {\n      strcpy(__dest,rl_prompt);\n      pcVar3 = __dest + sVar2;\n    }\n  }" if (parenthesized_expression "(rl_prompt == (char *)0x0)" ( (binary_expression "rl_prompt == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\nLAB_000fb088:\n    iVar4 = 1;\n    pcVar3 = (char *)xmalloc(2);\n    __dest = pcVar3;\n  }" { (labeled_statement "LAB_000fb088:\n    iVar4 = 1;" statement_identifier : (expression_statement "iVar4 = 1;" (assignment_expression "iVar4 = 1" identifier = number_literal) ;)) (expression_statement "pcVar3 = (char *)xmalloc(2);" (assignment_expression "pcVar3 = (char *)xmalloc(2)" identifier = (cast_expression "(char *)xmalloc(2)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "xmalloc(2)" identifier (argument_list "(2)" ( number_literal ))))) ;) (expression_statement "__dest = pcVar3;" (assignment_expression "__dest = pcVar3" identifier = identifier) ;) }) (else_clause "else {\n    pcVar1 = strrchr(rl_prompt,10);\n    if (pcVar1 != (char *)0x0) {\n      sVar2 = strlen(pcVar1 + 1);\n      __dest = (char *)xmalloc(sVar2 + 2);\n      if (sVar2 != 0) {\n        strcpy(__dest,pcVar1 + 1);\n      }\n      __dest[sVar2 + 1] = '\0';\n      __dest[sVar2] = param_1;\n      goto LAB_000fb00d;\n    }\n    if (*pcVar3 == '\0') goto LAB_000fb088;\n    sVar2 = strlen(pcVar3);\n    __dest = (char *)xmalloc(sVar2 + 2);\n    iVar4 = sVar2 + 1;\n    if (sVar2 == 0) {\n      iVar4 = 1;\n      pcVar3 = __dest;\n    }\n    else {\n      strcpy(__dest,rl_prompt);\n      pcVar3 = __dest + sVar2;\n    }\n  }" else (compound_statement "{\n    pcVar1 = strrchr(rl_prompt,10);\n    if (pcVar1 != (char *)0x0) {\n      sVar2 = strlen(pcVar1 + 1);\n      __dest = (char *)xmalloc(sVar2 + 2);\n      if (sVar2 != 0) {\n        strcpy(__dest,pcVar1 + 1);\n      }\n      __dest[sVar2 + 1] = '\0';\n      __dest[sVar2] = param_1;\n      goto LAB_000fb00d;\n    }\n    if (*pcVar3 == '\0') goto LAB_000fb088;\n    sVar2 = strlen(pcVar3);\n    __dest = (char *)xmalloc(sVar2 + 2);\n    iVar4 = sVar2 + 1;\n    if (sVar2 == 0) {\n      iVar4 = 1;\n      pcVar3 = __dest;\n    }\n    else {\n      strcpy(__dest,rl_prompt);\n      pcVar3 = __dest + sVar2;\n    }\n  }" { (expression_statement "pcVar1 = strrchr(rl_prompt,10);" (assignment_expression "pcVar1 = strrchr(rl_prompt,10)" identifier = (call_expression "strrchr(rl_prompt,10)" identifier (argument_list "(rl_prompt,10)" ( identifier , number_literal )))) ;) (if_statement "if (pcVar1 != (char *)0x0) {\n      sVar2 = strlen(pcVar1 + 1);\n      __dest = (char *)xmalloc(sVar2 + 2);\n      if (sVar2 != 0) {\n        strcpy(__dest,pcVar1 + 1);\n      }\n      __dest[sVar2 + 1] = '\0';\n      __dest[sVar2] = param_1;\n      goto LAB_000fb00d;\n    }" if (parenthesized_expression "(pcVar1 != (char *)0x0)" ( (binary_expression "pcVar1 != (char *)0x0" identifier != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      sVar2 = strlen(pcVar1 + 1);\n      __dest = (char *)xmalloc(sVar2 + 2);\n      if (sVar2 != 0) {\n        strcpy(__dest,pcVar1 + 1);\n      }\n      __dest[sVar2 + 1] = '\0';\n      __dest[sVar2] = param_1;\n      goto LAB_000fb00d;\n    }" { (expression_statement "sVar2 = strlen(pcVar1 + 1);" (assignment_expression "sVar2 = strlen(pcVar1 + 1)" identifier = (call_expression "strlen(pcVar1 + 1)" identifier (argument_list "(pcVar1 + 1)" ( (binary_expression "pcVar1 + 1" identifier + number_literal) )))) ;) (expression_statement "__dest = (char *)xmalloc(sVar2 + 2);" (assignment_expression "__dest = (char *)xmalloc(sVar2 + 2)" identifier = (cast_expression "(char *)xmalloc(sVar2 + 2)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "xmalloc(sVar2 + 2)" identifier (argument_list "(sVar2 + 2)" ( (binary_expression "sVar2 + 2" identifier + number_literal) ))))) ;) (if_statement "if (sVar2 != 0) {\n        strcpy(__dest,pcVar1 + 1);\n      }" if (parenthesized_expression "(sVar2 != 0)" ( (binary_expression "sVar2 != 0" identifier != number_literal) )) (compound_statement "{\n        strcpy(__dest,pcVar1 + 1);\n      }" { (expression_statement "strcpy(__dest,pcVar1 + 1);" (call_expression "strcpy(__dest,pcVar1 + 1)" identifier (argument_list "(__dest,pcVar1 + 1)" ( identifier , (binary_expression "pcVar1 + 1" identifier + number_literal) ))) ;) })) (expression_statement "__dest[sVar2 + 1] = '\0';" (assignment_expression "__dest[sVar2 + 1] = '\0'" (subscript_expression "__dest[sVar2 + 1]" identifier [ (binary_expression "sVar2 + 1" identifier + number_literal) ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "__dest[sVar2] = param_1;" (assignment_expression "__dest[sVar2] = param_1" (subscript_expression "__dest[sVar2]" identifier [ identifier ]) = identifier) ;) (goto_statement "goto LAB_000fb00d;" goto statement_identifier ;) })) (if_statement "if (*pcVar3 == '\0') goto LAB_000fb088;" if (parenthesized_expression "(*pcVar3 == '\0')" ( (binary_expression "*pcVar3 == '\0'" (pointer_expression "*pcVar3" * identifier) == (char_literal "'\0'" ' escape_sequence ')) )) (goto_statement "goto LAB_000fb088;" goto statement_identifier ;)) (expression_statement "sVar2 = strlen(pcVar3);" (assignment_expression "sVar2 = strlen(pcVar3)" identifier = (call_expression "strlen(pcVar3)" identifier (argument_list "(pcVar3)" ( identifier )))) ;) (expression_statement "__dest = (char *)xmalloc(sVar2 + 2);" (assignment_expression "__dest = (char *)xmalloc(sVar2 + 2)" identifier = (cast_expression "(char *)xmalloc(sVar2 + 2)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "xmalloc(sVar2 + 2)" identifier (argument_list "(sVar2 + 2)" ( (binary_expression "sVar2 + 2" identifier + number_literal) ))))) ;) (expression_statement "iVar4 = sVar2 + 1;" (assignment_expression "iVar4 = sVar2 + 1" identifier = (binary_expression "sVar2 + 1" identifier + number_literal)) ;) (if_statement "if (sVar2 == 0) {\n      iVar4 = 1;\n      pcVar3 = __dest;\n    }\n    else {\n      strcpy(__dest,rl_prompt);\n      pcVar3 = __dest + sVar2;\n    }" if (parenthesized_expression "(sVar2 == 0)" ( (binary_expression "sVar2 == 0" identifier == number_literal) )) (compound_statement "{\n      iVar4 = 1;\n      pcVar3 = __dest;\n    }" { (expression_statement "iVar4 = 1;" (assignment_expression "iVar4 = 1" identifier = number_literal) ;) (expression_statement "pcVar3 = __dest;" (assignment_expression "pcVar3 = __dest" identifier = identifier) ;) }) (else_clause "else {\n      strcpy(__dest,rl_prompt);\n      pcVar3 = __dest + sVar2;\n    }" else (compound_statement "{\n      strcpy(__dest,rl_prompt);\n      pcVar3 = __dest + sVar2;\n    }" { (expression_statement "strcpy(__dest,rl_prompt);" (call_expression "strcpy(__dest,rl_prompt)" identifier (argument_list "(__dest,rl_prompt)" ( identifier , identifier ))) ;) (expression_statement "pcVar3 = __dest + sVar2;" (assignment_expression "pcVar3 = __dest + sVar2" identifier = (binary_expression "__dest + sVar2" identifier + identifier)) ;) }))) }))) (expression_statement "*pcVar3 = param_1;" (assignment_expression "*pcVar3 = param_1" (pointer_expression "*pcVar3" * identifier) = identifier) ;) (expression_statement "__dest[iVar4] = '\0';" (assignment_expression "__dest[iVar4] = '\0'" (subscript_expression "__dest[iVar4]" identifier [ identifier ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (labeled_statement "LAB_000fb00d:\n  DAT_00179f0c = DAT_00179ee0 + 1;" statement_identifier : (expression_statement "DAT_00179f0c = DAT_00179ee0 + 1;" (assignment_expression "DAT_00179f0c = DAT_00179ee0 + 1" identifier = (binary_expression "DAT_00179ee0 + 1" identifier + number_literal)) ;)) (return_statement "return __dest;" return identifier ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* WARNING: Unknown calling convention */\n\nchar * _rl_make_prompt_for_search(int pchar)\n\n{\n  char *pcVar1;\n  size_t sVar2;\n  char *__dest;\n  char *pcVar3;\n  int iVar4;\n  \n  saved_local_prompt = local_prompt;\n  saved_local_prefix = local_prompt_prefix;\n  saved_local_length = local_prompt_len;\n  saved_prefix_length = prompt_prefix_length;\n  saved_visible_length = prompt_visible_length;\n  saved_last_invisible = prompt_last_invisible;\n  saved_invis_chars_first_line = prompt_invis_chars_first_line;\n  saved_physical_chars = prompt_physical_chars;\n  saved_local_prompt_newlines = local_prompt_newlines;\n  pcVar3 = rl_prompt;\n  local_prompt = (char *)0x0;\n  local_prompt_prefix = (char *)0x0;\n  prompt_prefix_length = 0;\n  local_prompt_len = 0;\n  prompt_last_invisible = 0;\n  prompt_visible_length = 0;\n  prompt_invis_chars_first_line = 0;\n  prompt_physical_chars = 0;\n  local_prompt_newlines = (int *)0x0;\n  if (rl_prompt == (char *)0x0) {\nLAB_000fb088:\n    iVar4 = 1;\n    pcVar3 = (char *)xmalloc(2);\n    __dest = pcVar3;\n  }\n  else {\n    pcVar1 = strrchr(rl_prompt,10);\n    if (pcVar1 != (char *)0x0) {\n      sVar2 = strlen(pcVar1 + 1);\n      __dest = (char *)xmalloc(sVar2 + 2);\n      if (sVar2 != 0) {\n        strcpy(__dest,pcVar1 + 1);\n      }\n      __dest[sVar2 + 1] = '\0';\n      __dest[sVar2] = (char)pchar;\n      goto LAB_000fb00d;\n    }\n    if (*pcVar3 == '\0') goto LAB_000fb088;\n    sVar2 = strlen(pcVar3);\n    __dest = (char *)xmalloc(sVar2 + 2);\n    iVar4 = sVar2 + 1;\n    if (sVar2 == 0) {\n      iVar4 = 1;\n      pcVar3 = __dest;\n    }\n    else {\n      strcpy(__dest,rl_prompt);\n      pcVar3 = __dest + sVar2;\n    }\n  }\n  *pcVar3 = (char)pchar;\n  __dest[iVar4] = '\0';\nLAB_000fb00d:\n  prompt_physical_chars = saved_physical_chars + 1;\n  return __dest;\n}\n\n" comment comment (function_definition "char * _rl_make_prompt_for_search(int pchar)\n\n{\n  char *pcVar1;\n  size_t sVar2;\n  char *__dest;\n  char *pcVar3;\n  int iVar4;\n  \n  saved_local_prompt = local_prompt;\n  saved_local_prefix = local_prompt_prefix;\n  saved_local_length = local_prompt_len;\n  saved_prefix_length = prompt_prefix_length;\n  saved_visible_length = prompt_visible_length;\n  saved_last_invisible = prompt_last_invisible;\n  saved_invis_chars_first_line = prompt_invis_chars_first_line;\n  saved_physical_chars = prompt_physical_chars;\n  saved_local_prompt_newlines = local_prompt_newlines;\n  pcVar3 = rl_prompt;\n  local_prompt = (char *)0x0;\n  local_prompt_prefix = (char *)0x0;\n  prompt_prefix_length = 0;\n  local_prompt_len = 0;\n  prompt_last_invisible = 0;\n  prompt_visible_length = 0;\n  prompt_invis_chars_first_line = 0;\n  prompt_physical_chars = 0;\n  local_prompt_newlines = (int *)0x0;\n  if (rl_prompt == (char *)0x0) {\nLAB_000fb088:\n    iVar4 = 1;\n    pcVar3 = (char *)xmalloc(2);\n    __dest = pcVar3;\n  }\n  else {\n    pcVar1 = strrchr(rl_prompt,10);\n    if (pcVar1 != (char *)0x0) {\n      sVar2 = strlen(pcVar1 + 1);\n      __dest = (char *)xmalloc(sVar2 + 2);\n      if (sVar2 != 0) {\n        strcpy(__dest,pcVar1 + 1);\n      }\n      __dest[sVar2 + 1] = '\0';\n      __dest[sVar2] = (char)pchar;\n      goto LAB_000fb00d;\n    }\n    if (*pcVar3 == '\0') goto LAB_000fb088;\n    sVar2 = strlen(pcVar3);\n    __dest = (char *)xmalloc(sVar2 + 2);\n    iVar4 = sVar2 + 1;\n    if (sVar2 == 0) {\n      iVar4 = 1;\n      pcVar3 = __dest;\n    }\n    else {\n      strcpy(__dest,rl_prompt);\n      pcVar3 = __dest + sVar2;\n    }\n  }\n  *pcVar3 = (char)pchar;\n  __dest[iVar4] = '\0';\nLAB_000fb00d:\n  prompt_physical_chars = saved_physical_chars + 1;\n  return __dest;\n}" primitive_type (pointer_declarator "* _rl_make_prompt_for_search(int pchar)" * (function_declarator "_rl_make_prompt_for_search(int pchar)" identifier (parameter_list "(int pchar)" ( (parameter_declaration "int pchar" primitive_type identifier) )))) (compound_statement "{\n  char *pcVar1;\n  size_t sVar2;\n  char *__dest;\n  char *pcVar3;\n  int iVar4;\n  \n  saved_local_prompt = local_prompt;\n  saved_local_prefix = local_prompt_prefix;\n  saved_local_length = local_prompt_len;\n  saved_prefix_length = prompt_prefix_length;\n  saved_visible_length = prompt_visible_length;\n  saved_last_invisible = prompt_last_invisible;\n  saved_invis_chars_first_line = prompt_invis_chars_first_line;\n  saved_physical_chars = prompt_physical_chars;\n  saved_local_prompt_newlines = local_prompt_newlines;\n  pcVar3 = rl_prompt;\n  local_prompt = (char *)0x0;\n  local_prompt_prefix = (char *)0x0;\n  prompt_prefix_length = 0;\n  local_prompt_len = 0;\n  prompt_last_invisible = 0;\n  prompt_visible_length = 0;\n  prompt_invis_chars_first_line = 0;\n  prompt_physical_chars = 0;\n  local_prompt_newlines = (int *)0x0;\n  if (rl_prompt == (char *)0x0) {\nLAB_000fb088:\n    iVar4 = 1;\n    pcVar3 = (char *)xmalloc(2);\n    __dest = pcVar3;\n  }\n  else {\n    pcVar1 = strrchr(rl_prompt,10);\n    if (pcVar1 != (char *)0x0) {\n      sVar2 = strlen(pcVar1 + 1);\n      __dest = (char *)xmalloc(sVar2 + 2);\n      if (sVar2 != 0) {\n        strcpy(__dest,pcVar1 + 1);\n      }\n      __dest[sVar2 + 1] = '\0';\n      __dest[sVar2] = (char)pchar;\n      goto LAB_000fb00d;\n    }\n    if (*pcVar3 == '\0') goto LAB_000fb088;\n    sVar2 = strlen(pcVar3);\n    __dest = (char *)xmalloc(sVar2 + 2);\n    iVar4 = sVar2 + 1;\n    if (sVar2 == 0) {\n      iVar4 = 1;\n      pcVar3 = __dest;\n    }\n    else {\n      strcpy(__dest,rl_prompt);\n      pcVar3 = __dest + sVar2;\n    }\n  }\n  *pcVar3 = (char)pchar;\n  __dest[iVar4] = '\0';\nLAB_000fb00d:\n  prompt_physical_chars = saved_physical_chars + 1;\n  return __dest;\n}" { (declaration "char *pcVar1;" primitive_type (pointer_declarator "*pcVar1" * identifier) ;) (declaration "size_t sVar2;" primitive_type identifier ;) (declaration "char *__dest;" primitive_type (pointer_declarator "*__dest" * identifier) ;) (declaration "char *pcVar3;" primitive_type (pointer_declarator "*pcVar3" * identifier) ;) (declaration "int iVar4;" primitive_type identifier ;) (expression_statement "saved_local_prompt = local_prompt;" (assignment_expression "saved_local_prompt = local_prompt" identifier = identifier) ;) (expression_statement "saved_local_prefix = local_prompt_prefix;" (assignment_expression "saved_local_prefix = local_prompt_prefix" identifier = identifier) ;) (expression_statement "saved_local_length = local_prompt_len;" (assignment_expression "saved_local_length = local_prompt_len" identifier = identifier) ;) (expression_statement "saved_prefix_length = prompt_prefix_length;" (assignment_expression "saved_prefix_length = prompt_prefix_length" identifier = identifier) ;) (expression_statement "saved_visible_length = prompt_visible_length;" (assignment_expression "saved_visible_length = prompt_visible_length" identifier = identifier) ;) (expression_statement "saved_last_invisible = prompt_last_invisible;" (assignment_expression "saved_last_invisible = prompt_last_invisible" identifier = identifier) ;) (expression_statement "saved_invis_chars_first_line = prompt_invis_chars_first_line;" (assignment_expression "saved_invis_chars_first_line = prompt_invis_chars_first_line" identifier = identifier) ;) (expression_statement "saved_physical_chars = prompt_physical_chars;" (assignment_expression "saved_physical_chars = prompt_physical_chars" identifier = identifier) ;) (expression_statement "saved_local_prompt_newlines = local_prompt_newlines;" (assignment_expression "saved_local_prompt_newlines = local_prompt_newlines" identifier = identifier) ;) (expression_statement "pcVar3 = rl_prompt;" (assignment_expression "pcVar3 = rl_prompt" identifier = identifier) ;) (expression_statement "local_prompt = (char *)0x0;" (assignment_expression "local_prompt = (char *)0x0" identifier = (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (expression_statement "local_prompt_prefix = (char *)0x0;" (assignment_expression "local_prompt_prefix = (char *)0x0" identifier = (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (expression_statement "prompt_prefix_length = 0;" (assignment_expression "prompt_prefix_length = 0" identifier = number_literal) ;) (expression_statement "local_prompt_len = 0;" (assignment_expression "local_prompt_len = 0" identifier = number_literal) ;) (expression_statement "prompt_last_invisible = 0;" (assignment_expression "prompt_last_invisible = 0" identifier = number_literal) ;) (expression_statement "prompt_visible_length = 0;" (assignment_expression "prompt_visible_length = 0" identifier = number_literal) ;) (expression_statement "prompt_invis_chars_first_line = 0;" (assignment_expression "prompt_invis_chars_first_line = 0" identifier = number_literal) ;) (expression_statement "prompt_physical_chars = 0;" (assignment_expression "prompt_physical_chars = 0" identifier = number_literal) ;) (expression_statement "local_prompt_newlines = (int *)0x0;" (assignment_expression "local_prompt_newlines = (int *)0x0" identifier = (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (if_statement "if (rl_prompt == (char *)0x0) {\nLAB_000fb088:\n    iVar4 = 1;\n    pcVar3 = (char *)xmalloc(2);\n    __dest = pcVar3;\n  }\n  else {\n    pcVar1 = strrchr(rl_prompt,10);\n    if (pcVar1 != (char *)0x0) {\n      sVar2 = strlen(pcVar1 + 1);\n      __dest = (char *)xmalloc(sVar2 + 2);\n      if (sVar2 != 0) {\n        strcpy(__dest,pcVar1 + 1);\n      }\n      __dest[sVar2 + 1] = '\0';\n      __dest[sVar2] = (char)pchar;\n      goto LAB_000fb00d;\n    }\n    if (*pcVar3 == '\0') goto LAB_000fb088;\n    sVar2 = strlen(pcVar3);\n    __dest = (char *)xmalloc(sVar2 + 2);\n    iVar4 = sVar2 + 1;\n    if (sVar2 == 0) {\n      iVar4 = 1;\n      pcVar3 = __dest;\n    }\n    else {\n      strcpy(__dest,rl_prompt);\n      pcVar3 = __dest + sVar2;\n    }\n  }" if (parenthesized_expression "(rl_prompt == (char *)0x0)" ( (binary_expression "rl_prompt == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\nLAB_000fb088:\n    iVar4 = 1;\n    pcVar3 = (char *)xmalloc(2);\n    __dest = pcVar3;\n  }" { (labeled_statement "LAB_000fb088:\n    iVar4 = 1;" statement_identifier : (expression_statement "iVar4 = 1;" (assignment_expression "iVar4 = 1" identifier = number_literal) ;)) (expression_statement "pcVar3 = (char *)xmalloc(2);" (assignment_expression "pcVar3 = (char *)xmalloc(2)" identifier = (cast_expression "(char *)xmalloc(2)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "xmalloc(2)" identifier (argument_list "(2)" ( number_literal ))))) ;) (expression_statement "__dest = pcVar3;" (assignment_expression "__dest = pcVar3" identifier = identifier) ;) }) (else_clause "else {\n    pcVar1 = strrchr(rl_prompt,10);\n    if (pcVar1 != (char *)0x0) {\n      sVar2 = strlen(pcVar1 + 1);\n      __dest = (char *)xmalloc(sVar2 + 2);\n      if (sVar2 != 0) {\n        strcpy(__dest,pcVar1 + 1);\n      }\n      __dest[sVar2 + 1] = '\0';\n      __dest[sVar2] = (char)pchar;\n      goto LAB_000fb00d;\n    }\n    if (*pcVar3 == '\0') goto LAB_000fb088;\n    sVar2 = strlen(pcVar3);\n    __dest = (char *)xmalloc(sVar2 + 2);\n    iVar4 = sVar2 + 1;\n    if (sVar2 == 0) {\n      iVar4 = 1;\n      pcVar3 = __dest;\n    }\n    else {\n      strcpy(__dest,rl_prompt);\n      pcVar3 = __dest + sVar2;\n    }\n  }" else (compound_statement "{\n    pcVar1 = strrchr(rl_prompt,10);\n    if (pcVar1 != (char *)0x0) {\n      sVar2 = strlen(pcVar1 + 1);\n      __dest = (char *)xmalloc(sVar2 + 2);\n      if (sVar2 != 0) {\n        strcpy(__dest,pcVar1 + 1);\n      }\n      __dest[sVar2 + 1] = '\0';\n      __dest[sVar2] = (char)pchar;\n      goto LAB_000fb00d;\n    }\n    if (*pcVar3 == '\0') goto LAB_000fb088;\n    sVar2 = strlen(pcVar3);\n    __dest = (char *)xmalloc(sVar2 + 2);\n    iVar4 = sVar2 + 1;\n    if (sVar2 == 0) {\n      iVar4 = 1;\n      pcVar3 = __dest;\n    }\n    else {\n      strcpy(__dest,rl_prompt);\n      pcVar3 = __dest + sVar2;\n    }\n  }" { (expression_statement "pcVar1 = strrchr(rl_prompt,10);" (assignment_expression "pcVar1 = strrchr(rl_prompt,10)" identifier = (call_expression "strrchr(rl_prompt,10)" identifier (argument_list "(rl_prompt,10)" ( identifier , number_literal )))) ;) (if_statement "if (pcVar1 != (char *)0x0) {\n      sVar2 = strlen(pcVar1 + 1);\n      __dest = (char *)xmalloc(sVar2 + 2);\n      if (sVar2 != 0) {\n        strcpy(__dest,pcVar1 + 1);\n      }\n      __dest[sVar2 + 1] = '\0';\n      __dest[sVar2] = (char)pchar;\n      goto LAB_000fb00d;\n    }" if (parenthesized_expression "(pcVar1 != (char *)0x0)" ( (binary_expression "pcVar1 != (char *)0x0" identifier != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      sVar2 = strlen(pcVar1 + 1);\n      __dest = (char *)xmalloc(sVar2 + 2);\n      if (sVar2 != 0) {\n        strcpy(__dest,pcVar1 + 1);\n      }\n      __dest[sVar2 + 1] = '\0';\n      __dest[sVar2] = (char)pchar;\n      goto LAB_000fb00d;\n    }" { (expression_statement "sVar2 = strlen(pcVar1 + 1);" (assignment_expression "sVar2 = strlen(pcVar1 + 1)" identifier = (call_expression "strlen(pcVar1 + 1)" identifier (argument_list "(pcVar1 + 1)" ( (binary_expression "pcVar1 + 1" identifier + number_literal) )))) ;) (expression_statement "__dest = (char *)xmalloc(sVar2 + 2);" (assignment_expression "__dest = (char *)xmalloc(sVar2 + 2)" identifier = (cast_expression "(char *)xmalloc(sVar2 + 2)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "xmalloc(sVar2 + 2)" identifier (argument_list "(sVar2 + 2)" ( (binary_expression "sVar2 + 2" identifier + number_literal) ))))) ;) (if_statement "if (sVar2 != 0) {\n        strcpy(__dest,pcVar1 + 1);\n      }" if (parenthesized_expression "(sVar2 != 0)" ( (binary_expression "sVar2 != 0" identifier != number_literal) )) (compound_statement "{\n        strcpy(__dest,pcVar1 + 1);\n      }" { (expression_statement "strcpy(__dest,pcVar1 + 1);" (call_expression "strcpy(__dest,pcVar1 + 1)" identifier (argument_list "(__dest,pcVar1 + 1)" ( identifier , (binary_expression "pcVar1 + 1" identifier + number_literal) ))) ;) })) (expression_statement "__dest[sVar2 + 1] = '\0';" (assignment_expression "__dest[sVar2 + 1] = '\0'" (subscript_expression "__dest[sVar2 + 1]" identifier [ (binary_expression "sVar2 + 1" identifier + number_literal) ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "__dest[sVar2] = (char)pchar;" (assignment_expression "__dest[sVar2] = (char)pchar" (subscript_expression "__dest[sVar2]" identifier [ identifier ]) = (cast_expression "(char)pchar" ( (type_descriptor "char" primitive_type) ) identifier)) ;) (goto_statement "goto LAB_000fb00d;" goto statement_identifier ;) })) (if_statement "if (*pcVar3 == '\0') goto LAB_000fb088;" if (parenthesized_expression "(*pcVar3 == '\0')" ( (binary_expression "*pcVar3 == '\0'" (pointer_expression "*pcVar3" * identifier) == (char_literal "'\0'" ' escape_sequence ')) )) (goto_statement "goto LAB_000fb088;" goto statement_identifier ;)) (expression_statement "sVar2 = strlen(pcVar3);" (assignment_expression "sVar2 = strlen(pcVar3)" identifier = (call_expression "strlen(pcVar3)" identifier (argument_list "(pcVar3)" ( identifier )))) ;) (expression_statement "__dest = (char *)xmalloc(sVar2 + 2);" (assignment_expression "__dest = (char *)xmalloc(sVar2 + 2)" identifier = (cast_expression "(char *)xmalloc(sVar2 + 2)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "xmalloc(sVar2 + 2)" identifier (argument_list "(sVar2 + 2)" ( (binary_expression "sVar2 + 2" identifier + number_literal) ))))) ;) (expression_statement "iVar4 = sVar2 + 1;" (assignment_expression "iVar4 = sVar2 + 1" identifier = (binary_expression "sVar2 + 1" identifier + number_literal)) ;) (if_statement "if (sVar2 == 0) {\n      iVar4 = 1;\n      pcVar3 = __dest;\n    }\n    else {\n      strcpy(__dest,rl_prompt);\n      pcVar3 = __dest + sVar2;\n    }" if (parenthesized_expression "(sVar2 == 0)" ( (binary_expression "sVar2 == 0" identifier == number_literal) )) (compound_statement "{\n      iVar4 = 1;\n      pcVar3 = __dest;\n    }" { (expression_statement "iVar4 = 1;" (assignment_expression "iVar4 = 1" identifier = number_literal) ;) (expression_statement "pcVar3 = __dest;" (assignment_expression "pcVar3 = __dest" identifier = identifier) ;) }) (else_clause "else {\n      strcpy(__dest,rl_prompt);\n      pcVar3 = __dest + sVar2;\n    }" else (compound_statement "{\n      strcpy(__dest,rl_prompt);\n      pcVar3 = __dest + sVar2;\n    }" { (expression_statement "strcpy(__dest,rl_prompt);" (call_expression "strcpy(__dest,rl_prompt)" identifier (argument_list "(__dest,rl_prompt)" ( identifier , identifier ))) ;) (expression_statement "pcVar3 = __dest + sVar2;" (assignment_expression "pcVar3 = __dest + sVar2" identifier = (binary_expression "__dest + sVar2" identifier + identifier)) ;) }))) }))) (expression_statement "*pcVar3 = (char)pchar;" (assignment_expression "*pcVar3 = (char)pchar" (pointer_expression "*pcVar3" * identifier) = (cast_expression "(char)pchar" ( (type_descriptor "char" primitive_type) ) identifier)) ;) (expression_statement "__dest[iVar4] = '\0';" (assignment_expression "__dest[iVar4] = '\0'" (subscript_expression "__dest[iVar4]" identifier [ identifier ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (labeled_statement "LAB_000fb00d:\n  prompt_physical_chars = saved_physical_chars + 1;" statement_identifier : (expression_statement "prompt_physical_chars = saved_physical_chars + 1;" (assignment_expression "prompt_physical_chars = saved_physical_chars + 1" identifier = (binary_expression "saved_physical_chars + 1" identifier + number_literal)) ;)) (return_statement "return __dest;" return identifier ;) })))
(translation_unit "char * _rl_make_prompt_for_search(char param_1)\n\n{\n  char *pcVar1;\n  size_t sVar2;\n  char *__dest;\n  char *pcVar3;\n  int iVar4;\n  \n  DAT_00179f00 = DAT_00179f38;\n  DAT_00179efc = DAT_00179f34;\n  DAT_00179ee8 = DAT_00179f30;\n  DAT_00179eec = DAT_00179f2c;\n  DAT_00179ef0 = DAT_00179f28;\n  DAT_00179ef4 = DAT_00179f1c;\n  DAT_00179ee4 = DAT_00179f14;\n  DAT_00179ee0 = DAT_00179f0c;\n  DAT_00179ef8 = DAT_00179f08;\n  pcVar3 = rl_prompt;\n  DAT_00179f38 = 0;\n  DAT_00179f34 = 0;\n  DAT_00179f2c = 0;\n  DAT_00179f30 = 0;\n  DAT_00179f1c = 0;\n  DAT_00179f28 = 0;\n  DAT_00179f14 = 0;\n  DAT_00179f0c = 0;\n  DAT_00179f08 = 0;\n  if (rl_prompt == (char *)0x0) {\nLAB_000fb088:\n    iVar4 = 1;\n    pcVar3 = (char *)xmalloc(2);\n    __dest = pcVar3;\n  }\n  else {\n    pcVar1 = strrchr(rl_prompt,10);\n    if (pcVar1 != (char *)0x0) {\n      sVar2 = strlen(pcVar1 + 1);\n      __dest = (char *)xmalloc(sVar2 + 2);\n      if (sVar2 != 0) {\n        strcpy(__dest,pcVar1 + 1);\n      }\n      __dest[sVar2 + 1] = '\0';\n      __dest[sVar2] = param_1;\n      goto LAB_000fb00d;\n    }\n    if (*pcVar3 == '\0') goto LAB_000fb088;\n    sVar2 = strlen(pcVar3);\n    __dest = (char *)xmalloc(sVar2 + 2);\n    iVar4 = sVar2 + 1;\n    if (sVar2 == 0) {\n      iVar4 = 1;\n      pcVar3 = __dest;\n    }\n    else {\n      strcpy(__dest,rl_prompt);\n      pcVar3 = __dest + sVar2;\n    }\n  }\n  *pcVar3 = param_1;\n  __dest[iVar4] = '\0';\nLAB_000fb00d:\n  DAT_00179f0c = DAT_00179ee0 + 1;\n  return __dest;\n}\n\n" (function_definition "char * _rl_make_prompt_for_search(char param_1)\n\n{\n  char *pcVar1;\n  size_t sVar2;\n  char *__dest;\n  char *pcVar3;\n  int iVar4;\n  \n  DAT_00179f00 = DAT_00179f38;\n  DAT_00179efc = DAT_00179f34;\n  DAT_00179ee8 = DAT_00179f30;\n  DAT_00179eec = DAT_00179f2c;\n  DAT_00179ef0 = DAT_00179f28;\n  DAT_00179ef4 = DAT_00179f1c;\n  DAT_00179ee4 = DAT_00179f14;\n  DAT_00179ee0 = DAT_00179f0c;\n  DAT_00179ef8 = DAT_00179f08;\n  pcVar3 = rl_prompt;\n  DAT_00179f38 = 0;\n  DAT_00179f34 = 0;\n  DAT_00179f2c = 0;\n  DAT_00179f30 = 0;\n  DAT_00179f1c = 0;\n  DAT_00179f28 = 0;\n  DAT_00179f14 = 0;\n  DAT_00179f0c = 0;\n  DAT_00179f08 = 0;\n  if (rl_prompt == (char *)0x0) {\nLAB_000fb088:\n    iVar4 = 1;\n    pcVar3 = (char *)xmalloc(2);\n    __dest = pcVar3;\n  }\n  else {\n    pcVar1 = strrchr(rl_prompt,10);\n    if (pcVar1 != (char *)0x0) {\n      sVar2 = strlen(pcVar1 + 1);\n      __dest = (char *)xmalloc(sVar2 + 2);\n      if (sVar2 != 0) {\n        strcpy(__dest,pcVar1 + 1);\n      }\n      __dest[sVar2 + 1] = '\0';\n      __dest[sVar2] = param_1;\n      goto LAB_000fb00d;\n    }\n    if (*pcVar3 == '\0') goto LAB_000fb088;\n    sVar2 = strlen(pcVar3);\n    __dest = (char *)xmalloc(sVar2 + 2);\n    iVar4 = sVar2 + 1;\n    if (sVar2 == 0) {\n      iVar4 = 1;\n      pcVar3 = __dest;\n    }\n    else {\n      strcpy(__dest,rl_prompt);\n      pcVar3 = __dest + sVar2;\n    }\n  }\n  *pcVar3 = param_1;\n  __dest[iVar4] = '\0';\nLAB_000fb00d:\n  DAT_00179f0c = DAT_00179ee0 + 1;\n  return __dest;\n}" primitive_type (pointer_declarator "* _rl_make_prompt_for_search(char param_1)" * (function_declarator "_rl_make_prompt_for_search(char param_1)" identifier (parameter_list "(char param_1)" ( (parameter_declaration "char param_1" primitive_type identifier) )))) (compound_statement "{\n  char *pcVar1;\n  size_t sVar2;\n  char *__dest;\n  char *pcVar3;\n  int iVar4;\n  \n  DAT_00179f00 = DAT_00179f38;\n  DAT_00179efc = DAT_00179f34;\n  DAT_00179ee8 = DAT_00179f30;\n  DAT_00179eec = DAT_00179f2c;\n  DAT_00179ef0 = DAT_00179f28;\n  DAT_00179ef4 = DAT_00179f1c;\n  DAT_00179ee4 = DAT_00179f14;\n  DAT_00179ee0 = DAT_00179f0c;\n  DAT_00179ef8 = DAT_00179f08;\n  pcVar3 = rl_prompt;\n  DAT_00179f38 = 0;\n  DAT_00179f34 = 0;\n  DAT_00179f2c = 0;\n  DAT_00179f30 = 0;\n  DAT_00179f1c = 0;\n  DAT_00179f28 = 0;\n  DAT_00179f14 = 0;\n  DAT_00179f0c = 0;\n  DAT_00179f08 = 0;\n  if (rl_prompt == (char *)0x0) {\nLAB_000fb088:\n    iVar4 = 1;\n    pcVar3 = (char *)xmalloc(2);\n    __dest = pcVar3;\n  }\n  else {\n    pcVar1 = strrchr(rl_prompt,10);\n    if (pcVar1 != (char *)0x0) {\n      sVar2 = strlen(pcVar1 + 1);\n      __dest = (char *)xmalloc(sVar2 + 2);\n      if (sVar2 != 0) {\n        strcpy(__dest,pcVar1 + 1);\n      }\n      __dest[sVar2 + 1] = '\0';\n      __dest[sVar2] = param_1;\n      goto LAB_000fb00d;\n    }\n    if (*pcVar3 == '\0') goto LAB_000fb088;\n    sVar2 = strlen(pcVar3);\n    __dest = (char *)xmalloc(sVar2 + 2);\n    iVar4 = sVar2 + 1;\n    if (sVar2 == 0) {\n      iVar4 = 1;\n      pcVar3 = __dest;\n    }\n    else {\n      strcpy(__dest,rl_prompt);\n      pcVar3 = __dest + sVar2;\n    }\n  }\n  *pcVar3 = param_1;\n  __dest[iVar4] = '\0';\nLAB_000fb00d:\n  DAT_00179f0c = DAT_00179ee0 + 1;\n  return __dest;\n}" { (declaration "char *pcVar1;" primitive_type (pointer_declarator "*pcVar1" * identifier) ;) (declaration "size_t sVar2;" primitive_type identifier ;) (declaration "char *__dest;" primitive_type (pointer_declarator "*__dest" * identifier) ;) (declaration "char *pcVar3;" primitive_type (pointer_declarator "*pcVar3" * identifier) ;) (declaration "int iVar4;" primitive_type identifier ;) (expression_statement "DAT_00179f00 = DAT_00179f38;" (assignment_expression "DAT_00179f00 = DAT_00179f38" identifier = identifier) ;) (expression_statement "DAT_00179efc = DAT_00179f34;" (assignment_expression "DAT_00179efc = DAT_00179f34" identifier = identifier) ;) (expression_statement "DAT_00179ee8 = DAT_00179f30;" (assignment_expression "DAT_00179ee8 = DAT_00179f30" identifier = identifier) ;) (expression_statement "DAT_00179eec = DAT_00179f2c;" (assignment_expression "DAT_00179eec = DAT_00179f2c" identifier = identifier) ;) (expression_statement "DAT_00179ef0 = DAT_00179f28;" (assignment_expression "DAT_00179ef0 = DAT_00179f28" identifier = identifier) ;) (expression_statement "DAT_00179ef4 = DAT_00179f1c;" (assignment_expression "DAT_00179ef4 = DAT_00179f1c" identifier = identifier) ;) (expression_statement "DAT_00179ee4 = DAT_00179f14;" (assignment_expression "DAT_00179ee4 = DAT_00179f14" identifier = identifier) ;) (expression_statement "DAT_00179ee0 = DAT_00179f0c;" (assignment_expression "DAT_00179ee0 = DAT_00179f0c" identifier = identifier) ;) (expression_statement "DAT_00179ef8 = DAT_00179f08;" (assignment_expression "DAT_00179ef8 = DAT_00179f08" identifier = identifier) ;) (expression_statement "pcVar3 = rl_prompt;" (assignment_expression "pcVar3 = rl_prompt" identifier = identifier) ;) (expression_statement "DAT_00179f38 = 0;" (assignment_expression "DAT_00179f38 = 0" identifier = number_literal) ;) (expression_statement "DAT_00179f34 = 0;" (assignment_expression "DAT_00179f34 = 0" identifier = number_literal) ;) (expression_statement "DAT_00179f2c = 0;" (assignment_expression "DAT_00179f2c = 0" identifier = number_literal) ;) (expression_statement "DAT_00179f30 = 0;" (assignment_expression "DAT_00179f30 = 0" identifier = number_literal) ;) (expression_statement "DAT_00179f1c = 0;" (assignment_expression "DAT_00179f1c = 0" identifier = number_literal) ;) (expression_statement "DAT_00179f28 = 0;" (assignment_expression "DAT_00179f28 = 0" identifier = number_literal) ;) (expression_statement "DAT_00179f14 = 0;" (assignment_expression "DAT_00179f14 = 0" identifier = number_literal) ;) (expression_statement "DAT_00179f0c = 0;" (assignment_expression "DAT_00179f0c = 0" identifier = number_literal) ;) (expression_statement "DAT_00179f08 = 0;" (assignment_expression "DAT_00179f08 = 0" identifier = number_literal) ;) (if_statement "if (rl_prompt == (char *)0x0) {\nLAB_000fb088:\n    iVar4 = 1;\n    pcVar3 = (char *)xmalloc(2);\n    __dest = pcVar3;\n  }\n  else {\n    pcVar1 = strrchr(rl_prompt,10);\n    if (pcVar1 != (char *)0x0) {\n      sVar2 = strlen(pcVar1 + 1);\n      __dest = (char *)xmalloc(sVar2 + 2);\n      if (sVar2 != 0) {\n        strcpy(__dest,pcVar1 + 1);\n      }\n      __dest[sVar2 + 1] = '\0';\n      __dest[sVar2] = param_1;\n      goto LAB_000fb00d;\n    }\n    if (*pcVar3 == '\0') goto LAB_000fb088;\n    sVar2 = strlen(pcVar3);\n    __dest = (char *)xmalloc(sVar2 + 2);\n    iVar4 = sVar2 + 1;\n    if (sVar2 == 0) {\n      iVar4 = 1;\n      pcVar3 = __dest;\n    }\n    else {\n      strcpy(__dest,rl_prompt);\n      pcVar3 = __dest + sVar2;\n    }\n  }" if (parenthesized_expression "(rl_prompt == (char *)0x0)" ( (binary_expression "rl_prompt == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\nLAB_000fb088:\n    iVar4 = 1;\n    pcVar3 = (char *)xmalloc(2);\n    __dest = pcVar3;\n  }" { (labeled_statement "LAB_000fb088:\n    iVar4 = 1;" statement_identifier : (expression_statement "iVar4 = 1;" (assignment_expression "iVar4 = 1" identifier = number_literal) ;)) (expression_statement "pcVar3 = (char *)xmalloc(2);" (assignment_expression "pcVar3 = (char *)xmalloc(2)" identifier = (cast_expression "(char *)xmalloc(2)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "xmalloc(2)" identifier (argument_list "(2)" ( number_literal ))))) ;) (expression_statement "__dest = pcVar3;" (assignment_expression "__dest = pcVar3" identifier = identifier) ;) }) (else_clause "else {\n    pcVar1 = strrchr(rl_prompt,10);\n    if (pcVar1 != (char *)0x0) {\n      sVar2 = strlen(pcVar1 + 1);\n      __dest = (char *)xmalloc(sVar2 + 2);\n      if (sVar2 != 0) {\n        strcpy(__dest,pcVar1 + 1);\n      }\n      __dest[sVar2 + 1] = '\0';\n      __dest[sVar2] = param_1;\n      goto LAB_000fb00d;\n    }\n    if (*pcVar3 == '\0') goto LAB_000fb088;\n    sVar2 = strlen(pcVar3);\n    __dest = (char *)xmalloc(sVar2 + 2);\n    iVar4 = sVar2 + 1;\n    if (sVar2 == 0) {\n      iVar4 = 1;\n      pcVar3 = __dest;\n    }\n    else {\n      strcpy(__dest,rl_prompt);\n      pcVar3 = __dest + sVar2;\n    }\n  }" else (compound_statement "{\n    pcVar1 = strrchr(rl_prompt,10);\n    if (pcVar1 != (char *)0x0) {\n      sVar2 = strlen(pcVar1 + 1);\n      __dest = (char *)xmalloc(sVar2 + 2);\n      if (sVar2 != 0) {\n        strcpy(__dest,pcVar1 + 1);\n      }\n      __dest[sVar2 + 1] = '\0';\n      __dest[sVar2] = param_1;\n      goto LAB_000fb00d;\n    }\n    if (*pcVar3 == '\0') goto LAB_000fb088;\n    sVar2 = strlen(pcVar3);\n    __dest = (char *)xmalloc(sVar2 + 2);\n    iVar4 = sVar2 + 1;\n    if (sVar2 == 0) {\n      iVar4 = 1;\n      pcVar3 = __dest;\n    }\n    else {\n      strcpy(__dest,rl_prompt);\n      pcVar3 = __dest + sVar2;\n    }\n  }" { (expression_statement "pcVar1 = strrchr(rl_prompt,10);" (assignment_expression "pcVar1 = strrchr(rl_prompt,10)" identifier = (call_expression "strrchr(rl_prompt,10)" identifier (argument_list "(rl_prompt,10)" ( identifier , number_literal )))) ;) (if_statement "if (pcVar1 != (char *)0x0) {\n      sVar2 = strlen(pcVar1 + 1);\n      __dest = (char *)xmalloc(sVar2 + 2);\n      if (sVar2 != 0) {\n        strcpy(__dest,pcVar1 + 1);\n      }\n      __dest[sVar2 + 1] = '\0';\n      __dest[sVar2] = param_1;\n      goto LAB_000fb00d;\n    }" if (parenthesized_expression "(pcVar1 != (char *)0x0)" ( (binary_expression "pcVar1 != (char *)0x0" identifier != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      sVar2 = strlen(pcVar1 + 1);\n      __dest = (char *)xmalloc(sVar2 + 2);\n      if (sVar2 != 0) {\n        strcpy(__dest,pcVar1 + 1);\n      }\n      __dest[sVar2 + 1] = '\0';\n      __dest[sVar2] = param_1;\n      goto LAB_000fb00d;\n    }" { (expression_statement "sVar2 = strlen(pcVar1 + 1);" (assignment_expression "sVar2 = strlen(pcVar1 + 1)" identifier = (call_expression "strlen(pcVar1 + 1)" identifier (argument_list "(pcVar1 + 1)" ( (binary_expression "pcVar1 + 1" identifier + number_literal) )))) ;) (expression_statement "__dest = (char *)xmalloc(sVar2 + 2);" (assignment_expression "__dest = (char *)xmalloc(sVar2 + 2)" identifier = (cast_expression "(char *)xmalloc(sVar2 + 2)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "xmalloc(sVar2 + 2)" identifier (argument_list "(sVar2 + 2)" ( (binary_expression "sVar2 + 2" identifier + number_literal) ))))) ;) (if_statement "if (sVar2 != 0) {\n        strcpy(__dest,pcVar1 + 1);\n      }" if (parenthesized_expression "(sVar2 != 0)" ( (binary_expression "sVar2 != 0" identifier != number_literal) )) (compound_statement "{\n        strcpy(__dest,pcVar1 + 1);\n      }" { (expression_statement "strcpy(__dest,pcVar1 + 1);" (call_expression "strcpy(__dest,pcVar1 + 1)" identifier (argument_list "(__dest,pcVar1 + 1)" ( identifier , (binary_expression "pcVar1 + 1" identifier + number_literal) ))) ;) })) (expression_statement "__dest[sVar2 + 1] = '\0';" (assignment_expression "__dest[sVar2 + 1] = '\0'" (subscript_expression "__dest[sVar2 + 1]" identifier [ (binary_expression "sVar2 + 1" identifier + number_literal) ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "__dest[sVar2] = param_1;" (assignment_expression "__dest[sVar2] = param_1" (subscript_expression "__dest[sVar2]" identifier [ identifier ]) = identifier) ;) (goto_statement "goto LAB_000fb00d;" goto statement_identifier ;) })) (if_statement "if (*pcVar3 == '\0') goto LAB_000fb088;" if (parenthesized_expression "(*pcVar3 == '\0')" ( (binary_expression "*pcVar3 == '\0'" (pointer_expression "*pcVar3" * identifier) == (char_literal "'\0'" ' escape_sequence ')) )) (goto_statement "goto LAB_000fb088;" goto statement_identifier ;)) (expression_statement "sVar2 = strlen(pcVar3);" (assignment_expression "sVar2 = strlen(pcVar3)" identifier = (call_expression "strlen(pcVar3)" identifier (argument_list "(pcVar3)" ( identifier )))) ;) (expression_statement "__dest = (char *)xmalloc(sVar2 + 2);" (assignment_expression "__dest = (char *)xmalloc(sVar2 + 2)" identifier = (cast_expression "(char *)xmalloc(sVar2 + 2)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "xmalloc(sVar2 + 2)" identifier (argument_list "(sVar2 + 2)" ( (binary_expression "sVar2 + 2" identifier + number_literal) ))))) ;) (expression_statement "iVar4 = sVar2 + 1;" (assignment_expression "iVar4 = sVar2 + 1" identifier = (binary_expression "sVar2 + 1" identifier + number_literal)) ;) (if_statement "if (sVar2 == 0) {\n      iVar4 = 1;\n      pcVar3 = __dest;\n    }\n    else {\n      strcpy(__dest,rl_prompt);\n      pcVar3 = __dest + sVar2;\n    }" if (parenthesized_expression "(sVar2 == 0)" ( (binary_expression "sVar2 == 0" identifier == number_literal) )) (compound_statement "{\n      iVar4 = 1;\n      pcVar3 = __dest;\n    }" { (expression_statement "iVar4 = 1;" (assignment_expression "iVar4 = 1" identifier = number_literal) ;) (expression_statement "pcVar3 = __dest;" (assignment_expression "pcVar3 = __dest" identifier = identifier) ;) }) (else_clause "else {\n      strcpy(__dest,rl_prompt);\n      pcVar3 = __dest + sVar2;\n    }" else (compound_statement "{\n      strcpy(__dest,rl_prompt);\n      pcVar3 = __dest + sVar2;\n    }" { (expression_statement "strcpy(__dest,rl_prompt);" (call_expression "strcpy(__dest,rl_prompt)" identifier (argument_list "(__dest,rl_prompt)" ( identifier , identifier ))) ;) (expression_statement "pcVar3 = __dest + sVar2;" (assignment_expression "pcVar3 = __dest + sVar2" identifier = (binary_expression "__dest + sVar2" identifier + identifier)) ;) }))) }))) (expression_statement "*pcVar3 = param_1;" (assignment_expression "*pcVar3 = param_1" (pointer_expression "*pcVar3" * identifier) = identifier) ;) (expression_statement "__dest[iVar4] = '\0';" (assignment_expression "__dest[iVar4] = '\0'" (subscript_expression "__dest[iVar4]" identifier [ identifier ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (labeled_statement "LAB_000fb00d:\n  DAT_00179f0c = DAT_00179ee0 + 1;" statement_identifier : (expression_statement "DAT_00179f0c = DAT_00179ee0 + 1;" (assignment_expression "DAT_00179f0c = DAT_00179ee0 + 1" identifier = (binary_expression "DAT_00179ee0 + 1" identifier + number_literal)) ;)) (return_statement "return __dest;" return identifier ;) })))
(translation_unit (function_definition TYPE (pointer_declarator * (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) )))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (labeled_statement statement_identifier : (expression_statement (assignment_expression IDENT = LIT) ;)) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( LIT ))))) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , LIT )))) ;) (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 ( (binary_expression IDENT + LIT) )))) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( (binary_expression IDENT + LIT) ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT , (binary_expression IDENT + LIT) ))) ;) })) (expression_statement (assignment_expression (subscript_expression IDENT [ (binary_expression IDENT + LIT) ]) = (char_literal ' escape_sequence ')) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ IDENT ]) = IDENT) ;) (goto_statement goto statement_identifier ;) })) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) == (char_literal ' escape_sequence ')) )) (goto_statement goto statement_identifier ;)) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) }) (else_clause else (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT ))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + IDENT)) ;) }))) }))) (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ IDENT ]) = (char_literal ' escape_sequence ')) ;) (labeled_statement statement_identifier : (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;)) (return_statement return IDENT ;) })))
(function_definition "char * _rl_make_prompt_for_search(char param_1)\n\n{\n  char *pcVar1;\n  size_t sVar2;\n  char *__dest;\n  char *pcVar3;\n  int iVar4;\n  \n  DAT_00179f00 = DAT_00179f38;\n  DAT_00179efc = DAT_00179f34;\n  DAT_00179ee8 = DAT_00179f30;\n  DAT_00179eec = DAT_00179f2c;\n  DAT_00179ef0 = DAT_00179f28;\n  DAT_00179ef4 = DAT_00179f1c;\n  DAT_00179ee4 = DAT_00179f14;\n  DAT_00179ee0 = DAT_00179f0c;\n  DAT_00179ef8 = DAT_00179f08;\n  pcVar3 = rl_prompt;\n  DAT_00179f38 = 0;\n  DAT_00179f34 = 0;\n  DAT_00179f2c = 0;\n  DAT_00179f30 = 0;\n  DAT_00179f1c = 0;\n  DAT_00179f28 = 0;\n  DAT_00179f14 = 0;\n  DAT_00179f0c = 0;\n  DAT_00179f08 = 0;\n  if (rl_prompt == (char *)0x0) {\nLAB_000fb088:\n    iVar4 = 1;\n    pcVar3 = (char *)xmalloc(2);\n    __dest = pcVar3;\n  }\n  else {\n    pcVar1 = strrchr(rl_prompt,10);\n    if (pcVar1 != (char *)0x0) {\n      sVar2 = strlen(pcVar1 + 1);\n      __dest = (char *)xmalloc(sVar2 + 2);\n      if (sVar2 != 0) {\n        strcpy(__dest,pcVar1 + 1);\n      }\n      __dest[sVar2 + 1] = '\0';\n      __dest[sVar2] = param_1;\n      goto LAB_000fb00d;\n    }\n    if (*pcVar3 == '\0') goto LAB_000fb088;\n    sVar2 = strlen(pcVar3);\n    __dest = (char *)xmalloc(sVar2 + 2);\n    iVar4 = sVar2 + 1;\n    if (sVar2 == 0) {\n      iVar4 = 1;\n      pcVar3 = __dest;\n    }\n    else {\n      strcpy(__dest,rl_prompt);\n      pcVar3 = __dest + sVar2;\n    }\n  }\n  *pcVar3 = param_1;\n  __dest[iVar4] = '\0';\nLAB_000fb00d:\n  DAT_00179f0c = DAT_00179ee0 + 1;\n  return __dest;\n}" (primitive_type "char") (pointer_declarator "* _rl_make_prompt_for_search(char param_1)" (* "*") (function_declarator "_rl_make_prompt_for_search(char param_1)" (identifier "_rl_make_prompt_for_search") (parameter_list "(char param_1)" (( "(") (parameter_declaration "char param_1" (primitive_type "char") (identifier "param_1")) () ")")))) (compound_statement "{\n  char *pcVar1;\n  size_t sVar2;\n  char *__dest;\n  char *pcVar3;\n  int iVar4;\n  \n  DAT_00179f00 = DAT_00179f38;\n  DAT_00179efc = DAT_00179f34;\n  DAT_00179ee8 = DAT_00179f30;\n  DAT_00179eec = DAT_00179f2c;\n  DAT_00179ef0 = DAT_00179f28;\n  DAT_00179ef4 = DAT_00179f1c;\n  DAT_00179ee4 = DAT_00179f14;\n  DAT_00179ee0 = DAT_00179f0c;\n  DAT_00179ef8 = DAT_00179f08;\n  pcVar3 = rl_prompt;\n  DAT_00179f38 = 0;\n  DAT_00179f34 = 0;\n  DAT_00179f2c = 0;\n  DAT_00179f30 = 0;\n  DAT_00179f1c = 0;\n  DAT_00179f28 = 0;\n  DAT_00179f14 = 0;\n  DAT_00179f0c = 0;\n  DAT_00179f08 = 0;\n  if (rl_prompt == (char *)0x0) {\nLAB_000fb088:\n    iVar4 = 1;\n    pcVar3 = (char *)xmalloc(2);\n    __dest = pcVar3;\n  }\n  else {\n    pcVar1 = strrchr(rl_prompt,10);\n    if (pcVar1 != (char *)0x0) {\n      sVar2 = strlen(pcVar1 + 1);\n      __dest = (char *)xmalloc(sVar2 + 2);\n      if (sVar2 != 0) {\n        strcpy(__dest,pcVar1 + 1);\n      }\n      __dest[sVar2 + 1] = '\0';\n      __dest[sVar2] = param_1;\n      goto LAB_000fb00d;\n    }\n    if (*pcVar3 == '\0') goto LAB_000fb088;\n    sVar2 = strlen(pcVar3);\n    __dest = (char *)xmalloc(sVar2 + 2);\n    iVar4 = sVar2 + 1;\n    if (sVar2 == 0) {\n      iVar4 = 1;\n      pcVar3 = __dest;\n    }\n    else {\n      strcpy(__dest,rl_prompt);\n      pcVar3 = __dest + sVar2;\n    }\n  }\n  *pcVar3 = param_1;\n  __dest[iVar4] = '\0';\nLAB_000fb00d:\n  DAT_00179f0c = DAT_00179ee0 + 1;\n  return __dest;\n}" ({ "{") (declaration "char *pcVar1;" (primitive_type "char") (pointer_declarator "*pcVar1" (* "*") (identifier "pcVar1")) (; ";")) (declaration "size_t sVar2;" (primitive_type "size_t") (identifier "sVar2") (; ";")) (declaration "char *__dest;" (primitive_type "char") (pointer_declarator "*__dest" (* "*") (identifier "__dest")) (; ";")) (declaration "char *pcVar3;" (primitive_type "char") (pointer_declarator "*pcVar3" (* "*") (identifier "pcVar3")) (; ";")) (declaration "int iVar4;" (primitive_type "int") (identifier "iVar4") (; ";")) (expression_statement "DAT_00179f00 = DAT_00179f38;" (assignment_expression "DAT_00179f00 = DAT_00179f38" (identifier "DAT_00179f00") (= "=") (identifier "DAT_00179f38")) (; ";")) (expression_statement "DAT_00179efc = DAT_00179f34;" (assignment_expression "DAT_00179efc = DAT_00179f34" (identifier "DAT_00179efc") (= "=") (identifier "DAT_00179f34")) (; ";")) (expression_statement "DAT_00179ee8 = DAT_00179f30;" (assignment_expression "DAT_00179ee8 = DAT_00179f30" (identifier "DAT_00179ee8") (= "=") (identifier "DAT_00179f30")) (; ";")) (expression_statement "DAT_00179eec = DAT_00179f2c;" (assignment_expression "DAT_00179eec = DAT_00179f2c" (identifier "DAT_00179eec") (= "=") (identifier "DAT_00179f2c")) (; ";")) (expression_statement "DAT_00179ef0 = DAT_00179f28;" (assignment_expression "DAT_00179ef0 = DAT_00179f28" (identifier "DAT_00179ef0") (= "=") (identifier "DAT_00179f28")) (; ";")) (expression_statement "DAT_00179ef4 = DAT_00179f1c;" (assignment_expression "DAT_00179ef4 = DAT_00179f1c" (identifier "DAT_00179ef4") (= "=") (identifier "DAT_00179f1c")) (; ";")) (expression_statement "DAT_00179ee4 = DAT_00179f14;" (assignment_expression "DAT_00179ee4 = DAT_00179f14" (identifier "DAT_00179ee4") (= "=") (identifier "DAT_00179f14")) (; ";")) (expression_statement "DAT_00179ee0 = DAT_00179f0c;" (assignment_expression "DAT_00179ee0 = DAT_00179f0c" (identifier "DAT_00179ee0") (= "=") (identifier "DAT_00179f0c")) (; ";")) (expression_statement "DAT_00179ef8 = DAT_00179f08;" (assignment_expression "DAT_00179ef8 = DAT_00179f08" (identifier "DAT_00179ef8") (= "=") (identifier "DAT_00179f08")) (; ";")) (expression_statement "pcVar3 = rl_prompt;" (assignment_expression "pcVar3 = rl_prompt" (identifier "pcVar3") (= "=") (identifier "rl_prompt")) (; ";")) (expression_statement "DAT_00179f38 = 0;" (assignment_expression "DAT_00179f38 = 0" (identifier "DAT_00179f38") (= "=") (number_literal "0")) (; ";")) (expression_statement "DAT_00179f34 = 0;" (assignment_expression "DAT_00179f34 = 0" (identifier "DAT_00179f34") (= "=") (number_literal "0")) (; ";")) (expression_statement "DAT_00179f2c = 0;" (assignment_expression "DAT_00179f2c = 0" (identifier "DAT_00179f2c") (= "=") (number_literal "0")) (; ";")) (expression_statement "DAT_00179f30 = 0;" (assignment_expression "DAT_00179f30 = 0" (identifier "DAT_00179f30") (= "=") (number_literal "0")) (; ";")) (expression_statement "DAT_00179f1c = 0;" (assignment_expression "DAT_00179f1c = 0" (identifier "DAT_00179f1c") (= "=") (number_literal "0")) (; ";")) (expression_statement "DAT_00179f28 = 0;" (assignment_expression "DAT_00179f28 = 0" (identifier "DAT_00179f28") (= "=") (number_literal "0")) (; ";")) (expression_statement "DAT_00179f14 = 0;" (assignment_expression "DAT_00179f14 = 0" (identifier "DAT_00179f14") (= "=") (number_literal "0")) (; ";")) (expression_statement "DAT_00179f0c = 0;" (assignment_expression "DAT_00179f0c = 0" (identifier "DAT_00179f0c") (= "=") (number_literal "0")) (; ";")) (expression_statement "DAT_00179f08 = 0;" (assignment_expression "DAT_00179f08 = 0" (identifier "DAT_00179f08") (= "=") (number_literal "0")) (; ";")) (if_statement "if (rl_prompt == (char *)0x0) {\nLAB_000fb088:\n    iVar4 = 1;\n    pcVar3 = (char *)xmalloc(2);\n    __dest = pcVar3;\n  }\n  else {\n    pcVar1 = strrchr(rl_prompt,10);\n    if (pcVar1 != (char *)0x0) {\n      sVar2 = strlen(pcVar1 + 1);\n      __dest = (char *)xmalloc(sVar2 + 2);\n      if (sVar2 != 0) {\n        strcpy(__dest,pcVar1 + 1);\n      }\n      __dest[sVar2 + 1] = '\0';\n      __dest[sVar2] = param_1;\n      goto LAB_000fb00d;\n    }\n    if (*pcVar3 == '\0') goto LAB_000fb088;\n    sVar2 = strlen(pcVar3);\n    __dest = (char *)xmalloc(sVar2 + 2);\n    iVar4 = sVar2 + 1;\n    if (sVar2 == 0) {\n      iVar4 = 1;\n      pcVar3 = __dest;\n    }\n    else {\n      strcpy(__dest,rl_prompt);\n      pcVar3 = __dest + sVar2;\n    }\n  }" (if "if") (parenthesized_expression "(rl_prompt == (char *)0x0)" (( "(") (binary_expression "rl_prompt == (char *)0x0" (identifier "rl_prompt") (== "==") (cast_expression "(char *)0x0" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\nLAB_000fb088:\n    iVar4 = 1;\n    pcVar3 = (char *)xmalloc(2);\n    __dest = pcVar3;\n  }" ({ "{") (labeled_statement "LAB_000fb088:\n    iVar4 = 1;" (statement_identifier "LAB_000fb088") (: ":") (expression_statement "iVar4 = 1;" (assignment_expression "iVar4 = 1" (identifier "iVar4") (= "=") (number_literal "1")) (; ";"))) (expression_statement "pcVar3 = (char *)xmalloc(2);" (assignment_expression "pcVar3 = (char *)xmalloc(2)" (identifier "pcVar3") (= "=") (cast_expression "(char *)xmalloc(2)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "xmalloc(2)" (identifier "xmalloc") (argument_list "(2)" (( "(") (number_literal "2") () ")"))))) (; ";")) (expression_statement "__dest = pcVar3;" (assignment_expression "__dest = pcVar3" (identifier "__dest") (= "=") (identifier "pcVar3")) (; ";")) (} "}")) (else_clause "else {\n    pcVar1 = strrchr(rl_prompt,10);\n    if (pcVar1 != (char *)0x0) {\n      sVar2 = strlen(pcVar1 + 1);\n      __dest = (char *)xmalloc(sVar2 + 2);\n      if (sVar2 != 0) {\n        strcpy(__dest,pcVar1 + 1);\n      }\n      __dest[sVar2 + 1] = '\0';\n      __dest[sVar2] = param_1;\n      goto LAB_000fb00d;\n    }\n    if (*pcVar3 == '\0') goto LAB_000fb088;\n    sVar2 = strlen(pcVar3);\n    __dest = (char *)xmalloc(sVar2 + 2);\n    iVar4 = sVar2 + 1;\n    if (sVar2 == 0) {\n      iVar4 = 1;\n      pcVar3 = __dest;\n    }\n    else {\n      strcpy(__dest,rl_prompt);\n      pcVar3 = __dest + sVar2;\n    }\n  }" (else "else") (compound_statement "{\n    pcVar1 = strrchr(rl_prompt,10);\n    if (pcVar1 != (char *)0x0) {\n      sVar2 = strlen(pcVar1 + 1);\n      __dest = (char *)xmalloc(sVar2 + 2);\n      if (sVar2 != 0) {\n        strcpy(__dest,pcVar1 + 1);\n      }\n      __dest[sVar2 + 1] = '\0';\n      __dest[sVar2] = param_1;\n      goto LAB_000fb00d;\n    }\n    if (*pcVar3 == '\0') goto LAB_000fb088;\n    sVar2 = strlen(pcVar3);\n    __dest = (char *)xmalloc(sVar2 + 2);\n    iVar4 = sVar2 + 1;\n    if (sVar2 == 0) {\n      iVar4 = 1;\n      pcVar3 = __dest;\n    }\n    else {\n      strcpy(__dest,rl_prompt);\n      pcVar3 = __dest + sVar2;\n    }\n  }" ({ "{") (expression_statement "pcVar1 = strrchr(rl_prompt,10);" (assignment_expression "pcVar1 = strrchr(rl_prompt,10)" (identifier "pcVar1") (= "=") (call_expression "strrchr(rl_prompt,10)" (identifier "strrchr") (argument_list "(rl_prompt,10)" (( "(") (identifier "rl_prompt") (, ",") (number_literal "10") () ")")))) (; ";")) (if_statement "if (pcVar1 != (char *)0x0) {\n      sVar2 = strlen(pcVar1 + 1);\n      __dest = (char *)xmalloc(sVar2 + 2);\n      if (sVar2 != 0) {\n        strcpy(__dest,pcVar1 + 1);\n      }\n      __dest[sVar2 + 1] = '\0';\n      __dest[sVar2] = param_1;\n      goto LAB_000fb00d;\n    }" (if "if") (parenthesized_expression "(pcVar1 != (char *)0x0)" (( "(") (binary_expression "pcVar1 != (char *)0x0" (identifier "pcVar1") (!= "!=") (cast_expression "(char *)0x0" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n      sVar2 = strlen(pcVar1 + 1);\n      __dest = (char *)xmalloc(sVar2 + 2);\n      if (sVar2 != 0) {\n        strcpy(__dest,pcVar1 + 1);\n      }\n      __dest[sVar2 + 1] = '\0';\n      __dest[sVar2] = param_1;\n      goto LAB_000fb00d;\n    }" ({ "{") (expression_statement "sVar2 = strlen(pcVar1 + 1);" (assignment_expression "sVar2 = strlen(pcVar1 + 1)" (identifier "sVar2") (= "=") (call_expression "strlen(pcVar1 + 1)" (identifier "strlen") (argument_list "(pcVar1 + 1)" (( "(") (binary_expression "pcVar1 + 1" (identifier "pcVar1") (+ "+") (number_literal "1")) () ")")))) (; ";")) (expression_statement "__dest = (char *)xmalloc(sVar2 + 2);" (assignment_expression "__dest = (char *)xmalloc(sVar2 + 2)" (identifier "__dest") (= "=") (cast_expression "(char *)xmalloc(sVar2 + 2)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "xmalloc(sVar2 + 2)" (identifier "xmalloc") (argument_list "(sVar2 + 2)" (( "(") (binary_expression "sVar2 + 2" (identifier "sVar2") (+ "+") (number_literal "2")) () ")"))))) (; ";")) (if_statement "if (sVar2 != 0) {\n        strcpy(__dest,pcVar1 + 1);\n      }" (if "if") (parenthesized_expression "(sVar2 != 0)" (( "(") (binary_expression "sVar2 != 0" (identifier "sVar2") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n        strcpy(__dest,pcVar1 + 1);\n      }" ({ "{") (expression_statement "strcpy(__dest,pcVar1 + 1);" (call_expression "strcpy(__dest,pcVar1 + 1)" (identifier "strcpy") (argument_list "(__dest,pcVar1 + 1)" (( "(") (identifier "__dest") (, ",") (binary_expression "pcVar1 + 1" (identifier "pcVar1") (+ "+") (number_literal "1")) () ")"))) (; ";")) (} "}"))) (expression_statement "__dest[sVar2 + 1] = '\0';" (assignment_expression "__dest[sVar2 + 1] = '\0'" (subscript_expression "__dest[sVar2 + 1]" (identifier "__dest") ([ "[") (binary_expression "sVar2 + 1" (identifier "sVar2") (+ "+") (number_literal "1")) (] "]")) (= "=") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) (; ";")) (expression_statement "__dest[sVar2] = param_1;" (assignment_expression "__dest[sVar2] = param_1" (subscript_expression "__dest[sVar2]" (identifier "__dest") ([ "[") (identifier "sVar2") (] "]")) (= "=") (identifier "param_1")) (; ";")) (goto_statement "goto LAB_000fb00d;" (goto "goto") (statement_identifier "LAB_000fb00d") (; ";")) (} "}"))) (if_statement "if (*pcVar3 == '\0') goto LAB_000fb088;" (if "if") (parenthesized_expression "(*pcVar3 == '\0')" (( "(") (binary_expression "*pcVar3 == '\0'" (pointer_expression "*pcVar3" (* "*") (identifier "pcVar3")) (== "==") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) () ")")) (goto_statement "goto LAB_000fb088;" (goto "goto") (statement_identifier "LAB_000fb088") (; ";"))) (expression_statement "sVar2 = strlen(pcVar3);" (assignment_expression "sVar2 = strlen(pcVar3)" (identifier "sVar2") (= "=") (call_expression "strlen(pcVar3)" (identifier "strlen") (argument_list "(pcVar3)" (( "(") (identifier "pcVar3") () ")")))) (; ";")) (expression_statement "__dest = (char *)xmalloc(sVar2 + 2);" (assignment_expression "__dest = (char *)xmalloc(sVar2 + 2)" (identifier "__dest") (= "=") (cast_expression "(char *)xmalloc(sVar2 + 2)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "xmalloc(sVar2 + 2)" (identifier "xmalloc") (argument_list "(sVar2 + 2)" (( "(") (binary_expression "sVar2 + 2" (identifier "sVar2") (+ "+") (number_literal "2")) () ")"))))) (; ";")) (expression_statement "iVar4 = sVar2 + 1;" (assignment_expression "iVar4 = sVar2 + 1" (identifier "iVar4") (= "=") (binary_expression "sVar2 + 1" (identifier "sVar2") (+ "+") (number_literal "1"))) (; ";")) (if_statement "if (sVar2 == 0) {\n      iVar4 = 1;\n      pcVar3 = __dest;\n    }\n    else {\n      strcpy(__dest,rl_prompt);\n      pcVar3 = __dest + sVar2;\n    }" (if "if") (parenthesized_expression "(sVar2 == 0)" (( "(") (binary_expression "sVar2 == 0" (identifier "sVar2") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n      iVar4 = 1;\n      pcVar3 = __dest;\n    }" ({ "{") (expression_statement "iVar4 = 1;" (assignment_expression "iVar4 = 1" (identifier "iVar4") (= "=") (number_literal "1")) (; ";")) (expression_statement "pcVar3 = __dest;" (assignment_expression "pcVar3 = __dest" (identifier "pcVar3") (= "=") (identifier "__dest")) (; ";")) (} "}")) (else_clause "else {\n      strcpy(__dest,rl_prompt);\n      pcVar3 = __dest + sVar2;\n    }" (else "else") (compound_statement "{\n      strcpy(__dest,rl_prompt);\n      pcVar3 = __dest + sVar2;\n    }" ({ "{") (expression_statement "strcpy(__dest,rl_prompt);" (call_expression "strcpy(__dest,rl_prompt)" (identifier "strcpy") (argument_list "(__dest,rl_prompt)" (( "(") (identifier "__dest") (, ",") (identifier "rl_prompt") () ")"))) (; ";")) (expression_statement "pcVar3 = __dest + sVar2;" (assignment_expression "pcVar3 = __dest + sVar2" (identifier "pcVar3") (= "=") (binary_expression "__dest + sVar2" (identifier "__dest") (+ "+") (identifier "sVar2"))) (; ";")) (} "}")))) (} "}")))) (expression_statement "*pcVar3 = param_1;" (assignment_expression "*pcVar3 = param_1" (pointer_expression "*pcVar3" (* "*") (identifier "pcVar3")) (= "=") (identifier "param_1")) (; ";")) (expression_statement "__dest[iVar4] = '\0';" (assignment_expression "__dest[iVar4] = '\0'" (subscript_expression "__dest[iVar4]" (identifier "__dest") ([ "[") (identifier "iVar4") (] "]")) (= "=") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) (; ";")) (labeled_statement "LAB_000fb00d:\n  DAT_00179f0c = DAT_00179ee0 + 1;" (statement_identifier "LAB_000fb00d") (: ":") (expression_statement "DAT_00179f0c = DAT_00179ee0 + 1;" (assignment_expression "DAT_00179f0c = DAT_00179ee0 + 1" (identifier "DAT_00179f0c") (= "=") (binary_expression "DAT_00179ee0 + 1" (identifier "DAT_00179ee0") (+ "+") (number_literal "1"))) (; ";"))) (return_statement "return __dest;" (return "return") (identifier "__dest") (; ";")) (} "}")))

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

char * function_1(int pchar)

{
  char *var_4;
  size_t var_6;
  char *var_8;
  char *pcVar3;
  int iVar4;
  
  saved_local_prompt = local_prompt;
  saved_local_prefix = local_prompt_prefix;
  saved_local_length = local_prompt_len;
  saved_prefix_length = prompt_prefix_length;
  saved_visible_length = prompt_visible_length;
  saved_last_invisible = prompt_last_invisible;
  saved_invis_chars_first_line = prompt_invis_chars_first_line;
  var_9 = prompt_physical_chars;
  saved_local_prompt_newlines = local_prompt_newlines;
  pcVar3 = var_1;
  local_prompt = (char *)0x0;
  local_prompt_prefix = (char *)0x0;
  prompt_prefix_length = 0;
  local_prompt_len = 0;
  prompt_last_invisible = 0;
  prompt_visible_length = 0;
  prompt_invis_chars_first_line = 0;
  prompt_physical_chars = 0;
  local_prompt_newlines = (int *)0x0;
  if (var_1 == (char *)0x0) {
LAB_000fb088:
    iVar4 = 1;
    pcVar3 = (char *)var_2(2);
    var_8 = pcVar3;
  }
  else {
    var_4 = var_3(var_1,10);
    if (var_4 != (char *)0x0) {
      var_6 = var_5(var_4 + 1);
      var_8 = (char *)var_2(var_6 + 2);
      if (var_6 != 0) {
        var_7(var_8,var_4 + 1);
      }
      var_8[var_6 + 1] = '\0';
      var_8[var_6] = (char)pchar;
      goto LAB_000fb00d;
    }
    if (*pcVar3 == '\0') goto LAB_000fb088;
    var_6 = var_5(pcVar3);
    var_8 = (char *)var_2(var_6 + 2);
    iVar4 = var_6 + 1;
    if (var_6 == 0) {
      iVar4 = 1;
      pcVar3 = var_8;
    }
    else {
      var_7(var_8,var_1);
      pcVar3 = var_8 + var_6;
    }
  }
  *pcVar3 = (char)pchar;
  var_8[iVar4] = '\0';
LAB_000fb00d:
  prompt_physical_chars = var_9 + 1;
  return var_8;
}


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

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

char * MASKED(char param_1)

{
  char *pcVar1;
  size_t sVar2;
  char *__dest;
  char *pcVar3;
  int iVar4;
  
  DAT_00179f00 = DAT_00179f38;
  DAT_00179efc = DAT_00179f34;
  DAT_00179ee8 = DAT_00179f30;
  DAT_00179eec = DAT_00179f2c;
  DAT_00179ef0 = DAT_00179f28;
  DAT_00179ef4 = DAT_00179f1c;
  DAT_00179ee4 = DAT_00179f14;
  DAT_00179ee0 = DAT_00179f0c;
  DAT_00179ef8 = DAT_00179f08;
  pcVar3 = rl_prompt;
  DAT_00179f38 = 0;
  DAT_00179f34 = 0;
  DAT_00179f2c = 0;
  DAT_00179f30 = 0;
  DAT_00179f1c = 0;
  DAT_00179f28 = 0;
  DAT_00179f14 = 0;
  DAT_00179f0c = 0;
  DAT_00179f08 = 0;
  if (rl_prompt == (char *)0x0) {
LAB_000fb088:
    iVar4 = 1;
    pcVar3 = (char *)xmalloc(2);
    __dest = pcVar3;
  }
  else {
    pcVar1 = strrchr(rl_prompt,10);
    if (pcVar1 != (char *)0x0) {
      sVar2 = strlen(pcVar1 + 1);
      __dest = (char *)xmalloc(sVar2 + 2);
      if (sVar2 != 0) {
        strcpy(__dest,pcVar1 + 1);
      }
      __dest[sVar2 + 1] = '\0';
      __dest[sVar2] = param_1;
      goto LAB_000fb00d;
    }
    if (*pcVar3 == '\0') goto LAB_000fb088;
    sVar2 = strlen(pcVar3);
    __dest = (char *)xmalloc(sVar2 + 2);
    iVar4 = sVar2 + 1;
    if (sVar2 == 0) {
      iVar4 = 1;
      pcVar3 = __dest;
    }
    else {
      strcpy(__dest,rl_prompt);
      pcVar3 = __dest + sVar2;
    }
  }
  *pcVar3 = param_1;
  __dest[iVar4] = '\0';
LAB_000fb00d:
  DAT_00179f0c = DAT_00179ee0 + 1;
  return __dest;
}

