// File: /workspace/github_c_makefile_star2_O2/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 0x14e49
movq %rsi, %r14
movq 0x58(%rsi), %rax
movq 0x600(%rax), %rax
cmpq 0x24257(%rip), %rax     # 0x38f60
sete %cl
cmpq 0x24245(%rip), %rax     # 0x38f58
sete %al
orb %cl, %al
je 0x14e37
movq %rdi, %rbx
movq 0x10(%r14), %rdi
leaq 0x40(%rsp), %rbp
movq %rbp, %rsi
callq 0x14e5d
movq %r14, %rdi
callq 0xf570
movq %rax, 0x8(%rsp)
movq %rax, %rdi
callq 0x14b24
movq %rax, %r15
xorps %xmm0, %xmm0
leaq 0x30(%rsp), %r12
movaps %xmm0, (%r12)
leaq 0x172eb(%rip), %rsi     # 0x2c049
leaq 0x172ec(%rip), %rdx     # 0x2c051
movq %r12, %rdi
callq 0x1ab25
leaq 0x16f4c(%rip), %rsi     # 0x2bcc0
leaq 0x1733b(%rip), %rdx     # 0x2c0b6
movq %r12, %rdi
callq 0x1ab25
leaq 0x20(%rsp), %r13
xorps %xmm0, %xmm0
movaps %xmm0, (%r13)
leaq 0x16e6c(%rip), %rsi     # 0x2bc03
movq %r13, %rdi
movq %rbp, %rdx
callq 0x1ab25
leaq 0x17322(%rip), %rsi     # 0x2c0cb
leaq 0x17878(%rip), %rdx     # 0x2c628
movq %r13, %rdi
callq 0x1ab25
leaq 0x17317(%rip), %rsi     # 0x2c0d6
movq %r13, %rdi
movq %r15, %rdx
callq 0x1ab25
leaq 0x10(%rsp), %r14
xorps %xmm0, %xmm0
movaps %xmm0, (%r14)
leaq 0x172fe(%rip), %rsi     # 0x2c0db
movq %r14, %rdi
movq %r13, %rdx
callq 0x1a949
leaq 0x16e0d(%rip), %rsi     # 0x2bbfc
movq %r12, %rdi
movq %r14, %rdx
callq 0x1a949
addq $0x8, %rbx
movq %r12, %rdi
movq %rbx, %rsi
callq 0x14c22
movl %eax, %ebp
movq %r14, %rdi
callq 0x1ad0b
movq %r13, %rdi
callq 0x1ad0b
movq %r12, %rdi
callq 0x1ad0b
movq %r15, %rdi
callq 0xd090
movq 0x8(%rsp), %rdi
callq 0xd090
jmp 0x14e49
movq 0x10(%r14), %rsi
leaq 0x1725c(%rip), %rdi     # 0x2c09e
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