// File: /workspace/github_c_makefile_star2_O0/justy989[P]ce/ce_vim.c
// Function: ce_vim_move_end_big_word
CePoint_t ce_vim_move_end_big_word(CeBuffer_t* buffer, CePoint_t start){
     start.x++;
     if(!ce_buffer_point_is_valid(buffer, start)){
          if(start.x == 1){
               // line is empty
               start.x = 0;
          }else{
               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 = 0;
     WordState_t state = WORD_INSIDE_WORD;

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

          rune = ce_utf8_decode(itr, &rune_len);
          itr += rune_len;
          if(isspace(rune)) state = WORD_INSIDE_SPACE;
          else state = WORD_INSIDE_WORD;
     }else{
          rune = ce_utf8_decode(itr, &rune_len);
          if(isspace(rune)) state = WORD_INSIDE_SPACE;
          itr += rune_len;
     }

     while(true){
          rune = ce_utf8_decode(itr, &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;
          }

          itr += rune_len;
          start.x++;

          if(*itr == 0) break;
     }

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 -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
movq -0x28(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0xeba0
cmpq $0x0, %rax
jne 0x35bdf
cmpq $0x1, -0x20(%rbp)
jne 0x35bc8
movq $0x0, -0x20(%rbp)
jmp 0x35bdd
movq $-0x1, -0x10(%rbp)
movq $-0x1, -0x8(%rbp)
jmp 0x35dbc
jmp 0x35bdf
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)
movl $0x0, -0x3c(%rbp)
movl $0x0, -0x40(%rbp)
movq -0x30(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
jne 0x35cba
movq -0x18(%rbp), %rax
movq -0x28(%rbp), %rcx
movq 0x8(%rcx), %rcx
subq $0x1, %rcx
cmpq %rcx, %rax
jl 0x35c4b
movq $-0x1, -0x10(%rbp)
movq $-0x1, -0x8(%rbp)
jmp 0x35dbc
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)
movq -0x30(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0xedc0
movl %eax, -0x3c(%rbp)
movq -0x38(%rbp), %rax
addq -0x30(%rbp), %rax
movq %rax, -0x30(%rbp)
callq 0xd700
movq (%rax), %rax
movslq -0x3c(%rbp), %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x2000, %eax           # imm = 0x2000
cmpl $0x0, %eax
je 0x35cb1
movl $0x1, -0x40(%rbp)
jmp 0x35cb8
movl $0x0, -0x40(%rbp)
jmp 0x35cf7
movq -0x30(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0xedc0
movl %eax, -0x3c(%rbp)
callq 0xd700
movq (%rax), %rax
movslq -0x3c(%rbp), %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x2000, %eax           # imm = 0x2000
cmpl $0x0, %eax
je 0x35ceb
movl $0x1, -0x40(%rbp)
movq -0x38(%rbp), %rax
addq -0x30(%rbp), %rax
movq %rax, -0x30(%rbp)
jmp 0x35cf9
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 0x35d3e
jmp 0x35d15
movl -0x44(%rbp), %eax
subl $0x1, %eax
je 0x35d5c
jmp 0x35d1f
leaq 0xef98(%rip), %rdi      # 0x44cbe
leaq 0xf6d2(%rip), %rsi      # 0x453ff
movl $0x3c1, %edx            # imm = 0x3C1
leaq 0xf7d5(%rip), %rcx      # 0x4550e
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 0x35d5a
jmp 0x35dac
jmp 0x35d7f
callq 0xd700
movq (%rax), %rax
movslq -0x3c(%rbp), %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x2000, %eax           # imm = 0x2000
cmpl $0x0, %eax
jne 0x35d7d
movl $0x0, -0x40(%rbp)
jmp 0x35d7f
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 0x35da5
jmp 0x35daa
jmp 0x35cf9
jmp 0x35dac
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
nopw (%rax,%rax)