// File: /workspace/github_c_makefile_star2_O1/justy989[P]ce/ce_clangd.c
// Function: ce_clangd_file_report_changes
bool ce_clangd_file_report_changes(CeClangD_t* clangd, CeBuffer_t* buffer, CeBufferChangeNode_t* last_change){
     if(clangd->buffer == NULL){
          return true;
     }
     if(last_change == buffer->change_node){
          return true;
     }

     // TODO: We could take this as a parameter rather than calculating it each time.
     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/didChange");
     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);

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

     CeJsonObj_t content_change_obj = {};
     ce_json_obj_set_string(&content_change_obj, "text", sanitized_buffer_str);

     CeJsonArray_t content_changes_array = {};
     ce_json_array_add_obj(&content_changes_array, &content_change_obj);

     ce_json_obj_set_array(&param_obj, "contentChanges", &content_changes_array);
     ce_json_obj_set_obj(&obj, "params", &param_obj);

     bool result = _send_json_obj(&obj, &clangd->proc);
     free(buffer_str);
     free(sanitized_buffer_str);
     ce_json_array_free(&content_changes_array);
     ce_json_obj_free(&content_change_obj);
     ce_json_obj_free(&param_obj);
     ce_json_obj_free(&text_document_obj);
     ce_json_obj_free(&obj);
     return result;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x458, %rsp            # imm = 0x458
movb $0x1, %bl
cmpq $0x0, 0x28(%rdi)
je 0x15e4c
movq %rsi, %r13
cmpq %rdx, 0x40(%rsi)
je 0x15e4c
movq %rdi, %r14
movq 0x10(%r13), %rdi
leaq 0x50(%rsp), %rbx
movq %rbx, %rsi
callq 0x15b87
xorps %xmm0, %xmm0
movq %rsp, %r15
movaps %xmm0, (%r15)
leaq 0x1a321(%rip), %rsi     # 0x30049
leaq 0x1a322(%rip), %rdx     # 0x30051
movq %r15, %rdi
callq 0x1c108
leaq 0x19f80(%rip), %rsi     # 0x2fcbe
leaq 0x1a3b9(%rip), %rdx     # 0x300fe
movq %r15, %rdi
callq 0x1c108
leaq 0x20(%rsp), %r15
xorps %xmm0, %xmm0
movaps %xmm0, (%r15)
leaq 0x19ea1(%rip), %rsi     # 0x2fc01
movq %r15, %rdi
movq %rbx, %rdx
callq 0x1c108
leaq 0x40(%rsp), %rdi
xorps %xmm0, %xmm0
movaps %xmm0, (%rdi)
leaq 0x1a35e(%rip), %rsi     # 0x300db
movq %rdi, %rbx
movq %r15, %rdx
callq 0x1be07
movq %r13, %rdi
callq 0xf9e0
movq %rax, %rbp
movq %rax, %rdi
callq 0x15843
movq %rax, %r15
leaq 0x10(%rsp), %r13
xorps %xmm0, %xmm0
movaps %xmm0, (%r13)
leaq 0x1a324(%rip), %rsi     # 0x300d6
movq %r13, %rdi
movq %rax, %rdx
callq 0x1c108
leaq 0x30(%rsp), %r12
xorps %xmm0, %xmm0
movaps %xmm0, (%r12)
movq %r12, %rdi
movq %r13, %rsi
callq 0x1bb24
leaq 0x1a339(%rip), %rsi     # 0x30115
movq %rbx, %r13
movq %rbx, %rdi
movq %r12, %rdx
callq 0x1beea
leaq 0x19e09(%rip), %rsi     # 0x2fbfa
movq %rsp, %rbx
movq %rbx, %rdi
movq %r13, %rdx
callq 0x1be07
addq $0x8, %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1594a
movl %eax, %ebx
movq %rbp, %rdi
callq 0xd090
movq %r15, %rdi
callq 0xd090
movq %r12, %rdi
callq 0x1bdc3
leaq 0x10(%rsp), %rdi
callq 0x1c2e8
movq %r13, %rdi
callq 0x1c2e8
leaq 0x20(%rsp), %rdi
callq 0x1c2e8
movq %rsp, %rdi
callq 0x1c2e8
movl %ebx, %eax
addq $0x458, %rsp            # imm = 0x458
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq