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

```asm
<interp3_table0_real_per>:
  endbr64
  push   %r15
  pxor   %xmm0,%xmm0
  push   %r14
  mov    %rdi,%r14
  push   %r13
  mov    %rsi,%r13
  push   %r12
  mov    %edx,%r12d
  push   %rbp
  push   %rbx
  sub    $0x128,%rsp
  mov    0x170(%rsp),%eax
  imul   0x188(%rsp),%eax
  mov    %ecx,0x6c(%rsp)
  mov    %r8d,0xd0(%rsp)
  movslq 0x1a8(%rsp),%rbx
  mov    %r9,0x48(%rsp)
  cvtsi2sd %eax,%xmm0
  mulsd  D4(%rip),%xmm0
  cvttsd2si %xmm0,%edi
  call   <floor@plt>
  pxor   %xmm0,%xmm0
  movslq %eax,%r15
  mov    0x178(%rsp),%eax
  imul   0x190(%rsp),%eax
  cvtsi2sd %eax,%xmm0
  mulsd  D4(%rip),%xmm0
  cvttsd2si %xmm0,%edi
  call   <floor@plt>
  pxor   %xmm0,%xmm0
  cltq
  mov    %rax,0x88(%rsp)
  mov    0x180(%rsp),%eax
  imul   0x198(%rsp),%eax
  cvtsi2sd %eax,%xmm0
  mulsd  D4(%rip),%xmm0
  cvttsd2si %xmm0,%edi
  call   <floor@plt>
  cltq
  mov    %rax,0xc8(%rsp)
  test   %ebx,%ebx
  jle    L65
  lea    (%rbx,%rbx,1),%eax
  pxor   %xmm6,%xmm6
  pxor   %xmm0,%xmm0
  cvtsi2sdl 0x178(%rsp),%xmm6
  cltq
  cvtsi2sdl 0x170(%rsp),%xmm0
  shl    $0x3,%rax
  mov    %rax,0xe8(%rsp)
  lea    0x0(,%rbx,8),%rax
  mulsd  D4(%rip),%xmm0
  mov    %rax,0xf0(%rsp)
  add    0x1a0(%rsp),%rax
  mov    %rax,0x100(%rsp)
  mov    0x180(%rsp),%eax
  movsd  %xmm6,0x108(%rsp)
  pxor   %xmm6,%xmm6
  cvtsi2sdl 0x180(%rsp),%xmm6
  add    $0x1,%eax
  mov    %eax,0x11c(%rsp)
  mov    0x170(%rsp),%eax
  movsd  %xmm0,0xf8(%rsp)
  add    $0x1,%eax
  mov    %eax,0xa0(%rsp)
  movsd  %xmm6,0x110(%rsp)
L31:
  mov    0x1a0(%rsp),%rax
  mov    0xe8(%rsp),%rdx
  addq   $0x8,0x1a0(%rsp)
  movsd  (%rax,%rdx,1),%xmm6
  mov    0xf0(%rsp),%rdx
  movsd  %xmm6,0xc0(%rsp)
  movsd  (%rax,%rdx,1),%xmm7
  mov    0x1a0(%rsp),%rax
  movsd  %xmm7,0x80(%rsp)
  movsd  -0x8(%rax),%xmm4
  movsd  %xmm4,0x40(%rsp)
  subsd  0xf8(%rsp),%xmm4
  cvttsd2si %xmm4,%edi
  call   <floor@plt>
  movsd  D4(%rip),%xmm1
  mulsd  0x108(%rsp),%xmm1
  movsd  0x80(%rsp),%xmm7
  mov    %eax,0x98(%rsp)
  add    $0x1,%eax
  mov    %eax,0x9c(%rsp)
  subsd  %xmm1,%xmm7
  cvttsd2si %xmm7,%edi
  call   <floor@plt>
  movsd  D4(%rip),%xmm1
  mulsd  0x110(%rsp),%xmm1
  movsd  0xc0(%rsp),%xmm6
  mov    %eax,%ebx
  lea    0x1(%rax),%eax
  mov    %eax,0x118(%rsp)
  subsd  %xmm1,%xmm6
  cvttsd2si %xmm6,%edi
  call   <floor@plt>
  mov    0x180(%rsp),%esi
  lea    0x1(%rax),%edx
  mov    %edx,0xa4(%rsp)
  test   %esi,%esi
  jle    L90
  pxor   %xmm6,%xmm6
  add    0x11c(%rsp),%eax
  movq   $0x0,0xb0(%rsp)
  cvtsi2sdl 0x198(%rsp),%xmm6
  mov    %eax,0xd4(%rsp)
  mov    0x178(%rsp),%eax
  movq   $0x0,0xa8(%rsp)
  lea    0x1(%rbx,%rax,1),%eax
  mov    %eax,0x94(%rsp)
  movsd  %xmm6,0xd8(%rsp)
  pxor   %xmm6,%xmm6
  cvtsi2sdl 0xd0(%rsp),%xmm6
  movsd  %xmm6,0xe0(%rsp)
  nopl   (%rax)
L61:
  mov    0xa4(%rsp),%ebx
  pxor   %xmm1,%xmm1
  movsd  0xc0(%rsp),%xmm0
  cvtsi2sd %ebx,%xmm1
  subsd  %xmm1,%xmm0
  movsd  %xmm1,0x8(%rsp)
  mulsd  0xd8(%rsp),%xmm0
  addsd  D4(%rip),%xmm0
  cvttsd2si %xmm0,%edi
  call   <floor@plt>
  mov    0x168(%rsp),%rdx
  movsd  0x8(%rsp),%xmm1
  divsd  0xe0(%rsp),%xmm1
  cvttsd2si %xmm1,%edi
  cltq
  add    0xc8(%rsp),%rax
  movsd  (%rdx,%rax,8),%xmm6
  movsd  %xmm6,0xb8(%rsp)
  call   <floor@plt>
  imul   0xd0(%rsp),%eax
  mov    0x178(%rsp),%ecx
  mov    %ebx,%edx
  sub    %eax,%edx
  test   %ecx,%ecx
  jle    L81
  mov    0x6c(%rsp),%eax
  pxor   %xmm6,%xmm6
  pxor   %xmm7,%xmm7
  movq   $0x0,0x58(%rsp)
  cvtsi2sdl 0x190(%rsp),%xmm6
  movq   $0x0,0x50(%rsp)
  imul   %eax,%edx
  cvtsi2sd %eax,%xmm7
  mov    %edx,0x90(%rsp)
  mov    0x118(%rsp),%edx
  movsd  %xmm6,0x70(%rsp)
  mov    %edx,0x68(%rsp)
  movsd  %xmm7,0x78(%rsp)
  nopl   0x0(%rax,%rax,1)
L6:
  mov    0x68(%rsp),%ebx
  pxor   %xmm1,%xmm1
  movsd  0x80(%rsp),%xmm0
  cvtsi2sd %ebx,%xmm1
  subsd  %xmm1,%xmm0
  mulsd  0x70(%rsp),%xmm0
  movsd  %xmm1,0x8(%rsp)
  addsd  D4(%rip),%xmm0
  cvttsd2si %xmm0,%edi
  call   <floor@plt>
  mov    0x160(%rsp),%rdx
  movsd  0x8(%rsp),%xmm1
  divsd  0x78(%rsp),%xmm1
  cvttsd2si %xmm1,%edi
  cltq
  add    0x88(%rsp),%rax
  movsd  (%rdx,%rax,8),%xmm7
  movsd  %xmm7,0x60(%rsp)
  call   <floor@plt>
  imul   0x6c(%rsp),%eax
  sub    %eax,%ebx
  mov    0x170(%rsp),%eax
  add    0x90(%rsp),%ebx
  imul   %r12d,%ebx
  test   %eax,%eax
  jle    L2
  pxor   %xmm7,%xmm7
  mov    0xa0(%rsp),%eax
  add    0x98(%rsp),%eax
  pxor   %xmm3,%xmm3
  mov    %eax,0x2c(%rsp)
  mov    0x9c(%rsp),%ebp
  movapd %xmm3,%xmm2
  cvtsi2sdl 0x188(%rsp),%xmm7
  movsd  %xmm7,0x30(%rsp)
  pxor   %xmm7,%xmm7
  cvtsi2sd %r12d,%xmm7
  movsd  %xmm7,0x38(%rsp)
  nopl   0x0(%rax)
L5:
  pxor   %xmm1,%xmm1
  movsd  0x40(%rsp),%xmm0
  movsd  %xmm3,0x20(%rsp)
  cvtsi2sd %ebp,%xmm1
  movsd  %xmm2,0x18(%rsp)
  subsd  %xmm1,%xmm0
  mulsd  0x30(%rsp),%xmm0
  movsd  %xmm1,0x10(%rsp)
  addsd  D4(%rip),%xmm0
  cvttsd2si %xmm0,%edi
  call   <floor@plt>
  mov    0x48(%rsp),%rsi
  movsd  0x10(%rsp),%xmm1
  divsd  0x38(%rsp),%xmm1
  cltq
  cvttsd2si %xmm1,%edi
  add    %r15,%rax
  movsd  (%rsi,%rax,8),%xmm0
  movsd  %xmm0,0x8(%rsp)
  call   <floor@plt>
  movsd  0x8(%rsp),%xmm0
  movsd  0x18(%rsp),%xmm2
  imul   %r12d,%eax
  movsd  0x20(%rsp),%xmm3
  mov    %eax,%ecx
  mov    %ebp,%eax
  add    $0x1,%ebp
  sub    %ecx,%eax
  add    %ebx,%eax
  cltq
  movsd  (%r14,%rax,8),%xmm1
  mulsd  %xmm0,%xmm1
  mulsd  0x0(%r13,%rax,8),%xmm0
  addsd  %xmm1,%xmm2
  addsd  %xmm0,%xmm3
  cmp    0x2c(%rsp),%ebp
  jne    L5
L40:
  movsd  0x60(%rsp),%xmm6
  movsd  0x58(%rsp),%xmm0
  addl   $0x1,0x68(%rsp)
  mov    0x68(%rsp),%eax
  mulsd  %xmm6,%xmm2
  mulsd  %xmm3,%xmm6
  addsd  0x50(%rsp),%xmm2
  movsd  %xmm2,0x50(%rsp)
  addsd  %xmm6,%xmm0
  movsd  %xmm0,0x58(%rsp)
  cmp    0x94(%rsp),%eax
  jne    L6
L91:
  movsd  0xb8(%rsp),%xmm6
  movsd  0x50(%rsp),%xmm0
  addl   $0x1,0xa4(%rsp)
  mov    0xa4(%rsp),%eax
  mulsd  %xmm6,%xmm0
  addsd  0xa8(%rsp),%xmm0
  mulsd  0x58(%rsp),%xmm6
  movsd  %xmm0,0xa8(%rsp)
  movsd  0xb0(%rsp),%xmm0
  addsd  %xmm6,%xmm0
  movsd  %xmm0,0xb0(%rsp)
  cmp    0xd4(%rsp),%eax
  jne    L61
L41:
  movsd  0xa8(%rsp),%xmm6
  addq   $0x8,0x1b0(%rsp)
  mov    0x1b0(%rsp),%rax
  addq   $0x8,0x1b8(%rsp)
  movsd  %xmm6,-0x8(%rax)
  mov    0x1b8(%rsp),%rax
  movsd  0xb0(%rsp),%xmm6
  movsd  %xmm6,-0x8(%rax)
  mov    0x100(%rsp),%rax
  cmp    0x1a0(%rsp),%rax
  jne    L31
L65:
  add    $0x128,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  cs nopw 0x0(%rax,%rax,1)
L2:
  pxor   %xmm3,%xmm3
  movapd %xmm3,%xmm2
  jmp    L40
L81:
  movq   $0x0,0x58(%rsp)
  movq   $0x0,0x50(%rsp)
  jmp    L91
L90:
  movq   $0x0,0xb0(%rsp)
  movq   $0x0,0xa8(%rsp)
  jmp    L41
```

