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

```asm
<cholesky_tri_inv>:
  endbr64
  test   %edx,%edx
  jle    L168
  push   %r15
  lea    -0x1(%rdx),%eax
  mov    %rsi,%r8
  push   %r14
  xor    %r14d,%r14d
  push   %r13
  xor    %r13d,%r13d
  push   %r12
  mov    %r13d,%r15d
  mov    %edx,%r12d
  push   %rbp
  mov    %rdi,%rbp
  lea    0x8(%rcx),%rdi
  push   %rbx
  mov    %rcx,%rbx
  sub    $0x28,%rsp
  mov    %eax,0xc(%rsp)
  cltq
  lea    (%rcx,%rax,8),%rax
  mov    %rax,0x18(%rsp)
  nopl   (%rax)
L43:
  mov    D24(%rip),%rax
  mov    %r15d,%r13d
  add    $0x1,%r15d
  mov    %rax,-0x8(%rdi)
  cmp    %r15d,%r12d
  jle    L14
  mov    0xc(%rsp),%eax
  xor    %esi,%esi
  mov    %r8,0x10(%rsp)
  sub    %r15d,%eax
  lea    0x8(,%rax,8),%rdx
  call   <memset@plt>
  mov    0x10(%rsp),%r8
  mov    %rax,%rdi
L14:
  mov    %r15d,%eax
  movsd  D24(%rip),%xmm0
  imul   %r13d,%eax
  sar    %eax
  add    %r13d,%eax
  cltq
  divsd  0x0(%rbp,%rax,8),%xmm0
  movsd  %xmm0,-0x8(%rdi)
  cmp    %r15d,%r12d
  jle    L72
  mov    %r14d,%r9d
  mov    %rdi,%rsi
  mov    %r15d,%ecx
  nopl   (%rax)
L48:
  movsd  (%rsi),%xmm0
  lea    0x1(%rcx),%r11d
  movapd %xmm0,%xmm1
  cmp    %r14d,%ecx
  jle    L142
  mov    %r11d,%eax
  imul   %ecx,%eax
  sar    %eax
  cltq
  lea    0x0(%rbp,%rax,8),%r10
  mov    %r14,%rax
  nopl   0x0(%rax,%rax,1)
L85:
  movsd  (%rbx,%rax,8),%xmm0
  mulsd  (%r10,%rax,8),%xmm0
  add    $0x1,%rax
  lea    -0x1(%rax),%edx
  subsd  %xmm0,%xmm1
  movsd  %xmm1,(%rsi)
  cmp    %r9d,%edx
  jl     L85
  movapd %xmm1,%xmm0
L142:
  mov    %r11d,%edx
  add    $0x8,%rsi
  add    $0x1,%r9d
  imul   %ecx,%edx
  mov    %edx,%eax
  shr    $0x1f,%eax
  add    %edx,%eax
  sar    %eax
  add    %ecx,%eax
  cltq
  divsd  0x0(%rbp,%rax,8),%xmm0
  movsd  %xmm0,-0x8(%rsi)
  cmp    %r12d,%r11d
  je     L72
  mov    %r11d,%ecx
  jmp    L48
  nopl   0x0(%rax,%rax,1)
L72:
  mov    0x18(%rsp),%r9
  mov    0xc(%rsp),%esi
  mov    %r12d,%r10d
  nopl   0x0(%rax)
L16:
  cmp    %r10d,%r12d
  jle    L128
  movsd  (%r9),%xmm1
  movslq %r10d,%rdx
  nopl   (%rax)
L176:
  lea    0x1(%rdx),%ecx
  imul   %edx,%ecx
  mov    %ecx,%eax
  shr    $0x1f,%eax
  add    %ecx,%eax
  sar    %eax
  add    %esi,%eax
  cltq
  movsd  0x0(%rbp,%rax,8),%xmm0
  mulsd  (%rbx,%rdx,8),%xmm0
  add    $0x1,%rdx
  subsd  %xmm0,%xmm1
  movsd  %xmm1,(%r9)
  cmp    %edx,%r12d
  jg     L176
L128:
  mov    %r10d,%eax
  movsd  (%r9),%xmm0
  sub    $0x1,%r10d
  sub    $0x8,%r9
  imul   %esi,%eax
  sar    %eax
  lea    (%rax,%rsi,1),%edx
  add    %r13d,%eax
  sub    $0x1,%esi
  movslq %edx,%rdx
  cltq
  divsd  0x0(%rbp,%rdx,8),%xmm0
  movsd  %xmm0,0x8(%r9)
  movsd  %xmm0,(%r8,%rax,8)
  cmp    %r14d,%esi
  jge    L16
  add    $0x1,%r14
  add    $0x8,%rdi
  cmp    0xc(%rsp),%r15d
  jle    L43
  mov    %r13d,%r8d
  cmp    %r15d,%r12d
  jle    L23
  lea    -0x2(%r12),%eax
  add    $0x2,%r8d
  movslq %r15d,%rcx
  movslq %r8d,%r14
  mov    %eax,0x10(%rsp)
  mov    %r12d,%eax
  mov    %rcx,%r12
  mov    %r14,%r15
  mov    %eax,%ecx
  mov    %rbp,%r14
  nopw   0x0(%rax,%rax,1)
L75:
  mov    D24(%rip),%rax
  mov    %r12d,%r13d
  mov    %r15d,%ebp
  mov    %rax,(%rbx,%r12,8)
  cmp    %ecx,%r15d
  jge    L65
  mov    0x10(%rsp),%eax
  xor    %esi,%esi
  lea    (%rbx,%r15,8),%rdi
  mov    %ecx,0xc(%rsp)
  sub    %r12d,%eax
  lea    0x8(,%rax,8),%rdx
  call   <memset@plt>
  mov    %r12d,%edx
  movsd  (%rbx,%r12,8),%xmm0
  mov    0xc(%rsp),%ecx
  imul   %r15d,%edx
  mov    %edx,%eax
  shr    $0x1f,%eax
  add    %edx,%eax
  sar    %eax
  add    %r12d,%eax
  cltq
  divsd  (%r14,%rax,8),%xmm0
  movslq %r15d,%rax
  movsd  %xmm0,(%rbx,%r12,8)
  lea    (%rbx,%rax,8),%rsi
  nopw   0x0(%rax,%rax,1)
L159:
  movsd  (%rsi),%xmm1
  lea    0x1(%rbp),%r9d
  movapd %xmm1,%xmm0
  cmp    %r12d,%ebp
  jle    L171
  mov    %r9d,%eax
  imul   %ebp,%eax
  sar    %eax
  cltq
  lea    (%r14,%rax,8),%rdi
  mov    %r12,%rax
  nopw   0x0(%rax,%rax,1)
L162:
  movsd  (%rdi,%rax,8),%xmm0
  mulsd  (%rbx,%rax,8),%xmm0
  add    $0x1,%rax
  lea    -0x1(%rax),%edx
  subsd  %xmm0,%xmm1
  movsd  %xmm1,(%rsi)
  cmp    %edx,%r13d
  jg     L162
  movapd %xmm1,%xmm0
L171:
  mov    %ebp,%edx
  add    $0x8,%rsi
  add    $0x1,%r13d
  imul   %r9d,%edx
  mov    %edx,%eax
  shr    $0x1f,%eax
  add    %edx,%eax
  sar    %eax
  add    %ebp,%eax
  cltq
  divsd  (%r14,%rax,8),%xmm0
  movsd  %xmm0,-0x8(%rsi)
  cmp    %r9d,%ecx
  je     L79
  mov    %r9d,%ebp
  jmp    L159
L65:
  movq   %rax,%xmm0
  mov    %r12d,%eax
  imul   %r15d,%eax
  sar    %eax
  add    %r12d,%eax
  cltq
  divsd  (%r14,%rax,8),%xmm0
  movsd  %xmm0,(%rbx,%r12,8)
  nopl   0x0(%rax)
L79:
  add    $0x1,%r12
  add    $0x1,%r15
  cmp    %r12d,%ecx
  jg     L75
L23:
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L168:
  ret
```

tool_calls: name: retrieve_data
arguments: label: D24
data_type: f64

tool: D24: 1

assistant: ```c
void cholesky_tri_inv(const double *L_, double *invA, const int n, double *x) {
  int i, k, l;
  for (l = 0; l < n; l++) {
    x[l] = 1.0;
    for (k = l + 1; k < n; k++)
      x[k] = 0.0;
    for (k = l; k < n; k++) {
      for (i = l; i < k; i++)
        x[k] -= x[i] * L_[(((k) * ((k) + 1)) / 2 + (i))];
      x[k] /= L_[(((k) * ((k) + 1)) / 2 + (k))];
    }
    for (k = n - 1; k >= l; k--) {
      for (i = k + 1; i < n; i++)
        x[k] -= x[i] * L_[(((i) * ((i) + 1)) / 2 + (k))];
      x[k] /= L_[(((k) * ((k) + 1)) / 2 + (k))];
      invA[(((k) * ((k) + 1)) / 2 + (l))] = x[k];
    }
  }
}
```