// File: /workspace/github_c_makefile_star2_O2/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, %rbx
movq %rdx, %r12
movq %rdi, 0x18(%rsp)
leaq 0xa0(%rsp), %r14
movq %r14, %rdi
callq 0x1021f
movq (%rbx), %rax
movq %rax, 0x8(%rsp)
movq 0x8(%rbx), %rax
movq %rax, (%rsp)
movq 0x8(%r14), %r15
xorl %ecx, %ecx
movq %r12, 0x10(%rsp)
leaq 0xa0(%rsp), %rax
movq 0x18(%rax), %r13
cmpq %r13, %r15
jg 0x260e3
movq 0x40(%r12), %rbp
movq (%rbp), %rax
movq (%rax,%r15,8), %rax
cmpb $0x0, (%rax)
je 0x260db
movq %rcx, 0x20(%rsp)
movq %rbx, %r14
movq 0xc0(%rsp), %rax
movq 0x8(%rax), %rbx
leaq 0x1(%rbx), %rdi
callq 0xd4c0
movq %rax, %r12
movq %rax, %rdi
pushq $0x20
popq %rsi
movq %rbx, %rdx
callq 0xd2a0
movb $0x0, (%r12,%rbx)
movq %rbp, %rdi
movq %r12, %rsi
xorl %edx, %edx
movq %r15, %rcx
callq 0xd9ef
testb %al, %al
je 0x26115
movq %r14, %rbx
cmpq 0x8(%r14), %r15
jne 0x26081
movq 0x10(%rsp), %rax
movq 0x40(%rax), %rdi
movq 0xc0(%rsp), %rax
movq 0x8(%rax), %rcx
movq (%rbx), %rsi
movq %r15, %rdx
callq 0xec3a
movq %rax, 0x8(%rsp)
movq %rdx, (%rsp)
andq $0x0, 0x28(%rsp)
movq 0x20(%rsp), %rax
andb $0x1, %al
movb %al, 0x28(%rsp)
movb $0x1, 0x29(%rsp)
movq %r12, 0x30(%rsp)
andq $0x0, 0x38(%rsp)
movq %r15, 0x40(%rsp)
movups (%rbx), %xmm0
leaq 0x48(%rsp), %rax
movups %xmm0, (%rax)
movq 0x8(%rsp), %rax
movq %rax, 0x58(%rsp)
movq (%rsp), %rax
movq %rax, 0x60(%rsp)
movq 0x10(%rsp), %r12
movq 0x40(%r12), %rdi
leaq 0x28(%rsp), %rsi
callq 0xf64d
movb $0x1, %cl
incq %r15
jmp 0x25fd9
testb $0x1, %cl
movq 0x18(%rsp), %rax
je 0x26112
cmpl $0x3, (%rax)
jne 0x26102
leaq 0xa0(%rsp), %rcx
movq 0x8(%rcx), %rcx
movq %rcx, (%rsp)
movq 0x8(%rsp), %rcx
movq %rcx, (%rbx)
movq (%rsp), %rcx
movq %rcx, 0x8(%rbx)
andl $0x0, (%rax)
cmpq %r13, %r15
setg %al
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq