LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/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 0x110e0
movq 0x4108(%rdi), %rax
decq %rcx
cmpq %rcx, %rax
jge 0x110e0
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_O3/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 0x11116
movq 0x4108(%rdi), %rax
testq %rax, %rax
js 0x11116
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_O3/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 0x11437
pushq %r15
pushq %r14
pushq %rbx
subq $0x40, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq %rsi, %rdi
callq 0xff6e
movq %rax, %r15
movq %r14, %rdi
callq 0xff76
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 0x1143a
xorl %eax, %eax
jmp 0x11459
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 0x10121
addq $0x40, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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), %rdi
movq 0x4118(%rdi), %rax
testq %rax, %rax
je 0x1155f
movq 0x2828(%rcx), %r8
testq %r8, %r8
je 0x11526
movq %r8, %r9
cmpq %rax, (%r9)
je 0x11534
movq 0x8(%r9), %r9
testq %r9, %r9
jne 0x11518
testb %dl, %dl
je 0x11554
movq (%r8), %rax
movq %rax, 0x4118(%rdi)
leaq 0x20(%rcx), %rdx
addq $0x1a50, %rcx           # imm = 0x1A50
movq %rsi, %rdi
movq %rax, %rsi
movl $0x1, %r8d
callq 0x11135
movb $0x1, %al
jmp 0x11561
movq $0x0, 0x4118(%rdi)
xorl %eax, %eax
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O3/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:
movups (%rsi), %xmm0
movups %xmm0, (%rdi)
movq 0x18(%rsi), %rax
movq %rax, 0x18(%rdi)
movq 0x10(%rsi), %rcx
notq %rcx
addq %rax, %rcx
movq 0x40(%rdi), %rdx
movq 0x8(%rdx), %rdx
cmpq $0x2, %rdx
movl $0x1, %esi
cmovgeq %rdx, %rsi
cmpq %rcx, %rsi
cmovgeq %rcx, %rsi
subq %rsi, %rax
movq %rax, 0x10(%rdi)
retq
// File: /workspace/github_c_makefile_star2_O3/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 0xe4d4
testq %rax, %rax
je 0x115e1
movq 0x40(%rbx), %rax
movq (%rax), %rax
movq 0x30(%rbx), %rsi
movq 0x38(%rbx), %rcx
movq (%rax,%rcx,8), %rdi
movq %r14, %rdx
callq 0xed91
movq %rax, %r14
jmp 0x115e4
xorl %r14d, %r14d
movq 0x40(%rbx), %rax
cmpb $0x0, 0x50(%rax)
je 0x115f2
xorl %eax, %eax
jmp 0x11605
movq 0x8(%rax), %rsi
movq 0x10(%rbx), %rdx
movq 0x18(%rbx), %rcx
movl %ebp, %edi
callq 0x1068a
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_O3/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 %r12
pushq %rbx
testq %rdi, %rdi
je 0x11689
movq %rsi, %r14
movq %rdi, %rbx
movq (%rbx), %r12
movq 0x10(%r12), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0xd390
testl %eax, %eax
je 0x1168c
movq %r14, %rdi
movq %r15, %rsi
callq 0xd6f0
testq %rax, %rax
je 0x11680
movq %r15, %rdi
xorl %esi, %esi
callq 0xd410
movq %rax, %r15
movq %rax, %rdi
movq %r14, %rsi
callq 0xd390
movl %eax, %ebp
movq %r15, %rdi
callq 0xd090
testl %ebp, %ebp
je 0x11698
movq 0x8(%rbx), %rbx
testq %rbx, %rbx
jne 0x11633
xorl %r12d, %r12d
movq %r12, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq (%rbx), %r12
jmp 0x1168c
// File: /workspace/github_c_makefile_star2_O3/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 0x119e9
xorl %eax, %eax
jmp 0x119ff
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_O3/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 0x11a27
subq %rbx, %rax
movq %rbx, %rdi
movq %rax, %rsi
popq %rbx
jmp 0xf886
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/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 0xe396
movq %r14, 0x60(%rbx)
movq 0x8(%r14), %rbp
xorl %r15d, %r15d
testq %rbp, %rbp
jle 0x11d13
movq (%r14), %r12
addq $0x10, %r12
movq %rbp, %r13
cmpb $0x1, (%r12)
jne 0x11c79
movq -0x10(%r12), %rdi
callq 0xd210
cmpl %eax, %r15d
cmovgl %r15d, %eax
movl %eax, %r15d
addq $0x18, %r12
decq %r13
jne 0x11c5e
testq %rbp, %rbp
jle 0x11d13
movl $0x10, %r13d
movq $0x0, 0x8(%rsp)
xorl %r12d, %r12d
movq (%r14), %rax
cmpb $0x1, (%rax,%r13)
jne 0x11d05
cmpq 0x18(%r14), %r12
jne 0x11cb6
movq 0x8(%rbx), %rcx
movq %rcx, 0x8(%rsp)
movq -0x10(%rax,%r13), %r8
movq -0x8(%rax,%r13), %r9
testq %r9, %r9
leaq 0x10(%rsp), %rbp
movl $0x100, %esi            # imm = 0x100
movq %rbp, %rdi
je 0x11ce5
leaq 0x1bbdd(%rip), %rdx     # 0x2d8b6
movl %r15d, %ecx
xorl %eax, %eax
callq 0xd260
jmp 0x11cf6
leaq 0x1ec7a(%rip), %rdx     # 0x30966
movq %r8, %rcx
xorl %eax, %eax
callq 0xd260
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x11d5a
movq 0x8(%r14), %rbp
incq %r12
addq $0x18, %r13
cmpq %rbp, %r12
jl 0x11c9d
jmp 0x11d1c
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_O3/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, %r14
movq (%rdi), %rdi
movq 0x8(%r14), %r15
cmpq $0x1, %r15
jne 0x11d7d
movq (%rdi), %rax
cmpb $0x0, (%rax)
je 0x11dc0
leaq 0x8(,%r15,8), %rsi
callq 0xd520
movq %rax, (%r14)
testq %rax, %rax
je 0x11db2
movq %rax, %r12
leaq 0x1(%r15), %rax
movq %rax, 0x8(%r14)
movl $0x1, %edi
movl $0x8, %esi
callq 0xd380
movq %rax, (%r12,%r15,8)
jmp 0x11dc3
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
xorl %r15d, %r15d
movq %r14, %rdi
movq %rbx, %rsi
xorl %edx, %edx
movq %r15, %rcx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0xda6e
// File: /workspace/github_c_makefile_star2_O3/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
movl (%rdi), %ebp
testl %ebp, %ebp
je 0x12197
movq %rsi, %rbx
movq %rdi, %r14
callq 0xd720
movq (%rax), %rdx
xorl %ecx, %ecx
xorl %eax, %eax
movslq %ebp, %rsi
testb $0x8, 0x1(%rdx,%rsi,2)
je 0x1219b
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 0x12172
jmp 0x121a0
xorl %eax, %eax
jmp 0x121a6
testq %rcx, %rcx
je 0x121a6
addq %rcx, %r14
movq %r14, (%rbx)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x12282
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 0x1225c
movq (%rsp), %rdi
movq %r14, %rsi
movq %r15, %rdx
movq %r12, %rcx
callq 0x1994c
cmpq $0x0, 0x2838(%rbx)
jle 0x122bf
xorl %r12d, %r12d
movq (%r14,%r12,8), %rdi
callq 0xd090
movq (%r15,%r12,8), %rdi
callq 0xd090
incq %r12
cmpq 0x2838(%rbx), %r12
jl 0x122a1
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_O3/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 0x1249c
retq
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movups 0x8(%rax), %xmm0
movups %xmm0, 0x2708(%rdi)
movq 0x20(%rax), %rcx
movq %rcx, 0x2720(%rdi)
movq 0x18(%rax), %rax
notq %rax
addq %rcx, %rax
movq 0x2748(%rdi), %rdx
movq 0x8(%rdx), %rsi
cmpq $0x2, %rsi
movl $0x1, %edi
cmovlq %rdi, %rsi
cmpq %rax, %rsi
cmovgeq %rax, %rsi
subq %rsi, %rcx
movq %rcx, 0x2718(%rbx)
movq 0x58(%rdx), %rdi
callq 0xd090
movq 0x2748(%rbx), %rdi
movl $0x1, %esi
movq %r15, %rdx
callq 0xddf2
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 0x12ae6(%rip), %rax     # 0x25045
movq %rax, 0x19c8(%rbx)
movq $0x0, 0x19b0(%rbx)
cmpb $0x0, 0x19f9(%rbx)
jne 0x12586
leaq 0x19e8(%rbx), %rdi
callq 0x101e1
movq %r14, 0x27f8(%rbx)
addq $0x28a0, %rbx           # imm = 0x28A0
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x199ea
// File: /workspace/github_c_makefile_star2_O3/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 0x125c5
xorl %eax, %eax
jmp 0x125d8
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_O3/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 %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x1bdd3(%rip), %rsi     # 0x2eead
movl $0x7, %edx
callq 0xd0d0
testl %eax, %eax
je 0x130f5
movq %rbx, %rdi
callq 0xd210
movq %rax, %r14
jmp 0x13117
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 0x1315b
xorl %ecx, %ecx
xorl %eax, %eax
movb (%rbx,%rcx), %dl
cmpb $0x25, %dl
jne 0x1314b
movb $0x25, %dl
cmpb $0x32, 0x1(%rbx,%rcx)
jne 0x1314b
xorl %edx, %edx
cmpb $0x30, 0x2(%rbx,%rcx)
setne %sil
jne 0x13142
addq $0x2, %rcx
movb %sil, %dl
leal (%rdx,%rdx,4), %edx
addl $0x20, %edx
movb %dl, (%rbx,%rax)
incq %rax
incq %rcx
cmpq %r14, %rcx
jl 0x13120
jmp 0x1315d
xorl %eax, %eax
movb $0x0, (%rbx,%rax)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x139f6
cmpb $0x2f, 0x10(%r13)
jne 0x139ef
leaq 0x10(%r13), %rsi
movq %rsp, %rdi
movl $0x400, %edx            # imm = 0x400
callq 0xd0b0
jmp 0x13a13
leaq 0x19874(%rip), %r9      # 0x2d26a
leaq 0x10(%r13), %r8
leaq 0x1b4a6(%rip), %rdx     # 0x2eea7
movq %rsp, %rdi
movl $0x3fb, %esi            # imm = 0x3FB
movq %r9, %rcx
xorl %eax, %eax
callq 0xd260
movzbl %bpl, %r8d
movq %rsp, %r9
movq %r12, %rdi
movq %rbx, %rsi
movq %r15, %rdx
movq %r14, %rcx
callq 0x1169d
movq %rax, %r14
testq %rax, %rax
je 0x13a5a
movq 0x8(%r13), %rax
cmpq 0x8(%r14), %rax
jge 0x13a5a
movq %rax, 0x38(%rbx)
movq (%r14), %rcx
movq (%rcx,%rax,8), %rdi
callq 0xe445
movq (%r13), %rcx
cmpq %rax, %rcx
jge 0x13a5a
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_O3/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 0xe396
cmpq $0x0, 0x618(%r13)
jle 0x13c6e
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 0x1b09b(%rip), %rdx     # 0x2ece7
xorl %eax, %eax
callq 0xd260
movq %rbx, %rdi
movq %r12, %rsi
callq 0x11d5a
incq %r15
addq $0x28, %rbp
cmpq 0x618(%r13), %r15
jl 0x13c1a
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_O3/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:
movq 0x2748(%rdi), %rax
movq (%rax), %rax
movq (%rax), %rax
movzbl (%rax), %ecx
cmpl $0x59, %ecx
je 0x13ca1
cmpl $0x79, %ecx
jne 0x13cae
cmpb $0x0, 0x1(%rax)
jne 0x13cae
movb $0x1, 0x2c78(%rdi)
movb $0x1, %al
retq
// File: /workspace/github_c_makefile_star2_O3/justy989[P]ce/ce_app.c
// Function: buffer_modified_outside_editor_complete_func
bool buffer_modified_outside_editor_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){
          CeLayout_t* tab_layout = app->tab_list_layout->tab_list.current;
          CeView_t* view = NULL;

          if(tab_layout->tab.current->type == CE_LAYOUT_TYPE_VIEW){
               view = &tab_layout->tab.current->view;
          }else{
               return false;
          }

          ce_buffer_save(view->buffer);
     }

     return true;
}

