user: Translate the below assembly code into C programming language:

```asm
<cholsl>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  mov    %ecx,%ebp
  push   %rbx
  mov    %rsi,%rbx
  sub    $0x28,%rsp
  call   <choldcsl@plt>
  mov    %rax,%r8
  mov    $0x1,%eax
  test   %r8,%r8
  jne    L129
  test   %ebp,%ebp
  jle    L84
  movslq %ebp,%rax
  lea    -0x2(%rbp),%r12d
  lea    0x8(,%rax,8),%r13
  lea    0x8(%rbx),%rax
  mov    %r13,0x10(%rsp)
  mov    %rax,%rcx
  mov    %rax,0x18(%rsp)
  jmp    L112
  nopw   0x0(%rax,%rax,1)
L31:
  lea    0x1(%r12),%edx
  mov    %rcx,%rdi
  xor    %esi,%esi
  sub    $0x1,%r12d
  shl    $0x3,%rdx
  call   <memset@plt>
  mov    %rax,%rcx
  add    %r13,%rcx
L112:
  cmp    $0xffffffff,%r12d
  jne    L31
  lea    -0x1(%rbp),%eax
  mov    %rbx,%r13
  xor    %r15d,%r15d
  xor    %r14d,%r14d
  mov    %rax,0x8(%rsp)
  mov    0x10(%rsp),%rax
  lea    -0x8(%rax),%rsi
  nopl   (%rax)
L47:
  movsd  0x0(%r13),%xmm1
  lea    0x1(%r14),%r10d
  mulsd  %xmm1,%xmm1
  movsd  %xmm1,0x0(%r13)
  cmp    0x8(%rsp),%r14
  je     L138
  lea    (%rsi,%r13,1),%rax
  mov    %r10d,%r11d
  cs nopw 0x0(%rax,%rax,1)
L0:
  movsd  (%rax),%xmm0
  mov    %r11d,%r8d
  add    $0x1,%r11d
  add    %rsi,%rax
  mulsd  %xmm0,%xmm0
  addsd  %xmm0,%xmm1
  movsd  %xmm1,0x0(%r13)
  cmp    %r11d,%ebp
  jne    L0
  lea    (%r15,%rbp,1),%eax
  mov    $0x1,%edi
  mov    %eax,0x4(%rsp)
  mov    %eax,%r12d
  nopl   0x0(%rax)
L119:
  cmp    %r10d,%r11d
  jle    L36
  lea    (%r10,%r15,1),%eax
  mov    %r10d,%edx
  cltq
  lea    (%rbx,%rax,8),%r9
  movslq %r12d,%rax
  add    %r14,%rax
  movsd  (%r9),%xmm1
  lea    (%rbx,%rax,8),%rax
  nopl   0x0(%rax)
L41:
  movsd  (%rax),%xmm0
  mulsd  (%rax,%rdi,8),%xmm0
  mov    %edx,%ecx
  add    %rsi,%rax
  add    $0x1,%edx
  addsd  %xmm0,%xmm1
  movsd  %xmm1,(%r9)
  cmp    %ecx,%r8d
  jne    L41
L36:
  lea    0x1(%r10),%eax
  add    $0x1,%rdi
  add    %ebp,%r12d
  cmp    %r8d,%r10d
  je     L13
  mov    %eax,%r10d
  jmp    L119
  nopl   0x0(%rax)
L13:
  mov    0x4(%rsp),%r15d
  add    $0x1,%r14
  add    0x10(%rsp),%r13
  jmp    L47
L84:
  xor    %eax,%eax
L129:
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L138:
  mov    0x18(%rsp),%r10
  mov    %rbx,%r9
  xor    %r8d,%r8d
  xor    %edi,%edi
  nopl   0x0(%rax)
L33:
  mov    %edi,%edx
  add    $0x1,%edi
  add    $0x8,%r9
  add    %ebp,%r8d
  cmp    %edi,%ebp
  je     L84
  movslq %r8d,%rcx
  add    %rcx,%rdx
  lea    (%rbx,%rcx,8),%rax
  lea    (%r10,%rdx,8),%rcx
  mov    %r9,%rdx
  nopl   0x0(%rax)
L17:
  movsd  (%rdx),%xmm0
  add    $0x8,%rax
  add    %rsi,%rdx
  movsd  %xmm0,-0x8(%rax)
  cmp    %rax,%rcx
  jne    L17
  jmp    L33
```

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;
}
```