// File: /workspace/github_c_makefile_star2_O0/justy989[P]ce/ce_vim.c
// Function: ce_vim_move_big_word
CePoint_t ce_vim_move_big_word(CeBuffer_t* buffer, CePoint_t start){
     if(!ce_buffer_point_is_valid(buffer, start)) return (CePoint_t){-1, -1};

     char* itr = ce_utf8_iterate_to(buffer->lines[start.y], start.x);

     int64_t rune_len = 0;
     CeRune_t rune = ce_utf8_decode(itr, &rune_len);
     WordState_t state = WORD_INSIDE_WORD;

     if(isspace(rune)) state = WORD_INSIDE_SPACE;

     itr += rune_len;
     start.x++;

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

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

          if(*itr == 0){
               if(start.y >= buffer->line_count - 1) break;
               start.x = 0;
               start.y++;
               itr = buffer->lines[start.y];
               state = WORD_NEW_LINE;
          }else{
               itr += rune_len;
               start.x++;
          }
     }

END_LOOP:

     return start;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rsi, -0x20(%rbp)
movq %rdx, -0x18(%rbp)
movq %rdi, -0x28(%rbp)
movq -0x28(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0xeba0
cmpq $0x0, %rax
jne 0x35640
movq $-0x1, -0x10(%rbp)
movq $-0x1, -0x8(%rbp)
jmp 0x357f0
movq -0x28(%rbp), %rax
movq (%rax), %rax
movq -0x18(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
movq -0x20(%rbp), %rsi
callq 0xeca0
movq %rax, -0x30(%rbp)
movq $0x0, -0x38(%rbp)
movq -0x30(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0xedc0
movl %eax, -0x3c(%rbp)
movl $0x0, -0x40(%rbp)
callq 0xd700
movq (%rax), %rax
movslq -0x3c(%rbp), %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x2000, %eax           # imm = 0x2000
cmpl $0x0, %eax
je 0x3569c
movl $0x1, -0x40(%rbp)
movq -0x38(%rbp), %rax
addq -0x30(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
movq -0x30(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0xedc0
movl %eax, -0x3c(%rbp)
movl -0x40(%rbp), %eax
movl %eax, -0x44(%rbp)
testl %eax, %eax
je 0x35703
jmp 0x356d0
movl -0x44(%rbp), %eax
subl $0x1, %eax
je 0x35726
jmp 0x356da
movl -0x44(%rbp), %eax
subl $0x3, %eax
je 0x35747
jmp 0x356e4
leaq 0xf5d3(%rip), %rdi      # 0x44cbe
leaq 0xfd0d(%rip), %rsi      # 0x453ff
movl $0x328, %edx            # imm = 0x328
leaq 0xfd99(%rip), %rcx      # 0x45497
callq 0xd270
callq 0xd700
movq (%rax), %rax
movslq -0x3c(%rbp), %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x2000, %eax           # imm = 0x2000
cmpl $0x0, %eax
je 0x35724
movl $0x1, -0x40(%rbp)
jmp 0x3576e
callq 0xd700
movq (%rax), %rax
movslq -0x3c(%rbp), %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x2000, %eax           # imm = 0x2000
cmpl $0x0, %eax
jne 0x35745
jmp 0x357e0
jmp 0x3576e
callq 0xd700
movq (%rax), %rax
movslq -0x3c(%rbp), %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x2000, %eax           # imm = 0x2000
cmpl $0x0, %eax
je 0x3576a
movl $0x1, -0x40(%rbp)
jmp 0x3576c
jmp 0x357e0
jmp 0x3576e
movq -0x30(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
jne 0x357c1
movq -0x18(%rbp), %rax
movq -0x28(%rbp), %rcx
movq 0x8(%rcx), %rcx
subq $0x1, %rcx
cmpq %rcx, %rax
jl 0x35791
jmp 0x357de
movq $0x0, -0x20(%rbp)
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
movq -0x28(%rbp), %rax
movq (%rax), %rax
movq -0x18(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x30(%rbp)
movl $0x3, -0x40(%rbp)
jmp 0x357d9
movq -0x38(%rbp), %rax
addq -0x30(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x356b4
jmp 0x357e0
movq -0x20(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x10(%rbp), %rax
movq -0x8(%rbp), %rdx
addq $0x50, %rsp
popq %rbp
retq
nop