// File: /workspace/github_c_makefile_star2_O3/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 0x15ab4
movq %rsi, %r13
cmpq %rdx, 0x40(%rsi)
je 0x15ab4
movq %rdi, %r14
movq 0x10(%r13), %rdi
leaq 0x50(%rsp), %rbx
movq %rbx, %rsi
callq 0x157ef
xorps %xmm0, %xmm0
movq %rsp, %r15
movaps %xmm0, (%r15)
leaq 0x196b9(%rip), %rsi     # 0x2f049
leaq 0x196ba(%rip), %rdx     # 0x2f051
movq %r15, %rdi
callq 0x1c4b8
leaq 0x1931a(%rip), %rsi     # 0x2ecc0
leaq 0x19751(%rip), %rdx     # 0x2f0fe
movq %r15, %rdi
callq 0x1c4b8
leaq 0x20(%rsp), %r15
xorps %xmm0, %xmm0
movaps %xmm0, (%r15)
leaq 0x1923b(%rip), %rsi     # 0x2ec03
movq %r15, %rdi
movq %rbx, %rdx
callq 0x1c4b8
leaq 0x40(%rsp), %rdi
xorps %xmm0, %xmm0
movaps %xmm0, (%rdi)
leaq 0x196f6(%rip), %rsi     # 0x2f0db
movq %rdi, %rbx
movq %r15, %rdx
callq 0x1c1a3
movq %r13, %rdi
callq 0xf88b
movq %rax, %rbp
movq %rax, %rdi
callq 0x154a4
movq %rax, %r15
leaq 0x10(%rsp), %r13
xorps %xmm0, %xmm0
movaps %xmm0, (%r13)
leaq 0x196bc(%rip), %rsi     # 0x2f0d6
movq %r13, %rdi
movq %rax, %rdx
callq 0x1c4b8
leaq 0x30(%rsp), %r12
xorps %xmm0, %xmm0
movaps %xmm0, (%r12)
movq %r12, %rdi
movq %r13, %rsi
callq 0x1bec0
leaq 0x196d1(%rip), %rsi     # 0x2f115
movq %rbx, %r13
movq %rbx, %rdi
movq %r12, %rdx
callq 0x1c296
leaq 0x191a3(%rip), %rsi     # 0x2ebfc
movq %rsp, %rbx
movq %rbx, %rdi
movq %r13, %rdx
callq 0x1c1a3
addq $0x8, %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x155b2
movl %eax, %ebx
movq %rbp, %rdi
callq 0xd090
movq %r15, %rdi
callq 0xd090
movq %r12, %rdi
callq 0x1c15f
leaq 0x10(%rsp), %rdi
callq 0x1c6aa
movq %r13, %rdi
callq 0x1c6aa
leaq 0x20(%rsp), %rdi
callq 0x1c6aa
movq %rsp, %rdi
callq 0x1c6aa
movl %ebx, %eax
addq $0x458, %rsp            # imm = 0x458
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq