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

```asm
<coreGTRGAMMAPROT_LG4>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x1000,%rsp
  orq    $0x0,(%rsp)
  sub    $0x78,%rsp
  xor    %ebp,%ebp
  mov    0x10b0(%rsp),%rax
  mov    %rax,0x58(%rsp)
  mov    0x10b8(%rsp),%rax
  mov    %rdi,%r15
  lea    0x60(%rsp),%r12
  mov    %rsi,0x30(%rsp)
  lea    0x2e0(%rsp),%rbx
  mov    %rdx,0x38(%rsp)
  mov    %ecx,0x44(%rsp)
  mov    %r8,0x48(%rsp)
  mov    %r9,0x50(%rsp)
  mov    %rax,0x28(%rsp)
  movsd  %xmm0,0x20(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0x1068(%rsp)
  xor    %eax,%eax
L1:
  movsd  (%r15,%rbp,1),%xmm5
  mov    0x30(%rsp),%rax
  lea    -0x260(%rbx),%r13
  movsd  %xmm5,0x10(%rsp)
  mulsd  %xmm5,%xmm5
  mov    (%rax,%rbp,1),%r14
  movsd  %xmm5,0x18(%rsp)
  nopl   0x0(%rax)
L54:
  movsd  (%r14),%xmm1
  movsd  0x10(%rsp),%xmm2
  add    $0x20,%r13
  add    $0x8,%r14
  movsd  0x20(%rsp),%xmm0
  mulsd  %xmm1,%xmm2
  movsd  %xmm1,0x8(%rsp)
  mulsd  %xmm2,%xmm0
  movsd  %xmm2,(%rsp)
  call   <exp@plt>
  movsd  0x8(%rsp),%xmm1
  movsd  (%rsp),%xmm2
  mulsd  %xmm1,%xmm1
  unpcklpd %xmm2,%xmm0
  mulsd  0x18(%rsp),%xmm1
  movaps %xmm0,-0x20(%r13)
  movsd  %xmm1,-0x10(%r13)
  cmp    %rbx,%r13
  jne    L54
  add    $0x8,%rbp
  lea    0x400(%r13),%rbx
  cmp    $0x20,%rbp
  jne    L1
  movslq 0x44(%rsp),%rax
  test   %eax,%eax
  jle    L50
  pxor   %xmm2,%xmm2
  lea    (%rax,%rax,4),%rbx
  mov    0x48(%rsp),%r15
  xor    %r13d,%r13d
  mov    0x38(%rsp),%r14
  shl    $0x7,%rbx
  movapd %xmm2,%xmm5
  movapd %xmm2,%xmm6
  lea    0x1000(%r12),%rbp
  nopl   (%rax)
L38:
  mov    0x28(%rsp),%rsi
  mov    %r14,%rdx
  mov    %r12,%rax
  mov    %r14,%rcx
  movapd %xmm2,%xmm4
  movapd %xmm2,%xmm3
  movapd %xmm2,%xmm7
  nopw   0x0(%rax,%rax,1)
L36:
  movapd 0x20(%rax),%xmm9
  movapd 0x40(%rax),%xmm11
  add    $0x400,%rax
  add    $0xa0,%rcx
  movupd 0x8(%rdx),%xmm1
  add    $0x8,%rsi
  movsd  -0xa0(%rcx),%xmm0
  add    $0xa0,%rdx
  movhpd -0x3d0(%rax),%xmm9
  movhpd -0x3b0(%rax),%xmm11
  movapd -0x380(%rax),%xmm12
  movapd -0x370(%rax),%xmm13
  movapd %xmm9,%xmm10
  addsd  %xmm2,%xmm0
  movlpd -0x378(%rax),%xmm13
  movhpd -0x370(%rax),%xmm12
  unpcklpd %xmm11,%xmm10
  mulpd  %xmm1,%xmm10
  addsd  %xmm10,%xmm0
  movapd %xmm10,%xmm1
  unpckhpd %xmm1,%xmm1
  movapd %xmm1,%xmm8
  movapd -0x3b0(%rax),%xmm1
  movlpd -0x3b8(%rax),%xmm1
  addsd  %xmm0,%xmm8
  movapd -0x3d0(%rax),%xmm0
  movlpd -0x3d8(%rax),%xmm0
  unpcklpd %xmm1,%xmm0
  mulpd  %xmm10,%xmm0
  movapd %xmm0,%xmm1
  unpckhpd %xmm0,%xmm0
  addsd  %xmm2,%xmm1
  addsd  %xmm0,%xmm1
  movapd %xmm9,%xmm0
  movupd -0x88(%rdx),%xmm9
  unpckhpd %xmm11,%xmm0
  mulpd  %xmm10,%xmm0
  movapd -0x3a0(%rax),%xmm10
  movhpd -0x390(%rax),%xmm10
  movapd %xmm0,%xmm11
  unpckhpd %xmm0,%xmm0
  addsd  %xmm2,%xmm11
  addsd  %xmm0,%xmm11
  movapd %xmm10,%xmm0
  unpckhpd %xmm12,%xmm10
  unpcklpd %xmm12,%xmm0
  movupd -0x78(%rdx),%xmm12
  mulpd  %xmm0,%xmm9
  mulpd  %xmm9,%xmm10
  movapd %xmm9,%xmm0
  movapd %xmm9,%xmm14
  addsd  %xmm8,%xmm0
  unpckhpd %xmm14,%xmm14
  movapd %xmm14,%xmm8
  addsd  %xmm0,%xmm8
  movapd -0x390(%rax),%xmm0
  movlpd -0x398(%rax),%xmm0
  unpcklpd %xmm13,%xmm0
  movapd -0x340(%rax),%xmm13
  mulpd  %xmm9,%xmm0
  movapd -0x330(%rax),%xmm9
  movlpd -0x338(%rax),%xmm9
  movhpd -0x330(%rax),%xmm13
  addsd  %xmm0,%xmm1
  unpckhpd %xmm0,%xmm0
  addsd  %xmm0,%xmm1
  movapd %xmm10,%xmm0
  unpckhpd %xmm10,%xmm10
  addsd  %xmm11,%xmm0
  movapd -0x360(%rax),%xmm11
  movhpd -0x350(%rax),%xmm11
  addsd  %xmm0,%xmm10
  movapd %xmm11,%xmm0
  unpckhpd %xmm13,%xmm11
  unpcklpd %xmm13,%xmm0
  movapd -0x300(%rax),%xmm13
  mulpd  %xmm0,%xmm12
  movhpd -0x2f0(%rax),%xmm13
  movapd %xmm12,%xmm0
  movapd %xmm12,%xmm15
  addsd  %xmm8,%xmm0
  unpckhpd %xmm15,%xmm15
  movapd %xmm15,%xmm8
  addsd  %xmm0,%xmm8
  movapd -0x350(%rax),%xmm0
  movlpd -0x358(%rax),%xmm0
  unpcklpd %xmm9,%xmm0
  movapd %xmm11,%xmm9
  movapd -0x320(%rax),%xmm11
  mulpd  %xmm12,%xmm0
  movhpd -0x310(%rax),%xmm11
  mulpd  %xmm12,%xmm9
  movapd %xmm11,%xmm12
  unpckhpd %xmm13,%xmm11
  unpcklpd %xmm13,%xmm12
  addsd  %xmm0,%xmm1
  unpckhpd %xmm0,%xmm0
  addsd  %xmm9,%xmm10
  unpckhpd %xmm9,%xmm9
  addsd  %xmm0,%xmm1
  movupd -0x68(%rdx),%xmm0
  movupd -0x38(%rdx),%xmm15
  movapd -0x2c0(%rax),%xmm13
  mulpd  %xmm0,%xmm12
  addsd  %xmm10,%xmm9
  movapd -0x2f0(%rax),%xmm10
  movlpd -0x2f8(%rax),%xmm10
  movhpd -0x2b0(%rax),%xmm13
  addsd  %xmm12,%xmm8
  movapd %xmm12,%xmm0
  unpckhpd %xmm0,%xmm0
  addsd  %xmm0,%xmm8
  movapd -0x310(%rax),%xmm0
  movlpd -0x318(%rax),%xmm0
  unpcklpd %xmm10,%xmm0
  movapd %xmm11,%xmm10
  movapd -0x2e0(%rax),%xmm11
  mulpd  %xmm12,%xmm0
  movhpd -0x2d0(%rax),%xmm11
  mulpd  %xmm12,%xmm10
  movapd %xmm11,%xmm12
  unpcklpd %xmm13,%xmm12
  addsd  %xmm0,%xmm1
  unpckhpd %xmm0,%xmm0
  addsd  %xmm10,%xmm9
  unpckhpd %xmm10,%xmm10
  addsd  %xmm0,%xmm1
  movupd -0x58(%rdx),%xmm0
  mulpd  %xmm0,%xmm12
  addsd  %xmm9,%xmm10
  movapd -0x2b0(%rax),%xmm9
  movlpd -0x2b8(%rax),%xmm9
  addsd  %xmm12,%xmm8
  movapd %xmm12,%xmm0
  unpckhpd %xmm0,%xmm0
  addsd  %xmm0,%xmm8
  movapd -0x2d0(%rax),%xmm0
  movlpd -0x2d8(%rax),%xmm0
  unpcklpd %xmm9,%xmm0
  mulpd  %xmm12,%xmm0
  addsd  %xmm0,%xmm1
  unpckhpd %xmm0,%xmm0
  addsd  %xmm1,%xmm0
  movapd %xmm11,%xmm1
  unpckhpd %xmm13,%xmm1
  movapd -0x270(%rax),%xmm13
  movlpd -0x278(%rax),%xmm13
  mulpd  %xmm12,%xmm1
  movapd -0x280(%rax),%xmm12
  movapd %xmm0,%xmm9
  movupd -0x48(%rdx),%xmm0
  movhpd -0x270(%rax),%xmm12
  addsd  %xmm1,%xmm10
  unpckhpd %xmm1,%xmm1
  addsd  %xmm10,%xmm1
  movapd -0x2a0(%rax),%xmm10
  movhpd -0x290(%rax),%xmm10
  movapd %xmm10,%xmm11
  unpcklpd %xmm12,%xmm11
  mulpd  %xmm0,%xmm11
  addsd  %xmm11,%xmm8
  movapd %xmm11,%xmm0
  unpckhpd %xmm0,%xmm0
  addsd  %xmm0,%xmm8
  movapd -0x290(%rax),%xmm0
  movlpd -0x298(%rax),%xmm0
  unpcklpd %xmm13,%xmm0
  movapd -0x230(%rax),%xmm13
  movlpd -0x238(%rax),%xmm13
  mulpd  %xmm11,%xmm0
  addsd  %xmm0,%xmm9
  unpckhpd %xmm0,%xmm0
  addsd  %xmm9,%xmm0
  movapd %xmm10,%xmm9
  unpckhpd %xmm12,%xmm9
  movapd -0x240(%rax),%xmm12
  mulpd  %xmm11,%xmm9
  movhpd -0x230(%rax),%xmm12
  addsd  %xmm9,%xmm1
  unpckhpd %xmm9,%xmm9
  addsd  %xmm1,%xmm9
  movapd -0x260(%rax),%xmm1
  movhpd -0x250(%rax),%xmm1
  movapd %xmm1,%xmm10
  unpckhpd %xmm12,%xmm1
  unpcklpd %xmm12,%xmm10
  mulpd  %xmm15,%xmm10
  addsd  %xmm10,%xmm8
  mulpd  %xmm10,%xmm1
  movapd %xmm10,%xmm14
  unpckhpd %xmm14,%xmm14
  movapd %xmm14,%xmm11
  addsd  %xmm8,%xmm11
  movapd -0x250(%rax),%xmm8
  movlpd -0x258(%rax),%xmm8
  unpcklpd %xmm13,%xmm8
  addsd  %xmm1,%xmm9
  unpckhpd %xmm1,%xmm1
  mulpd  %xmm10,%xmm8
  movapd -0x220(%rax),%xmm10
  movapd -0x200(%rax),%xmm13
  movhpd -0x210(%rax),%xmm10
  addsd  %xmm1,%xmm9
  movhpd -0x1f0(%rax),%xmm13
  movupd -0x28(%rdx),%xmm1
  movapd %xmm10,%xmm12
  unpckhpd %xmm13,%xmm10
  unpcklpd %xmm13,%xmm12
  movapd -0x1b0(%rax),%xmm13
  movlpd -0x1b8(%rax),%xmm13
  mulpd  %xmm1,%xmm12
  addsd  %xmm8,%xmm0
  unpckhpd %xmm8,%xmm8
  addsd  %xmm0,%xmm8
  movapd -0x1f0(%rax),%xmm0
  movlpd -0x1f8(%rax),%xmm0
  addsd  %xmm12,%xmm11
  mulpd  %xmm12,%xmm10
  movapd %xmm12,%xmm1
  unpckhpd %xmm1,%xmm1
  addsd  %xmm1,%xmm11
  movapd -0x210(%rax),%xmm1
  movlpd -0x218(%rax),%xmm1
  unpcklpd %xmm0,%xmm1
  addsd  %xmm10,%xmm9
  unpckhpd %xmm10,%xmm10
  mulpd  %xmm12,%xmm1
  movapd -0x1c0(%rax),%xmm12
  movhpd -0x1b0(%rax),%xmm12
  addsd  %xmm10,%xmm9
  movupd -0x18(%rdx),%xmm10
  addsd  %xmm1,%xmm8
  unpckhpd %xmm1,%xmm1
  addsd  %xmm8,%xmm1
  movapd -0x1e0(%rax),%xmm8
  movhpd -0x1d0(%rax),%xmm8
  movapd %xmm8,%xmm0
  unpckhpd %xmm12,%xmm8
  unpcklpd %xmm12,%xmm0
  mulpd  %xmm0,%xmm10
  addsd  %xmm10,%xmm11
  mulpd  %xmm10,%xmm8
  movapd %xmm10,%xmm0
  unpckhpd %xmm0,%xmm0
  addsd  %xmm0,%xmm11
  movapd -0x1d0(%rax),%xmm0
  movlpd -0x1d8(%rax),%xmm0
  unpcklpd %xmm13,%xmm0
  mulpd  %xmm10,%xmm0
  movsd  -0x8(%rsi),%xmm10
  addsd  %xmm0,%xmm1
  unpckhpd %xmm0,%xmm0
  addsd  %xmm0,%xmm1
  movapd %xmm8,%xmm0
  unpckhpd %xmm8,%xmm8
  addsd  %xmm9,%xmm0
  addsd  %xmm0,%xmm8
  movsd  -0x8(%rcx),%xmm0
  mulsd  -0x1a0(%rax),%xmm0
  addsd  %xmm0,%xmm11
  movapd %xmm11,%xmm9
  mulsd  %xmm10,%xmm9
  addsd  %xmm9,%xmm7
  movsd  -0x198(%rax),%xmm9
  mulsd  %xmm0,%xmm9
  mulsd  -0x190(%rax),%xmm0
  addsd  %xmm9,%xmm1
  addsd  %xmm8,%xmm0
  mulsd  %xmm10,%xmm1
  mulsd  %xmm10,%xmm0
  addsd  %xmm1,%xmm3
  addsd  %xmm0,%xmm4
  cmp    %rbp,%rax
  jne    L36
  movapd %xmm7,%xmm0
  movsd  %xmm4,0x18(%rsp)
  add    $0x4,%r15
  add    $0x280,%r13
  movsd  %xmm3,0x10(%rsp)
  add    $0x280,%r14
  movsd  %xmm5,0x8(%rsp)
  movsd  %xmm6,(%rsp)
  call   <FABS@plt>
  movsd  0x10(%rsp),%xmm3
  movsd  (%rsp),%xmm6
  pxor   %xmm2,%xmm2
  movapd %xmm0,%xmm1
  movsd  0x18(%rsp),%xmm4
  movsd  0x8(%rsp),%xmm5
  movsd  D5(%rip),%xmm0
  divsd  %xmm1,%xmm0
  pxor   %xmm1,%xmm1
  cvtsi2sdl -0x4(%r15),%xmm1
  cmp    %rbx,%r13
  movapd %xmm1,%xmm7
  mulsd  %xmm0,%xmm3
  mulsd  %xmm4,%xmm0
  mulsd  %xmm3,%xmm7
  mulsd  %xmm3,%xmm3
  addsd  %xmm7,%xmm6
  subsd  %xmm3,%xmm0
  mulsd  %xmm1,%xmm0
  addsd  %xmm0,%xmm5
  jne    L38
L60:
  mov    0x50(%rsp),%rax
  movsd  %xmm6,(%rax)
  mov    0x58(%rsp),%rax
  movsd  %xmm5,(%rax)
  mov    0x1068(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L29
  add    $0x1078,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L50:
  pxor   %xmm5,%xmm5
  movapd %xmm5,%xmm6
  jmp    L60
L29:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: read_data
arguments: label: D5
type_guessed: f64

tool: D5: 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;
}
```