user: What would the C source look like for the assembly code provided here:

```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
  mov    %rdi,0x30(%rsp)
  mov    %rdx,0x38(%rsp)
  mov    %ecx,0x44(%rsp)
  mov    %r8,0x48(%rsp)
  mov    %r9,0x50(%rsp)
  mov    0x10b0(%rsp),%rax
  mov    %rax,0x58(%rsp)
  movsd  %xmm0,0x18(%rsp)
  mov    0x10b8(%rsp),%r15
  mov    %fs:0x28,%rax
  mov    %rax,0x1068(%rsp)
  xor    %eax,%eax
  lea    0x80(%rsp),%rax
  mov    %rax,0x28(%rsp)
  mov    %rsi,%r14
  movq   $0x0,0x20(%rsp)
L30:
  mov    0x30(%rsp),%rax
  mov    0x20(%rsp),%rsi
  movsd  (%rax,%rsi,1),%xmm6
  movsd  %xmm6,0x8(%rsp)
  mulsd  %xmm6,%xmm6
  movsd  %xmm6,0x10(%rsp)
  mov    0x28(%rsp),%rbp
  mov    $0x0,%r12d
L52:
  mov    (%r14),%rax
  mov    (%rax,%r12,1),%rbx
  movq   %rbx,%xmm6
  mulsd  0x8(%rsp),%xmm6
  movq   %xmm6,%r13
  movapd %xmm6,%xmm0
  mulsd  0x18(%rsp),%xmm0
  call   <exp@plt>
  movsd  %xmm0,0x0(%rbp)
  mov    %r13,0x8(%rbp)
  movq   %rbx,%xmm0
  mulsd  %xmm0,%xmm0
  mulsd  0x10(%rsp),%xmm0
  movsd  %xmm0,0x10(%rbp)
  add    $0x8,%r12
  add    $0x20,%rbp
  cmp    $0x98,%r12
  jne    L52
  addq   $0x400,0x28(%rsp)
  add    $0x8,%r14
  addq   $0x8,0x20(%rsp)
  mov    0x20(%rsp),%rax
  cmp    $0x20,%rax
  jne    L30
  mov    0x44(%rsp),%eax
  test   %eax,%eax
  jle    L22
  mov    0x48(%rsp),%rdi
  mov    %rdi,%rbp
  mov    0x38(%rsp),%r12
  add    $0x8,%r12
  lea    -0x1(%rax),%eax
  lea    0x4(%rdi,%rax,4),%r14
  pxor   %xmm6,%xmm6
  movsd  %xmm6,0x18(%rsp)
  movsd  %xmm6,0x10(%rsp)
  movq   %xmm6,%rbx
  jmp    L57
L17:
  movapd %xmm5,%xmm0
  call   <FABS@plt>
  movsd  D16(%rip),%xmm1
  divsd  %xmm0,%xmm1
  movsd  0x8(%rsp),%xmm0
  mulsd  %xmm1,%xmm0
  pxor   %xmm2,%xmm2
  cvtsi2sdl 0x0(%rbp),%xmm2
  movapd %xmm2,%xmm3
  mulsd  %xmm0,%xmm3
  addsd  0x10(%rsp),%xmm3
  movsd  %xmm3,0x10(%rsp)
  movq   %r13,%xmm7
  mulsd  %xmm7,%xmm1
  mulsd  %xmm0,%xmm0
  subsd  %xmm0,%xmm1
  mulsd  %xmm2,%xmm1
  addsd  0x18(%rsp),%xmm1
  movsd  %xmm1,0x18(%rsp)
  add    $0x4,%rbp
  add    $0x280,%r12
  cmp    %r14,%rbp
  je     L67
L57:
  lea    0x2e0(%rsp),%rcx
  mov    %r12,%rdi
  mov    $0x0,%esi
  mov    D2(%rip),%r13
  mov    %r13,0x8(%rsp)
  movq   %r13,%xmm5
L20:
  movq   %rbx,%xmm2
  addsd  -0x8(%rdi),%xmm2
  lea    -0x260(%rcx),%rax
  mov    %rdi,%rdx
  movq   %rbx,%xmm3
  movq   %rbx,%xmm1
L55:
  movsd  (%rax),%xmm0
  mulsd  (%rdx),%xmm0
  addsd  %xmm0,%xmm2
  movapd %xmm0,%xmm4
  mulsd  0x8(%rax),%xmm4
  addsd  %xmm4,%xmm1
  mulsd  0x10(%rax),%xmm0
  addsd  %xmm0,%xmm3
  add    $0x20,%rax
  add    $0x8,%rdx
  cmp    %rcx,%rax
  jne    L55
  movsd  (%r15,%rsi,8),%xmm0
  mulsd  %xmm0,%xmm2
  addsd  %xmm2,%xmm5
  mulsd  %xmm0,%xmm1
  addsd  0x8(%rsp),%xmm1
  movsd  %xmm1,0x8(%rsp)
  mulsd  %xmm3,%xmm0
  movq   %r13,%xmm6
  addsd  %xmm0,%xmm6
  movq   %xmm6,%r13
  add    $0x1,%rsi
  add    $0xa0,%rdi
  add    $0x400,%rcx
  cmp    $0x4,%rsi
  jne    L20
  jmp    L17
L22:
  pxor   %xmm6,%xmm6
  movsd  %xmm6,0x18(%rsp)
  movsd  %xmm6,0x10(%rsp)
L67:
  mov    0x50(%rsp),%rax
  movsd  0x10(%rsp),%xmm6
  movsd  %xmm6,(%rax)
  mov    0x58(%rsp),%rax
  movsd  0x18(%rsp),%xmm6
  movsd  %xmm6,(%rax)
  mov    0x1068(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L56
  add    $0x1078,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L56:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: parse_data
arguments: data_label: D16
data_type: f64
name: parse_data
arguments: data_label: D2
data_type: f64

tool: D16: 1

tool: D2: 0

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;
}
```