user: What is the c source code of the assembly code below?

```asm
<core_site_likelihood_derivatives>:
  endbr64
  push   %r15
  pxor   %xmm0,%xmm0
  mov    %edi,%r11d
  mov    %esi,%eax
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    0x50(%rsp),%r10
  mov    0x40(%rsp),%rsi
  mov    0x48(%rsp),%rdi
  movq   $0x0,0x10(%r10)
  mov    %r8,-0x10(%rsp)
  movups %xmm0,(%r10)
  test   %edx,%edx
  je     L98
  mov    0x38(%rsp),%r8
  lea    -0x1(%r11),%ebp
  lea    0x0(,%rax,8),%rbx
  pxor   %xmm5,%xmm5
  lea    -0x1(%rdx),%eax
  mov    %ebp,%edx
  movapd %xmm5,%xmm8
  mov    %rbp,%r13
  lea    0x8(%r8,%rax,8),%r14
  mov    %ebp,%eax
  and    $0xfffffffe,%edx
  add    $0x1,%rbp
  shr    %eax
  mov    %edx,-0x1c(%rsp)
  shl    $0x5,%rdx
  movapd %xmm5,%xmm7
  sub    $0x1,%eax
  mov    %rdx,-0x28(%rsp)
  shl    $0x5,%rbp
  movapd %xmm5,%xmm6
  movsd  D0(%rip),%xmm9
  add    $0x1,%rax
  shl    $0x6,%rax
  mov    %rax,-0x18(%rsp)
  nopl   0x0(%rax,%rax,1)
L50:
  mov    (%r8),%r12
  test   %r11d,%r11d
  je     L97
  cmp    $0x1,%r13d
  jbe    L31
  mov    -0x18(%rsp),%r15
  mov    %rdi,%rax
  mov    %rsi,%rdx
  movapd %xmm5,%xmm3
  movapd %xmm5,%xmm2
  movapd %xmm5,%xmm4
  add    %rdi,%r15
  nopl   0x0(%rax,%rax,1)
L14:
  movupd (%rax),%xmm1
  movupd 0x20(%rax),%xmm11
  add    $0x40,%rax
  add    $0x10,%rdx
  movupd -0x10(%rdx),%xmm10
  movupd -0x10(%rax),%xmm12
  movhpd -0x30(%rax),%xmm1
  movhpd -0x10(%rax),%xmm11
  movlpd -0x18(%rax),%xmm12
  movapd %xmm1,%xmm0
  unpckhpd %xmm11,%xmm1
  unpcklpd %xmm11,%xmm0
  mulpd  %xmm10,%xmm0
  addsd  %xmm0,%xmm4
  unpckhpd %xmm0,%xmm0
  addsd  %xmm0,%xmm4
  movupd -0x30(%rax),%xmm0
  movlpd -0x38(%rax),%xmm0
  unpcklpd %xmm12,%xmm0
  mulpd  %xmm10,%xmm0
  addsd  %xmm0,%xmm3
  unpckhpd %xmm0,%xmm0
  addsd  %xmm0,%xmm3
  movapd %xmm1,%xmm0
  mulpd  %xmm10,%xmm0
  addsd  %xmm0,%xmm2
  unpckhpd %xmm0,%xmm0
  addsd  %xmm0,%xmm2
  cmp    %r15,%rax
  jne    L14
  mov    -0x28(%rsp),%rax
  lea    (%rdi,%rax,1),%rdx
  mov    -0x1c(%rsp),%eax
L20:
  mov    %eax,%r15d
  movsd  (%rdx),%xmm1
  add    $0x1,%eax
  movsd  (%rsi,%r15,8),%xmm0
  mulsd  %xmm0,%xmm1
  addsd  %xmm1,%xmm4
  movsd  0x8(%rdx),%xmm1
  mulsd  %xmm0,%xmm1
  mulsd  0x10(%rdx),%xmm0
  addsd  %xmm3,%xmm1
  addsd  %xmm2,%xmm0
  cmp    %eax,%r11d
  jbe    L91
  movsd  (%rsi,%rax,8),%xmm2
  movsd  0x20(%rdx),%xmm3
  mulsd  %xmm2,%xmm3
  addsd  %xmm3,%xmm4
  movsd  0x28(%rdx),%xmm3
  mulsd  %xmm2,%xmm3
  mulsd  0x30(%rdx),%xmm2
  addsd  %xmm3,%xmm1
  addsd  %xmm2,%xmm0
L91:
  add    %rbp,%rdi
L58:
  movsd  (%r9),%xmm2
  comisd %xmm5,%xmm2
  jbe    L84
  mov    -0x10(%rsp),%rax
  movapd %xmm5,%xmm10
  movslq (%rax),%rax
  cmp    $0xffffffff,%eax
  je     L0
  movsd  (%r12,%rax,8),%xmm10
  mulsd  %xmm2,%xmm10
L0:
  movapd %xmm9,%xmm3
  subsd  %xmm2,%xmm3
  mulsd  %xmm3,%xmm4
  mulsd  %xmm3,%xmm1
  mulsd  %xmm3,%xmm0
  addsd  %xmm10,%xmm4
L84:
  mulsd  (%rcx),%xmm4
  add    $0x8,%r8
  add    %rbx,%rsi
  add    $0x8,%rcx
  add    $0x8,%r9
  addsd  %xmm4,%xmm6
  movsd  %xmm6,(%r10)
  mulsd  -0x8(%rcx),%xmm1
  addsd  %xmm1,%xmm7
  movsd  %xmm7,0x8(%r10)
  mulsd  -0x8(%rcx),%xmm0
  addsd  %xmm0,%xmm8
  movsd  %xmm8,0x10(%r10)
  cmp    %r14,%r8
  jne    L50
L98:
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax,%rax,1)
L97:
  movapd %xmm5,%xmm1
  movapd %xmm5,%xmm0
  movapd %xmm5,%xmm4
  jmp    L58
L31:
  mov    %rdi,%rdx
  movapd %xmm5,%xmm3
  movapd %xmm5,%xmm2
  xor    %eax,%eax
  movapd %xmm5,%xmm4
  jmp    L20
```

