// File: /workspace/github_c_makefile_star2_O1/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:
movq (%rdi), %rax
testq %rax, %rax
je 0x1fe4d
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r9, %rbp
movq %r8, %r12
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %rbx
movq %rdi, %r13
cmpb $0x1, (%rsi)
jne 0x1fd7a
movq 0x10(%rax), %rdx
movq 0x18(%rax), %rcx
movq %r15, %rdi
movq %r14, %rsi
callq 0xedfb
testb %al, %al
je 0x1fe3f
cmpl $-0x2, 0x60(%rbp)
movq 0x8(%r12), %rax
jne 0x1fdfc
movq %rax, %rdx
testq %rax, %rax
jne 0x1fe1b
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
jmp 0x1fe1d
movq (%rax), %rdx
movq 0x8(%rax), %rcx
movq %r15, %rdi
movq %r14, %rsi
callq 0xf1d6
testb %al, %al
je 0x1fdd3
movq 0x8(%r12), %rax
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
testq %rax, %rax
je 0x1fda7
movl 0x4(%rax), %edx
movl 0x64(%rbp), %ecx
cmpl $-0x2, %ecx
cmovnel %ecx, %edx
testq %rax, %rax
je 0x1fdb7
movl (%rax), %esi
movl 0x60(%rbp), %eax
cmpl $-0x2, %eax
cmovnel %eax, %esi
movq %r12, %rdi
movq %r15, %rcx
movq %r14, %r8
callq 0x1f959
movb $0x1, (%rbx)
jmp 0x1fe3f
movq (%r13), %rax
movq 0x10(%rax), %rdx
movq 0x18(%rax), %rcx
movq %r15, %rdi
movq %r14, %rsi
callq 0xedfb
testb %al, %al
je 0x1fe3f
movq (%r13), %rax
movq 0x20(%rax), %rax
movq %rax, (%r13)
jmp 0x1fe3f
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
testq %rax, %rax
je 0x1fe1d
movq (%r12), %rcx
cmpq %rax, %rcx
je 0x1fe1d
movq %rcx, %rdx
movq 0x18(%rcx), %rcx
cmpq %rax, %rcx
jne 0x1fe0f
movl (%rdx), %esi
movq %r12, %rdi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movq %r15, %rcx
movq %r14, %r8
callq 0x1f959
movq (%r13), %rax
movq 0x20(%rax), %rax
movq %rax, (%r13)
movb $0x0, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq