user: 请将以下的汇编代码转换成C语言代码:

```asm
<choldc>:
  endbr64
  test   %esi,%esi
  jle    L60
  push   %r15
  mov    %esi,%r9d
  mov    %rdx,%r11
  mov    $0x1,%r10d
  push   %r14
  xor    %r15d,%r15d
  mov    %rdi,%r14
  pxor   %xmm3,%xmm3
  push   %r13
  mov    $0xfffffffffffffff8,%r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x48,%rsp
  nopw   0x0(%rax,%rax,1)
L126:
  lea    0x10(%r13),%rax
  mov    %r15d,%ebx
  mov    %r15d,0x28(%rsp)
  mov    %r10d,%r8d
  mov    %rax,0x10(%rsp)
  mov    %r15d,%eax
  and    $0x1,%ebx
  mov    %r10,%rbp
  shr    %eax
  lea    -0x1(%rax),%r12d
  mov    %r15d,%eax
  not    %r12
  and    $0xfffffffe,%eax
  shl    $0x4,%r12
  cmp    $0x2,%r10d
  mov    %eax,0xc(%rsp)
  cmove  %r15d,%ebx
  movslq %ebx,%rbx
  shl    $0x3,%rbx
  nopl   0x0(%rax,%rax,1)
L73:
  mov    0x10(%r14,%r13,1),%rdx
  movsd  (%rdx,%rbp,8),%xmm1
  test   %r15,%r15
  je     L42
  mov    (%r14,%rbp,8),%rcx
  cmp    $0x2,%r10
  je     L91
  lea    (%rdx,%r13,1),%rdi
  lea    (%rcx,%r13,1),%rsi
  xor    %eax,%eax
  nopl   0x0(%rax,%rax,1)
L55:
  movupd (%rsi,%rax,1),%xmm0
  movupd (%rdi,%rax,1),%xmm2
  sub    $0x10,%rax
  shufpd $0x1,%xmm0,%xmm0
  shufpd $0x1,%xmm2,%xmm2
  mulpd  %xmm2,%xmm0
  subsd  %xmm0,%xmm1
  unpckhpd %xmm0,%xmm0
  subsd  %xmm0,%xmm1
  cmp    %rax,%r12
  jne    L55
  mov    0x28(%rsp),%esi
  cmp    %esi,0xc(%rsp)
  je     L42
L91:
  movsd  (%rcx,%rbx,1),%xmm0
  mulsd  (%rdx,%rbx,1),%xmm0
  subsd  %xmm0,%xmm1
L42:
  cmp    %ebp,%r8d
  je     L115
  mov    (%r14,%rbp,8),%rax
  mov    0x10(%rsp),%rcx
  divsd  0x10(%r11,%r13,1),%xmm1
  movsd  %xmm1,(%rax,%rcx,1)
L75:
  add    $0x1,%rbp
  cmp    %ebp,%r9d
  jge    L73
  add    $0x1,%r10
  add    $0x1,%r15
  add    $0x8,%r13
  cmp    %r10d,%r9d
  jge    L126
  add    $0x48,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L115:
  comisd %xmm1,%xmm3
  jae    L37
L117:
  ucomisd %xmm1,%xmm3
  ja     L93
  sqrtsd %xmm1,%xmm1
L106:
  movsd  %xmm1,0x10(%r11,%r13,1)
  jmp    L75
L37:
  lea    D5(%rip),%rdi
  mov    %r11,0x38(%rsp)
  mov    %r9d,0x30(%rsp)
  mov    %r8d,0x2c(%rsp)
  mov    %r10,0x20(%rsp)
  movsd  %xmm1,0x18(%rsp)
  call   <nrerror@plt>
  mov    0x38(%rsp),%r11
  mov    0x30(%rsp),%r9d
  pxor   %xmm3,%xmm3
  mov    0x2c(%rsp),%r8d
  mov    0x20(%rsp),%r10
  movsd  0x18(%rsp),%xmm1
  jmp    L117
L60:
  ret
L93:
  movapd %xmm1,%xmm0
  mov    %r11,0x30(%rsp)
  mov    %r9d,0x2c(%rsp)
  mov    %r8d,0x20(%rsp)
  mov    %r10,0x18(%rsp)
  call   <sqrt@plt>
  mov    0x30(%rsp),%r11
  mov    0x2c(%rsp),%r9d
  pxor   %xmm3,%xmm3
  mov    0x20(%rsp),%r8d
  mov    0x18(%rsp),%r10
  movapd %xmm0,%xmm1
  jmp    L106
```

tool_calls: name: read_data
arguments: label: D5
type_guessed: string

tool: D5: choldc failed

assistant: ```c
void choldc(double **a, int n, double p[]) {
  void nrerror(char error_text[]);
  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)
          nrerror("choldc failed");
        p[i] = sqrt(sum);
      } else
        a[j][i] = sum / p[i];
    }
  }
}
```