// Assembly:
pushq %rbx
movq 0x2748(%rdi), %rax
movq (%rax), %rax
movq (%rax), %rax
movzbl (%rax), %ecx
movb $0x1, %bl
cmpl $0x59, %ecx
je 0x13cce
cmpl $0x79, %ecx
jne 0x13cf5
cmpb $0x0, 0x1(%rax)
jne 0x13cf5
movq 0x2818(%rdi), %rax
movq 0x10(%rax), %rax
movq 0x10(%rax), %rax
cmpl $0x0, (%rax)
je 0x13cec
xorl %ebx, %ebx
jmp 0x13cf5
movq 0x48(%rax), %rdi
callq 0xe2af
movl %ebx, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/justy989[P]ce/ce_app.c
// Function: load_file_input_complete_func
bool load_file_input_complete_func(CeApp_t* app, CeBuffer_t* input_buffer){
     // TODO: compress with code above
     CeLayout_t* tab_layout = app->tab_list_layout->tab_list.current;
     if(tab_layout->tab.current->type != CE_LAYOUT_TYPE_VIEW) return false;
     CeView_t* view = &tab_layout->tab.current->view;

     char* base_directory = buffer_base_directory(view->buffer);
     char filepath[MAX_PATH_LEN];
     for(int64_t i = 0; i < app->input_view.buffer->line_count; i++){
          if(base_directory && app->input_view.buffer->lines[i][0] != CE_PATH_SEPARATOR){
               snprintf(filepath, MAX_PATH_LEN, "%s%c%s", base_directory, CE_PATH_SEPARATOR, app->input_view.buffer->lines[i]);
          }else{
               strncpy(filepath, app->input_view.buffer->lines[i], MAX_PATH_LEN);
          }
          if(!load_file_into_view(&app->buffer_node_head, view, &app->config_options, &app->vim,
                                  true, filepath)){
               ce_app_message(app, "failed to load file '%s': '%s'", filepath, strerror(errno));
               errno = 0;
               return false;
          }
          if(!ce_clangd_file_open(&app->clangd, app->buffer_node_head->buffer)){
               return false;
          }
     }

     free(base_directory);
     return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x428, %rsp            # imm = 0x428
movq 0x2818(%rdi), %rax
movq 0x10(%rax), %rax
movq 0x10(%rax), %r14
cmpl $0x0, (%r14)
je 0x13ee2
xorl %ebp, %ebp
jmp 0x14013
movq %rdi, %rbx
movq 0x48(%r14), %rdi
callq 0x11a2b
movq %rax, (%rsp)
movq 0x2748(%rbx), %rax
cmpq $0x0, 0x8(%rax)
jle 0x13fd4
addq $0x8, %r14
leaq 0x2828(%rbx), %r12
leaq 0x1a50(%rbx), %rcx
movq %rcx, 0x18(%rsp)
leaq 0x20(%rbx), %rcx
movq %rcx, 0x10(%rsp)
leaq 0x2cd0(%rbx), %rcx
movq %rcx, 0x8(%rsp)
leaq 0x20(%rsp), %rbp
xorl %r13d, %r13d
movq (%rax), %rax
movq (%rax,%r13,8), %r9
cmpq $0x0, (%rsp)
je 0x13f4c
cmpb $0x2f, (%r9)
jne 0x13f5e
movl $0x400, %edx            # imm = 0x400
movq %rbp, %rdi
movq %r9, %rsi
callq 0xd0b0
jmp 0x13f7e
movl $0x400, %esi            # imm = 0x400
movq %rbp, %rdi
leaq 0x19942(%rip), %rdx     # 0x2d8af
movq (%rsp), %rcx
movl $0x2f, %r8d
xorl %eax, %eax
callq 0xd260
movq %r12, %rdi
movq %r14, %rsi
movq 0x18(%rsp), %rdx
movq 0x10(%rsp), %rcx
movl $0x1, %r8d
movq %rbp, %r15
movq %rbp, %r9
callq 0x1169d
testq %rax, %rax
je 0x13fe2
movq (%r12), %rax
movq (%rax), %rsi
movq 0x8(%rsp), %rdi
callq 0x15667
testb %al, %al
je 0x13edb
incq %r13
movq 0x2748(%rbx), %rax
cmpq 0x8(%rax), %r13
movq %r15, %rbp
jl 0x13f38
movq (%rsp), %rdi
callq 0xd090
movb $0x1, %bpl
jmp 0x14013
callq 0xd0a0
movq %rax, %r14
movl (%rax), %edi
callq 0xd650
leaq 0x1ad39(%rip), %rsi     # 0x2ed31
xorl %ebp, %ebp
leaq 0x20(%rsp), %rdx
movq %rbx, %rdi
movq %rax, %rcx
xorl %eax, %eax
callq 0x122dd
movl $0x0, (%r14)
movl %ebp, %eax
addq $0x428, %rsp            # imm = 0x428
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/justy989[P]ce/ce_app.c
// Function: load_project_file_input_complete_func
bool load_project_file_input_complete_func(CeApp_t* app, CeBuffer_t* input_buffer){
     // TODO: compress with code above
     CeLayout_t* tab_layout = app->tab_list_layout->tab_list.current;
     if(tab_layout->tab.current->type != CE_LAYOUT_TYPE_VIEW) return false;
     CeView_t* view = &tab_layout->tab.current->view;

     for(int64_t i = 0; i < input_buffer->line_count; i++){
          if(!load_file_into_view(&app->buffer_node_head, view, &app->config_options, &app->vim,
                                  true, input_buffer->lines[i])){
               ce_app_message(app, "failed to load file '%s': '%s'", input_buffer->lines[i], strerror(errno));
               errno = 0;
               return false;
          }else{
               if(!ce_clangd_file_open(&app->clangd, app->buffer_node_head->buffer)){
                    return false;
               }
          }
     }

     return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq 0x2818(%rdi), %rax
movq 0x10(%rax), %rax
movq 0x10(%rax), %r15
cmpl $0x0, (%r15)
je 0x1405f
xorl %r13d, %r13d
movl %r13d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rsi, %r14
cmpq $0x0, 0x8(%rsi)
jle 0x140e5
addq $0x8, %r15
leaq 0x2828(%rdi), %r12
leaq 0x1a50(%rdi), %rax
movq %rax, 0x10(%rsp)
leaq 0x20(%rdi), %rbp
movq %rdi, (%rsp)
leaq 0x2cd0(%rdi), %rax
movq %rax, 0x8(%rsp)
xorl %ebx, %ebx
movq (%r14), %rax
movq (%rax,%rbx,8), %r9
movq %r12, %rdi
movq %r15, %rsi
movq 0x10(%rsp), %rdx
movq %rbp, %rcx
movl $0x1, %r8d
callq 0x1169d
testq %rax, %rax
je 0x140ed
movq (%r12), %rax
movq (%rax), %rsi
movq 0x8(%rsp), %rdi
callq 0x15667
movl %eax, %r13d
testb %al, %al
je 0x1404d
incq %rbx
cmpq 0x8(%r14), %rbx
jl 0x14096
jmp 0x1404d
movb $0x1, %r13b
jmp 0x1404d
movq (%r14), %rax
movq (%rax,%rbx,8), %rbx
callq 0xd0a0
movq %rax, %r14
movl (%rax), %edi
callq 0xd650
leaq 0x1ac27(%rip), %rsi     # 0x2ed31
xorl %r13d, %r13d
movq (%rsp), %rdi
movq %rbx, %rdx
movq %rax, %rcx
xorl %eax, %eax
callq 0x122dd
movl $0x0, (%r14)
jmp 0x1404d
// File: /workspace/github_c_makefile_star2_O3/justy989[P]ce/ce_app.c
// Function: search_input_complete_func
bool search_input_complete_func(CeApp_t* app, CeBuffer_t* input_buffer){
     // TODO: compress with code above
     CeLayout_t* tab_layout = app->tab_list_layout->tab_list.current;
     if(tab_layout->tab.current->type != CE_LAYOUT_TYPE_VIEW) return false;
     CeView_t* view = &tab_layout->tab.current->view;

     ce_history_insert(&app->search_history, app->input_view.buffer->lines[0]);

     // update yanks
     CeVimYank_t* yank = app->vim.yanks + ce_vim_register_index('/');
     free(yank->text);
     yank->text = strdup(app->input_view.buffer->lines[0]);
     yank->type = CE_VIM_YANK_TYPE_STRING;

     // clear input buffer
     app->input_view.buffer->lines[0][0] = 0;

     // insert jump
     CeAppViewData_t* view_data = view->user_data;
     CeJumpList_t* jump_list = &view_data->jump_list;
     CeDestination_t destination = {};
     destination.point = view->cursor;
     strncpy(destination.filepath, view->buffer->name, MAX_PATH_LEN);
     ce_jump_list_insert(jump_list, destination);
     return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x820, %rsp            # imm = 0x820
movq 0x2818(%rdi), %rax
movq 0x10(%rax), %rax
movq 0x10(%rax), %r14
movl (%r14), %ebp
testl %ebp, %ebp
jne 0x142a5
movq %rdi, %rbx
addq $0x28d0, %rdi           # imm = 0x28D0
movq 0x2748(%rbx), %rax
movq (%rax), %rax
movq (%rax), %rsi
callq 0x109e1
testq %rax, %rax
je 0x1417f
movq $0x0, 0x28d8(%rbx)
movl $0x2f, %edi
callq 0x25108
leaq (%rax,%rax,2), %r15
movq 0x1078(%rbx,%r15,8), %rdi
callq 0xd090
movq 0x2748(%rbx), %r12
movq (%r12), %rax
movq (%rax), %rdi
callq 0xd640
movq %rax, 0x1078(%rbx,%r15,8)
movl $0x1, 0x1070(%rbx,%r15,8)
movq (%r12), %rax
movq (%rax), %rax
movb $0x0, (%rax)
movq 0x50(%r14), %rbx
movups 0x38(%r14), %xmm0
leaq 0x10(%rsp), %rdi
movaps %xmm0, -0x10(%rdi)
movq 0x48(%r14), %rax
movq 0x10(%rax), %rsi
movl $0x400, %edx            # imm = 0x400
callq 0xd0b0
leaq 0x410(%rsp), %rdi
movq %rsp, %rsi
movl $0x410, %edx            # imm = 0x410
callq 0xd420
movq 0x4100(%rbx), %rcx
cmpq $0x10, %rcx
jge 0x1424e
movq 0x4108(%rbx), %rax
testq %rcx, %rcx
jle 0x1422e
incq %rax
movq %rax, 0x4108(%rbx)
movq %rax, 0x4110(%rbx)
imulq $0x410, %rax, %rdi      # imm = 0x410
addq %rbx, %rdi
movq %rsp, %rsi
movl $0x410, %edx            # imm = 0x410
callq 0xd580
incq 0x4100(%rbx)
jmp 0x142a5
movq 0x4108(%rbx), %rax
testq %rax, %rax
jle 0x14286
xorl %r15d, %r15d
movq %rbx, %rdi
leaq 0x410(%rdi), %r14
movl $0x410, %edx            # imm = 0x410
movq %r14, %rsi
callq 0xd420
movq 0x4108(%rbx), %rax
incq %r15
movq %r14, %rdi
cmpq %r15, %rax
jg 0x14260
imulq $0x410, %rax, %rax      # imm = 0x410
addq %rax, %rbx
leaq 0x410(%rsp), %rsi
movl $0x410, %edx            # imm = 0x410
movq %rbx, %rdi
callq 0xd420
testl %ebp, %ebp
sete %al
addq $0x820, %rsp            # imm = 0x820
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/justy989[P]ce/ce_app.c
// Function: switch_buffer_input_complete_func
bool switch_buffer_input_complete_func(CeApp_t* app, CeBuffer_t* input_buffer){
     // TODO: compress with code above
     CeLayout_t* tab_layout = app->tab_list_layout->tab_list.current;
     if(tab_layout->tab.current->type != CE_LAYOUT_TYPE_VIEW) return false;
     CeView_t* view = &tab_layout->tab.current->view;

     CeAppViewData_t* view_data = view->user_data;
     CeJumpList_t* jump_list = &view_data->jump_list;
     CeBufferNode_t* itr = app->buffer_node_head;
     while(itr){
          if(strcmp(itr->buffer->name, app->input_view.buffer->lines[0]) == 0){
               ce_view_switch_buffer(view, itr->buffer, &app->vim, &app->config_options,
                                     jump_list);
               break;
          }
          itr = itr->next;
     }

     return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq 0x2818(%rdi), %rax
movq 0x10(%rax), %rax
movq 0x10(%rax), %r14
movl (%r14), %ebp
testl %ebp, %ebp
je 0x142ef
testl %ebp, %ebp
sete %al
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rdi, %rbx
movq 0x2828(%rdi), %r13
testq %r13, %r13
je 0x142db
movq 0x50(%r14), %rax
movq %rax, (%rsp)
addq $0x8, %r14
movq 0x2748(%rbx), %rax
movq (%rax), %rax
movq (%rax), %r12
movq (%r13), %r15
movq 0x10(%r15), %rdi
movq %r12, %rsi
callq 0xd390
testl %eax, %eax
je 0x14336
movq 0x8(%r13), %r13
testq %r13, %r13
jne 0x14317
jmp 0x142db
leaq 0x20(%rbx), %rdx
addq $0x1a50, %rbx           # imm = 0x1A50
xorl %r8d, %r8d
cmpq $0x0, (%rsp)
setne %r8b
movq %r14, %rdi
movq %r15, %rsi
movq %rbx, %rcx
callq 0x11135
jmp 0x142db
// File: /workspace/github_c_makefile_star2_O3/justy989[P]ce/ce_app.c
// Function: replace_all_input_complete_func
bool replace_all_input_complete_func(CeApp_t* app, CeBuffer_t* input_buffer){
     // TODO: compress with code above
     CeLayout_t* tab_layout = app->tab_list_layout->tab_list.current;
     if(tab_layout->tab.current->type != CE_LAYOUT_TYPE_VIEW) return false;
     CeView_t* view = &tab_layout->tab.current->view;

     int64_t index = ce_vim_register_index('/');
     CeVimYank_t* yank = app->vim.yanks + index;
     if(yank->text){
          replace_all(view, &app->vim_visual_save, yank->text, app->input_view.buffer->lines[0]);
     }
     return true;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq 0x2818(%rdi), %rax
movq 0x10(%rax), %rax
movq 0x10(%rax), %r14
movl (%r14), %ebp
testl %ebp, %ebp
jne 0x143bb
movq %rdi, %rbx
movl $0x2f, %edi
callq 0x25108
leaq (%rax,%rax,2), %rax
movq 0x1078(%rbx,%rax,8), %rdx
testq %rdx, %rdx
je 0x143bb
addq $0x8, %r14
movq 0x2748(%rbx), %rax
addq $0x1a08, %rbx           # imm = 0x1A08
movq (%rax), %rax
movq (%rax), %rcx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x18300
testl %ebp, %ebp
sete %al
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/justy989[P]ce/ce_app.c
// Function: edit_macro_input_complete_func
bool edit_macro_input_complete_func(CeApp_t* app, CeBuffer_t* input_buffer){
     CeRune_t* rune_string = ce_char_string_to_rune_string(app->input_view.buffer->lines[0]);
     if(rune_string){
          ce_rune_node_free(app->macros.rune_head + app->edit_register);
          CeRune_t* itr = rune_string;
          while(*itr){
               ce_rune_node_insert(app->macros.rune_head + app->edit_register, *itr);
               itr++;
          }

          free(rune_string);
     }
     return true;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x2748(%rdi), %rax
movq (%rax), %rax
movq (%rax), %rdi
callq 0x10447
testq %rax, %rax
je 0x1443c
movq %rax, %r14
movsbq 0x2938(%rbx), %rax
leaq (%rbx,%rax,8), %rdi
addq $0x2940, %rdi           # imm = 0x2940
callq 0x101e1
movl (%r14), %esi
testl %esi, %esi
je 0x14434
leaq 0x2940(%rbx), %r15
movq %r14, %r12
addq $0x4, %r12
movsbq 0x2938(%rbx), %rax
leaq (%r15,%rax,8), %rdi
callq 0x10145
movl (%r12), %esi
addq $0x4, %r12
testl %esi, %esi
jne 0x14417
movq %r14, %rdi
callq 0xd090
movb $0x1, %al
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/justy989[P]ce/ce_app.c
// Function: edit_yank_input_complete_func
bool edit_yank_input_complete_func(CeApp_t* app, CeBuffer_t* input_buffer){
     CeVimYank_t* yank = app->vim.yanks + app->edit_register;
     CeVimYankType_t yank_type = yank->type;
     ce_vim_yank_free(yank);
     if(yank_type == CE_VIM_YANK_TYPE_BLOCK){
          yank->block_line_count = app->input_view.buffer->line_count;
          yank->block = malloc(yank->block_line_count * sizeof(*yank->block));
          for(int64_t i = 0; i < app->input_view.buffer->line_count; i++){
               if(strlen(app->input_view.buffer->lines[i])){
                    yank->block[i] = strdup(app->input_view.buffer->lines[i]);
               }else{
                    yank->block[i] = NULL;
               }
          }
          yank->type = yank_type;
     }else{
          yank->text = ce_buffer_dupe(app->input_view.buffer);
          yank->type = yank_type;
     }
     return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %r14
movsbq 0x2938(%rdi), %rax
leaq (%rax,%rax,2), %rax
leaq (%rdi,%rax,8), %rbx
addq $0x1070, %rbx           # imm = 0x1070
movl (%rbx), %ebp
movq %rbx, %rdi
callq 0x243bf
movq 0x2748(%r14), %r15
cmpl $0x3, %ebp
jne 0x144d5
movq 0x8(%r15), %rdi
movq %rdi, 0x10(%rbx)
shlq $0x3, %rdi
callq 0xd4c0
movq %rax, 0x8(%rbx)
movl $0x3, %ebp
cmpq $0x0, 0x8(%r15)
jle 0x144e1
xorl %r12d, %r12d
movq (%r15), %rax
movq (%rax,%r12,8), %rdi
cmpb $0x0, (%rdi)
je 0x144b9
callq 0xd640
jmp 0x144bb
xorl %eax, %eax
movq 0x8(%rbx), %rcx
movq %rax, (%rcx,%r12,8)
incq %r12
movq 0x2748(%r14), %r15
cmpq 0x8(%r15), %r12
jl 0x144a6
jmp 0x144e1
movq %r15, %rdi
callq 0xf88b
movq %rax, 0x8(%rbx)
movl %ebp, (%rbx)
movb $0x1, %al
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/justy989[P]ce/ce_app.c
// Function: run_shell_command_cleanup
void run_shell_command_cleanup(void* data){
     RunShellCommandCleanup_t* cleanup = (RunShellCommandCleanup_t*)(data);

     *cleanup->shell_command_data->should_scroll = false;

     if(cleanup->shell_command_data){
          free(cleanup->shell_command_data->command);
          free(cleanup->shell_command_data);
     }

     if(cleanup->subprocess){
          // kill the subprocess and wait for it to be cleaned up
#if !defined(PLATFORM_WINDOWS)
          ce_subprocess_kill(cleanup->subprocess, SIGKILL);
          ce_subprocess_close(cleanup->subprocess);
#endif
     }
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rax
movq 0x10(%rax), %rcx
movb $0x0, (%rcx)
movq 0x8(%rax), %rdi
callq 0xd090
movq (%rbx), %rdi
callq 0xd090
movq 0x8(%rbx), %rdi
testq %rdi, %rdi
je 0x1452a
movl $0x9, %esi
callq 0x1f6cf
movq 0x8(%rbx), %rdi
popq %rbx
jmp 0x1f70f
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/justy989[P]ce/ce_app.c
// Function: ce_clang_format_buffer
bool ce_clang_format_buffer(char* clang_format_exe, CeBuffer_t* buffer, CePoint_t cursor){
    char* buffer_str = ce_buffer_dupe(buffer);
    int64_t buffer_str_len = ce_utf8_strlen(buffer_str);
    ClangFormatResult_t result = _clang_format_string(clang_format_exe, buffer_str, buffer_str_len);
    free(buffer_str);
    if(!result.success){
        return false;
    }

    bool removed = ce_buffer_remove_string_change(buffer, (CePoint_t){0, 0}, buffer_str_len,
                                                  &cursor, cursor, false);
    if(!removed){
        ce_log("Failed to clear buffer %s to insert clang format results\n", buffer->name);
        free(result.bytes);
        return false;
    }
    bool inserted = ce_buffer_insert_string_change(buffer, result.bytes, (CePoint_t){0, 0}, &cursor,
                                                   cursor, true);
    if(!inserted){
        ce_log("Failed to insert clang format results into %s\n", buffer->name);
        free(result.bytes);
        return false;
    }
    return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movq %rdx, 0x10(%rsp)
movq %rcx, 0x18(%rsp)
movq %rsi, %rdi
callq 0xf88b
movq %rax, %r12
movq %rax, %rdi
callq 0xe445
movq %rax, %r15
movq %r14, %rdi
movq %r12, %rsi
movq %rax, %rdx
callq 0x14978
movl %eax, %ebp
movq %rdx, %r14
movq %r12, %rdi
callq 0xd090
testb $0x1, %bpl
je 0x14b51
leaq 0x10(%rsp), %r8
movups (%r8), %xmm0
movups %xmm0, (%rsp)
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
movq %r15, %rcx
xorl %r9d, %r9d
callq 0xfab0
testb %al, %al
je 0x14b55
leaq 0x10(%rsp), %r8
movups (%r8), %xmm0
movups %xmm0, (%rsp)
movq %rbx, %rdi
movq %r14, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
movl $0x1, %r9d
callq 0xf8ee
movb $0x1, %bpl
testb %al, %al
jne 0x14b71
leaq 0x1a2e2(%rip), %rdi     # 0x2ee31
jmp 0x14b5c
xorl %ebp, %ebp
jmp 0x14b71
leaq 0x1a29b(%rip), %rdi     # 0x2edf7
movq 0x10(%rbx), %rsi
xorl %ebp, %ebp
xorl %eax, %eax
callq 0xd954
movq %r14, %rdi
callq 0xd090
movl %ebp, %eax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/justy989[P]ce/ce_app.c
// Function: ce_app_close_popup_view
bool ce_app_close_popup_view(CeApp_t* app){
     CeLayout_t* tab_layout = app->tab_list_layout->tab_list.current;
     CeLayout_t* current_layout = tab_layout->tab.current;
     CeLayout_t* popup_layout = ce_layout_find_popup(app->tab_list_layout);
     if(popup_layout == NULL){
         return false;
     }
     // Save a point in the popup layout.
     CePoint_t popup_point = {};
     if(popup_layout->type == CE_LAYOUT_TYPE_VIEW){
         popup_point.x = popup_layout->view.rect.left;
         popup_point.y = popup_layout->view.rect.top;
     }
     bool result = ce_layout_delete(app->tab_list_layout, popup_layout);
     // Find the layout that is where the popup layout used to be, and make it the current one if
     // the delete was successful.
     if(result && current_layout == popup_layout){
          CeLayout_t* select_layout = ce_layout_find_at(tab_layout, popup_point);
          if(select_layout){
              tab_layout->tab.current = select_layout;
          }
     }
     return result;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r12
movq 0x2818(%rdi), %rdi
movq 0x10(%rdi), %rbx
movq 0x10(%rbx), %rbp
callq 0x1ee85
testq %rax, %rax
je 0x14cf6
movq %rax, %r14
cmpl $0x0, (%rax)
je 0x14cfa
xorl %r15d, %r15d
xorl %r13d, %r13d
jmp 0x14d02
xorl %eax, %eax
jmp 0x14d37
movq 0x8(%r14), %r15
movq 0x18(%r14), %r13
movq 0x2818(%r12), %rdi
movq %r14, %rsi
callq 0x1eeff
testb %al, %al
je 0x14d37
cmpq %r14, %rbp
jne 0x14d37
movq %rbx, %rdi
movq %r15, %rsi
movq %r13, %rdx
callq 0x1ede6
movq %rax, %rcx
movb $0x1, %al
testq %rcx, %rcx
je 0x14d37
movq %rcx, 0x10(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/justy989[P]ce/ce_clangd.c
// Function: send_json_obj
static bool _send_json_obj(CeJsonObj_t* obj, CeSubprocess_t* subprocess){
     // Build the message boyd
     char* message_body = malloc(DEFAULT_MESSAGE_SIZE);
     ce_json_obj_to_string(obj, message_body, DEFAULT_MESSAGE_SIZE - 1, 1);
     uint64_t message_len = strlen(message_body);

     // Prepend the header.
     char* header = malloc(DEFAULT_HEADER_SIZE);
     int64_t header_len = snprintf(header, DEFAULT_HEADER_SIZE, "Content-Length: %" PRId64 "\r\n\r\n",
                                             message_len);

     int64_t bytes_written = ce_subprocess_write_stdin(subprocess, header, header_len);
     free(header);
     if(bytes_written < 0){
          free(message_body);
          return false;
     }
     bytes_written = ce_subprocess_write_stdin(subprocess, message_body, message_len);
     free(message_body);
     if(bytes_written < 0){
          return false;
     }
     return true;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %r14
movq %rdi, %r15
movl $0x1000000, %edi        # imm = 0x1000000
callq 0xd4c0
movq %rax, %rbx
movl $0xffffff, %edx         # imm = 0xFFFFFF
movl $0x1, %ecx
movq %r15, %rdi
movq %rax, %rsi
callq 0x1c70d
movq %rbx, %rdi
callq 0xd210
movq %rax, %r15
movl $0x400, %edi            # imm = 0x400
callq 0xd4c0
movq %rax, %r12
leaq 0x19b96(%rip), %rdx     # 0x2f198
movl $0x400, %esi            # imm = 0x400
movq %rax, %rdi
movq %r15, %rcx
xorl %eax, %eax
callq 0xd260
movslq %eax, %rdx
movq %r14, %rdi
movq %r12, %rsi
callq 0x1f83a
movq %rax, %r13
movq %r12, %rdi
callq 0xd090
testq %r13, %r13
js 0x15653
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x1f83a
movq %rax, %r14
movq %rbx, %rdi
callq 0xd090
testq %r14, %r14
setns %al
jmp 0x1565d
movq %rbx, %rdi
callq 0xd090
xorl %eax, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq