LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0x10(%rax), %rax
movb $0x0, (%rax)
movq -0x10(%rbp), %rax
cmpq $0x0, (%rax)
je 0x18d48
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0x8(%rax), %rdi
callq 0xd090
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0xd090
movq -0x10(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x18d72
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
movl $0x9, %esi
callq 0x2ae60
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x2af10
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdx, -0x18(%rbp)
movq %rcx, -0x10(%rbp)
movq %rdi, -0x20(%rbp)
movq %rsi, -0x28(%rbp)
movq -0x28(%rbp), %rdi
callq 0x10cf0
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rdi
callq 0xea70
movq %rax, -0x38(%rbp)
movq -0x20(%rbp), %rdi
movq -0x30(%rbp), %rsi
movq -0x38(%rbp), %rdx
callq 0x19530
movb %al, -0x48(%rbp)
movq %rdx, -0x40(%rbp)
movq -0x30(%rbp), %rdi
callq 0xd090
testb $0x1, -0x48(%rbp)
jne 0x197a5
movb $0x0, -0x1(%rbp)
jmp 0x1988a
movq -0x28(%rbp), %rdi
movq $0x0, -0x60(%rbp)
movq $0x0, -0x58(%rbp)
movq -0x38(%rbp), %rcx
movq -0x60(%rbp), %rsi
movq -0x58(%rbp), %rdx
leaq -0x18(%rbp), %rax
xorl %r9d, %r9d
movq %rax, %r8
movq (%rax), %r10
movq %r10, (%rsp)
movq 0x8(%rax), %rax
movq %rax, 0x8(%rsp)
callq 0x110a0
andb $0x1, %al
movb %al, -0x49(%rbp)
testb $0x1, -0x49(%rbp)
jne 0x19814
movq -0x28(%rbp), %rax
movq 0x10(%rax), %rsi
leaq 0x2a5ac(%rip), %rdi     # 0x43daa
movb $0x0, %al
callq 0xd8f0
movq -0x40(%rbp), %rdi
callq 0xd090
movb $0x0, -0x1(%rbp)
jmp 0x1988a
movq -0x28(%rbp), %rdi
movq -0x40(%rbp), %rsi
movq $0x0, -0x78(%rbp)
movq $0x0, -0x70(%rbp)
movq -0x78(%rbp), %rdx
movq -0x70(%rbp), %rcx
leaq -0x18(%rbp), %rax
movl $0x1, %r9d
movq %rax, %r8
movq (%rax), %r10
movq %r10, (%rsp)
movq 0x8(%rax), %rax
movq %rax, 0x8(%rsp)
callq 0x10da0
andb $0x1, %al
movb %al, -0x61(%rbp)
testb $0x1, -0x61(%rbp)
jne 0x19886
movq -0x28(%rbp), %rax
movq 0x10(%rax), %rsi
leaq 0x2a574(%rip), %rdi     # 0x43de4
movb $0x0, %al
callq 0xd8f0
movq -0x40(%rbp), %rdi
callq 0xd090
movb $0x0, -0x1(%rbp)
jmp 0x1988a
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x90, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x2818(%rax), %rax
movq 0x10(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq 0x2818(%rax), %rdi
callq 0x29e90
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x19b3f
movb $0x0, -0x1(%rbp)
jmp 0x19bcb
leaq -0x38(%rbp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0xd290
movq -0x28(%rbp), %rax
cmpl $0x0, (%rax)
jne 0x19b70
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x28(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rax
movq 0x2818(%rax), %rdi
movq -0x28(%rbp), %rsi
callq 0x29f70
andb $0x1, %al
movb %al, -0x39(%rbp)
testb $0x1, -0x39(%rbp)
je 0x19bc3
movq -0x20(%rbp), %rax
cmpq -0x28(%rbp), %rax
jne 0x19bc3
movq -0x18(%rbp), %rdi
movq -0x38(%rbp), %rsi
movq -0x30(%rbp), %rdx
callq 0x29d60
movq %rax, -0x48(%rbp)
cmpq $0x0, -0x48(%rbp)
je 0x19bc1
movq -0x48(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x10(%rax)
jmp 0x19bc3
movb -0x39(%rbp), %al
andb $0x1, %al
movb %al, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl $0x1000000, %edi        # imm = 0x1000000
callq 0xd4a0
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
movl $0xffffff, %edx         # imm = 0xFFFFFF
movl $0x1, %ecx
callq 0x25bf0
movq -0x20(%rbp), %rdi
callq 0xd200
movq %rax, -0x28(%rbp)
movl $0x400, %edi            # imm = 0x400
callq 0xd4a0
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rdi
movq -0x28(%rbp), %rcx
movl $0x400, %esi            # imm = 0x400
leaq 0x29a50(%rip), %rdx     # 0x44134
movb $0x0, %al
callq 0xd250
cltq
movq %rax, -0x38(%rbp)
movq -0x18(%rbp), %rdi
movq -0x30(%rbp), %rsi
movq -0x38(%rbp), %rdx
callq 0x2b0a0
movq %rax, -0x40(%rbp)
movq -0x30(%rbp), %rdi
callq 0xd090
cmpq $0x0, -0x40(%rbp)
jge 0x1a725
movq -0x20(%rbp), %rdi
callq 0xd090
movb $0x0, -0x1(%rbp)
jmp 0x1a754
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x28(%rbp), %rdx
callq 0x2b0a0
movq %rax, -0x40(%rbp)
movq -0x20(%rbp), %rdi
callq 0xd090
cmpq $0x0, -0x40(%rbp)
jge 0x1a750
movb $0x0, -0x1(%rbp)
jmp 0x1a754
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x40, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/justy989[P]ce/ce_clangd.c
// Function: calculate_filename_uri
static bool _calculate_filename_uri(const char* name, char* uri, size_t size){
#if defined(PLATFORM_WINDOWS)
     char* full_file_path = _fullpath(NULL, name, size);
     strncpy(uri, full_file_path, size);
     free(full_file_path);
     if(!_convert_windows_path_to_uri(uri, size)){
          return false;
     }
#else
     char* full_file_path = realpath(name, NULL);
     snprintf(uri, size, "file://%s", full_file_path);
     free(full_file_path);
#endif
     return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0xd3f0
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rcx
leaq 0x29624(%rip), %rdx     # 0x43fec
movb $0x0, %al
callq 0xd250
movq -0x20(%rbp), %rdi
callq 0xd090
movb $0x1, %al
andb $0x1, %al
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/justy989[P]ce/ce_clangd.c
// Function: ce_clangd_file_close
bool ce_clangd_file_close(CeClangD_t* clangd, CeBuffer_t* buffer){
     if(clangd->buffer == NULL){
          return true;
     }
     CeAppBufferData_t* buffer_data = buffer->app_data;
     if(buffer_data->syntax_function != ce_syntax_highlight_c &&
        buffer_data->syntax_function != ce_syntax_highlight_cpp){
          return true;
     }
     char file_uri[MAX_PATH_LEN + 1];
     if(!_calculate_filename_uri(buffer->name, file_uri, MAX_PATH_LEN)){
          return false;
     }

     CeJsonObj_t obj = {};
     ce_json_obj_set_string(&obj, "jsonrpc", "2.0");
     ce_json_obj_set_string(&obj, "method", "textDocument/didClose");

     CeJsonObj_t text_document_obj = {};
     ce_json_obj_set_string(&text_document_obj, "uri", file_uri);
     CeJsonObj_t param_obj = {};
     ce_json_obj_set_obj(&param_obj, "textDocument", &text_document_obj);
     ce_json_obj_set_obj(&obj, "params", &param_obj);

     bool result = _send_json_obj(&obj, &clangd->proc);
     ce_json_obj_free(&param_obj);
     ce_json_obj_free(&text_document_obj);
     ce_json_obj_free(&obj);
     return result;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x470, %rsp            # imm = 0x470
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x28(%rax)
jne 0x1aa17
movb $0x1, -0x1(%rbp)
jmp 0x1ab80
movq -0x18(%rbp), %rax
movq 0x58(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
leaq 0x11102(%rip), %rcx     # 0x2bb30
cmpq %rcx, 0x600(%rax)
je 0x1aa54
movq -0x20(%rbp), %rax
leaq 0x122fe(%rip), %rcx     # 0x2cd40
cmpq %rcx, 0x600(%rax)
je 0x1aa54
movb $0x1, -0x1(%rbp)
jmp 0x1ab80
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rdi
leaq -0x430(%rbp), %rsi
movl $0x400, %edx            # imm = 0x400
callq 0x1a990
testb $0x1, %al
jne 0x1aa7a
movb $0x0, -0x1(%rbp)
jmp 0x1ab80
leaq -0x440(%rbp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0xd290
leaq -0x440(%rbp), %rdi
leaq 0x29530(%rip), %rsi     # 0x43fcb
leaq 0x29531(%rip), %rdx     # 0x43fd3
callq 0x25860
leaq -0x440(%rbp), %rdi
leaq 0x291bc(%rip), %rsi     # 0x43c71
leaq 0x295ae(%rip), %rdx     # 0x4406a
callq 0x25860
leaq -0x450(%rbp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0xd290
leaq -0x430(%rbp), %rdx
leaq -0x450(%rbp), %rdi
leaq 0x290cb(%rip), %rsi     # 0x43bb4
callq 0x25860
leaq -0x460(%rbp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0xd290
leaq -0x460(%rbp), %rdi
leaq 0x2954e(%rip), %rsi     # 0x4405d
leaq -0x450(%rbp), %rdx
callq 0x25560
leaq -0x440(%rbp), %rdi
leaq 0x29084(%rip), %rsi     # 0x43bad
leaq -0x460(%rbp), %rdx
callq 0x25560
movq -0x10(%rbp), %rsi
addq $0x8, %rsi
leaq -0x440(%rbp), %rdi
callq 0x1a680
andb $0x1, %al
movb %al, -0x461(%rbp)
leaq -0x460(%rbp), %rdi
callq 0x25b50
leaq -0x450(%rbp), %rdi
callq 0x25b50
leaq -0x440(%rbp), %rdi
callq 0x25b50
movb -0x461(%rbp), %al
andb $0x1, %al
movb %al, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x470, %rsp            # imm = 0x470
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/justy989[P]ce/ce_clangd.c
// Function: ce_clangd_request_goto_type_def
bool ce_clangd_request_goto_type_def(CeClangD_t* clangd, CeBuffer_t* buffer, CePoint_t point){
     if(clangd->buffer == NULL){
          return true;
     }
     const char* method = "textDocument/typeDefinition";
     clangd->current_request_id++;
     _clangd_track_request(clangd, method);
     return _clangd_request_goto(clangd, buffer, point, method);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdx, -0x18(%rbp)
movq %rcx, -0x10(%rbp)
movq %rdi, -0x20(%rbp)
movq %rsi, -0x28(%rbp)
movq -0x20(%rbp), %rax
cmpq $0x0, 0x28(%rax)
jne 0x1adf9
movb $0x1, -0x1(%rbp)
jmp 0x1ae3f
leaq 0x28dd8(%rip), %rax     # 0x43bd8
movq %rax, -0x30(%rbp)
movq -0x20(%rbp), %rax
movq 0x30(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x30(%rax)
movq -0x20(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0x1ae50
movq -0x20(%rbp), %rdi
movq -0x28(%rbp), %rsi
movq -0x30(%rbp), %r8
movq -0x18(%rbp), %rdx
movq -0x10(%rbp), %rcx
callq 0x1aea0
andb $0x1, %al
movb %al, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/justy989[P]ce/ce_clangd.c
// Function: ce_clangd_request_goto_def
bool ce_clangd_request_goto_def(CeClangD_t* clangd, CeBuffer_t* buffer, CePoint_t point){
     if(clangd->buffer == NULL){
          return true;
     }
     const char* method = "textDocument/definition";
     clangd->current_request_id++;
     _clangd_track_request(clangd, method);
     return _clangd_request_goto(clangd, buffer, point, method);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdx, -0x18(%rbp)
movq %rcx, -0x10(%rbp)
movq %rdi, -0x20(%rbp)
movq %rsi, -0x28(%rbp)
movq -0x20(%rbp), %rax
cmpq $0x0, 0x28(%rax)
jne 0x1b0a9
movb $0x1, -0x1(%rbp)
jmp 0x1b0ef
leaq 0x28b44(%rip), %rax     # 0x43bf4
movq %rax, -0x30(%rbp)
movq -0x20(%rbp), %rax
movq 0x30(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x30(%rax)
movq -0x20(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0x1ae50
movq -0x20(%rbp), %rdi
movq -0x28(%rbp), %rsi
movq -0x30(%rbp), %r8
movq -0x18(%rbp), %rdx
movq -0x10(%rbp), %rcx
callq 0x1aea0
andb $0x1, %al
movb %al, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/justy989[P]ce/ce_clangd.c
// Function: ce_clangd_request_goto_decl
bool ce_clangd_request_goto_decl(CeClangD_t* clangd, CeBuffer_t* buffer, CePoint_t point){
     if(clangd->buffer == NULL){
          return true;
     }
     const char* method = "textDocument/declaration";
     clangd->current_request_id++;
     _clangd_track_request(clangd, method);
     return _clangd_request_goto(clangd, buffer, point, method);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdx, -0x18(%rbp)
movq %rcx, -0x10(%rbp)
movq %rdi, -0x20(%rbp)
movq %rsi, -0x28(%rbp)
movq -0x20(%rbp), %rax
cmpq $0x0, 0x28(%rax)
jne 0x1b129
movb $0x1, -0x1(%rbp)
jmp 0x1b16f
leaq 0x28adc(%rip), %rax     # 0x43c0c
movq %rax, -0x30(%rbp)
movq -0x20(%rbp), %rax
movq 0x30(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x30(%rax)
movq -0x20(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0x1ae50
movq -0x20(%rbp), %rdi
movq -0x28(%rbp), %rsi
movq -0x30(%rbp), %r8
movq -0x18(%rbp), %rdx
movq -0x10(%rbp), %rcx
callq 0x1aea0
andb $0x1, %al
movb %al, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/justy989[P]ce/ce_clangd.c
// Function: ce_clangd_request_auto_complete
bool ce_clangd_request_auto_complete(CeClangD_t* clangd, CeBuffer_t* buffer, CePoint_t point){
     if(clangd->buffer == NULL){
          return true;
     }
     const char* method = "textDocument/completion";
     clangd->current_request_id++;
     _clangd_track_request(clangd, method);
     return _clangd_request_goto(clangd, buffer, point, method);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdx, -0x18(%rbp)
movq %rcx, -0x10(%rbp)
movq %rdi, -0x20(%rbp)
movq %rsi, -0x28(%rbp)
movq -0x20(%rbp), %rax
cmpq $0x0, 0x28(%rax)
jne 0x1b1a9
movb $0x1, -0x1(%rbp)
jmp 0x1b1ef
leaq 0x28a91(%rip), %rax     # 0x43c41
movq %rax, -0x30(%rbp)
movq -0x20(%rbp), %rax
movq 0x30(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x30(%rax)
movq -0x20(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0x1ae50
movq -0x20(%rbp), %rdi
movq -0x28(%rbp), %rsi
movq -0x30(%rbp), %r8
movq -0x18(%rbp), %rdx
movq -0x10(%rbp), %rcx
callq 0x1aea0
andb $0x1, %al
movb %al, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/justy989[P]ce/ce_clangd.c
// Function: ce_clangd_request_find_references
bool ce_clangd_request_find_references(CeClangD_t* clangd, CeBuffer_t* buffer, CePoint_t point){
     if(clangd->buffer == NULL){
          return true;
     }
     const char* method = "textDocument/references";
     clangd->current_request_id++;
     _clangd_track_request(clangd, method);
     return _clangd_request_goto(clangd, buffer, point, method);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdx, -0x18(%rbp)
movq %rcx, -0x10(%rbp)
movq %rdi, -0x20(%rbp)
movq %rsi, -0x28(%rbp)
movq -0x20(%rbp), %rax
cmpq $0x0, 0x28(%rax)
jne 0x1b229
movb $0x1, -0x1(%rbp)
jmp 0x1b26f
leaq 0x28a29(%rip), %rax     # 0x43c59
movq %rax, -0x30(%rbp)
movq -0x20(%rbp), %rax
movq 0x30(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x30(%rax)
movq -0x20(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0x1ae50
movq -0x20(%rbp), %rdi
movq -0x28(%rbp), %rsi
movq -0x30(%rbp), %r8
movq -0x18(%rbp), %rdx
movq -0x10(%rbp), %rcx
callq 0x1aea0
andb $0x1, %al
movb %al, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/justy989[P]ce/ce_clangd.c
// Function: ce_clangd_pop_response
CeClangDResponse_t ce_clangd_pop_response(CeClangD_t* clangd){
     if(clangd->buffer == NULL){
          return (CeClangDResponse_t){};
     }
     CeClangDResponse_t response = _pop_response(&clangd->response_queue);
     for(int64_t i = 0; i < clangd->request_lookup.size; i++){
          if(clangd->request_lookup.requests[i].id == response.request_id){
               response.method = clangd->request_lookup.requests[i].method;
               _remove_clangd_request(&clangd->request_lookup, i);
               return response;
          }
     }
     return response;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x20(%rbp)
movq %rdi, -0x18(%rbp)
movq %rsi, -0x8(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x28(%rax)
jne 0x1b2d4
movq -0x20(%rbp), %rdi
xorl %esi, %esi
movl $0x18, %edx
callq 0xd290
jmp 0x1b35e
movq -0x20(%rbp), %rdi
movq -0x8(%rbp), %rsi
addq $0x38, %rsi
callq 0x1b370
movq $0x0, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq -0x8(%rbp), %rcx
cmpq 0x70(%rcx), %rax
jge 0x1b35c
movq -0x20(%rbp), %rcx
movq -0x8(%rbp), %rax
movq 0x78(%rax), %rax
movq -0x10(%rbp), %rdx
shlq $0x4, %rdx
addq %rdx, %rax
movq 0x8(%rax), %rax
cmpq (%rcx), %rax
jne 0x1b34c
movq -0x20(%rbp), %rax
movq -0x8(%rbp), %rcx
movq 0x78(%rcx), %rcx
movq -0x10(%rbp), %rdx
shlq $0x4, %rdx
addq %rdx, %rcx
movq (%rcx), %rcx
movq %rcx, 0x10(%rax)
movq -0x8(%rbp), %rdi
addq $0x70, %rdi
movq -0x10(%rbp), %rsi
callq 0x1b490
jmp 0x1b35e
jmp 0x1b34e
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0x1b2ed
jmp 0x1b35e
movq -0x18(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/justy989[P]ce/ce_clangd.c
// Function: pop_response
static CeClangDResponse_t _pop_response(CeClangDResponseQueue_t* queue){
     CeClangDResponse_t result = {};

#if defined(PLATFORM_WINDOWS)
     DWORD wait_result = WaitForSingleObject(queue->mutex, INFINITE);
     if(wait_result != WAIT_OBJECT_0){
          ce_log("Failed to acquire clangd response queue mutex: %d\n", GetLastError());
          return result;
     }
#else
     int rc = pthread_mutex_lock(&queue->mutex);
     if(rc != 0){
         ce_log("Failed to aquire clangd response queue mutex: %s", strerror(rc));
         return result;
     }
#endif
     if(queue->size == 0){
          return result;
     }

     // Copy the element
     result = *queue->elements;

     // Update the queue.
     int64_t new_size = (queue->size - 1);
     // Shift down all of the elements.
     memmove(queue->elements, queue->elements + 1, new_size * sizeof(queue->elements[0]));
     queue->elements = realloc(queue->elements, new_size * sizeof(queue->elements[0]));
     queue->size = new_size;

#if defined(PLATFORM_WINDOWS)
     ReleaseMutex(queue->mutex);
#else
     rc = pthread_mutex_unlock(&queue->mutex);
     if(rc != 0){
         ce_log("Failed to release clangd response queue mutex: %s", strerror(rc));
     }
#endif
     return result;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x28(%rbp)
movq %rdi, %rax
movq %rax, -0x20(%rbp)
movq %rsi, -0x8(%rbp)
xorl %esi, %esi
movl $0x18, %edx
callq 0xd290
movq -0x8(%rbp), %rdi
addq $0x10, %rdi
callq 0xd6e0
movl %eax, -0xc(%rbp)
cmpl $0x0, -0xc(%rbp)
je 0x1b3c7
movl -0xc(%rbp), %edi
callq 0xd630
movq %rax, %rsi
leaq 0x28d16(%rip), %rdi     # 0x440d1
movb $0x0, %al
callq 0xd8f0
jmp 0x1b47e
movq -0x8(%rbp), %rax
cmpq $0x0, (%rax)
jne 0x1b3d6
jmp 0x1b47e
movq -0x28(%rbp), %rax
movq -0x8(%rbp), %rcx
movq 0x8(%rcx), %rcx
movq (%rcx), %rdx
movq %rdx, (%rax)
movq 0x8(%rcx), %rdx
movq %rdx, 0x8(%rax)
movq 0x10(%rcx), %rcx
movq %rcx, 0x10(%rax)
movq -0x8(%rbp), %rax
movq (%rax), %rax
subq $0x1, %rax
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rsi
addq $0x18, %rsi
imulq $0x18, -0x18(%rbp), %rdx
callq 0xd560
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
imulq $0x18, -0x18(%rbp), %rsi
callq 0xd500
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x18(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, (%rax)
movq -0x8(%rbp), %rdi
addq $0x10, %rdi
callq 0xd470
movl %eax, -0xc(%rbp)
cmpl $0x0, -0xc(%rbp)
je 0x1b47c
movl -0xc(%rbp), %edi
callq 0xd630
movq %rax, %rsi
leaq 0x28c8d(%rip), %rdi     # 0x44102
movb $0x0, %al
callq 0xd8f0
jmp 0x1b47e
movq -0x20(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/justy989[P]ce/ce_clangd.c
// Function: remove_clangd_request
static void _remove_clangd_request(CeClangDRequestLookup_t* request_lookup, int64_t index){
     if(index < 0 || index >= request_lookup->size){
          return;
     }
     for(int64_t i = (index + 1); i < request_lookup->size; i++){
          request_lookup->requests[i - 1] = request_lookup->requests[i];
     }
     int64_t new_size = (request_lookup->size - 1);
     request_lookup->requests = realloc(request_lookup->requests,
                                       new_size * sizeof(request_lookup->requests[0]));
     request_lookup->size = new_size;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jl 0x1b4b4
movq -0x10(%rbp), %rax
movq -0x8(%rbp), %rcx
cmpq (%rcx), %rax
jl 0x1b4b9
jmp 0x1b552
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq -0x8(%rbp), %rcx
cmpq (%rcx), %rax
jge 0x1b518
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x18(%rbp), %rcx
subq $0x1, %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq -0x8(%rbp), %rcx
movq 0x8(%rcx), %rcx
movq -0x18(%rbp), %rdx
shlq $0x4, %rdx
addq %rdx, %rcx
movq (%rcx), %rdx
movq %rdx, (%rax)
movq 0x8(%rcx), %rcx
movq %rcx, 0x8(%rax)
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x1b4c5
movq -0x8(%rbp), %rax
movq (%rax), %rax
subq $0x1, %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x20(%rbp), %rsi
shlq $0x4, %rsi
callq 0xd500
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x20(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, (%rax)
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/justy989[P]ce/ce_clangd.c
// Function: ce_clangd_free
void ce_clangd_free(CeClangD_t* clangd){
     if(clangd->buffer == NULL){
          return;
     }
#if defined(PLATFORM_WINDOWS)
     ce_subprocess_kill(&clangd->proc, 0);
     CloseHandle(clangd->thread_handle);
#else
     ce_subprocess_kill(&clangd->proc, SIGINT);
#endif

#if defined(PLATFORM_WINDOWS)
     CloseHandle(clangd->thread_handle);
     CloseHandle(clangd->response_queue.mutex);
#else
     pthread_join(clangd->thread, NULL);
     pthread_mutex_destroy(&clangd->response_queue.mutex);
#endif

     memset(clangd, 0, sizeof(*clangd));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x28(%rax)
jne 0x1b579
jmp 0x1b5bc
movq -0x8(%rbp), %rdi
addq $0x8, %rdi
movl $0x2, %esi
callq 0x2ae60
movq -0x8(%rbp), %rax
movq (%rax), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0xd610
movq -0x8(%rbp), %rdi
addq $0x38, %rdi
addq $0x10, %rdi
callq 0xd240
movq -0x8(%rbp), %rdi
xorl %esi, %esi
movl $0x80, %edx
callq 0xd290
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/justy989[P]ce/ce_clangd.c
// Function: ce_clangd_response_free
void ce_clangd_response_free(CeClangDResponse_t* response){
     if(response->obj == NULL){
          return;
     }
     ce_json_obj_free(response->obj);
     free(response->obj);
     free(response->method);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x8(%rax)
jne 0x1b5e9
jmp 0x1b610
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x25b50
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0xd090
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0xd090
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/justy989[P]ce/ce_clangd.c
// Function: ce_clangd_diag_add
void ce_clangd_diag_add(CeClangDDiagnostics_t* diags, CeClangDDiagnostic_t* elem){
    int64_t new_count = diags->count + 1;
    diags->elements = realloc(diags->elements, new_count * sizeof(diags->elements[0]));
    memcpy(diags->elements + diags->count, elem, sizeof(diags->elements[0]));
    diags->elements[diags->count].message = strdup(elem->message);
    diags->count = new_count;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rdi
imulq $0x28, -0x18(%rbp), %rsi
callq 0xd500
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, (%rax)
movq -0x8(%rbp), %rax
movq (%rax), %rdi
movq -0x8(%rbp), %rax
imulq $0x28, 0x8(%rax), %rax
addq %rax, %rdi
movq -0x10(%rbp), %rsi
movl $0x28, %edx
callq 0xd400
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rdi
callq 0xd620
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq -0x8(%rbp), %rdx
imulq $0x28, 0x8(%rdx), %rdx
addq %rdx, %rax
movq %rcx, 0x20(%rax)
movq -0x18(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x8(%rax)
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/justy989[P]ce/ce_clangd.c
// Function: ce_clangd_diag_free
void ce_clangd_diag_free(CeClangDDiagnostics_t* diags){
    for(int64_t i = 0; i < diags->count; i++){
        free(diags->elements[i].message);
    }
    free(diags->elements);
    free(diags->filepath);
    memset(diags, 0, sizeof(*diags));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq $0x0, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq -0x8(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jge 0x1b708
movq -0x8(%rbp), %rax
movq (%rax), %rax
imulq $0x28, -0x10(%rbp), %rcx
addq %rcx, %rax
movq 0x20(%rax), %rdi
callq 0xd090
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0x1b6d4
movq -0x8(%rbp), %rax
movq (%rax), %rdi
callq 0xd090
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0xd090
movq -0x8(%rbp), %rdi
xorl %esi, %esi
movl $0x18, %edx
callq 0xd290
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/justy989[P]ce/ce_clangd.c
// Function: parse_response_complete
static bool _parse_response_complete(ParseResponse_t* parse){
     if(parse->message_body != NULL &&
        (int64_t)(strlen(parse->message_body)) == parse->message_body_size){
          return true;
     }
     return false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x108(%rax)
je 0x1ba5d
movq -0x10(%rbp), %rax
movq 0x108(%rax), %rdi
callq 0xd200
movq -0x10(%rbp), %rcx
cmpq 0x100(%rcx), %rax
jne 0x1ba5d
movb $0x1, -0x1(%rbp)
jmp 0x1ba61
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/justy989[P]ce/ce_clangd.c
// Function: parse_response_free
static void _parse_response_free(ParseResponse_t* parse){
     memset(parse->header, 0, MAX_HEADER_SIZE);
     if(parse->message_body){
          parse->message_body_size = 0;
          free(parse->message_body);
          parse->message_body = NULL;
     }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
addq $0x80, %rdi
xorl %esi, %esi
movl $0x80, %edx
callq 0xd290
movq -0x8(%rbp), %rax
cmpq $0x0, 0x108(%rax)
je 0x1bc2f
movq -0x8(%rbp), %rax
movq $0x0, 0x100(%rax)
movq -0x8(%rbp), %rax
movq 0x108(%rax), %rdi
callq 0xd090
movq -0x8(%rbp), %rax
movq $0x0, 0x108(%rax)
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/justy989[P]ce/ce_clangd.c
// Function: alloc_clangd_request
static CeClangDRequest_t* _alloc_clangd_request(CeClangDRequestLookup_t* request_lookup){
     int64_t new_size = request_lookup->size + 1;
     request_lookup->requests = realloc(request_lookup->requests,
                                        new_size * sizeof(request_lookup->requests[0]));
     memset(request_lookup->requests + request_lookup->size, 0, sizeof(request_lookup->requests[0]));
     CeClangDRequest_t* new_request = request_lookup->requests + request_lookup->size;
     request_lookup->size = new_size;
     return new_request;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x10(%rbp), %rsi
shlq $0x4, %rsi
callq 0xd500
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x8(%rbp), %rax
movq (%rax), %rax
shlq $0x4, %rax
addq %rax, %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0xd290
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x8(%rbp), %rcx
movq (%rcx), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, (%rax)
movq -0x18(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/justy989[P]ce/ce_command.c
// Function: eat_blanks
static const char* eat_blanks(const char* string){
     while(*string){
          if(!isblank((int)(*string))) break;
          string++;
     }

     return string;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
cmpb $0x0, (%rax)
je 0x1c093
callq 0xd700
movq (%rax), %rax
movq -0x8(%rbp), %rcx
movsbl (%rcx), %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x1, %eax
cmpl $0x0, %eax
jne 0x1c085
jmp 0x1c093
movq -0x8(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x8(%rbp)
jmp 0x1c05c
movq -0x8(%rbp), %rax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/justy989[P]ce/ce_command.c
// Function: find_end_of_arg
static const char* find_end_of_arg(const char* string){
     bool quote = (*string == '"');

     if(quote){
          // find the next quote, ignoring backslashed quotes
          char prev = 0;
          while(*string){
               prev = *string;
               string++;
               if(*string == '"' && prev != '\\'){
                    const char* end = string + 1;
                    if(*end) return end;
                    return NULL;
               }
          }
          return NULL;
     }else{
          return strchr(string, ' ');
     }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x22, %eax
sete %al
andb $0x1, %al
movb %al, -0x11(%rbp)
testb $0x1, -0x11(%rbp)
je 0x1c130
movb $0x0, -0x12(%rbp)
movq -0x10(%rbp), %rax
cmpb $0x0, (%rax)
je 0x1c126
movq -0x10(%rbp), %rax
movb (%rax), %al
movb %al, -0x12(%rbp)
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x22, %eax
jne 0x1c124
movsbl -0x12(%rbp), %eax
cmpl $0x5c, %eax
je 0x1c124
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
cmpb $0x0, (%rax)
je 0x1c11a
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x1c142
movq $0x0, -0x8(%rbp)
jmp 0x1c142
jmp 0x1c0c8
movq $0x0, -0x8(%rbp)
jmp 0x1c142
movq -0x10(%rbp), %rdi
movl $0x20, %esi
callq 0xd220
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/justy989[P]ce/ce_command.c
// Function: ce_command_free
void ce_command_free(CeCommand_t* command){
     memset(command, 0, CE_COMMAND_NAME_MAX_LEN);

     for(int64_t i = 0; i < command->arg_count; ++i){
          if(command->args[i].type == CE_COMMAND_ARG_STRING){
               free(command->args[i].string);
          }
     }

     free(command->args);
     command->args = NULL;
     command->arg_count = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
xorl %esi, %esi
movl $0x200, %edx            # imm = 0x200
callq 0xd290
movq $0x0, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq -0x8(%rbp), %rcx
cmpq 0x208(%rcx), %rax
jge 0x1c36f
movq -0x8(%rbp), %rax
movq 0x200(%rax), %rax
movq -0x10(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
cmpl $0x2, (%rax)
jne 0x1c35f
movq -0x8(%rbp), %rax
movq 0x200(%rax), %rax
movq -0x10(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rdi
callq 0xd090
jmp 0x1c361
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0x1c314
movq -0x8(%rbp), %rax
movq 0x200(%rax), %rdi
callq 0xd090
movq -0x8(%rbp), %rax
movq $0x0, 0x200(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x208(%rax)
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/justy989[P]ce/ce_command.c
// Function: ce_command_log
void ce_command_log(CeCommand_t* command){
     ce_log("command: '%s', %ld args\n", command->name, command->arg_count);

     for(int64_t i = 0; i < command->arg_count; ++i){
          CeCommandArg_t* arg = command->args + i;
          switch(arg->type){
          default:
               break;
          case CE_COMMAND_ARG_INTEGER:
               ce_log("  %ld\n", arg->integer);
               break;
          case CE_COMMAND_ARG_DECIMAL:
               ce_log("  %f\n", arg->decimal);
               break;
          case CE_COMMAND_ARG_STRING:
               ce_log("  '%s'\n", arg->string);
               break;
          }
     }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rsi
movq -0x8(%rbp), %rax
movq 0x208(%rax), %rdx
leaq 0x27dca(%rip), %rdi     # 0x4419c
movb $0x0, %al
callq 0xd8f0
movq $0x0, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq -0x8(%rbp), %rcx
cmpq 0x208(%rcx), %rax
jge 0x1c48f
movq -0x8(%rbp), %rax
movq 0x200(%rax), %rax
movq -0x10(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x1c(%rbp)
testl %eax, %eax
je 0x1c435
jmp 0x1c41f
movl -0x1c(%rbp), %eax
subl $0x1, %eax
je 0x1c44d
jmp 0x1c429
movl -0x1c(%rbp), %eax
subl $0x2, %eax
je 0x1c466
jmp 0x1c433
jmp 0x1c47c
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rsi
leaq 0x27d71(%rip), %rdi     # 0x441b5
movb $0x0, %al
callq 0xd8f0
jmp 0x1c47c
movq -0x18(%rbp), %rax
movsd 0x8(%rax), %xmm0
leaq 0x27d5f(%rip), %rdi     # 0x441bc
movb $0x1, %al
callq 0xd8f0
jmp 0x1c47c
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rsi
leaq 0x27d4d(%rip), %rdi     # 0x441c2
movb $0x0, %al
callq 0xd8f0
jmp 0x1c47e
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0x1c3e1
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop
// File: /workspace/github_c_makefile_star2_O0/justy989[P]ce/ce_commands.c
// Function: command_quit
CeCommandStatus_t command_quit(CeCommand_t* command, void* user_data){
     if(command->arg_count != 0) return CE_COMMAND_PRINT_HELP;

     CeApp_t* app = user_data;
     CommandContext_t command_context = {};

     if(!get_command_context(app, &command_context)) return CE_COMMAND_NO_ACTION;

     bool unsaved_buffers = false;
     CeBufferNode_t* itr = app->buffer_node_head;
     while(itr){
          if(itr->buffer->status == CE_BUFFER_STATUS_MODIFIED && itr->buffer != app->input_view.buffer){
               unsaved_buffers = true;
               break;
          }
          itr = itr->next;
     }

     if(unsaved_buffers){
          ce_view_switch_buffer(command_context.view, app->buffer_list_buffer, &app->vim,
                                &app->config_options, true);
          ce_app_input(app, UNSAVED_BUFFERS_DIALOGUE, unsaved_buffers_input_complete_func);
     }else{
          app->quit = true;
     }

     return CE_COMMAND_SUCCESS;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x208(%rax)
je 0x1c4da
movl $0x2, -0x4(%rbp)
jmp 0x1c5bc
movq -0x18(%rbp), %rax
movq %rax, -0x20(%rbp)
leaq -0x30(%rbp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0xd290
movq -0x20(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x1c5d0
testb $0x1, %al
jne 0x1c50f
movl $0x3, -0x4(%rbp)
jmp 0x1c5bc
movb $0x0, -0x31(%rbp)
movq -0x20(%rbp), %rax
movq 0x2828(%rax), %rax
movq %rax, -0x40(%rbp)
cmpq $0x0, -0x40(%rbp)
je 0x1c55e
movq -0x40(%rbp), %rax
movq (%rax), %rax
cmpl $0x1, 0x18(%rax)
jne 0x1c550
movq -0x40(%rbp), %rax
movq (%rax), %rax
movq -0x20(%rbp), %rcx
cmpq 0x2748(%rcx), %rax
je 0x1c550
movb $0x1, -0x31(%rbp)
jmp 0x1c55e
movq -0x40(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x40(%rbp)
jmp 0x1c522
testb $0x1, -0x31(%rbp)
je 0x1c5aa
movq -0x28(%rbp), %rdi
movq -0x20(%rbp), %rax
movq 0x2848(%rax), %rsi
movq -0x20(%rbp), %rdx
addq $0x20, %rdx
movq -0x20(%rbp), %rcx
addq $0x1a50, %rcx           # imm = 0x1A50
movl $0x1, %r8d
callq 0x13c50
movq -0x20(%rbp), %rdi
leaq 0x27c2e(%rip), %rsi     # 0x441ca
leaq -0x4533(%rip), %rdx     # 0x18070
callq 0x15c60
jmp 0x1c5b5
movq -0x20(%rbp), %rax
movb $0x1, 0x2c78(%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/justy989[P]ce/ce_commands.c
// Function: get_command_context
static bool get_command_context(CeApp_t* app, CommandContext_t* command_context){
     command_context->tab_layout = app->tab_list_layout->tab_list.current;

     if(app->input_complete_func) return false;

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

     return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x2818(%rax), %rax
movq 0x10(%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x27f8(%rax)
je 0x1c606
movb $0x0, -0x1(%rbp)
jmp 0x1c637
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq 0x10(%rax), %rax
cmpl $0x0, (%rax)
jne 0x1c633
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq 0x10(%rax), %rcx
addq $0x8, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x8(%rax)
movb $0x1, -0x1(%rbp)
jmp 0x1c637
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/justy989[P]ce/ce_commands.c
// Function: get_view_info_from_tab
static bool get_view_info_from_tab(CeLayout_t* tab_layout, CeView_t** view, CeRect_t* view_rect){
     if(tab_layout->tab.current->type == CE_LAYOUT_TYPE_VIEW){
          *view = &tab_layout->tab.current->view;
     }else if(tab_layout->tab.current->type == CE_LAYOUT_TYPE_LIST){
          *view_rect = tab_layout->list.rect;
     }else if(tab_layout->tab.current->type == CE_LAYOUT_TYPE_TAB){
          *view_rect = tab_layout->tab.rect;
     }else{
          return false;
     }

     return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
cmpl $0x0, (%rax)
jne 0x1cb22
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rcx
addq $0x8, %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
jmp 0x1cb98
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
cmpl $0x1, (%rax)
jne 0x1cb58
movq -0x20(%rbp), %rax
movq -0x10(%rbp), %rcx
movq 0x20(%rcx), %rdx
movq %rdx, (%rax)
movq 0x28(%rcx), %rdx
movq %rdx, 0x8(%rax)
movq 0x30(%rcx), %rdx
movq %rdx, 0x10(%rax)
movq 0x38(%rcx), %rcx
movq %rcx, 0x18(%rax)
jmp 0x1cb96
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
cmpl $0x2, (%rax)
jne 0x1cb8e
movq -0x20(%rbp), %rax
movq -0x10(%rbp), %rcx
movq 0x18(%rcx), %rdx
movq %rdx, (%rax)
movq 0x20(%rcx), %rdx
movq %rdx, 0x8(%rax)
movq 0x28(%rcx), %rdx
movq %rdx, 0x10(%rax)
movq 0x30(%rcx), %rcx
movq %rcx, 0x18(%rax)
jmp 0x1cb94
movb $0x0, -0x1(%rbp)
jmp 0x1cb9c
jmp 0x1cb96
jmp 0x1cb98
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/justy989[P]ce/ce_commands.c
// Function: command_save_buffer
CeCommandStatus_t command_save_buffer(CeCommand_t* command, void* user_data){
     if(command->arg_count != 0) return CE_COMMAND_PRINT_HELP;

     CeApp_t* app = user_data;
     CommandContext_t command_context = {};

     if(!get_command_context(app, &command_context)) return CE_COMMAND_NO_ACTION;

     try_save_buffer(app, command_context.view->buffer);

     return CE_COMMAND_SUCCESS;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x208(%rax)
je 0x1cbd7
movl $0x2, -0x4(%rbp)
jmp 0x1cc21
movq -0x18(%rbp), %rax
movq %rax, -0x20(%rbp)
leaq -0x30(%rbp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0xd290
movq -0x20(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x1c5d0
testb $0x1, %al
jne 0x1cc09
movl $0x3, -0x4(%rbp)
jmp 0x1cc21
movq -0x20(%rbp), %rdi
movq -0x28(%rbp), %rax
movq 0x40(%rax), %rsi
callq 0x1cc30
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/justy989[P]ce/ce_commands.c
// Function: try_save_buffer
static bool try_save_buffer(CeApp_t* app, CeBuffer_t* buffer){
     struct stat statbuf;
     if(stat(buffer->name, &statbuf) == 0){
          if(statbuf.st_mtime > buffer->file_modified_time){
               ce_app_input(app, BUFFER_MODIFIED_OUTSIDE_EDITOR, buffer_modified_outside_editor_complete_func);
               return false;
          }
     }
     if(app->user_config.save_func){
         app->user_config.save_func(app, buffer);
     }
     return ce_buffer_save(buffer);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xb0, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rdi
leaq -0xa8(%rbp), %rsi
callq 0xd3d0
cmpl $0x0, %eax
jne 0x1cc89
movq -0x50(%rbp), %rax
movq -0x18(%rbp), %rcx
cmpq 0x68(%rcx), %rax
jle 0x1cc87
movq -0x10(%rbp), %rdi
leaq 0x2789e(%rip), %rsi     # 0x44513
leaq -0x4b9c(%rip), %rdx     # 0x180e0
callq 0x15c60
movb $0x0, -0x1(%rbp)
jmp 0x1ccba
jmp 0x1cc89
movq -0x10(%rbp), %rax
cmpq $0x0, 0x2ca0(%rax)
je 0x1ccac
movq -0x10(%rbp), %rax
movq 0x2ca0(%rax), %rax
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq *%rax
movq -0x18(%rbp), %rdi
callq 0xe7d0
andb $0x1, %al
movb %al, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0xb0, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/justy989[P]ce/ce_commands.c
// Function: command_save_all_and_quit
CeCommandStatus_t command_save_all_and_quit(CeCommand_t* command, void* user_data){
     if(command->arg_count != 0) return CE_COMMAND_PRINT_HELP;

     CeApp_t* app = user_data;

     CeBufferNode_t* itr = app->buffer_node_head;
     while(itr){
          if(itr->buffer->status == CE_BUFFER_STATUS_MODIFIED){
               if(!try_save_buffer(app, itr->buffer)){
                    return CE_COMMAND_SUCCESS;
               }
          }
          itr = itr->next;
     }

     return command_quit(command, user_data);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x208(%rax)
je 0x1ccf7
movl $0x2, -0x4(%rbp)
jmp 0x1cd5f
movq -0x18(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq 0x2828(%rax), %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0x1cd4f
movq -0x28(%rbp), %rax
movq (%rax), %rax
cmpl $0x1, 0x18(%rax)
jne 0x1cd41
movq -0x20(%rbp), %rdi
movq -0x28(%rbp), %rax
movq (%rax), %rsi
callq 0x1cc30
testb $0x1, %al
jne 0x1cd3f
movl $0x0, -0x4(%rbp)
jmp 0x1cd5f
jmp 0x1cd41
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x28(%rbp)
jmp 0x1cd0e
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x1c4b0
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/justy989[P]ce/ce_commands.c
// Function: command_show_info_buffer
CeCommandStatus_t command_show_info_buffer(CeCommand_t* command, void* user_data, CeBuffer_t* buffer){
     if(command->arg_count != 0) return CE_COMMAND_PRINT_HELP;
     CeApp_t* app = user_data;
     CommandContext_t command_context = {};
     if(!get_command_context(app, &command_context)) return CE_COMMAND_NO_ACTION;
     ce_view_switch_buffer(command_context.view, buffer, &app->vim, &app->config_options, true);
     return CE_COMMAND_SUCCESS;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x208(%rax)
je 0x1cd9b
movl $0x2, -0x4(%rbp)
jmp 0x1cdfa
movq -0x18(%rbp), %rax
movq %rax, -0x28(%rbp)
leaq -0x38(%rbp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0xd290
movq -0x28(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x1c5d0
testb $0x1, %al
jne 0x1cdcd
movl $0x3, -0x4(%rbp)
jmp 0x1cdfa
movq -0x30(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x28(%rbp), %rdx
addq $0x20, %rdx
movq -0x28(%rbp), %rcx
addq $0x1a50, %rcx           # imm = 0x1A50
movl $0x1, %r8d
callq 0x13c50
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)