// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x4a0, %rsp            # imm = 0x4A0
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x28(%rax)
jne 0x1abbb
movb $0x1, -0x1(%rbp)
jmp 0x1adbe
movq -0x20(%rbp), %rax
movq -0x18(%rbp), %rcx
cmpq 0x40(%rcx), %rax
jne 0x1abd2
movb $0x1, -0x1(%rbp)
jmp 0x1adbe
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rdi
leaq -0x430(%rbp), %rsi
movl $0x400, %edx            # imm = 0x400
callq 0x1a990
testb $0x1, %al
jne 0x1abf8
movb $0x0, -0x1(%rbp)
jmp 0x1adbe
leaq -0x440(%rbp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0xd290
leaq -0x440(%rbp), %rdi
leaq 0x293b2(%rip), %rsi     # 0x43fcb
leaq 0x293b3(%rip), %rdx     # 0x43fd3
callq 0x25860
leaq -0x440(%rbp), %rdi
leaq 0x2903e(%rip), %rsi     # 0x43c71
leaq 0x29446(%rip), %rdx     # 0x44080
callq 0x25860
leaq -0x450(%rbp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0xd290
leaq -0x430(%rbp), %rdx
leaq -0x450(%rbp), %rdi
leaq 0x28f4d(%rip), %rsi     # 0x43bb4
callq 0x25860
leaq -0x460(%rbp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0xd290
leaq -0x460(%rbp), %rdi
leaq 0x293d0(%rip), %rsi     # 0x4405d
leaq -0x450(%rbp), %rdx
callq 0x25560
movq -0x18(%rbp), %rdi
callq 0x10cf0
movq %rax, -0x468(%rbp)
movq -0x468(%rbp), %rdi
callq 0x1a350
movq %rax, -0x470(%rbp)
leaq -0x480(%rbp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0xd290
movq -0x470(%rbp), %rdx
leaq -0x480(%rbp), %rdi
leaq 0x29374(%rip), %rsi     # 0x44058
callq 0x25860
leaq -0x490(%rbp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0xd290
leaq -0x490(%rbp), %rdi
leaq -0x480(%rbp), %rsi
callq 0x250c0
leaq -0x460(%rbp), %rdi
leaq 0x2937a(%rip), %rsi     # 0x44097
leaq -0x490(%rbp), %rdx
callq 0x25690
leaq -0x440(%rbp), %rdi
leaq 0x28e76(%rip), %rsi     # 0x43bad
leaq -0x460(%rbp), %rdx
callq 0x25560
movq -0x10(%rbp), %rsi
addq $0x8, %rsi
leaq -0x440(%rbp), %rdi
callq 0x1a680
andb $0x1, %al
movb %al, -0x491(%rbp)
movq -0x468(%rbp), %rdi
callq 0xd090
movq -0x470(%rbp), %rdi
callq 0xd090
leaq -0x490(%rbp), %rdi
callq 0x254d0
leaq -0x480(%rbp), %rdi
callq 0x25b50
leaq -0x460(%rbp), %rdi
callq 0x25b50
leaq -0x450(%rbp), %rdi
callq 0x25b50
leaq -0x440(%rbp), %rdi
callq 0x25b50
movb -0x491(%rbp), %al
andb $0x1, %al
movb %al, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x4a0, %rsp            # imm = 0x4A0
popq %rbp
retq
nopl (%rax)