// File: /workspace/github_c_makefile_star2_O0/justy989[P]ce/ce_vim.c
// Function: point_in_string_or_comment
static bool point_in_string_or_comment(CeBuffer_t* buffer, CePoint_t point){
     if(!ce_buffer_contains_point(buffer, point)) return false;
     CeRune_t in_string = 0;
     CeRune_t in_comment = 0;
     CeRune_t prev_rune = 0;
     CeRune_t prev_prev_rune = 0;
     char* str = buffer->lines[point.y];
     int64_t rune_len;
     for(int64_t i = 0; i <= point.x; i++){
          CeRune_t rune = ce_utf8_decode(str, &rune_len);
          switch(rune){
          default:
               break;
          case '/':
               if(prev_rune == rune && !in_string){
                    in_comment = true;
               }else if(in_comment && prev_rune == '/'){
                    in_comment = false;
               }
               break;
          case '*':
               if(prev_rune == '/' && !in_string){
                    in_comment = true;
               }
               break;
          case '"':
          case '\'':
               if(in_string == rune){
                    if(prev_rune != '\\'){
                         in_string = 0;
                    // handle case where backslash getting backslashed
                    }else if(prev_prev_rune == '\\'){
                         in_string = 0;
                    }
               }else if(in_string == 0){
                    in_string = rune;
               }
               break;
          }
          prev_prev_rune = prev_rune;
          prev_rune = rune;
          str += rune_len;
     }

     return in_string || in_comment;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rsi, -0x18(%rbp)
movq %rdx, -0x10(%rbp)
movq %rdi, -0x20(%rbp)
movq -0x20(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x10(%rbp), %rdx
callq 0xe9e0
testb $0x1, %al
jne 0x374b2
movb $0x0, -0x1(%rbp)
jmp 0x375ef
movl $0x0, -0x24(%rbp)
movl $0x0, -0x28(%rbp)
movl $0x0, -0x2c(%rbp)
movl $0x0, -0x30(%rbp)
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq -0x10(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x38(%rbp)
movq $0x0, -0x48(%rbp)
movq -0x48(%rbp), %rax
cmpq -0x18(%rbp), %rax
jg 0x375d2
movq -0x38(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0xedc0
movl %eax, -0x4c(%rbp)
movl -0x4c(%rbp), %eax
addl $-0x22, %eax
movl %eax, %ecx
movq %rcx, -0x58(%rbp)
subl $0xd, %eax
ja 0x3752c
movq -0x58(%rbp), %rax
leaq 0xde3d(%rip), %rcx      # 0x45360
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
jmp 0x375a9
movl -0x2c(%rbp), %eax
cmpl -0x4c(%rbp), %eax
jne 0x37545
cmpl $0x0, -0x24(%rbp)
jne 0x37545
movl $0x1, -0x28(%rbp)
jmp 0x3755a
cmpl $0x0, -0x28(%rbp)
je 0x37558
cmpl $0x2f, -0x2c(%rbp)
jne 0x37558
movl $0x0, -0x28(%rbp)
jmp 0x3755a
jmp 0x375a9
cmpl $0x2f, -0x2c(%rbp)
jne 0x3756f
cmpl $0x0, -0x24(%rbp)
jne 0x3756f
movl $0x1, -0x28(%rbp)
jmp 0x375a9
movl -0x24(%rbp), %eax
cmpl -0x4c(%rbp), %eax
jne 0x37599
cmpl $0x5c, -0x2c(%rbp)
je 0x37588
movl $0x0, -0x24(%rbp)
jmp 0x37597
cmpl $0x5c, -0x30(%rbp)
jne 0x37595
movl $0x0, -0x24(%rbp)
jmp 0x37597
jmp 0x375a7
cmpl $0x0, -0x24(%rbp)
jne 0x375a5
movl -0x4c(%rbp), %eax
movl %eax, -0x24(%rbp)
jmp 0x375a7
jmp 0x375a9
movl -0x2c(%rbp), %eax
movl %eax, -0x30(%rbp)
movl -0x4c(%rbp), %eax
movl %eax, -0x2c(%rbp)
movq -0x40(%rbp), %rax
addq -0x38(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x48(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x48(%rbp)
jmp 0x374e9
movb $0x1, %al
cmpl $0x0, -0x24(%rbp)
movb %al, -0x59(%rbp)
jne 0x375e7
cmpl $0x0, -0x28(%rbp)
setne %al
movb %al, -0x59(%rbp)
movb -0x59(%rbp), %al
andb $0x1, %al
movb %al, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x60, %rsp
popq %rbp
retq
nopw (%rax,%rax)