user: 请将这段汇编代码片段转换成等效的C代码：

```asm
<ERI_Gaunt_R>:
  endbr64
  push   %r15
  mov    %ecx,%r15d
  push   %r14
  mov    %r9d,%r14d
  push   %r13
  mov    %esi,%r13d
  push   %r12
  mov    %edx,%r12d
  push   %rbp
  mov    %edi,%ebp
  mov    %r13d,%edi
  push   %rbx
  mov    %r8d,%ebx
  sub    $0xc8,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0xb8(%rsp)
  xor    %eax,%eax
  lea    0x60(%rsp),%rdx
  lea    0x50(%rsp),%rsi
  call   <ERI_RCSH_Coeff@plt>
  lea    0x70(%rsp),%rsi
  mov    %r15d,%edi
  xor    %eax,%eax
  lea    0x80(%rsp),%rdx
  call   <ERI_RCSH_Coeff@plt>
  lea    0xa0(%rsp),%rdx
  mov    %r14d,%edi
  xor    %eax,%eax
  lea    0x90(%rsp),%rsi
  call   <ERI_RCSH_Coeff@plt>
  movsd  D17(%rip),%xmm4
  test   $0x1,%r13b
  je     L8
  movsd  D4(%rip),%xmm4
L8:
  movsd  0x50(%rsp),%xmm1
  movsd  0x58(%rsp),%xmm11
  mov    %r13d,%esi
  movsd  %xmm4,0x48(%rsp)
  movsd  0x70(%rsp),%xmm9
  neg    %esi
  mov    %r14d,%r9d
  mov    %ebx,%r8d
  movsd  0x78(%rsp),%xmm0
  movapd %xmm1,%xmm8
  mov    %r15d,%ecx
  mov    %ebp,%edi
  movapd %xmm11,%xmm2
  movapd %xmm9,%xmm3
  mov    %r12d,%edx
  xor    %eax,%eax
  mulsd  %xmm0,%xmm2
  movapd %xmm1,%xmm10
  movsd  0x90(%rsp),%xmm7
  movsd  0x98(%rsp),%xmm6
  mulsd  %xmm9,%xmm8
  movapd %xmm11,%xmm12
  movapd %xmm0,%xmm4
  mov    %esi,0x40(%rsp)
  mulsd  %xmm11,%xmm3
  subsd  %xmm2,%xmm8
  movapd %xmm1,%xmm2
  mulsd  %xmm0,%xmm2
  movapd %xmm8,%xmm5
  mulsd  %xmm7,%xmm5
  addsd  %xmm3,%xmm2
  movapd %xmm2,%xmm3
  mulsd  %xmm6,%xmm3
  subsd  %xmm3,%xmm5
  movsd  0xa8(%rsp),%xmm3
  mulsd  %xmm3,%xmm2
  movsd  %xmm5,(%rsp)
  movsd  0xa0(%rsp),%xmm5
  mulsd  %xmm5,%xmm8
  subsd  %xmm2,%xmm8
  movsd  0x88(%rsp),%xmm2
  mulsd  %xmm2,%xmm12
  movapd %xmm2,%xmm13
  movsd  %xmm8,0x8(%rsp)
  mulsd  %xmm2,%xmm1
  movsd  0x80(%rsp),%xmm8
  mulsd  %xmm8,%xmm11
  mulsd  %xmm8,%xmm10
  addsd  %xmm11,%xmm1
  movapd %xmm6,%xmm11
  subsd  %xmm12,%xmm10
  movapd %xmm7,%xmm12
  mulsd  %xmm1,%xmm11
  mulsd  %xmm10,%xmm12
  mulsd  %xmm3,%xmm1
  mulsd  %xmm5,%xmm10
  subsd  %xmm11,%xmm12
  movsd  0x60(%rsp),%xmm11
  subsd  %xmm1,%xmm10
  mulsd  %xmm11,%xmm0
  movapd %xmm9,%xmm1
  mulsd  %xmm11,%xmm1
  movsd  %xmm12,0x10(%rsp)
  mulsd  %xmm11,%xmm2
  movsd  %xmm10,0x18(%rsp)
  movsd  0x68(%rsp),%xmm10
  mulsd  %xmm10,%xmm4
  mulsd  %xmm10,%xmm9
  mulsd  %xmm10,%xmm13
  subsd  %xmm4,%xmm1
  movapd %xmm7,%xmm4
  addsd  %xmm9,%xmm0
  movapd %xmm6,%xmm9
  mulsd  %xmm1,%xmm4
  mulsd  %xmm0,%xmm9
  mulsd  %xmm5,%xmm1
  mulsd  %xmm3,%xmm0
  subsd  %xmm9,%xmm4
  subsd  %xmm0,%xmm1
  movapd %xmm8,%xmm0
  mulsd  %xmm11,%xmm0
  movsd  %xmm4,0x20(%rsp)
  mulsd  %xmm10,%xmm8
  movsd  %xmm1,0x28(%rsp)
  subsd  %xmm13,%xmm0
  addsd  %xmm8,%xmm2
  mulsd  %xmm0,%xmm5
  mulsd  %xmm2,%xmm6
  mulsd  %xmm0,%xmm7
  mulsd  %xmm2,%xmm3
  subsd  %xmm6,%xmm7
  movapd %xmm5,%xmm6
  subsd  %xmm3,%xmm6
  movsd  %xmm7,0x30(%rsp)
  movsd  %xmm6,0x38(%rsp)
  call   <ERI_Gaunt@plt>
  pxor   %xmm0,%xmm0
  mov    %r14d,%r11d
  mov    0x40(%rsp),%esi
  cvtsi2sd %eax,%xmm0
  mulsd  (%rsp),%xmm0
  neg    %r11d
  mov    %ebx,%r8d
  mov    %r11d,%r9d
  mov    %r15d,%ecx
  mov    %r12d,%edx
  mov    %ebp,%edi
  xor    %eax,%eax
  mov    %r11d,0x44(%rsp)
  movsd  %xmm0,(%rsp)
  call   <ERI_Gaunt@plt>
  pxor   %xmm0,%xmm0
  movsd  (%rsp),%xmm5
  mov    %ebp,%edi
  cvtsi2sd %eax,%xmm0
  mulsd  0x8(%rsp),%xmm0
  mov    %r15d,%r10d
  mov    %r14d,%r9d
  neg    %r10d
  mov    0x40(%rsp),%esi
  mov    %ebx,%r8d
  mov    %r12d,%edx
  mov    %r10d,%ecx
  xor    %eax,%eax
  mov    %r10d,0x8(%rsp)
  addsd  %xmm0,%xmm5
  movsd  %xmm5,(%rsp)
  call   <ERI_Gaunt@plt>
  pxor   %xmm0,%xmm0
  mov    0x44(%rsp),%r11d
  mov    %ebp,%edi
  cvtsi2sd %eax,%xmm0
  mulsd  0x10(%rsp),%xmm0
  mov    0x8(%rsp),%ecx
  xor    %eax,%eax
  addsd  (%rsp),%xmm0
  mov    0x40(%rsp),%esi
  mov    %r11d,%r9d
  mov    %ebx,%r8d
  mov    %r12d,%edx
  mov    %r11d,0x10(%rsp)
  movsd  %xmm0,(%rsp)
  call   <ERI_Gaunt@plt>
  pxor   %xmm0,%xmm0
  movsd  (%rsp),%xmm5
  mov    %ebp,%edi
  cvtsi2sd %eax,%xmm0
  mulsd  0x18(%rsp),%xmm0
  mov    %r14d,%r9d
  mov    %ebx,%r8d
  mov    %r15d,%ecx
  mov    %r12d,%edx
  mov    %r13d,%esi
  xor    %eax,%eax
  addsd  %xmm0,%xmm5
  movsd  %xmm5,(%rsp)
  call   <ERI_Gaunt@plt>
  pxor   %xmm0,%xmm0
  mov    0x10(%rsp),%r9d
  mov    %ebp,%edi
  cvtsi2sd %eax,%xmm0
  mulsd  0x20(%rsp),%xmm0
  mov    %ebx,%r8d
  mov    %r15d,%ecx
  addsd  (%rsp),%xmm0
  mov    %r12d,%edx
  mov    %r13d,%esi
  xor    %eax,%eax
  movsd  %xmm0,(%rsp)
  call   <ERI_Gaunt@plt>
  pxor   %xmm0,%xmm0
  movsd  (%rsp),%xmm3
  mov    %ebp,%edi
  cvtsi2sd %eax,%xmm0
  mulsd  0x28(%rsp),%xmm0
  mov    0x8(%rsp),%ecx
  xor    %eax,%eax
  mov    %r14d,%r9d
  mov    %ebx,%r8d
  mov    %r12d,%edx
  mov    %r13d,%esi
  addsd  %xmm0,%xmm3
  movsd  %xmm3,(%rsp)
  call   <ERI_Gaunt@plt>
  pxor   %xmm0,%xmm0
  mov    0x10(%rsp),%r9d
  mov    %ebp,%edi
  cvtsi2sd %eax,%xmm0
  mulsd  0x30(%rsp),%xmm0
  mov    0x8(%rsp),%ecx
  xor    %eax,%eax
  addsd  (%rsp),%xmm0
  mov    %ebx,%r8d
  mov    %r12d,%edx
  mov    %r13d,%esi
  movsd  %xmm0,(%rsp)
  call   <ERI_Gaunt@plt>
  pxor   %xmm0,%xmm0
  movsd  0x48(%rsp),%xmm4
  cvtsi2sd %eax,%xmm0
  mulsd  0x38(%rsp),%xmm0
  addsd  (%rsp),%xmm0
  mulsd  %xmm4,%xmm0
  mov    0xb8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L19
  add    $0xc8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L19:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: retrieve_data
arguments: tag: D17
type_guessed: f64
name: retrieve_data
arguments: tag: D4
type_guessed: byte[8]

tool: D17: 1

tool: {"D4": [0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0xbf]}

assistant: ```c
double ERI_Gaunt_R(int l, int m, int l1, int m1, int l2, int m2) {
  double a[2], b[2], a1[2], b1[2], a2[2], b2[2];
  double aaa, aab, aba, abb, baa, bab, bba, bbb, s;
  ERI_RCSH_Coeff(m, a, b);
  ERI_RCSH_Coeff(m1, a1, b1);
  ERI_RCSH_Coeff(m2, a2, b2);
  s = (0 == m % 2) ? 1.0 : -1.0;
  aaa = (a[0] * a1[0] - a[1] * a1[1]) * a2[0] - (a[0] * a1[1] + a[1] * a1[0]) * a2[1];
  aab = (a[0] * a1[0] - a[1] * a1[1]) * b2[0] - (a[0] * a1[1] + a[1] * a1[0]) * b2[1];
  aba = (a[0] * b1[0] - a[1] * b1[1]) * a2[0] - (a[0] * b1[1] + a[1] * b1[0]) * a2[1];
  abb = (a[0] * b1[0] - a[1] * b1[1]) * b2[0] - (a[0] * b1[1] + a[1] * b1[0]) * b2[1];
  baa = (b[0] * a1[0] - b[1] * a1[1]) * a2[0] - (b[0] * a1[1] + b[1] * a1[0]) * a2[1];
  bab = (b[0] * a1[0] - b[1] * a1[1]) * b2[0] - (b[0] * a1[1] + b[1] * a1[0]) * b2[1];
  bba = (b[0] * b1[0] - b[1] * b1[1]) * a2[0] - (b[0] * b1[1] + b[1] * b1[0]) * a2[1];
  bbb = (b[0] * b1[0] - b[1] * b1[1]) * b2[0] - (b[0] * b1[1] + b[1] * b1[0]) * b2[1];
  return s * (aaa * ERI_Gaunt(l, -m, l1, m1, l2, m2) + aab * ERI_Gaunt(l, -m, l1, m1, l2, -m2) + aba * ERI_Gaunt(l, -m, l1, -m1, l2, m2) + abb * ERI_Gaunt(l, -m, l1, -m1, l2, -m2) + baa * ERI_Gaunt(l, m, l1, m1, l2, m2) + bab * ERI_Gaunt(l, m, l1, m1, l2, -m2) + bba * ERI_Gaunt(l, m, l1, -m1, l2, m2) + bbb * ERI_Gaunt(l, m, l1, -m1, l2, -m2));
}
```