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

```asm
<evaluateGTRCATMULT_VECTOR>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %rbx
  sub    $0xa8,%rsp
  mov    %rdi,-0x88(%rbp)
  mov    %rsi,-0x90(%rbp)
  mov    %rdx,-0x98(%rbp)
  mov    %rcx,-0xa0(%rbp)
  mov    %r8,-0xa8(%rbp)
  mov    %r9,-0xb0(%rbp)
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x60(%rbp)
  cmpl   $0x0,0x50(%rbp)
  jne    L14
  mov    0x20(%rbp),%rax
  movsd  (%rax),%xmm0
  movsd  %xmm0,-0x68(%rbp)
  movsd  D48(%rip),%xmm0
  comisd -0x68(%rbp),%xmm0
  jbe    L87
  movsd  D48(%rip),%xmm0
  movsd  %xmm0,-0x68(%rbp)
L87:
  mov    -0x68(%rbp),%rax
  movq   %rax,%xmm0
  call   <log@plt>
  movq   %xmm0,%rax
  mov    %rax,-0x60(%rbp)
L14:
  mov    0x40(%rbp),%eax
  movslq %eax,%rdx
  mov    0x48(%rbp),%eax
  cltq
  imul   %rax,%rdx
  mov    %rdx,%rax
  add    %rax,%rax
  add    %rdx,%rax
  shl    $0x3,%rax
  mov    %rax,%rdi
  call   <malloc@plt>
  mov    %rax,-0x50(%rbp)
  mov    -0x50(%rbp),%rax
  mov    %rax,-0x58(%rbp)
  movl   $0x0,-0x70(%rbp)
  jmp    L78
L50:
  cmpl   $0x0,0x50(%rbp)
  je     L97
  mov    -0x70(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    0x20(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movsd  %xmm0,-0x68(%rbp)
  movsd  D48(%rip),%xmm0
  comisd -0x68(%rbp),%xmm0
  jbe    L86
  movsd  D48(%rip),%xmm0
  movsd  %xmm0,-0x68(%rbp)
L86:
  mov    -0x68(%rbp),%rax
  movq   %rax,%xmm0
  call   <log@plt>
  movq   %xmm0,%rax
  mov    %rax,-0x60(%rbp)
L97:
  mov    -0x70(%rbp),%edx
  mov    %edx,%eax
  add    %eax,%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0xb0(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movsd  -0x60(%rbp),%xmm1
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,-0x30(%rbp)
  mov    -0x70(%rbp),%edx
  mov    %edx,%eax
  add    %eax,%eax
  add    %edx,%eax
  cltq
  add    $0x1,%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0xb0(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movsd  -0x60(%rbp),%xmm1
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,-0x28(%rbp)
  mov    -0x70(%rbp),%edx
  mov    %edx,%eax
  add    %eax,%eax
  add    %edx,%eax
  cltq
  add    $0x2,%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0xb0(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movsd  -0x60(%rbp),%xmm1
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,-0x20(%rbp)
  movl   $0x0,-0x74(%rbp)
  jmp    L99
L70:
  mov    -0x74(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    0x10(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movsd  %xmm0,-0x18(%rbp)
  movsd  -0x18(%rbp),%xmm0
  mulsd  -0x30(%rbp),%xmm0
  movq   %xmm0,%rax
  mov    -0x58(%rbp),%rbx
  lea    0x8(%rbx),%rdx
  mov    %rdx,-0x58(%rbp)
  movq   %rax,%xmm0
  call   <exp@plt>
  movq   %xmm0,%rax
  mov    %rax,(%rbx)
  movsd  -0x18(%rbp),%xmm0
  mulsd  -0x28(%rbp),%xmm0
  movq   %xmm0,%rax
  mov    -0x58(%rbp),%rbx
  lea    0x8(%rbx),%rdx
  mov    %rdx,-0x58(%rbp)
  movq   %rax,%xmm0
  call   <exp@plt>
  movq   %xmm0,%rax
  mov    %rax,(%rbx)
  movsd  -0x18(%rbp),%xmm0
  mulsd  -0x20(%rbp),%xmm0
  movq   %xmm0,%rax
  mov    -0x58(%rbp),%rbx
  lea    0x8(%rbx),%rdx
  mov    %rdx,-0x58(%rbp)
  movq   %rax,%xmm0
  call   <exp@plt>
  movq   %xmm0,%rax
  mov    %rax,(%rbx)
  addl   $0x1,-0x74(%rbp)
L99:
  mov    -0x74(%rbp),%eax
  cmp    0x40(%rbp),%eax
  jl     L70
  addl   $0x1,-0x70(%rbp)
L78:
  mov    -0x70(%rbp),%eax
  cmp    0x48(%rbp),%eax
  jl     L50
  mov    0x30(%rbp),%eax
  mov    %eax,-0x74(%rbp)
  jmp    L6
L92:
  mov    -0x74(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x98(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    %eax,-0x6c(%rbp)
  mov    -0x6c(%rbp),%eax
  shl    $0x4,%eax
  mov    %eax,%ecx
  mov    -0x74(%rbp),%eax
  movslq %eax,%rdx
  mov    0x28(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  add    %ecx,%eax
  shl    $0x2,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    0x18(%rbp),%rax
  add    %rdx,%rax
  mov    %rax,-0x48(%rbp)
  mov    -0x74(%rbp),%eax
  shl    $0x2,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0xa0(%rbp),%rax
  add    %rdx,%rax
  mov    %rax,-0x40(%rbp)
  mov    -0x6c(%rbp),%eax
  imul   0x40(%rbp),%eax
  mov    %eax,%edx
  mov    -0x74(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rcx
  mov    -0x90(%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    -0x50(%rbp),%rax
  add    %rdx,%rax
  mov    %rax,-0x58(%rbp)
  mov    -0x48(%rbp),%rax
  movsd  (%rax),%xmm1
  mov    -0x40(%rbp),%rax
  movsd  (%rax),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,-0x38(%rbp)
  mov    -0x48(%rbp),%rax
  add    $0x8,%rax
  movsd  (%rax),%xmm1
  mov    -0x40(%rbp),%rax
  add    $0x8,%rax
  movsd  (%rax),%xmm0
  mulsd  %xmm0,%xmm1
  mov    -0x58(%rbp),%rax
  lea    0x8(%rax),%rdx
  mov    %rdx,-0x58(%rbp)
  movsd  (%rax),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  -0x38(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x38(%rbp)
  mov    -0x48(%rbp),%rax
  add    $0x10,%rax
  movsd  (%rax),%xmm1
  mov    -0x40(%rbp),%rax
  add    $0x10,%rax
  movsd  (%rax),%xmm0
  mulsd  %xmm0,%xmm1
  mov    -0x58(%rbp),%rax
  lea    0x8(%rax),%rdx
  mov    %rdx,-0x58(%rbp)
  movsd  (%rax),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  -0x38(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x38(%rbp)
  mov    -0x48(%rbp),%rax
  add    $0x18,%rax
  movsd  (%rax),%xmm1
  mov    -0x40(%rbp),%rax
  add    $0x18,%rax
  movsd  (%rax),%xmm0
  mulsd  %xmm0,%xmm1
  mov    -0x58(%rbp),%rax
  lea    0x8(%rax),%rdx
  mov    %rdx,-0x58(%rbp)
  movsd  (%rax),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  -0x38(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x38(%rbp)
  mov    -0x38(%rbp),%rax
  movq   %rax,%xmm0
  call   <log@plt>
  mov    -0x74(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x88(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  pxor   %xmm2,%xmm2
  cvtsi2sd %eax,%xmm2
  movsd  D27(%rip),%xmm1
  mulsd  %xmm2,%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x38(%rbp)
  mov    -0x74(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0xa8(%rbp),%rax
  add    %rdx,%rax
  movsd  -0x38(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  addl   $0x1,-0x74(%rbp)
L6:
  mov    -0x74(%rbp),%eax
  cmp    0x38(%rbp),%eax
  jl     L92
  mov    -0x50(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  nop
  mov    -0x8(%rbp),%rbx
  leave
  ret
```

