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

int sv_vicmd_modestr(char *value)

{
  size_t sVar1;
  
  if (value == (char *)0x0) {
    if (_rl_vi_cmd_mode_str != (char *)0x0) {
      free(_rl_vi_cmd_mode_str);
    }
    _rl_vi_cmd_mode_str = (char *)0x0;
    _rl_vi_cmd_modestr_len = 0;
    return 0;
  }
  if (*value == '\0') {
    if (_rl_vi_cmd_mode_str != (char *)0x0) {
      free(_rl_vi_cmd_mode_str);
    }
    _rl_vi_cmd_mode_str = (char *)xmalloc(1);
    _rl_vi_cmd_modestr_len = 0;
    *_rl_vi_cmd_mode_str = '\0';
    return 0;
  }
  if (_rl_vi_cmd_mode_str != (char *)0x0) {
    free(_rl_vi_cmd_mode_str);
  }
  sVar1 = strlen(value);
  _rl_vi_cmd_mode_str = (char *)xmalloc(sVar1 * 2 + 1);
  rl_translate_keyseq(value,_rl_vi_cmd_mode_str,&_rl_vi_cmd_modestr_len);
  _rl_vi_cmd_mode_str[_rl_vi_cmd_modestr_len] = '\0';
  return 0;
}



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

undefined4 FUN_000d1d40(char *param_1)

{
  size_t sVar1;
  
  if (param_1 == (char *)0x0) {
    if (_rl_vi_cmd_mode_str != (undefined1 *)0x0) {
      free(_rl_vi_cmd_mode_str);
    }
    _rl_vi_cmd_mode_str = (undefined1 *)0x0;
    _rl_vi_cmd_modestr_len = 0;
    return 0;
  }
  if (*param_1 == '\0') {
    if (_rl_vi_cmd_mode_str != (undefined1 *)0x0) {
      free(_rl_vi_cmd_mode_str);
    }
    _rl_vi_cmd_mode_str = (undefined1 *)xmalloc(1);
    _rl_vi_cmd_modestr_len = 0;
    *_rl_vi_cmd_mode_str = 0;
    return 0;
  }
  if (_rl_vi_cmd_mode_str != (undefined1 *)0x0) {
    free(_rl_vi_cmd_mode_str);
  }
  sVar1 = strlen(param_1);
  _rl_vi_cmd_mode_str = (undefined1 *)xmalloc(sVar1 * 2 + 1);
  rl_translate_keyseq(param_1,_rl_vi_cmd_mode_str,&_rl_vi_cmd_modestr_len);
  *(undefined1 *)((int)_rl_vi_cmd_mode_str + _rl_vi_cmd_modestr_len) = 0;
  return 0;
}