tool_calls: name: disassemble_data
arguments: data_label: D0
data_type: f64

tool: D0: 1

assistant: ```c
void core_site_likelihood_derivatives(unsigned int states, unsigned int states_padded, unsigned int rate_cats, const double *rate_weights, const int *invariant, const double *prop_invar, double *const *freqs, const double *sumtable, const double *diagptable, double *site_lk) {
  unsigned int i, j;
  double inv_site_lk = 0.0;
  double cat_sitelk[3];
  const double *sum = sumtable;
  const double *diagp = diagptable;
  const double *t_freqs;
  double t_prop_invar;
  site_lk[0] = site_lk[1] = site_lk[2] = 0;
  for (i = 0; i < rate_cats; ++i) {
    t_freqs = freqs[i];
    cat_sitelk[0] = cat_sitelk[1] = cat_sitelk[2] = 0;
    for (j = 0; j < states; ++j) {
      cat_sitelk[0] += sum[j] * diagp[0];
      cat_sitelk[1] += sum[j] * diagp[1];
      cat_sitelk[2] += sum[j] * diagp[2];
      diagp += 4;
    }
    t_prop_invar = prop_invar[i];
    if (t_prop_invar > 0) {
      inv_site_lk = (invariant[0] == -1) ? 0 : t_freqs[invariant[0]] * t_prop_invar;
      cat_sitelk[0] = cat_sitelk[0] * (1. - t_prop_invar) + inv_site_lk;
      cat_sitelk[1] = cat_sitelk[1] * (1. - t_prop_invar);
      cat_sitelk[2] = cat_sitelk[2] * (1. - t_prop_invar);
    }
    site_lk[0] += cat_sitelk[0] * rate_weights[i];
    site_lk[1] += cat_sitelk[1] * rate_weights[i];
    site_lk[2] += cat_sitelk[2] * rate_weights[i];
    sum += states_padded;
  }
}
```