user: Please show me the C implementation that matches the assembly code listed below:

```asm
<syminv>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x28,%rsp
  movl   $0x1,0xc(%rsp)
  test   %esi,%esi
  jle    L85
  mov    %rcx,%rbp
  mov    %r8,%rcx
  mov    %r9,%r8
  mov    %esi,%r12d
  mov    %rdx,%rbx
  call   <chol@plt>
  mov    %eax,0xc(%rsp)
  test   %eax,%eax
  jne    L85
  lea    0x1(%r12),%r14d
  lea    -0x2(%r12),%eax
  mov    %r12d,0x4(%rsp)
  movsd  D3(%rip),%xmm4
  imul   %r12d,%r14d
  lea    -0x1(%r12),%r13d
  mov    %eax,0x1c(%rsp)
  movslq %eax,%r11
  movslq %r13d,%rax
  pxor   %xmm3,%xmm3
  mov    %rax,0x10(%rsp)
  mov    %rax,%r10
  sar    %r14d
  lea    -0x1(%r14),%r15d
  sub    %r12d,%r14d
  mov    %r15d,0x18(%rsp)
  nopw   0x0(%rax,%rax,1)
L4:
  movslq %r15d,%rax
  mov    %r10d,(%rsp)
  mov    %r10d,%ecx
  movsd  (%rbx,%rax,8),%xmm0
  ucomisd %xmm3,%xmm0
  jp     L132
  jne    L132
  mov    %r15d,%edx
  mov    %r10d,%eax
  cmp    %r10d,%r12d
  jle    L32
  nopw   0x0(%rax,%rax,1)
L150:
  movslq %edx,%rcx
  add    $0x1,%eax
  movq   $0x0,(%rbx,%rcx,8)
  add    %eax,%edx
  cmp    %eax,%r12d
  jne    L150
L32:
  sub    (%rsp),%r15d
  sub    $0x1,%r10
  subl   $0x1,0x4(%rsp)
  sub    $0x1,%r11
  sub    $0x1,%r15d
  cmp    $0xffffffff,%r10d
  jne    L4
L85:
  mov    0xc(%rsp),%eax
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax,%rax,1)
L132:
  mov    %r10d,%r8d
  cmp    %r10d,%r12d
  jle    L125
  mov    0x4(%rsp),%eax
  movsd  %xmm0,0x0(%rbp,%r10,8)
  lea    (%r15,%rax,1),%edx
  cmp    %eax,%r12d
  jle    L125
  mov    0x1c(%rsp),%esi
  lea    0x2(%rcx),%eax
  cltq
  sub    %ecx,%esi
  lea    0x3(%r10,%rsi,1),%rsi
  nopl   0x0(%rax)
L52:
  movslq %edx,%rcx
  add    %eax,%edx
  movsd  (%rbx,%rcx,8),%xmm0
  movsd  %xmm0,-0x8(%rbp,%rax,8)
  add    $0x1,%rax
  cmp    %rsi,%rax
  jne    L52
L125:
  cmp    %r8d,%r13d
  jl     L32
  mov    %r12d,0x8(%rsp)
  mov    0x18(%rsp),%edi
  mov    %r13d,%r9d
  mov    0x10(%rsp),%r12
  nopl   0x0(%rax,%rax,1)
L3:
  movsd  0x0(%rbp,%r10,8),%xmm2
  lea    (%r14,%r9,1),%eax
  movapd %xmm3,%xmm1
  cmp    %r9d,%r8d
  je     L29
L45:
  cmp    %r8d,%r13d
  jle    L103
  mov    %r12,%rdx
  nopl   0x0(%rax)
L118:
  movslq %eax,%rcx
  lea    -0x1(%rax),%esi
  movsd  (%rbx,%rcx,8),%xmm0
  mulsd  0x0(%rbp,%rdx,8),%xmm0
  mov    %eax,%ecx
  sub    %edx,%ecx
  cmp    %edi,%eax
  mov    %ecx,%eax
  cmovle %esi,%eax
  sub    $0x1,%rdx
  subsd  %xmm0,%xmm1
  cmp    %edx,%r8d
  jl     L118
L103:
  divsd  %xmm2,%xmm1
  sub    %r9d,%edi
  cltq
  sub    $0x1,%r9d
  sub    $0x1,%edi
  movsd  %xmm1,(%rbx,%rax,8)
  cmp    %r11d,%r9d
  jne    L3
  mov    0x8(%rsp),%r12d
  jmp    L32
  nopl   (%rax)
L29:
  movapd %xmm4,%xmm1
  divsd  %xmm2,%xmm1
  jmp    L45
```

tool_calls: name: retrieve_data
arguments: data_tag: D3
type_guessed: f64

tool: D3: 1

assistant: ```c
int syminv(double a[], int nrow, double c[], double w[], int *nullty, double *log_det) {
  double x;
  int i, j, k, l, irow, icol, jcol, mdiag, ndiag, last_cell, last_row;
  if (nrow <= 0)
    return (1);
  i = chol(a, nrow, c, nullty, log_det);
  if (i != 0)
    return (i);
  last_cell = ((nrow * (nrow + 1)) / 2) - 1;
  last_row = nrow - 1;
  for (ndiag = last_cell, irow = last_row; irow >= 0; ndiag -= irow, ndiag--, irow--) {
    if (c[ndiag] != 0.0) {
      for (l = ndiag, i = irow; i < nrow; i++, l += i)
        w[i] = c[l];
      for (icol = last_row, mdiag = jcol = last_cell; icol >= irow; mdiag -= icol, mdiag--, icol--, jcol--) {
        if (icol == irow)
          x = 1.0 / w[irow];
        else
          x = 0.0;
        for (k = last_row, l = jcol; k > irow; k--) {
          x -= (w[k] * c[l]);
          if (l > mdiag)
            l -= k;
          else
            l--;
        }
        c[l] = x / w[irow];
      }
    } else
      for (j = irow, l = ndiag; j < nrow; j++, l += j)
        c[l] = 0.0;
  }
  return (0);
}
```