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

```asm
<CalcInterpolatedElements>:
  endbr64
  push   %r15
  movapd %xmm0,%xmm2
  mov    %rdx,%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  D48(%rip),%xmm5
  mov    0x60(%rsp),%rbx
  mov    0x70(%rsp),%r14
  comisd %xmm4,%xmm5
  ja     L236
  comisd %xmm0,%xmm4
  mov    %r8,%r13
  jb     L17
  movapd %xmm4,%xmm0
  subsd  %xmm1,%xmm0
  comisd %xmm0,%xmm2
  jae    L332
  movapd %xmm1,%xmm6
  movapd %xmm4,%xmm3
  addsd  %xmm1,%xmm6
  subsd  %xmm6,%xmm3
  comisd %xmm3,%xmm2
  jb     L505
  comisd (%rcx),%xmm5
  jbe    L78
  mov    %rcx,0x8(%rsp)
  mov    %r8,%rdi
  movsd  %xmm1,0x18(%rsp)
  movsd  %xmm2,0x10(%rsp)
  movsd  %xmm0,(%rcx)
  mov    %rdx,(%rsp)
  call   *%rdx
  movsd  (%r15),%xmm4
  movsd  0x18(%rsp),%xmm1
  movsd  0x10(%rsp),%xmm2
  mov    0x8(%rsp),%rcx
  mov    (%rsp),%rax
L78:
  mov    0x68(%rsp),%rdi
  movsd  %xmm4,(%rdi)
  movsd  (%rcx),%xmm0
  movsd  %xmm0,(%r15)
  test   %r12d,%r12d
  jle    L561
  lea    0xf(%r14),%rdx
  lea    0x8(%r13),%rsi
  sub    %r13,%rdx
  cmp    $0x1e,%rdx
  seta   %dl
  cmp    %rsi,%rbx
  setne  %sil
  and    %esi,%edx
  lea    -0x1(%r12),%esi
  cmp    $0x1,%esi
  seta   %sil
  test   %sil,%dl
  je     L315
  lea    0xf(%rbx),%rdx
  sub    %r14,%rdx
  cmp    $0x1e,%rdx
  jbe    L315
  mov    %r12d,%esi
  xor    %edx,%edx
  shr    %esi
  shl    $0x4,%rsi
  nopl   0x0(%rax)
L113:
  movupd (%rbx,%rdx,1),%xmm6
  movups %xmm6,(%r14,%rdx,1)
  movupd 0x0(%r13,%rdx,1),%xmm5
  movups %xmm5,(%rbx,%rdx,1)
  add    $0x10,%rdx
  cmp    %rdx,%rsi
  jne    L113
  mov    %r12d,%edx
  and    $0xfffffffe,%edx
  test   $0x1,%r12b
  je     L486
  lea    (%rbx,%rdx,8),%rsi
  movsd  (%rsi),%xmm0
  movsd  %xmm0,(%r14,%rdx,8)
  movsd  0x0(%r13,%rdx,8),%xmm0
  movsd  %xmm0,(%rsi)
L486:
  movsd  (%r15),%xmm0
L561:
  subsd  %xmm1,%xmm0
  mov    %rcx,(%rsp)
  mov    %r13,%rdi
  movsd  %xmm2,0x10(%rsp)
  movsd  %xmm1,0x8(%rsp)
  movsd  %xmm0,(%rcx)
  call   *%rax
  mov    (%rsp),%rcx
  movsd  (%r15),%xmm4
  movsd  0x8(%rsp),%xmm1
  movsd  0x10(%rsp),%xmm2
  movsd  (%rcx),%xmm3
  jmp    L497
  nopl   0x0(%rax,%rax,1)
L17:
  movapd %xmm4,%xmm6
  addsd  %xmm1,%xmm6
  comisd %xmm0,%xmm6
  jae    L252
  movapd %xmm1,%xmm0
  addsd  %xmm1,%xmm0
  addsd  %xmm4,%xmm0
  comisd %xmm2,%xmm0
  jb     L511
  mov    0x68(%rsp),%rdi
  comisd (%rdi),%xmm5
  jbe    L221
  mov    %rcx,0x18(%rsp)
  movapd %xmm6,%xmm0
  movsd  %xmm1,0x10(%rsp)
  movsd  %xmm2,0x8(%rsp)
  movsd  %xmm6,(%rdi)
  mov    %r14,%rdi
  mov    %rdx,(%rsp)
  call   *%rdx
  movsd  (%r15),%xmm4
  mov    0x18(%rsp),%rcx
  movsd  0x10(%rsp),%xmm1
  movsd  0x8(%rsp),%xmm2
  mov    (%rsp),%rax
L221:
  mov    0x68(%rsp),%rdi
  movsd  %xmm4,(%rcx)
  movsd  (%rdi),%xmm0
  movsd  %xmm0,(%r15)
  test   %r12d,%r12d
  jle    L523
  lea    0xf(%r14),%rdx
  lea    0x8(%r14),%rcx
  sub    %r13,%rdx
  cmp    $0x1e,%rdx
  seta   %dl
  cmp    %rcx,%rbx
  setne  %cl
  and    %ecx,%edx
  lea    -0x1(%r12),%ecx
  cmp    $0x1,%ecx
  seta   %cl
  test   %cl,%dl
  je     L552
  lea    0xf(%rbx),%rdx
  sub    %r13,%rdx
  cmp    $0x1e,%rdx
  jbe    L552
  mov    %r12d,%ecx
  xor    %edx,%edx
  shr    %ecx
  shl    $0x4,%rcx
  nopl   0x0(%rax,%rax,1)
L436:
  movupd (%rbx,%rdx,1),%xmm7
  movups %xmm7,0x0(%r13,%rdx,1)
  movupd (%r14,%rdx,1),%xmm6
  movups %xmm6,(%rbx,%rdx,1)
  add    $0x10,%rdx
  cmp    %rcx,%rdx
  jne    L436
  mov    %r12d,%edx
  and    $0xfffffffe,%edx
  test   $0x1,%r12b
  je     L57
  lea    (%rbx,%rdx,8),%rcx
  movsd  (%rcx),%xmm0
  movsd  %xmm0,0x0(%r13,%rdx,8)
  movsd  (%r14,%rdx,8),%xmm0
  movsd  %xmm0,(%rcx)
L57:
  movsd  (%r15),%xmm0
L523:
  addsd  %xmm1,%xmm0
  mov    0x68(%rsp),%rdi
  movsd  %xmm2,0x8(%rsp)
  movsd  %xmm1,(%rsp)
  movsd  %xmm0,(%rdi)
  mov    %r14,%rdi
  call   *%rax
  mov    0x68(%rsp),%rax
  movsd  (%r15),%xmm4
  movsd  (%rsp),%xmm1
  movsd  0x8(%rsp),%xmm2
  movsd  (%rax),%xmm0
  jmp    L530
  nopl   0x0(%rax,%rax,1)
L236:
  movsd  D34(%rip),%xmm0
  mov    0x68(%rsp),%rdi
  movsd  %xmm0,(%rcx)
  movsd  %xmm0,(%rdi)
  mov    %rbx,%rdi
  movapd %xmm2,%xmm0
  movsd  %xmm2,(%r9)
  call   *%rdx
  test   %r12d,%r12d
  jle    L142
  lea    0x8(%rbx),%rax
  cmp    %rax,%rbp
  je     L413
  lea    -0x1(%r12),%eax
  cmp    $0x2,%eax
  jbe    L413
  mov    %r12d,%edx
  xor    %eax,%eax
  shr    %edx
  shl    $0x4,%rdx
  xchg   %ax,%ax
L66:
  movupd (%rbx,%rax,1),%xmm7
  movups %xmm7,0x0(%rbp,%rax,1)
  add    $0x10,%rax
  cmp    %rax,%rdx
  jne    L66
L109:
  mov    %r12d,%eax
  and    $0xfffffffe,%eax
  and    $0x1,%r12d
  je     L142
  movsd  (%rbx,%rax,8),%xmm0
  movsd  %xmm0,0x0(%rbp,%rax,8)
L142:
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax)
L332:
  movsd  (%rcx),%xmm3
  comisd %xmm3,%xmm5
  jbe    L497
  mov    %rcx,(%rsp)
  mov    %r8,%rdi
  movsd  %xmm1,0x10(%rsp)
  movsd  %xmm2,0x8(%rsp)
  movsd  %xmm0,(%rcx)
  call   *%rdx
  mov    (%rsp),%rcx
  movsd  (%r15),%xmm4
  movsd  0x8(%rsp),%xmm2
  movsd  0x10(%rsp),%xmm1
  movsd  (%rcx),%xmm3
L497:
  subsd  %xmm2,%xmm4
  subsd  %xmm3,%xmm2
  movsd  D55(%rip),%xmm3
  divsd  %xmm1,%xmm3
  test   %r12d,%r12d
  jle    L142
  lea    0x8(%r13),%rax
  cmp    %rax,%rbp
  setne  %dl
  cmp    $0x1,%r12d
  setne  %al
  test   %al,%dl
  je     L456
  lea    0x8(%rbx),%rax
  cmp    %rax,%rbp
  je     L456
  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
L441:
  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    L441
  mov    %r12d,%eax
  and    $0xfffffffe,%eax
  and    $0x1,%r12d
  je     L142
  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)
L252:
  mov    0x68(%rsp),%rdi
  movsd  (%rdi),%xmm0
  comisd %xmm0,%xmm5
  jbe    L530
  movsd  %xmm1,0x8(%rsp)
  movapd %xmm6,%xmm0
  movsd  %xmm2,(%rsp)
  movsd  %xmm6,(%rdi)
  mov    %r14,%rdi
  call   *%rdx
  mov    0x68(%rsp),%rax
  movsd  (%r15),%xmm4
  movsd  (%rsp),%xmm2
  movsd  0x8(%rsp),%xmm1
  movsd  (%rax),%xmm0
L530:
  movapd %xmm0,%xmm3
  subsd  %xmm2,%xmm3
  subsd  %xmm4,%xmm2
  movsd  D55(%rip),%xmm4
  divsd  %xmm1,%xmm4
  test   %r12d,%r12d
  jle    L142
  lea    0x8(%r14),%rax
  cmp    %rax,%rbp
  setne  %dl
  cmp    $0x1,%r12d
  setne  %al
  test   %al,%dl
  je     L121
  lea    0x8(%rbx),%rax
  cmp    %rax,%rbp
  je     L121
  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)
L417:
  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    L417
  mov    %r12d,%eax
  and    $0xfffffffe,%eax
  and    $0x1,%r12d
  je     L142
  mulsd  (%rbx,%rax,8),%xmm3
  mulsd  (%r14,%rax,8),%xmm2
  addsd  %xmm3,%xmm2
  mulsd  %xmm4,%xmm2
  movsd  %xmm2,0x0(%rbp,%rax,8)
  jmp    L142
  nop
L413:
  xor    %eax,%eax
  nopw   0x0(%rax,%rax,1)
L383:
  movsd  (%rbx,%rax,8),%xmm0
  movsd  %xmm0,0x0(%rbp,%rax,8)
  add    $0x1,%rax
  cmp    %rax,%r12
  jne    L383
  jmp    L142
  nopl   0x0(%rax)
L511:
  movsd  D34(%rip),%xmm0
  mov    0x68(%rsp),%rdi
  movsd  %xmm0,(%rcx)
  movsd  %xmm0,(%rdi)
  mov    %rbx,%rdi
  movapd %xmm2,%xmm0
  movsd  %xmm2,(%r9)
  call   *%rdx
  test   %r12d,%r12d
  jle    L142
  lea    -0x1(%r12),%eax
  cmp    $0x2,%eax
  jbe    L461
  lea    0x8(%rbx),%rax
  cmp    %rax,%rbp
  je     L461
  mov    %r12d,%edx
  xor    %eax,%eax
  shr    %edx
  shl    $0x4,%rdx
  nopw   0x0(%rax,%rax,1)
L70:
  movupd (%rbx,%rax,1),%xmm7
  movups %xmm7,0x0(%rbp,%rax,1)
  add    $0x10,%rax
  cmp    %rdx,%rax
  jne    L70
  jmp    L109
  nopl   0x0(%rax,%rax,1)
L505:
  movsd  D34(%rip),%xmm0
  mov    0x68(%rsp),%rdi
  movsd  %xmm0,(%rcx)
  movsd  %xmm0,(%rdi)
  mov    %rbx,%rdi
  movapd %xmm2,%xmm0
  movsd  %xmm2,(%r9)
  call   *%rdx
  test   %r12d,%r12d
  jle    L142
  lea    -0x1(%r12),%eax
  cmp    $0x2,%eax
  jbe    L12
  lea    0x8(%rbx),%rax
  cmp    %rax,%rbp
  je     L12
  mov    %r12d,%edx
  xor    %eax,%eax
  shr    %edx
  shl    $0x4,%rdx
  nopw   0x0(%rax,%rax,1)
L569:
  movupd (%rbx,%rax,1),%xmm5
  movups %xmm5,0x0(%rbp,%rax,1)
  add    $0x10,%rax
  cmp    %rdx,%rax
  jne    L569
  jmp    L109
L121:
  movslq %r12d,%r12
  xor    %eax,%eax
  nopl   (%rax)
L553:
  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    L553
  jmp    L142
  nopw   0x0(%rax,%rax,1)
L456:
  movslq %r12d,%r12
  xor    %eax,%eax
  nopl   (%rax)
L369:
  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    L369
  jmp    L142
L315:
  mov    %r12d,%esi
  xor    %edx,%edx
  nopl   (%rax)
L559:
  movsd  (%rbx,%rdx,8),%xmm0
  movsd  %xmm0,(%r14,%rdx,8)
  movsd  0x0(%r13,%rdx,8),%xmm0
  movsd  %xmm0,(%rbx,%rdx,8)
  add    $0x1,%rdx
  cmp    %rsi,%rdx
  jne    L559
  jmp    L486
L552:
  mov    %r12d,%ecx
  xor    %edx,%edx
  nopw   0x0(%rax,%rax,1)
L313:
  movsd  (%rbx,%rdx,8),%xmm0
  movsd  %xmm0,0x0(%r13,%rdx,8)
  movsd  (%r14,%rdx,8),%xmm0
  movsd  %xmm0,(%rbx,%rdx,8)
  add    $0x1,%rdx
  cmp    %rdx,%rcx
  jne    L313
  jmp    L57
L12:
  xor    %eax,%eax
  nopw   0x0(%rax,%rax,1)
L47:
  movsd  (%rbx,%rax,8),%xmm0
  movsd  %xmm0,0x0(%rbp,%rax,8)
  add    $0x1,%rax
  cmp    %r12,%rax
  jne    L47
  jmp    L142
L461:
  xor    %eax,%eax
  nopl   0x0(%rax,%rax,1)
L33:
  movsd  (%rbx,%rax,8),%xmm0
  movsd  %xmm0,0x0(%rbp,%rax,8)
  add    $0x1,%rax
  cmp    %rax,%r12
  jne    L33
  jmp    L142
```

