
wchar_t rl_delete_text(wchar_t from,wchar_t to)

{
  char *text;
  wchar_t wVar1;
  wchar_t from_00;
  long lVar2;
  wchar_t to_00;
  
  to_00 = to;
  if (to < from) {
    to_00 = from;
    from = to;
  }
  if ((rl_end < to_00) && (to_00 = rl_end, rl_end < from)) {
    from = rl_end;
  }
  from_00 = L'\0';
  if (L'\xffffffff' < from) {
    from_00 = from;
  }
  text = rl_copy_text(from_00,to_00);
  wVar1 = to_00 - from_00;
  if (from_00 < rl_end - wVar1) {
    lVar2 = (long)from_00;
    do {
      rl_line_buffer[lVar2] = rl_line_buffer[wVar1 + lVar2];
      lVar2 = lVar2 + 1;
    } while ((int)lVar2 < rl_end - wVar1);
  }
  if (_rl_doing_an_undo == 0) {
    rl_add_undo(UNDO_DELETE,from_00,to_00,text);
  }
  else {
    xfree(text);
  }
  rl_end = rl_end - wVar1;
  rl_line_buffer[rl_end] = '\0';
  return wVar1;
}



int rl_delete_text(int param_1,int param_2)

{
  undefined8 uVar1;
  int iVar2;
  int iVar3;
  long lVar4;
  
  iVar2 = param_1;
  if (param_2 < param_1) {
    iVar2 = param_2;
    param_2 = param_1;
  }
  if ((rl_end < param_2) && (param_2 = rl_end, rl_end < iVar2)) {
    iVar2 = rl_end;
  }
  iVar3 = 0;
  if (-1 < iVar2) {
    iVar3 = iVar2;
  }
  uVar1 = rl_copy_text(iVar3,param_2);
  iVar2 = param_2 - iVar3;
  if (iVar3 < rl_end - iVar2) {
    lVar4 = (long)iVar3;
    do {
      *(undefined1 *)(rl_line_buffer + lVar4) =
           *(undefined1 *)(rl_line_buffer + lVar4 + (long)iVar2);
      lVar4 = lVar4 + 1;
    } while ((int)lVar4 < rl_end - iVar2);
  }
  if (_rl_doing_an_undo == 0) {
    rl_add_undo(0,iVar3,param_2,uVar1);
  }
  else {
    xfree(uVar1);
  }
  rl_end = rl_end - iVar2;
  *(undefined1 *)(rl_line_buffer + rl_end) = 0;
  return iVar2;
}


