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

int rl_transpose_chars(int count,int key)

{
  size_t sVar1;
  char *string;
  char *pcVar2;
  int iVar3;
  int iVar4;
  
  if (count != 0) {
    if ((rl_point == 0) || (rl_end < 2)) {
      rl_ding();
      return 1;
    }
    rl_begin_undo_group();
    if (rl_point == rl_end) {
      sVar1 = __ctype_get_mb_cur_max();
      if ((sVar1 < 2) || (rl_byte_oriented != 0)) {
        rl_point = rl_point + -1;
      }
      else {
        rl_point = _rl_find_prev_mbchar(rl_line_buffer,rl_point,1);
      }
      count = 1;
    }
    iVar4 = rl_point;
    sVar1 = __ctype_get_mb_cur_max();
    if ((sVar1 < 2) || (rl_byte_oriented != 0)) {
      rl_point = rl_point + -1;
    }
    else {
      rl_point = _rl_find_prev_mbchar(rl_line_buffer,rl_point,1);
    }
    iVar4 = iVar4 - rl_point;
    string = (char *)xmalloc(iVar4 + 1);
    pcVar2 = string;
    if (0 < iVar4) {
      iVar3 = 0;
      do {
        string[iVar3] = rl_line_buffer[rl_point + iVar3];
        iVar3 = iVar3 + 1;
      } while (iVar4 != iVar3);
      pcVar2 = string + iVar4;
    }
    *pcVar2 = '\0';
    rl_delete_text(rl_point,iVar4 + rl_point);
    rl_point = _rl_find_next_mbchar(rl_line_buffer,rl_point,count,1);
    if (rl_end < rl_point) {
      rl_point = rl_end;
    }
    else if (rl_point < 0) {
      rl_point = 0;
    }
    rl_insert_text(string);
    rl_end_undo_group();
    xfree(string);
  }
  return 0;
}



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

undefined4 rl_transpose_chars(int param_1)

{
  size_t sVar1;
  undefined1 *puVar2;
  undefined1 *puVar3;
  int iVar4;
  int iVar5;
  
  if (param_1 != 0) {
    if ((rl_point == 0) || (rl_end < 2)) {
      rl_ding();
      return 1;
    }
    rl_begin_undo_group();
    if (rl_point == rl_end) {
      sVar1 = __ctype_get_mb_cur_max();
      if ((sVar1 < 2) || (rl_byte_oriented != 0)) {
        rl_point = rl_point + -1;
      }
      else {
        rl_point = _rl_find_prev_mbchar(rl_line_buffer,rl_point,1);
      }
      param_1 = 1;
    }
    iVar5 = rl_point;
    sVar1 = __ctype_get_mb_cur_max();
    if ((sVar1 < 2) || (rl_byte_oriented != 0)) {
      rl_point = rl_point + -1;
    }
    else {
      rl_point = _rl_find_prev_mbchar(rl_line_buffer,rl_point,1);
    }
    iVar5 = iVar5 - rl_point;
    puVar2 = (undefined1 *)xmalloc(iVar5 + 1);
    puVar3 = puVar2;
    if (0 < iVar5) {
      iVar4 = 0;
      do {
        puVar2[iVar4] = *(undefined1 *)(rl_line_buffer + iVar4 + rl_point);
        iVar4 = iVar4 + 1;
      } while (iVar5 != iVar4);
      puVar3 = puVar2 + iVar5;
    }
    *puVar3 = 0;
    rl_delete_text(rl_point,iVar5 + rl_point);
    rl_point = _rl_find_next_mbchar(rl_line_buffer,rl_point,param_1,1);
    if (rl_end < rl_point) {
      rl_point = rl_end;
    }
    else if (rl_point < 0) {
      rl_point = 0;
    }
    rl_insert_text(puVar2);
    rl_end_undo_group();
    xfree(puVar2);
  }
  return 0;
}


