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

```asm
<choldc>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %rbx
  sub    $0x38,%rsp
  mov    %rdi,-0x38(%rbp)
  mov    %esi,-0x3c(%rbp)
  movl   $0x1,-0x24(%rbp)
  jmp    L56
L123:
  mov    -0x24(%rbp),%eax
  mov    %eax,-0x20(%rbp)
  jmp    L31
L100:
  mov    -0x24(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x20(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movsd  %xmm0,-0x18(%rbp)
  mov    -0x24(%rbp),%eax
  sub    $0x1,%eax
  mov    %eax,-0x1c(%rbp)
  jmp    L80
L132:
  mov    -0x24(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x1c(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  mov    -0x20(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x1c(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mulsd  %xmm0,%xmm1
  movsd  -0x18(%rbp),%xmm0
  subsd  %xmm1,%xmm0
  movsd  %xmm0,-0x18(%rbp)
  subl   $0x1,-0x1c(%rbp)
L80:
  cmpl   $0x0,-0x1c(%rbp)
  jg     L132
  mov    -0x24(%rbp),%eax
  cmp    -0x20(%rbp),%eax
  jne    L67
  pxor   %xmm0,%xmm0
  comisd -0x18(%rbp),%xmm0
  jb     L112
  mov    $0x0,%eax
  jmp    L110
L112:
  mov    -0x24(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x24(%rbp),%eax
  cltq
  shl    $0x3,%rax
  lea    (%rdx,%rax,1),%rbx
  mov    -0x18(%rbp),%rax
  movq   %rax,%xmm0
  call   <sqrt@plt>
  movq   %xmm0,%rax
  mov    %rax,(%rbx)
  jmp    L4
L67:
  mov    -0x24(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x24(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  mov    -0x20(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x24(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  movsd  -0x18(%rbp),%xmm0
  divsd  %xmm1,%xmm0
  movsd  %xmm0,(%rax)
L4:
  addl   $0x1,-0x20(%rbp)
L31:
  mov    -0x20(%rbp),%eax
  cmp    -0x3c(%rbp),%eax
  jle    L100
  addl   $0x1,-0x24(%rbp)
L56:
  mov    -0x24(%rbp),%eax
  cmp    -0x3c(%rbp),%eax
  jle    L123
  movl   $0x1,-0x24(%rbp)
  jmp    L20
L1:
  mov    -0x24(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,-0x20(%rbp)
  jmp    L51
L45:
  mov    -0x24(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x20(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  pxor   %xmm0,%xmm0
  movsd  %xmm0,(%rax)
  addl   $0x1,-0x20(%rbp)
L51:
  mov    -0x20(%rbp),%eax
  cmp    -0x3c(%rbp),%eax
  jle    L45
  addl   $0x1,-0x24(%rbp)
L20:
  mov    -0x3c(%rbp),%eax
  cmp    -0x24(%rbp),%eax
  jg     L1
  mov    $0x1,%eax
L110:
  mov    -0x8(%rbp),%rbx
  leave
  ret
```

assistant: ```c
int choldc(double **a, int n) {
  int i, j, k;
  double sum;
  for (i = 1; i <= n; i++) {
    for (j = i; j <= n; j++) {
      for (sum = a[i][j], k = i - 1; k >= 1; k--)
        sum -= a[i][k] * a[j][k];
      if (i == j) {
        if (sum <= 0.0)
          return (0);
        a[i][i] = sqrt(sum);
      } else
        a[j][i] = sum / a[i][i];
    }
  }
  for (i = 1; i <= n - 1; i++)
    for (j = i + 1; j <= n; j++)
      a[i][j] = 0.0;
  return (1);
}
```