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

int __regparm3 _rl_nsearch_dosearch(_rl_search_cxt *cxt)

{
  char *__src;
  int iVar1;
  size_t sVar2;
  char *__dest;
  
  rl_mark = cxt->save_mark;
  if (rl_point == 0) {
    if (noninc_search_string == (char *)0x0) {
      rl_ding();
      rl_restore_prompt();
      rl_readline_state = rl_readline_state & 0xfffffeff;
      return -1;
    }
  }
  else {
    noninc_history_pos = cxt->save_line;
    if (noninc_search_string != (char *)0x0) {
      free(noninc_search_string);
    }
    __src = rl_line_buffer;
    sVar2 = strlen(rl_line_buffer);
    __dest = (char *)xmalloc(sVar2 + 1);
    noninc_search_string = strcpy(__dest,__src);
    rl_free_undo_list();
  }
  rl_restore_prompt();
  iVar1 = noninc_dosearch(noninc_search_string,cxt->direction,cxt->sflags & 0x10);
  return iVar1;
}



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

undefined4 __regparm3 FUN_000caa00(int param_1)

{
  char *__src;
  undefined4 uVar1;
  size_t sVar2;
  char *__dest;
  
  rl_mark = *(undefined4 *)(param_1 + 0x28);
  if (rl_point == 0) {
    if (DAT_00151c58 == (char *)0x0) {
      rl_ding();
      rl_restore_prompt();
      rl_readline_state = rl_readline_state & 0xfffffeff;
      return 0xffffffff;
    }
  }
  else {
    DAT_00151c54 = *(undefined4 *)(param_1 + 0x2c);
    if (DAT_00151c58 != (char *)0x0) {
      free(DAT_00151c58);
    }
    __src = rl_line_buffer;
    sVar2 = strlen(rl_line_buffer);
    __dest = (char *)xmalloc(sVar2 + 1);
    DAT_00151c58 = strcpy(__dest,__src);
    rl_free_undo_list();
  }
  rl_restore_prompt();
  uVar1 = FUN_000ca910();
  return uVar1;
}


