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

```asm
<evaluateGTRGAMMAMULT>:
  endbr64
  push   %r15
  mov    %rdx,%r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x68,%rsp
  mov    0xe0(%rsp),%eax
  mov    %rdi,0x38(%rsp)
  mov    %rsi,0x30(%rsp)
  mov    0xd8(%rsp),%ebx
  mov    %rcx,0x20(%rsp)
  mov    %r8,0x58(%rsp)
  mov    %r9,0x48(%rsp)
  test   %eax,%eax
  jne    L136
  mov    0xb8(%rsp),%rax
  movsd  D55(%rip),%xmm0
  maxsd  (%rax),%xmm0
  call   <log@plt>
  pxor   %xmm2,%xmm2
  movsd  %xmm0,(%rsp)
  movsd  %xmm2,0x40(%rsp)
L88:
  movslq %ebx,%rax
  xor    %r13d,%r13d
  lea    (%rax,%rax,2),%rdi
  mov    %rax,0x28(%rsp)
  shl    $0x5,%rdi
  call   <malloc@plt>
  mov    0xa0(%rsp),%rbp
  mov    %rax,0x18(%rsp)
  lea    0x60(%rax),%r12
  test   %ebx,%ebx
  jle    L57
  mov    %r15,0x50(%rsp)
  mov    0xe0(%rsp),%r15d
  nopw   0x0(%rax,%rax,1)
L11:
  test   %r15d,%r15d
  je     L109
  mov    0xb8(%rsp),%rax
  movsd  D55(%rip),%xmm0
  maxsd  (%rax,%r13,8),%xmm0
  call   <log@plt>
  movsd  %xmm0,(%rsp)
L109:
  movsd  0x0(%rbp),%xmm2
  mov    %r13,%rax
  lea    -0x60(%r12),%rbx
  shl    $0x5,%rax
  add    0xa8(%rsp),%rax
  movsd  %xmm2,0x10(%rsp)
  mov    %rax,%r14
L80:
  movsd  (%r14),%xmm6
  movsd  0x10(%rsp),%xmm0
  add    $0x18,%rbx
  add    $0x8,%r14
  mulsd  %xmm6,%xmm0
  movsd  %xmm6,0x8(%rsp)
  mulsd  (%rsp),%xmm0
  call   <exp@plt>
  movsd  %xmm0,-0x18(%rbx)
  movsd  0x8(%rsp),%xmm0
  mulsd  0x8(%rbp),%xmm0
  mulsd  (%rsp),%xmm0
  call   <exp@plt>
  movsd  %xmm0,-0x10(%rbx)
  movsd  0x8(%rsp),%xmm0
  mulsd  0x10(%rbp),%xmm0
  mulsd  (%rsp),%xmm0
  call   <exp@plt>
  movsd  %xmm0,-0x8(%rbx)
  cmp    %r12,%rbx
  jne    L80
  add    $0x1,%r13
  add    $0x18,%rbp
  add    $0x60,%r12
  cmp    %r13,0x28(%rsp)
  jne    L11
  mov    0x50(%rsp),%r15
L57:
  cmpq   $0x0,0xc0(%rsp)
  je     L122
  mov    0xd0(%rsp),%eax
  cmp    %eax,0xc8(%rsp)
  jge    L29
  movslq 0xc8(%rsp),%r12
  movsd  0x40(%rsp),%xmm2
  lea    -0x1(%rax),%ebx
  movsd  D6(%rip),%xmm3
  sub    0xc8(%rsp),%ebx
  mov    %r12,%rbp
  movsd  %xmm2,(%rsp)
  movsd  D36(%rip),%xmm2
  lea    0x1(%r12),%r13
  shl    $0x7,%rbp
  add    0x48(%rsp),%rbp
  add    %r13,%rbx
  movsd  %xmm3,0x10(%rsp)
  mov    %rbp,%r14
  movsd  %xmm2,0x8(%rsp)
  mov    %r12,%rbp
  mov    %r15,%r12
  mov    0xc0(%rsp),%r15
  jmp    L30
  nopl   0x0(%rax,%rax,1)
L71:
  add    $0x1,%r13
L30:
  mov    (%r12,%rbp,4),%r8d
  movsbl (%r15,%rbp,1),%r9d
  sub    $0xffffffffffffff80,%r14
  mov    0xb0(%rsp),%rax
  movsd  -0x78(%r14),%xmm0
  mov    %r8d,%edx
  movsd  -0x80(%r14),%xmm1
  movsd  -0x70(%r14),%xmm5
  shl    $0x4,%edx
  movsd  -0x68(%r14),%xmm4
  add    %r9d,%edx
  shl    $0x2,%edx
  movslq %edx,%rdx
  lea    (%rax,%rdx,8),%r9
  lea    (%r8,%r8,2),%edx
  mov    0x18(%rsp),%rax
  movsd  0x8(%r9),%xmm2
  shl    $0x2,%edx
  movsd  (%r9),%xmm3
  movslq %edx,%rdx
  lea    (%rax,%rdx,8),%rdx
  mulsd  %xmm2,%xmm0
  mulsd  %xmm3,%xmm1
  mulsd  (%rdx),%xmm0
  addsd  %xmm1,%xmm0
  movsd  0x10(%r9),%xmm1
  mulsd  %xmm1,%xmm5
  mulsd  0x8(%rdx),%xmm5
  addsd  %xmm0,%xmm5
  movsd  0x18(%r9),%xmm0
  mulsd  %xmm0,%xmm4
  mulsd  0x10(%rdx),%xmm4
  addsd  %xmm5,%xmm4
  movsd  -0x60(%r14),%xmm5
  mulsd  %xmm3,%xmm5
  addsd  %xmm4,%xmm5
  movsd  -0x58(%r14),%xmm4
  mulsd  %xmm2,%xmm4
  mulsd  0x18(%rdx),%xmm4
  addsd  %xmm5,%xmm4
  movsd  -0x50(%r14),%xmm5
  mulsd  %xmm1,%xmm5
  mulsd  0x20(%rdx),%xmm5
  addsd  %xmm4,%xmm5
  movsd  -0x48(%r14),%xmm4
  mulsd  %xmm0,%xmm4
  mulsd  0x28(%rdx),%xmm4
  addsd  %xmm5,%xmm4
  movsd  -0x40(%r14),%xmm5
  mulsd  %xmm3,%xmm5
  mulsd  -0x20(%r14),%xmm3
  addsd  %xmm4,%xmm5
  movsd  -0x38(%r14),%xmm4
  mulsd  %xmm2,%xmm4
  mulsd  0x30(%rdx),%xmm4
  mulsd  -0x18(%r14),%xmm2
  mulsd  0x48(%rdx),%xmm2
  addsd  %xmm5,%xmm4
  movsd  -0x30(%r14),%xmm5
  mulsd  %xmm1,%xmm5
  mulsd  0x38(%rdx),%xmm5
  addsd  %xmm4,%xmm5
  movsd  -0x28(%r14),%xmm4
  mulsd  %xmm0,%xmm4
  mulsd  0x40(%rdx),%xmm4
  mulsd  -0x10(%r14),%xmm1
  mulsd  0x50(%rdx),%xmm1
  mulsd  -0x8(%r14),%xmm0
  mulsd  0x58(%rdx),%xmm0
  addsd  %xmm5,%xmm4
  addsd  %xmm4,%xmm3
  addsd  %xmm3,%xmm2
  addsd  %xmm2,%xmm1
  addsd  %xmm1,%xmm0
  mulsd  0x8(%rsp),%xmm0
  call   <log@plt>
  mov    0x30(%rsp),%rax
  movapd %xmm0,%xmm1
  pxor   %xmm0,%xmm0
  cvtsi2sdl (%rax,%rbp,4),%xmm0
  mulsd  0x10(%rsp),%xmm0
  mov    0x20(%rsp),%rax
  addsd  %xmm1,%xmm0
  pxor   %xmm1,%xmm1
  cvtsi2sdl (%rax,%rbp,4),%xmm1
  mov    %r13,%rbp
  mulsd  %xmm1,%xmm0
  addsd  (%rsp),%xmm0
  movsd  %xmm0,(%rsp)
  cmp    %r13,%rbx
  jne    L71
L111:
  mov    0x18(%rsp),%rdi
  call   <free@plt>
  movsd  (%rsp),%xmm0
  add    $0x68,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopw   0x0(%rax,%rax,1)
L136:
  pxor   %xmm3,%xmm3
  movsd  %xmm3,0x40(%rsp)
  movsd  %xmm3,(%rsp)
  jmp    L88
L122:
  mov    0xd0(%rsp),%eax
  cmp    %eax,0xc8(%rsp)
  jge    L29
  movslq 0xc8(%rsp),%r13
  mov    0xd0(%rsp),%eax
  movsd  0x40(%rsp),%xmm3
  mov    0x58(%rsp),%r12
  mov    %r13,%rbp
  lea    -0x1(%rax),%ebx
  movsd  D36(%rip),%xmm2
  shl    $0x7,%rbp
  mov    %ebx,%eax
  movsd  %xmm3,(%rsp)
  lea    0x1(%r13),%rbx
  sub    0xc8(%rsp),%eax
  add    %rbp,%r12
  movsd  D6(%rip),%xmm3
  movsd  %xmm2,0x8(%rsp)
  lea    (%rax,%rbx,1),%r14
  add    0x48(%rsp),%rbp
  mov    %r14,0x28(%rsp)
  mov    %rbx,%r14
  mov    %r12,%rbx
  mov    %r13,%r12
  movsd  %xmm3,0x10(%rsp)
  mov    0x30(%rsp),%r13
  jmp    L84
  nopl   0x0(%rax,%rax,1)
L116:
  add    $0x1,%r14
L84:
  mov    (%r15,%r12,4),%edx
  movsd  (%rbx),%xmm1
  sub    $0xffffffffffffff80,%rbp
  sub    $0xffffffffffffff80,%rbx
  mov    0x18(%rsp),%rax
  movsd  -0x78(%rbx),%xmm0
  lea    (%rdx,%rdx,2),%edx
  mulsd  -0x78(%rbp),%xmm0
  mulsd  -0x80(%rbp),%xmm1
  shl    $0x2,%edx
  movslq %edx,%rdx
  lea    (%rax,%rdx,8),%rdx
  mulsd  (%rdx),%xmm0
  addsd  %xmm1,%xmm0
  movsd  -0x70(%rbx),%xmm1
  mulsd  -0x70(%rbp),%xmm1
  mulsd  0x8(%rdx),%xmm1
  addsd  %xmm0,%xmm1
  movsd  -0x68(%rbx),%xmm0
  mulsd  -0x68(%rbp),%xmm0
  mulsd  0x10(%rdx),%xmm0
  addsd  %xmm1,%xmm0
  movsd  -0x60(%rbx),%xmm1
  mulsd  -0x60(%rbp),%xmm1
  addsd  %xmm0,%xmm1
  movsd  -0x58(%rbx),%xmm0
  mulsd  -0x58(%rbp),%xmm0
  mulsd  0x18(%rdx),%xmm0
  addsd  %xmm1,%xmm0
  movsd  -0x50(%rbx),%xmm1
  mulsd  -0x50(%rbp),%xmm1
  mulsd  0x20(%rdx),%xmm1
  addsd  %xmm0,%xmm1
  movsd  -0x48(%rbx),%xmm0
  mulsd  -0x48(%rbp),%xmm0
  mulsd  0x28(%rdx),%xmm0
  addsd  %xmm1,%xmm0
  movsd  -0x40(%rbx),%xmm1
  mulsd  -0x40(%rbp),%xmm1
  addsd  %xmm0,%xmm1
  movsd  -0x38(%rbx),%xmm0
  mulsd  -0x38(%rbp),%xmm0
  mulsd  0x30(%rdx),%xmm0
  addsd  %xmm1,%xmm0
  movsd  -0x30(%rbx),%xmm1
  mulsd  -0x30(%rbp),%xmm1
  mulsd  0x38(%rdx),%xmm1
  addsd  %xmm0,%xmm1
  movsd  -0x28(%rbx),%xmm0
  mulsd  -0x28(%rbp),%xmm0
  mulsd  0x40(%rdx),%xmm0
  addsd  %xmm1,%xmm0
  movsd  -0x20(%rbx),%xmm1
  mulsd  -0x20(%rbp),%xmm1
  addsd  %xmm0,%xmm1
  movsd  -0x18(%rbx),%xmm0
  mulsd  -0x18(%rbp),%xmm0
  mulsd  0x48(%rdx),%xmm0
  addsd  %xmm1,%xmm0
  movsd  -0x10(%rbx),%xmm1
  mulsd  -0x10(%rbp),%xmm1
  mulsd  0x50(%rdx),%xmm1
  addsd  %xmm0,%xmm1
  movsd  -0x8(%rbx),%xmm0
  mulsd  -0x8(%rbp),%xmm0
  mulsd  0x58(%rdx),%xmm0
  addsd  %xmm1,%xmm0
  mulsd  0x8(%rsp),%xmm0
  call   <log@plt>
  mov    0x38(%rsp),%rax
  mov    0x0(%r13,%r12,4),%edx
  movapd %xmm0,%xmm1
  pxor   %xmm0,%xmm0
  add    (%rax,%r12,4),%edx
  mov    0x20(%rsp),%rax
  cvtsi2sd %edx,%xmm0
  mulsd  0x10(%rsp),%xmm0
  addsd  %xmm1,%xmm0
  pxor   %xmm1,%xmm1
  cvtsi2sdl (%rax,%r12,4),%xmm1
  mov    %r14,%r12
  mulsd  %xmm1,%xmm0
  addsd  (%rsp),%xmm0
  movsd  %xmm0,(%rsp)
  cmp    %r14,0x28(%rsp)
  jne    L116
  jmp    L111
L29:
  movsd  0x40(%rsp),%xmm2
  movsd  %xmm2,(%rsp)
  jmp    L111
```

