LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/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
leaq 0x11980(%rip), %rax     # 0x30bd4
movl (%r14), %ecx
cmpq $0x3, %rcx
ja 0x1f2b2
movslq (%rax,%rcx,4), %rcx
addq %rax, %rcx
jmpq *%rcx
movq 0x8(%r14), %r14
jmp 0x1f254
movq 0x10(%r14), %r14
jmp 0x1f254
cmpq %r15, 0x48(%r14)
jne 0x1f2b2
movq (%rbx), %rax
movq 0x8(%rbx), %rcx
movq %r14, (%rax,%rcx,8)
incq %rcx
movq %rcx, 0x8(%rbx)
jmp 0x1f2b2
cmpq $0x0, 0x10(%r14)
jle 0x1f2b2
xorl %r12d, %r12d
movq 0x8(%r14), %rax
movq (%rax,%r12,8), %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x1f23c
incq %r12
cmpq 0x10(%r14), %r12
jl 0x1f296
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/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
xorps %xmm0, %xmm0
movq %rsp, %r15
movaps %xmm0, (%r15)
xorl %edx, %edx
callq 0x1f1c8
leaq (,%rax,8), %rdi
callq 0xd4c0
movq %rax, (%r15)
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x1f23c
movq (%r15), %rax
movq 0x8(%r15), %rdx
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/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:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movl (%rdi), %eax
testl %eax, %eax
je 0x1f35b
cmpl $0x1, %eax
jne 0x1f362
movq 0x10(%rdi), %r14
xorl %ebx, %ebx
testq %r14, %r14
jle 0x1f364
movq 0x8(%rdi), %r15
xorl %r12d, %r12d
movq (%r15,%r12,8), %rdi
callq 0x1f31e
addl %eax, %ebx
incq %r12
cmpq %r12, %r14
jne 0x1f343
movslq %ebx, %rbx
jmp 0x1f364
movl $0x1, %ebx
jmp 0x1f364
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_c_makefile_star2_O1/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 0x1f3bc
movb %sil, 0x2f8(%rdi)
movzbl %sil, %eax
addl $-0x21, %eax
leaq (%rdi,%rax,8), %rdi
callq 0x10370
cmpb $-0x70, %bl
setb %al
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/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)
movq $0x0, 0x10(%rdi)
movl $0x40, %edi
callq 0xd4c0
testq %rax, %rax
je 0x1f480
movq %rax, %r14
movq %rax, %rdi
movq %r12, %rsi
movl $0x1, %edx
callq 0xd320
testl %eax, %eax
je 0x1f491
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 0x1f494
leaq 0x118e3(%rip), %rdi     # 0x30d6a
callq 0xd640
movq %rax, (%rbx)
jmp 0x1f494
movq %r14, (%r15)
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 %rdx, %rax
movq %rsi, %r14
movq %rdi, %rbx
pxor %xmm0, %xmm0
movdqu %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
movq %rsp, %rcx
movl $0x1, %edx
movq %rsi, %rdi
movq %rax, %rsi
xorl %r8d, %r8d
callq 0xd500
cmpl $0x1, %eax
je 0x1f4f8
movl %eax, %ebp
testl %eax, %eax
jne 0x1f503
movslq (%rsp), %rax
movq %rax, 0x8(%rbx)
movslq 0x4(%rsp), %rcx
subq %rax, %rcx
movq %rcx, 0x10(%rbx)
jmp 0x1f522
pcmpeqd %xmm0, %xmm0
movdqu %xmm0, 0x8(%rbx)
jmp 0x1f522
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_O1/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 %r13
pushq %r12
pushq %rbx
leaq 0x11211(%rip), %rsi     # 0x30759
callq 0xd5c0
testq %rax, %rax
je 0x1f59b
movq %rax, %r15
xorl %r13d, %r13d
leaq 0x111fa(%rip), %r14     # 0x30759
xorl %ebx, %ebx
leaq 0x1(%r13), %r12
leaq 0x8(,%r13,8), %rsi
movq %rbx, %rdi
callq 0xd520
movq %rax, %rbx
movq %r15, %rdi
callq 0xd640
movq %rax, (%rbx,%r13,8)
xorl %edi, %edi
movq %r14, %rsi
callq 0xd5c0
movq %rax, %r15
movq %r12, %r13
testq %rax, %rax
jne 0x1f561
jmp 0x1f5a0
xorl %ebx, %ebx
xorl %r12d, %r12d
leaq 0x8(,%r12,8), %rsi
movq %rbx, %rdi
callq 0xd520
movq $0x0, (%rax,%r12,8)
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/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 %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %ecx, %r12d
movl %edx, %r15d
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x10(%rsp), %rdi
callq 0xd2f0
xorl %r13d, %r13d
testl %eax, %eax
jne 0x1f6fc
leaq 0x8(%rsp), %rdi
callq 0xd2f0
testl %eax, %eax
jne 0x1f6fc
callq 0xd6e0
testl %eax, %eax
js 0x1f6fc
movl %eax, %ebp
je 0x1f658
movl 0x10(%rsp), %edi
callq 0xd2e0
movl 0xc(%rsp), %edi
callq 0xd2e0
movl 0x14(%rsp), %edi
testb $0x1, %r15b
jne 0x1f63a
callq 0xd2e0
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
movl %edi, 0x10(%rbx)
movl 0x8(%rsp), %edi
testb $0x2, %r15b
jne 0x1f6b6
callq 0xd2e0
movl $0xffffffff, 0x4(%rbx)  # imm = 0xFFFFFFFF
jmp 0x1f6f9
movl 0x14(%rsp), %edi
callq 0xd2e0
movl 0x8(%rsp), %edi
callq 0xd2e0
movl 0x10(%rsp), %edi
xorl %esi, %esi
callq 0xd220
movl 0xc(%rsp), %edi
movl $0x1, %esi
callq 0xd220
movl 0xc(%rsp), %edi
movl $0x2, %esi
callq 0xd220
testb %r12b, %r12b
je 0x1f6bb
leaq 0x117be(%rip), %rdi     # 0x30e5b
leaq 0x117bf(%rip), %rdx     # 0x30e63
movq %rdi, %rsi
movq %r14, %rcx
xorl %r8d, %r8d
xorl %eax, %eax
callq 0xd660
jmp 0x1f6f9
movl %edi, 0x4(%rbx)
jmp 0x1f6f9
movq %r14, %rdi
callq 0x1f538
movq %rax, %r14
movq (%rax), %rdi
movq %rax, %rsi
callq 0xd6d0
movq (%r14), %rdi
testq %rdi, %rdi
je 0x1f6f1
movq %r14, %r15
addq $0x8, %r15
callq 0xd090
movq (%r15), %rdi
addq $0x8, %r15
testq %rdi, %rdi
jne 0x1f6e0
movq %r14, %rdi
callq 0xd090
movl %ebp, %r13d
movl %r13d, (%rbx)
testl %r13d, %r13d
je 0x1f732
movl 0x10(%rbx), %edi
testl %edi, %edi
js 0x1f71b
leaq 0xf9bb(%rip), %rsi      # 0x2f0cd
callq 0xd540
movq %rax, 0x18(%rbx)
movl 0x4(%rbx), %edi
testl %edi, %edi
js 0x1f732
leaq 0x11759(%rip), %rsi     # 0x30e82
callq 0xd540
movq %rax, 0x8(%rbx)
testl %r13d, %r13d
setne %al
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x1f782
pushq %rbx
movq %rdi, %rbx
movq 0x18(%rdi), %rdi
testq %rdi, %rdi
je 0x1f772
movq $0x0, 0x18(%rbx)
callq 0xd1f0
movl 0x10(%rbx), %edi
callq 0xd2e0
movl $0xffffffff, 0x10(%rbx) # imm = 0xFFFFFFFF
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x1f7aa
callq 0xd0a0
cmpl $0x4, (%rax)
jne 0x1f821
movl 0x4(%rsp), %eax
movl %eax, %ecx
andl $0x7f, %ecx
je 0x1f7c6
shll $0x18, %ecx
addl $0x1000000, %ecx        # imm = 0x1000000
cmpl $0x2000000, %ecx        # imm = 0x2000000
jl 0x1f78f
cmpl $0xffff, %eax           # imm = 0xFFFF
je 0x1f825
cmpl $0x0, 0x4(%rbx)
js 0x1f7f1
movq 0x8(%rbx), %rdi
testq %rdi, %rdi
je 0x1f7e9
movq $0x0, 0x8(%rbx)
callq 0xd1f0
movl 0x4(%rbx), %edi
callq 0xd2e0
cmpl $0x0, 0x10(%rbx)
js 0x1f815
movq 0x18(%rbx), %rdi
testq %rdi, %rdi
je 0x1f80d
movq $0x0, 0x18(%rbx)
callq 0xd1f0
movl 0x10(%rbx), %edi
callq 0xd2e0
movl 0x4(%rsp), %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
xorl %eax, %eax
jmp 0x1f819
leaq 0x11559(%rip), %rdi     # 0x30d85
leaq 0x1156a(%rip), %rsi     # 0x30d9d
leaq 0x11573(%rip), %rcx     # 0x30dad
movl $0x108, %edx            # imm = 0x108
callq 0xd280
// File: /workspace/github_c_makefile_star2_O1/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 0x1f860
callq 0xd350
movq %rax, %rbx
testl %ebx, %ebx
js 0x1f877
andl $0x7fffffff, %ebx       # imm = 0x7FFFFFFF
jmp 0x1f8a1
leaq 0x11570(%rip), %rdi     # 0x30dd7
xorl %eax, %eax
callq 0xd954
movq $-0x1, %rbx
jmp 0x1f8a1
callq 0xd0a0
movl (%rax), %edi
cmpl $0x4, %edi
je 0x1f89e
cmpl $0xb, %edi
je 0x1f89e
callq 0xd650
leaq 0x11577(%rip), %rdi     # 0x30e0b
movq %rax, %rsi
xorl %eax, %eax
callq 0xd954
movslq %ebx, %rbx
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/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 %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
xorl %r13d, %r13d
movq %rbx, %rdx
subq %r13, %rdx
jle 0x1f914
movl 0x10(%r15), %edi
testl %edi, %edi
js 0x1f919
leaq (%r14,%r13), %rsi
callq 0xd1d0
movq %rax, %rbp
testq %rax, %rax
js 0x1f8e3
addq %rbp, %r13
jmp 0x1f90d
callq 0xd0a0
movl (%rax), %edi
cmpl $0x4, %edi
je 0x1f90a
cmpl $0xb, %edi
je 0x1f90a
callq 0xd650
leaq 0x11538(%rip), %rdi     # 0x30e38
movq %rax, %rsi
xorl %eax, %eax
callq 0xd954
movq %rbp, %r12
testq %rbp, %rbp
jns 0x1f8bd
jmp 0x1f92e
movq %r13, %r12
jmp 0x1f92e
leaq 0x114b7(%rip), %rdi     # 0x30dd7
xorl %eax, %eax
callq 0xd954
movq $-0x1, %r12
movq %r12, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x1f98f
cmpl %r12d, (%r13)
jne 0x1f98f
cmpl %ebp, 0x4(%r13)
jne 0x1f98f
movb $0x1, %cl
cmpq %r14, 0x10(%r13)
je 0x1f9cf
movl $0x20, %edi
callq 0xd4c0
testq %rax, %rax
setne %cl
je 0x1f9cf
movl %r12d, (%rax)
movl %ebp, 0x4(%rax)
movq %r15, 0x8(%rax)
movq %r14, 0x10(%rax)
movq $0x0, 0x18(%rax)
testq %r13, %r13
je 0x1f9c0
movq %rax, 0x18(%r13)
movq %rax, 0x8(%rbx)
movb $0x1, %cl
cmpq $0x0, (%rbx)
jne 0x1f9cf
movq %rax, (%rbx)
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_O1/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 0x1fa00
movq 0x18(%rdi), %r14
callq 0xd090
movq %r14, %rdi
testq %r14, %r14
jne 0x1f9ef
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/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
movl $0x28, %edi
callq 0xd4c0
testq %rax, %rax
je 0x1fa66
movq %r13, (%rax)
movq %r12, 0x8(%rax)
movq %r15, 0x10(%rax)
movq %r14, 0x18(%rax)
movq $0x0, 0x20(%rax)
movq 0x8(%rbx), %rcx
testq %rcx, %rcx
je 0x1fa59
movq %rax, 0x20(%rcx)
movq %rax, 0x8(%rbx)
cmpq $0x0, (%rbx)
jne 0x1fa66
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_O1/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
subq $0x18, %rsp
movq %r8, %r14
movq %rcx, %r15
movq %rdx, 0x8(%rsp)
movq %rsi, (%rsp)
movq %rdi, 0x10(%rsp)
movq (%rdi), %rbx
testq %rbx, %rbx
sete %bpl
je 0x1faf2
xorl %r12d, %r12d
movq %r12, %r13
movq %rbx, %r12
movq (%rbx), %rdi
movq 0x8(%rbx), %rsi
movq %r15, %rdx
movq %r14, %rcx
callq 0xedfb
testq %r13, %r13
je 0x1fadb
testb %al, %al
je 0x1fadf
movq 0x10(%r13), %rdx
movq 0x18(%r13), %rcx
movq %r15, %rdi
movq %r14, %rsi
callq 0xedfb
testb %al, %al
jne 0x1faf7
movq 0x20(%r12), %rbx
movq %r12, %r13
testq %rbx, %rbx
sete %bpl
jne 0x1faa7
jmp 0x1fb12
xorl %r13d, %r13d
jmp 0x1fb12
movq (%r12), %rdx
movq 0x8(%r12), %rcx
movq %r15, %rdi
movq %r14, %rsi
callq 0xedfb
movq %r12, %rbx
testb %al, %al
je 0x1fb6d
movl $0x28, %edi
callq 0xd4c0
testq %rax, %rax
setne %cl
je 0x1fb5c
movq (%rsp), %rcx
movq %rcx, (%rax)
movq 0x8(%rsp), %rcx
movq %rcx, 0x8(%rax)
movq %r15, 0x10(%rax)
xorl %ecx, %ecx
testb $0x1, %bpl
cmovneq %rcx, %rbx
movq %r14, 0x18(%rax)
movq %rbx, 0x20(%rax)
leaq 0x20(%r13), %rcx
testq %r13, %r13
cmoveq 0x10(%rsp), %rcx
movq %rax, (%rcx)
movb $0x1, %cl
movl %ecx, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %ecx, %ecx
jmp 0x1fb5c
// File: /workspace/github_c_makefile_star2_O1/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 0x1fb91
movq 0x20(%rdi), %r14
callq 0xd090
movq %r14, %rdi
testq %r14, %r14
jne 0x1fb80
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/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
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
testq %rcx, %rcx
je 0x1fbe8
movq (%rdi), %rdx
cmpq %rcx, %rdx
je 0x1fbe8
movq %rdx, %rax
movq 0x18(%rdx), %rdx
cmpq %rcx, %rdx
jne 0x1fbda
movl (%rax), %eax
retq
// File: /workspace/github_c_makefile_star2_O1/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
movslq (%rdi), %rcx
testq %rcx, %rcx
setg %dl
jle 0x1fc21
xorl %eax, %eax
cmpl %r14d, 0x8(%rbx,%rax,8)
jne 0x1fc0f
cmpl %ebp, 0xc(%rbx,%rax,8)
je 0x1fc1c
incq %rax
cmpq %rcx, %rax
setb %dl
jne 0x1fc02
jmp 0x1fc21
testb $0x1, %dl
jne 0x1fc71
movl 0x4(%rbx), %eax
leal 0x1(%rax), %ecx
leal 0x100(%rax), %edx
testl %ecx, %ecx
cmovnsl %ecx, %edx
andl $0xffffff00, %edx       # imm = 0xFFFFFF00
negl %edx
addl %edx, %eax
incl %eax
cmpl $0x2, %eax
movl $0x1, %ecx
cmovgel %eax, %ecx
movl %ecx, 0x4(%rbx)
movswl %cx, %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 0x1fc71
leal 0x1(%rax), %ecx
movl %ecx, (%rbx)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x1fd0b
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 0xedfb
testb %al, %al
je 0x1fd02
movq 0x10(%r13), %rdx
movq 0x18(%r13), %rcx
xorl %edi, %edi
movq %r14, %rsi
callq 0xedfb
testb %al, %al
jne 0x1fd02
movq 0x8(%r15), %rax
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
testq %rax, %rax
je 0x1fcd5
movl 0x4(%rax), %edx
movl 0x64(%r12), %ecx
cmpl $-0x2, %ecx
cmovnel %ecx, %edx
testq %rax, %rax
je 0x1fce7
movl (%rax), %esi
movl 0x60(%r12), %eax
cmpl $-0x2, %eax
cmovnel %eax, %esi
movq %r15, %rdi
xorl %ecx, %ecx
movq %r14, %r8
callq 0x1f959
movb $0x1, (%rbx)
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x1feb2
movq %r8, %r12
movq %rdx, %r14
movq %rsi, %rbx
movq 0x10(%rdi), %rdx
movq 0x18(%rdi), %rcx
movq %r15, %rdi
movq %r14, %rsi
callq 0xedfb
testb %al, %al
je 0x1feb2
movq 0x8(%r12), %rax
testq %rax, %rax
je 0x1fe97
movl (%rax), %esi
jmp 0x1fe9c
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
movq %r12, %rdi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movq %r15, %rcx
movq %r14, %r8
callq 0x1f959
movb $0x0, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/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
leaq 0x10a4c(%rip), %rdi     # 0x30e74
movl $0x2, %edx
movq %rbx, %rsi
callq 0xd0d0
testl %eax, %eax
je 0x2043d
xorl %eax, %eax
jmp 0x20454
leaq 0x10a2d(%rip), %rsi     # 0x30e71
movq %rbx, %rdi
callq 0xd6f0
testq %rax, %rax
je 0x20456
subq %rbx, %rax
popq %rbx
retq
movq %rbx, %rdi
popq %rbx
jmp 0x2242a
// File: /workspace/github_c_makefile_star2_O1/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 %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movb (%rdi), %bpl
movq %rdi, %rax
testb %bpl, %bpl
je 0x204d5
callq 0xd720
movq (%rax), %rcx
movq %rbx, %rax
movsbq %bpl, %rdx
testb $0x20, 0x1(%rcx,%rdx,2)
je 0x204da
movb 0x1(%rax), %bpl
incq %rax
testb %bpl, %bpl
jne 0x204be
subq %rbx, %rax
jmp 0x204dc
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebp
movq %rsi, %rbx
movq %rdi, %r14
callq 0xd720
movq (%rax), %rax
movsbq (%r14), %rcx
movzwl (%rax,%rcx,2), %r13d
btl $0xa, %r13d
jb 0x20523
xorl %r12d, %r12d
movq %r12, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movb (%r14), %cl
movq %r14, %r15
testb %cl, %cl
je 0x2054d
movq %r14, %r15
cmpb $0x5f, %cl
je 0x20542
movsbq %cl, %rcx
movzwl (%rax,%rcx,2), %ecx
andl $0x8, %ecx
je 0x2054d
movb 0x1(%r15), %cl
incq %r15
testb %cl, %cl
jne 0x20530
movq %r15, %r12
subq %r14, %r12
cmpq $0x2, %r12
jl 0x2059a
addq $-0x2, %r15
leaq 0x10acf(%rip), %rsi     # 0x31033
movl $0x2, %edx
movq %r15, %rdi
callq 0xd0d0
testl %eax, %eax
je 0x20511
leaq 0x108fb(%rip), %rsi     # 0x30e77
movl $0x2, %edx
movq %r15, %rdi
callq 0xd0d0
testl %eax, %eax
je 0x20511
shrl $0x8, %r13d
testb %bpl, %r13b
jne 0x20511
leaq 0x1ae1f(%rip), %rdx     # 0x3b3c0
movl $0x14, %ecx
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x22476
// File: /workspace/github_c_makefile_star2_O1/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 0x2066c
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movl $0x1, %eax
movq %rax, %rbx
movsbl (%rdi,%rax), %r15d
movslq %r15d, %r14
testl %r15d, %r15d
je 0x20612
leal -0x30(%r15), %ecx
leaq 0x1(%rbx), %rax
cmpl $0xa, %ecx
jb 0x205e6
cmpb $0x5f, %r14b
je 0x205e6
leal -0x41(%r15), %ecx
cmpl $0x1a, %ecx
jb 0x205e6
cmpq %rsi, %rdi
jbe 0x20639
movsbq -0x1(%rdi), %r12
callq 0xd720
movq %rax, %rcx
xorl %eax, %eax
cmpq $0x5f, %r12
je 0x20660
movq (%rcx), %rcx
movzwl (%rcx,%r12,2), %ecx
andl $0x8, %ecx
jne 0x20660
callq 0xd720
movq %rax, %rcx
xorl %eax, %eax
cmpb $0x5f, %r15b
je 0x20660
movq (%rcx), %rcx
movzwl (%rcx,%r14,2), %ecx
andl $0x8, %ecx
jne 0x20660
xorl %eax, %eax
cmpq $0x2, %rbx
cmovgeq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/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 %rbx
pushq %rax
cmpb $0x22, (%rdi)
jne 0x206da
movq %rdi, %rbx
xorl %ebp, %ebp
movq %rdi, %rax
incq %rax
movq %rax, %rdi
movl $0x22, %esi
callq 0xd230
testq %rax, %rax
je 0x206c3
cmpb $0x5c, -0x1(%rax)
jne 0x206ce
testq %rax, %rax
sete %bpl
jne 0x206a8
jmp 0x206d4
subq %rbx, %rax
incq %rax
testb $0x1, %bpl
je 0x206dc
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x2071e
movzbl 0x1(%rdi), %eax
testl %eax, %eax
je 0x20720
cmpl $0x5c, %eax
je 0x20700
cmpl $0x27, %eax
jne 0x20713
movl $0x2, %eax
retq
cmpb $0x0, 0x2(%rdi)
je 0x2071e
xorl %eax, %eax
cmpb $0x27, 0x3(%rdi)
sete %al
shll $0x2, %eax
retq
movl $0x3, %eax
cmpb $0x27, 0x2(%rdi)
je 0x20720
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x2093c
movq %rdi, %r14
movl $0x1, %eax
movq %rax, %rbx
movsbq (%r14,%rax), %r15
testq %r15, %r15
je 0x2093e
callq 0xd720
movq (%rax), %rcx
leaq 0x1(%rbx), %rax
testb $0x4, 0x1(%rcx,%r15,2)
jne 0x20919
jmp 0x2093e
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/justy989[P]ce/ce_syntax.c
// Function: match_cpp_namespace
static int64_t match_cpp_namespace(const char* str, const char* beginning_of_line){
     bool saw_colon = false;
     bool saw_alpha = false;
     const char* itr = str;
     while(*itr){
          if(isalpha((int)(*itr)) || *itr == '_'){
               if(saw_colon) break;
               saw_alpha = true;
          }else if(*itr == ':'){
               if(!saw_alpha) break;

               if(!saw_colon){
                    saw_colon = true;
               }else{
                    return (itr - str) - 1;
               }
          }else{
               break;
          }
          itr++;
     }

     return 0;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movb (%rdi), %bpl
testb %bpl, %bpl
je 0x20f14
movq %rdi, %rbx
callq 0xd720
movq (%rax), %rcx
movq $-0x1, %rax
xorl %edx, %edx
xorl %esi, %esi
cmpb $0x5f, %bpl
je 0x20eff
movsbq %bpl, %rdi
movzwl (%rcx,%rdi,2), %edi
andl $0x400, %edi            # imm = 0x400
jne 0x20eff
cmpb $0x3a, %bpl
jne 0x20f14
testb $0x1, %dl
je 0x20f14
testb $0x1, %sil
movb $0x1, %sil
je 0x20f07
jmp 0x20f16
movb $0x1, %dl
testb $0x1, %sil
jne 0x20f14
movb 0x2(%rbx,%rax), %bpl
incq %rax
testb %bpl, %bpl
jne 0x20ed3
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
leaq 0xf59a(%rip), %rsi      # 0x30e66
movl $0x3, %edx
callq 0xd0d0
testl %eax, %eax
je 0x218fc
leaq 0xf589(%rip), %rsi      # 0x30e6a
movl $0x3, %edx
movq %rbx, %rdi
callq 0xd0d0
testl %eax, %eax
je 0x2190c
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movl $0x2, (%r14)
leaq 0xf55c(%rip), %rsi      # 0x30e66
jmp 0x2191a
movl $0x1, (%r14)
leaq 0xf550(%rip), %rsi      # 0x30e6a
movq %rbx, %rdi
callq 0xd6f0
movq %rbx, %rdi
testq %rax, %rax
je 0x21939
movq %rax, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x10101
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xe485
// File: /workspace/github_c_makefile_star2_O1/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 %r14
pushq %rbx
movq %rdi, %rbx
movzbl (%rdi), %eax
cmpl $0x27, %eax
je 0x21959
cmpl $0x22, %eax
jne 0x21999
movsbl %al, %ebp
xorl %r14d, %r14d
movq %rbx, %rax
incq %rax
movq %rax, %rdi
movl %ebp, %esi
callq 0xd230
testq %rax, %rax
je 0x2197a
cmpb $0x5c, -0x1(%rax)
jne 0x21985
testq %rax, %rax
sete %r14b
jne 0x21962
jmp 0x21993
movq %rbx, %rdi
movq %rax, %rsi
callq 0x10101
movq %rax, %rcx
testb $0x1, %r14b
je 0x2199b
xorl %ecx, %ecx
movq %rcx, %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/justy989[P]ce/ce_syntax.c
// Function: utf8_strlen_until_trailing_whitespace
static int64_t utf8_strlen_until_trailing_whitespace(const char* str){
     const char* itr = str;
     while(*itr) itr++;
     itr--;
     while(itr > str && *itr && isblank((int)(*itr))) itr--;
     return ce_utf8_strlen_between(str, itr);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq -0x2(%rdi), %rax
cmpb $0x0, 0x2(%rax)
leaq 0x1(%rax), %rax
jne 0x22436
jmp 0x2245e
movsbq (%r14), %r15
testq %r15, %r15
je 0x22466
callq 0xd720
movq (%rax), %rcx
leaq -0x1(%r14), %rax
testb $0x1, (%rcx,%r15,2)
je 0x22466
movq %rax, %r14
cmpq %rbx, %rax
ja 0x22442
movq %rbx, %rdi
movq %r14, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0x10101
// File: /workspace/github_c_makefile_star2_O1/justy989[P]ce/ce_syntax.c
// Function: match_words
static int64_t match_words(const char* str, const char* beginning_of_line, const char** words, int64_t word_count){
     for(int64_t i = 0; i < word_count; ++i){
          int64_t word_len = strlen(words[i]);
          if(strncmp(words[i], str, word_len) == 0){
               // make sure word isn't in the middle of an identifier
               char post_char = str[word_len];
               if(is_c_type_char(post_char)) return 0;
               if(str > beginning_of_line){
                    char pre_char = *(str - 1);
                    if(is_c_type_char(pre_char)) return 0;
               }

               return word_len;
          }
     }

     return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
testq %rcx, %rcx
jle 0x22551
movq %rcx, %rbx
movq %rdi, 0x8(%rsp)
xorl %r15d, %r15d
movq %rcx, 0x10(%rsp)
movq 0x8(%rsp), %r12
movq 0x20(%rsp), %rax
movq (%rax,%r15,8), %rbp
movq %rbp, %rdi
callq 0xd210
movq %rax, %r13
movq %rbp, %rdi
movq %r12, %rsi
movq %rax, %rdx
callq 0xd0d0
movl %eax, %ebp
testl %eax, %eax
je 0x224e8
movq %r14, %rax
testl %ebp, %ebp
je 0x22553
incq %r15
movq %rax, %r14
cmpq %r15, %rbx
jne 0x224ac
jmp 0x22551
movsbq (%r12,%r13), %rbx
callq 0xd720
cmpq $0x5f, %rbx
je 0x22548
movq (%rax), %rcx
movzwl (%rcx,%rbx,2), %edx
movl $0x0, %eax
andl $0x8, %edx
movq 0x10(%rsp), %rbx
jne 0x224d7
movq 0x8(%rsp), %rax
cmpq 0x18(%rsp), %rax
jbe 0x22543
movq 0x8(%rsp), %rax
movsbq -0x1(%rax), %rax
cmpq $0x5f, %rax
sete %dl
movb (%rcx,%rax,2), %al
andb $0x8, %al
shrb $0x3, %al
orb %dl, %al
movl $0x0, %eax
cmovneq %rax, %r14
movq %r14, %rax
jne 0x224d7
movq %r13, %rax
jmp 0x224d7
xorl %eax, %eax
movq 0x10(%rsp), %rbx
jmp 0x224d7
xorl %eax, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O1/justy989[P]ce/ce_vim.c
// Function: ce_vim_add_key_bind
void ce_vim_add_key_bind(CeVimKeyBind_t* key_binds, int64_t* key_bind_count, CeRune_t key, CeVimParseFunc_t* function){
     assert(*key_bind_count < CE_VIM_MAX_KEY_BINDS);
     key_binds[*key_bind_count].key = key;
     key_binds[*key_bind_count].function = function;
     (*key_bind_count)++;
}

// Assembly:
movq (%rsi), %rax
cmpq $0x100, %rax            # imm = 0x100
jge 0x22586
movq %rax, %r8
shlq $0x4, %r8
movl %edx, (%rdi,%r8)
movq %rcx, 0x8(%rdi,%r8)
incq %rax
movq %rax, (%rsi)
retq
pushq %rax
leaq 0xec62(%rip), %rdi      # 0x311f0
leaq 0xec82(%rip), %rsi      # 0x31217
leaq 0xec84(%rip), %rcx      # 0x31220
movl $0x1e, %edx
callq 0xd280
// File: /workspace/github_c_makefile_star2_O1/justy989[P]ce/ce_vim.c
// Function: ce_vim_parse_motion_up
CeVimParseResult_t ce_vim_parse_motion_up(CeVimAction_t* action, const CeVim_t* vim, CeRune_t key){
     if(action->motion.function) return CE_VIM_PARSE_KEY_NOT_HANDLED;
     action->motion.function = ce_vim_motion_up;

     if(action->verb.function){
          action->yank_type = CE_VIM_YANK_TYPE_LINE;
          return CE_VIM_PARSE_COMPLETE;
     }

     action->verb.function = ce_vim_verb_motion;
     return CE_VIM_PARSE_COMPLETE;
}

// Assembly:
movl $0x1, %eax
cmpq $0x0, 0x10(%rdi)
je 0x23741
retq
leaq 0x402f(%rip), %rax      # 0x27777
movq %rax, 0x10(%rdi)
cmpq $0x0, 0x28(%rdi)
je 0x2375c
movl $0x2, 0x38(%rdi)
jmp 0x23767
leaq 0x24ce(%rip), %rax      # 0x25c31
movq %rax, 0x28(%rdi)
movl $0x5, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/justy989[P]ce/ce_vim.c
// Function: ce_vim_parse_motion_down
CeVimParseResult_t ce_vim_parse_motion_down(CeVimAction_t* action, const CeVim_t* vim, CeRune_t key){
     if(action->motion.function) return CE_VIM_PARSE_KEY_NOT_HANDLED;
     action->motion.function = ce_vim_motion_down;

     if(action->verb.function){
          action->yank_type = CE_VIM_YANK_TYPE_LINE;
          return CE_VIM_PARSE_COMPLETE;
     }

     action->verb.function = ce_vim_verb_motion;
     return CE_VIM_PARSE_COMPLETE;
}

// Assembly:
movl $0x1, %eax
cmpq $0x0, 0x10(%rdi)
je 0x2377a
retq
leaq 0x405f(%rip), %rax      # 0x277e0
movq %rax, 0x10(%rdi)
cmpq $0x0, 0x28(%rdi)
je 0x23795
movl $0x2, 0x38(%rdi)
jmp 0x237a0
leaq 0x2495(%rip), %rax      # 0x25c31
movq %rax, 0x28(%rdi)
movl $0x5, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/justy989[P]ce/ce_vim.c
// Function: ce_vim_parse_motion_find_forward
static CeVimParseResult_t vim_parse_motion_find(CeVimAction_t* action, CeRune_t key, CeVimMotionFunc_t* func){
     if(action->verb.function == NULL) action->verb.function = &ce_vim_verb_motion;

     if(action->motion.function == NULL){
          action->motion.function = func;
          return CE_VIM_PARSE_CONSUME_ADDITIONAL_KEY;
     }else if(action->motion.function == func){
          action->motion.integer = key;
          return CE_VIM_PARSE_COMPLETE;
     }

     return CE_VIM_PARSE_INVALID;
}

// Assembly:
cmpq $0x0, 0x28(%rdi)
jne 0x23850
leaq 0x23e5(%rip), %rax      # 0x25c31
movq %rax, 0x28(%rdi)
movq 0x10(%rdi), %rcx
testq %rcx, %rcx
je 0x23868
xorl %eax, %eax
leaq 0x4246(%rip), %rsi      # 0x27aa8
cmpq %rsi, %rcx
je 0x23879
retq
leaq 0x4239(%rip), %rax      # 0x27aa8
movq %rax, 0x10(%rdi)
movl $0x2, %eax
retq
movl %edx, 0x18(%rdi)
movl $0x5, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/justy989[P]ce/ce_vim.c
// Function: ce_vim_parse_motion_inside
CeVimParseResult_t ce_vim_parse_motion_inside(CeVimAction_t* action, const CeVim_t* vim, CeRune_t key){
     if(!action->verb.function){
          if(vim->mode == CE_VIM_MODE_VISUAL || vim->mode == CE_VIM_MODE_VISUAL_LINE){
               action->verb.function = ce_vim_verb_motion;
          }else{
               return CE_VIM_PARSE_KEY_NOT_HANDLED;
          }
     }

     if(action->motion.function == NULL){
          action->motion.function = &ce_vim_motion_inside;
          return CE_VIM_PARSE_CONSUME_ADDITIONAL_KEY;
     }else if(action->motion.function == &ce_vim_motion_inside){
          action->motion.integer = key;
          return CE_VIM_PARSE_COMPLETE;
     }

     return CE_VIM_PARSE_INVALID;
}

// Assembly:
cmpq $0x0, 0x28(%rdi)
jne 0x239d7
movl (%rsi), %ecx
andl $-0x2, %ecx
movl $0x1, %eax
cmpl $0x2, %ecx
jne 0x239ee
leaq 0x225e(%rip), %rax      # 0x25c31
movq %rax, 0x28(%rdi)
movq 0x10(%rdi), %rcx
testq %rcx, %rcx
je 0x239ef
xorl %eax, %eax
leaq 0x4092(%rip), %rsi      # 0x27a7b
cmpq %rsi, %rcx
je 0x23a00
retq
leaq 0x4085(%rip), %rax      # 0x27a7b
movq %rax, 0x10(%rdi)
movl $0x2, %eax
retq
movl %edx, 0x18(%rdi)
movl $0x5, %eax
retq