// File: /workspace/github_c_makefile_star2_O0/justy989[P]ce/ce_syntax.c
// Function: ce_syntax_highlight_visual
void ce_syntax_highlight_visual(CeRangeNode_t** range_node, bool* in_visual, CePoint_t point, CeDrawColorList_t* draw_color_list,
                                CeSyntaxDef_t* syntax_defs){
     if(*range_node){
          if(*in_visual){
               if(ce_point_after(point, (*range_node)->range.end)){
                    if(syntax_defs[CE_SYNTAX_COLOR_VISUAL].fg == CE_SYNTAX_USE_CURRENT_COLOR){
                         // if the syntax def for visual fg is use current color, then keep that one
                         ce_draw_color_list_insert(draw_color_list, ce_draw_color_list_last_fg_color(draw_color_list),
                                                   CE_COLOR_DEFAULT, point);
                    }else{
                         // use the 2nd to last color, because we have been overriding each color with visual colors
                         ce_draw_color_list_insert(draw_color_list, ce_draw_color_list_next_to_last_fg_color(draw_color_list),
                                                   CE_COLOR_DEFAULT, point);
                    }

                    *range_node = (*range_node)->next;
                    *in_visual = false;
               }
          }else{
               if(ce_points_equal(point, (*range_node)->range.start)){
                    int bg = ce_syntax_def_get_bg(syntax_defs, CE_SYNTAX_COLOR_VISUAL, ce_draw_color_list_last_bg_color(draw_color_list));
                    int fg = ce_syntax_def_get_fg(syntax_defs, CE_SYNTAX_COLOR_VISUAL, ce_draw_color_list_last_fg_color(draw_color_list));
                    ce_draw_color_list_insert(draw_color_list, fg, bg, point);
                    *in_visual = true;
               }else if(ce_point_after(point, (*range_node)->range.end)){
                    *range_node = (*range_node)->next;
               }
          }
     }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdx, -0x10(%rbp)
movq %rcx, -0x8(%rbp)
movq %rdi, -0x18(%rbp)
movq %rsi, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
movq -0x18(%rbp), %rax
cmpq $0x0, (%rax)
je 0x2ba7c
movq -0x20(%rbp), %rax
testb $0x1, (%rax)
je 0x2b9b9
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rsi
movq 0x10(%rax), %rdx
movq 0x18(%rax), %rcx
callq 0xf690
testb $0x1, %al
jne 0x2b93d
jmp 0x2b9b4
movq -0x30(%rbp), %rax
cmpl $-0x2, 0x60(%rax)
jne 0x2b972
movq -0x28(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x28(%rbp), %rdi
callq 0x2b600
movq -0x40(%rbp), %rdi
movl %eax, %esi
movq -0x10(%rbp), %rcx
movq -0x8(%rbp), %r8
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x2b200
jmp 0x2b99b
movq -0x28(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x28(%rbp), %rdi
callq 0x2b660
movq -0x48(%rbp), %rdi
movl %eax, %esi
movq -0x10(%rbp), %rcx
movq -0x8(%rbp), %r8
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x2b200
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq 0x20(%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movq -0x20(%rbp), %rax
movb $0x0, (%rax)
jmp 0x2ba7a
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rsi
movq (%rax), %rdx
movq 0x8(%rax), %rcx
callq 0xfec0
testb $0x1, %al
jne 0x2b9da
jmp 0x2ba42
movq -0x30(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x28(%rbp), %rdi
callq 0x2b630
movq -0x58(%rbp), %rdi
movl %eax, %edx
movl $0xc, %esi
callq 0x2b1c0
movl %eax, -0x34(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x28(%rbp), %rdi
callq 0x2b600
movq -0x50(%rbp), %rdi
movl %eax, %edx
movl $0xc, %esi
callq 0x2b180
movl %eax, -0x38(%rbp)
movq -0x28(%rbp), %rdi
movl -0x38(%rbp), %esi
movl -0x34(%rbp), %edx
movq -0x10(%rbp), %rcx
movq -0x8(%rbp), %r8
callq 0x2b200
movq -0x20(%rbp), %rax
movb $0x1, (%rax)
jmp 0x2ba78
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rsi
movq 0x10(%rax), %rdx
movq 0x18(%rax), %rcx
callq 0xf690
testb $0x1, %al
jne 0x2ba64
jmp 0x2ba76
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq 0x20(%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
jmp 0x2ba78
jmp 0x2ba7a
jmp 0x2ba7c
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)