// File: /workspace/github_c_makefile_star2_O1/justy989[P]ce/ce_clangd.c
// Function: ce_clangd_file_open
bool ce_clangd_file_open(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){
          printf("skipping %s for clangd\n", buffer->name);
          return true;
     }
     char file_uri[MAX_PATH_LEN + 1];
     if(!_calculate_filename_uri(buffer->name, file_uri, MAX_PATH_LEN)){
          return false;
     }

     char* buffer_str = ce_buffer_dupe(buffer);
     char* sanitized_buffer_str = _convert_string_to_json_string(buffer_str);

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

     CeJsonObj_t text_document_obj = {};
     ce_json_obj_set_string(&text_document_obj, "uri", file_uri);
     ce_json_obj_set_string(&text_document_obj, "languageId", "c");
     ce_json_obj_set_string(&text_document_obj, "text", sanitized_buffer_str);
     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);
     free(sanitized_buffer_str);
     free(buffer_str);
     return result;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x448, %rsp            # imm = 0x448
movb $0x1, %bpl
cmpq $0x0, 0x28(%rdi)
je 0x15b73
movq %rsi, %r14
movq 0x58(%rsi), %rax
movq 0x600(%rax), %rax
cmpq 0x2552d(%rip), %rax     # 0x3af60
sete %cl
cmpq 0x2551b(%rip), %rax     # 0x3af58
sete %al
orb %cl, %al
je 0x15b61
movq %rdi, %rbx
movq 0x10(%r14), %rdi
leaq 0x40(%rsp), %rbp
movq %rbp, %rsi
callq 0x15b87
movq %r14, %rdi
callq 0xf9e0
movq %rax, 0x8(%rsp)
movq %rax, %rdi
callq 0x15843
movq %rax, %r15
xorps %xmm0, %xmm0
leaq 0x30(%rsp), %r12
movaps %xmm0, (%r12)
leaq 0x1a5c1(%rip), %rsi     # 0x30049
leaq 0x1a5c2(%rip), %rdx     # 0x30051
movq %r12, %rdi
callq 0x1c108
leaq 0x1a220(%rip), %rsi     # 0x2fcbe
leaq 0x1a611(%rip), %rdx     # 0x300b6
movq %r12, %rdi
callq 0x1c108
leaq 0x20(%rsp), %r13
xorps %xmm0, %xmm0
movaps %xmm0, (%r13)
leaq 0x1a140(%rip), %rsi     # 0x2fc01
movq %r13, %rdi
movq %rbp, %rdx
callq 0x1c108
leaq 0x1a5f8(%rip), %rsi     # 0x300cb
leaq 0x1ab6c(%rip), %rdx     # 0x30646
movq %r13, %rdi
callq 0x1c108
leaq 0x1a5ed(%rip), %rsi     # 0x300d6
movq %r13, %rdi
movq %r15, %rdx
callq 0x1c108
leaq 0x10(%rsp), %r14
xorps %xmm0, %xmm0
movaps %xmm0, (%r14)
leaq 0x1a5d4(%rip), %rsi     # 0x300db
movq %r14, %rdi
movq %r13, %rdx
callq 0x1be07
leaq 0x1a0e1(%rip), %rsi     # 0x2fbfa
movq %r12, %rdi
movq %r14, %rdx
callq 0x1be07
addq $0x8, %rbx
movq %r12, %rdi
movq %rbx, %rsi
callq 0x1594a
movl %eax, %ebp
movq %r14, %rdi
callq 0x1c2e8
movq %r13, %rdi
callq 0x1c2e8
movq %r12, %rdi
callq 0x1c2e8
movq %r15, %rdi
callq 0xd090
movq 0x8(%rsp), %rdi
callq 0xd090
jmp 0x15b73
movq 0x10(%r14), %rsi
leaq 0x1a532(%rip), %rdi     # 0x3009e
xorl %eax, %eax
callq 0xd240
movl %ebp, %eax
addq $0x448, %rsp            # imm = 0x448
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq