LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/justy989[P]ce/ce.c
// Function: ce_range_sort
bool ce_range_sort(CeRange_t* range){
     if(ce_point_after(range->start, range->end)){
          CePoint_t tmp = range->start;
          range->start = range->end;
          range->end = tmp;
          return true;
     }

     return false;
}

// Assembly:
movq 0x8(%rdi), %rcx
movq 0x18(%rdi), %rdx
movb $0x1, %al
cmpq %rcx, %rdx
jl 0x107ba
movq (%rdi), %rax
sete %cl
cmpq %rax, 0x10(%rdi)
setl %al
andb %cl, %al
testb %al, %al
je 0x107d8
leaq 0x10(%rdi), %rcx
movups (%rdi), %xmm0
movaps %xmm0, -0x18(%rsp)
movups (%rcx), %xmm0
movups %xmm0, (%rdi)
movaps -0x18(%rsp), %xmm0
movups %xmm0, (%rcx)
retq
// File: /workspace/github_c_makefile_star2_O1/justy989[P]ce/ce.c
// Function: ce_count_digits
int64_t ce_count_digits(int64_t n){
     if(n < 0) n = -n;
     if(n == 0) return 1;

     int count = 0;
     while(n > 0){
          n /= 10;
          count++;
     }

     return count;
}

// Assembly:
testq %rdi, %rdi
je 0x1080c
movq %rdi, %rsi
negq %rsi
cmovsq %rdi, %rsi
xorl %ecx, %ecx
movabsq $-0x3333333333333333, %rdi # imm = 0xCCCCCCCCCCCCCCCD
movq %rsi, %rax
mulq %rdi
shrq $0x3, %rdx
incq %rcx
cmpq $0x9, %rsi
movq %rdx, %rsi
ja 0x107f4
jmp 0x10811
movl $0x1, %ecx
movq %rcx, %rax
retq
// File: /workspace/github_c_makefile_star2_O1/justy989[P]ce/ce.c
// Function: ce_line_number_column_width
int64_t ce_line_number_column_width(CeLineNumber_t line_number, int64_t buffer_line_count, int64_t view_top, int64_t view_bottom){
     if(buffer_line_count == 0) return 0;

     int64_t column_width = 0;

     if(line_number == CE_LINE_NUMBER_ABSOLUTE || line_number == CE_LINE_NUMBER_ABSOLUTE_AND_RELATIVE){
          column_width += ce_count_digits(buffer_line_count) + 1;
     }else if(line_number == CE_LINE_NUMBER_RELATIVE){
          int64_t view_height = (view_bottom - view_top) + 1;
          if(view_height > buffer_line_count){
               column_width += ce_count_digits(buffer_line_count - 1) + 1;
          }else{
               column_width += ce_count_digits(view_height - 1) + 1;
          }
     }

     return column_width;
}