tool_calls: name: parse_data
arguments: data_tag: D55
type: byte[8]
name: parse_data
arguments: data_tag: D6
type: byte[8]
name: parse_data
arguments: data_tag: D36
type: f64

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

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

tool: D36: 0.25

assistant: ```c
double evaluateGTRGAMMAMULT(int *ex1, int *ex2, int *modelptr, int *wptr, double *x1_start, double *x2_start, double *EIGN, double *gammaRates, double *tipVector, double *pz, char *tipX1, int lower, int n, int numberOfModels, int multiBranch) {
  double sum = 0.0, z, lz = 0.0, term, ki;
  int i, model;
  double *diagptable, *diagptable_start, *x1, *x2;
  if (!multiBranch) {
    z = pz[0];
    if (z < 1.0E-15)
      z = 1.0E-15;
    lz = log(z);
  }
  diagptable = diagptable_start = (double *)malloc(sizeof(double) * 12 * numberOfModels);
  for (model = 0; model < numberOfModels; model++) {
    if (multiBranch) {
      z = pz[model];
      if (z < 1.0E-15)
        z = 1.0E-15;
      lz = log(z);
    }
    diagptable = &diagptable_start[12 * model];
    for (i = 0; i < 4; i++) {
      ki = gammaRates[model * 4 + i];
      *diagptable++ = exp(EIGN[model * 3] * ki * lz);
      *diagptable++ = exp(EIGN[model * 3 + 1] * ki * lz);
      *diagptable++ = exp(EIGN[model * 3 + 2] * ki * lz);
    }
  }
  if (tipX1) {
    for (i = lower; i < n; i++) {
      model = modelptr[i];
      x1 = &(tipVector[64 * model + 4 * tipX1[i]]);
      x2 = &x2_start[16 * i];
      diagptable = &diagptable_start[12 * model];
      term = x1[0] * x2[0];
      term += x1[1] * x2[1] * *diagptable++;
      term += x1[2] * x2[2] * *diagptable++;
      term += x1[3] * x2[3] * *diagptable++;
      term += x1[0] * x2[4];
      term += x1[1] * x2[5] * *diagptable++;
      term += x1[2] * x2[6] * *diagptable++;
      term += x1[3] * x2[7] * *diagptable++;
      term += x1[0] * x2[8];
      term += x1[1] * x2[9] * *diagptable++;
      term += x1[2] * x2[10] * *diagptable++;
      term += x1[3] * x2[11] * *diagptable++;
      term += x1[0] * x2[12];
      term += x1[1] * x2[13] * *diagptable++;
      term += x1[2] * x2[14] * *diagptable++;
      term += x1[3] * x2[15] * *diagptable++;
      term = log(0.25 * term) + (ex2[i] * log((1.0 / 115792089237316195423570985008687907853269984665640564039457584007913129639936.0)));
      sum += wptr[i] * term;
    }
    free(diagptable_start);
    return sum;
  } else {
    for (i = lower; i < n; i++) {
      model = modelptr[i];
      diagptable = &diagptable_start[model * 12];
      x1 = &x1_start[16 * i];
      x2 = &x2_start[16 * 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 += x1[4] * x2[4];
      term += x1[5] * x2[5] * *diagptable++;
      term += x1[6] * x2[6] * *diagptable++;
      term += x1[7] * x2[7] * *diagptable++;
      term += x1[8] * x2[8];
      term += x1[9] * x2[9] * *diagptable++;
      term += x1[10] * x2[10] * *diagptable++;
      term += x1[11] * x2[11] * *diagptable++;
      term += x1[12] * x2[12];
      term += x1[13] * x2[13] * *diagptable++;
      term += x1[14] * x2[14] * *diagptable++;
      term += x1[15] * x2[15] * *diagptable++;
      term = log(0.25 * term) + ((ex1[i] + ex2[i]) * log((1.0 / 115792089237316195423570985008687907853269984665640564039457584007913129639936.0)));
      sum += wptr[i] * term;
    }
    free(diagptable_start);
    return sum;
  }
}
```