PUSH EBP
XOR EAX,EAX
PUSH EDI
PUSH ESI
PUSH EBX
CALL 0x000312b0
ADD EBX,0x6c165
SUB ESP,0x1c
MOV EBP,dword ptr [ESP + 0x30]
TEST EBP,EBP
JZ 0x00105fd4
LEA ESI,[EBX + 0xd988]
MOV EDI,dword ptr [ESI]
TEST EDI,EDI
JZ 0x00105fe0
LEA EAX,[EBX + 0xd8cc]
CMP dword ptr [EAX],0x1
MOV dword ptr [ESP + 0x8],EAX
JLE 0x00105fe0
CALL 0x000fed80
MOV EAX,dword ptr [ESP + 0x8]
MOV EDI,dword ptr [ESI]
LEA ECX,[EBX + 0x7afc]
CMP EDI,dword ptr [EAX]
JZ 0x00106000
MOV dword ptr [ESP + 0xc],ECX
CALL 0x0002e520
MOV ECX,dword ptr [ESP + 0xc]
CMP EAX,0x1
MOV EAX,dword ptr [ESI]
JBE 0x00105f30
LEA EDX,[EBX + 0x8b30]
MOV EDX,dword ptr [EDX]
TEST EDX,EDX
JNZ 0x00105f30
SUB ESP,0x4
PUSH 0x1
PUSH EAX
PUSH dword ptr [ECX]
MOV dword ptr [ESP + 0x1c],ECX
CALL 0x0010d540
ADD ESP,0x10
MOV ECX,dword ptr [ESP + 0xc]
JMP 0x00105f33
SUB EAX,0x1
SUB EDI,EAX
MOV dword ptr [ESP + 0xc],ECX
SUB ESP,0xc
MOV dword ptr [ESI],EAX
LEA EAX,[EDI + 0x1]
PUSH EAX
CALL 0x000ad700
ADD ESP,0x10
TEST EDI,EDI
MOV ECX,dword ptr [ESP + 0xc]
MOV EBP,EAX
JLE 0x00105f78
XOR EDX,EDX
LEA ESI,[ESI]
LEA ESI,[ESI]
MOV EAX,dword ptr [ECX]
ADD EAX,EDX
ADD EAX,dword ptr [ESI]
MOVZX EAX,byte ptr [EAX]
MOV byte ptr [EBP + EDX*0x1],AL
ADD EDX,0x1
CMP EDI,EDX
JNZ 0x00105f60
LEA EAX,[EBP + EDI*0x1]
MOV byte ptr [EAX],0x0
MOV EAX,dword ptr [ESI]
SUB ESP,0x8
MOV dword ptr [ESP + 0x14],ECX
ADD EDI,EAX
PUSH EDI
PUSH EAX
CALL 0x001034c0
PUSH 0x1
PUSH dword ptr [ESP + 0x44]
PUSH dword ptr [ESI]
MOV ECX,dword ptr [ESP + 0x28]
PUSH dword ptr [ECX]
CALL 0x0010d2b0
MOV ECX,dword ptr [ESP + 0x28]
ADD ESP,0x20
MOV dword ptr [ESI],EAX
MOV EDX,dword ptr [ECX]
CMP EAX,EDX
JG 0x00105ff8
TEST EAX,EAX
JNS 0x00105fb9
MOV dword ptr [ESI],0x0
SUB ESP,0xc
PUSH EBP
CALL 0x00102c80
CALL 0x000fedd0
MOV dword ptr [ESP],EBP
CALL 0x000ad7e0
ADD ESP,0x10
XOR EAX,EAX
ADD ESP,0x1c
POP EBX
POP ESI
POP EDI
POP EBP
RET
CALL 0x00102470
ADD ESP,0x1c
MOV EAX,0x1
POP EBX
POP ESI
POP EDI
POP EBP
RET
MOV dword ptr [ESI],EDX
JMP 0x00105fb9
MOV dword ptr [ESP + 0xc],ECX
CALL 0x0002e520
MOV EDI,dword ptr [ESI]
CMP EAX,0x1
JBE 0x00106020
LEA EAX,[EBX + 0x8b30]
MOV ECX,dword ptr [EAX]
TEST ECX,ECX
MOV ECX,dword ptr [ESP + 0xc]
JZ 0x00106038
LEA ECX,[EBX + 0x7afc]
SUB EDI,0x1
MOV dword ptr [ESI],EDI
MOV dword ptr [ESP + 0x30],0x1
JMP 0x00105eec
SUB ESP,0x4
PUSH 0x1
PUSH EDI
PUSH dword ptr [ECX]
MOV dword ptr [ESP + 0x1c],ECX
CALL 0x0010d540
ADD ESP,0x10
MOV ECX,dword ptr [ESP + 0xc]
MOV EDI,EAX
JMP 0x00106029
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nundefined4 rl_transpose_chars(int param_1)\n\n{\n  size_t sVar1;\n  undefined1 *puVar2;\n  undefined1 *puVar3;\n  int iVar4;\n  int iVar5;\n  \n  if (param_1 != 0) {\n    if ((rl_point == 0) || (rl_end < 2)) {\n      rl_ding();\n      return 1;\n    }\n    rl_begin_undo_group();\n    if (rl_point == rl_end) {\n      sVar1 = __ctype_get_mb_cur_max();\n      if ((sVar1 < 2) || (rl_byte_oriented != 0)) {\n        rl_point = rl_point + -1;\n      }\n      else {\n        rl_point = _rl_find_prev_mbchar(rl_line_buffer,rl_point,1);\n      }\n      param_1 = 1;\n    }\n    iVar5 = rl_point;\n    sVar1 = __ctype_get_mb_cur_max();\n    if ((sVar1 < 2) || (rl_byte_oriented != 0)) {\n      rl_point = rl_point + -1;\n    }\n    else {\n      rl_point = _rl_find_prev_mbchar(rl_line_buffer,rl_point,1);\n    }\n    iVar5 = iVar5 - rl_point;\n    puVar2 = (undefined1 *)xmalloc(iVar5 + 1);\n    puVar3 = puVar2;\n    if (0 < iVar5) {\n      iVar4 = 0;\n      do {\n        puVar2[iVar4] = *(undefined1 *)(rl_line_buffer + iVar4 + rl_point);\n        iVar4 = iVar4 + 1;\n      } while (iVar5 != iVar4);\n      puVar3 = puVar2 + iVar5;\n    }\n    *puVar3 = 0;\n    rl_delete_text(rl_point,iVar5 + rl_point);\n    rl_point = _rl_find_next_mbchar(rl_line_buffer,rl_point,param_1,1);\n    if (rl_end < rl_point) {\n      rl_point = rl_end;\n    }\n    else if (rl_point < 0) {\n      rl_point = 0;\n    }\n    rl_insert_text(puVar2);\n    rl_end_undo_group();\n    xfree(puVar2);\n  }\n  return 0;\n}\n\n" comment (function_definition "undefined4 rl_transpose_chars(int param_1)\n\n{\n  size_t sVar1;\n  undefined1 *puVar2;\n  undefined1 *puVar3;\n  int iVar4;\n  int iVar5;\n  \n  if (param_1 != 0) {\n    if ((rl_point == 0) || (rl_end < 2)) {\n      rl_ding();\n      return 1;\n    }\n    rl_begin_undo_group();\n    if (rl_point == rl_end) {\n      sVar1 = __ctype_get_mb_cur_max();\n      if ((sVar1 < 2) || (rl_byte_oriented != 0)) {\n        rl_point = rl_point + -1;\n      }\n      else {\n        rl_point = _rl_find_prev_mbchar(rl_line_buffer,rl_point,1);\n      }\n      param_1 = 1;\n    }\n    iVar5 = rl_point;\n    sVar1 = __ctype_get_mb_cur_max();\n    if ((sVar1 < 2) || (rl_byte_oriented != 0)) {\n      rl_point = rl_point + -1;\n    }\n    else {\n      rl_point = _rl_find_prev_mbchar(rl_line_buffer,rl_point,1);\n    }\n    iVar5 = iVar5 - rl_point;\n    puVar2 = (undefined1 *)xmalloc(iVar5 + 1);\n    puVar3 = puVar2;\n    if (0 < iVar5) {\n      iVar4 = 0;\n      do {\n        puVar2[iVar4] = *(undefined1 *)(rl_line_buffer + iVar4 + rl_point);\n        iVar4 = iVar4 + 1;\n      } while (iVar5 != iVar4);\n      puVar3 = puVar2 + iVar5;\n    }\n    *puVar3 = 0;\n    rl_delete_text(rl_point,iVar5 + rl_point);\n    rl_point = _rl_find_next_mbchar(rl_line_buffer,rl_point,param_1,1);\n    if (rl_end < rl_point) {\n      rl_point = rl_end;\n    }\n    else if (rl_point < 0) {\n      rl_point = 0;\n    }\n    rl_insert_text(puVar2);\n    rl_end_undo_group();\n    xfree(puVar2);\n  }\n  return 0;\n}" type_identifier (function_declarator "rl_transpose_chars(int param_1)" identifier (parameter_list "(int param_1)" ( (parameter_declaration "int param_1" primitive_type identifier) ))) (compound_statement "{\n  size_t sVar1;\n  undefined1 *puVar2;\n  undefined1 *puVar3;\n  int iVar4;\n  int iVar5;\n  \n  if (param_1 != 0) {\n    if ((rl_point == 0) || (rl_end < 2)) {\n      rl_ding();\n      return 1;\n    }\n    rl_begin_undo_group();\n    if (rl_point == rl_end) {\n      sVar1 = __ctype_get_mb_cur_max();\n      if ((sVar1 < 2) || (rl_byte_oriented != 0)) {\n        rl_point = rl_point + -1;\n      }\n      else {\n        rl_point = _rl_find_prev_mbchar(rl_line_buffer,rl_point,1);\n      }\n      param_1 = 1;\n    }\n    iVar5 = rl_point;\n    sVar1 = __ctype_get_mb_cur_max();\n    if ((sVar1 < 2) || (rl_byte_oriented != 0)) {\n      rl_point = rl_point + -1;\n    }\n    else {\n      rl_point = _rl_find_prev_mbchar(rl_line_buffer,rl_point,1);\n    }\n    iVar5 = iVar5 - rl_point;\n    puVar2 = (undefined1 *)xmalloc(iVar5 + 1);\n    puVar3 = puVar2;\n    if (0 < iVar5) {\n      iVar4 = 0;\n      do {\n        puVar2[iVar4] = *(undefined1 *)(rl_line_buffer + iVar4 + rl_point);\n        iVar4 = iVar4 + 1;\n      } while (iVar5 != iVar4);\n      puVar3 = puVar2 + iVar5;\n    }\n    *puVar3 = 0;\n    rl_delete_text(rl_point,iVar5 + rl_point);\n    rl_point = _rl_find_next_mbchar(rl_line_buffer,rl_point,param_1,1);\n    if (rl_end < rl_point) {\n      rl_point = rl_end;\n    }\n    else if (rl_point < 0) {\n      rl_point = 0;\n    }\n    rl_insert_text(puVar2);\n    rl_end_undo_group();\n    xfree(puVar2);\n  }\n  return 0;\n}" { (declaration "size_t sVar1;" primitive_type identifier ;) (declaration "undefined1 *puVar2;" type_identifier (pointer_declarator "*puVar2" * identifier) ;) (declaration "undefined1 *puVar3;" type_identifier (pointer_declarator "*puVar3" * identifier) ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "int iVar5;" primitive_type identifier ;) (if_statement "if (param_1 != 0) {\n    if ((rl_point == 0) || (rl_end < 2)) {\n      rl_ding();\n      return 1;\n    }\n    rl_begin_undo_group();\n    if (rl_point == rl_end) {\n      sVar1 = __ctype_get_mb_cur_max();\n      if ((sVar1 < 2) || (rl_byte_oriented != 0)) {\n        rl_point = rl_point + -1;\n      }\n      else {\n        rl_point = _rl_find_prev_mbchar(rl_line_buffer,rl_point,1);\n      }\n      param_1 = 1;\n    }\n    iVar5 = rl_point;\n    sVar1 = __ctype_get_mb_cur_max();\n    if ((sVar1 < 2) || (rl_byte_oriented != 0)) {\n      rl_point = rl_point + -1;\n    }\n    else {\n      rl_point = _rl_find_prev_mbchar(rl_line_buffer,rl_point,1);\n    }\n    iVar5 = iVar5 - rl_point;\n    puVar2 = (undefined1 *)xmalloc(iVar5 + 1);\n    puVar3 = puVar2;\n    if (0 < iVar5) {\n      iVar4 = 0;\n      do {\n        puVar2[iVar4] = *(undefined1 *)(rl_line_buffer + iVar4 + rl_point);\n        iVar4 = iVar4 + 1;\n      } while (iVar5 != iVar4);\n      puVar3 = puVar2 + iVar5;\n    }\n    *puVar3 = 0;\n    rl_delete_text(rl_point,iVar5 + rl_point);\n    rl_point = _rl_find_next_mbchar(rl_line_buffer,rl_point,param_1,1);\n    if (rl_end < rl_point) {\n      rl_point = rl_end;\n    }\n    else if (rl_point < 0) {\n      rl_point = 0;\n    }\n    rl_insert_text(puVar2);\n    rl_end_undo_group();\n    xfree(puVar2);\n  }" if (parenthesized_expression "(param_1 != 0)" ( (binary_expression "param_1 != 0" identifier != number_literal) )) (compound_statement "{\n    if ((rl_point == 0) || (rl_end < 2)) {\n      rl_ding();\n      return 1;\n    }\n    rl_begin_undo_group();\n    if (rl_point == rl_end) {\n      sVar1 = __ctype_get_mb_cur_max();\n      if ((sVar1 < 2) || (rl_byte_oriented != 0)) {\n        rl_point = rl_point + -1;\n      }\n      else {\n        rl_point = _rl_find_prev_mbchar(rl_line_buffer,rl_point,1);\n      }\n      param_1 = 1;\n    }\n    iVar5 = rl_point;\n    sVar1 = __ctype_get_mb_cur_max();\n    if ((sVar1 < 2) || (rl_byte_oriented != 0)) {\n      rl_point = rl_point + -1;\n    }\n    else {\n      rl_point = _rl_find_prev_mbchar(rl_line_buffer,rl_point,1);\n    }\n    iVar5 = iVar5 - rl_point;\n    puVar2 = (undefined1 *)xmalloc(iVar5 + 1);\n    puVar3 = puVar2;\n    if (0 < iVar5) {\n      iVar4 = 0;\n      do {\n        puVar2[iVar4] = *(undefined1 *)(rl_line_buffer + iVar4 + rl_point);\n        iVar4 = iVar4 + 1;\n      } while (iVar5 != iVar4);\n      puVar3 = puVar2 + iVar5;\n    }\n    *puVar3 = 0;\n    rl_delete_text(rl_point,iVar5 + rl_point);\n    rl_point = _rl_find_next_mbchar(rl_line_buffer,rl_point,param_1,1);\n    if (rl_end < rl_point) {\n      rl_point = rl_end;\n    }\n    else if (rl_point < 0) {\n      rl_point = 0;\n    }\n    rl_insert_text(puVar2);\n    rl_end_undo_group();\n    xfree(puVar2);\n  }" { (if_statement "if ((rl_point == 0) || (rl_end < 2)) {\n      rl_ding();\n      return 1;\n    }" if (parenthesized_expression "((rl_point == 0) || (rl_end < 2))" ( (binary_expression "(rl_point == 0) || (rl_end < 2)" (parenthesized_expression "(rl_point == 0)" ( (binary_expression "rl_point == 0" identifier == number_literal) )) || (parenthesized_expression "(rl_end < 2)" ( (binary_expression "rl_end < 2" identifier < number_literal) ))) )) (compound_statement "{\n      rl_ding();\n      return 1;\n    }" { (expression_statement "rl_ding();" (call_expression "rl_ding()" identifier (argument_list "()" ( ))) ;) (return_statement "return 1;" return number_literal ;) })) (expression_statement "rl_begin_undo_group();" (call_expression "rl_begin_undo_group()" identifier (argument_list "()" ( ))) ;) (if_statement "if (rl_point == rl_end) {\n      sVar1 = __ctype_get_mb_cur_max();\n      if ((sVar1 < 2) || (rl_byte_oriented != 0)) {\n        rl_point = rl_point + -1;\n      }\n      else {\n        rl_point = _rl_find_prev_mbchar(rl_line_buffer,rl_point,1);\n      }\n      param_1 = 1;\n    }" if (parenthesized_expression "(rl_point == rl_end)" ( (binary_expression "rl_point == rl_end" identifier == identifier) )) (compound_statement "{\n      sVar1 = __ctype_get_mb_cur_max();\n      if ((sVar1 < 2) || (rl_byte_oriented != 0)) {\n        rl_point = rl_point + -1;\n      }\n      else {\n        rl_point = _rl_find_prev_mbchar(rl_line_buffer,rl_point,1);\n      }\n      param_1 = 1;\n    }" { (expression_statement "sVar1 = __ctype_get_mb_cur_max();" (assignment_expression "sVar1 = __ctype_get_mb_cur_max()" identifier = (call_expression "__ctype_get_mb_cur_max()" identifier (argument_list "()" ( )))) ;) (if_statement "if ((sVar1 < 2) || (rl_byte_oriented != 0)) {\n        rl_point = rl_point + -1;\n      }\n      else {\n        rl_point = _rl_find_prev_mbchar(rl_line_buffer,rl_point,1);\n      }" if (parenthesized_expression "((sVar1 < 2) || (rl_byte_oriented != 0))" ( (binary_expression "(sVar1 < 2) || (rl_byte_oriented != 0)" (parenthesized_expression "(sVar1 < 2)" ( (binary_expression "sVar1 < 2" identifier < number_literal) )) || (parenthesized_expression "(rl_byte_oriented != 0)" ( (binary_expression "rl_byte_oriented != 0" identifier != number_literal) ))) )) (compound_statement "{\n        rl_point = rl_point + -1;\n      }" { (expression_statement "rl_point = rl_point + -1;" (assignment_expression "rl_point = rl_point + -1" identifier = (binary_expression "rl_point + -1" identifier + number_literal)) ;) }) (else_clause "else {\n        rl_point = _rl_find_prev_mbchar(rl_line_buffer,rl_point,1);\n      }" else (compound_statement "{\n        rl_point = _rl_find_prev_mbchar(rl_line_buffer,rl_point,1);\n      }" { (expression_statement "rl_point = _rl_find_prev_mbchar(rl_line_buffer,rl_point,1);" (assignment_expression "rl_point = _rl_find_prev_mbchar(rl_line_buffer,rl_point,1)" identifier = (call_expression "_rl_find_prev_mbchar(rl_line_buffer,rl_point,1)" identifier (argument_list "(rl_line_buffer,rl_point,1)" ( identifier , identifier , number_literal )))) ;) }))) (expression_statement "param_1 = 1;" (assignment_expression "param_1 = 1" identifier = number_literal) ;) })) (expression_statement "iVar5 = rl_point;" (assignment_expression "iVar5 = rl_point" identifier = identifier) ;) (expression_statement "sVar1 = __ctype_get_mb_cur_max();" (assignment_expression "sVar1 = __ctype_get_mb_cur_max()" identifier = (call_expression "__ctype_get_mb_cur_max()" identifier (argument_list "()" ( )))) ;) (if_statement "if ((sVar1 < 2) || (rl_byte_oriented != 0)) {\n      rl_point = rl_point + -1;\n    }\n    else {\n      rl_point = _rl_find_prev_mbchar(rl_line_buffer,rl_point,1);\n    }" if (parenthesized_expression "((sVar1 < 2) || (rl_byte_oriented != 0))" ( (binary_expression "(sVar1 < 2) || (rl_byte_oriented != 0)" (parenthesized_expression "(sVar1 < 2)" ( (binary_expression "sVar1 < 2" identifier < number_literal) )) || (parenthesized_expression "(rl_byte_oriented != 0)" ( (binary_expression "rl_byte_oriented != 0" identifier != number_literal) ))) )) (compound_statement "{\n      rl_point = rl_point + -1;\n    }" { (expression_statement "rl_point = rl_point + -1;" (assignment_expression "rl_point = rl_point + -1" identifier = (binary_expression "rl_point + -1" identifier + number_literal)) ;) }) (else_clause "else {\n      rl_point = _rl_find_prev_mbchar(rl_line_buffer,rl_point,1);\n    }" else (compound_statement "{\n      rl_point = _rl_find_prev_mbchar(rl_line_buffer,rl_point,1);\n    }" { (expression_statement "rl_point = _rl_find_prev_mbchar(rl_line_buffer,rl_point,1);" (assignment_expression "rl_point = _rl_find_prev_mbchar(rl_line_buffer,rl_point,1)" identifier = (call_expression "_rl_find_prev_mbchar(rl_line_buffer,rl_point,1)" identifier (argument_list "(rl_line_buffer,rl_point,1)" ( identifier , identifier , number_literal )))) ;) }))) (expression_statement "iVar5 = iVar5 - rl_point;" (assignment_expression "iVar5 = iVar5 - rl_point" identifier = (binary_expression "iVar5 - rl_point" identifier - identifier)) ;) (expression_statement "puVar2 = (undefined1 *)xmalloc(iVar5 + 1);" (assignment_expression "puVar2 = (undefined1 *)xmalloc(iVar5 + 1)" identifier = (cast_expression "(undefined1 *)xmalloc(iVar5 + 1)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "xmalloc(iVar5 + 1)" identifier (argument_list "(iVar5 + 1)" ( (binary_expression "iVar5 + 1" identifier + number_literal) ))))) ;) (expression_statement "puVar3 = puVar2;" (assignment_expression "puVar3 = puVar2" identifier = identifier) ;) (if_statement "if (0 < iVar5) {\n      iVar4 = 0;\n      do {\n        puVar2[iVar4] = *(undefined1 *)(rl_line_buffer + iVar4 + rl_point);\n        iVar4 = iVar4 + 1;\n      } while (iVar5 != iVar4);\n      puVar3 = puVar2 + iVar5;\n    }" if (parenthesized_expression "(0 < iVar5)" ( (binary_expression "0 < iVar5" number_literal < identifier) )) (compound_statement "{\n      iVar4 = 0;\n      do {\n        puVar2[iVar4] = *(undefined1 *)(rl_line_buffer + iVar4 + rl_point);\n        iVar4 = iVar4 + 1;\n      } while (iVar5 != iVar4);\n      puVar3 = puVar2 + iVar5;\n    }" { (expression_statement "iVar4 = 0;" (assignment_expression "iVar4 = 0" identifier = number_literal) ;) (do_statement "do {\n        puVar2[iVar4] = *(undefined1 *)(rl_line_buffer + iVar4 + rl_point);\n        iVar4 = iVar4 + 1;\n      } while (iVar5 != iVar4);" do (compound_statement "{\n        puVar2[iVar4] = *(undefined1 *)(rl_line_buffer + iVar4 + rl_point);\n        iVar4 = iVar4 + 1;\n      }" { (expression_statement "puVar2[iVar4] = *(undefined1 *)(rl_line_buffer + iVar4 + rl_point);" (assignment_expression "puVar2[iVar4] = *(undefined1 *)(rl_line_buffer + iVar4 + rl_point)" (subscript_expression "puVar2[iVar4]" identifier [ identifier ]) = (pointer_expression "*(undefined1 *)(rl_line_buffer + iVar4 + rl_point)" * (cast_expression "(undefined1 *)(rl_line_buffer + iVar4 + rl_point)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(rl_line_buffer + iVar4 + rl_point)" ( (binary_expression "rl_line_buffer + iVar4 + rl_point" (binary_expression "rl_line_buffer + iVar4" identifier + identifier) + identifier) ))))) ;) (expression_statement "iVar4 = iVar4 + 1;" (assignment_expression "iVar4 = iVar4 + 1" identifier = (binary_expression "iVar4 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(iVar5 != iVar4)" ( (binary_expression "iVar5 != iVar4" identifier != identifier) )) ;) (expression_statement "puVar3 = puVar2 + iVar5;" (assignment_expression "puVar3 = puVar2 + iVar5" identifier = (binary_expression "puVar2 + iVar5" identifier + identifier)) ;) })) (expression_statement "*puVar3 = 0;" (assignment_expression "*puVar3 = 0" (pointer_expression "*puVar3" * identifier) = number_literal) ;) (expression_statement "rl_delete_text(rl_point,iVar5 + rl_point);" (call_expression "rl_delete_text(rl_point,iVar5 + rl_point)" identifier (argument_list "(rl_point,iVar5 + rl_point)" ( identifier , (binary_expression "iVar5 + rl_point" identifier + identifier) ))) ;) (expression_statement "rl_point = _rl_find_next_mbchar(rl_line_buffer,rl_point,param_1,1);" (assignment_expression "rl_point = _rl_find_next_mbchar(rl_line_buffer,rl_point,param_1,1)" identifier = (call_expression "_rl_find_next_mbchar(rl_line_buffer,rl_point,param_1,1)" identifier (argument_list "(rl_line_buffer,rl_point,param_1,1)" ( identifier , identifier , identifier , number_literal )))) ;) (if_statement "if (rl_end < rl_point) {\n      rl_point = rl_end;\n    }\n    else if (rl_point < 0) {\n      rl_point = 0;\n    }" if (parenthesized_expression "(rl_end < rl_point)" ( (binary_expression "rl_end < rl_point" identifier < identifier) )) (compound_statement "{\n      rl_point = rl_end;\n    }" { (expression_statement "rl_point = rl_end;" (assignment_expression "rl_point = rl_end" identifier = identifier) ;) }) (else_clause "else if (rl_point < 0) {\n      rl_point = 0;\n    }" else (if_statement "if (rl_point < 0) {\n      rl_point = 0;\n    }" if (parenthesized_expression "(rl_point < 0)" ( (binary_expression "rl_point < 0" identifier < number_literal) )) (compound_statement "{\n      rl_point = 0;\n    }" { (expression_statement "rl_point = 0;" (assignment_expression "rl_point = 0" identifier = number_literal) ;) })))) (expression_statement "rl_insert_text(puVar2);" (call_expression "rl_insert_text(puVar2)" identifier (argument_list "(puVar2)" ( identifier ))) ;) (expression_statement "rl_end_undo_group();" (call_expression "rl_end_undo_group()" identifier (argument_list "()" ( ))) ;) (expression_statement "xfree(puVar2);" (call_expression "xfree(puVar2)" identifier (argument_list "(puVar2)" ( identifier ))) ;) })) (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 rl_transpose_chars(int count,int key)\n\n{\n  size_t sVar1;\n  char *string;\n  char *pcVar2;\n  int iVar3;\n  int iVar4;\n  \n  if (count != 0) {\n    if ((rl_point == 0) || (rl_end < 2)) {\n      rl_ding();\n      return 1;\n    }\n    rl_begin_undo_group();\n    if (rl_point == rl_end) {\n      sVar1 = __ctype_get_mb_cur_max();\n      if ((sVar1 < 2) || (rl_byte_oriented != 0)) {\n        rl_point = rl_point + -1;\n      }\n      else {\n        rl_point = _rl_find_prev_mbchar(rl_line_buffer,rl_point,1);\n      }\n      count = 1;\n    }\n    iVar4 = rl_point;\n    sVar1 = __ctype_get_mb_cur_max();\n    if ((sVar1 < 2) || (rl_byte_oriented != 0)) {\n      rl_point = rl_point + -1;\n    }\n    else {\n      rl_point = _rl_find_prev_mbchar(rl_line_buffer,rl_point,1);\n    }\n    iVar4 = iVar4 - rl_point;\n    string = (char *)xmalloc(iVar4 + 1);\n    pcVar2 = string;\n    if (0 < iVar4) {\n      iVar3 = 0;\n      do {\n        string[iVar3] = rl_line_buffer[rl_point + iVar3];\n        iVar3 = iVar3 + 1;\n      } while (iVar4 != iVar3);\n      pcVar2 = string + iVar4;\n    }\n    *pcVar2 = '\0';\n    rl_delete_text(rl_point,iVar4 + rl_point);\n    rl_point = _rl_find_next_mbchar(rl_line_buffer,rl_point,count,1);\n    if (rl_end < rl_point) {\n      rl_point = rl_end;\n    }\n    else if (rl_point < 0) {\n      rl_point = 0;\n    }\n    rl_insert_text(string);\n    rl_end_undo_group();\n    xfree(string);\n  }\n  return 0;\n}\n\n" comment (function_definition "int rl_transpose_chars(int count,int key)\n\n{\n  size_t sVar1;\n  char *string;\n  char *pcVar2;\n  int iVar3;\n  int iVar4;\n  \n  if (count != 0) {\n    if ((rl_point == 0) || (rl_end < 2)) {\n      rl_ding();\n      return 1;\n    }\n    rl_begin_undo_group();\n    if (rl_point == rl_end) {\n      sVar1 = __ctype_get_mb_cur_max();\n      if ((sVar1 < 2) || (rl_byte_oriented != 0)) {\n        rl_point = rl_point + -1;\n      }\n      else {\n        rl_point = _rl_find_prev_mbchar(rl_line_buffer,rl_point,1);\n      }\n      count = 1;\n    }\n    iVar4 = rl_point;\n    sVar1 = __ctype_get_mb_cur_max();\n    if ((sVar1 < 2) || (rl_byte_oriented != 0)) {\n      rl_point = rl_point + -1;\n    }\n    else {\n      rl_point = _rl_find_prev_mbchar(rl_line_buffer,rl_point,1);\n    }\n    iVar4 = iVar4 - rl_point;\n    string = (char *)xmalloc(iVar4 + 1);\n    pcVar2 = string;\n    if (0 < iVar4) {\n      iVar3 = 0;\n      do {\n        string[iVar3] = rl_line_buffer[rl_point + iVar3];\n        iVar3 = iVar3 + 1;\n      } while (iVar4 != iVar3);\n      pcVar2 = string + iVar4;\n    }\n    *pcVar2 = '\0';\n    rl_delete_text(rl_point,iVar4 + rl_point);\n    rl_point = _rl_find_next_mbchar(rl_line_buffer,rl_point,count,1);\n    if (rl_end < rl_point) {\n      rl_point = rl_end;\n    }\n    else if (rl_point < 0) {\n      rl_point = 0;\n    }\n    rl_insert_text(string);\n    rl_end_undo_group();\n    xfree(string);\n  }\n  return 0;\n}" primitive_type (function_declarator "rl_transpose_chars(int count,int key)" identifier (parameter_list "(int count,int key)" ( (parameter_declaration "int count" primitive_type identifier) , (parameter_declaration "int key" primitive_type identifier) ))) (compound_statement "{\n  size_t sVar1;\n  char *string;\n  char *pcVar2;\n  int iVar3;\n  int iVar4;\n  \n  if (count != 0) {\n    if ((rl_point == 0) || (rl_end < 2)) {\n      rl_ding();\n      return 1;\n    }\n    rl_begin_undo_group();\n    if (rl_point == rl_end) {\n      sVar1 = __ctype_get_mb_cur_max();\n      if ((sVar1 < 2) || (rl_byte_oriented != 0)) {\n        rl_point = rl_point + -1;\n      }\n      else {\n        rl_point = _rl_find_prev_mbchar(rl_line_buffer,rl_point,1);\n      }\n      count = 1;\n    }\n    iVar4 = rl_point;\n    sVar1 = __ctype_get_mb_cur_max();\n    if ((sVar1 < 2) || (rl_byte_oriented != 0)) {\n      rl_point = rl_point + -1;\n    }\n    else {\n      rl_point = _rl_find_prev_mbchar(rl_line_buffer,rl_point,1);\n    }\n    iVar4 = iVar4 - rl_point;\n    string = (char *)xmalloc(iVar4 + 1);\n    pcVar2 = string;\n    if (0 < iVar4) {\n      iVar3 = 0;\n      do {\n        string[iVar3] = rl_line_buffer[rl_point + iVar3];\n        iVar3 = iVar3 + 1;\n      } while (iVar4 != iVar3);\n      pcVar2 = string + iVar4;\n    }\n    *pcVar2 = '\0';\n    rl_delete_text(rl_point,iVar4 + rl_point);\n    rl_point = _rl_find_next_mbchar(rl_line_buffer,rl_point,count,1);\n    if (rl_end < rl_point) {\n      rl_point = rl_end;\n    }\n    else if (rl_point < 0) {\n      rl_point = 0;\n    }\n    rl_insert_text(string);\n    rl_end_undo_group();\n    xfree(string);\n  }\n  return 0;\n}" { (declaration "size_t sVar1;" primitive_type identifier ;) (declaration "char *string;" primitive_type (pointer_declarator "*string" * identifier) ;) (declaration "char *pcVar2;" primitive_type (pointer_declarator "*pcVar2" * identifier) ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "int iVar4;" primitive_type identifier ;) (if_statement "if (count != 0) {\n    if ((rl_point == 0) || (rl_end < 2)) {\n      rl_ding();\n      return 1;\n    }\n    rl_begin_undo_group();\n    if (rl_point == rl_end) {\n      sVar1 = __ctype_get_mb_cur_max();\n      if ((sVar1 < 2) || (rl_byte_oriented != 0)) {\n        rl_point = rl_point + -1;\n      }\n      else {\n        rl_point = _rl_find_prev_mbchar(rl_line_buffer,rl_point,1);\n      }\n      count = 1;\n    }\n    iVar4 = rl_point;\n    sVar1 = __ctype_get_mb_cur_max();\n    if ((sVar1 < 2) || (rl_byte_oriented != 0)) {\n      rl_point = rl_point + -1;\n    }\n    else {\n      rl_point = _rl_find_prev_mbchar(rl_line_buffer,rl_point,1);\n    }\n    iVar4 = iVar4 - rl_point;\n    string = (char *)xmalloc(iVar4 + 1);\n    pcVar2 = string;\n    if (0 < iVar4) {\n      iVar3 = 0;\n      do {\n        string[iVar3] = rl_line_buffer[rl_point + iVar3];\n        iVar3 = iVar3 + 1;\n      } while (iVar4 != iVar3);\n      pcVar2 = string + iVar4;\n    }\n    *pcVar2 = '\0';\n    rl_delete_text(rl_point,iVar4 + rl_point);\n    rl_point = _rl_find_next_mbchar(rl_line_buffer,rl_point,count,1);\n    if (rl_end < rl_point) {\n      rl_point = rl_end;\n    }\n    else if (rl_point < 0) {\n      rl_point = 0;\n    }\n    rl_insert_text(string);\n    rl_end_undo_group();\n    xfree(string);\n  }" if (parenthesized_expression "(count != 0)" ( (binary_expression "count != 0" identifier != number_literal) )) (compound_statement "{\n    if ((rl_point == 0) || (rl_end < 2)) {\n      rl_ding();\n      return 1;\n    }\n    rl_begin_undo_group();\n    if (rl_point == rl_end) {\n      sVar1 = __ctype_get_mb_cur_max();\n      if ((sVar1 < 2) || (rl_byte_oriented != 0)) {\n        rl_point = rl_point + -1;\n      }\n      else {\n        rl_point = _rl_find_prev_mbchar(rl_line_buffer,rl_point,1);\n      }\n      count = 1;\n    }\n    iVar4 = rl_point;\n    sVar1 = __ctype_get_mb_cur_max();\n    if ((sVar1 < 2) || (rl_byte_oriented != 0)) {\n      rl_point = rl_point + -1;\n    }\n    else {\n      rl_point = _rl_find_prev_mbchar(rl_line_buffer,rl_point,1);\n    }\n    iVar4 = iVar4 - rl_point;\n    string = (char *)xmalloc(iVar4 + 1);\n    pcVar2 = string;\n    if (0 < iVar4) {\n      iVar3 = 0;\n      do {\n        string[iVar3] = rl_line_buffer[rl_point + iVar3];\n        iVar3 = iVar3 + 1;\n      } while (iVar4 != iVar3);\n      pcVar2 = string + iVar4;\n    }\n    *pcVar2 = '\0';\n    rl_delete_text(rl_point,iVar4 + rl_point);\n    rl_point = _rl_find_next_mbchar(rl_line_buffer,rl_point,count,1);\n    if (rl_end < rl_point) {\n      rl_point = rl_end;\n    }\n    else if (rl_point < 0) {\n      rl_point = 0;\n    }\n    rl_insert_text(string);\n    rl_end_undo_group();\n    xfree(string);\n  }" { (if_statement "if ((rl_point == 0) || (rl_end < 2)) {\n      rl_ding();\n      return 1;\n    }" if (parenthesized_expression "((rl_point == 0) || (rl_end < 2))" ( (binary_expression "(rl_point == 0) || (rl_end < 2)" (parenthesized_expression "(rl_point == 0)" ( (binary_expression "rl_point == 0" identifier == number_literal) )) || (parenthesized_expression "(rl_end < 2)" ( (binary_expression "rl_end < 2" identifier < number_literal) ))) )) (compound_statement "{\n      rl_ding();\n      return 1;\n    }" { (expression_statement "rl_ding();" (call_expression "rl_ding()" identifier (argument_list "()" ( ))) ;) (return_statement "return 1;" return number_literal ;) })) (expression_statement "rl_begin_undo_group();" (call_expression "rl_begin_undo_group()" identifier (argument_list "()" ( ))) ;) (if_statement "if (rl_point == rl_end) {\n      sVar1 = __ctype_get_mb_cur_max();\n      if ((sVar1 < 2) || (rl_byte_oriented != 0)) {\n        rl_point = rl_point + -1;\n      }\n      else {\n        rl_point = _rl_find_prev_mbchar(rl_line_buffer,rl_point,1);\n      }\n      count = 1;\n    }" if (parenthesized_expression "(rl_point == rl_end)" ( (binary_expression "rl_point == rl_end" identifier == identifier) )) (compound_statement "{\n      sVar1 = __ctype_get_mb_cur_max();\n      if ((sVar1 < 2) || (rl_byte_oriented != 0)) {\n        rl_point = rl_point + -1;\n      }\n      else {\n        rl_point = _rl_find_prev_mbchar(rl_line_buffer,rl_point,1);\n      }\n      count = 1;\n    }" { (expression_statement "sVar1 = __ctype_get_mb_cur_max();" (assignment_expression "sVar1 = __ctype_get_mb_cur_max()" identifier = (call_expression "__ctype_get_mb_cur_max()" identifier (argument_list "()" ( )))) ;) (if_statement "if ((sVar1 < 2) || (rl_byte_oriented != 0)) {\n        rl_point = rl_point + -1;\n      }\n      else {\n        rl_point = _rl_find_prev_mbchar(rl_line_buffer,rl_point,1);\n      }" if (parenthesized_expression "((sVar1 < 2) || (rl_byte_oriented != 0))" ( (binary_expression "(sVar1 < 2) || (rl_byte_oriented != 0)" (parenthesized_expression "(sVar1 < 2)" ( (binary_expression "sVar1 < 2" identifier < number_literal) )) || (parenthesized_expression "(rl_byte_oriented != 0)" ( (binary_expression "rl_byte_oriented != 0" identifier != number_literal) ))) )) (compound_statement "{\n        rl_point = rl_point + -1;\n      }" { (expression_statement "rl_point = rl_point + -1;" (assignment_expression "rl_point = rl_point + -1" identifier = (binary_expression "rl_point + -1" identifier + number_literal)) ;) }) (else_clause "else {\n        rl_point = _rl_find_prev_mbchar(rl_line_buffer,rl_point,1);\n      }" else (compound_statement "{\n        rl_point = _rl_find_prev_mbchar(rl_line_buffer,rl_point,1);\n      }" { (expression_statement "rl_point = _rl_find_prev_mbchar(rl_line_buffer,rl_point,1);" (assignment_expression "rl_point = _rl_find_prev_mbchar(rl_line_buffer,rl_point,1)" identifier = (call_expression "_rl_find_prev_mbchar(rl_line_buffer,rl_point,1)" identifier (argument_list "(rl_line_buffer,rl_point,1)" ( identifier , identifier , number_literal )))) ;) }))) (expression_statement "count = 1;" (assignment_expression "count = 1" identifier = number_literal) ;) })) (expression_statement "iVar4 = rl_point;" (assignment_expression "iVar4 = rl_point" identifier = identifier) ;) (expression_statement "sVar1 = __ctype_get_mb_cur_max();" (assignment_expression "sVar1 = __ctype_get_mb_cur_max()" identifier = (call_expression "__ctype_get_mb_cur_max()" identifier (argument_list "()" ( )))) ;) (if_statement "if ((sVar1 < 2) || (rl_byte_oriented != 0)) {\n      rl_point = rl_point + -1;\n    }\n    else {\n      rl_point = _rl_find_prev_mbchar(rl_line_buffer,rl_point,1);\n    }" if (parenthesized_expression "((sVar1 < 2) || (rl_byte_oriented != 0))" ( (binary_expression "(sVar1 < 2) || (rl_byte_oriented != 0)" (parenthesized_expression "(sVar1 < 2)" ( (binary_expression "sVar1 < 2" identifier < number_literal) )) || (parenthesized_expression "(rl_byte_oriented != 0)" ( (binary_expression "rl_byte_oriented != 0" identifier != number_literal) ))) )) (compound_statement "{\n      rl_point = rl_point + -1;\n    }" { (expression_statement "rl_point = rl_point + -1;" (assignment_expression "rl_point = rl_point + -1" identifier = (binary_expression "rl_point + -1" identifier + number_literal)) ;) }) (else_clause "else {\n      rl_point = _rl_find_prev_mbchar(rl_line_buffer,rl_point,1);\n    }" else (compound_statement "{\n      rl_point = _rl_find_prev_mbchar(rl_line_buffer,rl_point,1);\n    }" { (expression_statement "rl_point = _rl_find_prev_mbchar(rl_line_buffer,rl_point,1);" (assignment_expression "rl_point = _rl_find_prev_mbchar(rl_line_buffer,rl_point,1)" identifier = (call_expression "_rl_find_prev_mbchar(rl_line_buffer,rl_point,1)" identifier (argument_list "(rl_line_buffer,rl_point,1)" ( identifier , identifier , number_literal )))) ;) }))) (expression_statement "iVar4 = iVar4 - rl_point;" (assignment_expression "iVar4 = iVar4 - rl_point" identifier = (binary_expression "iVar4 - rl_point" identifier - identifier)) ;) (expression_statement "string = (char *)xmalloc(iVar4 + 1);" (assignment_expression "string = (char *)xmalloc(iVar4 + 1)" identifier = (cast_expression "(char *)xmalloc(iVar4 + 1)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "xmalloc(iVar4 + 1)" identifier (argument_list "(iVar4 + 1)" ( (binary_expression "iVar4 + 1" identifier + number_literal) ))))) ;) (expression_statement "pcVar2 = string;" (assignment_expression "pcVar2 = string" identifier = identifier) ;) (if_statement "if (0 < iVar4) {\n      iVar3 = 0;\n      do {\n        string[iVar3] = rl_line_buffer[rl_point + iVar3];\n        iVar3 = iVar3 + 1;\n      } while (iVar4 != iVar3);\n      pcVar2 = string + iVar4;\n    }" if (parenthesized_expression "(0 < iVar4)" ( (binary_expression "0 < iVar4" number_literal < identifier) )) (compound_statement "{\n      iVar3 = 0;\n      do {\n        string[iVar3] = rl_line_buffer[rl_point + iVar3];\n        iVar3 = iVar3 + 1;\n      } while (iVar4 != iVar3);\n      pcVar2 = string + iVar4;\n    }" { (expression_statement "iVar3 = 0;" (assignment_expression "iVar3 = 0" identifier = number_literal) ;) (do_statement "do {\n        string[iVar3] = rl_line_buffer[rl_point + iVar3];\n        iVar3 = iVar3 + 1;\n      } while (iVar4 != iVar3);" do (compound_statement "{\n        string[iVar3] = rl_line_buffer[rl_point + iVar3];\n        iVar3 = iVar3 + 1;\n      }" { (expression_statement "string[iVar3] = rl_line_buffer[rl_point + iVar3];" (assignment_expression "string[iVar3] = rl_line_buffer[rl_point + iVar3]" (subscript_expression "string[iVar3]" identifier [ identifier ]) = (subscript_expression "rl_line_buffer[rl_point + iVar3]" identifier [ (binary_expression "rl_point + iVar3" identifier + identifier) ])) ;) (expression_statement "iVar3 = iVar3 + 1;" (assignment_expression "iVar3 = iVar3 + 1" identifier = (binary_expression "iVar3 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(iVar4 != iVar3)" ( (binary_expression "iVar4 != iVar3" identifier != identifier) )) ;) (expression_statement "pcVar2 = string + iVar4;" (assignment_expression "pcVar2 = string + iVar4" identifier = (binary_expression "string + iVar4" identifier + identifier)) ;) })) (expression_statement "*pcVar2 = '\0';" (assignment_expression "*pcVar2 = '\0'" (pointer_expression "*pcVar2" * identifier) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "rl_delete_text(rl_point,iVar4 + rl_point);" (call_expression "rl_delete_text(rl_point,iVar4 + rl_point)" identifier (argument_list "(rl_point,iVar4 + rl_point)" ( identifier , (binary_expression "iVar4 + rl_point" identifier + identifier) ))) ;) (expression_statement "rl_point = _rl_find_next_mbchar(rl_line_buffer,rl_point,count,1);" (assignment_expression "rl_point = _rl_find_next_mbchar(rl_line_buffer,rl_point,count,1)" identifier = (call_expression "_rl_find_next_mbchar(rl_line_buffer,rl_point,count,1)" identifier (argument_list "(rl_line_buffer,rl_point,count,1)" ( identifier , identifier , identifier , number_literal )))) ;) (if_statement "if (rl_end < rl_point) {\n      rl_point = rl_end;\n    }\n    else if (rl_point < 0) {\n      rl_point = 0;\n    }" if (parenthesized_expression "(rl_end < rl_point)" ( (binary_expression "rl_end < rl_point" identifier < identifier) )) (compound_statement "{\n      rl_point = rl_end;\n    }" { (expression_statement "rl_point = rl_end;" (assignment_expression "rl_point = rl_end" identifier = identifier) ;) }) (else_clause "else if (rl_point < 0) {\n      rl_point = 0;\n    }" else (if_statement "if (rl_point < 0) {\n      rl_point = 0;\n    }" if (parenthesized_expression "(rl_point < 0)" ( (binary_expression "rl_point < 0" identifier < number_literal) )) (compound_statement "{\n      rl_point = 0;\n    }" { (expression_statement "rl_point = 0;" (assignment_expression "rl_point = 0" identifier = number_literal) ;) })))) (expression_statement "rl_insert_text(string);" (call_expression "rl_insert_text(string)" identifier (argument_list "(string)" ( identifier ))) ;) (expression_statement "rl_end_undo_group();" (call_expression "rl_end_undo_group()" identifier (argument_list "()" ( ))) ;) (expression_statement "xfree(string);" (call_expression "xfree(string)" identifier (argument_list "(string)" ( identifier ))) ;) })) (return_statement "return 0;" return number_literal ;) })))
(translation_unit "undefined4 rl_transpose_chars(int param_1)\n\n{\n  size_t sVar1;\n  undefined1 *puVar2;\n  undefined1 *puVar3;\n  int iVar4;\n  int iVar5;\n  \n  if (param_1 != 0) {\n    if ((rl_point == 0) || (rl_end < 2)) {\n      rl_ding();\n      return 1;\n    }\n    rl_begin_undo_group();\n    if (rl_point == rl_end) {\n      sVar1 = __ctype_get_mb_cur_max();\n      if ((sVar1 < 2) || (rl_byte_oriented != 0)) {\n        rl_point = rl_point + -1;\n      }\n      else {\n        rl_point = _rl_find_prev_mbchar(rl_line_buffer,rl_point,1);\n      }\n      param_1 = 1;\n    }\n    iVar5 = rl_point;\n    sVar1 = __ctype_get_mb_cur_max();\n    if ((sVar1 < 2) || (rl_byte_oriented != 0)) {\n      rl_point = rl_point + -1;\n    }\n    else {\n      rl_point = _rl_find_prev_mbchar(rl_line_buffer,rl_point,1);\n    }\n    iVar5 = iVar5 - rl_point;\n    puVar2 = (undefined1 *)xmalloc(iVar5 + 1);\n    puVar3 = puVar2;\n    if (0 < iVar5) {\n      iVar4 = 0;\n      do {\n        puVar2[iVar4] = *(undefined1 *)(rl_line_buffer + iVar4 + rl_point);\n        iVar4 = iVar4 + 1;\n      } while (iVar5 != iVar4);\n      puVar3 = puVar2 + iVar5;\n    }\n    *puVar3 = 0;\n    rl_delete_text(rl_point,iVar5 + rl_point);\n    rl_point = _rl_find_next_mbchar(rl_line_buffer,rl_point,param_1,1);\n    if (rl_end < rl_point) {\n      rl_point = rl_end;\n    }\n    else if (rl_point < 0) {\n      rl_point = 0;\n    }\n    rl_insert_text(puVar2);\n    rl_end_undo_group();\n    xfree(puVar2);\n  }\n  return 0;\n}\n\n" (function_definition "undefined4 rl_transpose_chars(int param_1)\n\n{\n  size_t sVar1;\n  undefined1 *puVar2;\n  undefined1 *puVar3;\n  int iVar4;\n  int iVar5;\n  \n  if (param_1 != 0) {\n    if ((rl_point == 0) || (rl_end < 2)) {\n      rl_ding();\n      return 1;\n    }\n    rl_begin_undo_group();\n    if (rl_point == rl_end) {\n      sVar1 = __ctype_get_mb_cur_max();\n      if ((sVar1 < 2) || (rl_byte_oriented != 0)) {\n        rl_point = rl_point + -1;\n      }\n      else {\n        rl_point = _rl_find_prev_mbchar(rl_line_buffer,rl_point,1);\n      }\n      param_1 = 1;\n    }\n    iVar5 = rl_point;\n    sVar1 = __ctype_get_mb_cur_max();\n    if ((sVar1 < 2) || (rl_byte_oriented != 0)) {\n      rl_point = rl_point + -1;\n    }\n    else {\n      rl_point = _rl_find_prev_mbchar(rl_line_buffer,rl_point,1);\n    }\n    iVar5 = iVar5 - rl_point;\n    puVar2 = (undefined1 *)xmalloc(iVar5 + 1);\n    puVar3 = puVar2;\n    if (0 < iVar5) {\n      iVar4 = 0;\n      do {\n        puVar2[iVar4] = *(undefined1 *)(rl_line_buffer + iVar4 + rl_point);\n        iVar4 = iVar4 + 1;\n      } while (iVar5 != iVar4);\n      puVar3 = puVar2 + iVar5;\n    }\n    *puVar3 = 0;\n    rl_delete_text(rl_point,iVar5 + rl_point);\n    rl_point = _rl_find_next_mbchar(rl_line_buffer,rl_point,param_1,1);\n    if (rl_end < rl_point) {\n      rl_point = rl_end;\n    }\n    else if (rl_point < 0) {\n      rl_point = 0;\n    }\n    rl_insert_text(puVar2);\n    rl_end_undo_group();\n    xfree(puVar2);\n  }\n  return 0;\n}" type_identifier (function_declarator "rl_transpose_chars(int param_1)" identifier (parameter_list "(int param_1)" ( (parameter_declaration "int param_1" primitive_type identifier) ))) (compound_statement "{\n  size_t sVar1;\n  undefined1 *puVar2;\n  undefined1 *puVar3;\n  int iVar4;\n  int iVar5;\n  \n  if (param_1 != 0) {\n    if ((rl_point == 0) || (rl_end < 2)) {\n      rl_ding();\n      return 1;\n    }\n    rl_begin_undo_group();\n    if (rl_point == rl_end) {\n      sVar1 = __ctype_get_mb_cur_max();\n      if ((sVar1 < 2) || (rl_byte_oriented != 0)) {\n        rl_point = rl_point + -1;\n      }\n      else {\n        rl_point = _rl_find_prev_mbchar(rl_line_buffer,rl_point,1);\n      }\n      param_1 = 1;\n    }\n    iVar5 = rl_point;\n    sVar1 = __ctype_get_mb_cur_max();\n    if ((sVar1 < 2) || (rl_byte_oriented != 0)) {\n      rl_point = rl_point + -1;\n    }\n    else {\n      rl_point = _rl_find_prev_mbchar(rl_line_buffer,rl_point,1);\n    }\n    iVar5 = iVar5 - rl_point;\n    puVar2 = (undefined1 *)xmalloc(iVar5 + 1);\n    puVar3 = puVar2;\n    if (0 < iVar5) {\n      iVar4 = 0;\n      do {\n        puVar2[iVar4] = *(undefined1 *)(rl_line_buffer + iVar4 + rl_point);\n        iVar4 = iVar4 + 1;\n      } while (iVar5 != iVar4);\n      puVar3 = puVar2 + iVar5;\n    }\n    *puVar3 = 0;\n    rl_delete_text(rl_point,iVar5 + rl_point);\n    rl_point = _rl_find_next_mbchar(rl_line_buffer,rl_point,param_1,1);\n    if (rl_end < rl_point) {\n      rl_point = rl_end;\n    }\n    else if (rl_point < 0) {\n      rl_point = 0;\n    }\n    rl_insert_text(puVar2);\n    rl_end_undo_group();\n    xfree(puVar2);\n  }\n  return 0;\n}" { (declaration "size_t sVar1;" primitive_type identifier ;) (declaration "undefined1 *puVar2;" type_identifier (pointer_declarator "*puVar2" * identifier) ;) (declaration "undefined1 *puVar3;" type_identifier (pointer_declarator "*puVar3" * identifier) ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "int iVar5;" primitive_type identifier ;) (if_statement "if (param_1 != 0) {\n    if ((rl_point == 0) || (rl_end < 2)) {\n      rl_ding();\n      return 1;\n    }\n    rl_begin_undo_group();\n    if (rl_point == rl_end) {\n      sVar1 = __ctype_get_mb_cur_max();\n      if ((sVar1 < 2) || (rl_byte_oriented != 0)) {\n        rl_point = rl_point + -1;\n      }\n      else {\n        rl_point = _rl_find_prev_mbchar(rl_line_buffer,rl_point,1);\n      }\n      param_1 = 1;\n    }\n    iVar5 = rl_point;\n    sVar1 = __ctype_get_mb_cur_max();\n    if ((sVar1 < 2) || (rl_byte_oriented != 0)) {\n      rl_point = rl_point + -1;\n    }\n    else {\n      rl_point = _rl_find_prev_mbchar(rl_line_buffer,rl_point,1);\n    }\n    iVar5 = iVar5 - rl_point;\n    puVar2 = (undefined1 *)xmalloc(iVar5 + 1);\n    puVar3 = puVar2;\n    if (0 < iVar5) {\n      iVar4 = 0;\n      do {\n        puVar2[iVar4] = *(undefined1 *)(rl_line_buffer + iVar4 + rl_point);\n        iVar4 = iVar4 + 1;\n      } while (iVar5 != iVar4);\n      puVar3 = puVar2 + iVar5;\n    }\n    *puVar3 = 0;\n    rl_delete_text(rl_point,iVar5 + rl_point);\n    rl_point = _rl_find_next_mbchar(rl_line_buffer,rl_point,param_1,1);\n    if (rl_end < rl_point) {\n      rl_point = rl_end;\n    }\n    else if (rl_point < 0) {\n      rl_point = 0;\n    }\n    rl_insert_text(puVar2);\n    rl_end_undo_group();\n    xfree(puVar2);\n  }" if (parenthesized_expression "(param_1 != 0)" ( (binary_expression "param_1 != 0" identifier != number_literal) )) (compound_statement "{\n    if ((rl_point == 0) || (rl_end < 2)) {\n      rl_ding();\n      return 1;\n    }\n    rl_begin_undo_group();\n    if (rl_point == rl_end) {\n      sVar1 = __ctype_get_mb_cur_max();\n      if ((sVar1 < 2) || (rl_byte_oriented != 0)) {\n        rl_point = rl_point + -1;\n      }\n      else {\n        rl_point = _rl_find_prev_mbchar(rl_line_buffer,rl_point,1);\n      }\n      param_1 = 1;\n    }\n    iVar5 = rl_point;\n    sVar1 = __ctype_get_mb_cur_max();\n    if ((sVar1 < 2) || (rl_byte_oriented != 0)) {\n      rl_point = rl_point + -1;\n    }\n    else {\n      rl_point = _rl_find_prev_mbchar(rl_line_buffer,rl_point,1);\n    }\n    iVar5 = iVar5 - rl_point;\n    puVar2 = (undefined1 *)xmalloc(iVar5 + 1);\n    puVar3 = puVar2;\n    if (0 < iVar5) {\n      iVar4 = 0;\n      do {\n        puVar2[iVar4] = *(undefined1 *)(rl_line_buffer + iVar4 + rl_point);\n        iVar4 = iVar4 + 1;\n      } while (iVar5 != iVar4);\n      puVar3 = puVar2 + iVar5;\n    }\n    *puVar3 = 0;\n    rl_delete_text(rl_point,iVar5 + rl_point);\n    rl_point = _rl_find_next_mbchar(rl_line_buffer,rl_point,param_1,1);\n    if (rl_end < rl_point) {\n      rl_point = rl_end;\n    }\n    else if (rl_point < 0) {\n      rl_point = 0;\n    }\n    rl_insert_text(puVar2);\n    rl_end_undo_group();\n    xfree(puVar2);\n  }" { (if_statement "if ((rl_point == 0) || (rl_end < 2)) {\n      rl_ding();\n      return 1;\n    }" if (parenthesized_expression "((rl_point == 0) || (rl_end < 2))" ( (binary_expression "(rl_point == 0) || (rl_end < 2)" (parenthesized_expression "(rl_point == 0)" ( (binary_expression "rl_point == 0" identifier == number_literal) )) || (parenthesized_expression "(rl_end < 2)" ( (binary_expression "rl_end < 2" identifier < number_literal) ))) )) (compound_statement "{\n      rl_ding();\n      return 1;\n    }" { (expression_statement "rl_ding();" (call_expression "rl_ding()" identifier (argument_list "()" ( ))) ;) (return_statement "return 1;" return number_literal ;) })) (expression_statement "rl_begin_undo_group();" (call_expression "rl_begin_undo_group()" identifier (argument_list "()" ( ))) ;) (if_statement "if (rl_point == rl_end) {\n      sVar1 = __ctype_get_mb_cur_max();\n      if ((sVar1 < 2) || (rl_byte_oriented != 0)) {\n        rl_point = rl_point + -1;\n      }\n      else {\n        rl_point = _rl_find_prev_mbchar(rl_line_buffer,rl_point,1);\n      }\n      param_1 = 1;\n    }" if (parenthesized_expression "(rl_point == rl_end)" ( (binary_expression "rl_point == rl_end" identifier == identifier) )) (compound_statement "{\n      sVar1 = __ctype_get_mb_cur_max();\n      if ((sVar1 < 2) || (rl_byte_oriented != 0)) {\n        rl_point = rl_point + -1;\n      }\n      else {\n        rl_point = _rl_find_prev_mbchar(rl_line_buffer,rl_point,1);\n      }\n      param_1 = 1;\n    }" { (expression_statement "sVar1 = __ctype_get_mb_cur_max();" (assignment_expression "sVar1 = __ctype_get_mb_cur_max()" identifier = (call_expression "__ctype_get_mb_cur_max()" identifier (argument_list "()" ( )))) ;) (if_statement "if ((sVar1 < 2) || (rl_byte_oriented != 0)) {\n        rl_point = rl_point + -1;\n      }\n      else {\n        rl_point = _rl_find_prev_mbchar(rl_line_buffer,rl_point,1);\n      }" if (parenthesized_expression "((sVar1 < 2) || (rl_byte_oriented != 0))" ( (binary_expression "(sVar1 < 2) || (rl_byte_oriented != 0)" (parenthesized_expression "(sVar1 < 2)" ( (binary_expression "sVar1 < 2" identifier < number_literal) )) || (parenthesized_expression "(rl_byte_oriented != 0)" ( (binary_expression "rl_byte_oriented != 0" identifier != number_literal) ))) )) (compound_statement "{\n        rl_point = rl_point + -1;\n      }" { (expression_statement "rl_point = rl_point + -1;" (assignment_expression "rl_point = rl_point + -1" identifier = (binary_expression "rl_point + -1" identifier + number_literal)) ;) }) (else_clause "else {\n        rl_point = _rl_find_prev_mbchar(rl_line_buffer,rl_point,1);\n      }" else (compound_statement "{\n        rl_point = _rl_find_prev_mbchar(rl_line_buffer,rl_point,1);\n      }" { (expression_statement "rl_point = _rl_find_prev_mbchar(rl_line_buffer,rl_point,1);" (assignment_expression "rl_point = _rl_find_prev_mbchar(rl_line_buffer,rl_point,1)" identifier = (call_expression "_rl_find_prev_mbchar(rl_line_buffer,rl_point,1)" identifier (argument_list "(rl_line_buffer,rl_point,1)" ( identifier , identifier , number_literal )))) ;) }))) (expression_statement "param_1 = 1;" (assignment_expression "param_1 = 1" identifier = number_literal) ;) })) (expression_statement "iVar5 = rl_point;" (assignment_expression "iVar5 = rl_point" identifier = identifier) ;) (expression_statement "sVar1 = __ctype_get_mb_cur_max();" (assignment_expression "sVar1 = __ctype_get_mb_cur_max()" identifier = (call_expression "__ctype_get_mb_cur_max()" identifier (argument_list "()" ( )))) ;) (if_statement "if ((sVar1 < 2) || (rl_byte_oriented != 0)) {\n      rl_point = rl_point + -1;\n    }\n    else {\n      rl_point = _rl_find_prev_mbchar(rl_line_buffer,rl_point,1);\n    }" if (parenthesized_expression "((sVar1 < 2) || (rl_byte_oriented != 0))" ( (binary_expression "(sVar1 < 2) || (rl_byte_oriented != 0)" (parenthesized_expression "(sVar1 < 2)" ( (binary_expression "sVar1 < 2" identifier < number_literal) )) || (parenthesized_expression "(rl_byte_oriented != 0)" ( (binary_expression "rl_byte_oriented != 0" identifier != number_literal) ))) )) (compound_statement "{\n      rl_point = rl_point + -1;\n    }" { (expression_statement "rl_point = rl_point + -1;" (assignment_expression "rl_point = rl_point + -1" identifier = (binary_expression "rl_point + -1" identifier + number_literal)) ;) }) (else_clause "else {\n      rl_point = _rl_find_prev_mbchar(rl_line_buffer,rl_point,1);\n    }" else (compound_statement "{\n      rl_point = _rl_find_prev_mbchar(rl_line_buffer,rl_point,1);\n    }" { (expression_statement "rl_point = _rl_find_prev_mbchar(rl_line_buffer,rl_point,1);" (assignment_expression "rl_point = _rl_find_prev_mbchar(rl_line_buffer,rl_point,1)" identifier = (call_expression "_rl_find_prev_mbchar(rl_line_buffer,rl_point,1)" identifier (argument_list "(rl_line_buffer,rl_point,1)" ( identifier , identifier , number_literal )))) ;) }))) (expression_statement "iVar5 = iVar5 - rl_point;" (assignment_expression "iVar5 = iVar5 - rl_point" identifier = (binary_expression "iVar5 - rl_point" identifier - identifier)) ;) (expression_statement "puVar2 = (undefined1 *)xmalloc(iVar5 + 1);" (assignment_expression "puVar2 = (undefined1 *)xmalloc(iVar5 + 1)" identifier = (cast_expression "(undefined1 *)xmalloc(iVar5 + 1)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "xmalloc(iVar5 + 1)" identifier (argument_list "(iVar5 + 1)" ( (binary_expression "iVar5 + 1" identifier + number_literal) ))))) ;) (expression_statement "puVar3 = puVar2;" (assignment_expression "puVar3 = puVar2" identifier = identifier) ;) (if_statement "if (0 < iVar5) {\n      iVar4 = 0;\n      do {\n        puVar2[iVar4] = *(undefined1 *)(rl_line_buffer + iVar4 + rl_point);\n        iVar4 = iVar4 + 1;\n      } while (iVar5 != iVar4);\n      puVar3 = puVar2 + iVar5;\n    }" if (parenthesized_expression "(0 < iVar5)" ( (binary_expression "0 < iVar5" number_literal < identifier) )) (compound_statement "{\n      iVar4 = 0;\n      do {\n        puVar2[iVar4] = *(undefined1 *)(rl_line_buffer + iVar4 + rl_point);\n        iVar4 = iVar4 + 1;\n      } while (iVar5 != iVar4);\n      puVar3 = puVar2 + iVar5;\n    }" { (expression_statement "iVar4 = 0;" (assignment_expression "iVar4 = 0" identifier = number_literal) ;) (do_statement "do {\n        puVar2[iVar4] = *(undefined1 *)(rl_line_buffer + iVar4 + rl_point);\n        iVar4 = iVar4 + 1;\n      } while (iVar5 != iVar4);" do (compound_statement "{\n        puVar2[iVar4] = *(undefined1 *)(rl_line_buffer + iVar4 + rl_point);\n        iVar4 = iVar4 + 1;\n      }" { (expression_statement "puVar2[iVar4] = *(undefined1 *)(rl_line_buffer + iVar4 + rl_point);" (assignment_expression "puVar2[iVar4] = *(undefined1 *)(rl_line_buffer + iVar4 + rl_point)" (subscript_expression "puVar2[iVar4]" identifier [ identifier ]) = (pointer_expression "*(undefined1 *)(rl_line_buffer + iVar4 + rl_point)" * (cast_expression "(undefined1 *)(rl_line_buffer + iVar4 + rl_point)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(rl_line_buffer + iVar4 + rl_point)" ( (binary_expression "rl_line_buffer + iVar4 + rl_point" (binary_expression "rl_line_buffer + iVar4" identifier + identifier) + identifier) ))))) ;) (expression_statement "iVar4 = iVar4 + 1;" (assignment_expression "iVar4 = iVar4 + 1" identifier = (binary_expression "iVar4 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(iVar5 != iVar4)" ( (binary_expression "iVar5 != iVar4" identifier != identifier) )) ;) (expression_statement "puVar3 = puVar2 + iVar5;" (assignment_expression "puVar3 = puVar2 + iVar5" identifier = (binary_expression "puVar2 + iVar5" identifier + identifier)) ;) })) (expression_statement "*puVar3 = 0;" (assignment_expression "*puVar3 = 0" (pointer_expression "*puVar3" * identifier) = number_literal) ;) (expression_statement "rl_delete_text(rl_point,iVar5 + rl_point);" (call_expression "rl_delete_text(rl_point,iVar5 + rl_point)" identifier (argument_list "(rl_point,iVar5 + rl_point)" ( identifier , (binary_expression "iVar5 + rl_point" identifier + identifier) ))) ;) (expression_statement "rl_point = _rl_find_next_mbchar(rl_line_buffer,rl_point,param_1,1);" (assignment_expression "rl_point = _rl_find_next_mbchar(rl_line_buffer,rl_point,param_1,1)" identifier = (call_expression "_rl_find_next_mbchar(rl_line_buffer,rl_point,param_1,1)" identifier (argument_list "(rl_line_buffer,rl_point,param_1,1)" ( identifier , identifier , identifier , number_literal )))) ;) (if_statement "if (rl_end < rl_point) {\n      rl_point = rl_end;\n    }\n    else if (rl_point < 0) {\n      rl_point = 0;\n    }" if (parenthesized_expression "(rl_end < rl_point)" ( (binary_expression "rl_end < rl_point" identifier < identifier) )) (compound_statement "{\n      rl_point = rl_end;\n    }" { (expression_statement "rl_point = rl_end;" (assignment_expression "rl_point = rl_end" identifier = identifier) ;) }) (else_clause "else if (rl_point < 0) {\n      rl_point = 0;\n    }" else (if_statement "if (rl_point < 0) {\n      rl_point = 0;\n    }" if (parenthesized_expression "(rl_point < 0)" ( (binary_expression "rl_point < 0" identifier < number_literal) )) (compound_statement "{\n      rl_point = 0;\n    }" { (expression_statement "rl_point = 0;" (assignment_expression "rl_point = 0" identifier = number_literal) ;) })))) (expression_statement "rl_insert_text(puVar2);" (call_expression "rl_insert_text(puVar2)" identifier (argument_list "(puVar2)" ( identifier ))) ;) (expression_statement "rl_end_undo_group();" (call_expression "rl_end_undo_group()" identifier (argument_list "()" ( ))) ;) (expression_statement "xfree(puVar2);" (call_expression "xfree(puVar2)" identifier (argument_list "(puVar2)" ( identifier ))) ;) })) (return_statement "return 0;" return number_literal ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT == LIT) )) || (parenthesized_expression ( (binary_expression IDENT < LIT) ))) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( ))) ;) (return_statement return LIT ;) })) (expression_statement (call_expression IDENT (argument_list ( ))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT < LIT) )) || (parenthesized_expression ( (binary_expression IDENT != LIT) ))) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT , LIT )))) ;) }))) (expression_statement (assignment_expression IDENT = LIT) ;) })) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT < LIT) )) || (parenthesized_expression ( (binary_expression IDENT != LIT) ))) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT , LIT )))) ;) }))) (expression_statement (assignment_expression IDENT = (binary_expression IDENT - 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 = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression LIT < IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (do_statement do (compound_statement { (expression_statement (assignment_expression (subscript_expression IDENT [ IDENT ]) = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (binary_expression IDENT + IDENT) + IDENT) ))))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) }) while (parenthesized_expression ( (binary_expression IDENT != IDENT) )) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + IDENT)) ;) })) (expression_statement (assignment_expression (pointer_expression * IDENT) = LIT) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , (binary_expression IDENT + IDENT) ))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT , IDENT , LIT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = IDENT) ;) }) (else_clause else (if_statement if (parenthesized_expression ( (binary_expression IDENT < LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) })))) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (expression_statement (call_expression IDENT (argument_list ( ))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) })) (return_statement return LIT ;) })))
(function_definition "undefined4 rl_transpose_chars(int param_1)\n\n{\n  size_t sVar1;\n  undefined1 *puVar2;\n  undefined1 *puVar3;\n  int iVar4;\n  int iVar5;\n  \n  if (param_1 != 0) {\n    if ((rl_point == 0) || (rl_end < 2)) {\n      rl_ding();\n      return 1;\n    }\n    rl_begin_undo_group();\n    if (rl_point == rl_end) {\n      sVar1 = __ctype_get_mb_cur_max();\n      if ((sVar1 < 2) || (rl_byte_oriented != 0)) {\n        rl_point = rl_point + -1;\n      }\n      else {\n        rl_point = _rl_find_prev_mbchar(rl_line_buffer,rl_point,1);\n      }\n      param_1 = 1;\n    }\n    iVar5 = rl_point;\n    sVar1 = __ctype_get_mb_cur_max();\n    if ((sVar1 < 2) || (rl_byte_oriented != 0)) {\n      rl_point = rl_point + -1;\n    }\n    else {\n      rl_point = _rl_find_prev_mbchar(rl_line_buffer,rl_point,1);\n    }\n    iVar5 = iVar5 - rl_point;\n    puVar2 = (undefined1 *)xmalloc(iVar5 + 1);\n    puVar3 = puVar2;\n    if (0 < iVar5) {\n      iVar4 = 0;\n      do {\n        puVar2[iVar4] = *(undefined1 *)(rl_line_buffer + iVar4 + rl_point);\n        iVar4 = iVar4 + 1;\n      } while (iVar5 != iVar4);\n      puVar3 = puVar2 + iVar5;\n    }\n    *puVar3 = 0;\n    rl_delete_text(rl_point,iVar5 + rl_point);\n    rl_point = _rl_find_next_mbchar(rl_line_buffer,rl_point,param_1,1);\n    if (rl_end < rl_point) {\n      rl_point = rl_end;\n    }\n    else if (rl_point < 0) {\n      rl_point = 0;\n    }\n    rl_insert_text(puVar2);\n    rl_end_undo_group();\n    xfree(puVar2);\n  }\n  return 0;\n}" (type_identifier "undefined4") (function_declarator "rl_transpose_chars(int param_1)" (identifier "rl_transpose_chars") (parameter_list "(int param_1)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) () ")"))) (compound_statement "{\n  size_t sVar1;\n  undefined1 *puVar2;\n  undefined1 *puVar3;\n  int iVar4;\n  int iVar5;\n  \n  if (param_1 != 0) {\n    if ((rl_point == 0) || (rl_end < 2)) {\n      rl_ding();\n      return 1;\n    }\n    rl_begin_undo_group();\n    if (rl_point == rl_end) {\n      sVar1 = __ctype_get_mb_cur_max();\n      if ((sVar1 < 2) || (rl_byte_oriented != 0)) {\n        rl_point = rl_point + -1;\n      }\n      else {\n        rl_point = _rl_find_prev_mbchar(rl_line_buffer,rl_point,1);\n      }\n      param_1 = 1;\n    }\n    iVar5 = rl_point;\n    sVar1 = __ctype_get_mb_cur_max();\n    if ((sVar1 < 2) || (rl_byte_oriented != 0)) {\n      rl_point = rl_point + -1;\n    }\n    else {\n      rl_point = _rl_find_prev_mbchar(rl_line_buffer,rl_point,1);\n    }\n    iVar5 = iVar5 - rl_point;\n    puVar2 = (undefined1 *)xmalloc(iVar5 + 1);\n    puVar3 = puVar2;\n    if (0 < iVar5) {\n      iVar4 = 0;\n      do {\n        puVar2[iVar4] = *(undefined1 *)(rl_line_buffer + iVar4 + rl_point);\n        iVar4 = iVar4 + 1;\n      } while (iVar5 != iVar4);\n      puVar3 = puVar2 + iVar5;\n    }\n    *puVar3 = 0;\n    rl_delete_text(rl_point,iVar5 + rl_point);\n    rl_point = _rl_find_next_mbchar(rl_line_buffer,rl_point,param_1,1);\n    if (rl_end < rl_point) {\n      rl_point = rl_end;\n    }\n    else if (rl_point < 0) {\n      rl_point = 0;\n    }\n    rl_insert_text(puVar2);\n    rl_end_undo_group();\n    xfree(puVar2);\n  }\n  return 0;\n}" ({ "{") (declaration "size_t sVar1;" (primitive_type "size_t") (identifier "sVar1") (; ";")) (declaration "undefined1 *puVar2;" (type_identifier "undefined1") (pointer_declarator "*puVar2" (* "*") (identifier "puVar2")) (; ";")) (declaration "undefined1 *puVar3;" (type_identifier "undefined1") (pointer_declarator "*puVar3" (* "*") (identifier "puVar3")) (; ";")) (declaration "int iVar4;" (primitive_type "int") (identifier "iVar4") (; ";")) (declaration "int iVar5;" (primitive_type "int") (identifier "iVar5") (; ";")) (if_statement "if (param_1 != 0) {\n    if ((rl_point == 0) || (rl_end < 2)) {\n      rl_ding();\n      return 1;\n    }\n    rl_begin_undo_group();\n    if (rl_point == rl_end) {\n      sVar1 = __ctype_get_mb_cur_max();\n      if ((sVar1 < 2) || (rl_byte_oriented != 0)) {\n        rl_point = rl_point + -1;\n      }\n      else {\n        rl_point = _rl_find_prev_mbchar(rl_line_buffer,rl_point,1);\n      }\n      param_1 = 1;\n    }\n    iVar5 = rl_point;\n    sVar1 = __ctype_get_mb_cur_max();\n    if ((sVar1 < 2) || (rl_byte_oriented != 0)) {\n      rl_point = rl_point + -1;\n    }\n    else {\n      rl_point = _rl_find_prev_mbchar(rl_line_buffer,rl_point,1);\n    }\n    iVar5 = iVar5 - rl_point;\n    puVar2 = (undefined1 *)xmalloc(iVar5 + 1);\n    puVar3 = puVar2;\n    if (0 < iVar5) {\n      iVar4 = 0;\n      do {\n        puVar2[iVar4] = *(undefined1 *)(rl_line_buffer + iVar4 + rl_point);\n        iVar4 = iVar4 + 1;\n      } while (iVar5 != iVar4);\n      puVar3 = puVar2 + iVar5;\n    }\n    *puVar3 = 0;\n    rl_delete_text(rl_point,iVar5 + rl_point);\n    rl_point = _rl_find_next_mbchar(rl_line_buffer,rl_point,param_1,1);\n    if (rl_end < rl_point) {\n      rl_point = rl_end;\n    }\n    else if (rl_point < 0) {\n      rl_point = 0;\n    }\n    rl_insert_text(puVar2);\n    rl_end_undo_group();\n    xfree(puVar2);\n  }" (if "if") (parenthesized_expression "(param_1 != 0)" (( "(") (binary_expression "param_1 != 0" (identifier "param_1") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    if ((rl_point == 0) || (rl_end < 2)) {\n      rl_ding();\n      return 1;\n    }\n    rl_begin_undo_group();\n    if (rl_point == rl_end) {\n      sVar1 = __ctype_get_mb_cur_max();\n      if ((sVar1 < 2) || (rl_byte_oriented != 0)) {\n        rl_point = rl_point + -1;\n      }\n      else {\n        rl_point = _rl_find_prev_mbchar(rl_line_buffer,rl_point,1);\n      }\n      param_1 = 1;\n    }\n    iVar5 = rl_point;\n    sVar1 = __ctype_get_mb_cur_max();\n    if ((sVar1 < 2) || (rl_byte_oriented != 0)) {\n      rl_point = rl_point + -1;\n    }\n    else {\n      rl_point = _rl_find_prev_mbchar(rl_line_buffer,rl_point,1);\n    }\n    iVar5 = iVar5 - rl_point;\n    puVar2 = (undefined1 *)xmalloc(iVar5 + 1);\n    puVar3 = puVar2;\n    if (0 < iVar5) {\n      iVar4 = 0;\n      do {\n        puVar2[iVar4] = *(undefined1 *)(rl_line_buffer + iVar4 + rl_point);\n        iVar4 = iVar4 + 1;\n      } while (iVar5 != iVar4);\n      puVar3 = puVar2 + iVar5;\n    }\n    *puVar3 = 0;\n    rl_delete_text(rl_point,iVar5 + rl_point);\n    rl_point = _rl_find_next_mbchar(rl_line_buffer,rl_point,param_1,1);\n    if (rl_end < rl_point) {\n      rl_point = rl_end;\n    }\n    else if (rl_point < 0) {\n      rl_point = 0;\n    }\n    rl_insert_text(puVar2);\n    rl_end_undo_group();\n    xfree(puVar2);\n  }" ({ "{") (if_statement "if ((rl_point == 0) || (rl_end < 2)) {\n      rl_ding();\n      return 1;\n    }" (if "if") (parenthesized_expression "((rl_point == 0) || (rl_end < 2))" (( "(") (binary_expression "(rl_point == 0) || (rl_end < 2)" (parenthesized_expression "(rl_point == 0)" (( "(") (binary_expression "rl_point == 0" (identifier "rl_point") (== "==") (number_literal "0")) () ")")) (|| "||") (parenthesized_expression "(rl_end < 2)" (( "(") (binary_expression "rl_end < 2" (identifier "rl_end") (< "<") (number_literal "2")) () ")"))) () ")")) (compound_statement "{\n      rl_ding();\n      return 1;\n    }" ({ "{") (expression_statement "rl_ding();" (call_expression "rl_ding()" (identifier "rl_ding") (argument_list "()" (( "(") () ")"))) (; ";")) (return_statement "return 1;" (return "return") (number_literal "1") (; ";")) (} "}"))) (expression_statement "rl_begin_undo_group();" (call_expression "rl_begin_undo_group()" (identifier "rl_begin_undo_group") (argument_list "()" (( "(") () ")"))) (; ";")) (if_statement "if (rl_point == rl_end) {\n      sVar1 = __ctype_get_mb_cur_max();\n      if ((sVar1 < 2) || (rl_byte_oriented != 0)) {\n        rl_point = rl_point + -1;\n      }\n      else {\n        rl_point = _rl_find_prev_mbchar(rl_line_buffer,rl_point,1);\n      }\n      param_1 = 1;\n    }" (if "if") (parenthesized_expression "(rl_point == rl_end)" (( "(") (binary_expression "rl_point == rl_end" (identifier "rl_point") (== "==") (identifier "rl_end")) () ")")) (compound_statement "{\n      sVar1 = __ctype_get_mb_cur_max();\n      if ((sVar1 < 2) || (rl_byte_oriented != 0)) {\n        rl_point = rl_point + -1;\n      }\n      else {\n        rl_point = _rl_find_prev_mbchar(rl_line_buffer,rl_point,1);\n      }\n      param_1 = 1;\n    }" ({ "{") (expression_statement "sVar1 = __ctype_get_mb_cur_max();" (assignment_expression "sVar1 = __ctype_get_mb_cur_max()" (identifier "sVar1") (= "=") (call_expression "__ctype_get_mb_cur_max()" (identifier "__ctype_get_mb_cur_max") (argument_list "()" (( "(") () ")")))) (; ";")) (if_statement "if ((sVar1 < 2) || (rl_byte_oriented != 0)) {\n        rl_point = rl_point + -1;\n      }\n      else {\n        rl_point = _rl_find_prev_mbchar(rl_line_buffer,rl_point,1);\n      }" (if "if") (parenthesized_expression "((sVar1 < 2) || (rl_byte_oriented != 0))" (( "(") (binary_expression "(sVar1 < 2) || (rl_byte_oriented != 0)" (parenthesized_expression "(sVar1 < 2)" (( "(") (binary_expression "sVar1 < 2" (identifier "sVar1") (< "<") (number_literal "2")) () ")")) (|| "||") (parenthesized_expression "(rl_byte_oriented != 0)" (( "(") (binary_expression "rl_byte_oriented != 0" (identifier "rl_byte_oriented") (!= "!=") (number_literal "0")) () ")"))) () ")")) (compound_statement "{\n        rl_point = rl_point + -1;\n      }" ({ "{") (expression_statement "rl_point = rl_point + -1;" (assignment_expression "rl_point = rl_point + -1" (identifier "rl_point") (= "=") (binary_expression "rl_point + -1" (identifier "rl_point") (+ "+") (number_literal "-1"))) (; ";")) (} "}")) (else_clause "else {\n        rl_point = _rl_find_prev_mbchar(rl_line_buffer,rl_point,1);\n      }" (else "else") (compound_statement "{\n        rl_point = _rl_find_prev_mbchar(rl_line_buffer,rl_point,1);\n      }" ({ "{") (expression_statement "rl_point = _rl_find_prev_mbchar(rl_line_buffer,rl_point,1);" (assignment_expression "rl_point = _rl_find_prev_mbchar(rl_line_buffer,rl_point,1)" (identifier "rl_point") (= "=") (call_expression "_rl_find_prev_mbchar(rl_line_buffer,rl_point,1)" (identifier "_rl_find_prev_mbchar") (argument_list "(rl_line_buffer,rl_point,1)" (( "(") (identifier "rl_line_buffer") (, ",") (identifier "rl_point") (, ",") (number_literal "1") () ")")))) (; ";")) (} "}")))) (expression_statement "param_1 = 1;" (assignment_expression "param_1 = 1" (identifier "param_1") (= "=") (number_literal "1")) (; ";")) (} "}"))) (expression_statement "iVar5 = rl_point;" (assignment_expression "iVar5 = rl_point" (identifier "iVar5") (= "=") (identifier "rl_point")) (; ";")) (expression_statement "sVar1 = __ctype_get_mb_cur_max();" (assignment_expression "sVar1 = __ctype_get_mb_cur_max()" (identifier "sVar1") (= "=") (call_expression "__ctype_get_mb_cur_max()" (identifier "__ctype_get_mb_cur_max") (argument_list "()" (( "(") () ")")))) (; ";")) (if_statement "if ((sVar1 < 2) || (rl_byte_oriented != 0)) {\n      rl_point = rl_point + -1;\n    }\n    else {\n      rl_point = _rl_find_prev_mbchar(rl_line_buffer,rl_point,1);\n    }" (if "if") (parenthesized_expression "((sVar1 < 2) || (rl_byte_oriented != 0))" (( "(") (binary_expression "(sVar1 < 2) || (rl_byte_oriented != 0)" (parenthesized_expression "(sVar1 < 2)" (( "(") (binary_expression "sVar1 < 2" (identifier "sVar1") (< "<") (number_literal "2")) () ")")) (|| "||") (parenthesized_expression "(rl_byte_oriented != 0)" (( "(") (binary_expression "rl_byte_oriented != 0" (identifier "rl_byte_oriented") (!= "!=") (number_literal "0")) () ")"))) () ")")) (compound_statement "{\n      rl_point = rl_point + -1;\n    }" ({ "{") (expression_statement "rl_point = rl_point + -1;" (assignment_expression "rl_point = rl_point + -1" (identifier "rl_point") (= "=") (binary_expression "rl_point + -1" (identifier "rl_point") (+ "+") (number_literal "-1"))) (; ";")) (} "}")) (else_clause "else {\n      rl_point = _rl_find_prev_mbchar(rl_line_buffer,rl_point,1);\n    }" (else "else") (compound_statement "{\n      rl_point = _rl_find_prev_mbchar(rl_line_buffer,rl_point,1);\n    }" ({ "{") (expression_statement "rl_point = _rl_find_prev_mbchar(rl_line_buffer,rl_point,1);" (assignment_expression "rl_point = _rl_find_prev_mbchar(rl_line_buffer,rl_point,1)" (identifier "rl_point") (= "=") (call_expression "_rl_find_prev_mbchar(rl_line_buffer,rl_point,1)" (identifier "_rl_find_prev_mbchar") (argument_list "(rl_line_buffer,rl_point,1)" (( "(") (identifier "rl_line_buffer") (, ",") (identifier "rl_point") (, ",") (number_literal "1") () ")")))) (; ";")) (} "}")))) (expression_statement "iVar5 = iVar5 - rl_point;" (assignment_expression "iVar5 = iVar5 - rl_point" (identifier "iVar5") (= "=") (binary_expression "iVar5 - rl_point" (identifier "iVar5") (- "-") (identifier "rl_point"))) (; ";")) (expression_statement "puVar2 = (undefined1 *)xmalloc(iVar5 + 1);" (assignment_expression "puVar2 = (undefined1 *)xmalloc(iVar5 + 1)" (identifier "puVar2") (= "=") (cast_expression "(undefined1 *)xmalloc(iVar5 + 1)" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "xmalloc(iVar5 + 1)" (identifier "xmalloc") (argument_list "(iVar5 + 1)" (( "(") (binary_expression "iVar5 + 1" (identifier "iVar5") (+ "+") (number_literal "1")) () ")"))))) (; ";")) (expression_statement "puVar3 = puVar2;" (assignment_expression "puVar3 = puVar2" (identifier "puVar3") (= "=") (identifier "puVar2")) (; ";")) (if_statement "if (0 < iVar5) {\n      iVar4 = 0;\n      do {\n        puVar2[iVar4] = *(undefined1 *)(rl_line_buffer + iVar4 + rl_point);\n        iVar4 = iVar4 + 1;\n      } while (iVar5 != iVar4);\n      puVar3 = puVar2 + iVar5;\n    }" (if "if") (parenthesized_expression "(0 < iVar5)" (( "(") (binary_expression "0 < iVar5" (number_literal "0") (< "<") (identifier "iVar5")) () ")")) (compound_statement "{\n      iVar4 = 0;\n      do {\n        puVar2[iVar4] = *(undefined1 *)(rl_line_buffer + iVar4 + rl_point);\n        iVar4 = iVar4 + 1;\n      } while (iVar5 != iVar4);\n      puVar3 = puVar2 + iVar5;\n    }" ({ "{") (expression_statement "iVar4 = 0;" (assignment_expression "iVar4 = 0" (identifier "iVar4") (= "=") (number_literal "0")) (; ";")) (do_statement "do {\n        puVar2[iVar4] = *(undefined1 *)(rl_line_buffer + iVar4 + rl_point);\n        iVar4 = iVar4 + 1;\n      } while (iVar5 != iVar4);" (do "do") (compound_statement "{\n        puVar2[iVar4] = *(undefined1 *)(rl_line_buffer + iVar4 + rl_point);\n        iVar4 = iVar4 + 1;\n      }" ({ "{") (expression_statement "puVar2[iVar4] = *(undefined1 *)(rl_line_buffer + iVar4 + rl_point);" (assignment_expression "puVar2[iVar4] = *(undefined1 *)(rl_line_buffer + iVar4 + rl_point)" (subscript_expression "puVar2[iVar4]" (identifier "puVar2") ([ "[") (identifier "iVar4") (] "]")) (= "=") (pointer_expression "*(undefined1 *)(rl_line_buffer + iVar4 + rl_point)" (* "*") (cast_expression "(undefined1 *)(rl_line_buffer + iVar4 + rl_point)" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(rl_line_buffer + iVar4 + rl_point)" (( "(") (binary_expression "rl_line_buffer + iVar4 + rl_point" (binary_expression "rl_line_buffer + iVar4" (identifier "rl_line_buffer") (+ "+") (identifier "iVar4")) (+ "+") (identifier "rl_point")) () ")"))))) (; ";")) (expression_statement "iVar4 = iVar4 + 1;" (assignment_expression "iVar4 = iVar4 + 1" (identifier "iVar4") (= "=") (binary_expression "iVar4 + 1" (identifier "iVar4") (+ "+") (number_literal "1"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(iVar5 != iVar4)" (( "(") (binary_expression "iVar5 != iVar4" (identifier "iVar5") (!= "!=") (identifier "iVar4")) () ")")) (; ";")) (expression_statement "puVar3 = puVar2 + iVar5;" (assignment_expression "puVar3 = puVar2 + iVar5" (identifier "puVar3") (= "=") (binary_expression "puVar2 + iVar5" (identifier "puVar2") (+ "+") (identifier "iVar5"))) (; ";")) (} "}"))) (expression_statement "*puVar3 = 0;" (assignment_expression "*puVar3 = 0" (pointer_expression "*puVar3" (* "*") (identifier "puVar3")) (= "=") (number_literal "0")) (; ";")) (expression_statement "rl_delete_text(rl_point,iVar5 + rl_point);" (call_expression "rl_delete_text(rl_point,iVar5 + rl_point)" (identifier "rl_delete_text") (argument_list "(rl_point,iVar5 + rl_point)" (( "(") (identifier "rl_point") (, ",") (binary_expression "iVar5 + rl_point" (identifier "iVar5") (+ "+") (identifier "rl_point")) () ")"))) (; ";")) (expression_statement "rl_point = _rl_find_next_mbchar(rl_line_buffer,rl_point,param_1,1);" (assignment_expression "rl_point = _rl_find_next_mbchar(rl_line_buffer,rl_point,param_1,1)" (identifier "rl_point") (= "=") (call_expression "_rl_find_next_mbchar(rl_line_buffer,rl_point,param_1,1)" (identifier "_rl_find_next_mbchar") (argument_list "(rl_line_buffer,rl_point,param_1,1)" (( "(") (identifier "rl_line_buffer") (, ",") (identifier "rl_point") (, ",") (identifier "param_1") (, ",") (number_literal "1") () ")")))) (; ";")) (if_statement "if (rl_end < rl_point) {\n      rl_point = rl_end;\n    }\n    else if (rl_point < 0) {\n      rl_point = 0;\n    }" (if "if") (parenthesized_expression "(rl_end < rl_point)" (( "(") (binary_expression "rl_end < rl_point" (identifier "rl_end") (< "<") (identifier "rl_point")) () ")")) (compound_statement "{\n      rl_point = rl_end;\n    }" ({ "{") (expression_statement "rl_point = rl_end;" (assignment_expression "rl_point = rl_end" (identifier "rl_point") (= "=") (identifier "rl_end")) (; ";")) (} "}")) (else_clause "else if (rl_point < 0) {\n      rl_point = 0;\n    }" (else "else") (if_statement "if (rl_point < 0) {\n      rl_point = 0;\n    }" (if "if") (parenthesized_expression "(rl_point < 0)" (( "(") (binary_expression "rl_point < 0" (identifier "rl_point") (< "<") (number_literal "0")) () ")")) (compound_statement "{\n      rl_point = 0;\n    }" ({ "{") (expression_statement "rl_point = 0;" (assignment_expression "rl_point = 0" (identifier "rl_point") (= "=") (number_literal "0")) (; ";")) (} "}"))))) (expression_statement "rl_insert_text(puVar2);" (call_expression "rl_insert_text(puVar2)" (identifier "rl_insert_text") (argument_list "(puVar2)" (( "(") (identifier "puVar2") () ")"))) (; ";")) (expression_statement "rl_end_undo_group();" (call_expression "rl_end_undo_group()" (identifier "rl_end_undo_group") (argument_list "()" (( "(") () ")"))) (; ";")) (expression_statement "xfree(puVar2);" (call_expression "xfree(puVar2)" (identifier "xfree") (argument_list "(puVar2)" (( "(") (identifier "puVar2") () ")"))) (; ";")) (} "}"))) (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(int var_1,int key)

{
  size_t var_7;
  char *var_13;
  char *pcVar2;
  int var_12;
  int var_10;
  
  if (var_1 != 0) {
    if ((var_2 == 0) || (var_3 < 2)) {
      var_4();
      return 1;
    }
    var_5();
    if (var_2 == var_3) {
      var_7 = var_6();
      if ((var_7 < 2) || (var_8 != 0)) {
        var_2 = var_2 + -1;
      }
      else {
        var_2 = var_9(rl_line_buffer,var_2,1);
      }
      var_1 = 1;
    }
    var_10 = var_2;
    var_7 = var_6();
    if ((var_7 < 2) || (var_8 != 0)) {
      var_2 = var_2 + -1;
    }
    else {
      var_2 = var_9(rl_line_buffer,var_2,1);
    }
    var_10 = var_10 - var_2;
    var_13 = (char *)var_11(var_10 + 1);
    pcVar2 = var_13;
    if (0 < var_10) {
      var_12 = 0;
      do {
        var_13[var_12] = rl_line_buffer[var_2 + var_12];
        var_12 = var_12 + 1;
      } while (var_10 != var_12);
      pcVar2 = var_13 + var_10;
    }
    *pcVar2 = '\0';
    var_14(var_2,var_10 + var_2);
    var_2 = var_15(rl_line_buffer,var_2,var_1,1);
    if (var_3 < var_2) {
      var_2 = var_3;
    }
    else if (var_2 < 0) {
      var_2 = 0;
    }
    var_16(var_13);
    var_17();
    var_18(var_13);
  }
  return 0;
}


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

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

undefined4 MASKED(int param_1)

{
  size_t sVar1;
  undefined1 *puVar2;
  undefined1 *puVar3;
  int iVar4;
  int iVar5;
  
  if (param_1 != 0) {
    if ((rl_point == 0) || (rl_end < 2)) {
      rl_ding();
      return 1;
    }
    rl_begin_undo_group();
    if (rl_point == rl_end) {
      sVar1 = __ctype_get_mb_cur_max();
      if ((sVar1 < 2) || (rl_byte_oriented != 0)) {
        rl_point = rl_point + -1;
      }
      else {
        rl_point = _rl_find_prev_mbchar(rl_line_buffer,rl_point,1);
      }
      param_1 = 1;
    }
    iVar5 = rl_point;
    sVar1 = __ctype_get_mb_cur_max();
    if ((sVar1 < 2) || (rl_byte_oriented != 0)) {
      rl_point = rl_point + -1;
    }
    else {
      rl_point = _rl_find_prev_mbchar(rl_line_buffer,rl_point,1);
    }
    iVar5 = iVar5 - rl_point;
    puVar2 = (undefined1 *)xmalloc(iVar5 + 1);
    puVar3 = puVar2;
    if (0 < iVar5) {
      iVar4 = 0;
      do {
        puVar2[iVar4] = *(undefined1 *)(rl_line_buffer + iVar4 + rl_point);
        iVar4 = iVar4 + 1;
      } while (iVar5 != iVar4);
      puVar3 = puVar2 + iVar5;
    }
    *puVar3 = 0;
    rl_delete_text(rl_point,iVar5 + rl_point);
    rl_point = _rl_find_next_mbchar(rl_line_buffer,rl_point,param_1,1);
    if (rl_end < rl_point) {
      rl_point = rl_end;
    }
    else if (rl_point < 0) {
      rl_point = 0;
    }
    rl_insert_text(puVar2);
    rl_end_undo_group();
    xfree(puVar2);
  }
  return 0;
}