PUSH EDI
PUSH ESI
PUSH EBX
MOV EDI,dword ptr [ESP + 0x10]
CALL 0x00031ed0
ADD EBX,0x782b4
LEA ESI,[EBX + 0xd9cc]
MOV EAX,dword ptr [ESI]
TEST EDI,EDI
JZ 0x000d1df0
CMP byte ptr [EDI],0x0
JNZ 0x000d1da0
TEST EAX,EAX
JZ 0x000d1d77
SUB ESP,0xc
PUSH EAX
CALL 0x0002f200
ADD ESP,0x10
SUB ESP,0xc
PUSH 0x1
CALL 0x00099200
LEA EDX,[EBX + 0xd9c0]
ADD ESP,0x10
MOV dword ptr [ESI],EAX
MOV dword ptr [EDX],0x0
MOV byte ptr [EAX],0x0
XOR EAX,EAX
POP EBX
POP ESI
POP EDI
RET
TEST EAX,EAX
JZ 0x000d1db0
SUB ESP,0xc
PUSH EAX
CALL 0x0002f200
ADD ESP,0x10
SUB ESP,0xc
PUSH EDI
CALL 0x0002f760
LEA EAX,[EAX + EAX*0x1 + 0x1]
MOV dword ptr [ESP],EAX
CALL 0x00099200
LEA EBX,[EBX + 0xd9c0]
ADD ESP,0xc
MOV dword ptr [ESI],EAX
PUSH EBX
PUSH EAX
PUSH EDI
CALL 0x000d10e0
MOV EAX,dword ptr [EBX]
MOV EDX,dword ptr [ESI]
ADD ESP,0x10
MOV byte ptr [EDX + EAX*0x1],0x0
XOR EAX,EAX
POP EBX
POP ESI
POP EDI
RET
TEST EAX,EAX
JZ 0x000d1e00
SUB ESP,0xc
PUSH EAX
CALL 0x0002f200
ADD ESP,0x10
LEA EAX,[EBX + 0xd9c0]
MOV dword ptr [ESI],0x0
MOV dword ptr [EAX],0x0
XOR EAX,EAX
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 FUN_000d1d40(char *param_1)\n\n{\n  size_t sVar1;\n  \n  if (param_1 == (char *)0x0) {\n    if (_rl_vi_cmd_mode_str != (undefined1 *)0x0) {\n      free(_rl_vi_cmd_mode_str);\n    }\n    _rl_vi_cmd_mode_str = (undefined1 *)0x0;\n    _rl_vi_cmd_modestr_len = 0;\n    return 0;\n  }\n  if (*param_1 == '\0') {\n    if (_rl_vi_cmd_mode_str != (undefined1 *)0x0) {\n      free(_rl_vi_cmd_mode_str);\n    }\n    _rl_vi_cmd_mode_str = (undefined1 *)xmalloc(1);\n    _rl_vi_cmd_modestr_len = 0;\n    *_rl_vi_cmd_mode_str = 0;\n    return 0;\n  }\n  if (_rl_vi_cmd_mode_str != (undefined1 *)0x0) {\n    free(_rl_vi_cmd_mode_str);\n  }\n  sVar1 = strlen(param_1);\n  _rl_vi_cmd_mode_str = (undefined1 *)xmalloc(sVar1 * 2 + 1);\n  rl_translate_keyseq(param_1,_rl_vi_cmd_mode_str,&_rl_vi_cmd_modestr_len);\n  *(undefined1 *)((int)_rl_vi_cmd_mode_str + _rl_vi_cmd_modestr_len) = 0;\n  return 0;\n}\n\n" comment (function_definition "undefined4 FUN_000d1d40(char *param_1)\n\n{\n  size_t sVar1;\n  \n  if (param_1 == (char *)0x0) {\n    if (_rl_vi_cmd_mode_str != (undefined1 *)0x0) {\n      free(_rl_vi_cmd_mode_str);\n    }\n    _rl_vi_cmd_mode_str = (undefined1 *)0x0;\n    _rl_vi_cmd_modestr_len = 0;\n    return 0;\n  }\n  if (*param_1 == '\0') {\n    if (_rl_vi_cmd_mode_str != (undefined1 *)0x0) {\n      free(_rl_vi_cmd_mode_str);\n    }\n    _rl_vi_cmd_mode_str = (undefined1 *)xmalloc(1);\n    _rl_vi_cmd_modestr_len = 0;\n    *_rl_vi_cmd_mode_str = 0;\n    return 0;\n  }\n  if (_rl_vi_cmd_mode_str != (undefined1 *)0x0) {\n    free(_rl_vi_cmd_mode_str);\n  }\n  sVar1 = strlen(param_1);\n  _rl_vi_cmd_mode_str = (undefined1 *)xmalloc(sVar1 * 2 + 1);\n  rl_translate_keyseq(param_1,_rl_vi_cmd_mode_str,&_rl_vi_cmd_modestr_len);\n  *(undefined1 *)((int)_rl_vi_cmd_mode_str + _rl_vi_cmd_modestr_len) = 0;\n  return 0;\n}" type_identifier (function_declarator "FUN_000d1d40(char *param_1)" identifier (parameter_list "(char *param_1)" ( (parameter_declaration "char *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) ))) (compound_statement "{\n  size_t sVar1;\n  \n  if (param_1 == (char *)0x0) {\n    if (_rl_vi_cmd_mode_str != (undefined1 *)0x0) {\n      free(_rl_vi_cmd_mode_str);\n    }\n    _rl_vi_cmd_mode_str = (undefined1 *)0x0;\n    _rl_vi_cmd_modestr_len = 0;\n    return 0;\n  }\n  if (*param_1 == '\0') {\n    if (_rl_vi_cmd_mode_str != (undefined1 *)0x0) {\n      free(_rl_vi_cmd_mode_str);\n    }\n    _rl_vi_cmd_mode_str = (undefined1 *)xmalloc(1);\n    _rl_vi_cmd_modestr_len = 0;\n    *_rl_vi_cmd_mode_str = 0;\n    return 0;\n  }\n  if (_rl_vi_cmd_mode_str != (undefined1 *)0x0) {\n    free(_rl_vi_cmd_mode_str);\n  }\n  sVar1 = strlen(param_1);\n  _rl_vi_cmd_mode_str = (undefined1 *)xmalloc(sVar1 * 2 + 1);\n  rl_translate_keyseq(param_1,_rl_vi_cmd_mode_str,&_rl_vi_cmd_modestr_len);\n  *(undefined1 *)((int)_rl_vi_cmd_mode_str + _rl_vi_cmd_modestr_len) = 0;\n  return 0;\n}" { (declaration "size_t sVar1;" primitive_type identifier ;) (if_statement "if (param_1 == (char *)0x0) {\n    if (_rl_vi_cmd_mode_str != (undefined1 *)0x0) {\n      free(_rl_vi_cmd_mode_str);\n    }\n    _rl_vi_cmd_mode_str = (undefined1 *)0x0;\n    _rl_vi_cmd_modestr_len = 0;\n    return 0;\n  }" if (parenthesized_expression "(param_1 == (char *)0x0)" ( (binary_expression "param_1 == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    if (_rl_vi_cmd_mode_str != (undefined1 *)0x0) {\n      free(_rl_vi_cmd_mode_str);\n    }\n    _rl_vi_cmd_mode_str = (undefined1 *)0x0;\n    _rl_vi_cmd_modestr_len = 0;\n    return 0;\n  }" { (if_statement "if (_rl_vi_cmd_mode_str != (undefined1 *)0x0) {\n      free(_rl_vi_cmd_mode_str);\n    }" if (parenthesized_expression "(_rl_vi_cmd_mode_str != (undefined1 *)0x0)" ( (binary_expression "_rl_vi_cmd_mode_str != (undefined1 *)0x0" identifier != (cast_expression "(undefined1 *)0x0" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      free(_rl_vi_cmd_mode_str);\n    }" { (expression_statement "free(_rl_vi_cmd_mode_str);" (call_expression "free(_rl_vi_cmd_mode_str)" identifier (argument_list "(_rl_vi_cmd_mode_str)" ( identifier ))) ;) })) (expression_statement "_rl_vi_cmd_mode_str = (undefined1 *)0x0;" (assignment_expression "_rl_vi_cmd_mode_str = (undefined1 *)0x0" identifier = (cast_expression "(undefined1 *)0x0" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (expression_statement "_rl_vi_cmd_modestr_len = 0;" (assignment_expression "_rl_vi_cmd_modestr_len = 0" identifier = number_literal) ;) (return_statement "return 0;" return number_literal ;) })) (if_statement "if (*param_1 == '\0') {\n    if (_rl_vi_cmd_mode_str != (undefined1 *)0x0) {\n      free(_rl_vi_cmd_mode_str);\n    }\n    _rl_vi_cmd_mode_str = (undefined1 *)xmalloc(1);\n    _rl_vi_cmd_modestr_len = 0;\n    *_rl_vi_cmd_mode_str = 0;\n    return 0;\n  }" if (parenthesized_expression "(*param_1 == '\0')" ( (binary_expression "*param_1 == '\0'" (pointer_expression "*param_1" * identifier) == (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n    if (_rl_vi_cmd_mode_str != (undefined1 *)0x0) {\n      free(_rl_vi_cmd_mode_str);\n    }\n    _rl_vi_cmd_mode_str = (undefined1 *)xmalloc(1);\n    _rl_vi_cmd_modestr_len = 0;\n    *_rl_vi_cmd_mode_str = 0;\n    return 0;\n  }" { (if_statement "if (_rl_vi_cmd_mode_str != (undefined1 *)0x0) {\n      free(_rl_vi_cmd_mode_str);\n    }" if (parenthesized_expression "(_rl_vi_cmd_mode_str != (undefined1 *)0x0)" ( (binary_expression "_rl_vi_cmd_mode_str != (undefined1 *)0x0" identifier != (cast_expression "(undefined1 *)0x0" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      free(_rl_vi_cmd_mode_str);\n    }" { (expression_statement "free(_rl_vi_cmd_mode_str);" (call_expression "free(_rl_vi_cmd_mode_str)" identifier (argument_list "(_rl_vi_cmd_mode_str)" ( identifier ))) ;) })) (expression_statement "_rl_vi_cmd_mode_str = (undefined1 *)xmalloc(1);" (assignment_expression "_rl_vi_cmd_mode_str = (undefined1 *)xmalloc(1)" identifier = (cast_expression "(undefined1 *)xmalloc(1)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "xmalloc(1)" identifier (argument_list "(1)" ( number_literal ))))) ;) (expression_statement "_rl_vi_cmd_modestr_len = 0;" (assignment_expression "_rl_vi_cmd_modestr_len = 0" identifier = number_literal) ;) (expression_statement "*_rl_vi_cmd_mode_str = 0;" (assignment_expression "*_rl_vi_cmd_mode_str = 0" (pointer_expression "*_rl_vi_cmd_mode_str" * identifier) = number_literal) ;) (return_statement "return 0;" return number_literal ;) })) (if_statement "if (_rl_vi_cmd_mode_str != (undefined1 *)0x0) {\n    free(_rl_vi_cmd_mode_str);\n  }" if (parenthesized_expression "(_rl_vi_cmd_mode_str != (undefined1 *)0x0)" ( (binary_expression "_rl_vi_cmd_mode_str != (undefined1 *)0x0" identifier != (cast_expression "(undefined1 *)0x0" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    free(_rl_vi_cmd_mode_str);\n  }" { (expression_statement "free(_rl_vi_cmd_mode_str);" (call_expression "free(_rl_vi_cmd_mode_str)" identifier (argument_list "(_rl_vi_cmd_mode_str)" ( identifier ))) ;) })) (expression_statement "sVar1 = strlen(param_1);" (assignment_expression "sVar1 = strlen(param_1)" identifier = (call_expression "strlen(param_1)" identifier (argument_list "(param_1)" ( identifier )))) ;) (expression_statement "_rl_vi_cmd_mode_str = (undefined1 *)xmalloc(sVar1 * 2 + 1);" (assignment_expression "_rl_vi_cmd_mode_str = (undefined1 *)xmalloc(sVar1 * 2 + 1)" identifier = (cast_expression "(undefined1 *)xmalloc(sVar1 * 2 + 1)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "xmalloc(sVar1 * 2 + 1)" identifier (argument_list "(sVar1 * 2 + 1)" ( (binary_expression "sVar1 * 2 + 1" (binary_expression "sVar1 * 2" identifier * number_literal) + number_literal) ))))) ;) (expression_statement "rl_translate_keyseq(param_1,_rl_vi_cmd_mode_str,&_rl_vi_cmd_modestr_len);" (call_expression "rl_translate_keyseq(param_1,_rl_vi_cmd_mode_str,&_rl_vi_cmd_modestr_len)" identifier (argument_list "(param_1,_rl_vi_cmd_mode_str,&_rl_vi_cmd_modestr_len)" ( identifier , identifier , (pointer_expression "&_rl_vi_cmd_modestr_len" & identifier) ))) ;) (expression_statement "*(undefined1 *)((int)_rl_vi_cmd_mode_str + _rl_vi_cmd_modestr_len) = 0;" (assignment_expression "*(undefined1 *)((int)_rl_vi_cmd_mode_str + _rl_vi_cmd_modestr_len) = 0" (pointer_expression "*(undefined1 *)((int)_rl_vi_cmd_mode_str + _rl_vi_cmd_modestr_len)" * (cast_expression "(undefined1 *)((int)_rl_vi_cmd_mode_str + _rl_vi_cmd_modestr_len)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)_rl_vi_cmd_mode_str + _rl_vi_cmd_modestr_len)" ( (binary_expression "(int)_rl_vi_cmd_mode_str + _rl_vi_cmd_modestr_len" (cast_expression "(int)_rl_vi_cmd_mode_str" ( (type_descriptor "int" primitive_type) ) identifier) + identifier) )))) = number_literal) ;) (return_statement "return 0;" return number_literal ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nint sv_vicmd_modestr(char *value)\n\n{\n  size_t sVar1;\n  \n  if (value == (char *)0x0) {\n    if (_rl_vi_cmd_mode_str != (char *)0x0) {\n      free(_rl_vi_cmd_mode_str);\n    }\n    _rl_vi_cmd_mode_str = (char *)0x0;\n    _rl_vi_cmd_modestr_len = 0;\n    return 0;\n  }\n  if (*value == '\0') {\n    if (_rl_vi_cmd_mode_str != (char *)0x0) {\n      free(_rl_vi_cmd_mode_str);\n    }\n    _rl_vi_cmd_mode_str = (char *)xmalloc(1);\n    _rl_vi_cmd_modestr_len = 0;\n    *_rl_vi_cmd_mode_str = '\0';\n    return 0;\n  }\n  if (_rl_vi_cmd_mode_str != (char *)0x0) {\n    free(_rl_vi_cmd_mode_str);\n  }\n  sVar1 = strlen(value);\n  _rl_vi_cmd_mode_str = (char *)xmalloc(sVar1 * 2 + 1);\n  rl_translate_keyseq(value,_rl_vi_cmd_mode_str,&_rl_vi_cmd_modestr_len);\n  _rl_vi_cmd_mode_str[_rl_vi_cmd_modestr_len] = '\0';\n  return 0;\n}\n\n" comment (function_definition "int sv_vicmd_modestr(char *value)\n\n{\n  size_t sVar1;\n  \n  if (value == (char *)0x0) {\n    if (_rl_vi_cmd_mode_str != (char *)0x0) {\n      free(_rl_vi_cmd_mode_str);\n    }\n    _rl_vi_cmd_mode_str = (char *)0x0;\n    _rl_vi_cmd_modestr_len = 0;\n    return 0;\n  }\n  if (*value == '\0') {\n    if (_rl_vi_cmd_mode_str != (char *)0x0) {\n      free(_rl_vi_cmd_mode_str);\n    }\n    _rl_vi_cmd_mode_str = (char *)xmalloc(1);\n    _rl_vi_cmd_modestr_len = 0;\n    *_rl_vi_cmd_mode_str = '\0';\n    return 0;\n  }\n  if (_rl_vi_cmd_mode_str != (char *)0x0) {\n    free(_rl_vi_cmd_mode_str);\n  }\n  sVar1 = strlen(value);\n  _rl_vi_cmd_mode_str = (char *)xmalloc(sVar1 * 2 + 1);\n  rl_translate_keyseq(value,_rl_vi_cmd_mode_str,&_rl_vi_cmd_modestr_len);\n  _rl_vi_cmd_mode_str[_rl_vi_cmd_modestr_len] = '\0';\n  return 0;\n}" primitive_type (function_declarator "sv_vicmd_modestr(char *value)" identifier (parameter_list "(char *value)" ( (parameter_declaration "char *value" primitive_type (pointer_declarator "*value" * identifier)) ))) (compound_statement "{\n  size_t sVar1;\n  \n  if (value == (char *)0x0) {\n    if (_rl_vi_cmd_mode_str != (char *)0x0) {\n      free(_rl_vi_cmd_mode_str);\n    }\n    _rl_vi_cmd_mode_str = (char *)0x0;\n    _rl_vi_cmd_modestr_len = 0;\n    return 0;\n  }\n  if (*value == '\0') {\n    if (_rl_vi_cmd_mode_str != (char *)0x0) {\n      free(_rl_vi_cmd_mode_str);\n    }\n    _rl_vi_cmd_mode_str = (char *)xmalloc(1);\n    _rl_vi_cmd_modestr_len = 0;\n    *_rl_vi_cmd_mode_str = '\0';\n    return 0;\n  }\n  if (_rl_vi_cmd_mode_str != (char *)0x0) {\n    free(_rl_vi_cmd_mode_str);\n  }\n  sVar1 = strlen(value);\n  _rl_vi_cmd_mode_str = (char *)xmalloc(sVar1 * 2 + 1);\n  rl_translate_keyseq(value,_rl_vi_cmd_mode_str,&_rl_vi_cmd_modestr_len);\n  _rl_vi_cmd_mode_str[_rl_vi_cmd_modestr_len] = '\0';\n  return 0;\n}" { (declaration "size_t sVar1;" primitive_type identifier ;) (if_statement "if (value == (char *)0x0) {\n    if (_rl_vi_cmd_mode_str != (char *)0x0) {\n      free(_rl_vi_cmd_mode_str);\n    }\n    _rl_vi_cmd_mode_str = (char *)0x0;\n    _rl_vi_cmd_modestr_len = 0;\n    return 0;\n  }" if (parenthesized_expression "(value == (char *)0x0)" ( (binary_expression "value == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    if (_rl_vi_cmd_mode_str != (char *)0x0) {\n      free(_rl_vi_cmd_mode_str);\n    }\n    _rl_vi_cmd_mode_str = (char *)0x0;\n    _rl_vi_cmd_modestr_len = 0;\n    return 0;\n  }" { (if_statement "if (_rl_vi_cmd_mode_str != (char *)0x0) {\n      free(_rl_vi_cmd_mode_str);\n    }" if (parenthesized_expression "(_rl_vi_cmd_mode_str != (char *)0x0)" ( (binary_expression "_rl_vi_cmd_mode_str != (char *)0x0" identifier != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      free(_rl_vi_cmd_mode_str);\n    }" { (expression_statement "free(_rl_vi_cmd_mode_str);" (call_expression "free(_rl_vi_cmd_mode_str)" identifier (argument_list "(_rl_vi_cmd_mode_str)" ( identifier ))) ;) })) (expression_statement "_rl_vi_cmd_mode_str = (char *)0x0;" (assignment_expression "_rl_vi_cmd_mode_str = (char *)0x0" identifier = (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (expression_statement "_rl_vi_cmd_modestr_len = 0;" (assignment_expression "_rl_vi_cmd_modestr_len = 0" identifier = number_literal) ;) (return_statement "return 0;" return number_literal ;) })) (if_statement "if (*value == '\0') {\n    if (_rl_vi_cmd_mode_str != (char *)0x0) {\n      free(_rl_vi_cmd_mode_str);\n    }\n    _rl_vi_cmd_mode_str = (char *)xmalloc(1);\n    _rl_vi_cmd_modestr_len = 0;\n    *_rl_vi_cmd_mode_str = '\0';\n    return 0;\n  }" if (parenthesized_expression "(*value == '\0')" ( (binary_expression "*value == '\0'" (pointer_expression "*value" * identifier) == (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n    if (_rl_vi_cmd_mode_str != (char *)0x0) {\n      free(_rl_vi_cmd_mode_str);\n    }\n    _rl_vi_cmd_mode_str = (char *)xmalloc(1);\n    _rl_vi_cmd_modestr_len = 0;\n    *_rl_vi_cmd_mode_str = '\0';\n    return 0;\n  }" { (if_statement "if (_rl_vi_cmd_mode_str != (char *)0x0) {\n      free(_rl_vi_cmd_mode_str);\n    }" if (parenthesized_expression "(_rl_vi_cmd_mode_str != (char *)0x0)" ( (binary_expression "_rl_vi_cmd_mode_str != (char *)0x0" identifier != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      free(_rl_vi_cmd_mode_str);\n    }" { (expression_statement "free(_rl_vi_cmd_mode_str);" (call_expression "free(_rl_vi_cmd_mode_str)" identifier (argument_list "(_rl_vi_cmd_mode_str)" ( identifier ))) ;) })) (expression_statement "_rl_vi_cmd_mode_str = (char *)xmalloc(1);" (assignment_expression "_rl_vi_cmd_mode_str = (char *)xmalloc(1)" identifier = (cast_expression "(char *)xmalloc(1)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "xmalloc(1)" identifier (argument_list "(1)" ( number_literal ))))) ;) (expression_statement "_rl_vi_cmd_modestr_len = 0;" (assignment_expression "_rl_vi_cmd_modestr_len = 0" identifier = number_literal) ;) (expression_statement "*_rl_vi_cmd_mode_str = '\0';" (assignment_expression "*_rl_vi_cmd_mode_str = '\0'" (pointer_expression "*_rl_vi_cmd_mode_str" * identifier) = (char_literal "'\0'" ' escape_sequence ')) ;) (return_statement "return 0;" return number_literal ;) })) (if_statement "if (_rl_vi_cmd_mode_str != (char *)0x0) {\n    free(_rl_vi_cmd_mode_str);\n  }" if (parenthesized_expression "(_rl_vi_cmd_mode_str != (char *)0x0)" ( (binary_expression "_rl_vi_cmd_mode_str != (char *)0x0" identifier != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    free(_rl_vi_cmd_mode_str);\n  }" { (expression_statement "free(_rl_vi_cmd_mode_str);" (call_expression "free(_rl_vi_cmd_mode_str)" identifier (argument_list "(_rl_vi_cmd_mode_str)" ( identifier ))) ;) })) (expression_statement "sVar1 = strlen(value);" (assignment_expression "sVar1 = strlen(value)" identifier = (call_expression "strlen(value)" identifier (argument_list "(value)" ( identifier )))) ;) (expression_statement "_rl_vi_cmd_mode_str = (char *)xmalloc(sVar1 * 2 + 1);" (assignment_expression "_rl_vi_cmd_mode_str = (char *)xmalloc(sVar1 * 2 + 1)" identifier = (cast_expression "(char *)xmalloc(sVar1 * 2 + 1)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "xmalloc(sVar1 * 2 + 1)" identifier (argument_list "(sVar1 * 2 + 1)" ( (binary_expression "sVar1 * 2 + 1" (binary_expression "sVar1 * 2" identifier * number_literal) + number_literal) ))))) ;) (expression_statement "rl_translate_keyseq(value,_rl_vi_cmd_mode_str,&_rl_vi_cmd_modestr_len);" (call_expression "rl_translate_keyseq(value,_rl_vi_cmd_mode_str,&_rl_vi_cmd_modestr_len)" identifier (argument_list "(value,_rl_vi_cmd_mode_str,&_rl_vi_cmd_modestr_len)" ( identifier , identifier , (pointer_expression "&_rl_vi_cmd_modestr_len" & identifier) ))) ;) (expression_statement "_rl_vi_cmd_mode_str[_rl_vi_cmd_modestr_len] = '\0';" (assignment_expression "_rl_vi_cmd_mode_str[_rl_vi_cmd_modestr_len] = '\0'" (subscript_expression "_rl_vi_cmd_mode_str[_rl_vi_cmd_modestr_len]" identifier [ identifier ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (return_statement "return 0;" return number_literal ;) })))
(translation_unit "undefined4 FUN_000d1d40(char *param_1)\n\n{\n  size_t sVar1;\n  \n  if (param_1 == (char *)0x0) {\n    if (_rl_vi_cmd_mode_str != (undefined1 *)0x0) {\n      free(_rl_vi_cmd_mode_str);\n    }\n    _rl_vi_cmd_mode_str = (undefined1 *)0x0;\n    _rl_vi_cmd_modestr_len = 0;\n    return 0;\n  }\n  if (*param_1 == '\0') {\n    if (_rl_vi_cmd_mode_str != (undefined1 *)0x0) {\n      free(_rl_vi_cmd_mode_str);\n    }\n    _rl_vi_cmd_mode_str = (undefined1 *)xmalloc(1);\n    _rl_vi_cmd_modestr_len = 0;\n    *_rl_vi_cmd_mode_str = 0;\n    return 0;\n  }\n  if (_rl_vi_cmd_mode_str != (undefined1 *)0x0) {\n    free(_rl_vi_cmd_mode_str);\n  }\n  sVar1 = strlen(param_1);\n  _rl_vi_cmd_mode_str = (undefined1 *)xmalloc(sVar1 * 2 + 1);\n  rl_translate_keyseq(param_1,_rl_vi_cmd_mode_str,&_rl_vi_cmd_modestr_len);\n  *(undefined1 *)((int)_rl_vi_cmd_mode_str + _rl_vi_cmd_modestr_len) = 0;\n  return 0;\n}\n\n" (function_definition "undefined4 FUN_000d1d40(char *param_1)\n\n{\n  size_t sVar1;\n  \n  if (param_1 == (char *)0x0) {\n    if (_rl_vi_cmd_mode_str != (undefined1 *)0x0) {\n      free(_rl_vi_cmd_mode_str);\n    }\n    _rl_vi_cmd_mode_str = (undefined1 *)0x0;\n    _rl_vi_cmd_modestr_len = 0;\n    return 0;\n  }\n  if (*param_1 == '\0') {\n    if (_rl_vi_cmd_mode_str != (undefined1 *)0x0) {\n      free(_rl_vi_cmd_mode_str);\n    }\n    _rl_vi_cmd_mode_str = (undefined1 *)xmalloc(1);\n    _rl_vi_cmd_modestr_len = 0;\n    *_rl_vi_cmd_mode_str = 0;\n    return 0;\n  }\n  if (_rl_vi_cmd_mode_str != (undefined1 *)0x0) {\n    free(_rl_vi_cmd_mode_str);\n  }\n  sVar1 = strlen(param_1);\n  _rl_vi_cmd_mode_str = (undefined1 *)xmalloc(sVar1 * 2 + 1);\n  rl_translate_keyseq(param_1,_rl_vi_cmd_mode_str,&_rl_vi_cmd_modestr_len);\n  *(undefined1 *)((int)_rl_vi_cmd_mode_str + _rl_vi_cmd_modestr_len) = 0;\n  return 0;\n}" type_identifier (function_declarator "FUN_000d1d40(char *param_1)" identifier (parameter_list "(char *param_1)" ( (parameter_declaration "char *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) ))) (compound_statement "{\n  size_t sVar1;\n  \n  if (param_1 == (char *)0x0) {\n    if (_rl_vi_cmd_mode_str != (undefined1 *)0x0) {\n      free(_rl_vi_cmd_mode_str);\n    }\n    _rl_vi_cmd_mode_str = (undefined1 *)0x0;\n    _rl_vi_cmd_modestr_len = 0;\n    return 0;\n  }\n  if (*param_1 == '\0') {\n    if (_rl_vi_cmd_mode_str != (undefined1 *)0x0) {\n      free(_rl_vi_cmd_mode_str);\n    }\n    _rl_vi_cmd_mode_str = (undefined1 *)xmalloc(1);\n    _rl_vi_cmd_modestr_len = 0;\n    *_rl_vi_cmd_mode_str = 0;\n    return 0;\n  }\n  if (_rl_vi_cmd_mode_str != (undefined1 *)0x0) {\n    free(_rl_vi_cmd_mode_str);\n  }\n  sVar1 = strlen(param_1);\n  _rl_vi_cmd_mode_str = (undefined1 *)xmalloc(sVar1 * 2 + 1);\n  rl_translate_keyseq(param_1,_rl_vi_cmd_mode_str,&_rl_vi_cmd_modestr_len);\n  *(undefined1 *)((int)_rl_vi_cmd_mode_str + _rl_vi_cmd_modestr_len) = 0;\n  return 0;\n}" { (declaration "size_t sVar1;" primitive_type identifier ;) (if_statement "if (param_1 == (char *)0x0) {\n    if (_rl_vi_cmd_mode_str != (undefined1 *)0x0) {\n      free(_rl_vi_cmd_mode_str);\n    }\n    _rl_vi_cmd_mode_str = (undefined1 *)0x0;\n    _rl_vi_cmd_modestr_len = 0;\n    return 0;\n  }" if (parenthesized_expression "(param_1 == (char *)0x0)" ( (binary_expression "param_1 == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    if (_rl_vi_cmd_mode_str != (undefined1 *)0x0) {\n      free(_rl_vi_cmd_mode_str);\n    }\n    _rl_vi_cmd_mode_str = (undefined1 *)0x0;\n    _rl_vi_cmd_modestr_len = 0;\n    return 0;\n  }" { (if_statement "if (_rl_vi_cmd_mode_str != (undefined1 *)0x0) {\n      free(_rl_vi_cmd_mode_str);\n    }" if (parenthesized_expression "(_rl_vi_cmd_mode_str != (undefined1 *)0x0)" ( (binary_expression "_rl_vi_cmd_mode_str != (undefined1 *)0x0" identifier != (cast_expression "(undefined1 *)0x0" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      free(_rl_vi_cmd_mode_str);\n    }" { (expression_statement "free(_rl_vi_cmd_mode_str);" (call_expression "free(_rl_vi_cmd_mode_str)" identifier (argument_list "(_rl_vi_cmd_mode_str)" ( identifier ))) ;) })) (expression_statement "_rl_vi_cmd_mode_str = (undefined1 *)0x0;" (assignment_expression "_rl_vi_cmd_mode_str = (undefined1 *)0x0" identifier = (cast_expression "(undefined1 *)0x0" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (expression_statement "_rl_vi_cmd_modestr_len = 0;" (assignment_expression "_rl_vi_cmd_modestr_len = 0" identifier = number_literal) ;) (return_statement "return 0;" return number_literal ;) })) (if_statement "if (*param_1 == '\0') {\n    if (_rl_vi_cmd_mode_str != (undefined1 *)0x0) {\n      free(_rl_vi_cmd_mode_str);\n    }\n    _rl_vi_cmd_mode_str = (undefined1 *)xmalloc(1);\n    _rl_vi_cmd_modestr_len = 0;\n    *_rl_vi_cmd_mode_str = 0;\n    return 0;\n  }" if (parenthesized_expression "(*param_1 == '\0')" ( (binary_expression "*param_1 == '\0'" (pointer_expression "*param_1" * identifier) == (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n    if (_rl_vi_cmd_mode_str != (undefined1 *)0x0) {\n      free(_rl_vi_cmd_mode_str);\n    }\n    _rl_vi_cmd_mode_str = (undefined1 *)xmalloc(1);\n    _rl_vi_cmd_modestr_len = 0;\n    *_rl_vi_cmd_mode_str = 0;\n    return 0;\n  }" { (if_statement "if (_rl_vi_cmd_mode_str != (undefined1 *)0x0) {\n      free(_rl_vi_cmd_mode_str);\n    }" if (parenthesized_expression "(_rl_vi_cmd_mode_str != (undefined1 *)0x0)" ( (binary_expression "_rl_vi_cmd_mode_str != (undefined1 *)0x0" identifier != (cast_expression "(undefined1 *)0x0" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      free(_rl_vi_cmd_mode_str);\n    }" { (expression_statement "free(_rl_vi_cmd_mode_str);" (call_expression "free(_rl_vi_cmd_mode_str)" identifier (argument_list "(_rl_vi_cmd_mode_str)" ( identifier ))) ;) })) (expression_statement "_rl_vi_cmd_mode_str = (undefined1 *)xmalloc(1);" (assignment_expression "_rl_vi_cmd_mode_str = (undefined1 *)xmalloc(1)" identifier = (cast_expression "(undefined1 *)xmalloc(1)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "xmalloc(1)" identifier (argument_list "(1)" ( number_literal ))))) ;) (expression_statement "_rl_vi_cmd_modestr_len = 0;" (assignment_expression "_rl_vi_cmd_modestr_len = 0" identifier = number_literal) ;) (expression_statement "*_rl_vi_cmd_mode_str = 0;" (assignment_expression "*_rl_vi_cmd_mode_str = 0" (pointer_expression "*_rl_vi_cmd_mode_str" * identifier) = number_literal) ;) (return_statement "return 0;" return number_literal ;) })) (if_statement "if (_rl_vi_cmd_mode_str != (undefined1 *)0x0) {\n    free(_rl_vi_cmd_mode_str);\n  }" if (parenthesized_expression "(_rl_vi_cmd_mode_str != (undefined1 *)0x0)" ( (binary_expression "_rl_vi_cmd_mode_str != (undefined1 *)0x0" identifier != (cast_expression "(undefined1 *)0x0" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    free(_rl_vi_cmd_mode_str);\n  }" { (expression_statement "free(_rl_vi_cmd_mode_str);" (call_expression "free(_rl_vi_cmd_mode_str)" identifier (argument_list "(_rl_vi_cmd_mode_str)" ( identifier ))) ;) })) (expression_statement "sVar1 = strlen(param_1);" (assignment_expression "sVar1 = strlen(param_1)" identifier = (call_expression "strlen(param_1)" identifier (argument_list "(param_1)" ( identifier )))) ;) (expression_statement "_rl_vi_cmd_mode_str = (undefined1 *)xmalloc(sVar1 * 2 + 1);" (assignment_expression "_rl_vi_cmd_mode_str = (undefined1 *)xmalloc(sVar1 * 2 + 1)" identifier = (cast_expression "(undefined1 *)xmalloc(sVar1 * 2 + 1)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "xmalloc(sVar1 * 2 + 1)" identifier (argument_list "(sVar1 * 2 + 1)" ( (binary_expression "sVar1 * 2 + 1" (binary_expression "sVar1 * 2" identifier * number_literal) + number_literal) ))))) ;) (expression_statement "rl_translate_keyseq(param_1,_rl_vi_cmd_mode_str,&_rl_vi_cmd_modestr_len);" (call_expression "rl_translate_keyseq(param_1,_rl_vi_cmd_mode_str,&_rl_vi_cmd_modestr_len)" identifier (argument_list "(param_1,_rl_vi_cmd_mode_str,&_rl_vi_cmd_modestr_len)" ( identifier , identifier , (pointer_expression "&_rl_vi_cmd_modestr_len" & identifier) ))) ;) (expression_statement "*(undefined1 *)((int)_rl_vi_cmd_mode_str + _rl_vi_cmd_modestr_len) = 0;" (assignment_expression "*(undefined1 *)((int)_rl_vi_cmd_mode_str + _rl_vi_cmd_modestr_len) = 0" (pointer_expression "*(undefined1 *)((int)_rl_vi_cmd_mode_str + _rl_vi_cmd_modestr_len)" * (cast_expression "(undefined1 *)((int)_rl_vi_cmd_mode_str + _rl_vi_cmd_modestr_len)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)_rl_vi_cmd_mode_str + _rl_vi_cmd_modestr_len)" ( (binary_expression "(int)_rl_vi_cmd_mode_str + _rl_vi_cmd_modestr_len" (cast_expression "(int)_rl_vi_cmd_mode_str" ( (type_descriptor "int" primitive_type) ) identifier) + identifier) )))) = number_literal) ;) (return_statement "return 0;" return number_literal ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) ))) (compound_statement { (declaration TYPE IDENT ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) 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 ( IDENT ))) ;) })) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (return_statement return LIT ;) })) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) == (char_literal ' escape_sequence ')) )) (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 ( IDENT ))) ;) })) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( LIT ))))) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = LIT) ;) (return_statement return 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 = (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 (binary_expression IDENT * LIT) + LIT) ))))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT , (pointer_expression & IDENT) ))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) + IDENT) )))) = LIT) ;) (return_statement return LIT ;) })))
(function_definition "undefined4 FUN_000d1d40(char *param_1)\n\n{\n  size_t sVar1;\n  \n  if (param_1 == (char *)0x0) {\n    if (_rl_vi_cmd_mode_str != (undefined1 *)0x0) {\n      free(_rl_vi_cmd_mode_str);\n    }\n    _rl_vi_cmd_mode_str = (undefined1 *)0x0;\n    _rl_vi_cmd_modestr_len = 0;\n    return 0;\n  }\n  if (*param_1 == '\0') {\n    if (_rl_vi_cmd_mode_str != (undefined1 *)0x0) {\n      free(_rl_vi_cmd_mode_str);\n    }\n    _rl_vi_cmd_mode_str = (undefined1 *)xmalloc(1);\n    _rl_vi_cmd_modestr_len = 0;\n    *_rl_vi_cmd_mode_str = 0;\n    return 0;\n  }\n  if (_rl_vi_cmd_mode_str != (undefined1 *)0x0) {\n    free(_rl_vi_cmd_mode_str);\n  }\n  sVar1 = strlen(param_1);\n  _rl_vi_cmd_mode_str = (undefined1 *)xmalloc(sVar1 * 2 + 1);\n  rl_translate_keyseq(param_1,_rl_vi_cmd_mode_str,&_rl_vi_cmd_modestr_len);\n  *(undefined1 *)((int)_rl_vi_cmd_mode_str + _rl_vi_cmd_modestr_len) = 0;\n  return 0;\n}" (type_identifier "undefined4") (function_declarator "FUN_000d1d40(char *param_1)" (identifier "FUN_000d1d40") (parameter_list "(char *param_1)" (( "(") (parameter_declaration "char *param_1" (primitive_type "char") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) () ")"))) (compound_statement "{\n  size_t sVar1;\n  \n  if (param_1 == (char *)0x0) {\n    if (_rl_vi_cmd_mode_str != (undefined1 *)0x0) {\n      free(_rl_vi_cmd_mode_str);\n    }\n    _rl_vi_cmd_mode_str = (undefined1 *)0x0;\n    _rl_vi_cmd_modestr_len = 0;\n    return 0;\n  }\n  if (*param_1 == '\0') {\n    if (_rl_vi_cmd_mode_str != (undefined1 *)0x0) {\n      free(_rl_vi_cmd_mode_str);\n    }\n    _rl_vi_cmd_mode_str = (undefined1 *)xmalloc(1);\n    _rl_vi_cmd_modestr_len = 0;\n    *_rl_vi_cmd_mode_str = 0;\n    return 0;\n  }\n  if (_rl_vi_cmd_mode_str != (undefined1 *)0x0) {\n    free(_rl_vi_cmd_mode_str);\n  }\n  sVar1 = strlen(param_1);\n  _rl_vi_cmd_mode_str = (undefined1 *)xmalloc(sVar1 * 2 + 1);\n  rl_translate_keyseq(param_1,_rl_vi_cmd_mode_str,&_rl_vi_cmd_modestr_len);\n  *(undefined1 *)((int)_rl_vi_cmd_mode_str + _rl_vi_cmd_modestr_len) = 0;\n  return 0;\n}" ({ "{") (declaration "size_t sVar1;" (primitive_type "size_t") (identifier "sVar1") (; ";")) (if_statement "if (param_1 == (char *)0x0) {\n    if (_rl_vi_cmd_mode_str != (undefined1 *)0x0) {\n      free(_rl_vi_cmd_mode_str);\n    }\n    _rl_vi_cmd_mode_str = (undefined1 *)0x0;\n    _rl_vi_cmd_modestr_len = 0;\n    return 0;\n  }" (if "if") (parenthesized_expression "(param_1 == (char *)0x0)" (( "(") (binary_expression "param_1 == (char *)0x0" (identifier "param_1") (== "==") (cast_expression "(char *)0x0" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n    if (_rl_vi_cmd_mode_str != (undefined1 *)0x0) {\n      free(_rl_vi_cmd_mode_str);\n    }\n    _rl_vi_cmd_mode_str = (undefined1 *)0x0;\n    _rl_vi_cmd_modestr_len = 0;\n    return 0;\n  }" ({ "{") (if_statement "if (_rl_vi_cmd_mode_str != (undefined1 *)0x0) {\n      free(_rl_vi_cmd_mode_str);\n    }" (if "if") (parenthesized_expression "(_rl_vi_cmd_mode_str != (undefined1 *)0x0)" (( "(") (binary_expression "_rl_vi_cmd_mode_str != (undefined1 *)0x0" (identifier "_rl_vi_cmd_mode_str") (!= "!=") (cast_expression "(undefined1 *)0x0" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n      free(_rl_vi_cmd_mode_str);\n    }" ({ "{") (expression_statement "free(_rl_vi_cmd_mode_str);" (call_expression "free(_rl_vi_cmd_mode_str)" (identifier "free") (argument_list "(_rl_vi_cmd_mode_str)" (( "(") (identifier "_rl_vi_cmd_mode_str") () ")"))) (; ";")) (} "}"))) (expression_statement "_rl_vi_cmd_mode_str = (undefined1 *)0x0;" (assignment_expression "_rl_vi_cmd_mode_str = (undefined1 *)0x0" (identifier "_rl_vi_cmd_mode_str") (= "=") (cast_expression "(undefined1 *)0x0" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) (; ";")) (expression_statement "_rl_vi_cmd_modestr_len = 0;" (assignment_expression "_rl_vi_cmd_modestr_len = 0" (identifier "_rl_vi_cmd_modestr_len") (= "=") (number_literal "0")) (; ";")) (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}"))) (if_statement "if (*param_1 == '\0') {\n    if (_rl_vi_cmd_mode_str != (undefined1 *)0x0) {\n      free(_rl_vi_cmd_mode_str);\n    }\n    _rl_vi_cmd_mode_str = (undefined1 *)xmalloc(1);\n    _rl_vi_cmd_modestr_len = 0;\n    *_rl_vi_cmd_mode_str = 0;\n    return 0;\n  }" (if "if") (parenthesized_expression "(*param_1 == '\0')" (( "(") (binary_expression "*param_1 == '\0'" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (== "==") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) () ")")) (compound_statement "{\n    if (_rl_vi_cmd_mode_str != (undefined1 *)0x0) {\n      free(_rl_vi_cmd_mode_str);\n    }\n    _rl_vi_cmd_mode_str = (undefined1 *)xmalloc(1);\n    _rl_vi_cmd_modestr_len = 0;\n    *_rl_vi_cmd_mode_str = 0;\n    return 0;\n  }" ({ "{") (if_statement "if (_rl_vi_cmd_mode_str != (undefined1 *)0x0) {\n      free(_rl_vi_cmd_mode_str);\n    }" (if "if") (parenthesized_expression "(_rl_vi_cmd_mode_str != (undefined1 *)0x0)" (( "(") (binary_expression "_rl_vi_cmd_mode_str != (undefined1 *)0x0" (identifier "_rl_vi_cmd_mode_str") (!= "!=") (cast_expression "(undefined1 *)0x0" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n      free(_rl_vi_cmd_mode_str);\n    }" ({ "{") (expression_statement "free(_rl_vi_cmd_mode_str);" (call_expression "free(_rl_vi_cmd_mode_str)" (identifier "free") (argument_list "(_rl_vi_cmd_mode_str)" (( "(") (identifier "_rl_vi_cmd_mode_str") () ")"))) (; ";")) (} "}"))) (expression_statement "_rl_vi_cmd_mode_str = (undefined1 *)xmalloc(1);" (assignment_expression "_rl_vi_cmd_mode_str = (undefined1 *)xmalloc(1)" (identifier "_rl_vi_cmd_mode_str") (= "=") (cast_expression "(undefined1 *)xmalloc(1)" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "xmalloc(1)" (identifier "xmalloc") (argument_list "(1)" (( "(") (number_literal "1") () ")"))))) (; ";")) (expression_statement "_rl_vi_cmd_modestr_len = 0;" (assignment_expression "_rl_vi_cmd_modestr_len = 0" (identifier "_rl_vi_cmd_modestr_len") (= "=") (number_literal "0")) (; ";")) (expression_statement "*_rl_vi_cmd_mode_str = 0;" (assignment_expression "*_rl_vi_cmd_mode_str = 0" (pointer_expression "*_rl_vi_cmd_mode_str" (* "*") (identifier "_rl_vi_cmd_mode_str")) (= "=") (number_literal "0")) (; ";")) (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}"))) (if_statement "if (_rl_vi_cmd_mode_str != (undefined1 *)0x0) {\n    free(_rl_vi_cmd_mode_str);\n  }" (if "if") (parenthesized_expression "(_rl_vi_cmd_mode_str != (undefined1 *)0x0)" (( "(") (binary_expression "_rl_vi_cmd_mode_str != (undefined1 *)0x0" (identifier "_rl_vi_cmd_mode_str") (!= "!=") (cast_expression "(undefined1 *)0x0" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n    free(_rl_vi_cmd_mode_str);\n  }" ({ "{") (expression_statement "free(_rl_vi_cmd_mode_str);" (call_expression "free(_rl_vi_cmd_mode_str)" (identifier "free") (argument_list "(_rl_vi_cmd_mode_str)" (( "(") (identifier "_rl_vi_cmd_mode_str") () ")"))) (; ";")) (} "}"))) (expression_statement "sVar1 = strlen(param_1);" (assignment_expression "sVar1 = strlen(param_1)" (identifier "sVar1") (= "=") (call_expression "strlen(param_1)" (identifier "strlen") (argument_list "(param_1)" (( "(") (identifier "param_1") () ")")))) (; ";")) (expression_statement "_rl_vi_cmd_mode_str = (undefined1 *)xmalloc(sVar1 * 2 + 1);" (assignment_expression "_rl_vi_cmd_mode_str = (undefined1 *)xmalloc(sVar1 * 2 + 1)" (identifier "_rl_vi_cmd_mode_str") (= "=") (cast_expression "(undefined1 *)xmalloc(sVar1 * 2 + 1)" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "xmalloc(sVar1 * 2 + 1)" (identifier "xmalloc") (argument_list "(sVar1 * 2 + 1)" (( "(") (binary_expression "sVar1 * 2 + 1" (binary_expression "sVar1 * 2" (identifier "sVar1") (* "*") (number_literal "2")) (+ "+") (number_literal "1")) () ")"))))) (; ";")) (expression_statement "rl_translate_keyseq(param_1,_rl_vi_cmd_mode_str,&_rl_vi_cmd_modestr_len);" (call_expression "rl_translate_keyseq(param_1,_rl_vi_cmd_mode_str,&_rl_vi_cmd_modestr_len)" (identifier "rl_translate_keyseq") (argument_list "(param_1,_rl_vi_cmd_mode_str,&_rl_vi_cmd_modestr_len)" (( "(") (identifier "param_1") (, ",") (identifier "_rl_vi_cmd_mode_str") (, ",") (pointer_expression "&_rl_vi_cmd_modestr_len" (& "&") (identifier "_rl_vi_cmd_modestr_len")) () ")"))) (; ";")) (expression_statement "*(undefined1 *)((int)_rl_vi_cmd_mode_str + _rl_vi_cmd_modestr_len) = 0;" (assignment_expression "*(undefined1 *)((int)_rl_vi_cmd_mode_str + _rl_vi_cmd_modestr_len) = 0" (pointer_expression "*(undefined1 *)((int)_rl_vi_cmd_mode_str + _rl_vi_cmd_modestr_len)" (* "*") (cast_expression "(undefined1 *)((int)_rl_vi_cmd_mode_str + _rl_vi_cmd_modestr_len)" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((int)_rl_vi_cmd_mode_str + _rl_vi_cmd_modestr_len)" (( "(") (binary_expression "(int)_rl_vi_cmd_mode_str + _rl_vi_cmd_modestr_len" (cast_expression "(int)_rl_vi_cmd_mode_str" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "_rl_vi_cmd_mode_str")) (+ "+") (identifier "_rl_vi_cmd_modestr_len")) () ")")))) (= "=") (number_literal "0")) (; ";")) (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}")))

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

int function_1(char *var_1)

{
  size_t var_6;
  
  if (var_1 == (char *)0x0) {
    if (var_2 != (char *)0x0) {
      var_3(var_2);
    }
    var_2 = (char *)0x0;
    _rl_vi_cmd_modestr_len = 0;
    return 0;
  }
  if (*var_1 == '\0') {
    if (var_2 != (char *)0x0) {
      var_3(var_2);
    }
    var_2 = (char *)var_4(1);
    _rl_vi_cmd_modestr_len = 0;
    *var_2 = '\0';
    return 0;
  }
  if (var_2 != (char *)0x0) {
    var_3(var_2);
  }
  var_6 = var_5(var_1);
  var_2 = (char *)var_4(var_6 * 2 + 1);
  var_7(var_1,var_2,&_rl_vi_cmd_modestr_len);
  var_2[_rl_vi_cmd_modestr_len] = '\0';
  return 0;
}


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

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

undefined4 MASKED(char *param_1)

{
  size_t sVar1;
  
  if (param_1 == (char *)0x0) {
    if (_rl_vi_cmd_mode_str != (undefined1 *)0x0) {
      free(_rl_vi_cmd_mode_str);
    }
    _rl_vi_cmd_mode_str = (undefined1 *)0x0;
    _rl_vi_cmd_modestr_len = 0;
    return 0;
  }
  if (*param_1 == '\0') {
    if (_rl_vi_cmd_mode_str != (undefined1 *)0x0) {
      free(_rl_vi_cmd_mode_str);
    }
    _rl_vi_cmd_mode_str = (undefined1 *)xmalloc(1);
    _rl_vi_cmd_modestr_len = 0;
    *_rl_vi_cmd_mode_str = 0;
    return 0;
  }
  if (_rl_vi_cmd_mode_str != (undefined1 *)0x0) {
    free(_rl_vi_cmd_mode_str);
  }
  sVar1 = strlen(param_1);
  _rl_vi_cmd_mode_str = (undefined1 *)xmalloc(sVar1 * 2 + 1);
  rl_translate_keyseq(param_1,_rl_vi_cmd_mode_str,&_rl_vi_cmd_modestr_len);
  *(undefined1 *)((int)_rl_vi_cmd_mode_str + _rl_vi_cmd_modestr_len) = 0;
  return 0;
}