tool_calls: name: extract_symbolic_data
arguments: label: D48
datatype: byte[8]
name: extract_symbolic_data
arguments: label: D27
datatype: byte[8]

tool: {"D48": [0x16,0x56,0xe7,0x9e,0xaf,0x03,0xd2,0x3c]}

tool: {"D27": [0xef,0x39,0xfa,0xfe,0x42,0x2e,0x66,0xc0]}

assistant: ```c
void evaluateGTRCATMULT_VECTOR(int *ex2, int *cptr, int *modelptr, double *x2_start, double *v, double *EIGN, double *rptr, double *tipVector, double *pz, char *tipX1, int lower, int n, int numberOfCategories, int numberOfModels, int multiBranch) {
  double z, lz = 0.0, ki, lz1, lz2, lz3, term;
  int i;
  double *diagptable, *diagptable_start;
  double *x1, *x2;
  int model, modelCounter;
  if (!multiBranch) {
    z = pz[0];
    if (z < 1.0E-15)
      z = 1.0E-15;
    lz = log(z);
  }
  diagptable = diagptable_start = (double *)malloc(sizeof(double) * numberOfCategories * 3 * numberOfModels);
  for (modelCounter = 0; modelCounter < numberOfModels; modelCounter++) {
    if (multiBranch) {
      z = pz[modelCounter];
      if (z < 1.0E-15)
        z = 1.0E-15;
      lz = log(z);
    }
    lz1 = EIGN[modelCounter * 3] * lz;
    lz2 = EIGN[modelCounter * 3 + 1] * lz;
    lz3 = EIGN[modelCounter * 3 + 2] * lz;
    for (i = 0; i < numberOfCategories; i++) {
      ki = rptr[i];
      *diagptable++ = exp(ki * lz1);
      *diagptable++ = exp(ki * lz2);
      *diagptable++ = exp(ki * lz3);
    }
  }
  for (i = lower; i < n; i++) {
    model = modelptr[i];
    x1 = &(tipVector[model * 64 + 4 * tipX1[i]]);
    x2 = &x2_start[4 * i];
    diagptable = &diagptable_start[model * 3 * numberOfCategories + 3 * cptr[i]];
    term = x1[0] * x2[0];
    term += x1[1] * x2[1] * *diagptable++;
    term += x1[2] * x2[2] * *diagptable++;
    term += x1[3] * x2[3] * *diagptable++;
    term = (log(term)) + (ex2[i] * log((1.0 / 115792089237316195423570985008687907853269984665640564039457584007913129639936.0)));
    v[i] = term;
  }
  free(diagptable_start);
}
```