// File: /workspace/github_c_makefile_star2_O3/justy989[P]ce/ce_vim.c
// Function: ce_vim_move_begin_big_word
CePoint_t ce_vim_move_begin_big_word(CeBuffer_t* buffer, CePoint_t start){
     start.x--;
     if(!ce_buffer_point_is_valid(buffer, start)){
          if(start.x == -1){
               start.y--;
               if(start.y < 0) return (CePoint_t){0, 0};
               start.x = ce_utf8_strlen(buffer->lines[start.y]);
               if(start.x > 0) start.x--;
               else return start;
          }else{
               return (CePoint_t){-1, -1};
          }
     }

     char* line_start = buffer->lines[start.y];
     char* itr = ce_utf8_iterate_to(line_start, start.x); // start one character back

     int64_t rune_len = 0;
     CeRune_t rune = ce_utf8_decode_reverse(itr, line_start, &rune_len);
     WordState_t state = WORD_INSIDE_OTHER;

     if(isspace(rune)){
          state = WORD_INSIDE_SPACE;
     }else{
          if(start.x == 0) return start;
          state = WORD_INSIDE_WORD;
     }

     itr -= rune_len;

     while(true){
          rune = ce_utf8_decode_reverse(itr, line_start, &rune_len);

          switch(state){
          default:
               assert(0);
               break;
          case WORD_INSIDE_WORD:
               if(isspace(rune)) goto END_LOOP;
               break;
          case WORD_INSIDE_SPACE:
               if(!isspace(rune)) state = WORD_INSIDE_WORD;
               break;
          case WORD_NEW_LINE:
               if(isspace(rune)) state = WORD_INSIDE_SPACE;
               else state = WORD_INSIDE_WORD;
               break;
          }

          itr -= rune_len;
          start.x--;

          if(itr < line_start){
               if(state == WORD_INSIDE_WORD) break;

               start.y--;
               if(start.y < 0) return (CePoint_t){0, 0};
               start.x = ce_utf8_strlen(buffer->lines[start.y]);
               if(start.x == 0) break;
               line_start = buffer->lines[start.y];
               itr = ce_utf8_iterate_to(line_start, start.x);
               state = WORD_NEW_LINE;
               start.x++;
          }
     }

END_LOOP:

     return start;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r12
leaq -0x1(%rsi), %r14
movq %r14, %rsi
callq 0xe4d4
testq %rax, %rax
je 0x26a76
movq %r12, 0x10(%rsp)
movq (%r12), %rax
movq %rbx, (%rsp)
movq (%rax,%rbx,8), %r13
movq %r13, %rdi
movq %r14, %rsi
callq 0xe577
movq %rax, %rbp
leaq 0x8(%rsp), %rdx
movq $0x0, (%rdx)
movq %rax, %rdi
movq %r13, %rsi
callq 0x100aa
movl %eax, %r15d
callq 0xd720
movq %rax, %r12
movq (%rax), %rax
movslq %r15d, %rcx
movl $0x1, %ebx
testb $0x20, 0x1(%rax,%rcx,2)
jne 0x269a9
xorl %ebx, %ebx
testq %r14, %r14
je 0x26aaf
leaq 0x8(%rsp), %r15
subq (%r15), %rbp
movq %rbp, %rdi
movq %r13, %rsi
movq %r15, %rdx
callq 0x100aa
testl %ebx, %ebx
je 0x26a54
cmpl $0x1, %ebx
je 0x269d5
cmpl $0x3, %ebx
jne 0x26ade
movq (%r12), %rcx
cltq
movzwl (%rcx,%rax,2), %eax
andl $0x2000, %eax           # imm = 0x2000
movl %eax, %ebx
shrl $0xd, %ebx
subq 0x8(%rsp), %rbp
decq %r14
cmpq %r13, %rbp
jae 0x269b1
testw %ax, %ax
je 0x26ab2
movq (%rsp), %rbx
testq %rbx, %rbx
jle 0x26ad2
decq %rbx
movq 0x10(%rsp), %r13
movq (%r13), %rax
movq (%rax,%rbx,8), %rdi
callq 0xe445
testq %rax, %rax
je 0x26ad9
movq %rax, %r14
movq (%r13), %rax
movq %rbx, (%rsp)
movq (%rax,%rbx,8), %r13
movq %r13, %rdi
movq %r14, %rsi
callq 0xe577
movq %rax, %rbp
incq %r14
movl $0x3, %ebx
jmp 0x269b1
movq (%r12), %rcx
cltq
testb $0x20, 0x1(%rcx,%rax,2)
jne 0x26ab2
subq 0x8(%rsp), %rbp
decq %r14
xorl %ebx, %ebx
cmpq %r13, %rbp
jae 0x269b1
jmp 0x26ab2
movq $-0x1, %r14
movq $-0x1, %rdx
testq %r15, %r15
jne 0x26ab9
testq %rbx, %rbx
jle 0x26acb
movq (%r12), %rax
movq -0x8(%rax,%rbx,8), %rdi
decq %rbx
callq 0xe445
movq %rax, %r14
testq %rax, %rax
jle 0x26ab6
decq %r14
jmp 0x2694b
xorl %r14d, %r14d
movq (%rsp), %rbx
movq %rbx, %rdx
movq %r14, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %r14d, %r14d
xorl %edx, %edx
jmp 0x26ab9
xorl %r14d, %r14d
xorl %ebx, %ebx
jmp 0x26ab6
xorl %r14d, %r14d
jmp 0x26ab6
leaq 0x9299(%rip), %rdi      # 0x2fd7e
leaq 0x97db(%rip), %rsi      # 0x302c7
leaq 0x9869(%rip), %rcx      # 0x3035c
movl $0x44a, %edx            # imm = 0x44A
callq 0xd280