user: 请显示与下面列出的汇编代码相匹配的C语言实现：

```asm
<cholesky>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x40,%rsp
  mov    %rdi,-0x28(%rbp)
  mov    %rsi,-0x30(%rbp)
  mov    %edx,-0x34(%rbp)
  mov    -0x34(%rbp),%eax
  imul   %eax,%eax
  mov    $0x8,%esi
  mov    %eax,%edi
  call   <calloc@plt>
  mov    %rax,-0x10(%rbp)
  cmpq   $0x0,-0x10(%rbp)
  jne    L46
  mov    -0x34(%rbp),%eax
  imul   %eax,%eax
  mov    %eax,%esi
  lea    D18(%rip),%rax
  mov    %rax,%rdi
  call   <fatalx@plt>
L46:
  mov    -0x34(%rbp),%eax
  mov    $0x8,%esi
  mov    %eax,%edi
  call   <calloc@plt>
  mov    %rax,-0x8(%rbp)
  cmpq   $0x0,-0x8(%rbp)
  jne    L56
  mov    -0x34(%rbp),%eax
  mov    %eax,%esi
  lea    D18(%rip),%rax
  mov    %rax,%rdi
  call   <fatalx@plt>
L56:
  mov    -0x34(%rbp),%eax
  imul   %eax,%eax
  mov    %eax,%edx
  mov    -0x10(%rbp),%rcx
  mov    -0x30(%rbp),%rax
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <copyarr@plt>
  mov    -0x8(%rbp),%rdx
  mov    -0x34(%rbp),%ecx
  mov    -0x10(%rbp),%rax
  mov    %ecx,%esi
  mov    %rax,%rdi
  call   <choldc@plt>
  mov    -0x34(%rbp),%eax
  imul   %eax,%eax
  mov    %eax,%edx
  mov    -0x28(%rbp),%rax
  mov    %edx,%esi
  mov    %rax,%rdi
  call   <vzero@plt>
  movl   $0x0,-0x1c(%rbp)
  jmp    L20
L18:
  mov    -0x1c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x8(%rbp),%rax
  add    %rax,%rdx
  mov    -0x1c(%rbp),%eax
  imul   -0x34(%rbp),%eax
  mov    %eax,%ecx
  mov    -0x1c(%rbp),%eax
  add    %ecx,%eax
  cltq
  lea    0x0(,%rax,8),%rcx
  mov    -0x10(%rbp),%rax
  add    %rcx,%rax
  movsd  (%rdx),%xmm0
  movsd  %xmm0,(%rax)
  movl   $0x0,-0x18(%rbp)
  jmp    L59
L21:
  mov    -0x1c(%rbp),%eax
  imul   -0x34(%rbp),%eax
  mov    %eax,%edx
  mov    -0x18(%rbp),%eax
  add    %edx,%eax
  mov    %eax,-0x14(%rbp)
  mov    -0x1c(%rbp),%eax
  imul   -0x34(%rbp),%eax
  mov    %eax,%edx
  mov    -0x18(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x10(%rbp),%rax
  add    %rax,%rdx
  mov    -0x14(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rcx
  mov    -0x28(%rbp),%rax
  add    %rcx,%rax
  movsd  (%rdx),%xmm0
  movsd  %xmm0,(%rax)
  addl   $0x1,-0x18(%rbp)
L59:
  mov    -0x18(%rbp),%eax
  cmp    -0x1c(%rbp),%eax
  jle    L21
  addl   $0x1,-0x1c(%rbp)
L20:
  mov    -0x1c(%rbp),%eax
  cmp    -0x34(%rbp),%eax
  jl     L18
  mov    -0x10(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  mov    -0x8(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  nop
  leave
  ret
```

tool_calls: name: unpack_data
arguments: data_label: D18
datatype: string

tool: D18: Unable to allocate %d unit(s) for item 


assistant: ```c
void cholesky(double *cf, double *a, int n) {
  int i, j, k;
  double *tt;
  double *p;
  if ((tt = (double *)calloc((n * n), sizeof(double))) == NULL)
    fatalx("Unable to allocate %d unit(s) for item \n", n * n);
  if ((p = (double *)calloc((n), sizeof(double))) == NULL)
    fatalx("Unable to allocate %d unit(s) for item \n", n);
  copyarr(a, tt, n * n);
  choldc(tt, n, p);
  vzero(cf, n * n);
  for (i = 0; i < n; i++) {
    tt[i * n + i] = p[i];
    for (j = 0; j <= i; j++) {
      k = i * n + j;
      cf[k] = tt[i * n + j];
    }
  }
  free(tt);
  free(p);
}
```