// File: /workspace/github_c_makefile_star2_O1/justy989[P]ce/ce_vim.c
// Function: ce_vim_verb_flip_case
bool ce_vim_verb_flip_case(CeVim_t* vim, const CeVimAction_t* action, CeRange_t motion_range, CeView_t* view,
                           CePoint_t* cursor, CeVimVisualData_t* visual, CeVimBufferData_t* buffer_data,
                           const CeConfigOptions_t* config_options){
     bool chain_undo = false;
     while(!ce_points_equal(motion_range.start, motion_range.end)){
          // do nothing if we aren't on the buffer, or the line is empty
          if(!ce_buffer_contains_point(view->buffer, motion_range.start)){
               motion_range.start = ce_buffer_advance_point(view->buffer, motion_range.start, 1);
               continue;
          }else if(view->buffer->lines[motion_range.start.y][0] == 0){
               motion_range.start = ce_buffer_advance_point(view->buffer, motion_range.start, 1);
               continue;
          }

          CeRune_t flipped = ce_buffer_get_rune(view->buffer, motion_range.start);
          if(flipped == CE_UTF8_INVALID) return false;

          if(isupper(flipped)){
               flipped = tolower(flipped);
          }else{
               flipped = toupper(flipped);
          }

          if(!change_character(view, cursor, motion_range.start, flipped, chain_undo)) return false;

          motion_range.start = ce_buffer_advance_point(view->buffer, motion_range.start, 1);
          if(motion_range.start.x == -1) return false;
          chain_undo = true;
     }

     *cursor = motion_range.end;
     return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, 0x8(%rsp)
movq %rdx, %r14
leaq 0x50(%rsp), %rax
movq 0x10(%rax), %r15
movq 0x18(%rax), %r12
movq (%rax), %rbp
movq 0x8(%rax), %r13
movq %rbp, %rdi
movq %r13, %rsi
movq %r15, %rdx
movq %r12, %rcx
callq 0xf1d6
movl %eax, %ebx
testb %al, %al
jne 0x29521
movl $0x0, 0x4(%rsp)
movq %r12, 0x10(%rsp)
movq 0x40(%r14), %rdi
movq %rbp, %rsi
movq %r13, %rdx
callq 0xe446
movq 0x40(%r14), %rdi
testb %al, %al
je 0x29480
movq (%rdi), %rax
movq (%rax,%r13,8), %rax
cmpb $0x0, (%rax)
je 0x29480
movq %r15, %r12
movq %rbp, %rsi
movq %r13, %rdx
callq 0xe54e
cmpl $-0x1, %eax
je 0x294f8
movl %eax, %r15d
callq 0xd720
movq (%rax), %rax
movslq %r15d, %rcx
testb $0x1, 0x1(%rax,%rcx,2)
jne 0x29498
movl %r15d, %edi
callq 0xd110
jmp 0x294a0
movl $0x1, %ecx
movq %rbp, %rsi
movq %r13, %rdx
callq 0xeffa
movq %rax, %rbp
movq %rdx, %r13
jmp 0x29506
movl %r15d, %edi
callq 0xd480
movzbl 0x4(%rsp), %r15d
movl %r15d, %r9d
andl $0x1, %r9d
movq %r14, %rdi
movq 0x8(%rsp), %rsi
movq %rbp, %rdx
movq %r13, %rcx
movl %eax, %r8d
callq 0x2983d
testb %al, %al
je 0x294f8
movq 0x40(%r14), %rdi
movl $0x1, %ecx
movq %rbp, %rsi
movq %r13, %rdx
callq 0xeffa
movq %rax, %rbp
movq %rdx, %r13
cmpq $-0x1, %rax
setne %al
movl $0x1, %ecx
cmovnel %ecx, %r15d
movl %r15d, 0x4(%rsp)
jmp 0x294fa
xorl %eax, %eax
movq %r12, %r15
testb %al, %al
movq 0x10(%rsp), %r12
je 0x2954d
movq %rbp, %rdi
movq %r13, %rsi
movq %r15, %rdx
movq %r12, %rcx
callq 0xf1d6
movl %eax, %ebx
testb %al, %al
je 0x29427
leaq 0x50(%rsp), %rax
movq %rbp, (%rax)
movq %r13, 0x8(%rax)
movups 0x10(%rax), %xmm0
movq 0x8(%rsp), %rax
movups %xmm0, (%rax)
andb $0x1, %bl
movl %ebx, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x50(%rsp), %rax
movq %rbp, (%rax)
movq %r13, 0x8(%rax)
jmp 0x29539