// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0xd0, %rsp
movq %rdi, %rax
movq 0x30(%rbp), %rdi
leaq 0x10(%rbp), %rdi
movq %rdi, -0xc8(%rbp)
movq %rax, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movq %r9, -0x38(%rbp)
movb $0x0, -0x39(%rbp)
callq 0x12840
movq -0xc8(%rbp), %rax
movq -0x28(%rbp), %rcx
movq (%rcx), %rdx
movq %rdx, -0x50(%rbp)
movq 0x8(%rcx), %rcx
movq %rcx, -0x48(%rbp)
movq 0x8(%rax), %rax
movq %rax, -0x58(%rbp)
movq -0xc8(%rbp), %rcx
movq -0x58(%rbp), %rax
cmpq 0x18(%rcx), %rax
jg 0x3ad0a
movq -0x20(%rbp), %rax
movq 0x40(%rax), %rax
movq (%rax), %rax
movq -0x58(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
jne 0x3abb5
jmp 0x3acf9
movq $0x0, -0x68(%rbp)
movq -0x58(%rbp), %rax
movq %rax, -0x60(%rbp)
movq 0x30(%rbp), %rax
movq 0x8(%rax), %rdi
addq $0x1, %rdi
callq 0xd4a0
movq %rax, -0x70(%rbp)
movq -0x70(%rbp), %rdi
movq 0x30(%rbp), %rax
movq 0x8(%rax), %rdx
movl $0x20, %esi
callq 0xd290
movq -0x70(%rbp), %rax
movq 0x30(%rbp), %rcx
movq 0x8(%rcx), %rcx
movb $0x0, (%rax,%rcx)
movq -0x20(%rbp), %rax
movq 0x40(%rax), %rdi
movq -0x70(%rbp), %rsi
movq -0x68(%rbp), %rdx
movq -0x60(%rbp), %rcx
callq 0xda70
testb $0x1, %al
jne 0x3ac26
movb $0x0, -0x1(%rbp)
jmp 0x3ad49
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rax
cmpq -0x58(%rbp), %rax
jne 0x3ac6c
movq -0x20(%rbp), %rax
movq 0x40(%rax), %rdi
movq -0x28(%rbp), %rax
movq 0x30(%rbp), %rcx
movq 0x8(%rcx), %rcx
movq (%rax), %rsi
movq 0x8(%rax), %rdx
callq 0xfaf0
movq %rax, -0x80(%rbp)
movq %rdx, -0x78(%rbp)
movq -0x80(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x78(%rbp), %rax
movq %rax, -0x48(%rbp)
leaq -0xc0(%rbp), %rdi
xorl %esi, %esi
movl $0x40, %edx
callq 0xd290
movb -0x39(%rbp), %al
andb $0x1, %al
movb %al, -0xc0(%rbp)
movb $0x1, -0xbf(%rbp)
movq -0x70(%rbp), %rax
movq %rax, -0xb8(%rbp)
movq -0x68(%rbp), %rax
movq %rax, -0xb0(%rbp)
movq -0x60(%rbp), %rax
movq %rax, -0xa8(%rbp)
movq -0x28(%rbp), %rax
movq (%rax), %rcx
movq %rcx, -0xa0(%rbp)
movq 0x8(%rax), %rax
movq %rax, -0x98(%rbp)
movq -0x50(%rbp), %rax
movq %rax, -0x90(%rbp)
movq -0x48(%rbp), %rax
movq %rax, -0x88(%rbp)
movq -0x20(%rbp), %rax
movq 0x40(%rax), %rdi
leaq -0xc0(%rbp), %rsi
callq 0x10e90
movb $0x1, -0x39(%rbp)
movq -0x58(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x58(%rbp)
jmp 0x3ab80
movq -0x10(%rbp), %rax
cmpl $0x3, (%rax)
jne 0x3ad22
movq -0xc8(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x48(%rbp)
testb $0x1, -0x39(%rbp)
je 0x3ad3b
movq -0x28(%rbp), %rax
movq -0x50(%rbp), %rcx
movq %rcx, (%rax)
movq -0x48(%rbp), %rcx
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
movl $0x0, (%rax)
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0xd0, %rsp
popq %rbp
retq
nopw (%rax,%rax)