LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/justy989[P]ce/ce_layout.c
// Function: resize_opposites_down
static void resize_opposites_down(CeLayout_t* root, CeLayout_t* layout, CeRect_t rect, ResizeRectResult_t* result){
    int64_t right_start = layout->view.rect.left;

    for(int64_t i = layout->view.rect.left - 1; i >= rect.left; i--){
         CePoint_t point = {i, result->adjacent_old_value};
         CeLayout_t* adjacent_layout = ce_layout_find_at(root, point);
         if(adjacent_layout && adjacent_layout->view.rect.top == result->adjacent_old_value){
              adjacent_layout->view.rect.top = result->adjacent_new_value;
              i = adjacent_layout->view.rect.left;
              if((adjacent_layout->view.rect.right + 1) > right_start) right_start = adjacent_layout->view.rect.right + 1;
         }else{
              break;
         }
    }

    for(int64_t i = right_start; i <= rect.right; i++){
         CePoint_t point = {i, result->adjacent_old_value};
         CeLayout_t* adjacent_layout = ce_layout_find_at(root, point);
         if(adjacent_layout && adjacent_layout->view.rect.top == result->adjacent_old_value){
              adjacent_layout->view.rect.top = result->adjacent_new_value;
              i = adjacent_layout->view.rect.right;
         }else{
              break;
         }
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdx, %rbx
movq %rdi, %r14
leaq 0x30(%rsp), %r12
movq 0x8(%rsi), %rsi
movq (%r12), %r13
movq %rsi, %r15
cmpq %r13, %rsi
jle 0x1cf79
decq %rsi
movq 0x8(%rbx), %rdx
movq %r14, %rdi
callq 0x1d04c
testq %rax, %rax
je 0x1cf79
movq 0x18(%rax), %rcx
cmpq 0x8(%rbx), %rcx
jne 0x1cf79
movq 0x10(%rbx), %rcx
movq %rcx, 0x18(%rax)
movq 0x8(%rax), %rsi
movq 0x10(%rax), %rax
leaq 0x1(%rax), %rcx
cmpq %r15, %rax
cmovgeq %rcx, %r15
jmp 0x1cf39
movq 0x8(%r12), %r12
cmpq %r12, %r15
jg 0x1cfb2
movq 0x8(%rbx), %rdx
movq %r14, %rdi
movq %r15, %rsi
callq 0x1d04c
testq %rax, %rax
je 0x1cfb2
movq 0x18(%rax), %rcx
cmpq 0x8(%rbx), %rcx
jne 0x1cfb2
movq 0x10(%rbx), %rcx
movq %rcx, 0x18(%rax)
movq 0x10(%rax), %r15
incq %r15
jmp 0x1cf7e
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/justy989[P]ce/ce_layout.c
// Function: resize_shareds_down
static void resize_shareds_down(CeLayout_t* root, CeLayout_t* layout, CeRect_t rect, ResizeRectResult_t* result){
    for(int64_t i = layout->view.rect.left - 1; i >= rect.left; i--){
         CePoint_t point = {i, layout->view.rect.bottom};
         CeLayout_t* adjacent_layout = ce_layout_find_at(root, point);
         if(adjacent_layout && adjacent_layout->view.rect.bottom == layout->view.rect.bottom){
              adjacent_layout->view.rect.bottom = result->new_value;
              i = adjacent_layout->view.rect.left;
         }else{
              break;
         }
    }

    for(int64_t i = layout->view.rect.right + 1; i <= rect.right; i++){
         CePoint_t point = {i, layout->view.rect.bottom};
         CeLayout_t* adjacent_layout = ce_layout_find_at(root, point);
         if(adjacent_layout && adjacent_layout->view.rect.bottom == layout->view.rect.bottom){
              adjacent_layout->view.rect.bottom = result->new_value;
              i = adjacent_layout->view.rect.right;
         }else{
              break;
         }
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
leaq 0x30(%rsp), %r12
movq (%r12), %r13
movq %rsi, %rax
movq 0x8(%rax), %rsi
cmpq %r13, %rsi
jle 0x1d00a
decq %rsi
movq 0x20(%r14), %rdx
movq %r15, %rdi
callq 0x1d04c
testq %rax, %rax
je 0x1d00a
movq 0x20(%rax), %rcx
cmpq 0x20(%r14), %rcx
jne 0x1d00a
movq (%rbx), %rcx
movq %rcx, 0x20(%rax)
jmp 0x1cfda
movq 0x8(%r12), %r12
movq %r14, %rax
movq 0x10(%rax), %rsi
cmpq %r12, %rsi
jge 0x1d042
incq %rsi
movq 0x20(%r14), %rdx
movq %r15, %rdi
callq 0x1d04c
testq %rax, %rax
je 0x1d042
movq 0x20(%rax), %rcx
cmpq 0x20(%r14), %rcx
jne 0x1d042
movq (%rbx), %rcx
movq %rcx, 0x20(%rax)
jmp 0x1d012
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/justy989[P]ce/ce_layout.c
// Function: ce_layout_find_at
CeLayout_t* ce_layout_find_at(CeLayout_t* layout, CePoint_t point){
     switch(layout->type){
     default:
          break;
     case CE_LAYOUT_TYPE_VIEW:
          if(ce_point_in_rect(point, layout->view.rect)) return layout;
          break;
     case CE_LAYOUT_TYPE_LIST:
          for(int64_t i = 0; i < layout->list.layout_count; i++){
               CeLayout_t* found = ce_layout_find_at(layout->list.layouts[i], point);
               if(found) return found;
          }
          break;
     case CE_LAYOUT_TYPE_TAB:
          return ce_layout_find_at(layout->tab.root, point);
     case CE_LAYOUT_TYPE_TAB_LIST:
          return ce_layout_find_at(layout->tab_list.current, point);
     }

     return NULL;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
pushq $0x10
popq %rax
leaq 0xfb6e(%rip), %rcx      # 0x2cbd8
pushq $0x8
popq %rdx
movl (%rbx), %esi
cmpq $0x3, %rsi
ja 0x1d0aa
movslq (%rcx,%rsi,4), %rdi
addq %rcx, %rdi
movq %rax, %rsi
jmpq *%rdi
movq %rdx, %rsi
movq (%rbx,%rsi), %rbx
jmp 0x1d06d
movups 0x8(%rbx), %xmm0
movups 0x18(%rbx), %xmm1
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
movq %r15, %rdi
movq %r14, %rsi
callq 0xfd9a
testb %al, %al
jne 0x1d0ac
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
xorl %r12d, %r12d
cmpq 0x10(%rbx), %r12
jge 0x1d0aa
movq 0x8(%rbx), %rax
movq (%rax,%r12,8), %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x1d04c
incq %r12
testq %rax, %rax
je 0x1d0be
movq %rax, %rbx
jmp 0x1d0ac
// File: /workspace/github_c_makefile_star2_O2/justy989[P]ce/ce_layout.c
// Function: ce_layout_find_popup
CeLayout_t* ce_layout_find_popup(CeLayout_t* layout){
     if(layout->popup){
         return layout;
     }
     switch(layout->type){
     default:
          break;
     case CE_LAYOUT_TYPE_VIEW:
          break;
     case CE_LAYOUT_TYPE_LIST:
          for(int64_t i = 0; i < layout->list.layout_count; i++){
               CeLayout_t* found = ce_layout_find_popup(layout->list.layouts[i]);
               if(found) return found;
          }
          break;
     case CE_LAYOUT_TYPE_TAB:
          return ce_layout_find_popup(layout->tab.root);
     case CE_LAYOUT_TYPE_TAB_LIST:
          return ce_layout_find_popup(layout->tab_list.current);
     }

     return NULL;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
pushq $0x10
popq %rax
pushq $0x8
popq %rcx
cmpb $0x0, 0x58(%rbx)
jne 0x1d148
movl (%rbx), %edx
cmpl $0x2, %edx
je 0x1d109
movq %rax, %rsi
cmpl $0x3, %edx
je 0x1d10c
jmp 0x1d112
movq %rcx, %rsi
movq (%rbx,%rsi), %rbx
jmp 0x1d0f2
cmpl $0x1, %edx
jne 0x1d146
movq 0x10(%rbx), %r14
xorl %eax, %eax
testq %r14, %r14
cmovleq %rax, %r14
xorl %r15d, %r15d
cmpq %r15, %r14
je 0x1d146
movq 0x8(%rbx), %rax
movq (%rax,%r15,8), %rdi
callq 0x1d0e4
incq %r15
testq %rax, %rax
je 0x1d127
movq %rax, %rbx
jmp 0x1d148
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/justy989[P]ce/ce_layout.c
// Function: ce_layout_buffer_in_view
CeLayout_t* ce_layout_buffer_in_view(CeLayout_t* layout, CeBuffer_t* buffer){
     switch(layout->type){
     default:
          break;
     case CE_LAYOUT_TYPE_VIEW:
          if(layout->view.buffer == buffer) return layout;
          break;
     case CE_LAYOUT_TYPE_LIST:
          for(int64_t i = 0; i < layout->list.layout_count; i++){
               CeLayout_t* found = ce_layout_buffer_in_view(layout->list.layouts[i], buffer);
               if(found) return found;
          }
          break;
     case CE_LAYOUT_TYPE_TAB:
          return ce_layout_buffer_in_view(layout->tab.root, buffer);
     case CE_LAYOUT_TYPE_TAB_LIST:
          return ce_layout_buffer_in_view(layout->tab_list.current, buffer);
     }

     return NULL;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
pushq $0x10
popq %rax
leaq 0xf892(%rip), %rcx      # 0x2cbe8
pushq $0x8
popq %rdx
movl (%rbx), %esi
cmpq $0x3, %rsi
ja 0x1d37c
movslq (%rcx,%rsi,4), %rdi
addq %rcx, %rdi
movq %rax, %rsi
jmpq *%rdi
movq %rdx, %rsi
movq (%rbx,%rsi), %rbx
jmp 0x1d359
cmpq %r14, 0x48(%rbx)
je 0x1d37e
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq 0x10(%rbx), %r15
xorl %r12d, %r12d
testq %r15, %r15
cmovleq %r12, %r15
cmpq %r12, %r15
je 0x1d37c
movq 0x8(%rbx), %rax
movq (%rax,%r12,8), %rdi
movq %r14, %rsi
callq 0x1d33e
incq %r12
testq %rax, %rax
je 0x1d39b
movq %rax, %rbx
jmp 0x1d37e
// File: /workspace/github_c_makefile_star2_O2/justy989[P]ce/ce_layout.c
// Function: count_buffer_in_views
int64_t count_buffer_in_views(CeLayout_t* layout, CeBuffer_t* buffer, int64_t count){
     switch(layout->type){
     default:
          break;
     case CE_LAYOUT_TYPE_VIEW:
          if(layout->view.buffer == buffer) return 1;
          break;
     case CE_LAYOUT_TYPE_LIST:
          for(int64_t i = 0; i < layout->list.layout_count; i++){
               count = count_buffer_in_views(layout->list.layouts[i], buffer, count);
          }
          break;
     case CE_LAYOUT_TYPE_TAB:
          return count_buffer_in_views(layout->tab.root, buffer, count);
     case CE_LAYOUT_TYPE_TAB_LIST:
          return count_buffer_in_views(layout->tab_list.current, buffer, count);
     }

     return count;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rax
movq %rsi, %rbx
movq %rdi, %r14
pushq $0x10
popq %rcx
leaq 0xf820(%rip), %rdx      # 0x2cbf8
pushq $0x8
popq %rsi
movl (%r14), %edi
cmpq $0x3, %rdi
ja 0x1d405
movslq (%rdx,%rdi,4), %r8
addq %rdx, %r8
movq %rcx, %rdi
jmpq *%r8
movq %rsi, %rdi
movq (%r14,%rdi), %r14
jmp 0x1d3db
cmpq %rbx, 0x48(%r14)
pushq $0x1
popq %rcx
cmoveq %rcx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq 0x10(%r14), %r15
xorl %r12d, %r12d
testq %r15, %r15
cmovleq %r12, %r15
cmpq %r12, %r15
je 0x1d405
movq 0x8(%r14), %rcx
movq (%rcx,%r12,8), %rdi
movq %rbx, %rsi
movq %rax, %rdx
callq 0x1d3bd
incq %r12
jmp 0x1d41f
// File: /workspace/github_c_makefile_star2_O2/justy989[P]ce/ce_layout.c
// Function: build_buffer_in_views
void build_buffer_in_views(CeLayout_t* layout, CeBuffer_t* buffer, CeLayoutBufferInViewsResult_t* result){
     switch(layout->type){
     default:
          break;
     case CE_LAYOUT_TYPE_VIEW:
          if(layout->view.buffer == buffer){
               result->layouts[result->layout_count] = layout;
               result->layout_count++;
          }
          break;
     case CE_LAYOUT_TYPE_LIST:
          for(int64_t i = 0; i < layout->list.layout_count; i++){
               build_buffer_in_views(layout->list.layouts[i], buffer, result);
          }
          break;
     case CE_LAYOUT_TYPE_TAB:
          build_buffer_in_views(layout->tab.root, buffer, result);
          break;
     case CE_LAYOUT_TYPE_TAB_LIST:
          build_buffer_in_views(layout->tab_list.current, buffer, result);
          break;
     }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
pushq $0x10
popq %rax
leaq 0xf7b1(%rip), %rcx      # 0x2cc08
pushq $0x8
popq %rdx
movl (%r14), %esi
cmpq $0x3, %rsi
ja 0x1d490
movslq (%rcx,%rsi,4), %rdi
addq %rcx, %rdi
movq %rax, %rsi
jmpq *%rdi
movq %rdx, %rsi
movq (%r14,%rsi), %r14
jmp 0x1d45a
cmpq %r15, 0x48(%r14)
jne 0x1d490
movq (%rbx), %rax
movq 0x8(%rbx), %rcx
movq %r14, (%rax,%rcx,8)
incq %rcx
movq %rcx, 0x8(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
xorl %r12d, %r12d
cmpq 0x10(%r14), %r12
jge 0x1d490
movq 0x8(%r14), %rax
movq (%rax,%r12,8), %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x1d43c
incq %r12
jmp 0x1d49f
// File: /workspace/github_c_makefile_star2_O2/justy989[P]ce/ce_layout.c
// Function: ce_layout_buffer_in_views
CeLayoutBufferInViewsResult_t ce_layout_buffer_in_views(CeLayout_t* layout, CeBuffer_t* buffer){
     CeLayoutBufferInViewsResult_t result = {};
     int64_t count = count_buffer_in_views(layout, buffer, 0);
     result.layouts = malloc(count * sizeof(*result.layouts));
     build_buffer_in_views(layout, buffer, &result);
     return result;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movq %rsp, %r15
andq $0x0, 0x8(%r15)
xorl %edx, %edx
callq 0x1d3bd
leaq (,%rax,8), %rdi
callq 0xd4c0
movq %rax, (%r15)
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x1d43c
movq (%r15), %rax
movq 0x8(%r15), %rdx
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/justy989[P]ce/ce_layout.c
// Function: count_children
static int64_t count_children(CeLayout_t* layout){
     switch(layout->type){
     default:
          break;
     case CE_LAYOUT_TYPE_VIEW:
          return 1;
     case CE_LAYOUT_TYPE_LIST:
     {
          int sum = 0;
          for(int64_t i = 0; i < layout->list.layout_count; i++){
               sum += count_children(layout->list.layouts[i]);
          }
          return sum;
     }
     }

     return 0;
}

// Assembly:
movl (%rdi), %eax
testl %eax, %eax
je 0x1d56b
cmpl $0x1, %eax
jne 0x1d56f
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x10(%rdi), %r15
xorl %r14d, %r14d
testq %r15, %r15
cmovleq %r14, %r15
xorl %r12d, %r12d
cmpq %r12, %r15
je 0x1d55c
movq 0x8(%rbx), %rax
movq (%rax,%r12,8), %rdi
callq 0x1d51b
addl %eax, %r14d
incq %r12
jmp 0x1d542
movslq %r14d, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
pushq $0x1
popq %rax
retq
xorl %eax, %eax
retq
nop
// File: /workspace/github_c_makefile_star2_O2/justy989[P]ce/ce_macros.c
// Function: ce_macros_begin_recording
bool ce_macros_begin_recording(CeMacros_t* macros, unsigned char reg){
     if(reg < 33 || reg >= 177) return false; // ascii printable character range
     macros->recording = reg;
     ce_rune_node_free(macros->rune_head + (reg - '!'));
     return true;
}

// Assembly:
pushq %rbx
leal -0x21(%rsi), %ebx
cmpb $-0x71, %bl
ja 0x1d5be
movb %sil, 0x2f8(%rdi)
movzbl %sil, %eax
addl $-0x21, %eax
leaq (%rdi,%rax,8), %rdi
callq 0xfe39
cmpb $-0x70, %bl
setb %al
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/justy989[P]ce/ce_regex_linux.c
// Function: ce_regex_init
CeRegexResult_t ce_regex_init(const char* expression,
                              CeRegex_t* regex_handle) {
     CeRegexResult_t result = {};
     regex_t* regex = (regex_t*)(malloc(sizeof(regex_t)));
     if(regex == NULL){
          result.error_message = strdup("Failed to allocate regex_t");
          return result;
     }
     int rc = regcomp(regex, expression, REG_EXTENDED);
     if (rc != 0){
          result.error_message = malloc(CE_REGEX_MAX_ERROR_SIZE);
          regerror(rc, regex, result.error_message, CE_REGEX_MAX_ERROR_SIZE);
          free(regex);
          return result;
     }
     *regex_handle = regex;
     return result;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
andq $0x0, 0x10(%rdi)
pushq $0x40
popq %rdi
callq 0xd4c0
testq %rax, %rax
je 0x1d67d
movq %rax, %r14
pushq $0x1
popq %rdx
movq %rax, %rdi
movq %r12, %rsi
callq 0xd320
testl %eax, %eax
je 0x1d68e
movl %eax, %ebp
movl $0x100, %edi            # imm = 0x100
callq 0xd4c0
movq %rax, (%rbx)
movl $0x100, %ecx            # imm = 0x100
movl %ebp, %edi
movq %r14, %rsi
movq %rax, %rdx
callq 0xd430
movq %r14, %rdi
callq 0xd090
jmp 0x1d691
leaq 0xf732(%rip), %rdi      # 0x2cdb6
callq 0xd640
movq %rax, (%rbx)
jmp 0x1d691
movq %r14, (%r15)
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/justy989[P]ce/ce_regex_linux.c
// Function: ce_regex_match
CeRegexResult_t ce_regex_match(CeRegex_t regex_handle,
                               const char* string) {
     regex_t* regex = (regex_t*)(regex_handle);
     // TODO: Check that handle is valid.
     CeRegexResult_t result = {};
     const size_t match_count = 1;
     regmatch_t matches[match_count];
     int rc = regexec(regex, string, match_count, matches, 0);
     if(rc == 0){
          result.match_start = matches[0].rm_so;
          result.match_length = matches[0].rm_eo - matches[0].rm_so;
     }else if(rc == REG_NOMATCH){
          result.match_start = CE_REGEX_NO_MATCH;
          result.match_length = CE_REGEX_NO_MATCH;
     }else{
          result.error_message = malloc(CE_REGEX_MAX_ERROR_SIZE);
          regerror(rc, regex, result.error_message, CE_REGEX_MAX_ERROR_SIZE);
     }
     return result;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %r14
movq %rdi, %rbx
pxor %xmm0, %xmm0
movdqu %xmm0, (%rdi)
andq $0x0, 0x10(%rdi)
pushq $0x1
popq %rax
movq %rsp, %rcx
movq %rsi, %rdi
movq %rdx, %rsi
movq %rax, %rdx
xorl %r8d, %r8d
callq 0xd500
cmpl $0x1, %eax
je 0x1d6f0
movl %eax, %ebp
testl %eax, %eax
jne 0x1d6fb
movslq (%rsp), %rax
movq %rax, 0x8(%rbx)
movslq 0x4(%rsp), %rcx
subq %rax, %rcx
movq %rcx, 0x10(%rbx)
jmp 0x1d71a
pcmpeqd %xmm0, %xmm0
movdqu %xmm0, 0x8(%rbx)
jmp 0x1d71a
movl $0x100, %edi            # imm = 0x100
callq 0xd4c0
movq %rax, (%rbx)
movl $0x100, %ecx            # imm = 0x100
movl %ebp, %edi
movq %r14, %rsi
movq %rax, %rdx
callq 0xd430
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/justy989[P]ce/ce_subprocess.c
// Function: split_command_args
char** _split_command_args(const char* command){
    int64_t count = 0;
    char** result = NULL;

    char* token = strtok((char*)(command), " ");

    while(token){
        int64_t new_count = count + 1;
        result = realloc(result, new_count * sizeof(result[0]));
        result[count] = strdup(token);
        count = new_count;
        token = strtok(NULL, " ");
    }

    // End with a NULL per the execv() man page.
    int64_t new_count = count + 1;
    result = realloc(result, new_count * sizeof(result[0]));
    result[count] = NULL;
    return result;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
pushq $0x8
popq %rbx
xorl %r14d, %r14d
leaq 0xf02c(%rip), %r15      # 0x2c76d
movq %r15, %rsi
callq 0xd5c0
testq %rax, %rax
je 0x1d774
movq %rax, %r12
movq %r14, %rdi
movq %rbx, %rsi
callq 0xd520
movq %rax, %r14
movq %r12, %rdi
callq 0xd640
movq %rax, -0x8(%r14,%rbx)
addq $0x8, %rbx
xorl %edi, %edi
jmp 0x1d741
movq %r14, %rdi
movq %rbx, %rsi
callq 0xd520
andq $0x0, -0x8(%rax,%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/justy989[P]ce/ce_subprocess.c
// Function: ce_subprocess_open
bool ce_subprocess_open(CeSubprocess_t* subprocess, const char* command, CeProcCommFlag_t comms,
                        bool use_shell){
     subprocess->pid = bidirectional_popen(command, comms, &subprocess->stdin_fd,
                                           &subprocess->stdout_fd, use_shell);
     if(subprocess->pid == 0) return false;
     if(subprocess->stdin_fd >= 0){
         subprocess->stdin_file = fdopen(subprocess->stdin_fd, "w");
     }
     if(subprocess->stdout_fd >= 0){
         subprocess->stdout_file = fdopen(subprocess->stdout_fd, "r");
     }
     return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movl %ecx, %ebp
movl %edx, %r15d
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x8(%rsp), %rdi
callq 0xd2f0
testl %eax, %eax
jne 0x1d7c2
movq %rsp, %rdi
callq 0xd2f0
testl %eax, %eax
je 0x1d7d6
andl $0x0, (%rbx)
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
callq 0xd6e0
testl %eax, %eax
js 0x1d7c2
je 0x1d85e
movl %eax, %r12d
movl 0x8(%rsp), %edi
callq 0xd2e0
movl 0x4(%rsp), %edi
callq 0xd2e0
movl 0xc(%rsp), %edi
testb $0x1, %r15b
jne 0x1d808
callq 0xd2e0
pushq $-0x1
popq %rdi
movl %edi, 0x10(%rbx)
movl (%rsp), %eax
testb $0x2, %r15b
jne 0x1d823
pushq $-0x1
popq %rbp
movl %eax, %edi
callq 0xd2e0
movl 0x10(%rbx), %edi
movl %ebp, %eax
movl %eax, 0x4(%rbx)
movl %r12d, (%rbx)
testl %edi, %edi
js 0x1d840
leaq 0xd89b(%rip), %rsi      # 0x2b0cf
callq 0xd540
movq %rax, 0x18(%rbx)
movl 0x4(%rbx), %eax
movb $0x1, %bpl
testl %eax, %eax
js 0x1d7c7
leaq 0xf67a(%rip), %rsi      # 0x2cec8
movl %eax, %edi
callq 0xd540
movq %rax, 0x8(%rbx)
jmp 0x1d7c7
movl 0xc(%rsp), %edi
callq 0xd2e0
movl (%rsp), %edi
callq 0xd2e0
movl 0x8(%rsp), %edi
xorl %esi, %esi
callq 0xd220
movl 0x4(%rsp), %edi
pushq $0x1
popq %rsi
callq 0xd220
movl 0x4(%rsp), %edi
pushq $0x2
popq %rsi
callq 0xd220
testb %bpl, %bpl
je 0x1d8ba
leaq 0xf609(%rip), %rdi      # 0x2cea7
leaq 0xf60a(%rip), %rdx      # 0x2ceaf
movq %rdi, %rsi
movq %r14, %rcx
xorl %r8d, %r8d
xorl %eax, %eax
callq 0xd660
jmp 0x1d7c2
movq %r14, %rdi
callq 0x1d72c
movq %rax, %r14
movq (%rax), %rdi
movq %rax, %rsi
callq 0xd6d0
movq %r14, %r15
movq (%r15), %rdi
testq %rdi, %rdi
je 0x1d8e6
callq 0xd090
addq $0x8, %r15
jmp 0x1d8d3
movq %r14, %rdi
callq 0xd090
jmp 0x1d7c2
// File: /workspace/github_c_makefile_star2_O2/justy989[P]ce/ce_subprocess.c
// Function: ce_subprocess_close_stdin
void ce_subprocess_close_stdin(CeSubprocess_t* subprocess){
     if(subprocess->stdin_fd >= 0){
         _close_file(&subprocess->stdin_file);
         close(subprocess->stdin_fd);
         subprocess->stdin_fd = -1;
     }
}

// Assembly:
cmpl $0x0, 0x10(%rdi)
js 0x1d91e
pushq %rbx
movq %rdi, %rbx
addq $0x18, %rdi
callq 0x1d91f
movl 0x10(%rbx), %edi
callq 0xd2e0
orl $-0x1, 0x10(%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/justy989[P]ce/ce_subprocess.c
// Function: ce_subprocess_close
int ce_subprocess_close(CeSubprocess_t* subprocess){
     // wait for the subprocess to complete
     int status;
     do{
          if(waitpid(subprocess->pid, &status, 0) == -1){
               switch(errno){
               case EINTR:
                    continue;
               default:
                    // TODO: not sure what to do here
                    return 0;
               }
          }
     }while(!WIFEXITED(status) && !WIFSIGNALED(status));
     assert(!(WIFCONTINUED(status)));

     if(subprocess->stdout_fd >= 0){
         _close_file(&subprocess->stdout_file);
         close(subprocess->stdout_fd);
     }
     if(subprocess->stdin_fd >= 0){
         _close_file(&subprocess->stdin_file);
         close(subprocess->stdin_fd);
     }
     return status;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x4(%rsp), %r14
movl (%rbx), %edi
movq %r14, %rsi
xorl %edx, %edx
callq 0xd590
cmpl $-0x1, %eax
jne 0x1d95b
callq 0xd0a0
cmpl $0x4, (%rax)
jne 0x1d9b8
movl 0x4(%rsp), %eax
movl %eax, %ecx
andl $0x7f, %ecx
je 0x1d977
shll $0x18, %ecx
addl $0x1000000, %ecx        # imm = 0x1000000
cmpl $0x2000000, %ecx        # imm = 0x2000000
jl 0x1d940
cmpl $0xffff, %eax           # imm = 0xFFFF
je 0x1d9bc
cmpl $0x0, 0x4(%rbx)
js 0x1d995
leaq 0x8(%rbx), %rdi
callq 0x1d91f
movl 0x4(%rbx), %edi
callq 0xd2e0
cmpl $0x0, 0x10(%rbx)
js 0x1d9ac
leaq 0x18(%rbx), %rdi
callq 0x1d91f
movl 0x10(%rbx), %edi
callq 0xd2e0
movl 0x4(%rsp), %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
xorl %eax, %eax
jmp 0x1d9b0
leaq 0xf40e(%rip), %rdi      # 0x2cdd1
leaq 0xf41f(%rip), %rsi      # 0x2cde9
leaq 0xf428(%rip), %rcx      # 0x2cdf9
movl $0x108, %edx            # imm = 0x108
callq 0xd280
// File: /workspace/github_c_makefile_star2_O2/justy989[P]ce/ce_subprocess.c
// Function: ce_subprocess_read_stdout
int64_t ce_subprocess_read_stdout(CeSubprocess_t* subprocess, char* buffer, int64_t size){
#if defined(PLATFORM_WINDOWS)
     if(subprocess->stdout_read_pipe == INVALID_HANDLE_VALUE){
          ce_log("subprocess created without enabling reading stdout\n");
          return -1;
     }
     DWORD bytes_read = 0;
     ReadFile(subprocess->stdout_read_pipe, buffer, size, &bytes_read, NULL);
     if(bytes_read < 0){
          ce_log("read() from clangd stdout failed.\n");
          return -1;
     }
     return bytes_read;

#else
     if(subprocess->stdout_fd < 0){
          ce_log("subprocess created without enabling reading stdout\n");
          return -1;
     }
     int bytes_read = read(subprocess->stdout_fd, buffer, size);
     if(bytes_read < 0){
          if(errno != EINTR && errno != EAGAIN){
              ce_log("read() failed on subprocess pid %d stdin %s\n", strerror(errno));
          }
          return bytes_read;
     }
     return bytes_read;
#endif
}

// Assembly:
pushq %rbx
movl 0x4(%rdi), %edi
testl %edi, %edi
js 0x1d9f7
callq 0xd350
movq %rax, %rbx
testl %ebx, %ebx
js 0x1da0a
andl $0x7fffffff, %ebx       # imm = 0x7FFFFFFF
jmp 0x1da34
leaq 0xf425(%rip), %rdi      # 0x2ce23
xorl %eax, %eax
callq 0xd8e5
pushq $-0x1
popq %rbx
jmp 0x1da34
callq 0xd0a0
movl (%rax), %edi
cmpl $0x4, %edi
je 0x1da31
cmpl $0xb, %edi
je 0x1da31
callq 0xd650
leaq 0xf430(%rip), %rdi      # 0x2ce57
movq %rax, %rsi
xorl %eax, %eax
callq 0xd8e5
movslq %ebx, %rbx
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/justy989[P]ce/ce_subprocess.c
// Function: ce_subprocess_write_stdin
int64_t ce_subprocess_write_stdin(CeSubprocess_t* subprocess, char* buffer, int64_t size){
     int64_t total_bytes_written = 0;
     while(total_bytes_written < size){
#if defined(PLATFORM_WINDOWS)
          if(subprocess->stdin_write_pipe == INVALID_HANDLE_VALUE){
               ce_log("subprocess created without enabling reading stdout\n");
               return -1;
          }
          DWORD bytes_written = 0;
          bool success = WriteFile(subprocess->stdin_write_pipe, buffer + total_bytes_written,
                                   size - total_bytes_written,
                                   &bytes_written, NULL);
          if(!success || bytes_written < 0){
               ce_log("write() failed on clangd stdin\n");
               return -1;
          }
#else
          if(subprocess->stdin_fd < 0){
               ce_log("subprocess created without enabling reading stdout\n");
               return -1;
          }
          int64_t bytes_written = write(subprocess->stdin_fd, buffer + total_bytes_written,
                                        size - total_bytes_written);
          if(bytes_written < 0){
               if(errno != EINTR && errno != EAGAIN){
                   ce_log("write() failed on clangd stdin %s\n", strerror(errno));
               }
               return bytes_written;
          }

#endif
          total_bytes_written += bytes_written;
     }
     return total_bytes_written;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
xorl %r13d, %r13d
movq %r14, %rdx
subq %r13, %rdx
jle 0x1da75
movl 0x10(%r12), %edi
testl %edi, %edi
js 0x1da7a
leaq (%r15,%r13), %rsi
callq 0xd1d0
movq %rax, %rbx
testq %rax, %rax
js 0x1da8d
addq %rbx, %r13
jmp 0x1da4e
movq %r13, %rbx
jmp 0x1dab4
leaq 0xf3a2(%rip), %rdi      # 0x2ce23
xorl %eax, %eax
callq 0xd8e5
pushq $-0x1
popq %rbx
jmp 0x1dab4
callq 0xd0a0
movl (%rax), %edi
cmpl $0x4, %edi
je 0x1dab4
cmpl $0xb, %edi
je 0x1dab4
callq 0xd650
leaq 0xf3da(%rip), %rdi      # 0x2ce84
movq %rax, %rsi
xorl %eax, %eax
callq 0xd8e5
movq %rbx, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O2/justy989[P]ce/ce_syntax.c
// Function: ce_draw_color_list_insert
bool ce_draw_color_list_insert(CeDrawColorList_t* list, int fg, int bg, CePoint_t point){
     if(list->tail && list->tail->fg == fg && list->tail->bg == bg && list->tail->point.y == point.y) return true;
     CeDrawColorNode_t* node = malloc(sizeof(*node));
     if(!node) return false;
     node->fg = fg;
     node->bg = bg;
     node->point = point;
     node->next = NULL;
     if(list->tail) list->tail->next = node;
     list->tail = node;
     if(!list->head) list->head = node;
     return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %r14
movq %rcx, %r15
movl %edx, %ebp
movl %esi, %r12d
movq %rdi, %rbx
movq 0x8(%rdi), %r13
testq %r13, %r13
je 0x1db13
cmpl %r12d, (%r13)
jne 0x1db13
cmpl %ebp, 0x4(%r13)
jne 0x1db13
movb $0x1, %cl
cmpq %r14, 0x10(%r13)
je 0x1db4f
pushq $0x20
popq %rdi
callq 0xd4c0
testq %rax, %rax
je 0x1db4d
andq $0x0, 0x18(%rax)
movl %r12d, (%rax)
movl %ebp, 0x4(%rax)
movq %r15, 0x8(%rax)
movq %r14, 0x10(%rax)
testq %r13, %r13
je 0x1db3c
movq %rax, 0x18(%r13)
movq %rax, 0x8(%rbx)
movb $0x1, %cl
cmpq $0x0, (%rbx)
jne 0x1db4f
movq %rax, (%rbx)
jmp 0x1db4f
xorl %ecx, %ecx
movl %ecx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/justy989[P]ce/ce_syntax.c
// Function: ce_draw_color_list_free
void ce_draw_color_list_free(CeDrawColorList_t* list){
     CeDrawColorNode_t* itr = list->head;
     while(itr){
          CeDrawColorNode_t* tmp = itr;
          itr = itr->next;
          free(tmp);
     }

     list->head = NULL;
     list->tail = NULL;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %rdi
testq %rdi, %rdi
je 0x1db7d
movq 0x18(%rdi), %r14
callq 0xd090
movq %r14, %rdi
jmp 0x1db6a
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/justy989[P]ce/ce_syntax.c
// Function: ce_range_list_insert
bool ce_range_list_insert(CeRangeList_t* list, CePoint_t start, CePoint_t end){
     CeRangeNode_t* node = malloc(sizeof(*node));
     if(!node) return false;
     node->range.start = start;
     node->range.end = end;
     node->next = NULL;
     if(list->tail) list->tail->next = node;
     list->tail = node;
     if(!list->head) list->head = node;
     return true;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %r8, %r14
movq %rcx, %r15
movq %rdx, %r12
movq %rsi, %r13
movq %rdi, %rbx
pushq $0x28
popq %rdi
callq 0xd4c0
testq %rax, %rax
je 0x1dbde
movq %r13, (%rax)
movq %r12, 0x8(%rax)
movq %r15, 0x10(%rax)
movq %r14, 0x18(%rax)
andq $0x0, 0x20(%rax)
movq 0x8(%rbx), %rcx
testq %rcx, %rcx
je 0x1dbd1
movq %rax, 0x20(%rcx)
movq %rax, 0x8(%rbx)
cmpq $0x0, (%rbx)
jne 0x1dbde
movq %rax, (%rbx)
testq %rax, %rax
setne %al
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/justy989[P]ce/ce_syntax.c
// Function: ce_range_list_insert_sorted
bool ce_range_list_insert_sorted(CeRangeList_t* list, CePoint_t start, CePoint_t end){
     CeRangeNode_t* itr = list->head;
     CeRangeNode_t* prev = NULL;
     while(itr){
          if(prev){
               if(ce_point_after(itr->range.start, end) &&
                  ce_point_after(end, prev->range.end)){
                    break;
               }
          }else{
               if(ce_point_after(itr->range.start, end)){
                    break;
               }
          }

          prev = itr;
          itr = itr->next;
     }

     if(itr){
          if(!ce_point_after(end, itr->range.start)) return false;
     }

     CeRangeNode_t* node = malloc(sizeof(*node));
     if(!node) return false;
     node->range.start = start;
     node->range.end = end;

     if(!itr){
          node->next = NULL;
     }else{
          node->next = itr;
     }

     if(prev){
          prev->next = node;
     }else{
          list->head = node;
     }

     return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %r14
movq %rcx, %r15
movq %rdx, (%rsp)
movq %rsi, %r13
movq %rdi, %rbx
xorl %r12d, %r12d
movq %rdi, %rax
movq (%rax), %rbp
testq %rbp, %rbp
je 0x1dc6c
movq (%rbp), %rdi
movq 0x8(%rbp), %rsi
movq %r15, %rdx
movq %r14, %rcx
callq 0xea69
testq %r12, %r12
je 0x1dc48
testb %al, %al
je 0x1dc4c
movq 0x10(%r12), %rdx
movq 0x18(%r12), %rcx
movq %r15, %rdi
movq %r14, %rsi
callq 0xea69
testb %al, %al
jne 0x1dc55
leaq 0x20(%rbp), %rax
movq %rbp, %r12
jmp 0x1dc0f
movq (%rbp), %rdx
movq 0x8(%rbp), %rcx
movq %r15, %rdi
movq %r14, %rsi
callq 0xea69
testb %al, %al
je 0x1dca3
pushq $0x28
popq %rdi
callq 0xd4c0
testq %rax, %rax
je 0x1dca3
movq %r13, (%rax)
movq (%rsp), %rcx
movq %rcx, 0x8(%rax)
movq %r15, 0x10(%rax)
movq %r14, 0x18(%rax)
movq %rbp, 0x20(%rax)
leaq 0x20(%r12), %rcx
testq %r12, %r12
cmoveq %rbx, %rcx
movq %rax, (%rcx)
movb $0x1, %al
jmp 0x1dca5
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/justy989[P]ce/ce_syntax.c
// Function: ce_range_list_free
void ce_range_list_free(CeRangeList_t* list){
     CeRangeNode_t* itr = list->head;
     while(itr){
          CeRangeNode_t* tmp = itr;
          itr = itr->next;
          free(tmp);
     }

     list->head = NULL;
     list->tail = NULL;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %rdi
testq %rdi, %rdi
je 0x1dcd1
movq 0x20(%rdi), %r14
callq 0xd090
movq %r14, %rdi
jmp 0x1dcbe
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/justy989[P]ce/ce_syntax.c
// Function: ce_draw_color_list_next_to_last_fg_color
int ce_draw_color_list_next_to_last_fg_color(CeDrawColorList_t* draw_color_list){
     int fg = CE_COLOR_DEFAULT;
     if(draw_color_list->tail && (draw_color_list->head != draw_color_list->tail)){
          CeDrawColorNode_t* itr = draw_color_list->head;
          while(itr->next != draw_color_list->tail) itr = itr->next;
          fg = itr->fg;
     }
     return fg;
}

// Assembly:
movq 0x8(%rdi), %rcx
pushq $-0x1
popq %rax
testq %rcx, %rcx
je 0x1dd22
movq (%rdi), %rdx
cmpq %rcx, %rdx
je 0x1dd22
movq %rdx, %rax
movq 0x18(%rdx), %rdx
cmpq %rcx, %rdx
jne 0x1dd14
movl (%rax), %eax
retq
// File: /workspace/github_c_makefile_star2_O2/justy989[P]ce/ce_syntax.c
// Function: ce_color_def_get
int ce_color_def_get(CeColorDefs_t* color_defs, int fg, int bg){
     // search for the already defined color
     for(int32_t i = 0; i < color_defs->count; ++i){
          if(color_defs->pairs[i].fg == fg && color_defs->pairs[i].bg == bg){
               return i;
          }
     }

     // increment the color pair we are going to define, but make sure it wraps around to 0 at the max
     color_defs->current++;
     color_defs->current %= 256;
     if(color_defs->current <= 0) color_defs->current = 1; // when we wrap around, start at 1, because curses doesn't like 0 index color pairs

#if defined(DISPLAY_TERMINAL)
     // create the pair definition
     init_pair(color_defs->current, fg, bg);
#endif

     // set our internal definition
     color_defs->pairs[color_defs->current].fg = fg;
     color_defs->pairs[color_defs->current].bg = bg;

     if(color_defs->current >= color_defs->count){
          color_defs->count = color_defs->current + 1;
     }

     return color_defs->current;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %edx, %ebp
movl %esi, %r14d
movq %rdi, %rbx
movl (%rdi), %ecx
xorl %eax, %eax
testl %ecx, %ecx
cmovlel %eax, %ecx
cmpq %rax, %rcx
je 0x1dd4f
cmpl %r14d, 0x8(%rbx,%rax,8)
jne 0x1dd4a
cmpl %ebp, 0xc(%rbx,%rax,8)
je 0x1dd8d
incq %rax
jmp 0x1dd38
movl 0x4(%rbx), %eax
incl %eax
movl $0x100, %ecx            # imm = 0x100
cltd
idivl %ecx
cmpl $0x2, %edx
pushq $0x1
popq %rax
cmovgel %edx, %eax
movl %eax, 0x4(%rbx)
movswl %ax, %edi
movswl %r14w, %esi
movswl %bp, %edx
callq 0xd4f0
movslq 0x4(%rbx), %rax
movl %r14d, 0x8(%rbx,%rax,8)
movl %ebp, 0xc(%rbx,%rax,8)
cmpl (%rbx), %eax
jl 0x1dd8d
leal 0x1(%rax), %ecx
movl %ecx, (%rbx)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/justy989[P]ce/ce_syntax.c
// Function: check_visual_start
void check_visual_start(CeRangeNode_t* range_node, int64_t line, CeDrawColorList_t* draw_color_list,
                        CeSyntaxDef_t* syntax_defs, bool* in_visual){
     if(range_node){
          CePoint_t start = {0, line};
          if(ce_point_after(start, range_node->range.start) && !ce_point_after(start, range_node->range.end)){
               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, start);
               *in_visual = true;
          }
     }
}

// Assembly:
testq %rdi, %rdi
je 0x1de27
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %r8, %rbx
movq %rcx, %r12
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %r13
movq (%rdi), %rdx
movq 0x8(%rdi), %rcx
xorl %edi, %edi
callq 0xea69
testb %al, %al
je 0x1de1e
movq 0x10(%r13), %rdx
movq 0x18(%r13), %rcx
xorl %edi, %edi
movq %r14, %rsi
callq 0xea69
testb %al, %al
jne 0x1de1e
movq 0x8(%r15), %rax
testq %rax, %rax
je 0x1ddf5
movl 0x64(%r12), %edx
cmpl $-0x2, %edx
jne 0x1ddf1
movl 0x4(%rax), %edx
movl (%rax), %esi
jmp 0x1de03
movl 0x64(%r12), %edx
cmpl $-0x2, %edx
pushq $-0x1
popq %rsi
cmovel %esi, %edx
movl 0x60(%r12), %eax
cmpl $-0x2, %eax
cmovnel %eax, %esi
movq %r15, %rdi
xorl %ecx, %ecx
movq %r14, %r8
callq 0x1dadd
movb $0x1, (%rbx)
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/justy989[P]ce/ce_syntax.c
// Function: check_visual_mode_end
void check_visual_mode_end(CeRangeNode_t* range_node, bool* in_visual, int64_t line, int64_t line_len,
                           CeDrawColorList_t* draw_color_list){
     if(!range_node) return;

     CePoint_t point = {line_len, line};
     if(in_visual){
          if(ce_point_after(point, range_node->range.end)){
               ce_draw_color_list_insert(draw_color_list, ce_draw_color_list_last_fg_color(draw_color_list),
                                         CE_COLOR_DEFAULT, point);
               range_node = range_node->next;
               *in_visual = false;
          }
     }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r15
testq %rdi, %rdi
sete %al
testq %rsi, %rsi
sete %cl
orb %al, %cl
jne 0x1dfb0
movq %r8, %r12
movq %rdx, %r14
movq %rsi, %rbx
movq 0x10(%rdi), %rdx
movq 0x18(%rdi), %rcx
movq %r15, %rdi
movq %r14, %rsi
callq 0xea69
testb %al, %al
je 0x1dfb0
movq 0x8(%r12), %rax
testq %rax, %rax
je 0x1df99
movl (%rax), %esi
jmp 0x1df9c
pushq $-0x1
popq %rsi
pushq $-0x1
popq %rdx
movq %r12, %rdi
movq %r15, %rcx
movq %r14, %r8
callq 0x1dadd
movb $0x0, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/justy989[P]ce/ce_syntax.c
// Function: match_c_multiline_comment
static int64_t match_c_multiline_comment(const char* str){
     if(strncmp("/*", str, 2) == 0){
          char* matching_comment = strstr(str, "*/");
          if(matching_comment) return (matching_comment - str);
          return utf8_strlen_until_trailing_whitespace(str);
     }

     return 0;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movzbl (%rdi), %eax
subl $0x2f, %eax
jne 0x1e538
movzbl 0x1(%rbx), %ecx
pushq $0x2a
popq %rax
subl %ecx, %eax
jmp 0x1e53a
negl %eax
testl %eax, %eax
je 0x1e542
xorl %eax, %eax
jmp 0x1e559
leaq 0xe974(%rip), %rsi      # 0x2cebd
movq %rbx, %rdi
callq 0xd6f0
testq %rax, %rax
je 0x1e55b
subq %rbx, %rax
popq %rbx
retq
movq %rbx, %rdi
popq %rbx
jmp 0x2047b
// File: /workspace/github_c_makefile_star2_O2/justy989[P]ce/ce_syntax.c
// Function: match_trailing_whitespace
static int64_t match_trailing_whitespace(const char* str){
     const char* itr = str;
     while(*itr){
          if(!isspace((int)(*itr))) return 0;
          itr++;
     }

     return (itr - str);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %r14
xorl %ebx, %ebx
movsbq (%r14,%rbx), %r15
testq %r15, %r15
je 0x1e5cc
callq 0xd720
movq (%rax), %rax
testb $0x20, 0x1(%rax,%r15,2)
je 0x1e5ca
incq %rbx
jmp 0x1e5ab
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/justy989[P]ce/ce_syntax.c
// Function: match_c_type
static int64_t match_c_type(const char* str, const char* beginning_of_line, bool cpp){
     if(!isalpha((int)(*str))) return false;

     const char* itr = str;
     while(*itr){
          if(!is_c_type_char(*itr)) break;
          itr++;
     }

     int64_t len = itr - str;
     if(len > 1){
          if(strncmp((itr - 2), "_t", 2) == 0) return len;
          if(strncmp((itr - 2), "_h", 2) == 0) return len;
          if(cpp && isupper((int)(*str))) return len;
     }

     static const char* keywords[] = {
          "bool",
          "char",
          "double",
          "float",
          "int",
          "long",
          "short",
          "signed",
          "unsigned",
          "void",
          "S8",
          "S16",
          "S32",
          "S64",
          "U8",
          "U16",
          "U32",
          "U64",
          "F32",
          "F64",
     };

     static const int64_t keyword_count = sizeof(keywords) / sizeof(keywords[0]);

     return match_words(str, beginning_of_line, keywords, keyword_count);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edx, %ebp
movq %rsi, %rbx
movq %rdi, %r14
callq 0xd720
movq (%rax), %rcx
movsbq (%r14), %rax
movzwl (%rcx,%rax,2), %r12d
xorl %r15d, %r15d
btl $0xa, %r12d
jb 0x1e60c
movq %r15, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
testb %al, %al
je 0x1e626
movsbl %al, %edi
callq 0x204c7
testb %al, %al
je 0x1e626
movb 0x1(%r14,%r15), %al
incq %r15
jmp 0x1e60c
cmpq $0x2, %r15
jl 0x1e64d
cmpb $0x5f, -0x2(%r14,%r15)
jne 0x1e644
cmpb $0x74, -0x1(%r14,%r15)
je 0x1e600
cmpb $0x68, -0x1(%r14,%r15)
je 0x1e600
shrl $0x8, %r12d
testb %bpl, %r12b
jne 0x1e600
leaq 0x1ad6c(%rip), %rdx     # 0x393c0
pushq $0x14
popq %rcx
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x204e8
// File: /workspace/github_c_makefile_star2_O2/justy989[P]ce/ce_syntax.c
// Function: match_caps_var
static int64_t match_caps_var(const char* str, const char* beginning_of_line){
     const char* itr = str;
     if(!is_starting_caps_var_char(*itr)) return 0; // make sure the first char is not a number
     itr++;
     while(*itr){
          if(!is_caps_var_char(*itr)) break;
          itr++;
     }

     // check before and after the match for non c type chars
     if(str > beginning_of_line){
          if(is_c_type_char(*(str - 1))) return 0;
     }
     if(is_c_type_char(*itr)) return 0;

     int64_t len = itr - str;
     if(len > 1) return len;
     return 0;
}

// Assembly:
movsbl (%rdi), %eax
cmpl $0x5f, %eax
setne %cl
addl $-0x41, %eax
cmpl $0x1a, %eax
setae %al
testb %al, %cl
jne 0x1e6d7
pushq %r14
pushq %rbx
pushq %rax
pushq $0x1
popq %rax
movq %rax, %r14
movsbl (%rdi,%rax), %ebx
testl %ebx, %ebx
je 0x1e6b6
leal -0x41(%rbx), %eax
cmpl $0x1a, %eax
setb %al
cmpb $0x5f, %bl
sete %cl
leal -0x30(%rbx), %edx
cmpl $0xa, %edx
setb %dl
orb %al, %dl
orb %cl, %dl
leaq 0x1(%r14), %rax
testb %dl, %dl
jne 0x1e687
cmpq %rsi, %rdi
jbe 0x1e6c8
movsbl -0x1(%rdi), %edi
callq 0x204c7
testb %al, %al
jne 0x1e6d3
movl %ebx, %edi
callq 0x204c7
testb %al, %al
je 0x1e6da
xorl %eax, %eax
jmp 0x1e6e4
xorl %eax, %eax
retq
xorl %eax, %eax
cmpq $0x2, %r14
cmovgeq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/justy989[P]ce/ce_syntax.c
// Function: match_c_string
static int64_t match_c_string(const char* str){
     if(*str == '"'){
          const char* match = str;
          while(match){
               match = strchr(match + 1, '"');
               if(match && *(match - 1) != '\\'){
                    return (match - str) + 1;
               }
          }
     }

     return 0;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
cmpb $0x22, (%rdi)
jne 0x1e73a
movq %rdi, %r14
xorl %ebx, %ebx
pushq $0x22
popq %rbp
movq %rdi, %rax
testq %rax, %rax
je 0x1e73c
incq %rax
movq %rax, %rdi
movl %ebp, %esi
callq 0xd230
testq %rax, %rax
je 0x1e712
cmpb $0x5c, -0x1(%rax)
je 0x1e712
subq %r14, %rax
incq %rax
movq %rax, %rbx
jmp 0x1e73c
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/justy989[P]ce/ce_syntax.c
// Function: match_c_character_literal
static int64_t match_c_character_literal(const char* str){
     // c character literals are one character long unless that character is escaped
     // in which case the literal will be 2 characters long before we see an end '
     if(*str == '\''){
          switch(str[1]){
          case 0: return 0;
          case '\'': return 2;
          case '\\':
               // our next character is escaped. skip it unless its the end of the string
               if(!str[2]) return 0;

               // our next character must be an end quote or we are not in a character literal
               if(str[3] == '\'') return 4;
               return 0;
          default:
               if(str[2] == '\'') return 3;
          }
     }

     return 0;
}

// Assembly:
cmpb $0x27, (%rdi)
jne 0x1e77c
movzbl 0x1(%rdi), %eax
testl %eax, %eax
je 0x1e77e
cmpl $0x5c, %eax
je 0x1e75f
cmpl $0x27, %eax
jne 0x1e772
pushq $0x2
jmp 0x1e77a
cmpb $0x0, 0x2(%rdi)
je 0x1e77c
xorl %eax, %eax
cmpb $0x27, 0x3(%rdi)
sete %al
shll $0x2, %eax
retq
cmpb $0x27, 0x2(%rdi)
jne 0x1e77c
pushq $0x3
popq %rax
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/justy989[P]ce/ce_syntax.c
// Function: match_c_preproc
static int64_t match_c_preproc(const char* str){
     if(*str == '#'){
          const char* itr = str + 1;
          while(*itr){
               if(!isalpha((int)(*itr))) break;
               itr++;
          }

          return itr - str;
     }

     return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
cmpb $0x23, (%rdi)
jne 0x1e96a
movq %rdi, %r14
pushq $0x1
popq %rax
movq %rax, %rbx
movsbq (%r14,%rax), %r15
testq %r15, %r15
je 0x1e96c
callq 0xd720
movq (%rax), %rcx
leaq 0x1(%rbx), %rax
testb $0x4, 0x1(%rcx,%r15,2)
jne 0x1e947
jmp 0x1e96c
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/justy989[P]ce/ce_syntax.c
// Function: match_python_docstring
static int64_t match_python_docstring(const char* str, PythonDocstring_t* python_docstring){
     if(strncmp(str, "\"\"\"", 3) == 0){
          *python_docstring = PYTHON_DOCSTRING_DOUBLE_QUOTE;
          char* match = strstr(str, "\"\"\"");
          if(match) return ce_utf8_strlen_between(str, match);
          return ce_utf8_strlen(str);
     }

     if(strncmp(str, "'''", 3) == 0){
          *python_docstring = PYTHON_DOCSTRING_SINGLE_QUOTE;
          char* match = strstr(str, "'''");
          if(match) return ce_utf8_strlen_between(str, match);
          return ce_utf8_strlen(str);
     }

     return 0;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movzbl (%rdi), %eax
cmpl $0x27, %eax
je 0x1f938
cmpl $0x22, %eax
jne 0x1f96a
cmpb $0x22, 0x1(%rbx)
jne 0x1f96a
cmpb $0x22, 0x2(%rbx)
jne 0x1f96a
movl $0x2, (%rsi)
leaq 0xd57c(%rip), %rsi      # 0x2ceb2
jmp 0x1f951
cmpb $0x27, 0x1(%rbx)
jne 0x1f96a
cmpb $0x27, 0x2(%rbx)
jne 0x1f96a
movl $0x1, (%rsi)
leaq 0xd565(%rip), %rsi      # 0x2ceb6
movq %rbx, %rdi
callq 0xd6f0
movq %rbx, %rdi
testq %rax, %rax
je 0x1f96e
movq %rax, %rsi
popq %rbx
jmp 0xfc01
xorl %eax, %eax
popq %rbx
retq
popq %rbx
jmp 0xe38c
// File: /workspace/github_c_makefile_star2_O2/justy989[P]ce/ce_syntax.c
// Function: match_python_string
static int64_t match_python_string(const char* str){
     if(*str == '\'' || *str == '"'){
          const char* match = str;
          while(match){
               match = strchr(match + 1, *str);
               if(match && *(match - 1) != '\\'){
                    return ce_utf8_strlen_between(str, match);
               }
          }
     }

     return 0;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movzbl (%rdi), %ebp
cmpl $0x27, %ebp
je 0x1f993
cmpl $0x22, %ebp
jne 0x1f9c4
movq %rbx, %rax
testq %rax, %rax
je 0x1f9c4
incq %rax
movq %rax, %rdi
movl %ebp, %esi
callq 0xd230
testq %rax, %rax
je 0x1f996
cmpb $0x5c, -0x1(%rax)
je 0x1f996
movq %rbx, %rdi
movq %rax, %rsi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0xfc01
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq