user: 请显示与下面列出的汇编代码相匹配的C语言实现:

```asm
<categorizeGTRGAMMAPROT>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x78,%rsp
  mov    %rdi,0x18(%rsp)
  mov    %rsi,0x20(%rsp)
  mov    %rdx,0x8(%rsp)
  mov    %r8,%r13
  mov    %r9,%r12
  mov    0xb0(%rsp),%rax
  mov    %rax,0x28(%rsp)
  mov    0xb8(%rsp),%rax
  mov    %rax,0x30(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0x68(%rsp)
  xor    %eax,%eax
  movsd  (%rcx),%xmm0
  movsd  D19(%rip),%xmm1
  comisd %xmm0,%xmm1
  jbe    L11
  movapd %xmm1,%xmm0
L11:
  call   <log@plt>
  movsd  %xmm0,(%rsp)
  mov    $0x260,%edi
  call   <malloc@plt>
  mov    %rax,%rbp
  mov    %rax,0x10(%rsp)
  lea    0x260(%rax),%r14
L118:
  mov    0x0(%r13),%r15
  mov    $0x0,%ebx
L73:
  movq   %r15,%xmm0
  mulsd  (%r12,%rbx,1),%xmm0
  mulsd  (%rsp),%xmm0
  call   <exp@plt>
  movsd  %xmm0,0x0(%rbp,%rbx,1)
  add    $0x8,%rbx
  cmp    $0x98,%rbx
  jne    L73
  add    $0x98,%rbp
  add    $0x8,%r13
  cmp    %r14,%rbp
  jne    L118
  mov    0xc8(%rsp),%eax
  cmp    %eax,0xc0(%rsp)
  jge    L15
  movslq 0xc0(%rsp),%r14
  sub    $0x1,%eax
  sub    0xc0(%rsp),%eax
  lea    0x1(%r14,%rax,1),%rax
  mov    %rax,0x38(%rsp)
  movl   $0x0,(%rsp)
  jmp    L13
L76:
  movsd  D1(%rip),%xmm0
  jmp    L93
L79:
  ucomisd %xmm3,%xmm0
  mov    $0x3,%eax
  cmovbe (%rsp),%eax
  mov    %eax,(%rsp)
  mov    0x30(%rsp),%rsi
  mov    %eax,(%rsi,%r14,4)
  add    $0x1,%r14
  cmp    0x38(%rsp),%r14
  je     L15
L13:
  mov    0x18(%rsp),%rax
  movsbl (%rax,%r14,1),%eax
  lea    (%rax,%rax,4),%eax
  shl    $0x2,%eax
  cltq
  mov    0x28(%rsp),%rdx
  lea    (%rdx,%rax,8),%r12
  lea    (%r14,%r14,4),%rbx
  shl    $0x7,%rbx
  add    0x20(%rsp),%rbx
  lea    0x40(%rsp),%r13
  lea    0x60(%rsp),%r15
  mov    0x10(%rsp),%rbp
L110:
  movsd  0x8(%r12),%xmm1
  mulsd  0x8(%rbx),%xmm1
  mulsd  0x0(%rbp),%xmm1
  movsd  (%r12),%xmm0
  mulsd  (%rbx),%xmm0
  pxor   %xmm7,%xmm7
  addsd  %xmm7,%xmm0
  addsd  %xmm0,%xmm1
  movsd  0x10(%r12),%xmm0
  mulsd  0x10(%rbx),%xmm0
  mulsd  0x8(%rbp),%xmm0
  addsd  %xmm0,%xmm1
  movsd  0x18(%r12),%xmm0
  mulsd  0x18(%rbx),%xmm0
  mulsd  0x10(%rbp),%xmm0
  addsd  %xmm0,%xmm1
  movsd  0x20(%r12),%xmm0
  mulsd  0x20(%rbx),%xmm0
  mulsd  0x18(%rbp),%xmm0
  addsd  %xmm0,%xmm1
  movsd  0x28(%r12),%xmm0
  mulsd  0x28(%rbx),%xmm0
  mulsd  0x20(%rbp),%xmm0
  addsd  %xmm0,%xmm1
  movsd  0x30(%r12),%xmm0
  mulsd  0x30(%rbx),%xmm0
  mulsd  0x28(%rbp),%xmm0
  addsd  %xmm0,%xmm1
  movsd  0x38(%r12),%xmm0
  mulsd  0x38(%rbx),%xmm0
  mulsd  0x30(%rbp),%xmm0
  addsd  %xmm0,%xmm1
  movsd  0x40(%r12),%xmm0
  mulsd  0x40(%rbx),%xmm0
  mulsd  0x38(%rbp),%xmm0
  addsd  %xmm0,%xmm1
  movsd  0x48(%r12),%xmm0
  mulsd  0x48(%rbx),%xmm0
  mulsd  0x40(%rbp),%xmm0
  addsd  %xmm0,%xmm1
  movsd  0x50(%r12),%xmm0
  mulsd  0x50(%rbx),%xmm0
  mulsd  0x48(%rbp),%xmm0
  addsd  %xmm0,%xmm1
  movsd  0x58(%r12),%xmm0
  mulsd  0x58(%rbx),%xmm0
  mulsd  0x50(%rbp),%xmm0
  addsd  %xmm0,%xmm1
  movsd  0x60(%r12),%xmm0
  mulsd  0x60(%rbx),%xmm0
  mulsd  0x58(%rbp),%xmm0
  addsd  %xmm0,%xmm1
  movsd  0x68(%r12),%xmm0
  mulsd  0x68(%rbx),%xmm0
  mulsd  0x60(%rbp),%xmm0
  addsd  %xmm0,%xmm1
  movsd  0x70(%r12),%xmm0
  mulsd  0x70(%rbx),%xmm0
  mulsd  0x68(%rbp),%xmm0
  addsd  %xmm0,%xmm1
  movsd  0x78(%r12),%xmm0
  mulsd  0x78(%rbx),%xmm0
  mulsd  0x70(%rbp),%xmm0
  addsd  %xmm0,%xmm1
  movsd  0x80(%r12),%xmm0
  mulsd  0x80(%rbx),%xmm0
  mulsd  0x78(%rbp),%xmm0
  addsd  %xmm0,%xmm1
  movsd  0x88(%r12),%xmm0
  mulsd  0x88(%rbx),%xmm0
  mulsd  0x80(%rbp),%xmm0
  addsd  %xmm0,%xmm1
  movsd  0x90(%r12),%xmm0
  mulsd  0x90(%rbx),%xmm0
  mulsd  0x88(%rbp),%xmm0
  addsd  %xmm0,%xmm1
  add    $0x98,%rbp
  movsd  0x98(%r12),%xmm0
  mulsd  0x98(%rbx),%xmm0
  mulsd  -0x8(%rbp),%xmm0
  addsd  %xmm1,%xmm0
  call   <log@plt>
  movapd %xmm0,%xmm1
  mov    0x8(%rsp),%rax
  pxor   %xmm0,%xmm0
  cvtsi2sdl (%rax,%r14,4),%xmm0
  mulsd  D73(%rip),%xmm0
  addsd  %xmm1,%xmm0
  movsd  %xmm0,0x0(%r13)
  add    $0xa0,%rbx
  add    $0x8,%r13
  cmp    %r15,%r13
  jne    L110
  movsd  0x40(%rsp),%xmm0
  movsd  0x48(%rsp),%xmm2
  movsd  0x50(%rsp),%xmm1
  movsd  0x58(%rsp),%xmm3
  movapd %xmm0,%xmm4
  addsd  %xmm2,%xmm4
  addsd  %xmm1,%xmm4
  addsd  %xmm3,%xmm4
  mulsd  D93(%rip),%xmm4
  movsd  D72(%rip),%xmm5
  divsd  %xmm4,%xmm5
  mulsd  D93(%rip),%xmm0
  mulsd  %xmm5,%xmm0
  movsd  %xmm0,0x40(%rsp)
  mulsd  D93(%rip),%xmm2
  mulsd  %xmm5,%xmm2
  movsd  %xmm2,0x48(%rsp)
  mulsd  D93(%rip),%xmm1
  mulsd  %xmm5,%xmm1
  movsd  %xmm1,0x50(%rsp)
  mulsd  D93(%rip),%xmm3
  mulsd  %xmm5,%xmm3
  movsd  %xmm3,0x58(%rsp)
  movsd  D1(%rip),%xmm4
  comisd %xmm0,%xmm4
  jbe    L76
  movl   $0x0,(%rsp)
L93:
  comisd %xmm2,%xmm0
  jbe    L59
  movapd %xmm2,%xmm0
  movl   $0x1,(%rsp)
L59:
  comisd %xmm1,%xmm0
  jbe    L79
  movapd %xmm1,%xmm0
  movl   $0x2,(%rsp)
  jmp    L79
L15:
  mov    0x10(%rsp),%rdi
  call   <free@plt>
  mov    0x68(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L101
  add    $0x78,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L101:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: read_data
arguments: label: D19
type_infered: byte[8]
name: read_data
arguments: label: D1
type_infered: f64
name: read_data
arguments: label: D73
type_infered: byte[8]
name: read_data
arguments: label: D93
type_infered: f64
name: read_data
arguments: label: D72
type_infered: f64

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

tool: D1: 1e+300

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

tool: D93: 0.25

tool: D72: 1

assistant: ```c
void categorizeGTRGAMMAPROT(char *tipX1, double *x2, int *ex2, double *pz, double *gammaRates, double *EIGN, double *tipVector, int *rateCategory, int lower, int upper) {
  double z, lz, term[4], ki, min, allSum;
  int i, j, index = 0;
  double *diagptable, *diagptable_start;
  double *left, *right;
  z = pz[0];
  if (z < 1.0E-15)
    z = 1.0E-15;
  lz = log(z);
  diagptable = diagptable_start = (double *)malloc(sizeof(double) * 4 * 19);
  for (i = 0; i < 4; i++) {
    ki = gammaRates[i];
    for (j = 0; j < 19; j++)
      *diagptable++ = exp(EIGN[j] * ki * lz);
  }
  for (i = lower; i < upper; i++) {
    left = &(tipVector[20 * tipX1[i]]);
    diagptable = diagptable_start;
    for (j = 0; j < 4; j++) {
      right = &(x2[80 * i + 20 * j]);
      term[j] = 0.0;
      term[j] += left[0] * right[0];
      term[j] += left[1] * right[1] * *diagptable++;
      term[j] += left[2] * right[2] * *diagptable++;
      term[j] += left[3] * right[3] * *diagptable++;
      term[j] += left[4] * right[4] * *diagptable++;
      term[j] += left[5] * right[5] * *diagptable++;
      term[j] += left[6] * right[6] * *diagptable++;
      term[j] += left[7] * right[7] * *diagptable++;
      term[j] += left[8] * right[8] * *diagptable++;
      term[j] += left[9] * right[9] * *diagptable++;
      term[j] += left[10] * right[10] * *diagptable++;
      term[j] += left[11] * right[11] * *diagptable++;
      term[j] += left[12] * right[12] * *diagptable++;
      term[j] += left[13] * right[13] * *diagptable++;
      term[j] += left[14] * right[14] * *diagptable++;
      term[j] += left[15] * right[15] * *diagptable++;
      term[j] += left[16] * right[16] * *diagptable++;
      term[j] += left[17] * right[17] * *diagptable++;
      term[j] += left[18] * right[18] * *diagptable++;
      term[j] += left[19] * right[19] * *diagptable++;
      term[j] = log(term[j]) + ex2[i] * log((1.0 / 115792089237316195423570985008687907853269984665640564039457584007913129639936.0));
    }
    allSum = 0.25 * (term[0] + term[1] + term[2] + term[3]);
    allSum = 1.0 / allSum;
    term[0] = 0.25 * term[0] * allSum;
    term[1] = 0.25 * term[1] * allSum;
    term[2] = 0.25 * term[2] * allSum;
    term[3] = 0.25 * term[3] * allSum;
    min = 1.0E300;
    if (term[0] < min) {
      min = term[0];
      index = 0;
    }
    if (term[1] < min) {
      min = term[1];
      index = 1;
    }
    if (term[2] < min) {
      min = term[2];
      index = 2;
    }
    if (term[3] < min) {
      min = term[3];
      index = 3;
    }
    rateCategory[i] = index;
  }
  free(diagptable_start);
  return;
}
```