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

```asm
<cholsl>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x18,%rsp
  mov    %rsi,%rbx
  mov    %ecx,%r12d
  call   <choldcsl@plt>
  mov    %rax,%rdx
  mov    $0x1,%eax
  test   %rdx,%rdx
  jne    L185
  test   %r12d,%r12d
  jle    L27
  movslq %r12d,%rsi
  add    $0x1,%rsi
  mov    $0x0,%ecx
  mov    $0x0,%edi
  lea    0x8(%rbx),%r10
  lea    -0x1(%r12),%r9d
  lea    0x10(%rbx),%r8
L51:
  lea    0x1(%rdi),%ebp
  cmp    %ebp,%r12d
  je     L52
  lea    (%r10,%rcx,8),%rax
  mov    %r9d,%edx
  sub    %ebp,%edx
  add    %rcx,%rdx
  lea    (%r8,%rdx,8),%rdx
L0:
  movq   $0x0,(%rax)
  add    $0x8,%rax
  cmp    %rdx,%rax
  jne    L0
  add    %rsi,%rcx
  mov    %ebp,%edi
  jmp    L51
L52:
  movslq %ebp,%r8
  lea    0x8(,%r8,8),%rax
  mov    %rax,0x8(%rsp)
  mov    %edi,%eax
  mov    %rax,(%rsp)
  shl    $0x3,%r8
  mov    %rbx,%r14
  mov    $0x0,%r13d
  mov    $0x0,%r12d
  jmp    L62
L149:
  lea    (%r10,%r13,1),%eax
  cltq
  lea    (%rbx,%rax,8),%rcx
  movslq %r11d,%rax
  add    %r12,%rax
  lea    (%rbx,%rax,8),%rax
  mov    %r10d,%edx
L49:
  movsd  (%rax),%xmm0
  mulsd  (%rax,%r9,8),%xmm0
  addsd  (%rcx),%xmm0
  movsd  %xmm0,(%rcx)
  mov    %edx,%esi
  add    $0x1,%edx
  add    %r8,%rax
  cmp    %esi,%edi
  jne    L49
L110:
  lea    0x1(%r10),%eax
  add    $0x1,%r9
  add    %ebp,%r11d
  cmp    %r10d,%edi
  je     L175
  mov    %eax,%r10d
L112:
  cmp    %r10d,%ebp
  jg     L149
  jmp    L110
L175:
  add    $0x1,%r12
  add    0x8(%rsp),%r14
  mov    %r15d,%r13d
L62:
  mov    %r14,%rcx
  movsd  (%r14),%xmm0
  mulsd  %xmm0,%xmm0
  movsd  %xmm0,(%r14)
  lea    0x1(%r12),%r10d
  cmp    (%rsp),%r12
  je     L76
  lea    (%r8,%r14,1),%rdx
  mov    %r10d,%eax
L118:
  movsd  (%rdx),%xmm0
  mulsd  %xmm0,%xmm0
  addsd  (%rcx),%xmm0
  movsd  %xmm0,(%rcx)
  mov    %eax,%esi
  add    $0x1,%eax
  add    %r8,%rdx
  cmp    %esi,%edi
  jne    L118
  lea    0x0(%r13,%rbp,1),%r15d
  mov    %r15d,%r11d
  mov    $0x1,%r9d
  jmp    L112
L143:
  movslq %esi,%rcx
  lea    (%rbx,%rcx,8),%rax
  mov    %edx,%edx
  add    %rcx,%rdx
  lea    (%r11,%rdx,8),%rcx
  mov    %r9,%rdx
L117:
  movsd  (%rdx),%xmm0
  movsd  %xmm0,(%rax)
  add    %r8,%rdx
  add    $0x8,%rax
  cmp    %rcx,%rax
  jne    L117
L61:
  mov    %r10d,%edx
L45:
  lea    0x1(%rdx),%r10d
  add    $0x8,%r9
  add    %ebp,%esi
  cmp    %edi,%edx
  je     L70
  test   %r10d,%r10d
  jg     L143
  jmp    L61
L76:
  mov    %rbx,%r9
  mov    $0x0,%edx
  mov    $0x0,%esi
  lea    0x8(%rbx),%r11
  jmp    L45
L27:
  mov    $0x0,%eax
  jmp    L185
L70:
  mov    $0x0,%eax
L185:
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

assistant: ```c
int cholsl(double *A, double *a, double *p, int n) {
  int i, j, k;
  if (choldcsl(A, a, p, n))
    return 1;
  for (i = 0; i < n; i++) {
    for (j = i + 1; j < n; j++) {
      a[i * n + j] = 0.0;
    }
  }
  for (i = 0; i < n; i++) {
    a[i * n + i] *= a[i * n + i];
    for (k = i + 1; k < n; k++) {
      a[i * n + i] += a[k * n + i] * a[k * n + i];
    }
    for (j = i + 1; j < n; j++) {
      for (k = j; k < n; k++) {
        a[i * n + j] += a[k * n + i] * a[k * n + j];
      }
    }
  }
  for (i = 0; i < n; i++) {
    for (j = 0; j < i; j++) {
      a[i * n + j] = a[j * n + i];
    }
  }
  return 0;
}
```