// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x480, %rsp            # imm = 0x480
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x28(%rax)
jne 0x1a787
movb $0x1, -0x1(%rbp)
jmp 0x1a975
movq -0x18(%rbp), %rax
movq 0x58(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
leaq 0x11392(%rip), %rcx     # 0x2bb30
cmpq %rcx, 0x600(%rax)
je 0x1a7da
movq -0x20(%rbp), %rax
leaq 0x1258e(%rip), %rcx     # 0x2cd40
cmpq %rcx, 0x600(%rax)
je 0x1a7da
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rsi
leaq 0x29856(%rip), %rdi     # 0x44020
movb $0x0, %al
callq 0xd230
movb $0x1, -0x1(%rbp)
jmp 0x1a975
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rdi
leaq -0x430(%rbp), %rsi
movl $0x400, %edx            # imm = 0x400
callq 0x1a990
testb $0x1, %al
jne 0x1a800
movb $0x0, -0x1(%rbp)
jmp 0x1a975
movq -0x18(%rbp), %rdi
callq 0x10cf0
movq %rax, -0x438(%rbp)
movq -0x438(%rbp), %rdi
callq 0x1a350
movq %rax, -0x440(%rbp)
leaq -0x450(%rbp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0xd290
leaq -0x450(%rbp), %rdi
leaq 0x29787(%rip), %rsi     # 0x43fcb
leaq 0x29788(%rip), %rdx     # 0x43fd3
callq 0x25860
leaq -0x450(%rbp), %rdi
leaq 0x29413(%rip), %rsi     # 0x43c71
leaq 0x297d3(%rip), %rdx     # 0x44038
callq 0x25860
leaq -0x460(%rbp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0xd290
leaq -0x430(%rbp), %rdx
leaq -0x460(%rbp), %rdi
leaq 0x29322(%rip), %rsi     # 0x43bb4
callq 0x25860
leaq -0x460(%rbp), %rdi
leaq 0x297a8(%rip), %rsi     # 0x4404d
leaq 0x29d1a(%rip), %rdx     # 0x445c6
callq 0x25860
movq -0x440(%rbp), %rdx
leaq -0x460(%rbp), %rdi
leaq 0x29792(%rip), %rsi     # 0x44058
callq 0x25860
leaq -0x470(%rbp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0xd290
leaq -0x470(%rbp), %rdi
leaq 0x29771(%rip), %rsi     # 0x4405d
leaq -0x460(%rbp), %rdx
callq 0x25560
leaq -0x450(%rbp), %rdi
leaq 0x292a7(%rip), %rsi     # 0x43bad
leaq -0x470(%rbp), %rdx
callq 0x25560
movq -0x10(%rbp), %rsi
addq $0x8, %rsi
leaq -0x450(%rbp), %rdi
callq 0x1a680
andb $0x1, %al
movb %al, -0x471(%rbp)
leaq -0x470(%rbp), %rdi
callq 0x25b50
leaq -0x460(%rbp), %rdi
callq 0x25b50
leaq -0x450(%rbp), %rdi
callq 0x25b50
movq -0x440(%rbp), %rdi
callq 0xd090
movq -0x438(%rbp), %rdi
callq 0xd090
movb -0x471(%rbp), %al
andb $0x1, %al
movb %al, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x480, %rsp            # imm = 0x480
popq %rbp
retq
nopw %cs:(%rax,%rax)