PUSH R12
PUSH RBP
PUSH RBX
MOV R12D,ESI
CMP EDI,ESI
JLE 0x001c7c62
MOV EAX,EDI
MOV EDI,ESI
MOV R12D,EAX
MOV EAX,dword ptr [0x0021c6d8]
CMP EAX,R12D
JGE 0x001c7c75
CMP EDI,EAX
CMOVG EDI,EAX
MOV R12D,EAX
TEST EDI,EDI
MOV EBP,0x0
CMOVNS EBP,EDI
MOV ESI,R12D
MOV EDI,EBP
CALL 0x001c40d1
MOV EBX,R12D
SUB EBX,EBP
MOV EDX,dword ptr [0x0021c6d8]
SUB EDX,EBX
CMP EBP,EDX
JGE 0x001c7cd2
MOVSXD RSI,EBP
MOV RDX,RSI
MOVSXD R10,EBX
MOV R9D,EBP
SUB R9D,ESI
MOV RSI,qword ptr [0x002164f0]
LEA R8,[RSI + RDX*0x1]
MOVZX R8D,byte ptr [R8 + R10*0x1]
MOV byte ptr [RSI + RDX*0x1],R8B
ADD RDX,0x1
MOV ESI,dword ptr [0x0021c6d8]
SUB ESI,EBX
LEA R8D,[R9 + RDX*0x1]
CMP ESI,R8D
JG 0x001c7ca9
CMP dword ptr [0x00217294],0x0
JNZ 0x001c7d0f
MOV RCX,RAX
MOV EDX,R12D
MOV ESI,EBP
MOV EDI,0x0
CALL 0x001c532b
MOV EAX,dword ptr [0x0021c6d8]
SUB EAX,EBX
MOV dword ptr [0x0021c6d8],EAX
CDQE
MOV RDX,qword ptr [0x002164f0]
MOV byte ptr [RDX + RAX*0x1],0x0
MOV EAX,EBX
POP RBX
POP RBP
POP R12
RET
MOV RDI,RAX
CALL 0x00188201
JMP 0x001c7ced
(translation_unit "int rl_delete_text(int param_1,int param_2)\n\n{\n  undefined8 uVar1;\n  int iVar2;\n  int iVar3;\n  long lVar4;\n  \n  iVar2 = param_1;\n  if (param_2 < param_1) {\n    iVar2 = param_2;\n    param_2 = param_1;\n  }\n  if ((rl_end < param_2) && (param_2 = rl_end, rl_end < iVar2)) {\n    iVar2 = rl_end;\n  }\n  iVar3 = 0;\n  if (-1 < iVar2) {\n    iVar3 = iVar2;\n  }\n  uVar1 = rl_copy_text(iVar3,param_2);\n  iVar2 = param_2 - iVar3;\n  if (iVar3 < rl_end - iVar2) {\n    lVar4 = (long)iVar3;\n    do {\n      *(undefined1 *)(rl_line_buffer + lVar4) =\n           *(undefined1 *)(rl_line_buffer + lVar4 + (long)iVar2);\n      lVar4 = lVar4 + 1;\n    } while ((int)lVar4 < rl_end - iVar2);\n  }\n  if (_rl_doing_an_undo == 0) {\n    rl_add_undo(0,iVar3,param_2,uVar1);\n  }\n  else {\n    xfree(uVar1);\n  }\n  rl_end = rl_end - iVar2;\n  *(undefined1 *)(rl_line_buffer + rl_end) = 0;\n  return iVar2;\n}\n\n" (function_definition "int rl_delete_text(int param_1,int param_2)\n\n{\n  undefined8 uVar1;\n  int iVar2;\n  int iVar3;\n  long lVar4;\n  \n  iVar2 = param_1;\n  if (param_2 < param_1) {\n    iVar2 = param_2;\n    param_2 = param_1;\n  }\n  if ((rl_end < param_2) && (param_2 = rl_end, rl_end < iVar2)) {\n    iVar2 = rl_end;\n  }\n  iVar3 = 0;\n  if (-1 < iVar2) {\n    iVar3 = iVar2;\n  }\n  uVar1 = rl_copy_text(iVar3,param_2);\n  iVar2 = param_2 - iVar3;\n  if (iVar3 < rl_end - iVar2) {\n    lVar4 = (long)iVar3;\n    do {\n      *(undefined1 *)(rl_line_buffer + lVar4) =\n           *(undefined1 *)(rl_line_buffer + lVar4 + (long)iVar2);\n      lVar4 = lVar4 + 1;\n    } while ((int)lVar4 < rl_end - iVar2);\n  }\n  if (_rl_doing_an_undo == 0) {\n    rl_add_undo(0,iVar3,param_2,uVar1);\n  }\n  else {\n    xfree(uVar1);\n  }\n  rl_end = rl_end - iVar2;\n  *(undefined1 *)(rl_line_buffer + rl_end) = 0;\n  return iVar2;\n}" primitive_type (function_declarator "rl_delete_text(int param_1,int param_2)" identifier (parameter_list "(int param_1,int param_2)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "int param_2" primitive_type identifier) ))) (compound_statement "{\n  undefined8 uVar1;\n  int iVar2;\n  int iVar3;\n  long lVar4;\n  \n  iVar2 = param_1;\n  if (param_2 < param_1) {\n    iVar2 = param_2;\n    param_2 = param_1;\n  }\n  if ((rl_end < param_2) && (param_2 = rl_end, rl_end < iVar2)) {\n    iVar2 = rl_end;\n  }\n  iVar3 = 0;\n  if (-1 < iVar2) {\n    iVar3 = iVar2;\n  }\n  uVar1 = rl_copy_text(iVar3,param_2);\n  iVar2 = param_2 - iVar3;\n  if (iVar3 < rl_end - iVar2) {\n    lVar4 = (long)iVar3;\n    do {\n      *(undefined1 *)(rl_line_buffer + lVar4) =\n           *(undefined1 *)(rl_line_buffer + lVar4 + (long)iVar2);\n      lVar4 = lVar4 + 1;\n    } while ((int)lVar4 < rl_end - iVar2);\n  }\n  if (_rl_doing_an_undo == 0) {\n    rl_add_undo(0,iVar3,param_2,uVar1);\n  }\n  else {\n    xfree(uVar1);\n  }\n  rl_end = rl_end - iVar2;\n  *(undefined1 *)(rl_line_buffer + rl_end) = 0;\n  return iVar2;\n}" { (declaration "undefined8 uVar1;" type_identifier identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "long lVar4;" (sized_type_specifier "long" long) identifier ;) (expression_statement "iVar2 = param_1;" (assignment_expression "iVar2 = param_1" identifier = identifier) ;) (if_statement "if (param_2 < param_1) {\n    iVar2 = param_2;\n    param_2 = param_1;\n  }" if (parenthesized_expression "(param_2 < param_1)" ( (binary_expression "param_2 < param_1" identifier < identifier) )) (compound_statement "{\n    iVar2 = param_2;\n    param_2 = param_1;\n  }" { (expression_statement "iVar2 = param_2;" (assignment_expression "iVar2 = param_2" identifier = identifier) ;) (expression_statement "param_2 = param_1;" (assignment_expression "param_2 = param_1" identifier = identifier) ;) })) (if_statement "if ((rl_end < param_2) && (param_2 = rl_end, rl_end < iVar2)) {\n    iVar2 = rl_end;\n  }" if (parenthesized_expression "((rl_end < param_2) && (param_2 = rl_end, rl_end < iVar2))" ( (binary_expression "(rl_end < param_2) && (param_2 = rl_end, rl_end < iVar2)" (parenthesized_expression "(rl_end < param_2)" ( (binary_expression "rl_end < param_2" identifier < identifier) )) && (parenthesized_expression "(param_2 = rl_end, rl_end < iVar2)" ( (comma_expression "param_2 = rl_end, rl_end < iVar2" (assignment_expression "param_2 = rl_end" identifier = identifier) , (binary_expression "rl_end < iVar2" identifier < identifier)) ))) )) (compound_statement "{\n    iVar2 = rl_end;\n  }" { (expression_statement "iVar2 = rl_end;" (assignment_expression "iVar2 = rl_end" identifier = identifier) ;) })) (expression_statement "iVar3 = 0;" (assignment_expression "iVar3 = 0" identifier = number_literal) ;) (if_statement "if (-1 < iVar2) {\n    iVar3 = iVar2;\n  }" if (parenthesized_expression "(-1 < iVar2)" ( (binary_expression "-1 < iVar2" number_literal < identifier) )) (compound_statement "{\n    iVar3 = iVar2;\n  }" { (expression_statement "iVar3 = iVar2;" (assignment_expression "iVar3 = iVar2" identifier = identifier) ;) })) (expression_statement "uVar1 = rl_copy_text(iVar3,param_2);" (assignment_expression "uVar1 = rl_copy_text(iVar3,param_2)" identifier = (call_expression "rl_copy_text(iVar3,param_2)" identifier (argument_list "(iVar3,param_2)" ( identifier , identifier )))) ;) (expression_statement "iVar2 = param_2 - iVar3;" (assignment_expression "iVar2 = param_2 - iVar3" identifier = (binary_expression "param_2 - iVar3" identifier - identifier)) ;) (if_statement "if (iVar3 < rl_end - iVar2) {\n    lVar4 = (long)iVar3;\n    do {\n      *(undefined1 *)(rl_line_buffer + lVar4) =\n           *(undefined1 *)(rl_line_buffer + lVar4 + (long)iVar2);\n      lVar4 = lVar4 + 1;\n    } while ((int)lVar4 < rl_end - iVar2);\n  }" if (parenthesized_expression "(iVar3 < rl_end - iVar2)" ( (binary_expression "iVar3 < rl_end - iVar2" identifier < (binary_expression "rl_end - iVar2" identifier - identifier)) )) (compound_statement "{\n    lVar4 = (long)iVar3;\n    do {\n      *(undefined1 *)(rl_line_buffer + lVar4) =\n           *(undefined1 *)(rl_line_buffer + lVar4 + (long)iVar2);\n      lVar4 = lVar4 + 1;\n    } while ((int)lVar4 < rl_end - iVar2);\n  }" { (expression_statement "lVar4 = (long)iVar3;" (assignment_expression "lVar4 = (long)iVar3" identifier = (cast_expression "(long)iVar3" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier)) ;) (do_statement "do {\n      *(undefined1 *)(rl_line_buffer + lVar4) =\n           *(undefined1 *)(rl_line_buffer + lVar4 + (long)iVar2);\n      lVar4 = lVar4 + 1;\n    } while ((int)lVar4 < rl_end - iVar2);" do (compound_statement "{\n      *(undefined1 *)(rl_line_buffer + lVar4) =\n           *(undefined1 *)(rl_line_buffer + lVar4 + (long)iVar2);\n      lVar4 = lVar4 + 1;\n    }" { (expression_statement "*(undefined1 *)(rl_line_buffer + lVar4) =\n           *(undefined1 *)(rl_line_buffer + lVar4 + (long)iVar2);" (assignment_expression "*(undefined1 *)(rl_line_buffer + lVar4) =\n           *(undefined1 *)(rl_line_buffer + lVar4 + (long)iVar2)" (pointer_expression "*(undefined1 *)(rl_line_buffer + lVar4)" * (cast_expression "(undefined1 *)(rl_line_buffer + lVar4)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(rl_line_buffer + lVar4)" ( (binary_expression "rl_line_buffer + lVar4" identifier + identifier) )))) = (pointer_expression "*(undefined1 *)(rl_line_buffer + lVar4 + (long)iVar2)" * (cast_expression "(undefined1 *)(rl_line_buffer + lVar4 + (long)iVar2)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(rl_line_buffer + lVar4 + (long)iVar2)" ( (binary_expression "rl_line_buffer + lVar4 + (long)iVar2" (binary_expression "rl_line_buffer + lVar4" identifier + identifier) + (cast_expression "(long)iVar2" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier)) ))))) ;) (expression_statement "lVar4 = lVar4 + 1;" (assignment_expression "lVar4 = lVar4 + 1" identifier = (binary_expression "lVar4 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "((int)lVar4 < rl_end - iVar2)" ( (binary_expression "(int)lVar4 < rl_end - iVar2" (cast_expression "(int)lVar4" ( (type_descriptor "int" primitive_type) ) identifier) < (binary_expression "rl_end - iVar2" identifier - identifier)) )) ;) })) (if_statement "if (_rl_doing_an_undo == 0) {\n    rl_add_undo(0,iVar3,param_2,uVar1);\n  }\n  else {\n    xfree(uVar1);\n  }" if (parenthesized_expression "(_rl_doing_an_undo == 0)" ( (binary_expression "_rl_doing_an_undo == 0" identifier == number_literal) )) (compound_statement "{\n    rl_add_undo(0,iVar3,param_2,uVar1);\n  }" { (expression_statement "rl_add_undo(0,iVar3,param_2,uVar1);" (call_expression "rl_add_undo(0,iVar3,param_2,uVar1)" identifier (argument_list "(0,iVar3,param_2,uVar1)" ( number_literal , identifier , identifier , identifier ))) ;) }) (else_clause "else {\n    xfree(uVar1);\n  }" else (compound_statement "{\n    xfree(uVar1);\n  }" { (expression_statement "xfree(uVar1);" (call_expression "xfree(uVar1)" identifier (argument_list "(uVar1)" ( identifier ))) ;) }))) (expression_statement "rl_end = rl_end - iVar2;" (assignment_expression "rl_end = rl_end - iVar2" identifier = (binary_expression "rl_end - iVar2" identifier - identifier)) ;) (expression_statement "*(undefined1 *)(rl_line_buffer + rl_end) = 0;" (assignment_expression "*(undefined1 *)(rl_line_buffer + rl_end) = 0" (pointer_expression "*(undefined1 *)(rl_line_buffer + rl_end)" * (cast_expression "(undefined1 *)(rl_line_buffer + rl_end)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(rl_line_buffer + rl_end)" ( (binary_expression "rl_line_buffer + rl_end" identifier + identifier) )))) = number_literal) ;) (return_statement "return iVar2;" return identifier ;) })))
(translation_unit "wchar_t rl_delete_text(wchar_t from,wchar_t to)\n\n{\n  char *text;\n  wchar_t wVar1;\n  wchar_t from_00;\n  long lVar2;\n  wchar_t to_00;\n  \n  to_00 = to;\n  if (to < from) {\n    to_00 = from;\n    from = to;\n  }\n  if ((rl_end < to_00) && (to_00 = rl_end, rl_end < from)) {\n    from = rl_end;\n  }\n  from_00 = L'\0';\n  if (L'\xffffffff' < from) {\n    from_00 = from;\n  }\n  text = rl_copy_text(from_00,to_00);\n  wVar1 = to_00 - from_00;\n  if (from_00 < rl_end - wVar1) {\n    lVar2 = (long)from_00;\n    do {\n      rl_line_buffer[lVar2] = rl_line_buffer[wVar1 + lVar2];\n      lVar2 = lVar2 + 1;\n    } while ((int)lVar2 < rl_end - wVar1);\n  }\n  if (_rl_doing_an_undo == 0) {\n    rl_add_undo(UNDO_DELETE,from_00,to_00,text);\n  }\n  else {\n    xfree(text);\n  }\n  rl_end = rl_end - wVar1;\n  rl_line_buffer[rl_end] = '\0';\n  return wVar1;\n}\n\n" (function_definition "wchar_t rl_delete_text(wchar_t from,wchar_t to)\n\n{\n  char *text;\n  wchar_t wVar1;\n  wchar_t from_00;\n  long lVar2;\n  wchar_t to_00;\n  \n  to_00 = to;\n  if (to < from) {\n    to_00 = from;\n    from = to;\n  }\n  if ((rl_end < to_00) && (to_00 = rl_end, rl_end < from)) {\n    from = rl_end;\n  }\n  from_00 = L'\0';\n  if (L'\xffffffff' < from) {\n    from_00 = from;\n  }\n  text = rl_copy_text(from_00,to_00);\n  wVar1 = to_00 - from_00;\n  if (from_00 < rl_end - wVar1) {\n    lVar2 = (long)from_00;\n    do {\n      rl_line_buffer[lVar2] = rl_line_buffer[wVar1 + lVar2];\n      lVar2 = lVar2 + 1;\n    } while ((int)lVar2 < rl_end - wVar1);\n  }\n  if (_rl_doing_an_undo == 0) {\n    rl_add_undo(UNDO_DELETE,from_00,to_00,text);\n  }\n  else {\n    xfree(text);\n  }\n  rl_end = rl_end - wVar1;\n  rl_line_buffer[rl_end] = '\0';\n  return wVar1;\n}" type_identifier (function_declarator "rl_delete_text(wchar_t from,wchar_t to)" identifier (parameter_list "(wchar_t from,wchar_t to)" ( (parameter_declaration "wchar_t from" type_identifier identifier) , (parameter_declaration "wchar_t to" type_identifier identifier) ))) (compound_statement "{\n  char *text;\n  wchar_t wVar1;\n  wchar_t from_00;\n  long lVar2;\n  wchar_t to_00;\n  \n  to_00 = to;\n  if (to < from) {\n    to_00 = from;\n    from = to;\n  }\n  if ((rl_end < to_00) && (to_00 = rl_end, rl_end < from)) {\n    from = rl_end;\n  }\n  from_00 = L'\0';\n  if (L'\xffffffff' < from) {\n    from_00 = from;\n  }\n  text = rl_copy_text(from_00,to_00);\n  wVar1 = to_00 - from_00;\n  if (from_00 < rl_end - wVar1) {\n    lVar2 = (long)from_00;\n    do {\n      rl_line_buffer[lVar2] = rl_line_buffer[wVar1 + lVar2];\n      lVar2 = lVar2 + 1;\n    } while ((int)lVar2 < rl_end - wVar1);\n  }\n  if (_rl_doing_an_undo == 0) {\n    rl_add_undo(UNDO_DELETE,from_00,to_00,text);\n  }\n  else {\n    xfree(text);\n  }\n  rl_end = rl_end - wVar1;\n  rl_line_buffer[rl_end] = '\0';\n  return wVar1;\n}" { (declaration "char *text;" primitive_type (pointer_declarator "*text" * identifier) ;) (declaration "wchar_t wVar1;" type_identifier identifier ;) (declaration "wchar_t from_00;" type_identifier identifier ;) (declaration "long lVar2;" (sized_type_specifier "long" long) identifier ;) (declaration "wchar_t to_00;" type_identifier identifier ;) (expression_statement "to_00 = to;" (assignment_expression "to_00 = to" identifier = identifier) ;) (if_statement "if (to < from) {\n    to_00 = from;\n    from = to;\n  }" if (parenthesized_expression "(to < from)" ( (binary_expression "to < from" identifier < identifier) )) (compound_statement "{\n    to_00 = from;\n    from = to;\n  }" { (expression_statement "to_00 = from;" (assignment_expression "to_00 = from" identifier = identifier) ;) (expression_statement "from = to;" (assignment_expression "from = to" identifier = identifier) ;) })) (if_statement "if ((rl_end < to_00) && (to_00 = rl_end, rl_end < from)) {\n    from = rl_end;\n  }" if (parenthesized_expression "((rl_end < to_00) && (to_00 = rl_end, rl_end < from))" ( (binary_expression "(rl_end < to_00) && (to_00 = rl_end, rl_end < from)" (parenthesized_expression "(rl_end < to_00)" ( (binary_expression "rl_end < to_00" identifier < identifier) )) && (parenthesized_expression "(to_00 = rl_end, rl_end < from)" ( (comma_expression "to_00 = rl_end, rl_end < from" (assignment_expression "to_00 = rl_end" identifier = identifier) , (binary_expression "rl_end < from" identifier < identifier)) ))) )) (compound_statement "{\n    from = rl_end;\n  }" { (expression_statement "from = rl_end;" (assignment_expression "from = rl_end" identifier = identifier) ;) })) (expression_statement "from_00 = L'\0';" (assignment_expression "from_00 = L'\0'" identifier = (char_literal "L'\0'" L' escape_sequence ')) ;) (if_statement "if (L'\xffffffff' < from) {\n    from_00 = from;\n  }" if (parenthesized_expression "(L'\xffffffff' < from)" ( (binary_expression "L'\xffffffff' < from" (char_literal "L'\xffffffff'" L' escape_sequence character character character character ') < identifier) )) (compound_statement "{\n    from_00 = from;\n  }" { (expression_statement "from_00 = from;" (assignment_expression "from_00 = from" identifier = identifier) ;) })) (expression_statement "text = rl_copy_text(from_00,to_00);" (assignment_expression "text = rl_copy_text(from_00,to_00)" identifier = (call_expression "rl_copy_text(from_00,to_00)" identifier (argument_list "(from_00,to_00)" ( identifier , identifier )))) ;) (expression_statement "wVar1 = to_00 - from_00;" (assignment_expression "wVar1 = to_00 - from_00" identifier = (binary_expression "to_00 - from_00" identifier - identifier)) ;) (if_statement "if (from_00 < rl_end - wVar1) {\n    lVar2 = (long)from_00;\n    do {\n      rl_line_buffer[lVar2] = rl_line_buffer[wVar1 + lVar2];\n      lVar2 = lVar2 + 1;\n    } while ((int)lVar2 < rl_end - wVar1);\n  }" if (parenthesized_expression "(from_00 < rl_end - wVar1)" ( (binary_expression "from_00 < rl_end - wVar1" identifier < (binary_expression "rl_end - wVar1" identifier - identifier)) )) (compound_statement "{\n    lVar2 = (long)from_00;\n    do {\n      rl_line_buffer[lVar2] = rl_line_buffer[wVar1 + lVar2];\n      lVar2 = lVar2 + 1;\n    } while ((int)lVar2 < rl_end - wVar1);\n  }" { (expression_statement "lVar2 = (long)from_00;" (assignment_expression "lVar2 = (long)from_00" identifier = (cast_expression "(long)from_00" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier)) ;) (do_statement "do {\n      rl_line_buffer[lVar2] = rl_line_buffer[wVar1 + lVar2];\n      lVar2 = lVar2 + 1;\n    } while ((int)lVar2 < rl_end - wVar1);" do (compound_statement "{\n      rl_line_buffer[lVar2] = rl_line_buffer[wVar1 + lVar2];\n      lVar2 = lVar2 + 1;\n    }" { (expression_statement "rl_line_buffer[lVar2] = rl_line_buffer[wVar1 + lVar2];" (assignment_expression "rl_line_buffer[lVar2] = rl_line_buffer[wVar1 + lVar2]" (subscript_expression "rl_line_buffer[lVar2]" identifier [ identifier ]) = (subscript_expression "rl_line_buffer[wVar1 + lVar2]" identifier [ (binary_expression "wVar1 + lVar2" identifier + identifier) ])) ;) (expression_statement "lVar2 = lVar2 + 1;" (assignment_expression "lVar2 = lVar2 + 1" identifier = (binary_expression "lVar2 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "((int)lVar2 < rl_end - wVar1)" ( (binary_expression "(int)lVar2 < rl_end - wVar1" (cast_expression "(int)lVar2" ( (type_descriptor "int" primitive_type) ) identifier) < (binary_expression "rl_end - wVar1" identifier - identifier)) )) ;) })) (if_statement "if (_rl_doing_an_undo == 0) {\n    rl_add_undo(UNDO_DELETE,from_00,to_00,text);\n  }\n  else {\n    xfree(text);\n  }" if (parenthesized_expression "(_rl_doing_an_undo == 0)" ( (binary_expression "_rl_doing_an_undo == 0" identifier == number_literal) )) (compound_statement "{\n    rl_add_undo(UNDO_DELETE,from_00,to_00,text);\n  }" { (expression_statement "rl_add_undo(UNDO_DELETE,from_00,to_00,text);" (call_expression "rl_add_undo(UNDO_DELETE,from_00,to_00,text)" identifier (argument_list "(UNDO_DELETE,from_00,to_00,text)" ( identifier , identifier , identifier , identifier ))) ;) }) (else_clause "else {\n    xfree(text);\n  }" else (compound_statement "{\n    xfree(text);\n  }" { (expression_statement "xfree(text);" (call_expression "xfree(text)" identifier (argument_list "(text)" ( identifier ))) ;) }))) (expression_statement "rl_end = rl_end - wVar1;" (assignment_expression "rl_end = rl_end - wVar1" identifier = (binary_expression "rl_end - wVar1" identifier - identifier)) ;) (expression_statement "rl_line_buffer[rl_end] = '\0';" (assignment_expression "rl_line_buffer[rl_end] = '\0'" (subscript_expression "rl_line_buffer[rl_end]" identifier [ identifier ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (return_statement "return wVar1;" return identifier ;) })))
(translation_unit "int rl_delete_text(int param_1,int param_2)\n\n{\n  undefined8 uVar1;\n  int iVar2;\n  int iVar3;\n  long lVar4;\n  \n  iVar2 = param_1;\n  if (param_2 < param_1) {\n    iVar2 = param_2;\n    param_2 = param_1;\n  }\n  if ((rl_end < param_2) && (param_2 = rl_end, rl_end < iVar2)) {\n    iVar2 = rl_end;\n  }\n  iVar3 = 0;\n  if (-1 < iVar2) {\n    iVar3 = iVar2;\n  }\n  uVar1 = rl_copy_text(iVar3,param_2);\n  iVar2 = param_2 - iVar3;\n  if (iVar3 < rl_end - iVar2) {\n    lVar4 = (long)iVar3;\n    do {\n      *(undefined1 *)(rl_line_buffer + lVar4) =\n           *(undefined1 *)(rl_line_buffer + lVar4 + (long)iVar2);\n      lVar4 = lVar4 + 1;\n    } while ((int)lVar4 < rl_end - iVar2);\n  }\n  if (_rl_doing_an_undo == 0) {\n    rl_add_undo(0,iVar3,param_2,uVar1);\n  }\n  else {\n    xfree(uVar1);\n  }\n  rl_end = rl_end - iVar2;\n  *(undefined1 *)(rl_line_buffer + rl_end) = 0;\n  return iVar2;\n}\n\n" (function_definition "int rl_delete_text(int param_1,int param_2)\n\n{\n  undefined8 uVar1;\n  int iVar2;\n  int iVar3;\n  long lVar4;\n  \n  iVar2 = param_1;\n  if (param_2 < param_1) {\n    iVar2 = param_2;\n    param_2 = param_1;\n  }\n  if ((rl_end < param_2) && (param_2 = rl_end, rl_end < iVar2)) {\n    iVar2 = rl_end;\n  }\n  iVar3 = 0;\n  if (-1 < iVar2) {\n    iVar3 = iVar2;\n  }\n  uVar1 = rl_copy_text(iVar3,param_2);\n  iVar2 = param_2 - iVar3;\n  if (iVar3 < rl_end - iVar2) {\n    lVar4 = (long)iVar3;\n    do {\n      *(undefined1 *)(rl_line_buffer + lVar4) =\n           *(undefined1 *)(rl_line_buffer + lVar4 + (long)iVar2);\n      lVar4 = lVar4 + 1;\n    } while ((int)lVar4 < rl_end - iVar2);\n  }\n  if (_rl_doing_an_undo == 0) {\n    rl_add_undo(0,iVar3,param_2,uVar1);\n  }\n  else {\n    xfree(uVar1);\n  }\n  rl_end = rl_end - iVar2;\n  *(undefined1 *)(rl_line_buffer + rl_end) = 0;\n  return iVar2;\n}" primitive_type (function_declarator "rl_delete_text(int param_1,int param_2)" identifier (parameter_list "(int param_1,int param_2)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "int param_2" primitive_type identifier) ))) (compound_statement "{\n  undefined8 uVar1;\n  int iVar2;\n  int iVar3;\n  long lVar4;\n  \n  iVar2 = param_1;\n  if (param_2 < param_1) {\n    iVar2 = param_2;\n    param_2 = param_1;\n  }\n  if ((rl_end < param_2) && (param_2 = rl_end, rl_end < iVar2)) {\n    iVar2 = rl_end;\n  }\n  iVar3 = 0;\n  if (-1 < iVar2) {\n    iVar3 = iVar2;\n  }\n  uVar1 = rl_copy_text(iVar3,param_2);\n  iVar2 = param_2 - iVar3;\n  if (iVar3 < rl_end - iVar2) {\n    lVar4 = (long)iVar3;\n    do {\n      *(undefined1 *)(rl_line_buffer + lVar4) =\n           *(undefined1 *)(rl_line_buffer + lVar4 + (long)iVar2);\n      lVar4 = lVar4 + 1;\n    } while ((int)lVar4 < rl_end - iVar2);\n  }\n  if (_rl_doing_an_undo == 0) {\n    rl_add_undo(0,iVar3,param_2,uVar1);\n  }\n  else {\n    xfree(uVar1);\n  }\n  rl_end = rl_end - iVar2;\n  *(undefined1 *)(rl_line_buffer + rl_end) = 0;\n  return iVar2;\n}" { (declaration "undefined8 uVar1;" type_identifier identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "long lVar4;" (sized_type_specifier "long" long) identifier ;) (expression_statement "iVar2 = param_1;" (assignment_expression "iVar2 = param_1" identifier = identifier) ;) (if_statement "if (param_2 < param_1) {\n    iVar2 = param_2;\n    param_2 = param_1;\n  }" if (parenthesized_expression "(param_2 < param_1)" ( (binary_expression "param_2 < param_1" identifier < identifier) )) (compound_statement "{\n    iVar2 = param_2;\n    param_2 = param_1;\n  }" { (expression_statement "iVar2 = param_2;" (assignment_expression "iVar2 = param_2" identifier = identifier) ;) (expression_statement "param_2 = param_1;" (assignment_expression "param_2 = param_1" identifier = identifier) ;) })) (if_statement "if ((rl_end < param_2) && (param_2 = rl_end, rl_end < iVar2)) {\n    iVar2 = rl_end;\n  }" if (parenthesized_expression "((rl_end < param_2) && (param_2 = rl_end, rl_end < iVar2))" ( (binary_expression "(rl_end < param_2) && (param_2 = rl_end, rl_end < iVar2)" (parenthesized_expression "(rl_end < param_2)" ( (binary_expression "rl_end < param_2" identifier < identifier) )) && (parenthesized_expression "(param_2 = rl_end, rl_end < iVar2)" ( (comma_expression "param_2 = rl_end, rl_end < iVar2" (assignment_expression "param_2 = rl_end" identifier = identifier) , (binary_expression "rl_end < iVar2" identifier < identifier)) ))) )) (compound_statement "{\n    iVar2 = rl_end;\n  }" { (expression_statement "iVar2 = rl_end;" (assignment_expression "iVar2 = rl_end" identifier = identifier) ;) })) (expression_statement "iVar3 = 0;" (assignment_expression "iVar3 = 0" identifier = number_literal) ;) (if_statement "if (-1 < iVar2) {\n    iVar3 = iVar2;\n  }" if (parenthesized_expression "(-1 < iVar2)" ( (binary_expression "-1 < iVar2" number_literal < identifier) )) (compound_statement "{\n    iVar3 = iVar2;\n  }" { (expression_statement "iVar3 = iVar2;" (assignment_expression "iVar3 = iVar2" identifier = identifier) ;) })) (expression_statement "uVar1 = rl_copy_text(iVar3,param_2);" (assignment_expression "uVar1 = rl_copy_text(iVar3,param_2)" identifier = (call_expression "rl_copy_text(iVar3,param_2)" identifier (argument_list "(iVar3,param_2)" ( identifier , identifier )))) ;) (expression_statement "iVar2 = param_2 - iVar3;" (assignment_expression "iVar2 = param_2 - iVar3" identifier = (binary_expression "param_2 - iVar3" identifier - identifier)) ;) (if_statement "if (iVar3 < rl_end - iVar2) {\n    lVar4 = (long)iVar3;\n    do {\n      *(undefined1 *)(rl_line_buffer + lVar4) =\n           *(undefined1 *)(rl_line_buffer + lVar4 + (long)iVar2);\n      lVar4 = lVar4 + 1;\n    } while ((int)lVar4 < rl_end - iVar2);\n  }" if (parenthesized_expression "(iVar3 < rl_end - iVar2)" ( (binary_expression "iVar3 < rl_end - iVar2" identifier < (binary_expression "rl_end - iVar2" identifier - identifier)) )) (compound_statement "{\n    lVar4 = (long)iVar3;\n    do {\n      *(undefined1 *)(rl_line_buffer + lVar4) =\n           *(undefined1 *)(rl_line_buffer + lVar4 + (long)iVar2);\n      lVar4 = lVar4 + 1;\n    } while ((int)lVar4 < rl_end - iVar2);\n  }" { (expression_statement "lVar4 = (long)iVar3;" (assignment_expression "lVar4 = (long)iVar3" identifier = (cast_expression "(long)iVar3" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier)) ;) (do_statement "do {\n      *(undefined1 *)(rl_line_buffer + lVar4) =\n           *(undefined1 *)(rl_line_buffer + lVar4 + (long)iVar2);\n      lVar4 = lVar4 + 1;\n    } while ((int)lVar4 < rl_end - iVar2);" do (compound_statement "{\n      *(undefined1 *)(rl_line_buffer + lVar4) =\n           *(undefined1 *)(rl_line_buffer + lVar4 + (long)iVar2);\n      lVar4 = lVar4 + 1;\n    }" { (expression_statement "*(undefined1 *)(rl_line_buffer + lVar4) =\n           *(undefined1 *)(rl_line_buffer + lVar4 + (long)iVar2);" (assignment_expression "*(undefined1 *)(rl_line_buffer + lVar4) =\n           *(undefined1 *)(rl_line_buffer + lVar4 + (long)iVar2)" (pointer_expression "*(undefined1 *)(rl_line_buffer + lVar4)" * (cast_expression "(undefined1 *)(rl_line_buffer + lVar4)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(rl_line_buffer + lVar4)" ( (binary_expression "rl_line_buffer + lVar4" identifier + identifier) )))) = (pointer_expression "*(undefined1 *)(rl_line_buffer + lVar4 + (long)iVar2)" * (cast_expression "(undefined1 *)(rl_line_buffer + lVar4 + (long)iVar2)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(rl_line_buffer + lVar4 + (long)iVar2)" ( (binary_expression "rl_line_buffer + lVar4 + (long)iVar2" (binary_expression "rl_line_buffer + lVar4" identifier + identifier) + (cast_expression "(long)iVar2" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier)) ))))) ;) (expression_statement "lVar4 = lVar4 + 1;" (assignment_expression "lVar4 = lVar4 + 1" identifier = (binary_expression "lVar4 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "((int)lVar4 < rl_end - iVar2)" ( (binary_expression "(int)lVar4 < rl_end - iVar2" (cast_expression "(int)lVar4" ( (type_descriptor "int" primitive_type) ) identifier) < (binary_expression "rl_end - iVar2" identifier - identifier)) )) ;) })) (if_statement "if (_rl_doing_an_undo == 0) {\n    rl_add_undo(0,iVar3,param_2,uVar1);\n  }\n  else {\n    xfree(uVar1);\n  }" if (parenthesized_expression "(_rl_doing_an_undo == 0)" ( (binary_expression "_rl_doing_an_undo == 0" identifier == number_literal) )) (compound_statement "{\n    rl_add_undo(0,iVar3,param_2,uVar1);\n  }" { (expression_statement "rl_add_undo(0,iVar3,param_2,uVar1);" (call_expression "rl_add_undo(0,iVar3,param_2,uVar1)" identifier (argument_list "(0,iVar3,param_2,uVar1)" ( number_literal , identifier , identifier , identifier ))) ;) }) (else_clause "else {\n    xfree(uVar1);\n  }" else (compound_statement "{\n    xfree(uVar1);\n  }" { (expression_statement "xfree(uVar1);" (call_expression "xfree(uVar1)" identifier (argument_list "(uVar1)" ( identifier ))) ;) }))) (expression_statement "rl_end = rl_end - iVar2;" (assignment_expression "rl_end = rl_end - iVar2" identifier = (binary_expression "rl_end - iVar2" identifier - identifier)) ;) (expression_statement "*(undefined1 *)(rl_line_buffer + rl_end) = 0;" (assignment_expression "*(undefined1 *)(rl_line_buffer + rl_end) = 0" (pointer_expression "*(undefined1 *)(rl_line_buffer + rl_end)" * (cast_expression "(undefined1 *)(rl_line_buffer + rl_end)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(rl_line_buffer + rl_end)" ( (binary_expression "rl_line_buffer + rl_end" identifier + identifier) )))) = number_literal) ;) (return_statement "return iVar2;" return identifier ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration (sized_type_specifier long) IDENT ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) })) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT < IDENT) )) && (parenthesized_expression ( (comma_expression (assignment_expression IDENT = IDENT) , (binary_expression IDENT < IDENT)) ))) )) (compound_statement { (expression_statement (assignment_expression IDENT = IDENT) ;) })) (expression_statement (assignment_expression IDENT = LIT) ;) (if_statement if (parenthesized_expression ( (binary_expression LIT < IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = IDENT) ;) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT )))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT - IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < (binary_expression IDENT - IDENT)) )) (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor (sized_type_specifier long)) ) IDENT)) ;) (do_statement do (compound_statement { (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + IDENT) )))) = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (binary_expression IDENT + IDENT) + (cast_expression ( (type_descriptor (sized_type_specifier long)) ) IDENT)) ))))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) }) while (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) < (binary_expression IDENT - IDENT)) )) ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( LIT , IDENT , IDENT , IDENT ))) ;) }) (else_clause else (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) }))) (expression_statement (assignment_expression IDENT = (binary_expression IDENT - IDENT)) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + IDENT) )))) = LIT) ;) (return_statement return IDENT ;) })))
(function_definition "int rl_delete_text(int param_1,int param_2)\n\n{\n  undefined8 uVar1;\n  int iVar2;\n  int iVar3;\n  long lVar4;\n  \n  iVar2 = param_1;\n  if (param_2 < param_1) {\n    iVar2 = param_2;\n    param_2 = param_1;\n  }\n  if ((rl_end < param_2) && (param_2 = rl_end, rl_end < iVar2)) {\n    iVar2 = rl_end;\n  }\n  iVar3 = 0;\n  if (-1 < iVar2) {\n    iVar3 = iVar2;\n  }\n  uVar1 = rl_copy_text(iVar3,param_2);\n  iVar2 = param_2 - iVar3;\n  if (iVar3 < rl_end - iVar2) {\n    lVar4 = (long)iVar3;\n    do {\n      *(undefined1 *)(rl_line_buffer + lVar4) =\n           *(undefined1 *)(rl_line_buffer + lVar4 + (long)iVar2);\n      lVar4 = lVar4 + 1;\n    } while ((int)lVar4 < rl_end - iVar2);\n  }\n  if (_rl_doing_an_undo == 0) {\n    rl_add_undo(0,iVar3,param_2,uVar1);\n  }\n  else {\n    xfree(uVar1);\n  }\n  rl_end = rl_end - iVar2;\n  *(undefined1 *)(rl_line_buffer + rl_end) = 0;\n  return iVar2;\n}" (primitive_type "int") (function_declarator "rl_delete_text(int param_1,int param_2)" (identifier "rl_delete_text") (parameter_list "(int param_1,int param_2)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) (, ",") (parameter_declaration "int param_2" (primitive_type "int") (identifier "param_2")) () ")"))) (compound_statement "{\n  undefined8 uVar1;\n  int iVar2;\n  int iVar3;\n  long lVar4;\n  \n  iVar2 = param_1;\n  if (param_2 < param_1) {\n    iVar2 = param_2;\n    param_2 = param_1;\n  }\n  if ((rl_end < param_2) && (param_2 = rl_end, rl_end < iVar2)) {\n    iVar2 = rl_end;\n  }\n  iVar3 = 0;\n  if (-1 < iVar2) {\n    iVar3 = iVar2;\n  }\n  uVar1 = rl_copy_text(iVar3,param_2);\n  iVar2 = param_2 - iVar3;\n  if (iVar3 < rl_end - iVar2) {\n    lVar4 = (long)iVar3;\n    do {\n      *(undefined1 *)(rl_line_buffer + lVar4) =\n           *(undefined1 *)(rl_line_buffer + lVar4 + (long)iVar2);\n      lVar4 = lVar4 + 1;\n    } while ((int)lVar4 < rl_end - iVar2);\n  }\n  if (_rl_doing_an_undo == 0) {\n    rl_add_undo(0,iVar3,param_2,uVar1);\n  }\n  else {\n    xfree(uVar1);\n  }\n  rl_end = rl_end - iVar2;\n  *(undefined1 *)(rl_line_buffer + rl_end) = 0;\n  return iVar2;\n}" ({ "{") (declaration "undefined8 uVar1;" (type_identifier "undefined8") (identifier "uVar1") (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (declaration "int iVar3;" (primitive_type "int") (identifier "iVar3") (; ";")) (declaration "long lVar4;" (sized_type_specifier "long" (long "long")) (identifier "lVar4") (; ";")) (expression_statement "iVar2 = param_1;" (assignment_expression "iVar2 = param_1" (identifier "iVar2") (= "=") (identifier "param_1")) (; ";")) (if_statement "if (param_2 < param_1) {\n    iVar2 = param_2;\n    param_2 = param_1;\n  }" (if "if") (parenthesized_expression "(param_2 < param_1)" (( "(") (binary_expression "param_2 < param_1" (identifier "param_2") (< "<") (identifier "param_1")) () ")")) (compound_statement "{\n    iVar2 = param_2;\n    param_2 = param_1;\n  }" ({ "{") (expression_statement "iVar2 = param_2;" (assignment_expression "iVar2 = param_2" (identifier "iVar2") (= "=") (identifier "param_2")) (; ";")) (expression_statement "param_2 = param_1;" (assignment_expression "param_2 = param_1" (identifier "param_2") (= "=") (identifier "param_1")) (; ";")) (} "}"))) (if_statement "if ((rl_end < param_2) && (param_2 = rl_end, rl_end < iVar2)) {\n    iVar2 = rl_end;\n  }" (if "if") (parenthesized_expression "((rl_end < param_2) && (param_2 = rl_end, rl_end < iVar2))" (( "(") (binary_expression "(rl_end < param_2) && (param_2 = rl_end, rl_end < iVar2)" (parenthesized_expression "(rl_end < param_2)" (( "(") (binary_expression "rl_end < param_2" (identifier "rl_end") (< "<") (identifier "param_2")) () ")")) (&& "&&") (parenthesized_expression "(param_2 = rl_end, rl_end < iVar2)" (( "(") (comma_expression "param_2 = rl_end, rl_end < iVar2" (assignment_expression "param_2 = rl_end" (identifier "param_2") (= "=") (identifier "rl_end")) (, ",") (binary_expression "rl_end < iVar2" (identifier "rl_end") (< "<") (identifier "iVar2"))) () ")"))) () ")")) (compound_statement "{\n    iVar2 = rl_end;\n  }" ({ "{") (expression_statement "iVar2 = rl_end;" (assignment_expression "iVar2 = rl_end" (identifier "iVar2") (= "=") (identifier "rl_end")) (; ";")) (} "}"))) (expression_statement "iVar3 = 0;" (assignment_expression "iVar3 = 0" (identifier "iVar3") (= "=") (number_literal "0")) (; ";")) (if_statement "if (-1 < iVar2) {\n    iVar3 = iVar2;\n  }" (if "if") (parenthesized_expression "(-1 < iVar2)" (( "(") (binary_expression "-1 < iVar2" (number_literal "-1") (< "<") (identifier "iVar2")) () ")")) (compound_statement "{\n    iVar3 = iVar2;\n  }" ({ "{") (expression_statement "iVar3 = iVar2;" (assignment_expression "iVar3 = iVar2" (identifier "iVar3") (= "=") (identifier "iVar2")) (; ";")) (} "}"))) (expression_statement "uVar1 = rl_copy_text(iVar3,param_2);" (assignment_expression "uVar1 = rl_copy_text(iVar3,param_2)" (identifier "uVar1") (= "=") (call_expression "rl_copy_text(iVar3,param_2)" (identifier "rl_copy_text") (argument_list "(iVar3,param_2)" (( "(") (identifier "iVar3") (, ",") (identifier "param_2") () ")")))) (; ";")) (expression_statement "iVar2 = param_2 - iVar3;" (assignment_expression "iVar2 = param_2 - iVar3" (identifier "iVar2") (= "=") (binary_expression "param_2 - iVar3" (identifier "param_2") (- "-") (identifier "iVar3"))) (; ";")) (if_statement "if (iVar3 < rl_end - iVar2) {\n    lVar4 = (long)iVar3;\n    do {\n      *(undefined1 *)(rl_line_buffer + lVar4) =\n           *(undefined1 *)(rl_line_buffer + lVar4 + (long)iVar2);\n      lVar4 = lVar4 + 1;\n    } while ((int)lVar4 < rl_end - iVar2);\n  }" (if "if") (parenthesized_expression "(iVar3 < rl_end - iVar2)" (( "(") (binary_expression "iVar3 < rl_end - iVar2" (identifier "iVar3") (< "<") (binary_expression "rl_end - iVar2" (identifier "rl_end") (- "-") (identifier "iVar2"))) () ")")) (compound_statement "{\n    lVar4 = (long)iVar3;\n    do {\n      *(undefined1 *)(rl_line_buffer + lVar4) =\n           *(undefined1 *)(rl_line_buffer + lVar4 + (long)iVar2);\n      lVar4 = lVar4 + 1;\n    } while ((int)lVar4 < rl_end - iVar2);\n  }" ({ "{") (expression_statement "lVar4 = (long)iVar3;" (assignment_expression "lVar4 = (long)iVar3" (identifier "lVar4") (= "=") (cast_expression "(long)iVar3" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (identifier "iVar3"))) (; ";")) (do_statement "do {\n      *(undefined1 *)(rl_line_buffer + lVar4) =\n           *(undefined1 *)(rl_line_buffer + lVar4 + (long)iVar2);\n      lVar4 = lVar4 + 1;\n    } while ((int)lVar4 < rl_end - iVar2);" (do "do") (compound_statement "{\n      *(undefined1 *)(rl_line_buffer + lVar4) =\n           *(undefined1 *)(rl_line_buffer + lVar4 + (long)iVar2);\n      lVar4 = lVar4 + 1;\n    }" ({ "{") (expression_statement "*(undefined1 *)(rl_line_buffer + lVar4) =\n           *(undefined1 *)(rl_line_buffer + lVar4 + (long)iVar2);" (assignment_expression "*(undefined1 *)(rl_line_buffer + lVar4) =\n           *(undefined1 *)(rl_line_buffer + lVar4 + (long)iVar2)" (pointer_expression "*(undefined1 *)(rl_line_buffer + lVar4)" (* "*") (cast_expression "(undefined1 *)(rl_line_buffer + lVar4)" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(rl_line_buffer + lVar4)" (( "(") (binary_expression "rl_line_buffer + lVar4" (identifier "rl_line_buffer") (+ "+") (identifier "lVar4")) () ")")))) (= "=") (pointer_expression "*(undefined1 *)(rl_line_buffer + lVar4 + (long)iVar2)" (* "*") (cast_expression "(undefined1 *)(rl_line_buffer + lVar4 + (long)iVar2)" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(rl_line_buffer + lVar4 + (long)iVar2)" (( "(") (binary_expression "rl_line_buffer + lVar4 + (long)iVar2" (binary_expression "rl_line_buffer + lVar4" (identifier "rl_line_buffer") (+ "+") (identifier "lVar4")) (+ "+") (cast_expression "(long)iVar2" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (identifier "iVar2"))) () ")"))))) (; ";")) (expression_statement "lVar4 = lVar4 + 1;" (assignment_expression "lVar4 = lVar4 + 1" (identifier "lVar4") (= "=") (binary_expression "lVar4 + 1" (identifier "lVar4") (+ "+") (number_literal "1"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "((int)lVar4 < rl_end - iVar2)" (( "(") (binary_expression "(int)lVar4 < rl_end - iVar2" (cast_expression "(int)lVar4" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "lVar4")) (< "<") (binary_expression "rl_end - iVar2" (identifier "rl_end") (- "-") (identifier "iVar2"))) () ")")) (; ";")) (} "}"))) (if_statement "if (_rl_doing_an_undo == 0) {\n    rl_add_undo(0,iVar3,param_2,uVar1);\n  }\n  else {\n    xfree(uVar1);\n  }" (if "if") (parenthesized_expression "(_rl_doing_an_undo == 0)" (( "(") (binary_expression "_rl_doing_an_undo == 0" (identifier "_rl_doing_an_undo") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    rl_add_undo(0,iVar3,param_2,uVar1);\n  }" ({ "{") (expression_statement "rl_add_undo(0,iVar3,param_2,uVar1);" (call_expression "rl_add_undo(0,iVar3,param_2,uVar1)" (identifier "rl_add_undo") (argument_list "(0,iVar3,param_2,uVar1)" (( "(") (number_literal "0") (, ",") (identifier "iVar3") (, ",") (identifier "param_2") (, ",") (identifier "uVar1") () ")"))) (; ";")) (} "}")) (else_clause "else {\n    xfree(uVar1);\n  }" (else "else") (compound_statement "{\n    xfree(uVar1);\n  }" ({ "{") (expression_statement "xfree(uVar1);" (call_expression "xfree(uVar1)" (identifier "xfree") (argument_list "(uVar1)" (( "(") (identifier "uVar1") () ")"))) (; ";")) (} "}")))) (expression_statement "rl_end = rl_end - iVar2;" (assignment_expression "rl_end = rl_end - iVar2" (identifier "rl_end") (= "=") (binary_expression "rl_end - iVar2" (identifier "rl_end") (- "-") (identifier "iVar2"))) (; ";")) (expression_statement "*(undefined1 *)(rl_line_buffer + rl_end) = 0;" (assignment_expression "*(undefined1 *)(rl_line_buffer + rl_end) = 0" (pointer_expression "*(undefined1 *)(rl_line_buffer + rl_end)" (* "*") (cast_expression "(undefined1 *)(rl_line_buffer + rl_end)" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(rl_line_buffer + rl_end)" (( "(") (binary_expression "rl_line_buffer + rl_end" (identifier "rl_line_buffer") (+ "+") (identifier "rl_end")) () ")")))) (= "=") (number_literal "0")) (; ";")) (return_statement "return iVar2;" (return "return") (identifier "iVar2") (; ";")) (} "}")))

type_1 function_1(type_1 var_2,type_1 var_1)

{
  char *text;
  type_1 var_7;
  type_1 var_6;
  long var_8;
  type_1 var_4;
  
  var_4 = var_1;
  if (var_1 < var_2) {
    var_4 = var_2;
    var_2 = var_1;
  }
  if ((var_3 < var_4) && (var_4 = var_3, var_3 < var_2)) {
    var_2 = var_3;
  }
  var_6 = L'\0';
  if (L'\xffffffff' < var_2) {
    var_6 = var_2;
  }
  text = var_5(var_6,var_4);
  var_7 = var_4 - var_6;
  if (var_6 < var_3 - var_7) {
    var_8 = (long)var_6;
    do {
      rl_line_buffer[var_8] = rl_line_buffer[var_7 + var_8];
      var_8 = var_8 + 1;
    } while ((int)var_8 < var_3 - var_7);
  }
  if (var_9 == 0) {
    var_10(UNDO_DELETE,var_6,var_4,text);
  }
  else {
    var_11(text);
  }
  var_3 = var_3 - var_7;
  rl_line_buffer[var_3] = '\0';
  return var_7;
}


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

int MASKED(int param_1,int param_2)

{
  undefined8 uVar1;
  int iVar2;
  int iVar3;
  long lVar4;
  
  iVar2 = param_1;
  if (param_2 < param_1) {
    iVar2 = param_2;
    param_2 = param_1;
  }
  if ((rl_end < param_2) && (param_2 = rl_end, rl_end < iVar2)) {
    iVar2 = rl_end;
  }
  iVar3 = 0;
  if (-1 < iVar2) {
    iVar3 = iVar2;
  }
  uVar1 = rl_copy_text(iVar3,param_2);
  iVar2 = param_2 - iVar3;
  if (iVar3 < rl_end - iVar2) {
    lVar4 = (long)iVar3;
    do {
      *(undefined1 *)(rl_line_buffer + lVar4) =
           *(undefined1 *)(rl_line_buffer + lVar4 + (long)iVar2);
      lVar4 = lVar4 + 1;
    } while ((int)lVar4 < rl_end - iVar2);
  }
  if (_rl_doing_an_undo == 0) {
    rl_add_undo(0,iVar3,param_2,uVar1);
  }
  else {
    xfree(uVar1);
  }
  rl_end = rl_end - iVar2;
  *(undefined1 *)(rl_line_buffer + rl_end) = 0;
  return iVar2;
}

