user: 请将以下的汇编代码转换成C语言代码：

```asm
<coreGTRGAMMAPROT_LG4>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %rbx
  sub    $0x1000,%rsp
  orq    $0x0,(%rsp)
  sub    $0xd8,%rsp
  mov    %rdi,-0x1098(%rbp)
  mov    %rsi,-0x10a0(%rbp)
  mov    %rdx,-0x10a8(%rbp)
  mov    %ecx,-0x10ac(%rbp)
  mov    %r8,-0x10b8(%rbp)
  mov    %r9,-0x10c0(%rbp)
  movsd  %xmm0,-0x10d0(%rbp)
  mov    0x10(%rbp),%rax
  mov    %rax,-0x10c8(%rbp)
  mov    0x18(%rbp),%rax
  mov    %rax,-0x10d8(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x18(%rbp)
  xor    %eax,%eax
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x1080(%rbp)
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x1078(%rbp)
  movl   $0x0,-0x108c(%rbp)
  jmp    L47
L12:
  mov    -0x108c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x1098(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movsd  %xmm0,-0x1030(%rbp)
  movsd  -0x1030(%rbp),%xmm0
  mulsd  %xmm0,%xmm0
  movsd  %xmm0,-0x1028(%rbp)
  movl   $0x1,-0x1084(%rbp)
  jmp    L11
L30:
  mov    -0x108c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x10a0(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x1084(%rbp),%eax
  cltq
  shl    $0x3,%rax
  sub    $0x8,%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mulsd  -0x1030(%rbp),%xmm0
  mulsd  -0x10d0(%rbp),%xmm0
  movq   %xmm0,%rax
  mov    -0x108c(%rbp),%edx
  mov    %edx,%ecx
  shl    $0x5,%ecx
  mov    -0x1084(%rbp),%edx
  add    %ecx,%edx
  lea    0x0(,%rdx,4),%ebx
  movq   %rax,%xmm0
  call   <exp@plt>
  movq   %xmm0,%rax
  movslq %ebx,%rdx
  mov    %rax,-0x1020(%rbp,%rdx,8)
  mov    -0x108c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x10a0(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x1084(%rbp),%eax
  cltq
  shl    $0x3,%rax
  sub    $0x8,%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mov    -0x108c(%rbp),%eax
  shl    $0x5,%eax
  mov    %eax,%edx
  mov    -0x1084(%rbp),%eax
  add    %edx,%eax
  shl    $0x2,%eax
  add    $0x1,%eax
  mulsd  -0x1030(%rbp),%xmm0
  cltq
  movsd  %xmm0,-0x1020(%rbp,%rax,8)
  mov    -0x108c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x10a0(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x1084(%rbp),%eax
  cltq
  shl    $0x3,%rax
  sub    $0x8,%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  mov    -0x108c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x10a0(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x1084(%rbp),%eax
  cltq
  shl    $0x3,%rax
  sub    $0x8,%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mulsd  %xmm1,%xmm0
  mov    -0x108c(%rbp),%eax
  shl    $0x5,%eax
  mov    %eax,%edx
  mov    -0x1084(%rbp),%eax
  add    %edx,%eax
  shl    $0x2,%eax
  add    $0x2,%eax
  mulsd  -0x1028(%rbp),%xmm0
  cltq
  movsd  %xmm0,-0x1020(%rbp,%rax,8)
  addl   $0x1,-0x1084(%rbp)
L11:
  cmpl   $0x13,-0x1084(%rbp)
  jle    L30
  addl   $0x1,-0x108c(%rbp)
L47:
  cmpl   $0x3,-0x108c(%rbp)
  jle    L12
  movl   $0x0,-0x108c(%rbp)
  jmp    L50
L60:
  mov    -0x108c(%rbp),%edx
  mov    %edx,%eax
  shl    $0x2,%eax
  add    %edx,%eax
  shl    $0x4,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x10a8(%rbp),%rax
  add    %rdx,%rax
  mov    %rax,-0x1040(%rbp)
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x1070(%rbp)
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x1068(%rbp)
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x1060(%rbp)
  movl   $0x0,-0x1088(%rbp)
  jmp    L13
L109:
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x1058(%rbp)
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x1050(%rbp)
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x1048(%rbp)
  mov    -0x1088(%rbp),%edx
  mov    %edx,%eax
  shl    $0x2,%eax
  add    %edx,%eax
  shl    $0x2,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x1040(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movsd  -0x1058(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x1058(%rbp)
  movl   $0x1,-0x1084(%rbp)
  jmp    L97
L26:
  mov    -0x1088(%rbp),%eax
  shl    $0x5,%eax
  mov    %eax,%edx
  mov    -0x1084(%rbp),%eax
  add    %edx,%eax
  shl    $0x2,%eax
  cltq
  movsd  -0x1020(%rbp,%rax,8),%xmm1
  mov    -0x1088(%rbp),%edx
  mov    %edx,%eax
  shl    $0x2,%eax
  add    %edx,%eax
  shl    $0x2,%eax
  mov    %eax,%edx
  mov    -0x1084(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x1040(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,-0x1038(%rbp)
  movsd  -0x1038(%rbp),%xmm0
  movsd  -0x1058(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x1058(%rbp)
  mov    -0x1088(%rbp),%eax
  shl    $0x5,%eax
  mov    %eax,%edx
  mov    -0x1084(%rbp),%eax
  add    %edx,%eax
  shl    $0x2,%eax
  add    $0x1,%eax
  cltq
  movsd  -0x1020(%rbp,%rax,8),%xmm0
  mulsd  -0x1038(%rbp),%xmm0
  movsd  -0x1050(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x1050(%rbp)
  mov    -0x1088(%rbp),%eax
  shl    $0x5,%eax
  mov    %eax,%edx
  mov    -0x1084(%rbp),%eax
  add    %edx,%eax
  shl    $0x2,%eax
  add    $0x2,%eax
  cltq
  movsd  -0x1020(%rbp,%rax,8),%xmm0
  mulsd  -0x1038(%rbp),%xmm0
  movsd  -0x1048(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x1048(%rbp)
  addl   $0x1,-0x1084(%rbp)
L97:
  cmpl   $0x13,-0x1084(%rbp)
  jle    L26
  mov    -0x1088(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x10d8(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mulsd  -0x1058(%rbp),%xmm0
  movsd  -0x1070(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x1070(%rbp)
  mov    -0x1088(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x10d8(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mulsd  -0x1050(%rbp),%xmm0
  movsd  -0x1068(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x1068(%rbp)
  mov    -0x1088(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x10d8(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mulsd  -0x1048(%rbp),%xmm0
  movsd  -0x1060(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x1060(%rbp)
  addl   $0x1,-0x1088(%rbp)
L13:
  cmpl   $0x3,-0x1088(%rbp)
  jle    L109
  mov    -0x1070(%rbp),%rax
  movq   %rax,%xmm0
  call   <FABS@plt>
  movapd %xmm0,%xmm1
  movsd  D0(%rip),%xmm0
  divsd  %xmm1,%xmm0
  movsd  %xmm0,-0x1070(%rbp)
  movsd  -0x1068(%rbp),%xmm0
  mulsd  -0x1070(%rbp),%xmm0
  movsd  %xmm0,-0x1068(%rbp)
  movsd  -0x1060(%rbp),%xmm0
  mulsd  -0x1070(%rbp),%xmm0
  movsd  %xmm0,-0x1060(%rbp)
  mov    -0x108c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x10b8(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  mulsd  -0x1068(%rbp),%xmm0
  movsd  -0x1080(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x1080(%rbp)
  mov    -0x108c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x10b8(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  pxor   %xmm1,%xmm1
  cvtsi2sd %eax,%xmm1
  movsd  -0x1068(%rbp),%xmm0
  movapd %xmm0,%xmm2
  mulsd  %xmm0,%xmm2
  movsd  -0x1060(%rbp),%xmm0
  subsd  %xmm2,%xmm0
  mulsd  %xmm1,%xmm0
  movsd  -0x1078(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x1078(%rbp)
  addl   $0x1,-0x108c(%rbp)
L50:
  mov    -0x108c(%rbp),%eax
  cmp    -0x10ac(%rbp),%eax
  jl     L60
  mov    -0x10c0(%rbp),%rax
  movsd  -0x1080(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x10c8(%rbp),%rax
  movsd  -0x1078(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  nop
  mov    -0x18(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L59
  call   <__stack_chk_fail@plt>
L59:
  mov    -0x8(%rbp),%rbx
  leave
  ret
```