PUSH EDI
PUSH ESI
MOV ESI,EAX
PUSH EBX
MOV EDX,dword ptr [EAX + 0x28]
CALL 0x00031ed0
ADD EBX,0x7f5f3
LEA EAX,[EBX + 0xd97c]
MOV dword ptr [EAX],EDX
LEA EDX,[EBX + 0xd988]
MOV EAX,dword ptr [EBX + 0x7c58]
MOV EDI,dword ptr [EDX]
TEST EDI,EDI
JNZ 0x000caa50
TEST EAX,EAX
JZ 0x000caa9e
CALL 0x000d8160
MOV ECX,dword ptr [ESI + 0x4]
MOV EDX,dword ptr [ESI + 0x48]
MOV EAX,dword ptr [EBX + 0x7c58]
POP EBX
AND ECX,0x10
POP ESI
POP EDI
JMP 0x000ca910
MOV EDX,dword ptr [ESI + 0x2c]
MOV dword ptr [EBX + 0x7c54],EDX
TEST EAX,EAX
JZ 0x000caa69
SUB ESP,0xc
PUSH EAX
CALL 0x0002f200
ADD ESP,0x10
LEA EAX,[EBX + 0x7afc]
SUB ESP,0xc
MOV EDI,dword ptr [EAX]
PUSH EDI
CALL 0x0002f760
ADD EAX,0x1
MOV dword ptr [ESP],EAX
CALL 0x00099200
POP EDX
POP ECX
PUSH EDI
PUSH EAX
CALL 0x0002f580
MOV dword ptr [EBX + 0x7c58],EAX
CALL 0x000de8c0
ADD ESP,0x10
JMP 0x000caa31
CALL 0x000e16a0
CALL 0x000d8160
LEA EAX,[EBX + 0x7b44]
AND dword ptr [EAX],0xfffffeff
MOV EAX,0xffffffff
POP EBX
POP ESI
POP EDI
RET
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nundefined4 __regparm3 FUN_000caa00(int param_1)\n\n{\n  char *__src;\n  undefined4 uVar1;\n  size_t sVar2;\n  char *__dest;\n  \n  rl_mark = *(undefined4 *)(param_1 + 0x28);\n  if (rl_point == 0) {\n    if (DAT_00151c58 == (char *)0x0) {\n      rl_ding();\n      rl_restore_prompt();\n      rl_readline_state = rl_readline_state & 0xfffffeff;\n      return 0xffffffff;\n    }\n  }\n  else {\n    DAT_00151c54 = *(undefined4 *)(param_1 + 0x2c);\n    if (DAT_00151c58 != (char *)0x0) {\n      free(DAT_00151c58);\n    }\n    __src = rl_line_buffer;\n    sVar2 = strlen(rl_line_buffer);\n    __dest = (char *)xmalloc(sVar2 + 1);\n    DAT_00151c58 = strcpy(__dest,__src);\n    rl_free_undo_list();\n  }\n  rl_restore_prompt();\n  uVar1 = FUN_000ca910();\n  return uVar1;\n}\n\n" comment (function_definition "undefined4 __regparm3 FUN_000caa00(int param_1)\n\n{\n  char *__src;\n  undefined4 uVar1;\n  size_t sVar2;\n  char *__dest;\n  \n  rl_mark = *(undefined4 *)(param_1 + 0x28);\n  if (rl_point == 0) {\n    if (DAT_00151c58 == (char *)0x0) {\n      rl_ding();\n      rl_restore_prompt();\n      rl_readline_state = rl_readline_state & 0xfffffeff;\n      return 0xffffffff;\n    }\n  }\n  else {\n    DAT_00151c54 = *(undefined4 *)(param_1 + 0x2c);\n    if (DAT_00151c58 != (char *)0x0) {\n      free(DAT_00151c58);\n    }\n    __src = rl_line_buffer;\n    sVar2 = strlen(rl_line_buffer);\n    __dest = (char *)xmalloc(sVar2 + 1);\n    DAT_00151c58 = strcpy(__dest,__src);\n    rl_free_undo_list();\n  }\n  rl_restore_prompt();\n  uVar1 = FUN_000ca910();\n  return uVar1;\n}" type_identifier (ERROR "__regparm3" identifier) (function_declarator "FUN_000caa00(int param_1)" identifier (parameter_list "(int param_1)" ( (parameter_declaration "int param_1" primitive_type identifier) ))) (compound_statement "{\n  char *__src;\n  undefined4 uVar1;\n  size_t sVar2;\n  char *__dest;\n  \n  rl_mark = *(undefined4 *)(param_1 + 0x28);\n  if (rl_point == 0) {\n    if (DAT_00151c58 == (char *)0x0) {\n      rl_ding();\n      rl_restore_prompt();\n      rl_readline_state = rl_readline_state & 0xfffffeff;\n      return 0xffffffff;\n    }\n  }\n  else {\n    DAT_00151c54 = *(undefined4 *)(param_1 + 0x2c);\n    if (DAT_00151c58 != (char *)0x0) {\n      free(DAT_00151c58);\n    }\n    __src = rl_line_buffer;\n    sVar2 = strlen(rl_line_buffer);\n    __dest = (char *)xmalloc(sVar2 + 1);\n    DAT_00151c58 = strcpy(__dest,__src);\n    rl_free_undo_list();\n  }\n  rl_restore_prompt();\n  uVar1 = FUN_000ca910();\n  return uVar1;\n}" { (declaration "char *__src;" primitive_type (pointer_declarator "*__src" * identifier) ;) (declaration "undefined4 uVar1;" type_identifier identifier ;) (declaration "size_t sVar2;" primitive_type identifier ;) (declaration "char *__dest;" primitive_type (pointer_declarator "*__dest" * identifier) ;) (expression_statement "rl_mark = *(undefined4 *)(param_1 + 0x28);" (assignment_expression "rl_mark = *(undefined4 *)(param_1 + 0x28)" identifier = (pointer_expression "*(undefined4 *)(param_1 + 0x28)" * (cast_expression "(undefined4 *)(param_1 + 0x28)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x28)" ( (binary_expression "param_1 + 0x28" identifier + number_literal) ))))) ;) (if_statement "if (rl_point == 0) {\n    if (DAT_00151c58 == (char *)0x0) {\n      rl_ding();\n      rl_restore_prompt();\n      rl_readline_state = rl_readline_state & 0xfffffeff;\n      return 0xffffffff;\n    }\n  }\n  else {\n    DAT_00151c54 = *(undefined4 *)(param_1 + 0x2c);\n    if (DAT_00151c58 != (char *)0x0) {\n      free(DAT_00151c58);\n    }\n    __src = rl_line_buffer;\n    sVar2 = strlen(rl_line_buffer);\n    __dest = (char *)xmalloc(sVar2 + 1);\n    DAT_00151c58 = strcpy(__dest,__src);\n    rl_free_undo_list();\n  }" if (parenthesized_expression "(rl_point == 0)" ( (binary_expression "rl_point == 0" identifier == number_literal) )) (compound_statement "{\n    if (DAT_00151c58 == (char *)0x0) {\n      rl_ding();\n      rl_restore_prompt();\n      rl_readline_state = rl_readline_state & 0xfffffeff;\n      return 0xffffffff;\n    }\n  }" { (if_statement "if (DAT_00151c58 == (char *)0x0) {\n      rl_ding();\n      rl_restore_prompt();\n      rl_readline_state = rl_readline_state & 0xfffffeff;\n      return 0xffffffff;\n    }" if (parenthesized_expression "(DAT_00151c58 == (char *)0x0)" ( (binary_expression "DAT_00151c58 == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      rl_ding();\n      rl_restore_prompt();\n      rl_readline_state = rl_readline_state & 0xfffffeff;\n      return 0xffffffff;\n    }" { (expression_statement "rl_ding();" (call_expression "rl_ding()" identifier (argument_list "()" ( ))) ;) (expression_statement "rl_restore_prompt();" (call_expression "rl_restore_prompt()" identifier (argument_list "()" ( ))) ;) (expression_statement "rl_readline_state = rl_readline_state & 0xfffffeff;" (assignment_expression "rl_readline_state = rl_readline_state & 0xfffffeff" identifier = (binary_expression "rl_readline_state & 0xfffffeff" identifier & number_literal)) ;) (return_statement "return 0xffffffff;" return number_literal ;) })) }) (else_clause "else {\n    DAT_00151c54 = *(undefined4 *)(param_1 + 0x2c);\n    if (DAT_00151c58 != (char *)0x0) {\n      free(DAT_00151c58);\n    }\n    __src = rl_line_buffer;\n    sVar2 = strlen(rl_line_buffer);\n    __dest = (char *)xmalloc(sVar2 + 1);\n    DAT_00151c58 = strcpy(__dest,__src);\n    rl_free_undo_list();\n  }" else (compound_statement "{\n    DAT_00151c54 = *(undefined4 *)(param_1 + 0x2c);\n    if (DAT_00151c58 != (char *)0x0) {\n      free(DAT_00151c58);\n    }\n    __src = rl_line_buffer;\n    sVar2 = strlen(rl_line_buffer);\n    __dest = (char *)xmalloc(sVar2 + 1);\n    DAT_00151c58 = strcpy(__dest,__src);\n    rl_free_undo_list();\n  }" { (expression_statement "DAT_00151c54 = *(undefined4 *)(param_1 + 0x2c);" (assignment_expression "DAT_00151c54 = *(undefined4 *)(param_1 + 0x2c)" identifier = (pointer_expression "*(undefined4 *)(param_1 + 0x2c)" * (cast_expression "(undefined4 *)(param_1 + 0x2c)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x2c)" ( (binary_expression "param_1 + 0x2c" identifier + number_literal) ))))) ;) (if_statement "if (DAT_00151c58 != (char *)0x0) {\n      free(DAT_00151c58);\n    }" if (parenthesized_expression "(DAT_00151c58 != (char *)0x0)" ( (binary_expression "DAT_00151c58 != (char *)0x0" identifier != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      free(DAT_00151c58);\n    }" { (expression_statement "free(DAT_00151c58);" (call_expression "free(DAT_00151c58)" identifier (argument_list "(DAT_00151c58)" ( identifier ))) ;) })) (expression_statement "__src = rl_line_buffer;" (assignment_expression "__src = rl_line_buffer" identifier = identifier) ;) (expression_statement "sVar2 = strlen(rl_line_buffer);" (assignment_expression "sVar2 = strlen(rl_line_buffer)" identifier = (call_expression "strlen(rl_line_buffer)" identifier (argument_list "(rl_line_buffer)" ( identifier )))) ;) (expression_statement "__dest = (char *)xmalloc(sVar2 + 1);" (assignment_expression "__dest = (char *)xmalloc(sVar2 + 1)" identifier = (cast_expression "(char *)xmalloc(sVar2 + 1)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "xmalloc(sVar2 + 1)" identifier (argument_list "(sVar2 + 1)" ( (binary_expression "sVar2 + 1" identifier + number_literal) ))))) ;) (expression_statement "DAT_00151c58 = strcpy(__dest,__src);" (assignment_expression "DAT_00151c58 = strcpy(__dest,__src)" identifier = (call_expression "strcpy(__dest,__src)" identifier (argument_list "(__dest,__src)" ( identifier , identifier )))) ;) (expression_statement "rl_free_undo_list();" (call_expression "rl_free_undo_list()" identifier (argument_list "()" ( ))) ;) }))) (expression_statement "rl_restore_prompt();" (call_expression "rl_restore_prompt()" identifier (argument_list "()" ( ))) ;) (expression_statement "uVar1 = FUN_000ca910();" (assignment_expression "uVar1 = FUN_000ca910()" identifier = (call_expression "FUN_000ca910()" identifier (argument_list "()" ( )))) ;) (return_statement "return uVar1;" return identifier ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nint __regparm3 _rl_nsearch_dosearch(_rl_search_cxt *cxt)\n\n{\n  char *__src;\n  int iVar1;\n  size_t sVar2;\n  char *__dest;\n  \n  rl_mark = cxt->save_mark;\n  if (rl_point == 0) {\n    if (noninc_search_string == (char *)0x0) {\n      rl_ding();\n      rl_restore_prompt();\n      rl_readline_state = rl_readline_state & 0xfffffeff;\n      return -1;\n    }\n  }\n  else {\n    noninc_history_pos = cxt->save_line;\n    if (noninc_search_string != (char *)0x0) {\n      free(noninc_search_string);\n    }\n    __src = rl_line_buffer;\n    sVar2 = strlen(rl_line_buffer);\n    __dest = (char *)xmalloc(sVar2 + 1);\n    noninc_search_string = strcpy(__dest,__src);\n    rl_free_undo_list();\n  }\n  rl_restore_prompt();\n  iVar1 = noninc_dosearch(noninc_search_string,cxt->direction,cxt->sflags & 0x10);\n  return iVar1;\n}\n\n" comment (function_definition "int __regparm3 _rl_nsearch_dosearch(_rl_search_cxt *cxt)\n\n{\n  char *__src;\n  int iVar1;\n  size_t sVar2;\n  char *__dest;\n  \n  rl_mark = cxt->save_mark;\n  if (rl_point == 0) {\n    if (noninc_search_string == (char *)0x0) {\n      rl_ding();\n      rl_restore_prompt();\n      rl_readline_state = rl_readline_state & 0xfffffeff;\n      return -1;\n    }\n  }\n  else {\n    noninc_history_pos = cxt->save_line;\n    if (noninc_search_string != (char *)0x0) {\n      free(noninc_search_string);\n    }\n    __src = rl_line_buffer;\n    sVar2 = strlen(rl_line_buffer);\n    __dest = (char *)xmalloc(sVar2 + 1);\n    noninc_search_string = strcpy(__dest,__src);\n    rl_free_undo_list();\n  }\n  rl_restore_prompt();\n  iVar1 = noninc_dosearch(noninc_search_string,cxt->direction,cxt->sflags & 0x10);\n  return iVar1;\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "_rl_nsearch_dosearch(_rl_search_cxt *cxt)" identifier (parameter_list "(_rl_search_cxt *cxt)" ( (parameter_declaration "_rl_search_cxt *cxt" type_identifier (pointer_declarator "*cxt" * identifier)) ))) (compound_statement "{\n  char *__src;\n  int iVar1;\n  size_t sVar2;\n  char *__dest;\n  \n  rl_mark = cxt->save_mark;\n  if (rl_point == 0) {\n    if (noninc_search_string == (char *)0x0) {\n      rl_ding();\n      rl_restore_prompt();\n      rl_readline_state = rl_readline_state & 0xfffffeff;\n      return -1;\n    }\n  }\n  else {\n    noninc_history_pos = cxt->save_line;\n    if (noninc_search_string != (char *)0x0) {\n      free(noninc_search_string);\n    }\n    __src = rl_line_buffer;\n    sVar2 = strlen(rl_line_buffer);\n    __dest = (char *)xmalloc(sVar2 + 1);\n    noninc_search_string = strcpy(__dest,__src);\n    rl_free_undo_list();\n  }\n  rl_restore_prompt();\n  iVar1 = noninc_dosearch(noninc_search_string,cxt->direction,cxt->sflags & 0x10);\n  return iVar1;\n}" { (declaration "char *__src;" primitive_type (pointer_declarator "*__src" * identifier) ;) (declaration "int iVar1;" primitive_type identifier ;) (declaration "size_t sVar2;" primitive_type identifier ;) (declaration "char *__dest;" primitive_type (pointer_declarator "*__dest" * identifier) ;) (expression_statement "rl_mark = cxt->save_mark;" (assignment_expression "rl_mark = cxt->save_mark" identifier = (field_expression "cxt->save_mark" identifier -> field_identifier)) ;) (if_statement "if (rl_point == 0) {\n    if (noninc_search_string == (char *)0x0) {\n      rl_ding();\n      rl_restore_prompt();\n      rl_readline_state = rl_readline_state & 0xfffffeff;\n      return -1;\n    }\n  }\n  else {\n    noninc_history_pos = cxt->save_line;\n    if (noninc_search_string != (char *)0x0) {\n      free(noninc_search_string);\n    }\n    __src = rl_line_buffer;\n    sVar2 = strlen(rl_line_buffer);\n    __dest = (char *)xmalloc(sVar2 + 1);\n    noninc_search_string = strcpy(__dest,__src);\n    rl_free_undo_list();\n  }" if (parenthesized_expression "(rl_point == 0)" ( (binary_expression "rl_point == 0" identifier == number_literal) )) (compound_statement "{\n    if (noninc_search_string == (char *)0x0) {\n      rl_ding();\n      rl_restore_prompt();\n      rl_readline_state = rl_readline_state & 0xfffffeff;\n      return -1;\n    }\n  }" { (if_statement "if (noninc_search_string == (char *)0x0) {\n      rl_ding();\n      rl_restore_prompt();\n      rl_readline_state = rl_readline_state & 0xfffffeff;\n      return -1;\n    }" if (parenthesized_expression "(noninc_search_string == (char *)0x0)" ( (binary_expression "noninc_search_string == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      rl_ding();\n      rl_restore_prompt();\n      rl_readline_state = rl_readline_state & 0xfffffeff;\n      return -1;\n    }" { (expression_statement "rl_ding();" (call_expression "rl_ding()" identifier (argument_list "()" ( ))) ;) (expression_statement "rl_restore_prompt();" (call_expression "rl_restore_prompt()" identifier (argument_list "()" ( ))) ;) (expression_statement "rl_readline_state = rl_readline_state & 0xfffffeff;" (assignment_expression "rl_readline_state = rl_readline_state & 0xfffffeff" identifier = (binary_expression "rl_readline_state & 0xfffffeff" identifier & number_literal)) ;) (return_statement "return -1;" return number_literal ;) })) }) (else_clause "else {\n    noninc_history_pos = cxt->save_line;\n    if (noninc_search_string != (char *)0x0) {\n      free(noninc_search_string);\n    }\n    __src = rl_line_buffer;\n    sVar2 = strlen(rl_line_buffer);\n    __dest = (char *)xmalloc(sVar2 + 1);\n    noninc_search_string = strcpy(__dest,__src);\n    rl_free_undo_list();\n  }" else (compound_statement "{\n    noninc_history_pos = cxt->save_line;\n    if (noninc_search_string != (char *)0x0) {\n      free(noninc_search_string);\n    }\n    __src = rl_line_buffer;\n    sVar2 = strlen(rl_line_buffer);\n    __dest = (char *)xmalloc(sVar2 + 1);\n    noninc_search_string = strcpy(__dest,__src);\n    rl_free_undo_list();\n  }" { (expression_statement "noninc_history_pos = cxt->save_line;" (assignment_expression "noninc_history_pos = cxt->save_line" identifier = (field_expression "cxt->save_line" identifier -> field_identifier)) ;) (if_statement "if (noninc_search_string != (char *)0x0) {\n      free(noninc_search_string);\n    }" if (parenthesized_expression "(noninc_search_string != (char *)0x0)" ( (binary_expression "noninc_search_string != (char *)0x0" identifier != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      free(noninc_search_string);\n    }" { (expression_statement "free(noninc_search_string);" (call_expression "free(noninc_search_string)" identifier (argument_list "(noninc_search_string)" ( identifier ))) ;) })) (expression_statement "__src = rl_line_buffer;" (assignment_expression "__src = rl_line_buffer" identifier = identifier) ;) (expression_statement "sVar2 = strlen(rl_line_buffer);" (assignment_expression "sVar2 = strlen(rl_line_buffer)" identifier = (call_expression "strlen(rl_line_buffer)" identifier (argument_list "(rl_line_buffer)" ( identifier )))) ;) (expression_statement "__dest = (char *)xmalloc(sVar2 + 1);" (assignment_expression "__dest = (char *)xmalloc(sVar2 + 1)" identifier = (cast_expression "(char *)xmalloc(sVar2 + 1)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "xmalloc(sVar2 + 1)" identifier (argument_list "(sVar2 + 1)" ( (binary_expression "sVar2 + 1" identifier + number_literal) ))))) ;) (expression_statement "noninc_search_string = strcpy(__dest,__src);" (assignment_expression "noninc_search_string = strcpy(__dest,__src)" identifier = (call_expression "strcpy(__dest,__src)" identifier (argument_list "(__dest,__src)" ( identifier , identifier )))) ;) (expression_statement "rl_free_undo_list();" (call_expression "rl_free_undo_list()" identifier (argument_list "()" ( ))) ;) }))) (expression_statement "rl_restore_prompt();" (call_expression "rl_restore_prompt()" identifier (argument_list "()" ( ))) ;) (expression_statement "iVar1 = noninc_dosearch(noninc_search_string,cxt->direction,cxt->sflags & 0x10);" (assignment_expression "iVar1 = noninc_dosearch(noninc_search_string,cxt->direction,cxt->sflags & 0x10)" identifier = (call_expression "noninc_dosearch(noninc_search_string,cxt->direction,cxt->sflags & 0x10)" identifier (argument_list "(noninc_search_string,cxt->direction,cxt->sflags & 0x10)" ( identifier , (field_expression "cxt->direction" identifier -> field_identifier) , (binary_expression "cxt->sflags & 0x10" (field_expression "cxt->sflags" identifier -> field_identifier) & number_literal) )))) ;) (return_statement "return iVar1;" return identifier ;) })))
(translation_unit "undefined4 __regparm3 FUN_000caa00(int param_1)\n\n{\n  char *__src;\n  undefined4 uVar1;\n  size_t sVar2;\n  char *__dest;\n  \n  rl_mark = *(undefined4 *)(param_1 + 0x28);\n  if (rl_point == 0) {\n    if (DAT_00151c58 == (char *)0x0) {\n      rl_ding();\n      rl_restore_prompt();\n      rl_readline_state = rl_readline_state & 0xfffffeff;\n      return 0xffffffff;\n    }\n  }\n  else {\n    DAT_00151c54 = *(undefined4 *)(param_1 + 0x2c);\n    if (DAT_00151c58 != (char *)0x0) {\n      free(DAT_00151c58);\n    }\n    __src = rl_line_buffer;\n    sVar2 = strlen(rl_line_buffer);\n    __dest = (char *)xmalloc(sVar2 + 1);\n    DAT_00151c58 = strcpy(__dest,__src);\n    rl_free_undo_list();\n  }\n  rl_restore_prompt();\n  uVar1 = FUN_000ca910();\n  return uVar1;\n}\n\n" (function_definition "undefined4 __regparm3 FUN_000caa00(int param_1)\n\n{\n  char *__src;\n  undefined4 uVar1;\n  size_t sVar2;\n  char *__dest;\n  \n  rl_mark = *(undefined4 *)(param_1 + 0x28);\n  if (rl_point == 0) {\n    if (DAT_00151c58 == (char *)0x0) {\n      rl_ding();\n      rl_restore_prompt();\n      rl_readline_state = rl_readline_state & 0xfffffeff;\n      return 0xffffffff;\n    }\n  }\n  else {\n    DAT_00151c54 = *(undefined4 *)(param_1 + 0x2c);\n    if (DAT_00151c58 != (char *)0x0) {\n      free(DAT_00151c58);\n    }\n    __src = rl_line_buffer;\n    sVar2 = strlen(rl_line_buffer);\n    __dest = (char *)xmalloc(sVar2 + 1);\n    DAT_00151c58 = strcpy(__dest,__src);\n    rl_free_undo_list();\n  }\n  rl_restore_prompt();\n  uVar1 = FUN_000ca910();\n  return uVar1;\n}" type_identifier (ERROR "__regparm3" identifier) (function_declarator "FUN_000caa00(int param_1)" identifier (parameter_list "(int param_1)" ( (parameter_declaration "int param_1" primitive_type identifier) ))) (compound_statement "{\n  char *__src;\n  undefined4 uVar1;\n  size_t sVar2;\n  char *__dest;\n  \n  rl_mark = *(undefined4 *)(param_1 + 0x28);\n  if (rl_point == 0) {\n    if (DAT_00151c58 == (char *)0x0) {\n      rl_ding();\n      rl_restore_prompt();\n      rl_readline_state = rl_readline_state & 0xfffffeff;\n      return 0xffffffff;\n    }\n  }\n  else {\n    DAT_00151c54 = *(undefined4 *)(param_1 + 0x2c);\n    if (DAT_00151c58 != (char *)0x0) {\n      free(DAT_00151c58);\n    }\n    __src = rl_line_buffer;\n    sVar2 = strlen(rl_line_buffer);\n    __dest = (char *)xmalloc(sVar2 + 1);\n    DAT_00151c58 = strcpy(__dest,__src);\n    rl_free_undo_list();\n  }\n  rl_restore_prompt();\n  uVar1 = FUN_000ca910();\n  return uVar1;\n}" { (declaration "char *__src;" primitive_type (pointer_declarator "*__src" * identifier) ;) (declaration "undefined4 uVar1;" type_identifier identifier ;) (declaration "size_t sVar2;" primitive_type identifier ;) (declaration "char *__dest;" primitive_type (pointer_declarator "*__dest" * identifier) ;) (expression_statement "rl_mark = *(undefined4 *)(param_1 + 0x28);" (assignment_expression "rl_mark = *(undefined4 *)(param_1 + 0x28)" identifier = (pointer_expression "*(undefined4 *)(param_1 + 0x28)" * (cast_expression "(undefined4 *)(param_1 + 0x28)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x28)" ( (binary_expression "param_1 + 0x28" identifier + number_literal) ))))) ;) (if_statement "if (rl_point == 0) {\n    if (DAT_00151c58 == (char *)0x0) {\n      rl_ding();\n      rl_restore_prompt();\n      rl_readline_state = rl_readline_state & 0xfffffeff;\n      return 0xffffffff;\n    }\n  }\n  else {\n    DAT_00151c54 = *(undefined4 *)(param_1 + 0x2c);\n    if (DAT_00151c58 != (char *)0x0) {\n      free(DAT_00151c58);\n    }\n    __src = rl_line_buffer;\n    sVar2 = strlen(rl_line_buffer);\n    __dest = (char *)xmalloc(sVar2 + 1);\n    DAT_00151c58 = strcpy(__dest,__src);\n    rl_free_undo_list();\n  }" if (parenthesized_expression "(rl_point == 0)" ( (binary_expression "rl_point == 0" identifier == number_literal) )) (compound_statement "{\n    if (DAT_00151c58 == (char *)0x0) {\n      rl_ding();\n      rl_restore_prompt();\n      rl_readline_state = rl_readline_state & 0xfffffeff;\n      return 0xffffffff;\n    }\n  }" { (if_statement "if (DAT_00151c58 == (char *)0x0) {\n      rl_ding();\n      rl_restore_prompt();\n      rl_readline_state = rl_readline_state & 0xfffffeff;\n      return 0xffffffff;\n    }" if (parenthesized_expression "(DAT_00151c58 == (char *)0x0)" ( (binary_expression "DAT_00151c58 == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      rl_ding();\n      rl_restore_prompt();\n      rl_readline_state = rl_readline_state & 0xfffffeff;\n      return 0xffffffff;\n    }" { (expression_statement "rl_ding();" (call_expression "rl_ding()" identifier (argument_list "()" ( ))) ;) (expression_statement "rl_restore_prompt();" (call_expression "rl_restore_prompt()" identifier (argument_list "()" ( ))) ;) (expression_statement "rl_readline_state = rl_readline_state & 0xfffffeff;" (assignment_expression "rl_readline_state = rl_readline_state & 0xfffffeff" identifier = (binary_expression "rl_readline_state & 0xfffffeff" identifier & number_literal)) ;) (return_statement "return 0xffffffff;" return number_literal ;) })) }) (else_clause "else {\n    DAT_00151c54 = *(undefined4 *)(param_1 + 0x2c);\n    if (DAT_00151c58 != (char *)0x0) {\n      free(DAT_00151c58);\n    }\n    __src = rl_line_buffer;\n    sVar2 = strlen(rl_line_buffer);\n    __dest = (char *)xmalloc(sVar2 + 1);\n    DAT_00151c58 = strcpy(__dest,__src);\n    rl_free_undo_list();\n  }" else (compound_statement "{\n    DAT_00151c54 = *(undefined4 *)(param_1 + 0x2c);\n    if (DAT_00151c58 != (char *)0x0) {\n      free(DAT_00151c58);\n    }\n    __src = rl_line_buffer;\n    sVar2 = strlen(rl_line_buffer);\n    __dest = (char *)xmalloc(sVar2 + 1);\n    DAT_00151c58 = strcpy(__dest,__src);\n    rl_free_undo_list();\n  }" { (expression_statement "DAT_00151c54 = *(undefined4 *)(param_1 + 0x2c);" (assignment_expression "DAT_00151c54 = *(undefined4 *)(param_1 + 0x2c)" identifier = (pointer_expression "*(undefined4 *)(param_1 + 0x2c)" * (cast_expression "(undefined4 *)(param_1 + 0x2c)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x2c)" ( (binary_expression "param_1 + 0x2c" identifier + number_literal) ))))) ;) (if_statement "if (DAT_00151c58 != (char *)0x0) {\n      free(DAT_00151c58);\n    }" if (parenthesized_expression "(DAT_00151c58 != (char *)0x0)" ( (binary_expression "DAT_00151c58 != (char *)0x0" identifier != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      free(DAT_00151c58);\n    }" { (expression_statement "free(DAT_00151c58);" (call_expression "free(DAT_00151c58)" identifier (argument_list "(DAT_00151c58)" ( identifier ))) ;) })) (expression_statement "__src = rl_line_buffer;" (assignment_expression "__src = rl_line_buffer" identifier = identifier) ;) (expression_statement "sVar2 = strlen(rl_line_buffer);" (assignment_expression "sVar2 = strlen(rl_line_buffer)" identifier = (call_expression "strlen(rl_line_buffer)" identifier (argument_list "(rl_line_buffer)" ( identifier )))) ;) (expression_statement "__dest = (char *)xmalloc(sVar2 + 1);" (assignment_expression "__dest = (char *)xmalloc(sVar2 + 1)" identifier = (cast_expression "(char *)xmalloc(sVar2 + 1)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "xmalloc(sVar2 + 1)" identifier (argument_list "(sVar2 + 1)" ( (binary_expression "sVar2 + 1" identifier + number_literal) ))))) ;) (expression_statement "DAT_00151c58 = strcpy(__dest,__src);" (assignment_expression "DAT_00151c58 = strcpy(__dest,__src)" identifier = (call_expression "strcpy(__dest,__src)" identifier (argument_list "(__dest,__src)" ( identifier , identifier )))) ;) (expression_statement "rl_free_undo_list();" (call_expression "rl_free_undo_list()" identifier (argument_list "()" ( ))) ;) }))) (expression_statement "rl_restore_prompt();" (call_expression "rl_restore_prompt()" identifier (argument_list "()" ( ))) ;) (expression_statement "uVar1 = FUN_000ca910();" (assignment_expression "uVar1 = FUN_000ca910()" identifier = (call_expression "FUN_000ca910()" identifier (argument_list "()" ( )))) ;) (return_statement "return uVar1;" 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 IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( ))) ;) (expression_statement (call_expression IDENT (argument_list ( ))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT & LIT)) ;) (return_statement return LIT ;) })) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) })) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT )))) ;) (expression_statement (call_expression IDENT (argument_list ( ))) ;) }))) (expression_statement (call_expression IDENT (argument_list ( ))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (return_statement return IDENT ;) })))
(function_definition "undefined4 __regparm3 FUN_000caa00(int param_1)\n\n{\n  char *__src;\n  undefined4 uVar1;\n  size_t sVar2;\n  char *__dest;\n  \n  rl_mark = *(undefined4 *)(param_1 + 0x28);\n  if (rl_point == 0) {\n    if (DAT_00151c58 == (char *)0x0) {\n      rl_ding();\n      rl_restore_prompt();\n      rl_readline_state = rl_readline_state & 0xfffffeff;\n      return 0xffffffff;\n    }\n  }\n  else {\n    DAT_00151c54 = *(undefined4 *)(param_1 + 0x2c);\n    if (DAT_00151c58 != (char *)0x0) {\n      free(DAT_00151c58);\n    }\n    __src = rl_line_buffer;\n    sVar2 = strlen(rl_line_buffer);\n    __dest = (char *)xmalloc(sVar2 + 1);\n    DAT_00151c58 = strcpy(__dest,__src);\n    rl_free_undo_list();\n  }\n  rl_restore_prompt();\n  uVar1 = FUN_000ca910();\n  return uVar1;\n}" (type_identifier "undefined4") (ERROR "__regparm3" (identifier "__regparm3")) (function_declarator "FUN_000caa00(int param_1)" (identifier "FUN_000caa00") (parameter_list "(int param_1)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) () ")"))) (compound_statement "{\n  char *__src;\n  undefined4 uVar1;\n  size_t sVar2;\n  char *__dest;\n  \n  rl_mark = *(undefined4 *)(param_1 + 0x28);\n  if (rl_point == 0) {\n    if (DAT_00151c58 == (char *)0x0) {\n      rl_ding();\n      rl_restore_prompt();\n      rl_readline_state = rl_readline_state & 0xfffffeff;\n      return 0xffffffff;\n    }\n  }\n  else {\n    DAT_00151c54 = *(undefined4 *)(param_1 + 0x2c);\n    if (DAT_00151c58 != (char *)0x0) {\n      free(DAT_00151c58);\n    }\n    __src = rl_line_buffer;\n    sVar2 = strlen(rl_line_buffer);\n    __dest = (char *)xmalloc(sVar2 + 1);\n    DAT_00151c58 = strcpy(__dest,__src);\n    rl_free_undo_list();\n  }\n  rl_restore_prompt();\n  uVar1 = FUN_000ca910();\n  return uVar1;\n}" ({ "{") (declaration "char *__src;" (primitive_type "char") (pointer_declarator "*__src" (* "*") (identifier "__src")) (; ";")) (declaration "undefined4 uVar1;" (type_identifier "undefined4") (identifier "uVar1") (; ";")) (declaration "size_t sVar2;" (primitive_type "size_t") (identifier "sVar2") (; ";")) (declaration "char *__dest;" (primitive_type "char") (pointer_declarator "*__dest" (* "*") (identifier "__dest")) (; ";")) (expression_statement "rl_mark = *(undefined4 *)(param_1 + 0x28);" (assignment_expression "rl_mark = *(undefined4 *)(param_1 + 0x28)" (identifier "rl_mark") (= "=") (pointer_expression "*(undefined4 *)(param_1 + 0x28)" (* "*") (cast_expression "(undefined4 *)(param_1 + 0x28)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x28)" (( "(") (binary_expression "param_1 + 0x28" (identifier "param_1") (+ "+") (number_literal "0x28")) () ")"))))) (; ";")) (if_statement "if (rl_point == 0) {\n    if (DAT_00151c58 == (char *)0x0) {\n      rl_ding();\n      rl_restore_prompt();\n      rl_readline_state = rl_readline_state & 0xfffffeff;\n      return 0xffffffff;\n    }\n  }\n  else {\n    DAT_00151c54 = *(undefined4 *)(param_1 + 0x2c);\n    if (DAT_00151c58 != (char *)0x0) {\n      free(DAT_00151c58);\n    }\n    __src = rl_line_buffer;\n    sVar2 = strlen(rl_line_buffer);\n    __dest = (char *)xmalloc(sVar2 + 1);\n    DAT_00151c58 = strcpy(__dest,__src);\n    rl_free_undo_list();\n  }" (if "if") (parenthesized_expression "(rl_point == 0)" (( "(") (binary_expression "rl_point == 0" (identifier "rl_point") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    if (DAT_00151c58 == (char *)0x0) {\n      rl_ding();\n      rl_restore_prompt();\n      rl_readline_state = rl_readline_state & 0xfffffeff;\n      return 0xffffffff;\n    }\n  }" ({ "{") (if_statement "if (DAT_00151c58 == (char *)0x0) {\n      rl_ding();\n      rl_restore_prompt();\n      rl_readline_state = rl_readline_state & 0xfffffeff;\n      return 0xffffffff;\n    }" (if "if") (parenthesized_expression "(DAT_00151c58 == (char *)0x0)" (( "(") (binary_expression "DAT_00151c58 == (char *)0x0" (identifier "DAT_00151c58") (== "==") (cast_expression "(char *)0x0" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n      rl_ding();\n      rl_restore_prompt();\n      rl_readline_state = rl_readline_state & 0xfffffeff;\n      return 0xffffffff;\n    }" ({ "{") (expression_statement "rl_ding();" (call_expression "rl_ding()" (identifier "rl_ding") (argument_list "()" (( "(") () ")"))) (; ";")) (expression_statement "rl_restore_prompt();" (call_expression "rl_restore_prompt()" (identifier "rl_restore_prompt") (argument_list "()" (( "(") () ")"))) (; ";")) (expression_statement "rl_readline_state = rl_readline_state & 0xfffffeff;" (assignment_expression "rl_readline_state = rl_readline_state & 0xfffffeff" (identifier "rl_readline_state") (= "=") (binary_expression "rl_readline_state & 0xfffffeff" (identifier "rl_readline_state") (& "&") (number_literal "0xfffffeff"))) (; ";")) (return_statement "return 0xffffffff;" (return "return") (number_literal "0xffffffff") (; ";")) (} "}"))) (} "}")) (else_clause "else {\n    DAT_00151c54 = *(undefined4 *)(param_1 + 0x2c);\n    if (DAT_00151c58 != (char *)0x0) {\n      free(DAT_00151c58);\n    }\n    __src = rl_line_buffer;\n    sVar2 = strlen(rl_line_buffer);\n    __dest = (char *)xmalloc(sVar2 + 1);\n    DAT_00151c58 = strcpy(__dest,__src);\n    rl_free_undo_list();\n  }" (else "else") (compound_statement "{\n    DAT_00151c54 = *(undefined4 *)(param_1 + 0x2c);\n    if (DAT_00151c58 != (char *)0x0) {\n      free(DAT_00151c58);\n    }\n    __src = rl_line_buffer;\n    sVar2 = strlen(rl_line_buffer);\n    __dest = (char *)xmalloc(sVar2 + 1);\n    DAT_00151c58 = strcpy(__dest,__src);\n    rl_free_undo_list();\n  }" ({ "{") (expression_statement "DAT_00151c54 = *(undefined4 *)(param_1 + 0x2c);" (assignment_expression "DAT_00151c54 = *(undefined4 *)(param_1 + 0x2c)" (identifier "DAT_00151c54") (= "=") (pointer_expression "*(undefined4 *)(param_1 + 0x2c)" (* "*") (cast_expression "(undefined4 *)(param_1 + 0x2c)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x2c)" (( "(") (binary_expression "param_1 + 0x2c" (identifier "param_1") (+ "+") (number_literal "0x2c")) () ")"))))) (; ";")) (if_statement "if (DAT_00151c58 != (char *)0x0) {\n      free(DAT_00151c58);\n    }" (if "if") (parenthesized_expression "(DAT_00151c58 != (char *)0x0)" (( "(") (binary_expression "DAT_00151c58 != (char *)0x0" (identifier "DAT_00151c58") (!= "!=") (cast_expression "(char *)0x0" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n      free(DAT_00151c58);\n    }" ({ "{") (expression_statement "free(DAT_00151c58);" (call_expression "free(DAT_00151c58)" (identifier "free") (argument_list "(DAT_00151c58)" (( "(") (identifier "DAT_00151c58") () ")"))) (; ";")) (} "}"))) (expression_statement "__src = rl_line_buffer;" (assignment_expression "__src = rl_line_buffer" (identifier "__src") (= "=") (identifier "rl_line_buffer")) (; ";")) (expression_statement "sVar2 = strlen(rl_line_buffer);" (assignment_expression "sVar2 = strlen(rl_line_buffer)" (identifier "sVar2") (= "=") (call_expression "strlen(rl_line_buffer)" (identifier "strlen") (argument_list "(rl_line_buffer)" (( "(") (identifier "rl_line_buffer") () ")")))) (; ";")) (expression_statement "__dest = (char *)xmalloc(sVar2 + 1);" (assignment_expression "__dest = (char *)xmalloc(sVar2 + 1)" (identifier "__dest") (= "=") (cast_expression "(char *)xmalloc(sVar2 + 1)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "xmalloc(sVar2 + 1)" (identifier "xmalloc") (argument_list "(sVar2 + 1)" (( "(") (binary_expression "sVar2 + 1" (identifier "sVar2") (+ "+") (number_literal "1")) () ")"))))) (; ";")) (expression_statement "DAT_00151c58 = strcpy(__dest,__src);" (assignment_expression "DAT_00151c58 = strcpy(__dest,__src)" (identifier "DAT_00151c58") (= "=") (call_expression "strcpy(__dest,__src)" (identifier "strcpy") (argument_list "(__dest,__src)" (( "(") (identifier "__dest") (, ",") (identifier "__src") () ")")))) (; ";")) (expression_statement "rl_free_undo_list();" (call_expression "rl_free_undo_list()" (identifier "rl_free_undo_list") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}")))) (expression_statement "rl_restore_prompt();" (call_expression "rl_restore_prompt()" (identifier "rl_restore_prompt") (argument_list "()" (( "(") () ")"))) (; ";")) (expression_statement "uVar1 = FUN_000ca910();" (assignment_expression "uVar1 = FUN_000ca910()" (identifier "uVar1") (= "=") (call_expression "FUN_000ca910()" (identifier "FUN_000ca910") (argument_list "()" (( "(") () ")")))) (; ";")) (return_statement "return uVar1;" (return "return") (identifier "uVar1") (; ";")) (} "}")))

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

int __regparm3 function_1(type_1 *cxt)

{
  char *__src;
  int iVar1;
  size_t var_9;
  char *__dest;
  
  rl_mark = cxt->save_mark;
  if (var_1 == 0) {
    if (var_2 == (char *)0x0) {
      var_3();
      var_4();
      var_5 = var_5 & 0xfffffeff;
      return -1;
    }
  }
  else {
    noninc_history_pos = cxt->save_line;
    if (var_2 != (char *)0x0) {
      var_6(var_2);
    }
    __src = rl_line_buffer;
    var_9 = var_7(rl_line_buffer);
    __dest = (char *)var_8(var_9 + 1);
    var_2 = var_10(__dest,__src);
    var_11();
  }
  var_4();
  iVar1 = var_12(var_2,cxt->direction,cxt->sflags & 0x10);
  return iVar1;
}


(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: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (expression_statement (assignment_expression left: (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))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (number_literal)))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list))) (expression_statement (call_expression function: (identifier) arguments: (argument_list))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (return_statement (number_literal))))) alternative: (else_clause (compound_statement (expression_statement (assignment_expression left: (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))))))) (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 (call_expression function: (identifier) arguments: (argument_list (identifier)))))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier))))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (call_expression function: (identifier) arguments: (argument_list (binary_expression left: (identifier) right: (number_literal))))))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list)))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list)))) (return_statement (identifier)))))

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

undefined4 __regparm3 MASKED(int param_1)

{
  char *__src;
  undefined4 uVar1;
  size_t sVar2;
  char *__dest;
  
  rl_mark = *(undefined4 *)(param_1 + 0x28);
  if (rl_point == 0) {
    if (DAT_00151c58 == (char *)0x0) {
      rl_ding();
      rl_restore_prompt();
      rl_readline_state = rl_readline_state & 0xfffffeff;
      return 0xffffffff;
    }
  }
  else {
    DAT_00151c54 = *(undefined4 *)(param_1 + 0x2c);
    if (DAT_00151c58 != (char *)0x0) {
      free(DAT_00151c58);
    }
    __src = rl_line_buffer;
    sVar2 = strlen(rl_line_buffer);
    __dest = (char *)xmalloc(sVar2 + 1);
    DAT_00151c58 = strcpy(__dest,__src);
    rl_free_undo_list();
  }
  rl_restore_prompt();
  uVar1 = FUN_000ca910();
  return uVar1;
}

