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

```asm
<CalcInterpolatedElements>:
  endbr64
  push   %r15
  movapd %xmm0,%xmm2
  mov    %rcx,%rax
  mov    %r9,%r15
  push   %r14
  push   %r13
  push   %r12
  mov    %esi,%r12d
  push   %rbp
  mov    %rdi,%rbp
  push   %rbx
  sub    $0x28,%rsp
  movsd  (%r9),%xmm4
  movsd  D28(%rip),%xmm5
  mov    0x60(%rsp),%rbx
  mov    0x70(%rsp),%r14
  comisd %xmm4,%xmm5
  mov    0x78(%rsp),%rsi
  ja     L537
  comisd %xmm0,%xmm4
  mov    %r8,%r13
  jb     L132
  movapd %xmm4,%xmm0
  subsd  %xmm1,%xmm0
  comisd %xmm0,%xmm2
  jae    L268
  movapd %xmm1,%xmm6
  movapd %xmm4,%xmm3
  addsd  %xmm1,%xmm6
  subsd  %xmm6,%xmm3
  comisd %xmm3,%xmm2
  jb     L516
  comisd (%rcx),%xmm5
  jbe    L202
  mov    %rsi,0x78(%rsp)
  mov    %r8,%rdi
  mov    %rdx,(%rsp)
  movsd  %xmm1,0x18(%rsp)
  movsd  %xmm2,0x10(%rsp)
  mov    %rcx,0x8(%rsp)
  movsd  %xmm0,(%rcx)
  call   *%rdx
  movsd  (%r15),%xmm4
  movsd  0x18(%rsp),%xmm1
  movsd  0x10(%rsp),%xmm2
  mov    0x8(%rsp),%rax
  mov    0x78(%rsp),%rsi
  mov    (%rsp),%rdx
L202:
  mov    0x68(%rsp),%rdi
  movsd  %xmm4,(%rdi)
  movsd  (%rax),%xmm0
  movsd  %xmm0,(%r15)
  test   %r12d,%r12d
  jle    L165
  lea    -0x1(%r12),%ecx
  lea    0x8(%r13),%rdi
  cmp    $0x1,%ecx
  seta   %cl
  cmp    %rdi,%rbx
  setne  %dil
  and    %edi,%ecx
  lea    0xf(%r14),%rdi
  sub    %r13,%rdi
  cmp    $0x1e,%rdi
  seta   %dil
  test   %dil,%cl
  je     L7
  lea    0xf(%rbx),%rcx
  sub    %r14,%rcx
  cmp    $0x1e,%rcx
  jbe    L7
  mov    %r12d,%edi
  xor    %ecx,%ecx
  shr    %edi
  shl    $0x4,%rdi
L615:
  movupd (%rbx,%rcx,1),%xmm6
  movups %xmm6,(%r14,%rcx,1)
  movupd 0x0(%r13,%rcx,1),%xmm5
  movups %xmm5,(%rbx,%rcx,1)
  add    $0x10,%rcx
  cmp    %rcx,%rdi
  jne    L615
  mov    %r12d,%ecx
  and    $0xfffffffe,%ecx
  test   $0x1,%r12b
  je     L526
  lea    (%rbx,%rcx,8),%rdi
  movsd  (%rdi),%xmm0
  movsd  %xmm0,(%r14,%rcx,8)
  movsd  0x0(%r13,%rcx,8),%xmm0
  movsd  %xmm0,(%rdi)
L526:
  movsd  (%r15),%xmm0
L165:
  subsd  %xmm1,%xmm0
  mov    %rax,(%rsp)
  mov    %r13,%rdi
  movsd  %xmm2,0x10(%rsp)
  movsd  %xmm1,0x8(%rsp)
  movsd  %xmm0,(%rax)
  call   *%rdx
  mov    (%rsp),%rax
  movsd  (%r15),%xmm4
  movsd  0x8(%rsp),%xmm1
  movsd  0x10(%rsp),%xmm2
  movsd  (%rax),%xmm3
  jmp    L614
  nopl   0x0(%rax,%rax,1)
L132:
  movapd %xmm4,%xmm6
  addsd  %xmm1,%xmm6
  comisd %xmm0,%xmm6
  jae    L147
  movapd %xmm1,%xmm0
  addsd  %xmm1,%xmm0
  addsd  %xmm4,%xmm0
  comisd %xmm2,%xmm0
  jb     L476
  mov    0x68(%rsp),%rdi
  comisd (%rdi),%xmm5
  jbe    L520
  mov    %rsi,0x78(%rsp)
  movapd %xmm6,%xmm0
  mov    %rdx,(%rsp)
  movsd  %xmm1,0x10(%rsp)
  movsd  %xmm2,0x8(%rsp)
  movsd  %xmm6,(%rdi)
  mov    %r14,%rdi
  mov    %rcx,0x18(%rsp)
  call   *%rdx
  movsd  (%r15),%xmm4
  mov    0x18(%rsp),%rax
  movsd  0x10(%rsp),%xmm1
  movsd  0x8(%rsp),%xmm2
  mov    0x78(%rsp),%rsi
  mov    (%rsp),%rdx
L520:
  movsd  %xmm4,(%rax)
  mov    0x68(%rsp),%rax
  movsd  (%rax),%xmm0
  movsd  %xmm0,(%r15)
  test   %r12d,%r12d
  jle    L558
  lea    -0x1(%r12),%eax
  lea    0x8(%r14),%rcx
  cmp    $0x1,%eax
  seta   %al
  cmp    %rcx,%rbx
  setne  %cl
  and    %ecx,%eax
  lea    0xf(%r14),%rcx
  sub    %r13,%rcx
  cmp    $0x1e,%rcx
  seta   %cl
  test   %cl,%al
  je     L48
  lea    0xf(%rbx),%rax
  sub    %r13,%rax
  cmp    $0x1e,%rax
  jbe    L48
  mov    %r12d,%ecx
  xor    %eax,%eax
  shr    %ecx
  shl    $0x4,%rcx
  nopl   (%rax)
L338:
  movupd (%rbx,%rax,1),%xmm7
  movups %xmm7,0x0(%r13,%rax,1)
  movupd (%r14,%rax,1),%xmm6
  movups %xmm6,(%rbx,%rax,1)
  add    $0x10,%rax
  cmp    %rcx,%rax
  jne    L338
  mov    %r12d,%eax
  and    $0xfffffffe,%eax
  test   $0x1,%r12b
  je     L364
  lea    (%rbx,%rax,8),%rcx
  movsd  (%rcx),%xmm0
  movsd  %xmm0,0x0(%r13,%rax,8)
  movsd  (%r14,%rax,8),%xmm0
  movsd  %xmm0,(%rcx)
L364:
  movsd  (%r15),%xmm0
L558:
  addsd  %xmm1,%xmm0
  mov    0x68(%rsp),%rax
  movsd  %xmm1,(%rsp)
  mov    %r14,%rdi
  movsd  %xmm2,0x8(%rsp)
  movsd  %xmm0,(%rax)
  call   *%rdx
  mov    0x68(%rsp),%rax
  movsd  (%r15),%xmm4
  movsd  (%rsp),%xmm1
  movsd  0x8(%rsp),%xmm2
  movsd  (%rax),%xmm0
  jmp    L564
  nopl   0x0(%rax,%rax,1)
L537:
  movsd  D56(%rip),%xmm0
  mov    0x68(%rsp),%rax
  mov    %rbx,%rdi
  movsd  %xmm0,(%rcx)
  movsd  %xmm0,(%rax)
  movapd %xmm2,%xmm0
  movsd  %xmm2,(%r9)
  call   *%rdx
  test   %r12d,%r12d
  jle    L333
  lea    0x8(%rbx),%rax
  cmp    %rax,%rbp
  je     L523
  lea    -0x1(%r12),%eax
  cmp    $0x2,%eax
  jbe    L523
  mov    %r12d,%edx
  xor    %eax,%eax
  shr    %edx
  shl    $0x4,%rdx
  xchg   %ax,%ax
L193:
  movupd (%rbx,%rax,1),%xmm7
  movups %xmm7,0x0(%rbp,%rax,1)
  add    $0x10,%rax
  cmp    %rax,%rdx
  jne    L193
L168:
  mov    %r12d,%eax
  and    $0xfffffffe,%eax
  and    $0x1,%r12d
  je     L333
  movsd  (%rbx,%rax,8),%xmm0
  movsd  %xmm0,0x0(%rbp,%rax,8)
L333:
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax)
L268:
  movsd  (%rcx),%xmm3
  comisd %xmm3,%xmm5
  jbe    L614
  movsd  %xmm1,0x10(%rsp)
  mov    %r8,%rdi
  movsd  %xmm2,0x8(%rsp)
  mov    %rcx,(%rsp)
  movsd  %xmm0,(%rcx)
  call   *%rdx
  mov    (%rsp),%rax
  movsd  (%r15),%xmm4
  movsd  0x8(%rsp),%xmm2
  movsd  0x10(%rsp),%xmm1
  movsd  (%rax),%xmm3
L614:
  subsd  %xmm2,%xmm4
  subsd  %xmm3,%xmm2
  movsd  D26(%rip),%xmm3
  divsd  %xmm1,%xmm3
  test   %r12d,%r12d
  jle    L333
  lea    0x8(%r13),%rax
  cmp    %rax,%rbp
  setne  %dl
  cmp    $0x1,%r12d
  setne  %al
  test   %al,%dl
  je     L151
  lea    0x8(%rbx),%rax
  cmp    %rax,%rbp
  je     L151
  mov    %r12d,%edx
  movapd %xmm4,%xmm7
  movapd %xmm2,%xmm6
  xor    %eax,%eax
  movapd %xmm3,%xmm5
  shr    %edx
  unpcklpd %xmm7,%xmm7
  unpcklpd %xmm6,%xmm6
  unpcklpd %xmm5,%xmm5
  shl    $0x4,%rdx
  xchg   %ax,%ax
L449:
  movupd (%rbx,%rax,1),%xmm0
  movupd 0x0(%r13,%rax,1),%xmm1
  mulpd  %xmm6,%xmm0
  mulpd  %xmm7,%xmm1
  addpd  %xmm1,%xmm0
  mulpd  %xmm5,%xmm0
  movups %xmm0,0x0(%rbp,%rax,1)
  add    $0x10,%rax
  cmp    %rax,%rdx
  jne    L449
  mov    %r12d,%eax
  and    $0xfffffffe,%eax
  and    $0x1,%r12d
  je     L333
  mulsd  (%rbx,%rax,8),%xmm2
  mulsd  0x0(%r13,%rax,8),%xmm4
  addsd  %xmm4,%xmm2
  mulsd  %xmm3,%xmm2
  movsd  %xmm2,0x0(%rbp,%rax,8)
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax,%rax,1)
L147:
  mov    0x68(%rsp),%rax
  movsd  (%rax),%xmm0
  comisd %xmm0,%xmm5
  jbe    L564
  movsd  %xmm1,0x8(%rsp)
  movapd %xmm6,%xmm0
  mov    %r14,%rdi
  movsd  %xmm2,(%rsp)
  movsd  %xmm6,(%rax)
  call   *%rdx
  mov    0x68(%rsp),%rax
  movsd  (%r15),%xmm4
  movsd  (%rsp),%xmm2
  movsd  0x8(%rsp),%xmm1
  movsd  (%rax),%xmm0
L564:
  movapd %xmm0,%xmm3
  subsd  %xmm2,%xmm3
  subsd  %xmm4,%xmm2
  movsd  D26(%rip),%xmm4
  divsd  %xmm1,%xmm4
  test   %r12d,%r12d
  jle    L333
  lea    0x8(%r14),%rax
  cmp    %rax,%rbp
  setne  %dl
  cmp    $0x1,%r12d
  setne  %al
  test   %al,%dl
  je     L141
  lea    0x8(%rbx),%rax
  cmp    %rax,%rbp
  je     L141
  mov    %r12d,%edx
  movapd %xmm3,%xmm7
  movapd %xmm2,%xmm6
  xor    %eax,%eax
  movapd %xmm4,%xmm5
  shr    %edx
  unpcklpd %xmm7,%xmm7
  unpcklpd %xmm6,%xmm6
  unpcklpd %xmm5,%xmm5
  shl    $0x4,%rdx
  nopw   0x0(%rax,%rax,1)
L331:
  movupd (%rbx,%rax,1),%xmm0
  movupd (%r14,%rax,1),%xmm1
  mulpd  %xmm7,%xmm0
  mulpd  %xmm6,%xmm1
  addpd  %xmm1,%xmm0
  mulpd  %xmm5,%xmm0
  movups %xmm0,0x0(%rbp,%rax,1)
  add    $0x10,%rax
  cmp    %rax,%rdx
  jne    L331
  mov    %r12d,%eax
  and    $0xfffffffe,%eax
  and    $0x1,%r12d
  je     L333
  mulsd  (%rbx,%rax,8),%xmm3
  mulsd  (%r14,%rax,8),%xmm2
  addsd  %xmm3,%xmm2
  mulsd  %xmm4,%xmm2
  movsd  %xmm2,0x0(%rbp,%rax,8)
  jmp    L333
  nop
L523:
  xor    %eax,%eax
  nopw   0x0(%rax,%rax,1)
L183:
  movsd  (%rbx,%rax,8),%xmm0
  movsd  %xmm0,0x0(%rbp,%rax,8)
  add    $0x1,%rax
  cmp    %rax,%r12
  jne    L183
  jmp    L333
  nopl   0x0(%rax)
L476:
  movsd  D56(%rip),%xmm0
  mov    0x68(%rsp),%rax
  mov    %rbx,%rdi
  movsd  %xmm0,(%rcx)
  movsd  %xmm0,(%rax)
  movapd %xmm2,%xmm0
  movsd  %xmm2,(%r9)
  call   *%rdx
  test   %r12d,%r12d
  jle    L333
  lea    -0x1(%r12),%eax
  cmp    $0x2,%eax
  jbe    L598
  lea    0x8(%rbx),%rax
  cmp    %rax,%rbp
  je     L598
  mov    %r12d,%edx
  xor    %eax,%eax
  shr    %edx
  shl    $0x4,%rdx
  nopw   0x0(%rax,%rax,1)
L225:
  movupd (%rbx,%rax,1),%xmm7
  movups %xmm7,0x0(%rbp,%rax,1)
  add    $0x10,%rax
  cmp    %rdx,%rax
  jne    L225
  jmp    L168
  nopl   0x0(%rax,%rax,1)
L516:
  movsd  D56(%rip),%xmm0
  mov    0x68(%rsp),%rax
  mov    %rbx,%rdi
  movsd  %xmm0,(%rcx)
  movsd  %xmm0,(%rax)
  movapd %xmm2,%xmm0
  movsd  %xmm2,(%r9)
  call   *%rdx
  test   %r12d,%r12d
  jle    L333
  lea    -0x1(%r12),%eax
  cmp    $0x2,%eax
  jbe    L576
  lea    0x8(%rbx),%rax
  cmp    %rax,%rbp
  je     L576
  mov    %r12d,%edx
  xor    %eax,%eax
  shr    %edx
  shl    $0x4,%rdx
  nopw   0x0(%rax,%rax,1)
L458:
  movupd (%rbx,%rax,1),%xmm5
  movups %xmm5,0x0(%rbp,%rax,1)
  add    $0x10,%rax
  cmp    %rdx,%rax
  jne    L458
  jmp    L168
L141:
  movslq %r12d,%r12
  xor    %eax,%eax
  nopl   (%rax)
L521:
  movsd  (%rbx,%rax,8),%xmm0
  movsd  (%r14,%rax,8),%xmm1
  mulsd  %xmm3,%xmm0
  mulsd  %xmm2,%xmm1
  addsd  %xmm1,%xmm0
  mulsd  %xmm4,%xmm0
  movsd  %xmm0,0x0(%rbp,%rax,8)
  add    $0x1,%rax
  cmp    %r12,%rax
  jne    L521
  jmp    L333
  nopw   0x0(%rax,%rax,1)
L151:
  movslq %r12d,%r12
  xor    %eax,%eax
  nopl   (%rax)
L371:
  movsd  (%rbx,%rax,8),%xmm0
  movsd  0x0(%r13,%rax,8),%xmm1
  mulsd  %xmm2,%xmm0
  mulsd  %xmm4,%xmm1
  addsd  %xmm1,%xmm0
  mulsd  %xmm3,%xmm0
  movsd  %xmm0,0x0(%rbp,%rax,8)
  add    $0x1,%rax
  cmp    %r12,%rax
  jne    L371
  jmp    L333
L7:
  mov    %r12d,%edi
  xor    %ecx,%ecx
  nopl   (%rax)
L350:
  movsd  (%rbx,%rcx,8),%xmm0
  movsd  %xmm0,(%r14,%rcx,8)
  movsd  0x0(%r13,%rcx,8),%xmm0
  movsd  %xmm0,(%rbx,%rcx,8)
  add    $0x1,%rcx
  cmp    %rdi,%rcx
  jne    L350
  jmp    L526
L48:
  mov    %r12d,%ecx
  xor    %eax,%eax
  nopw   0x0(%rax,%rax,1)
L589:
  movsd  (%rbx,%rax,8),%xmm0
  movsd  %xmm0,0x0(%r13,%rax,8)
  movsd  (%r14,%rax,8),%xmm0
  movsd  %xmm0,(%rbx,%rax,8)
  add    $0x1,%rax
  cmp    %rax,%rcx
  jne    L589
  jmp    L364
L576:
  xor    %eax,%eax
  nopw   0x0(%rax,%rax,1)
L543:
  movsd  (%rbx,%rax,8),%xmm0
  movsd  %xmm0,0x0(%rbp,%rax,8)
  add    $0x1,%rax
  cmp    %r12,%rax
  jne    L543
  jmp    L333
L598:
  xor    %eax,%eax
  nopl   0x0(%rax,%rax,1)
L51:
  movsd  (%rbx,%rax,8),%xmm0
  movsd  %xmm0,0x0(%rbp,%rax,8)
  add    $0x1,%rax
  cmp    %rax,%r12
  jne    L51
  jmp    L333
```

tool_calls: name: retrieve_data
arguments: label: D28
data_type: byte[8]
name: retrieve_data
arguments: label: D56
data_type: byte[8]
name: retrieve_data
arguments: label: D26
data_type: f64

tool: {"D28": [0x2e,0x9f,0x87,0xa2,0xae,0x42,0x7d,0xd4]}

tool: {"D56": [0x7d,0xc3,0x94,0x25,0xad,0x49,0xb2,0xd4]}

tool: D26: 1

assistant: ```c
void CalcInterpolatedElements(const double t, double elem[], const int dim, void (*calc_func)(const double t, double elem[], void *user), const double delta_t, double *t0, double e0[], double *t1, double e1[], double *t2, double e2[], void *user) {
  int i;
  if (*t1 < -1e99) {
    *t0 = -1e100;
    *t2 = -1e100;
    *t1 = t;
    (*calc_func)(*t1, e1, user);
    for (i = 0; i < dim; i++)
      elem[i] = e1[i];
    return;
  }
  if (t <= *t1) {
    if (*t1 - delta_t <= t) {
      if (*t0 < -1e99) {
        *t0 = *t1 - delta_t;
        (*calc_func)(*t0, e0, user);
      }
    } else if (*t1 - 2.0 * delta_t <= t) {
      if (*t0 < -1e99) {
        *t0 = *t1 - delta_t;
        (*calc_func)(*t0, e0, user);
      }
      *t2 = *t1;
      *t1 = *t0;
      for (i = 0; i < dim; i++) {
        e2[i] = e1[i];
        e1[i] = e0[i];
      }
      *t0 = *t1 - delta_t;
      (*calc_func)(*t0, e0, user);
    } else {
      *t0 = -1e100;
      *t2 = -1e100;
      *t1 = t;
      (*calc_func)(*t1, e1, user);
      for (i = 0; i < dim; i++)
        elem[i] = e1[i];
      return;
    }
    {
      const double f0 = (*t1 - t);
      const double f1 = (t - *t0);
      const double fact = 1.0 / delta_t;
      for (i = 0; i < dim; i++)
        elem[i] = fact * (e0[i] * f0 + e1[i] * f1);
    }
  } else {
    if (*t1 + delta_t >= t) {
      if (*t2 < -1e99) {
        *t2 = *t1 + delta_t;
        (*calc_func)(*t2, e2, user);
      }
    } else if (*t1 + 2.0 * delta_t >= t) {
      if (*t2 < -1e99) {
        *t2 = *t1 + delta_t;
        (*calc_func)(*t2, e2, user);
      }
      *t0 = *t1;
      *t1 = *t2;
      for (i = 0; i < dim; i++) {
        e0[i] = e1[i];
        e1[i] = e2[i];
      }
      *t2 = *t1 + delta_t;
      (*calc_func)(*t2, e2, user);
    } else {
      *t0 = -1e100;
      *t2 = -1e100;
      *t1 = t;
      (*calc_func)(*t1, e1, user);
      for (i = 0; i < dim; i++)
        elem[i] = e1[i];
      return;
    }
    {
      const double f1 = (*t2 - t);
      const double f2 = (t - *t1);
      const double fact = 1.0 / delta_t;
      for (i = 0; i < dim; i++)
        elem[i] = fact * (e1[i] * f1 + e2[i] * f2);
    }
  }
}
```