tool_calls: name: extract_symbolic_data
arguments: data_tag: D0
datatype: f64

tool: D0: 1

assistant: ```c
void coreGTRGAMMAPROT_LG4(double *gammaRates, double *EIGN[4], double *sumtable, int upper, int *wrptr, volatile double *ext_dlnLdlz, volatile double *ext_d2lnLdlz2, double lz, double *weights) {
  double *sum, diagptable[512];
  int i, j, l;
  double dlnLdlz = 0;
  double d2lnLdlz2 = 0;
  double ki, kisqr;
  double tmp;
  double inv_Li, dlnLidlz, d2lnLidlz2;
  for (i = 0; i < 4; i++) {
    ki = gammaRates[i];
    kisqr = ki * ki;
    for (l = 1; l < 20; l++) {
      diagptable[i * 128 + l * 4] = exp(EIGN[i][l - 1] * ki * lz);
      diagptable[i * 128 + l * 4 + 1] = EIGN[i][l - 1] * ki;
      diagptable[i * 128 + l * 4 + 2] = EIGN[i][l - 1] * EIGN[i][l - 1] * kisqr;
    }
  }
  for (i = 0; i < upper; i++) {
    sum = &sumtable[i * 80];
    inv_Li = 0.0;
    dlnLidlz = 0.0;
    d2lnLidlz2 = 0.0;
    for (j = 0; j < 4; j++) {
      double a1 = 0.0, a2 = 0.0, a3 = 0.0;
      a1 += sum[j * 20];
      for (l = 1; l < 20; l++) {
        a1 += (tmp = diagptable[j * 128 + l * 4] * sum[j * 20 + l]);
        a2 += tmp * diagptable[j * 128 + l * 4 + 1];
        a3 += tmp * diagptable[j * 128 + l * 4 + 2];
      }
      inv_Li += weights[j] * a1;
      dlnLidlz += weights[j] * a2;
      d2lnLidlz2 += weights[j] * a3;
    }
    inv_Li = 1.0 / FABS(inv_Li);
    dlnLidlz *= inv_Li;
    d2lnLidlz2 *= inv_Li;
    dlnLdlz += wrptr[i] * dlnLidlz;
    d2lnLdlz2 += wrptr[i] * (d2lnLidlz2 - dlnLidlz * dlnLidlz);
  }
  *ext_dlnLdlz = dlnLdlz;
  *ext_d2lnLdlz2 = d2lnLdlz2;
}
```