tool_calls: name: extract_symbolic_data
arguments: data_label: D4
type: f64

tool: D4: 0.5

assistant: ```c
void interp3_table0_real_per(const double *r_ck, const double *i_ck, const int K1, const int K2, const int K3, const double *r_h1, const double *r_h2, const double *r_h3, const int J1, const int J2, const int J3, const int L1, const int L2, const int L3, const double *p_tm, const int M, double *r_fm, double *i_fm) {
  int mm;
  {
    const int ncenter1 = floor(J1 * L1 / 2.);
    r_h1 += ncenter1;
  }
  {
    const int ncenter2 = floor(J2 * L2 / 2.);
    r_h2 += ncenter2;
  }
  {
    const int ncenter3 = floor(J3 * L3 / 2.);
    r_h3 += ncenter3;
  }
  for (mm = 0; mm < M; mm++) {
    int jj1, jj2, jj3;
    const double t3 = p_tm[2 * M];
    const double t2 = p_tm[M];
    const double t1 = *p_tm++;
    double sum3r = 0;
    double sum3i = 0;
    const int koff1 = 1 + floor(t1 - J1 / 2.);
    const int koff2 = 1 + floor(t2 - J2 / 2.);
    int k3 = 1 + floor(t3 - J3 / 2.);
    for (jj3 = 0; jj3 < J3; jj3++, k3++) {
      const double p3 = (t3 - k3) * L3;
      const int n3 = floor(p3 + 0.5);
      double coef3r = r_h3[n3];
      const int wrap3 = floor(k3 / (double)K3);
      const int k3mod = k3 - K3 * wrap3;
      register double sum2r = 0;
      register double sum2i = 0;
      int k2 = koff2;
      for (jj2 = 0; jj2 < J2; jj2++, k2++) {
        const double p2 = (t2 - k2) * L2;
        const int n2 = floor(p2 + 0.5);
        double coef2r = r_h2[n2];
        const int wrap2 = floor(k2 / (double)K2);
        const int k2mod = k2 - K2 * wrap2;
        const int k23mod = (k3mod * K2 + k2mod) * K1;
        register double sum1r = 0;
        register double sum1i = 0;
        int k1 = koff1;
        for (jj1 = 0; jj1 < J1; jj1++, k1++) {
          const double p1 = (t1 - k1) * L1;
          const int n1 = floor(p1 + 0.5);
          register double coef1r = r_h1[n1];
          const int wrap1 = floor(k1 / (double)K1);
          const int k1mod = k1 - K1 * wrap1;
          const int kk = k23mod + k1mod;
          sum1r += coef1r * r_ck[kk];
          sum1i += coef1r * i_ck[kk];
        }
        sum2r += coef2r * sum1r;
        sum2i += coef2r * sum1i;
      }
      sum3r += coef3r * sum2r;
      sum3i += coef3r * sum2i;
    }
    *r_fm++ = sum3r;
    *i_fm++ = sum3i;
  }
}
```