// Assembly:
testq %rsi, %rsi
je 0x108a3
movl %edi, %eax
andl $-0x3, %eax
cmpl $0x1, %eax
jne 0x1085c
movq %rsi, %rdi
negq %rdi
cmovsq %rsi, %rdi
movl $0x1, %ecx
movabsq $-0x3333333333333333, %rsi # imm = 0xCCCCCCCCCCCCCCCD
movq %rdi, %rax
mulq %rsi
shrq $0x3, %rdx
incq %rcx
cmpq $0xa, %rdi
movq %rdx, %rdi
jae 0x10841
jmp 0x108e3
cmpl $0x2, %edi
jne 0x108a3
movq %rcx, %rax
subq %rdx, %rax
cmpq %rsi, %rax
jge 0x108a7
movl $0x1, %esi
cmpq %rdx, %rcx
je 0x108de
movq %rax, %rcx
negq %rcx
cmovsq %rax, %rcx
xorl %esi, %esi
movabsq $-0x3333333333333333, %rdi # imm = 0xCCCCCCCCCCCCCCCD
movq %rcx, %rax
mulq %rdi
shrq $0x3, %rdx
incl %esi
cmpq $0x9, %rcx
movq %rdx, %rcx
ja 0x1088c
jmp 0x108de
xorl %ecx, %ecx
jmp 0x108e3
decq %rsi
je 0x108d9
movq %rsi, %rcx
negq %rcx
cmovsq %rsi, %rcx
xorl %esi, %esi
movabsq $-0x3333333333333333, %rdi # imm = 0xCCCCCCCCCCCCCCCD
movq %rcx, %rax
mulq %rdi
shrq $0x3, %rdx
incl %esi
cmpq $0xa, %rcx
movq %rdx, %rcx
jae 0x108c2
jmp 0x108de
movl $0x1, %esi
movl %esi, %ecx
incq %rcx
movq %rcx, %rax
retq
// File: /workspace/github_c_makefile_star2_O1/justy989[P]ce/ce.c
// Function: ce_list_dir
CeListDirResult_t ce_list_dir(const char* directory) {
     CeListDirResult_t result;
     memset(&result, 0, sizeof(result));

#if defined(PLATFORM_WINDOWS)
     WIN32_FIND_DATA find_files_result;
     memset(&find_files_result, 0, sizeof(find_files_result));

     HANDLE find_files_handle = FindFirstFileA(directory,
                                               &find_files_result);
     if (find_files_handle == INVALID_HANDLE_VALUE) {
          return result;
     }

     do{
         insert_list_dir_result_filename(&result,
                                         find_files_result.cFileName,
                                         find_files_result.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY);
     }while(FindNextFileA(find_files_handle, &find_files_result));

     FindClose(find_files_handle);
#else
     DIR* os_dir = opendir(directory);
     if(!os_dir){
          return result;
     }

     struct dirent* node = NULL;
     while((node = readdir(os_dir)) != NULL){
          insert_list_dir_result_filename(&result,
                                          node->d_name,
                                          node->d_type == DT_DIR);
     }

     closedir(os_dir);
#endif

     return result;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %r15
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
movq %rsi, %rdi
callq 0xd200
testq %rax, %rax
je 0x109e5
movq %rax, %r12
movq (%r15), %r14
movq %rax, %rdi
callq 0xd470
testq %rax, %rax
je 0x109da
movq %rax, %rbx
movq 0x8(%r15), %rbp
movq %r15, 0x10(%rsp)
movq 0x10(%r15), %r13
movq %r12, 0x8(%rsp)
leaq 0x8(,%r14,8), %r12
movq %r14, %r15
movb 0x12(%rbx), %al
movb %al, 0x7(%rsp)
addq $0x13, %rbx
incq %r14
movq %rbp, %rdi
movq %r12, %rsi
callq 0xd520
movq %rax, %rbp
movq %rbx, %rdi
callq 0xd640
movq %rax, (%rbp,%r15,8)
movq %r13, %rdi
movq %r14, %rsi
callq 0xd520
movq %rax, %r13
cmpb $0x4, 0x7(%rsp)
sete (%rax,%r15)
movq 0x8(%rsp), %rdi
callq 0xd470
movq %rax, %rbx
addq $0x8, %r12
testq %rax, %rax
jne 0x1096e
movq 0x10(%rsp), %r15
movq %rbp, 0x8(%r15)
movq %r13, 0x10(%r15)
movq 0x8(%rsp), %r12
movq %r14, (%r15)
movq %r12, %rdi
callq 0xd300
movq %r15, %rax
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.c
// Function: ce_free_list_dir_result
void ce_free_list_dir_result(CeListDirResult_t* list_dir_result) {
     for(int64_t i = 0; i < list_dir_result->count; i++){
          free(list_dir_result->filenames[i]);
     }
     free(list_dir_result->filenames);
     free(list_dir_result->is_directories);
     memset(list_dir_result, 0, sizeof(*list_dir_result));
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpq $0x0, (%rdi)
jle 0x10a1c
xorl %r14d, %r14d
movq 0x8(%rbx), %rax
movq (%rax,%r14,8), %rdi
callq 0xd090
incq %r14
cmpq (%rbx), %r14
jl 0x10a07
movq 0x8(%rbx), %rdi
callq 0xd090
movq 0x10(%rbx), %rdi
callq 0xd090
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
movq $0x0, 0x10(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/justy989[P]ce/ce_app.c
// Function: ce_buffer_node_insert
bool ce_buffer_node_insert(CeBufferNode_t** head, CeBuffer_t* buffer){
     CeBufferNode_t* node = malloc(sizeof(*node));
     if(!node) return false;
     node->buffer = buffer;
     node->next = *head;
     *head = node;
     return true;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movl $0x10, %edi
callq 0xd4c0
testq %rax, %rax
je 0x10a6a
movq %r14, (%rax)
movq (%rbx), %rcx
movq %rcx, 0x8(%rax)
movq %rax, (%rbx)
testq %rax, %rax
setne %al
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/justy989[P]ce/ce_app.c
// Function: ce_buffer_node_unlink
CeBufferNode_t* ce_buffer_node_unlink(CeBufferNode_t** head, CeBuffer_t* buffer){
     CeBufferNode_t* prev = NULL;
     CeBufferNode_t* itr = *head;
     while(itr){
          if(itr->buffer == buffer) break;
          prev = itr;
          itr = itr->next;
     }

     if(!itr) return NULL;

     if(prev){
          prev->next = itr->next;
     }else{
          *head = (*head)->next;
     }

     return itr;
}

// Assembly:
movq (%rdi), %rax
testq %rax, %rax
je 0x10a98
cmpq %rsi, (%rax)
je 0x10a9b
movq %rax, %rcx
movq 0x8(%rax), %rax
testq %rax, %rax
je 0x10a98
cmpq %rsi, (%rax)
jne 0x10a85
jmp 0x10a9d
xorl %eax, %eax
retq
xorl %ecx, %ecx
testq %rcx, %rcx
je 0x10aab
movq 0x8(%rax), %rdx
movq %rdx, 0x8(%rcx)
retq
movq (%rdi), %rcx
movq 0x8(%rcx), %rcx
movq %rcx, (%rdi)
retq
// File: /workspace/github_c_makefile_star2_O1/justy989[P]ce/ce_app.c
// Function: free_buffer_node
static void free_buffer_node(CeBufferNode_t* node){
     CeAppBufferData_t* buffer_data = node->buffer->app_data;
     if(buffer_data) free(buffer_data->base_directory);
     free(node->buffer->app_data);
     ce_buffer_free(node->buffer);
     free(node->buffer);
     free(node);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rax
movq 0x58(%rax), %rax
testq %rax, %rax
je 0x10b21
movq 0x608(%rax), %rdi
callq 0xd090
movq (%rbx), %rax
movq 0x58(%rax), %rdi
callq 0xd090
movq (%rbx), %rdi
callq 0xdea7
movq (%rbx), %rdi
callq 0xd090
movq %rbx, %rdi
popq %rbx
jmp 0xd090
// File: /workspace/github_c_makefile_star2_O1/justy989[P]ce/ce_app.c
// Function: ce_buffer_node_free
void ce_buffer_node_free(CeBufferNode_t** head){
     CeBufferNode_t* itr = *head;
     while(itr){
          CeBufferNode_t* tmp = itr;
          itr = itr->next;
          free_buffer_node(tmp);
     }
     *head = NULL;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %rdi
testq %rdi, %rdi
je 0x10b66
movq 0x8(%rdi), %r14
callq 0x10b05
movq %r14, %rdi
testq %r14, %r14
jne 0x10b55
movq $0x0, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/justy989[P]ce/ce_app.c
// Function: ce_string_node_insert
CeStringNode_t* ce_string_node_insert(CeStringNode_t** head, const char* string){
     CeStringNode_t* tail = *head;
     CeStringNode_t* node;
     if(tail){
          while(tail->next) tail = tail->next;

          // NOTE: we probably don't want this if we want the linked list to be general
          // skip the insertion if the string matches the previous string
          if(strcmp(string, tail->string) == 0) return NULL;

          node = calloc(1, sizeof(*node));
          if(!node) return node;
          node->string = strdup(string);

          tail->next = node;
          node->prev = tail;
     }else{
          node = calloc(1, sizeof(*node));
          if(!node) return node;
          node->string = strdup(string);

          *head = node;
     }

     return node;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq (%rdi), %rax
testq %rax, %rax
je 0x10bcc
movq %rax, %r15
movq 0x8(%rax), %rax
testq %rax, %rax
jne 0x10b85
movq (%r15), %rsi
movq %rbx, %rdi
callq 0xd390
testl %eax, %eax
je 0x10bf6
movl $0x1, %edi
movl $0x18, %esi
callq 0xd380
testq %rax, %rax
je 0x10bf6
movq %rax, %r14
movq %rbx, %rdi
callq 0xd640
movq %rax, (%r14)
movq %r14, 0x8(%r15)
movq %r15, 0x10(%r14)
jmp 0x10bf9
movq %rdi, %r15
movl $0x1, %edi
movl $0x18, %esi
callq 0xd380
testq %rax, %rax
je 0x10bf6
movq %rax, %r14
movq %rbx, %rdi
callq 0xd640
movq %rax, (%r14)
movq %r14, (%r15)
jmp 0x10bf9
xorl %r14d, %r14d
movq %r14, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/justy989[P]ce/ce_app.c
// Function: ce_string_node_free
void ce_string_node_free(CeStringNode_t** head){
     CeStringNode_t* itr = *head;
     while(itr){
          CeStringNode_t* tmp = itr;
          itr = itr->next;
          free(tmp->string);
          free(tmp);
     }

     *head = NULL;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %r14
testq %r14, %r14
je 0x10c2e
movq (%r14), %rdi
movq 0x8(%r14), %r15
callq 0xd090
movq %r14, %rdi
callq 0xd090
movq %r15, %r14
testq %r15, %r15
jne 0x10c12
movq $0x0, (%rbx)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/justy989[P]ce/ce_app.c
// Function: ce_history_insert
bool ce_history_insert(CeHistory_t* history, const char* string){
     CeStringNode_t* new_node = ce_string_node_insert(&history->head, string);
     if(!new_node) return false;
     ce_history_reset_current(history);
     return true;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
callq 0x10b75
testq %rax, %rax
je 0x10c51
movq $0x0, 0x8(%rbx)
testq %rax, %rax
setne %al
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/justy989[P]ce/ce_app.c
// Function: ce_history_previous
char* ce_history_previous(CeHistory_t* history){
     if(history->current){
          if(history->current->prev){
               history->current = history->current->prev;
          }

          return history->current->string;
     }else{
          history->current = history->head;
          if(history->current){
               while(history->current->next) history->current = history->current->next;
               return history->current->string;
          }
     }

     return NULL;
}

// Assembly:
movq 0x8(%rdi), %rax
testq %rax, %rax
je 0x10c80
movq 0x10(%rax), %rax
testq %rax, %rax
je 0x10c78
movq %rax, 0x8(%rdi)
movq 0x8(%rdi), %rax
movq (%rax), %rax
retq
movq (%rdi), %rax
movq %rax, 0x8(%rdi)
testq %rax, %rax
je 0x10cab
movq 0x8(%rdi), %rax
movq 0x8(%rax), %rcx
testq %rcx, %rcx
je 0x10c7c
movq %rcx, %rax
movq 0x8(%rcx), %rcx
testq %rcx, %rcx
jne 0x10c99
movq %rax, 0x8(%rdi)
jmp 0x10c7c
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/justy989[P]ce/ce_app.c
// Function: ce_convert_bind_defs
void ce_convert_bind_defs(CeKeyBinds_t* binds, CeKeyBindDef_t* bind_defs, int64_t bind_def_count){
     if(binds->count){
          for(int64_t i = 0; i < binds->count; ++i){
               free(binds->binds[i].keys);
          }
          free(binds->binds);
     }

     binds->count = bind_def_count;
     binds->binds = malloc(binds->count * sizeof(*binds->binds));

     for(int64_t i = 0; i < binds->count; ++i){
          ce_command_parse(&binds->binds[i].command, bind_defs[i].command);
          binds->binds[i].key_count = 0;

          for(int k = 0; k < 4; ++k){
               if(bind_defs[i].keys[k] == 0) break;
               binds->binds[i].key_count++;
          }

          if(!binds->binds[i].key_count) continue;

          binds->binds[i].keys = malloc(binds->binds[i].key_count * sizeof(binds->binds[i].keys[0]));

          for(int k = 0; k < binds->binds[i].key_count; ++k){
               binds->binds[i].keys[k] = bind_defs[i].keys[k];
          }
     }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r15
movq %rsi, (%rsp)
movq %rdi, %r14
cmpq $0x0, 0x8(%rdi)
je 0x10d1c
cmpq $0x0, 0x8(%r14)
jle 0x10d14
xorl %ebx, %ebx
xorl %r12d, %r12d
movq (%r14), %rax
movq (%rax,%rbx), %rdi
callq 0xd090
incq %r12
addq $0x228, %rbx            # imm = 0x228
cmpq 0x8(%r14), %r12
jl 0x10cf8
movq (%r14), %rdi
callq 0xd090
movq %r15, 0x8(%r14)
imulq $0x228, %r15, %rdi      # imm = 0x228
callq 0xd4c0
movq %rax, (%r14)
testq %r15, %r15
jle 0x10dcd
xorl %r12d, %r12d
movq (%rsp), %r13
leaq (%r12,%r12,2), %rax
movq (%rsp), %rcx
leaq (%rcx,%rax,8), %r15
movq (%r14), %rax
imulq $0x228, %r12, %rbp      # imm = 0x228
leaq (%rax,%rbp), %rdi
addq $0x10, %rdi
movq 0x10(%r15), %rsi
callq 0x1644c
movq (%r14), %rbx
leaq (%rbx,%rbp), %rax
addq $0x8, %rax
movq $0x0, (%rax)
xorl %ecx, %ecx
cmpl $0x0, (%r13,%rcx,4)
je 0x10d8e
incq (%rax)
incq %rcx
cmpq $0x4, %rcx
jne 0x10d7a
movq (%rax), %rdi
testq %rdi, %rdi
je 0x10dbc
shlq $0x2, %rdi
callq 0xd4c0
movq %rax, (%rbx,%rbp)
movq 0x8(%rbx,%rbp), %rdx
testq %rdx, %rdx
jle 0x10dbc
shlq $0x2, %rdx
movq %rax, %rdi
movq %r15, %rsi
callq 0xd420
incq %r12
addq $0x18, %r13
cmpq 0x8(%r14), %r12
jl 0x10d3f
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_app.c
// Function: ce_set_vim_key_bind
void ce_set_vim_key_bind(CeVimKeyBind_t* key_binds, int64_t* key_bind_count, CeRune_t key, CeVimParseFunc_t* parse_func){
     for(int64_t i = 0; i < *key_bind_count; ++i){
          CeVimKeyBind_t* key_bind = key_binds + i;
          if(key_bind->key == key){
               key_bind->function = parse_func;
               return;
          }
     }

     // we didn't find the key to override it, so we add the binding
     ce_vim_add_key_bind(key_binds, key_bind_count, key, parse_func);
}

// Assembly:
movq (%rsi), %rax
testq %rax, %rax
setg %r8b
jle 0x22564
movq %rdi, %r10
cmpl %edx, (%rdi)
je 0x10e42
leaq -0x1(%rax), %r9
xorl %r8d, %r8d
movq %rdi, %r11
cmpq %r8, %r9
je 0x22564
leaq 0x10(%r11), %r10
incq %r8
cmpl %edx, 0x10(%r11)
movq %r10, %r11
jne 0x10e22
cmpq %rax, %r8
setl %r8b
movq %rcx, 0x8(%r10)
testb %r8b, %r8b
je 0x22564
retq
// File: /workspace/github_c_makefile_star2_O1/justy989[P]ce/ce_app.c
// Function: ce_extend_commands
void ce_extend_commands(CeCommandEntry_t** command_entries, int64_t* command_entry_count, CeCommandEntry_t* new_command_entries,
                        int64_t new_command_entry_count){
     int64_t final_command_entry_count = *command_entry_count + new_command_entry_count;
     *command_entries = realloc(*command_entries, final_command_entry_count * sizeof(**command_entries));
     for(int64_t i = 0; i < new_command_entry_count; i++){
          (*command_entries)[i + *command_entry_count] = new_command_entries[i];
     }
     *command_entry_count = final_command_entry_count;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rcx, %rbx
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %r12
movq (%rsi), %r13
addq %rcx, %r13
movq (%rdi), %rdi
leaq (,%r13,8), %rax
leaq (%rax,%rax,2), %rsi
callq 0xd520
movq %rax, (%r12)
testq %rbx, %rbx
jle 0x10eb5
xorl %eax, %eax
movq (%r14), %rcx
leaq (%rcx,%rcx,2), %rcx
shlq $0x3, %rcx
addq (%r12), %rcx
movq 0x10(%r15,%rax), %rdx
movq %rdx, 0x10(%rax,%rcx)
movups (%r15,%rax), %xmm0
movups %xmm0, (%rax,%rcx)
addq $0x18, %rax
decq %rbx
jne 0x10e8a
movq %r13, (%r14)
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/justy989[P]ce/ce_app.c
// Function: ce_jump_list_insert
void ce_jump_list_insert(CeJumpList_t* jump_list, CeDestination_t destination){
     if(jump_list->count < JUMP_LIST_DESTINATION_COUNT){
          if(jump_list->count > 0){
               jump_list->itr++;
               jump_list->current = jump_list->itr;
          }
          jump_list->destinations[jump_list->itr] = destination;
          jump_list->count++;
          return;
     }

     // shift all destinations down
     for(int i = 1; i <= jump_list->itr; i++){
          jump_list->destinations[i - 1] = jump_list->destinations[i];
     }

     jump_list->destinations[jump_list->itr] = destination;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x30(%rsp), %r14
movq 0x4100(%rdi), %rax
cmpq $0x10, %rax
jge 0x111f5
testq %rax, %rax
jle 0x111d1
movq 0x4108(%rbx), %rax
incq %rax
movq %rax, 0x4108(%rbx)
movq %rax, 0x4110(%rbx)
imulq $0x410, 0x4108(%rbx), %rdi # imm = 0x410
addq %rbx, %rdi
movl $0x410, %edx            # imm = 0x410
movq %r14, %rsi
callq 0xd420
incq 0x4100(%rbx)
jmp 0x11247
movq 0x4108(%rbx), %rax
testq %rax, %rax
jle 0x1122d
xorl %r12d, %r12d
movq %rbx, %rdi
leaq 0x410(%rdi), %r15
movl $0x410, %edx            # imm = 0x410
movq %r15, %rsi
callq 0xd420
movq 0x4108(%rbx), %rax
incq %r12
movq %r15, %rdi
cmpq %r12, %rax
jg 0x11207
imulq $0x410, %rax, %rax      # imm = 0x410
addq %rax, %rbx
movl $0x410, %edx            # imm = 0x410
movq %rbx, %rdi
movq %r14, %rsi
callq 0xd420
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/justy989[P]ce/ce_app.c
// Function: ce_jump_list_previous
CeDestination_t* ce_jump_list_previous(CeJumpList_t* jump_list){
     if(jump_list->count == 0) return NULL;
     if(jump_list->itr >= (jump_list->count - 1)) return 0;
     jump_list->itr++;
     jump_list->current = jump_list->itr;
     return jump_list->destinations + jump_list->itr;
}

// Assembly:
movq 0x4100(%rdi), %rcx
testq %rcx, %rcx
je 0x1128a
movq 0x4108(%rdi), %rax
decq %rcx
cmpq %rcx, %rax
jge 0x1128a
incq %rax
movq %rax, 0x4108(%rdi)
movq %rax, 0x4110(%rdi)
imulq $0x410, %rax, %rax      # imm = 0x410
addq %rdi, %rax
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/justy989[P]ce/ce_app.c
// Function: ce_jump_list_next
CeDestination_t* ce_jump_list_next(CeJumpList_t* jump_list){
     if(jump_list->count == 0) return NULL;
     if(jump_list->itr < 0) return NULL;
     jump_list->current = jump_list->itr;
     jump_list->itr--;
     return jump_list->destinations + jump_list->current;
}

// Assembly:
cmpq $0x0, 0x4100(%rdi)
je 0x112c0
movq 0x4108(%rdi), %rax
testq %rax, %rax
js 0x112c0
movq %rax, 0x4110(%rdi)
leaq -0x1(%rax), %rcx
movq %rcx, 0x4108(%rdi)
imulq $0x410, %rax, %rax      # imm = 0x410
addq %rdi, %rax
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/justy989[P]ce/ce_app.c
// Function: ce_destination_in_view
bool ce_destination_in_view(CeDestination_t* destination, CeView_t* view){
     if(!view) return false;

     int64_t view_width = ce_view_width(view);
     int64_t view_height = ce_view_height(view);
     CeRect_t view_rect = {view->scroll.x, view->scroll.x + view_width, view->scroll.y, view->scroll.y + view_height};

     return strcmp(destination->filepath, view->buffer->name) == 0 &&
            ce_point_in_rect(destination->point, view_rect);
}

// Assembly:
testq %rsi, %rsi
je 0x1162a
pushq %r15
pushq %r14
pushq %rbx
subq $0x40, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x100f0
movq %rax, %r15
movq %r14, %rdi
callq 0x100f8
movq 0x20(%r14), %rcx
movq %rcx, 0x20(%rsp)
addq %rcx, %r15
movq %r15, 0x28(%rsp)
movq 0x28(%r14), %rcx
movq %rcx, 0x30(%rsp)
addq %rcx, %rax
movq %rax, 0x38(%rsp)
leaq 0x10(%rbx), %rdi
movq 0x40(%r14), %rax
movq 0x10(%rax), %rsi
callq 0xd390
testl %eax, %eax
je 0x1162d
xorl %eax, %eax
jmp 0x1164c
xorl %eax, %eax
retq
movq (%rbx), %rdi
movq 0x8(%rbx), %rsi
movups 0x20(%rsp), %xmm0
movups 0x30(%rsp), %xmm1
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
callq 0x102c3
addq $0x40, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/justy989[P]ce/ce_app.c
// Function: ce_app_update_terminal_view
void ce_app_update_terminal_view(CeApp_t* app, int width, int height) {
     app->terminal_width = width;
     app->terminal_height = height;
     app->terminal_rect = (CeRect_t){0, app->terminal_width - 1, 0, app->terminal_height - 1};
     ce_layout_distribute_rect(app->tab_list_layout, app->terminal_rect);
}

// Assembly:
subq $0x28, %rsp
movl %esi, 0x2700(%rdi)
movl %edx, 0x2704(%rdi)
decl %esi
movslq %esi, %rax
decl %edx
movslq %edx, %rcx
xorl %edx, %edx
movq %rdx, (%rdi)
movq %rax, 0x8(%rdi)
movq %rdx, 0x10(%rdi)
movq %rcx, 0x18(%rdi)
movq 0x2818(%rdi), %rax
movups (%rdi), %xmm0
movups 0x10(%rdi), %xmm1
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
movq %rax, %rdi
callq 0x1e0a5
addq $0x28, %rsp
retq
// File: /workspace/github_c_makefile_star2_O1/justy989[P]ce/ce_app.c
// Function: ce_app_switch_to_prev_buffer_in_view
bool ce_app_switch_to_prev_buffer_in_view(CeApp_t* app, CeView_t* view, bool switch_if_deleted){
     CeAppViewData_t* view_data = view->user_data;
     if(!view_data->prev_buffer) return false;

     bool deleted = true;
     CeBufferNode_t* itr = app->buffer_node_head;
     while(itr){
          if(itr->buffer == view_data->prev_buffer){
               deleted = false;
               break;
          }
          itr = itr->next;
     }

     if(deleted){
          if(switch_if_deleted){
               view_data->prev_buffer = app->buffer_node_head->buffer;
          }else{
               view_data->prev_buffer = NULL;
               return false;
          }
     }

     ce_view_switch_buffer(view, view_data->prev_buffer, &app->vim, &app->config_options, true);
     return true;
}

// Assembly:
pushq %rax
movq %rdi, %rcx
movq 0x48(%rsi), %rax
movq 0x4118(%rax), %rdi
testq %rdi, %rdi
je 0x1175a
movq 0x2828(%rcx), %r8
testq %r8, %r8
je 0x11713
cmpq %rdi, (%r8)
je 0x11728
movq 0x8(%r8), %r8
jmp 0x11703
testb %dl, %dl
je 0x1174f
movq 0x2828(%rcx), %rdx
movq (%rdx), %rdx
movq %rdx, 0x4118(%rax)
movq 0x4118(%rax), %rax
leaq 0x20(%rcx), %rdx
addq $0x1a50, %rcx           # imm = 0x1A50
movq %rsi, %rdi
movq %rax, %rsi
movl $0x1, %r8d
callq 0x112df
movb $0x1, %al
jmp 0x1175c
movq $0x0, 0x4118(%rax)
xorl %eax, %eax
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O1/justy989[P]ce/ce_app.c
// Function: input_view_overlay
void input_view_overlay(CeView_t* input_view, CeView_t* view){
     input_view->rect.left = view->rect.left;
     input_view->rect.right = view->rect.right;
     input_view->rect.bottom = view->rect.bottom;
     int64_t max_height = (view->rect.bottom - view->rect.top) - 1;
     int64_t height = input_view->buffer->line_count;
     if(height <= 0) height = 1;
     if(height > max_height) height = max_height;
     input_view->rect.top = view->rect.bottom - height;
}

// Assembly:
movq (%rsi), %rax
movq %rax, (%rdi)
movq 0x8(%rsi), %rax
movq %rax, 0x8(%rdi)
movq 0x18(%rsi), %rax
movq %rax, 0x18(%rdi)
movq 0x10(%rsi), %rax
movq 0x18(%rsi), %rcx
notq %rax
addq %rcx, %rax
movq 0x40(%rdi), %rdx
movq 0x8(%rdx), %rdx
cmpq $0x2, %rdx
movl $0x1, %esi
cmovgeq %rdx, %rsi
cmpq %rax, %rsi
cmovgeq %rax, %rsi
subq %rsi, %rcx
movq %rcx, 0x10(%rdi)
retq
// File: /workspace/github_c_makefile_star2_O1/justy989[P]ce/ce_app.c
// Function: view_cursor_on_screen
CePoint_t view_cursor_on_screen(CeView_t* view, int64_t tab_width, CeLineNumber_t line_number){
     // move the visual cursor to the right location
     int64_t visible_cursor_x = 0;
     if(ce_buffer_point_is_valid(view->buffer, view->cursor)){
          visible_cursor_x = ce_util_string_index_to_visible_index(view->buffer->lines[view->cursor.y],
                                                                   view->cursor.x, tab_width);
     }

     int64_t line_number_width = 0;
     if(!view->buffer->no_line_numbers){
          line_number_width = ce_line_number_column_width(line_number, view->buffer->line_count, view->rect.top, view->rect.bottom);
     }

     return (CePoint_t){visible_cursor_x - view->scroll.x + view->rect.left + line_number_width,
                        view->cursor.y - view->scroll.y + view->rect.top};
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
movq 0x40(%rdi), %rdi
movq 0x30(%rbx), %rsi
movq 0x38(%rbx), %rdx
callq 0xe514
testq %rax, %rax
je 0x117e8
movq 0x40(%rbx), %rax
movq (%rax), %rax
movq 0x30(%rbx), %rsi
movq 0x38(%rbx), %rcx
movq (%rax,%rcx,8), %rdi
movq %r14, %rdx
callq 0xef1b
movq %rax, %r14
jmp 0x117eb
xorl %r14d, %r14d
movq 0x40(%rbx), %rax
cmpb $0x0, 0x50(%rax)
je 0x117f9
xorl %eax, %eax
jmp 0x1180c
movq 0x8(%rax), %rsi
movq 0x10(%rbx), %rdx
movq 0x18(%rbx), %rcx
movl %ebp, %edi
callq 0x10815
addq %r14, %rax
subq 0x20(%rbx), %rax
addq (%rbx), %rax
movq 0x38(%rbx), %rdx
subq 0x28(%rbx), %rdx
addq 0x10(%rbx), %rdx
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/justy989[P]ce/ce_app.c
// Function: find_already_loaded_file
CeBuffer_t* find_already_loaded_file(CeBufferNode_t* buffer_node_head, const char* filename){
     CeBufferNode_t* itr = buffer_node_head;
     while(itr){
          if(strcmp(itr->buffer->name, filename) == 0){
               return itr->buffer;
          }
          if(strstr(filename, itr->buffer->name) != NULL){
#if defined(PLATFORM_WINDOWS)
               char* buffer_full_path = _fullpath(NULL, itr->buffer->name, MAX_PATH_LEN);
#else
               char* buffer_full_path = realpath(itr->buffer->name, NULL);
#endif
               if(strcmp(buffer_full_path, filename) == 0){
                    free(buffer_full_path);
                    return itr->buffer;
               }
               free(buffer_full_path);
          }
          itr = itr->next;
     }
     return NULL;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x1189d
movq %rsi, %rbx
movq %rdi, %r14
movq (%r14), %r12
movq 0x10(%r12), %r15
movq %r15, %rdi
movq %rbx, %rsi
callq 0xd390
testl %eax, %eax
je 0x118a0
movq %rbx, %rdi
movq %r15, %rsi
callq 0xd6f0
testq %rax, %rax
je 0x11894
movq %r15, %rdi
xorl %esi, %esi
callq 0xd410
movq %rax, %r15
movq %rax, %rdi
movq %rbx, %rsi
callq 0xd390
movl %eax, %ebp
movq %r15, %rdi
callq 0xd090
testl %ebp, %ebp
jne 0x1188d
movq (%r14), %r13
movq %r13, %r12
testl %ebp, %ebp
je 0x118a0
movq 0x8(%r14), %r14
testq %r14, %r14
jne 0x1183d
xorl %r12d, %r12d
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_app.c
// Function: new_buffer
CeBuffer_t* new_buffer(){
     CeBuffer_t* buffer = calloc(1, sizeof(*buffer));
     if(!buffer) return buffer;
     buffer->app_data = calloc(1, sizeof(CeAppBufferData_t));
     return buffer;
}

// Assembly:
pushq %rbx
movl $0x1, %edi
movl $0x70, %esi
callq 0xd380
movq %rax, %rbx
testq %rax, %rax
je 0x11bd5
movl $0x1, %edi
movl $0x628, %esi            # imm = 0x628
callq 0xd380
movq %rax, 0x58(%rbx)
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/justy989[P]ce/ce_app.c
// Function: string_ends_with
static bool string_ends_with(const char* str, const char* pattern){
     int64_t str_len = strlen(str);
     int64_t pattern_len = strlen(pattern);
     if(str_len < pattern_len) return false;

     return strncmp(str + (str_len - pattern_len), pattern, pattern_len) == 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
callq 0xd210
movq %rax, %r15
movq %rbx, %rdi
callq 0xd210
subq %rax, %r15
jge 0x11bfe
xorl %eax, %eax
jmp 0x11c14
addq %r15, %r14
movq %r14, %rdi
movq %rbx, %rsi
movq %rax, %rdx
callq 0xd0d0
testl %eax, %eax
sete %al
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/justy989[P]ce/ce_app.c
// Function: directory_from_filename
char* directory_from_filename(const char* filename){
     const char* last_slash = strrchr(filename, CE_PATH_SEPARATOR);
     char* directory = NULL;
     if(last_slash) directory = ce_strndup((char*)(filename), last_slash - filename);
     return directory;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl $0x2f, %esi
callq 0xd270
testq %rax, %rax
je 0x11c3c
subq %rbx, %rax
movq %rbx, %rdi
movq %rax, %rsi
popq %rbx
jmp 0xf9db
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/justy989[P]ce/ce_app.c
// Function: build_complete_list
void build_complete_list(CeBuffer_t* buffer, CeComplete_t* complete){
     ce_buffer_empty(buffer);
     buffer->syntax_data = complete;
     char line[256];
     int64_t cursor = 0;
     int max_string_len = 0;
     for(int64_t i = 0; i < complete->count; i++){
          if(complete->elements[i].match){
               int len = strlen(complete->elements[i].string);
               if(len > max_string_len) max_string_len = len;
          }
     }
     for(int64_t i = 0; i < complete->count; i++){
          if(complete->elements[i].match){
               if(i == complete->current) cursor = buffer->line_count;
               if(complete->elements[i].description){
                    snprintf(line, 256, "%-*s : %s", max_string_len, complete->elements[i].string, complete->elements[i].description);
               }else{
                    snprintf(line, 256, "%s", complete->elements[i].string);
               }
               buffer_append_on_new_line(buffer, line);
          }
     }

     // TODO: figure out why we have to account for this case
     if(buffer->line_count == 1 && cursor == 1) cursor = 0;

     buffer->cursor_save = (CePoint_t){0, cursor};
     buffer->status = CE_BUFFER_STATUS_READONLY;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x118, %rsp            # imm = 0x118
movq %rsi, %r14
movq %rdi, %rbx
callq 0xe3d9
movq %r14, 0x60(%rbx)
movq 0x8(%r14), %r15
testq %r15, %r15
jle 0x11e8f
movq (%r14), %r12
addq $0x10, %r12
xorl %ebp, %ebp
cmpb $0x1, (%r12)
jne 0x11e84
movq -0x10(%r12), %rdi
callq 0xd210
cmpl %eax, %ebp
cmovgl %ebp, %eax
movl %eax, %ebp
addq $0x18, %r12
decq %r15
jne 0x11e6c
jmp 0x11e91
xorl %ebp, %ebp
cmpq $0x0, 0x8(%r14)
jle 0x11f20
movl $0x10, %r13d
leaq 0x10(%rsp), %r12
movq $0x0, 0x8(%rsp)
xorl %r15d, %r15d
movq (%r14), %rax
cmpb $0x1, (%rax,%r13)
jne 0x11f11
cmpq 0x18(%r14), %r15
jne 0x11ecc
movq 0x8(%rbx), %rcx
movq %rcx, 0x8(%rsp)
movq -0x10(%rax,%r13), %r8
movq -0x8(%rax,%r13), %r9
movl $0x100, %esi            # imm = 0x100
movq %r12, %rdi
testq %r9, %r9
je 0x11ef5
leaq 0x1c9ca(%rip), %rdx     # 0x2e8b4
movl %ebp, %ecx
xorl %eax, %eax
callq 0xd260
jmp 0x11f06
leaq 0x1f9c0(%rip), %rdx     # 0x318bc
movq %r8, %rcx
xorl %eax, %eax
callq 0xd260
movq %rbx, %rdi
movq %r12, %rsi
callq 0x11f67
incq %r15
addq $0x18, %r13
cmpq 0x8(%r14), %r15
jl 0x11eb3
jmp 0x11f29
movq $0x0, 0x8(%rsp)
movq 0x8(%rbx), %rax
xorq $0x1, %rax
movq 0x8(%rsp), %rsi
movq %rsi, %rcx
xorq $0x1, %rcx
xorl %edx, %edx
orq %rax, %rcx
cmoveq %rdx, %rsi
movq %rdx, 0x20(%rbx)
movq %rsi, 0x28(%rbx)
movl $0x2, 0x18(%rbx)
addq $0x118, %rsp            # imm = 0x118
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/justy989[P]ce/ce_app.c
// Function: buffer_append_on_new_line
bool buffer_append_on_new_line(CeBuffer_t* buffer, const char* string){
     int64_t old_line_count = buffer->line_count;
     if(old_line_count == 1 && strlen(buffer->lines[0]) == 0){
          return ce_buffer_insert_string(buffer, string, (CePoint_t){0, 0});
     }
     int64_t new_line_count = buffer->line_count + 1;
     buffer->lines = realloc(buffer->lines, new_line_count * sizeof(buffer->lines[0]));
     if(buffer->lines == NULL) return false;
     buffer->line_count = new_line_count;
     buffer->lines[old_line_count] = calloc(1, sizeof(buffer->lines[old_line_count]));
     return ce_buffer_insert_string(buffer, string, (CePoint_t){0, old_line_count});
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r15
movq 0x8(%rdi), %r14
cmpq $0x1, %r14
jne 0x11f8a
movq (%r15), %rax
movq (%rax), %rax
cmpb $0x0, (%rax)
je 0x11fd0
movq (%r15), %rdi
leaq 0x8(,%r14,8), %rsi
callq 0xd520
movq %rax, (%r15)
testq %rax, %rax
je 0x11fc2
movq %rax, %r12
leaq 0x1(%r14), %rax
movq %rax, 0x8(%r15)
movl $0x1, %edi
movl $0x8, %esi
callq 0xd380
movq %rax, (%r12,%r14,8)
jmp 0x11fd3
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
xorl %r14d, %r14d
movq %r15, %rdi
movq %rbx, %rsi
xorl %edx, %edx
movq %r14, %rcx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0xda6e
// File: /workspace/github_c_makefile_star2_O1/justy989[P]ce/ce_app.c
// Function: user_config_free
void user_config_free(CeUserConfig_t* user_config){
     free(user_config->filepath);
#if defined(PLATFORM_WINDOWS)

#else
     // NOTE: comment out dlclose() so valgrind can get a helpful stack frame
     dlclose(user_config->handle);
#endif
     memset(user_config, 0, sizeof(*user_config));
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x8(%rdi), %rdi
callq 0xd090
movq (%rbx), %rdi
callq 0xd690
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
movups %xmm0, 0x10(%rbx)
movq $0x0, 0x20(%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/justy989[P]ce/ce_app.c
// Function: istrtol
int64_t istrtol(const CeRune_t* istr, const CeRune_t** end_of_numbers){
     int64_t value = 0;
     const CeRune_t* itr = istr;

     while(*itr){
          if(isdigit(*itr)){
               value *= 10;
               value += *itr - '0';
          }else{
               if(itr != istr) *end_of_numbers = itr;
               break;
          }

          itr++;
     }

     if(!(*itr) && itr != istr) *end_of_numbers = itr;

     return value;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movl (%rdi), %ebp
testl %ebp, %ebp
je 0x123a5
callq 0xd720
movq (%rax), %rdx
xorl %ecx, %ecx
xorl %eax, %eax
movslq %ebp, %rsi
testb $0x8, 0x1(%rdx,%rsi,2)
je 0x123ae
leaq (%rax,%rax,4), %rax
leaq (%rsi,%rax,2), %rax
addq $-0x30, %rax
movl 0x4(%r14,%rcx), %ebp
addq $0x4, %rcx
testl %ebp, %ebp
jne 0x12378
addq %r14, %rcx
xorl %esi, %esi
movq %rcx, %rdx
jmp 0x123bd
xorl %eax, %eax
movq %r14, %rdx
xorl %esi, %esi
jmp 0x123bd
leaq (%r14,%rcx), %rdx
movb $0x1, %sil
testq %rcx, %rcx
je 0x123bd
movq %rdx, (%rbx)
cmpq %r14, %rdx
sete %cl
orb %sil, %cl
jne 0x123cb
movq %rdx, (%rbx)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/justy989[P]ce/ce_app.c
// Function: ce_app_init_command_completion
void ce_app_init_command_completion(CeApp_t* app, CeComplete_t* complete){
     const char** commands = malloc(app->command_entry_count * sizeof(*commands));
     const char** descriptions = malloc(app->command_entry_count * sizeof(*descriptions));
     for(int64_t i = 0; i < app->command_entry_count; i++){
          commands[i] = strdup(app->command_entries[i].name);
          descriptions[i] = strdup(app->command_entries[i].description);
     }
     ce_complete_init(complete, commands, descriptions, app->command_entry_count);
     for(int64_t i = 0; i < app->command_entry_count; i++){
          free((char*)(commands[i]));
          free((char*)(descriptions[i]));
     }
     free(commands);
     free(descriptions);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, (%rsp)
movq %rdi, %rbx
movq 0x2838(%rdi), %r12
leaq (,%r12,8), %r15
movq %r15, %rdi
callq 0xd4c0
movq %rax, %r14
movq %r15, %rdi
callq 0xd4c0
movq %rax, %r15
testq %r12, %r12
jle 0x124a7
movq 0x2830(%rbx), %rbp
addq $0x10, %rbp
xorl %r13d, %r13d
movq -0x8(%rbp), %rdi
callq 0xd640
movq %rax, (%r14,%r13,8)
movq (%rbp), %rdi
callq 0xd640
movq %rax, (%r15,%r13,8)
incq %r13
addq $0x18, %rbp
cmpq %r13, %r12
jne 0x12481
movq (%rsp), %rdi
movq %r14, %rsi
movq %r15, %rdx
movq %r12, %rcx
callq 0x19fd4
cmpq $0x0, 0x2838(%rbx)
jle 0x124e4
xorl %r12d, %r12d
movq (%r14,%r12,8), %rdi
callq 0xd090
movq (%r15,%r12,8), %rdi
callq 0xd090
incq %r12
cmpq 0x2838(%rbx), %r12
jl 0x124c6
movq %r14, %rdi
callq 0xd090
movq %r15, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xd090
// File: /workspace/github_c_makefile_star2_O1/justy989[P]ce/ce_app.c
// Function: ce_app_input
void ce_app_input(CeApp_t* app, const char* dialogue, CeInputCompleteFunc* input_complete_func){
     CeView_t* input_view = &app->input_view;

     CeLayout_t* tab_layout = app->tab_list_layout->tab_list.current;
     if(tab_layout->tab.current->type != CE_LAYOUT_TYPE_VIEW) return;
     CeView_t* view = &tab_layout->tab.current->view;

     input_view_overlay(input_view, view);

     free(input_view->buffer->app_data);

     ce_buffer_alloc(input_view->buffer, 1, dialogue);
     input_view->buffer->app_data = calloc(1, sizeof(CeAppBufferData_t));
     input_view->buffer->no_line_numbers = true;
     input_view->buffer->no_highlight_current_line = true;
     input_view->cursor = (CePoint_t){0, 0};

     app->vim_visual_save.mode = app->vim.mode;
     app->vim_visual_save.visual_point = app->visual.point;

     app->vim.mode = CE_VIM_MODE_INSERT;
     app->vim.current_action.verb.function = ce_vim_verb_insert_mode;
     app->vim.current_action.motion.function = NULL;
     if(!app->vim.verb_last_action){
          ce_rune_node_free(&app->vim.insert_rune_head);
     }

     app->input_complete_func = input_complete_func;
     ce_complete_free(&app->input_complete);
}

// Assembly:
movq 0x2818(%rdi), %rax
movq 0x10(%rax), %rax
movq 0x10(%rax), %rax
cmpl $0x0, (%rax)
je 0x126c1
retq
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movq 0x8(%rax), %rcx
movq %rcx, 0x2708(%rdi)
movq 0x10(%rax), %rcx
movq %rcx, 0x2710(%rdi)
movq 0x20(%rax), %rcx
movq %rcx, 0x2720(%rdi)
movq 0x18(%rax), %rcx
movq 0x20(%rax), %rax
notq %rcx
addq %rax, %rcx
movq 0x2748(%rdi), %rdx
movq 0x8(%rdx), %rsi
cmpq $0x2, %rsi
movl $0x1, %edi
cmovlq %rdi, %rsi
cmpq %rcx, %rsi
cmovgeq %rcx, %rsi
subq %rsi, %rax
movq %rax, 0x2718(%rbx)
movq 0x58(%rdx), %rdi
callq 0xd090
movq 0x2748(%rbx), %rdi
movl $0x1, %esi
movq %r15, %rdx
callq 0xddf1
movl $0x1, %edi
movl $0x628, %esi            # imm = 0x628
callq 0xd380
movq 0x2748(%rbx), %rcx
movq %rax, 0x58(%rcx)
movw $0x101, 0x50(%rcx)      # imm = 0x101
xorps %xmm0, %xmm0
movups %xmm0, 0x2738(%rbx)
movl 0x20(%rbx), %eax
movl %eax, 0x1a08(%rbx)
movups 0x1a20(%rbx), %xmm0
movups %xmm0, 0x1a10(%rbx)
movl $0x1, 0x20(%rbx)
leaq 0x12929(%rip), %rax     # 0x250bc
movq %rax, 0x19c8(%rbx)
movq $0x0, 0x19b0(%rbx)
cmpb $0x0, 0x19f9(%rbx)
jne 0x127ba
leaq 0x19e8(%rbx), %rdi
callq 0x10370
movq %r14, 0x27f8(%rbx)
addq $0x28a0, %rbx           # imm = 0x28A0
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x1a0bc
// File: /workspace/github_c_makefile_star2_O1/justy989[P]ce/ce_app.c
// Function: str_endswith
bool _str_endswith(const char* string,
                   const char* extension){
     int64_t string_len = strlen(string);
     int64_t extension_len = strlen(extension);

     if(extension_len > string_len){
          return false;
     }

     return strcmp(string + (string_len - extension_len),
                   extension) == 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
callq 0xd210
movq %rax, %r15
movq %rbx, %rdi
callq 0xd210
subq %rax, %r15
jge 0x127f9
xorl %eax, %eax
jmp 0x1280c
addq %r15, %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0xd390
testl %eax, %eax
sete %al
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/justy989[P]ce/ce_app.c
// Function: convert_uri_to_linux_path
static void _convert_uri_to_linux_path(char* uri){
     const char prefix[] = "file://";
     int64_t uri_len = 0;
     if(strncmp(uri, prefix, 7) == 0){
          uri_len = strlen(uri + 7);
          memmove(uri, uri + 7, uri_len);
          uri[uri_len] = 0;
     }else{
          uri_len = strlen(uri);
     }
     int64_t u = 0;
     for(int64_t i = 0; i < uri_len; i++){
          if(strncmp(uri + i, "%20", 3) == 0){
               uri[u] = ' ';
               i += 2;
          }else{
               uri[u] = uri[i];
          }
          u++;
     }
     uri[u] = 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x1cbd2(%rip), %rsi     # 0x2fead
movl $0x7, %edx
callq 0xd0d0
testl %eax, %eax
je 0x132f6
movq %rbx, %rdi
callq 0xd210
movq %rax, %r14
jmp 0x13318
leaq 0x7(%rbx), %r15
movq %r15, %rdi
callq 0xd210
movq %rax, %r14
movq %rbx, %rdi
movq %r15, %rsi
movq %rax, %rdx
callq 0xd580
movb $0x0, (%rbx,%r14)
testq %r14, %r14
jle 0x13361
xorl %ebp, %ebp
leaq 0x1cb8f(%rip), %r15     # 0x2feb5
xorl %r13d, %r13d
leaq (%rbx,%rbp), %r12
movl $0x3, %edx
movq %r12, %rdi
movq %r15, %rsi
callq 0xd0d0
testl %eax, %eax
je 0x1334b
movb (%r12), %al
movb %al, (%rbx,%r13)
jmp 0x13354
movb $0x20, (%rbx,%r13)
addq $0x2, %rbp
incq %r13
incq %rbp
cmpq %r14, %rbp
jl 0x13329
jmp 0x13364
xorl %r13d, %r13d
movb $0x0, (%rbx,%r13)
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_app.c
// Function: load_destination_into_view
CeBuffer_t* load_destination_into_view(CeBufferNode_t** buffer_node_head, CeView_t* view, CeConfigOptions_t* config_options,
                                       CeVim_t* vim, bool insert_into_jump_list,
                                       const char* base_directory, CeDestination_t* destination){
     char full_path[MAX_PATH_LEN];
     if(!base_directory){
#if defined(PLATFORM_WINDOWS)
          bool is_absolute_path = (destination->filepath[0] != 0 && destination->filepath[1] == ':');
#else
          bool is_absolute_path = (destination->filepath[0] == CE_PATH_SEPARATOR);
#endif
          if(!is_absolute_path){
               base_directory = ".";
          }
     }
     if(base_directory){
          const char* full_path_format = "%s/%s";
          snprintf(full_path, MAX_PATH_LEN - strlen(full_path_format), full_path_format, base_directory, destination->filepath);
     }else{
          strncpy(full_path, destination->filepath, MAX_PATH_LEN);
     }
     CeBuffer_t* load_buffer = load_file_into_view(buffer_node_head, view, config_options, vim,
                                                   insert_into_jump_list, full_path);
     if(!load_buffer) return load_buffer;

     if(destination->point.y < load_buffer->line_count){
          view->cursor.y = destination->point.y;
          int64_t line_len = ce_utf8_strlen(load_buffer->lines[view->cursor.y]);
          if(destination->point.x < line_len) view->cursor.x = destination->point.x;
     }

     return load_buffer;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x408, %rsp            # imm = 0x408
movl %r8d, %ebp
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %rbx
movq %rdi, %r12
movq 0x440(%rsp), %r13
testq %r9, %r9
jne 0x13bf9
xorl %r9d, %r9d
cmpb $0x2f, 0x10(%r13)
leaq 0x1c78f(%rip), %rax     # 0x30384
cmovneq %rax, %r9
leaq 0x10(%r13), %r8
testq %r9, %r9
je 0x13c1d
leaq 0x1c29e(%rip), %rdx     # 0x2fea7
movq %rsp, %rdi
movl $0x3fb, %esi            # imm = 0x3FB
movq %r9, %rcx
xorl %eax, %eax
callq 0xd260
jmp 0x13c2d
movq %rsp, %rdi
movl $0x400, %edx            # imm = 0x400
movq %r8, %rsi
callq 0xd0b0
movzbl %bpl, %r8d
movq %rsp, %r9
movq %r12, %rdi
movq %rbx, %rsi
movq %r15, %rdx
movq %r14, %rcx
callq 0x118b2
movq %rax, %r14
testq %rax, %rax
je 0x13c74
movq 0x8(%r13), %rax
cmpq 0x8(%r14), %rax
jge 0x13c74
movq %rax, 0x38(%rbx)
movq (%r14), %rcx
movq (%rcx,%rax,8), %rdi
callq 0xe485
movq (%r13), %rcx
cmpq %rax, %rcx
jge 0x13c74
movq %rcx, 0x30(%rbx)
movq %r14, %rax
addq $0x408, %rsp            # imm = 0x408
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/justy989[P]ce/ce_app.c
// Function: build_clangd_diagnostics_buffer
void build_clangd_diagnostics_buffer(CeBuffer_t* buffer, CeBuffer_t* source){
     CeAppBufferData_t* app_data = (CeAppBufferData_t*)(source->app_data);
     char line[BUFSIZ];
     buffer->status = CE_BUFFER_STATUS_NONE;
     ce_buffer_empty(buffer);
     for(int64_t i = 0; i < app_data->clangd_diagnostics.count; i++){
         CeClangDDiagnostic_t* diag = app_data->clangd_diagnostics.elements + i;
         snprintf(line, BUFSIZ, "%s:%" PRId64 ":%" PRId64 " %s",
                  source->name, diag->start.y + 1, diag->start.x + 1, diag->message);
         buffer_append_on_new_line(buffer, line);
     }
     buffer->status = CE_BUFFER_STATUS_READONLY;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x2018, %rsp           # imm = 0x2018
movq %rsi, %r14
movq %rdi, %rbx
movq 0x58(%rsi), %r13
movl $0x0, 0x18(%rdi)
callq 0xe3d9
cmpq $0x0, 0x618(%r13)
jle 0x13e96
leaq 0x10(%rsp), %r12
xorl %ebp, %ebp
xorl %r15d, %r15d
movq 0x610(%r13), %rax
movq 0x10(%r14), %rcx
movq (%rax,%rbp), %r9
movq 0x8(%rax,%rbp), %r8
incq %r8
incq %r9
movq 0x20(%rax,%rbp), %rax
movq %rax, (%rsp)
movl $0x2000, %esi           # imm = 0x2000
movq %r12, %rdi
leaq 0x1be71(%rip), %rdx     # 0x2fce5
xorl %eax, %eax
callq 0xd260
movq %rbx, %rdi
movq %r12, %rsi
callq 0x11f67
incq %r15
addq $0x28, %rbp
cmpq 0x618(%r13), %r15
jl 0x13e42
movl $0x2, 0x18(%rbx)
addq $0x2018, %rsp           # imm = 0x2018
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/justy989[P]ce/ce_app.c
// Function: unsaved_buffers_input_complete_func
bool unsaved_buffers_input_complete_func(CeApp_t* app, CeBuffer_t* input_buffer){
     if(strcmp(app->input_view.buffer->lines[0], "y") == 0 ||
        strcmp(app->input_view.buffer->lines[0], "Y") == 0){
          app->quit = true;
     }

     return true;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x2748(%rdi), %rax
movq (%rax), %rax
movq (%rax), %r14
leaq 0x1cc03(%rip), %rsi     # 0x30acd
movq %r14, %rdi
callq 0xd390
testl %eax, %eax
je 0x13ee9
leaq 0x1be16(%rip), %rsi     # 0x2fcf3
movq %r14, %rdi
callq 0xd390
testl %eax, %eax
jne 0x13ef0
movb $0x1, 0x2c78(%rbx)
movb $0x1, %al
addq $0x8, %rsp
popq %rbx
popq %r14
retq