// File: /workspace/github_c_makefile_star2_O3/justy989[P]ce/ce_vim.c
// Function: ce_vim_verb_indent
bool ce_vim_verb_indent(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;

     for(int64_t i = motion_range.start.y; i <= motion_range.end.y; i++){
          if(view->buffer->lines[i][0] == 0) continue;

          // calc indentation
          CePoint_t indentation_point = {0, i};

          // build indentation string
          char* insert_string = malloc(config_options->tab_width + 1);
          memset(insert_string, ' ', config_options->tab_width);
          insert_string[config_options->tab_width] = 0;

          // insert indentation
          if(!ce_buffer_insert_string(view->buffer, insert_string, indentation_point)) return false;

          if(cursor->y == i){
               end_cursor = ce_buffer_advance_point(view->buffer, *cursor, config_options->tab_width);
          }

          // commit the change
          CeBufferChange_t change = {};
          change.chain = chain;
          change.insertion = true;
          change.string = insert_string;
          change.location = indentation_point;
          change.cursor_before = *cursor;
          change.cursor_after = end_cursor;
          ce_buffer_change(view->buffer, &change);
          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 $0x68, %rsp
movq %rcx, %r15
movq %rdx, %r12
movq %rdi, %rbx
leaq 0xa0(%rsp), %r14
movq %r14, %rdi
callq 0x10614
movq 0x8(%r14), %rbp
movq 0x18(%r14), %rax
cmpq %rax, %rbp
jg 0x29155
movq %rbx, 0x18(%rsp)
movq (%r15), %rcx
movq %rcx, 0x10(%rsp)
movq 0x8(%r15), %rcx
movq %rcx, 0x8(%rsp)
xorl %edx, %edx
movq %r15, %rbx
movq 0x40(%r12), %r13
movq (%r13), %rcx
movq (%rcx,%rbp,8), %rcx
cmpb $0x0, (%rcx)
je 0x29111
movq %rdx, 0x20(%rsp)
movq %r12, %r14
movq %rbx, %r12
movq 0xc0(%rsp), %rax
movq 0x8(%rax), %rbx
leaq 0x1(%rbx), %rdi
callq 0xd4c0
movq %rax, %r15
movq %rax, %rdi
movl $0x20, %esi
movq %rbx, %rdx
callq 0xd2a0
movb $0x0, (%r15,%rbx)
xorl %ebx, %ebx
movq %r13, %rdi
movq %r15, %rsi
xorl %edx, %edx
movq %rbp, %rcx
callq 0xda6e
testb %al, %al
je 0x2915d
movq %r12, %rbx
cmpq 0x8(%r12), %rbp
movq %r14, %r12
jne 0x290ae
movq 0x40(%r12), %rdi
movq 0xc0(%rsp), %rax
movq 0x8(%rax), %rcx
movq (%rbx), %rsi
movq %rbp, %rdx
callq 0xee7a
movq %rax, 0x10(%rsp)
movq %rdx, 0x8(%rsp)
xorl %eax, %eax
movq %rax, 0x28(%rsp)
movq 0x20(%rsp), %rcx
andb $0x1, %cl
movb %cl, 0x28(%rsp)
movb $0x1, 0x29(%rsp)
movq %r15, 0x30(%rsp)
movq %rax, 0x38(%rsp)
movq %rbp, 0x40(%rsp)
movups (%rbx), %xmm0
leaq 0x48(%rsp), %rax
movups %xmm0, (%rax)
movq 0x10(%rsp), %rax
movq %rax, 0x58(%rsp)
movq 0x8(%rsp), %rax
movq %rax, 0x60(%rsp)
movq 0x40(%r12), %rdi
leaq 0x28(%rsp), %rsi
callq 0xf976
leaq 0xa0(%rsp), %rax
movq 0x18(%rax), %rax
movb $0x1, %dl
leaq 0x1(%rbp), %rcx
cmpq %rax, %rbp
movq %rcx, %rbp
jl 0x29013
testb $0x1, %dl
movq %rbx, %rax
movq 0x18(%rsp), %rbx
je 0x29155
cmpl $0x3, (%rbx)
jne 0x29144
leaq 0xa0(%rsp), %rcx
movq 0x8(%rcx), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rsp), %rcx
movq %rcx, (%rax)
movq 0x8(%rsp), %rcx
movq %rcx, 0x8(%rax)
movl $0x0, (%rbx)
movb $0x1, %bl
movl %ebx, %eax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq