user: Please show me the C implementation that matches the assembly code listed below:

```asm
<three_center_1D>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x68,%rsp
  movapd %xmm0,%xmm6
  mov    %edi,%r14d
  mov    %edi,0x3c(%rsp)
  movq   %xmm1,%rbx
  mov    %esi,%r15d
  movapd %xmm3,%xmm1
  movsd  %xmm4,0x10(%rsp)
  mov    %edx,%r13d
  movq   %rbx,%xmm0
  addsd  %xmm3,%xmm0
  movapd %xmm0,%xmm7
  movsd  %xmm5,0x18(%rsp)
  addsd  %xmm5,%xmm7
  movsd  %xmm7,0x8(%rsp)
  movq   %rbx,%xmm3
  xorpd  D28(%rip),%xmm3
  movsd  %xmm3,0x40(%rsp)
  movsd  %xmm1,0x30(%rsp)
  mulsd  %xmm1,%xmm3
  movsd  %xmm3,0x48(%rsp)
  movsd  %xmm6,0x20(%rsp)
  movapd %xmm6,%xmm3
  movsd  %xmm2,0x28(%rsp)
  subsd  %xmm2,%xmm3
  cvttsd2si %xmm3,%edi
  mov    $0x2,%esi
  call   <pow@plt>
  mulsd  0x48(%rsp),%xmm0
  divsd  0x8(%rsp),%xmm0
  call   <exp@plt>
  movq   %xmm0,%rbp
  movsd  0x40(%rsp),%xmm2
  mulsd  0x18(%rsp),%xmm2
  movsd  %xmm2,0x40(%rsp)
  movsd  0x20(%rsp),%xmm2
  subsd  0x10(%rsp),%xmm2
  cvttsd2si %xmm2,%edi
  mov    $0x2,%esi
  call   <pow@plt>
  mulsd  0x40(%rsp),%xmm0
  divsd  0x8(%rsp),%xmm0
  call   <exp@plt>
  movq   %rbp,%xmm10
  mulsd  %xmm0,%xmm10
  movsd  %xmm10,0x40(%rsp)
  movsd  0x30(%rsp),%xmm0
  xorpd  D28(%rip),%xmm0
  mulsd  0x18(%rsp),%xmm0
  movsd  %xmm0,0x48(%rsp)
  movsd  0x28(%rsp),%xmm4
  subsd  0x10(%rsp),%xmm4
  cvttsd2si %xmm4,%edi
  mov    $0x2,%esi
  call   <pow@plt>
  mulsd  0x48(%rsp),%xmm0
  divsd  0x8(%rsp),%xmm0
  call   <exp@plt>
  mulsd  0x40(%rsp),%xmm0
  movsd  %xmm0,0x58(%rsp)
  movq   %rbx,%xmm0
  movsd  0x20(%rsp),%xmm6
  mulsd  %xmm6,%xmm0
  movsd  0x30(%rsp),%xmm1
  movsd  0x28(%rsp),%xmm2
  mulsd  %xmm2,%xmm1
  addsd  %xmm1,%xmm0
  movsd  0x18(%rsp),%xmm1
  movsd  0x10(%rsp),%xmm4
  mulsd  %xmm4,%xmm1
  addsd  %xmm1,%xmm0
  divsd  0x8(%rsp),%xmm0
  movapd %xmm0,%xmm1
  subsd  %xmm6,%xmm1
  movsd  %xmm1,0x40(%rsp)
  movapd %xmm0,%xmm1
  subsd  %xmm2,%xmm1
  movsd  %xmm1,0x48(%rsp)
  subsd  %xmm4,%xmm0
  movsd  %xmm0,0x50(%rsp)
  test   %r14d,%r14d
  js     L8
  mov    %r14d,0x30(%rsp)
  movl   $0x0,0x20(%rsp)
  pxor   %xmm4,%xmm4
  movsd  %xmm4,0x10(%rsp)
  jmp    L111
L9:
  call   <sqrt@plt>
L18:
  mulsd  0x18(%rsp),%xmm0
  addsd  0x10(%rsp),%xmm0
  movsd  %xmm0,0x10(%rsp)
L55:
  add    $0x1,%ebx
  add    $0x1,%ebp
  cmp    %ebx,%r13d
  jl     L98
L112:
  test   $0x1,%bpl
  jne    L55
  mov    %ebp,%r12d
  shr    $0x1f,%r12d
  add    %ebp,%r12d
  sar    %r12d
  mov    0x20(%rsp),%esi
  mov    0x3c(%rsp),%edi
  call   <binomial@plt>
  movsd  %xmm0,0x18(%rsp)
  mov    %r14d,%esi
  mov    %r15d,%edi
  call   <binomial@plt>
  mulsd  0x18(%rsp),%xmm0
  movsd  %xmm0,0x18(%rsp)
  mov    %ebx,%esi
  mov    %r13d,%edi
  call   <binomial@plt>
  movapd %xmm0,%xmm3
  mulsd  0x18(%rsp),%xmm3
  movsd  %xmm3,0x18(%rsp)
  cvttsd2si 0x40(%rsp),%edi
  mov    0x30(%rsp),%esi
  call   <pow@plt>
  mulsd  0x18(%rsp),%xmm0
  movsd  %xmm0,0x18(%rsp)
  cvttsd2si 0x48(%rsp),%edi
  mov    0x28(%rsp),%esi
  call   <pow@plt>
  movapd %xmm0,%xmm5
  mulsd  0x18(%rsp),%xmm5
  movsd  %xmm5,0x18(%rsp)
  mov    %r13d,%esi
  sub    %ebx,%esi
  cvttsd2si 0x50(%rsp),%edi
  call   <pow@plt>
  mulsd  0x18(%rsp),%xmm0
  movsd  %xmm0,0x18(%rsp)
  lea    -0x1(%r12,%r12,1),%edi
  call   <fact2@plt>
  mulsd  0x18(%rsp),%xmm0
  movsd  %xmm0,0x18(%rsp)
  movsd  0x8(%rsp),%xmm6
  movapd %xmm6,%xmm0
  addsd  %xmm6,%xmm0
  cvttsd2si %xmm0,%edi
  mov    %r12d,%esi
  call   <pow@plt>
  movsd  0x18(%rsp),%xmm7
  divsd  %xmm0,%xmm7
  movsd  %xmm7,0x18(%rsp)
  movsd  D21(%rip),%xmm0
  divsd  0x8(%rsp),%xmm0
  pxor   %xmm4,%xmm4
  ucomisd %xmm0,%xmm4
  ja     L9
  sqrtsd %xmm0,%xmm0
  jmp    L18
L98:
  add    $0x1,%r14d
  cmp    %r14d,%r15d
  jl     L43
L117:
  mov    0x20(%rsp),%edx
  lea    (%rdx,%r14,1),%ebp
  mov    $0x0,%ebx
  mov    %r15d,%ecx
  sub    %r14d,%ecx
  mov    %ecx,0x28(%rsp)
  test   %r13d,%r13d
  jns    L112
  jmp    L98
L43:
  addl   $0x1,0x20(%rsp)
  mov    0x20(%rsp),%eax
  subl   $0x1,0x30(%rsp)
  cmp    %eax,0x3c(%rsp)
  jl     L109
L111:
  mov    $0x0,%r14d
  test   %r15d,%r15d
  jns    L117
  jmp    L43
L8:
  pxor   %xmm4,%xmm4
  movsd  %xmm4,0x10(%rsp)
L109:
  movsd  0x58(%rsp),%xmm0
  mulsd  0x10(%rsp),%xmm0
  add    $0x68,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

tool_calls: name: read_data
arguments: data_label: D28
datatype: byte[16]
name: read_data
arguments: data_label: D21
datatype: f64

tool: {"D28": [0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00]}

tool: D21: 3.141592653589793

assistant: ```c
double three_center_1D(double xi, int ai, double alphai, double xj, int aj, double alphaj, double xk, int ak, double alphak) {
  double gamma, dx, px, xpi, xpj, xpk, intgl;
  int q, r, s, n;
  gamma = alphai + alphaj + alphak;
  dx = exp(-alphai * alphaj * pow(xi - xj, 2) / gamma) * exp(-alphai * alphak * pow(xi - xk, 2) / gamma) * exp(-alphaj * alphak * pow(xj - xk, 2) / gamma);
  px = (alphai * xi + alphaj * xj + alphak * xk) / gamma;
  xpi = px - xi;
  xpj = px - xj;
  xpk = px - xk;
  intgl = 0;
  for (q = 0; q < ai + 1; q++) {
    for (r = 0; r < aj + 1; r++) {
      for (s = 0; s < ak + 1; s++) {
        n = (q + r + s) / 2;
        if ((q + r + s) % 2 == 0) {
          intgl += binomial(ai, q) * binomial(aj, r) * binomial(ak, s) * pow(xpi, ai - q) * pow(xpj, aj - r) * pow(xpk, ak - s) * fact2(2 * n - 1) / pow(2 * gamma, n) * sqrt(3.14159265358979323846 / gamma);
        }
      }
    }
  }
  return dx * intgl;
}
```