tool_calls: name: disassemble_data
arguments: data_tag: D48
datatype: byte[8]
name: disassemble_data
arguments: data_tag: D34
datatype: byte[8]
name: disassemble_data
arguments: data_tag: D55
datatype: f64

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

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

tool: D55: 1

assistant: ```c
void CalcInterpolatedElements(const double t, double elem[], const int dim, void (*calc_func)(const double t, double elem[]), const double delta_t, double *t0, double e0[], double *t1, double e1[], double *t2, double e2[]) {
  int i;
  if (*t1 < -1e99) {
    *t0 = -1e100;
    *t2 = -1e100;
    *t1 = t;
    (*calc_func)(*t1, e1);
    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);
      }
    } else if (*t1 - 2.0 * delta_t <= t) {
      if (*t0 < -1e99) {
        *t0 = *t1 - delta_t;
        (*calc_func)(*t0, e0);
      }
      *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);
    } else {
      *t0 = -1e100;
      *t2 = -1e100;
      *t1 = t;
      (*calc_func)(*t1, e1);
      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);
      }
    } else if (*t1 + 2.0 * delta_t >= t) {
      if (*t2 < -1e99) {
        *t2 = *t1 + delta_t;
        (*calc_func)(*t2, e2);
      }
      *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);
    } else {
      *t0 = -1e100;
      *t2 = -1e100;
      *t1 = t;
      (*calc_func)(*t1, e1);
      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);
    }
  }
}
```