// File: /workspace/github_c_makefile_star2_O2/justy989[P]ce/ce_vim.c
// Function: ce_vim_move_little_word
CePoint_t ce_vim_move_little_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_OTHER;

     if(is_little_word_character(rune)){
          state = WORD_INSIDE_WORD;
     }else if(isspace(rune)){
          state = WORD_INSIDE_SPACE;
     }

     itr += rune_len;
     start.x++;

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

     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;
               else if(!is_little_word_character(rune)) goto END_LOOP;
               break;
          case WORD_INSIDE_SPACE:
               if(is_little_word_character(rune) || !isspace(rune)) goto END_LOOP;
               break;
          case WORD_INSIDE_OTHER:
               if(isspace(rune)) state = WORD_INSIDE_SPACE;
               else if(is_little_word_character(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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
callq 0xe425
testq %rax, %rax
je 0x23452
movq %r15, 0x10(%rsp)
movq (%r15), %rax
movq %rbx, (%rsp)
movq (%rax,%rbx,8), %rdi
movq %r14, %rsi
callq 0xe4a6
movq %rax, %r12
leaq 0x8(%rsp), %rsi
andq $0x0, (%rsi)
movq %rax, %rdi
callq 0xe53f
movl %eax, %ebp
movl %eax, %edi
callq 0x23570
xorl %ebx, %ebx
testb %al, %al
jne 0x2343e
callq 0xd720
movq (%rax), %rax
movslq %ebp, %rcx
movb 0x1(%rax,%rcx,2), %al
andb $0x20, %al
xorl %ebx, %ebx
cmpb $0x1, %al
adcl $0x1, %ebx
movq 0x8(%rsp), %rax
cmpb $0x0, (%r12,%rax)
je 0x2345e
addq %rax, %r12
incq %r14
jmp 0x2348c
pushq $-0x1
popq %r14
movq %r14, %rdx
jmp 0x2355e
movq 0x10(%rsp), %rcx
movq 0x8(%rcx), %rax
decq %rax
movq (%rsp), %rdx
cmpq %rdx, %rax
jle 0x2355e
movq (%rcx), %rax
movq 0x8(%rax,%rdx,8), %r12
incq %rdx
movq %rdx, (%rsp)
pushq $0x3
popq %rbx
xorl %r14d, %r14d
leaq 0x9d45(%rip), %r15      # 0x2d1d8
pushq $0x1
popq %r13
movq %r12, %rdi
leaq 0x8(%rsp), %rsi
callq 0xe53f
movl %eax, %ebp
movl %ebx, %eax
movslq (%r15,%rax,4), %rax
addq %r15, %rax
movslq %ebp, %rbx
jmpq *%rax
callq 0xd720
movq (%rax), %rax
testb $0x20, 0x1(%rax,%rbx,2)
movl %r13d, %ebx
jne 0x23517
movl %ebp, %edi
callq 0x23570
xorl %ebx, %ebx
testb %al, %al
jne 0x23517
jmp 0x2355a
movl %ebp, %edi
callq 0x23570
testb %al, %al
jne 0x2355a
callq 0xd720
movq (%rax), %rax
testb $0x20, 0x1(%rax,%rbx,2)
movl %r13d, %ebx
jne 0x23517
jmp 0x2355a
callq 0xd720
movq (%rax), %rax
testb $0x20, 0x1(%rax,%rbx,2)
movl %r13d, %ebx
jne 0x23517
movl %ebp, %edi
callq 0x23570
pushq $0x2
popq %rbx
testb %al, %al
jne 0x2355a
cmpb $0x0, (%r12)
je 0x2352b
addq 0x8(%rsp), %r12
incq %r14
jmp 0x23497
movq 0x10(%rsp), %rcx
movq 0x8(%rcx), %rax
decq %rax
movq (%rsp), %rdx
cmpq %rax, %rdx
jge 0x2355e
movq (%rcx), %rax
movq 0x8(%rax,%rdx,8), %r12
incq %rdx
movq %rdx, (%rsp)
xorl %r14d, %r14d
pushq $0x3
popq %rbx
jmp 0x23497
movq (%rsp), %rdx
movq %r14, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq