user: Converte this assembly snippet into its equivalent C code:

```asm
<coreGTRCATMULT>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %rbx
  sub    $0xd8,%rsp
  mov    %edi,-0xb4(%rbp)
  mov    %esi,-0xb8(%rbp)
  mov    %edx,-0xbc(%rbp)
  mov    %ecx,-0xc0(%rbp)
  mov    %r8,-0xc8(%rbp)
  mov    %r9,-0xd0(%rbp)
  movsd  %xmm0,-0xd8(%rbp)
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0xa0(%rbp)
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x98(%rbp)
  mov    -0xc0(%rbp),%eax
  imul   -0xbc(%rbp),%eax
  mov    %eax,%edx
  mov    %edx,%eax
  add    %eax,%eax
  add    %edx,%eax
  cltq
  shl    $0x3,%rax
  mov    %rax,%rdi
  call   <malloc@plt>
  mov    %rax,-0x90(%rbp)
  mov    -0x90(%rbp),%rax
  mov    %rax,-0xa8(%rbp)
  mov    -0xc0(%rbp),%eax
  cltq
  shl    $0x3,%rax
  mov    %rax,%rdi
  call   <malloc@plt>
  mov    %rax,-0x88(%rbp)
  mov    -0xc0(%rbp),%eax
  cltq
  shl    $0x3,%rax
  mov    %rax,%rdi
  call   <malloc@plt>
  mov    %rax,-0x80(%rbp)
  mov    -0xc0(%rbp),%eax
  cltq
  shl    $0x3,%rax
  mov    %rax,%rdi
  call   <malloc@plt>
  mov    %rax,-0x78(%rbp)
  mov    -0xc0(%rbp),%eax
  cltq
  shl    $0x3,%rax
  mov    %rax,%rdi
  call   <malloc@plt>
  mov    %rax,-0x70(%rbp)
  mov    -0xc0(%rbp),%eax
  cltq
  shl    $0x3,%rax
  mov    %rax,%rdi
  call   <malloc@plt>
  mov    %rax,-0x68(%rbp)
  mov    -0xc0(%rbp),%eax
  cltq
  shl    $0x3,%rax
  mov    %rax,%rdi
  call   <malloc@plt>
  mov    %rax,-0x60(%rbp)
  movl   $0x0,-0xac(%rbp)
  jmp    L36
L11:
  mov    -0xac(%rbp),%edx
  mov    %edx,%eax
  add    %eax,%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    0x30(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  mov    -0xac(%rbp),%edx
  mov    %edx,%eax
  add    %eax,%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    0x30(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mov    -0xac(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x88(%rbp),%rax
  add    %rdx,%rax
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,(%rax)
  mov    -0xac(%rbp),%edx
  mov    %edx,%eax
  add    %eax,%eax
  add    %edx,%eax
  cltq
  add    $0x1,%rax
  lea    0x0(,%rax,8),%rdx
  mov    0x30(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  mov    -0xac(%rbp),%edx
  mov    %edx,%eax
  add    %eax,%eax
  add    %edx,%eax
  cltq
  add    $0x1,%rax
  lea    0x0(,%rax,8),%rdx
  mov    0x30(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mov    -0xac(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x80(%rbp),%rax
  add    %rdx,%rax
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,(%rax)
  mov    -0xac(%rbp),%edx
  mov    %edx,%eax
  add    %eax,%eax
  add    %edx,%eax
  cltq
  add    $0x2,%rax
  lea    0x0(,%rax,8),%rdx
  mov    0x30(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  mov    -0xac(%rbp),%edx
  mov    %edx,%eax
  add    %eax,%eax
  add    %edx,%eax
  cltq
  add    $0x2,%rax
  lea    0x0(,%rax,8),%rdx
  mov    0x30(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mov    -0xac(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x78(%rbp),%rax
  add    %rdx,%rax
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,(%rax)
  mov    -0xac(%rbp),%edx
  mov    %edx,%eax
  add    %eax,%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    0x30(%rbp),%rax
  add    %rax,%rdx
  mov    -0xac(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rcx
  mov    -0x70(%rbp),%rax
  add    %rcx,%rax
  movsd  (%rdx),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0xac(%rbp),%edx
  mov    %edx,%eax
  add    %eax,%eax
  add    %edx,%eax
  cltq
  add    $0x1,%rax
  lea    0x0(,%rax,8),%rdx
  mov    0x30(%rbp),%rax
  add    %rax,%rdx
  mov    -0xac(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rcx
  mov    -0x68(%rbp),%rax
  add    %rcx,%rax
  movsd  (%rdx),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0xac(%rbp),%edx
  mov    %edx,%eax
  add    %eax,%eax
  add    %edx,%eax
  cltq
  add    $0x2,%rax
  lea    0x0(,%rax,8),%rdx
  mov    0x30(%rbp),%rax
  add    %rax,%rdx
  mov    -0xac(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rcx
  mov    -0x60(%rbp),%rax
  add    %rcx,%rax
  movsd  (%rdx),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0xac(%rbp),%edx
  mov    %edx,%eax
  add    %eax,%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    0x30(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movsd  -0xd8(%rbp),%xmm1
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,-0x28(%rbp)
  mov    -0xac(%rbp),%edx
  mov    %edx,%eax
  add    %eax,%eax
  add    %edx,%eax
  cltq
  add    $0x1,%rax
  lea    0x0(,%rax,8),%rdx
  mov    0x30(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movsd  -0xd8(%rbp),%xmm1
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,-0x20(%rbp)
  mov    -0xac(%rbp),%edx
  mov    %edx,%eax
  add    %eax,%eax
  add    %edx,%eax
  cltq
  add    $0x2,%rax
  lea    0x0(,%rax,8),%rdx
  mov    0x30(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movsd  -0xd8(%rbp),%xmm1
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,-0x18(%rbp)
  movl   $0x0,-0xb0(%rbp)
  jmp    L33
L16:
  mov    -0xb0(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    0x28(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mulsd  -0x28(%rbp),%xmm0
  movq   %xmm0,%rax
  mov    -0xa8(%rbp),%rbx
  lea    0x8(%rbx),%rdx
  mov    %rdx,-0xa8(%rbp)
  movq   %rax,%xmm0
  call   <exp@plt>
  movq   %xmm0,%rax
  mov    %rax,(%rbx)
  mov    -0xb0(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    0x28(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mulsd  -0x20(%rbp),%xmm0
  movq   %xmm0,%rax
  mov    -0xa8(%rbp),%rbx
  lea    0x8(%rbx),%rdx
  mov    %rdx,-0xa8(%rbp)
  movq   %rax,%xmm0
  call   <exp@plt>
  movq   %xmm0,%rax
  mov    %rax,(%rbx)
  mov    -0xb0(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    0x28(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mulsd  -0x18(%rbp),%xmm0
  movq   %xmm0,%rax
  mov    -0xa8(%rbp),%rbx
  lea    0x8(%rbx),%rdx
  mov    %rdx,-0xa8(%rbp)
  movq   %rax,%xmm0
  call   <exp@plt>
  movq   %xmm0,%rax
  mov    %rax,(%rbx)
  addl   $0x1,-0xb0(%rbp)
L33:
  mov    -0xb0(%rbp),%eax
  cmp    -0xbc(%rbp),%eax
  jl     L16
  addl   $0x1,-0xac(%rbp)
L36:
  mov    -0xac(%rbp),%eax
  cmp    -0xc0(%rbp),%eax
  jl     L11
  mov    -0xb4(%rbp),%eax
  mov    %eax,-0xb0(%rbp)
  jmp    L47
L28:
  mov    -0xb0(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    0x40(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    %eax,-0xac(%rbp)
  mov    -0xac(%rbp),%eax
  imul   -0xbc(%rbp),%eax
  mov    %eax,%edx
  mov    -0xb0(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rcx
  mov    0x38(%rbp),%rax
  add    %rcx,%rax
  mov    (%rax),%eax
  add    %eax,%edx
  mov    %edx,%eax
  add    %eax,%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x90(%rbp),%rax
  add    %rdx,%rax
  mov    %rax,-0xa8(%rbp)
  mov    -0xb0(%rbp),%eax
  shl    $0x2,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0xc8(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movsd  %xmm0,-0x58(%rbp)
  mov    -0xa8(%rbp),%rax
  movsd  (%rax),%xmm1
  mov    -0xb0(%rbp),%eax
  shl    $0x2,%eax
  cltq
  add    $0x1,%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0xc8(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,-0x50(%rbp)
  movsd  -0x50(%rbp),%xmm0
  movsd  -0x58(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x58(%rbp)
  mov    -0xa8(%rbp),%rax
  add    $0x8,%rax
  movsd  (%rax),%xmm1
  mov    -0xb0(%rbp),%eax
  shl    $0x2,%eax
  cltq
  add    $0x2,%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0xc8(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,-0x48(%rbp)
  movsd  -0x48(%rbp),%xmm0
  movsd  -0x58(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x58(%rbp)
  mov    -0xa8(%rbp),%rax
  add    $0x10,%rax
  movsd  (%rax),%xmm1
  mov    -0xb0(%rbp),%eax
  shl    $0x2,%eax
  cltq
  add    $0x3,%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0xc8(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,-0x40(%rbp)
  movsd  -0x40(%rbp),%xmm0
  movsd  -0x58(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x58(%rbp)
  movsd  D8(%rip),%xmm0
  divsd  -0x58(%rbp),%xmm0
  movsd  %xmm0,-0x58(%rbp)
  mov    -0xac(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x70(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movsd  -0x50(%rbp),%xmm1
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,-0x38(%rbp)
  mov    -0xac(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x88(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movsd  -0x50(%rbp),%xmm1
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,-0x30(%rbp)
  mov    -0xac(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x68(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mulsd  -0x48(%rbp),%xmm0
  movsd  -0x38(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x38(%rbp)
  mov    -0xac(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x80(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mulsd  -0x48(%rbp),%xmm0
  movsd  -0x30(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x30(%rbp)
  mov    -0xac(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x60(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mulsd  -0x40(%rbp),%xmm0
  movsd  -0x38(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x38(%rbp)
  mov    -0xac(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x78(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mulsd  -0x40(%rbp),%xmm0
  movsd  -0x30(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x30(%rbp)
  movsd  -0x38(%rbp),%xmm0
  mulsd  -0x58(%rbp),%xmm0
  movsd  %xmm0,-0x38(%rbp)
  movsd  -0x30(%rbp),%xmm0
  mulsd  -0x58(%rbp),%xmm0
  movsd  %xmm0,-0x30(%rbp)
  mov    -0xb0(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    0x18(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mulsd  -0x38(%rbp),%xmm0
  movsd  -0xa0(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0xa0(%rbp)
  mov    -0xb0(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    0x20(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  movsd  -0x38(%rbp),%xmm0
  movapd %xmm0,%xmm2
  mulsd  %xmm0,%xmm2
  movsd  -0x30(%rbp),%xmm0
  subsd  %xmm2,%xmm0
  mulsd  %xmm1,%xmm0
  movsd  -0x98(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x98(%rbp)
  addl   $0x1,-0xb0(%rbp)
L47:
  mov    -0xb0(%rbp),%eax
  cmp    -0xb8(%rbp),%eax
  jl     L28
  mov    -0xd0(%rbp),%rax
  movsd  -0xa0(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  mov    0x10(%rbp),%rax
  movsd  -0x98(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x90(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  mov    -0x88(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  mov    -0x80(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  mov    -0x78(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  mov    -0x70(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  mov    -0x68(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  mov    -0x60(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  nop
  mov    -0x8(%rbp),%rbx
  leave
  ret
```

tool_calls: name: extract_symbolic_data
arguments: tag: D8
datatype: f64

tool: D8: 1

assistant: ```c
void coreGTRCATMULT(int lower, int upper, int numberOfCategories, int numberOfModels, double *sum, double *d1, double *d2, double *wrptr, double *wr2ptr, double *rptr, double *EIGN, int *cptr, int *modelptr, double lz) {
  int i, model;
  double *d, *d_start, tmp_0, tmp_1, tmp_2, inv_Li, dlnLidlz, d2lnLidlz2, dlnLdlz = 0.0, d2lnLdlz2 = 0.0;
  double *e1, *e2, *e3, *s1, *s2, *s3;
  d = d_start = (double *)malloc(numberOfModels * numberOfCategories * 3 * sizeof(double));
  e1 = (double *)malloc(numberOfModels * sizeof(double));
  e2 = (double *)malloc(numberOfModels * sizeof(double));
  e3 = (double *)malloc(numberOfModels * sizeof(double));
  s1 = (double *)malloc(numberOfModels * sizeof(double));
  s2 = (double *)malloc(numberOfModels * sizeof(double));
  s3 = (double *)malloc(numberOfModels * sizeof(double));
  for (model = 0; model < numberOfModels; model++) {
    double dd1, dd2, dd3;
    e1[model] = EIGN[model * 3] * EIGN[model * 3];
    e2[model] = EIGN[model * 3 + 1] * EIGN[model * 3 + 1];
    e3[model] = EIGN[model * 3 + 2] * EIGN[model * 3 + 2];
    s1[model] = EIGN[model * 3];
    s2[model] = EIGN[model * 3 + 1];
    s3[model] = EIGN[model * 3 + 2];
    dd1 = EIGN[model * 3] * lz;
    dd2 = EIGN[model * 3 + 1] * lz;
    dd3 = EIGN[model * 3 + 2] * lz;
    for (i = 0; i < numberOfCategories; i++) {
      *d++ = exp(dd1 * rptr[i]);
      *d++ = exp(dd2 * rptr[i]);
      *d++ = exp(dd3 * rptr[i]);
    }
  }
  for (i = lower; i < upper; i++) {
    model = modelptr[i];
    d = &d_start[model * numberOfCategories * 3 + 3 * cptr[i]];
    inv_Li = sum[4 * i];
    inv_Li += (tmp_0 = d[0] * sum[4 * i + 1]);
    inv_Li += (tmp_1 = d[1] * sum[4 * i + 2]);
    inv_Li += (tmp_2 = d[2] * sum[4 * i + 3]);
    inv_Li = 1.0 / inv_Li;
    dlnLidlz = tmp_0 * s1[model];
    d2lnLidlz2 = tmp_0 * e1[model];
    dlnLidlz += tmp_1 * s2[model];
    d2lnLidlz2 += tmp_1 * e2[model];
    dlnLidlz += tmp_2 * s3[model];
    d2lnLidlz2 += tmp_2 * e3[model];
    dlnLidlz *= inv_Li;
    d2lnLidlz2 *= inv_Li;
    dlnLdlz += wrptr[i] * dlnLidlz;
    d2lnLdlz2 += wr2ptr[i] * (d2lnLidlz2 - dlnLidlz * dlnLidlz);
  }
  *d1 = dlnLdlz;
  *d2 = d2lnLdlz2;
  free(d_start);
  free(e1);
  free(e2);
  free(e3);
  free(s1);
  free(s2);
  free(s3);
}
```