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

```asm
<evaluateGTRGAMMAPROTMULT>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x58,%rsp
  mov    %rdi,0x38(%rsp)
  mov    %rsi,0x20(%rsp)
  mov    %rdx,0x30(%rsp)
  mov    %rcx,0x28(%rsp)
  mov    %r8,0x40(%rsp)
  mov    %r9,0x18(%rsp)
  mov    0xc8(%rsp),%ebx
  pxor   %xmm7,%xmm7
  movsd  %xmm7,(%rsp)
  cmpl   $0x0,0xd0(%rsp)
  jne    L75
  mov    0xa8(%rsp),%rax
  movsd  (%rax),%xmm0
  movsd  D74(%rip),%xmm1
  comisd %xmm0,%xmm1
  jbe    L175
  movapd %xmm1,%xmm0
L175:
  call   <log@plt>
  movsd  %xmm0,(%rsp)
L75:
  movslq %ebx,%rax
  lea    (%rax,%rax,8),%rdx
  lea    (%rax,%rdx,2),%rdi
  shl    $0x5,%rdi
  call   <malloc@plt>
  mov    %rax,0x48(%rsp)
  test   %ebx,%ebx
  jle    L216
  lea    0x260(%rax),%r15
  mov    0x90(%rsp),%r13
  mov    %ebx,%eax
  mov    %rax,0x10(%rsp)
  mov    $0x0,%r12d
  jmp    L196
L83:
  lea    -0x260(%r15),%rbp
  mov    %r12,%r14
  shl    $0x5,%r14
  add    0x98(%rsp),%r14
  mov    %r12,0x8(%rsp)
L198:
  mov    (%r14),%r12
  mov    $0x0,%ebx
L20:
  movq   %r12,%xmm0
  mulsd  0x0(%r13,%rbx,1),%xmm0
  mulsd  (%rsp),%xmm0
  call   <exp@plt>
  movsd  %xmm0,0x0(%rbp,%rbx,1)
  add    $0x8,%rbx
  cmp    $0x98,%rbx
  jne    L20
  add    $0x98,%rbp
  add    $0x8,%r14
  cmp    %r15,%rbp
  jne    L198
  mov    0x8(%rsp),%r12
  add    $0x1,%r12
  add    $0x260,%r15
  add    $0x98,%r13
  cmp    0x10(%rsp),%r12
  je     L216
L196:
  cmpl   $0x0,0xd0(%rsp)
  je     L83
  mov    0xa8(%rsp),%rax
  movsd  (%rax,%r12,8),%xmm0
  movsd  D74(%rip),%xmm3
  movapd %xmm0,%xmm1
  cmpnltsd %xmm3,%xmm1
  andpd  %xmm1,%xmm0
  andnpd %xmm3,%xmm1
  orpd   %xmm1,%xmm0
  call   <log@plt>
  movsd  %xmm0,(%rsp)
  jmp    L83
L216:
  cmpq   $0x0,0xb0(%rsp)
  je     L29
  mov    0xc0(%rsp),%eax
  cmp    %eax,0xb8(%rsp)
  jge    L207
  movslq 0xb8(%rsp),%rbx
  sub    $0x1,%eax
  sub    0xb8(%rsp),%eax
  lea    0x1(%rbx,%rax,1),%rbp
  mov    D42(%rip),%r13
  mov    %r13,(%rsp)
  mov    0x48(%rsp),%r13
  mov    0x30(%rsp),%r12
  mov    0xa0(%rsp),%r15
  mov    0xb0(%rsp),%r14
  jmp    L15
L29:
  mov    0xc0(%rsp),%eax
  mov    D42(%rip),%r13
  cmp    %eax,0xb8(%rsp)
  jge    L9
  movslq 0xb8(%rsp),%rbx
  mov    0xb8(%rsp),%eax
  lea    (%rax,%rax,4),%ebp
  shl    $0x4,%ebp
  movslq %ebp,%rbp
  shl    $0x3,%rbp
  mov    0xc0(%rsp),%eax
  sub    $0x1,%eax
  sub    0xb8(%rsp),%eax
  lea    0x1(%rbx,%rax,1),%r12
  mov    D42(%rip),%r13
  mov    %r13,(%rsp)
  mov    0x48(%rsp),%r13
  mov    0x20(%rsp),%r14
  mov    0x28(%rsp),%r15
  jmp    L96
L105:
  mulsd  D79(%rip),%xmm0
  call   <log@plt>
  movapd %xmm0,%xmm1
  mov    0x20(%rsp),%rax
  pxor   %xmm0,%xmm0
  cvtsi2sdl (%rax,%rbx,4),%xmm0
  mulsd  D52(%rip),%xmm0
  addsd  %xmm1,%xmm0
  mov    0x28(%rsp),%rax
  pxor   %xmm1,%xmm1
  cvtsi2sdl (%rax,%rbx,4),%xmm1
  mulsd  %xmm1,%xmm0
  addsd  (%rsp),%xmm0
  movsd  %xmm0,(%rsp)
  add    $0x1,%rbx
  cmp    %rbp,%rbx
  je     L47
L15:
  mov    (%r12,%rbx,4),%edx
  movsbl (%r14,%rbx,1),%eax
  lea    (%rax,%rax,4),%ecx
  imul   $0x1cc,%edx,%eax
  lea    (%rax,%rcx,4),%eax
  cltq
  lea    (%r15,%rax,8),%rax
  imul   $0x4c,%edx,%edx
  movslq %edx,%rdx
  lea    0x0(%r13,%rdx,8),%rdx
  mov    (%rax),%r10
  mov    0x8(%rax),%r9
  mov    0x10(%rax),%r8
  mov    0x18(%rax),%rdi
  mov    0x20(%rax),%rsi
  movsd  0x28(%rax),%xmm15
  movsd  0x30(%rax),%xmm14
  movsd  0x38(%rax),%xmm13
  movsd  0x40(%rax),%xmm12
  movsd  0x48(%rax),%xmm11
  movsd  0x50(%rax),%xmm10
  movsd  0x58(%rax),%xmm9
  movsd  0x60(%rax),%xmm8
  movsd  0x68(%rax),%xmm7
  movsd  0x70(%rax),%xmm6
  movsd  0x78(%rax),%xmm5
  movsd  0x80(%rax),%xmm4
  movsd  0x88(%rax),%xmm3
  movsd  0x90(%rax),%xmm2
  mov    0x98(%rax),%r11
  lea    (%rbx,%rbx,4),%rax
  shl    $0x7,%rax
  add    0x18(%rsp),%rax
  lea    0x260(%rdx),%rcx
  pxor   %xmm0,%xmm0
L88:
  movq   %r10,%xmm1
  mulsd  (%rax),%xmm1
  addsd  %xmm1,%xmm0
  movq   %r9,%xmm1
  mulsd  0x8(%rax),%xmm1
  mulsd  (%rdx),%xmm1
  addsd  %xmm1,%xmm0
  movq   %r8,%xmm1
  mulsd  0x10(%rax),%xmm1
  mulsd  0x8(%rdx),%xmm1
  addsd  %xmm0,%xmm1
  movq   %rdi,%xmm0
  mulsd  0x18(%rax),%xmm0
  mulsd  0x10(%rdx),%xmm0
  addsd  %xmm1,%xmm0
  movq   %rsi,%xmm1
  mulsd  0x20(%rax),%xmm1
  mulsd  0x18(%rdx),%xmm1
  addsd  %xmm0,%xmm1
  movapd %xmm15,%xmm0
  mulsd  0x28(%rax),%xmm0
  mulsd  0x20(%rdx),%xmm0
  addsd  %xmm1,%xmm0
  movapd %xmm14,%xmm1
  mulsd  0x30(%rax),%xmm1
  mulsd  0x28(%rdx),%xmm1
  addsd  %xmm0,%xmm1
  movapd %xmm13,%xmm0
  mulsd  0x38(%rax),%xmm0
  mulsd  0x30(%rdx),%xmm0
  addsd  %xmm1,%xmm0
  movapd %xmm12,%xmm1
  mulsd  0x40(%rax),%xmm1
  mulsd  0x38(%rdx),%xmm1
  addsd  %xmm0,%xmm1
  movapd %xmm11,%xmm0
  mulsd  0x48(%rax),%xmm0
  mulsd  0x40(%rdx),%xmm0
  addsd  %xmm1,%xmm0
  movapd %xmm10,%xmm1
  mulsd  0x50(%rax),%xmm1
  mulsd  0x48(%rdx),%xmm1
  addsd  %xmm0,%xmm1
  movapd %xmm9,%xmm0
  mulsd  0x58(%rax),%xmm0
  mulsd  0x50(%rdx),%xmm0
  addsd  %xmm1,%xmm0
  movapd %xmm8,%xmm1
  mulsd  0x60(%rax),%xmm1
  mulsd  0x58(%rdx),%xmm1
  addsd  %xmm0,%xmm1
  movapd %xmm7,%xmm0
  mulsd  0x68(%rax),%xmm0
  mulsd  0x60(%rdx),%xmm0
  addsd  %xmm1,%xmm0
  movapd %xmm6,%xmm1
  mulsd  0x70(%rax),%xmm1
  mulsd  0x68(%rdx),%xmm1
  addsd  %xmm0,%xmm1
  movapd %xmm5,%xmm0
  mulsd  0x78(%rax),%xmm0
  mulsd  0x70(%rdx),%xmm0
  addsd  %xmm1,%xmm0
  movapd %xmm4,%xmm1
  mulsd  0x80(%rax),%xmm1
  mulsd  0x78(%rdx),%xmm1
  addsd  %xmm0,%xmm1
  movapd %xmm3,%xmm0
  mulsd  0x88(%rax),%xmm0
  mulsd  0x80(%rdx),%xmm0
  addsd  %xmm1,%xmm0
  movapd %xmm2,%xmm1
  mulsd  0x90(%rax),%xmm1
  mulsd  0x88(%rdx),%xmm1
  addsd  %xmm0,%xmm1
  add    $0x98,%rdx
  movq   %r11,%xmm0
  mulsd  0x98(%rax),%xmm0
  mulsd  -0x8(%rdx),%xmm0
  addsd  %xmm1,%xmm0
  add    $0xa0,%rax
  cmp    %rcx,%rdx
  jne    L88
  jmp    L105
L47:
  movq   %xmm0,%r13
L69:
  mov    0x48(%rsp),%rdi
  call   <free@plt>
L63:
  movq   %r13,%xmm0
  add    $0x58,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L207:
  mov    D42(%rip),%r13
  jmp    L69
L82:
  mulsd  D79(%rip),%xmm0
  call   <log@plt>
  movapd %xmm0,%xmm1
  mov    (%r14,%rbx,4),%eax
  mov    0x38(%rsp),%rdi
  add    (%rdi,%rbx,4),%eax
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  mulsd  D52(%rip),%xmm0
  addsd  %xmm1,%xmm0
  pxor   %xmm1,%xmm1
  cvtsi2sdl (%r15,%rbx,4),%xmm1
  mulsd  %xmm1,%xmm0
  addsd  (%rsp),%xmm0
  movsd  %xmm0,(%rsp)
  add    $0x1,%rbx
  add    $0x280,%rbp
  cmp    %r12,%rbx
  je     L18
L96:
  mov    0x30(%rsp),%rax
  imul   $0x4c,(%rax,%rbx,4),%eax
  cltq
  lea    0x0(%r13,%rax,8),%rax
  mov    0x40(%rsp),%rdi
  lea    (%rdi,%rbp,1),%rcx
  mov    0x18(%rsp),%rdi
  lea    (%rdi,%rbp,1),%rdx
  lea    0x260(%rax),%rsi
  pxor   %xmm0,%xmm0
L163:
  movsd  (%rcx),%xmm1
  mulsd  (%rdx),%xmm1
  addsd  %xmm1,%xmm0
  movsd  0x8(%rcx),%xmm1
  mulsd  0x8(%rdx),%xmm1
  mulsd  (%rax),%xmm1
  addsd  %xmm1,%xmm0
  movsd  0x10(%rcx),%xmm1
  mulsd  0x10(%rdx),%xmm1
  mulsd  0x8(%rax),%xmm1
  addsd  %xmm0,%xmm1
  movsd  0x18(%rcx),%xmm0
  mulsd  0x18(%rdx),%xmm0
  mulsd  0x10(%rax),%xmm0
  addsd  %xmm1,%xmm0
  movsd  0x20(%rcx),%xmm1
  mulsd  0x20(%rdx),%xmm1
  mulsd  0x18(%rax),%xmm1
  addsd  %xmm0,%xmm1
  movsd  0x28(%rcx),%xmm0
  mulsd  0x28(%rdx),%xmm0
  mulsd  0x20(%rax),%xmm0
  addsd  %xmm1,%xmm0
  movsd  0x30(%rcx),%xmm1
  mulsd  0x30(%rdx),%xmm1
  mulsd  0x28(%rax),%xmm1
  addsd  %xmm0,%xmm1
  movsd  0x38(%rcx),%xmm0
  mulsd  0x38(%rdx),%xmm0
  mulsd  0x30(%rax),%xmm0
  addsd  %xmm1,%xmm0
  movsd  0x40(%rcx),%xmm1
  mulsd  0x40(%rdx),%xmm1
  mulsd  0x38(%rax),%xmm1
  addsd  %xmm0,%xmm1
  movsd  0x48(%rcx),%xmm0
  mulsd  0x48(%rdx),%xmm0
  mulsd  0x40(%rax),%xmm0
  addsd  %xmm1,%xmm0
  movsd  0x50(%rcx),%xmm1
  mulsd  0x50(%rdx),%xmm1
  mulsd  0x48(%rax),%xmm1
  addsd  %xmm0,%xmm1
  movsd  0x58(%rcx),%xmm0
  mulsd  0x58(%rdx),%xmm0
  mulsd  0x50(%rax),%xmm0
  addsd  %xmm1,%xmm0
  movsd  0x60(%rcx),%xmm1
  mulsd  0x60(%rdx),%xmm1
  mulsd  0x58(%rax),%xmm1
  addsd  %xmm0,%xmm1
  movsd  0x68(%rcx),%xmm0
  mulsd  0x68(%rdx),%xmm0
  mulsd  0x60(%rax),%xmm0
  addsd  %xmm1,%xmm0
  movsd  0x70(%rcx),%xmm1
  mulsd  0x70(%rdx),%xmm1
  mulsd  0x68(%rax),%xmm1
  addsd  %xmm0,%xmm1
  movsd  0x78(%rcx),%xmm0
  mulsd  0x78(%rdx),%xmm0
  mulsd  0x70(%rax),%xmm0
  addsd  %xmm1,%xmm0
  movsd  0x80(%rcx),%xmm1
  mulsd  0x80(%rdx),%xmm1
  mulsd  0x78(%rax),%xmm1
  addsd  %xmm0,%xmm1
  movsd  0x88(%rcx),%xmm0
  mulsd  0x88(%rdx),%xmm0
  mulsd  0x80(%rax),%xmm0
  addsd  %xmm1,%xmm0
  movsd  0x90(%rcx),%xmm1
  mulsd  0x90(%rdx),%xmm1
  mulsd  0x88(%rax),%xmm1
  addsd  %xmm0,%xmm1
  add    $0x98,%rax
  movsd  0x98(%rcx),%xmm0
  mulsd  0x98(%rdx),%xmm0
  mulsd  -0x8(%rax),%xmm0
  addsd  %xmm1,%xmm0
  add    $0xa0,%rcx
  add    $0xa0,%rdx
  cmp    %rax,%rsi
  jne    L163
  jmp    L82
L18:
  movq   %xmm0,%r13
L9:
  mov    0x48(%rsp),%rdi
  call   <free@plt>
  jmp    L63
```

tool_calls: name: extract_symbolic_data
arguments: data_label: D74
type_guessed: byte[8]
name: extract_symbolic_data
arguments: data_label: D42
type_guessed: f64
name: extract_symbolic_data
arguments: data_label: D79
type_guessed: f64
name: extract_symbolic_data
arguments: data_label: D52
type_guessed: byte[8]

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

tool: D42: 0

tool: D79: 0.25

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

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