// File: /workspace/github_c_makefile_star2_O0/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
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 0x35310
movq $-0x1, -0x10(%rbp)
movq $-0x1, -0x8(%rbp)
jmp 0x355aa
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 $0x2, -0x40(%rbp)
movl -0x3c(%rbp), %edi
callq 0x355c0
testb $0x1, %al
jne 0x35359
jmp 0x35362
movl $0x0, -0x40(%rbp)
jmp 0x35385
callq 0xd700
movq (%rax), %rax
movslq -0x3c(%rbp), %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x2000, %eax           # imm = 0x2000
cmpl $0x0, %eax
je 0x35383
movl $0x1, -0x40(%rbp)
jmp 0x35385
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), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
jne 0x3540d
movq -0x18(%rbp), %rax
movq -0x28(%rbp), %rcx
movq 0x8(%rcx), %rcx
subq $0x1, %rcx
cmpq %rcx, %rax
jl 0x353df
movq -0x20(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x355aa
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 0x3540f
movq -0x30(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0xedc0
movl %eax, -0x3c(%rbp)
movl -0x40(%rbp), %eax
movq %rax, -0x48(%rbp)
subq $0x3, %rax
ja 0x35440
movq -0x48(%rbp), %rax
leaq 0xfd99(%rip), %rcx      # 0x451d0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0xf877(%rip), %rdi      # 0x44cbe
leaq 0xffb1(%rip), %rsi      # 0x453ff
movl $0x2f1, %edx            # imm = 0x2F1
leaq 0x10002(%rip), %rcx     # 0x4545c
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 0x35482
movl $0x1, -0x40(%rbp)
jmp 0x35495
movl -0x3c(%rbp), %edi
callq 0x355c0
testb $0x1, %al
jne 0x35493
jmp 0x3559a
jmp 0x35495
jmp 0x35528
movl -0x3c(%rbp), %edi
callq 0x355c0
testb $0x1, %al
jne 0x354c0
callq 0xd700
movq (%rax), %rax
movslq -0x3c(%rbp), %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x2000, %eax           # imm = 0x2000
cmpl $0x0, %eax
jne 0x354c5
jmp 0x3559a
jmp 0x35528
callq 0xd700
movq (%rax), %rax
movslq -0x3c(%rbp), %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x2000, %eax           # imm = 0x2000
cmpl $0x0, %eax
je 0x354ea
movl $0x1, -0x40(%rbp)
jmp 0x354ff
movl -0x3c(%rbp), %edi
callq 0x355c0
testb $0x1, %al
jne 0x354f8
jmp 0x354fd
jmp 0x3559a
jmp 0x354ff
jmp 0x35528
callq 0xd700
movq (%rax), %rax
movslq -0x3c(%rbp), %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x2000, %eax           # imm = 0x2000
cmpl $0x0, %eax
je 0x35524
movl $0x1, -0x40(%rbp)
jmp 0x35526
jmp 0x3559a
jmp 0x35528
movq -0x30(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
jne 0x3557b
movq -0x18(%rbp), %rax
movq -0x28(%rbp), %rcx
movq 0x8(%rcx), %rcx
subq $0x1, %rcx
cmpq %rcx, %rax
jl 0x3554b
jmp 0x35598
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 0x35593
movq -0x38(%rbp), %rax
addq -0x30(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x3540f
jmp 0x3559a
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
nopl (%rax,%rax)