// File: /workspace/github_c_makefile_star2_O2/justy989[P]ce/ce_vim.c
// Function: ce_vim_verb_unindent
bool ce_vim_verb_unindent(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 = false;
     ce_range_sort(&motion_range);
     CePoint_t end_cursor = {cursor->x - config_options->tab_width, cursor->y};
     if(end_cursor.x < 0) end_cursor.x = 0;
     for(int64_t i = motion_range.start.y; i <= motion_range.end.y; i++){
          // calc indentation
          CePoint_t indentation_point = {0, i};
          int64_t tab_width = 0;

          // figure out how much we can unindent
          for(int64_t s = 0; s < config_options->tab_width; s++){
               if(isblank((int)(view->buffer->lines[i][s]))){
                    tab_width++;
               }else{
                    break;
               }
          }

          if(tab_width && tab_width < 255){
               // build indentation string
               char remove_string[256];
               memset(remove_string, ' ', tab_width);
               remove_string[tab_width] = 0;

               ce_buffer_remove_string_change(view->buffer, indentation_point, strlen(remove_string), cursor, *cursor, chain);
               chain = true;
          }
     }

     if(vim->mode == CE_VIM_MODE_VISUAL_LINE) end_cursor.y = motion_range.start.y;
     if(chain) *cursor = end_cursor; // if we did any indentation at all, update the cursor
     vim->mode = CE_VIM_MODE_NORMAL;
     return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x148, %rsp            # imm = 0x148
movq %rcx, %r14
movq %rdx, %r12
movq %rdi, 0x38(%rsp)
movq 0x1a0(%rsp), %r15
leaq 0x180(%rsp), %rbx
movq %rbx, %rdi
callq 0x1021f
movq (%r14), %rax
movq %rax, 0x28(%rsp)
movq %r14, 0x18(%rsp)
movq 0x8(%r14), %rax
movq %rax, 0x30(%rsp)
movq 0x8(%r15), %rax
movq %rax, 0x20(%rsp)
movq 0x8(%rbx), %r13
xorl %r15d, %r15d
leaq 0x180(%rsp), %rax
cmpq 0x18(%rax), %r13
jg 0x2623d
movq 0x1a0(%rsp), %rax
movq 0x8(%rax), %rbp
testq %rbp, %rbp
movl $0x0, %eax
cmovleq %rax, %rbp
xorl %ebx, %ebx
cmpq %rbx, %rbp
je 0x261dc
callq 0xd720
movq (%rax), %rax
movq 0x40(%r12), %rcx
movq (%rcx), %rcx
movq (%rcx,%r13,8), %rcx
movsbq (%rcx,%rbx), %rcx
testb $0x1, (%rax,%rcx,2)
je 0x261d9
incq %rbx
jmp 0x261b0
movq %rbx, %rbp
leaq -0x1(%rbp), %rax
cmpq $0xfd, %rax
ja 0x26235
leaq 0x40(%rsp), %r14
movq %r14, %rdi
pushq $0x20
popq %rsi
movq %rbp, %rdx
callq 0xd2a0
movb $0x0, 0x40(%rsp,%rbp)
movq 0x40(%r12), %rbx
movq %r14, %rdi
callq 0xd210
movq 0x18(%rsp), %r8
movups (%r8), %xmm0
movups %xmm0, (%rsp)
movzbl %r15b, %r9d
andl $0x1, %r9d
movq %rbx, %rdi
xorl %esi, %esi
movq %r13, %rdx
movq %rax, %rcx
callq 0xf77c
movb $0x1, %r15b
incq %r13
jmp 0x26184
testb $0x1, %r15b
movq 0x38(%rsp), %rcx
je 0x2627d
movq 0x28(%rsp), %rdx
subq 0x20(%rsp), %rdx
xorl %eax, %eax
testq %rdx, %rdx
cmovgq %rdx, %rax
cmpl $0x3, (%rcx)
movq 0x30(%rsp), %rdx
jne 0x26271
leaq 0x180(%rsp), %rdx
movq 0x8(%rdx), %rdx
movq 0x18(%rsp), %rsi
movq %rax, (%rsi)
movq %rdx, 0x8(%rsi)
andl $0x0, (%rcx)
movb $0x1, %al
addq $0x148, %rsp            # imm = 0x148
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq