user: What is the c source code of the assembly code below:

```asm
<CalcInterpolatedElements>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  add    $0xffffffffffffff80,%rsp
  movsd  %xmm0,-0x48(%rbp)
  mov    %rdi,-0x50(%rbp)
  mov    %esi,-0x54(%rbp)
  mov    %rdx,-0x60(%rbp)
  movsd  %xmm1,-0x68(%rbp)
  mov    %rcx,-0x70(%rbp)
  mov    %r8,-0x78(%rbp)
  mov    %r9,-0x80(%rbp)
  mov    -0x80(%rbp),%rax
  movsd  (%rax),%xmm1
  movsd  D58(%rip),%xmm0
  comisd %xmm1,%xmm0
  jbe    L251
  mov    -0x70(%rbp),%rax
  movsd  D38(%rip),%xmm0
  movsd  %xmm0,(%rax)
  mov    0x18(%rbp),%rax
  movsd  D38(%rip),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x80(%rbp),%rax
  movsd  -0x48(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x80(%rbp),%rax
  mov    (%rax),%rax
  mov    -0x60(%rbp),%rdx
  mov    0x10(%rbp),%rdi
  movq   %rax,%xmm0
  call   *%rdx
  movl   $0x0,-0x34(%rbp)
  jmp    L159
L237:
  mov    -0x34(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    0x10(%rbp),%rax
  add    %rax,%rdx
  mov    -0x34(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rcx
  mov    -0x50(%rbp),%rax
  add    %rcx,%rax
  movsd  (%rdx),%xmm0
  movsd  %xmm0,(%rax)
  addl   $0x1,-0x34(%rbp)
L159:
  mov    -0x34(%rbp),%eax
  cmp    -0x54(%rbp),%eax
  jl     L237
  jmp    L14
L251:
  mov    -0x80(%rbp),%rax
  movsd  (%rax),%xmm0
  comisd -0x48(%rbp),%xmm0
  jb     L18
  mov    -0x80(%rbp),%rax
  movsd  (%rax),%xmm0
  movapd %xmm0,%xmm1
  subsd  -0x68(%rbp),%xmm1
  movsd  -0x48(%rbp),%xmm0
  comisd %xmm1,%xmm0
  jb     L315
  mov    -0x70(%rbp),%rax
  movsd  (%rax),%xmm1
  movsd  D58(%rip),%xmm0
  comisd %xmm1,%xmm0
  jbe    L126
  mov    -0x80(%rbp),%rax
  movsd  (%rax),%xmm0
  subsd  -0x68(%rbp),%xmm0
  mov    -0x70(%rbp),%rax
  movsd  %xmm0,(%rax)
  mov    -0x70(%rbp),%rax
  mov    (%rax),%rax
  mov    -0x78(%rbp),%rdx
  mov    -0x60(%rbp),%rcx
  mov    %rdx,%rdi
  movq   %rax,%xmm0
  call   *%rcx
  jmp    L126
L315:
  mov    -0x80(%rbp),%rax
  movsd  (%rax),%xmm1
  movsd  -0x68(%rbp),%xmm0
  addsd  %xmm0,%xmm0
  subsd  %xmm0,%xmm1
  movsd  -0x48(%rbp),%xmm0
  comisd %xmm1,%xmm0
  jb     L137
  mov    -0x70(%rbp),%rax
  movsd  (%rax),%xmm1
  movsd  D58(%rip),%xmm0
  comisd %xmm1,%xmm0
  jbe    L267
  mov    -0x80(%rbp),%rax
  movsd  (%rax),%xmm0
  subsd  -0x68(%rbp),%xmm0
  mov    -0x70(%rbp),%rax
  movsd  %xmm0,(%rax)
  mov    -0x70(%rbp),%rax
  mov    (%rax),%rax
  mov    -0x78(%rbp),%rdx
  mov    -0x60(%rbp),%rcx
  mov    %rdx,%rdi
  movq   %rax,%xmm0
  call   *%rcx
L267:
  mov    -0x80(%rbp),%rax
  movsd  (%rax),%xmm0
  mov    0x18(%rbp),%rax
  movsd  %xmm0,(%rax)
  mov    -0x70(%rbp),%rax
  movsd  (%rax),%xmm0
  mov    -0x80(%rbp),%rax
  movsd  %xmm0,(%rax)
  movl   $0x0,-0x34(%rbp)
  jmp    L173
L280:
  mov    -0x34(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    0x10(%rbp),%rax
  add    %rax,%rdx
  mov    -0x34(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rcx
  mov    0x20(%rbp),%rax
  add    %rcx,%rax
  movsd  (%rdx),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x34(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x78(%rbp),%rax
  add    %rax,%rdx
  mov    -0x34(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rcx
  mov    0x10(%rbp),%rax
  add    %rcx,%rax
  movsd  (%rdx),%xmm0
  movsd  %xmm0,(%rax)
  addl   $0x1,-0x34(%rbp)
L173:
  mov    -0x34(%rbp),%eax
  cmp    -0x54(%rbp),%eax
  jl     L280
  mov    -0x80(%rbp),%rax
  movsd  (%rax),%xmm0
  subsd  -0x68(%rbp),%xmm0
  mov    -0x70(%rbp),%rax
  movsd  %xmm0,(%rax)
  mov    -0x70(%rbp),%rax
  mov    (%rax),%rax
  mov    -0x78(%rbp),%rdx
  mov    -0x60(%rbp),%rcx
  mov    %rdx,%rdi
  movq   %rax,%xmm0
  call   *%rcx
  jmp    L126
L137:
  mov    -0x70(%rbp),%rax
  movsd  D38(%rip),%xmm0
  movsd  %xmm0,(%rax)
  mov    0x18(%rbp),%rax
  movsd  D38(%rip),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x80(%rbp),%rax
  movsd  -0x48(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x80(%rbp),%rax
  mov    (%rax),%rax
  mov    -0x60(%rbp),%rdx
  mov    0x10(%rbp),%rdi
  movq   %rax,%xmm0
  call   *%rdx
  movl   $0x0,-0x34(%rbp)
  jmp    L225
L52:
  mov    -0x34(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    0x10(%rbp),%rax
  add    %rax,%rdx
  mov    -0x34(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rcx
  mov    -0x50(%rbp),%rax
  add    %rcx,%rax
  movsd  (%rdx),%xmm0
  movsd  %xmm0,(%rax)
  addl   $0x1,-0x34(%rbp)
L225:
  mov    -0x34(%rbp),%eax
  cmp    -0x54(%rbp),%eax
  jl     L52
  jmp    L14
L126:
  mov    -0x80(%rbp),%rax
  movsd  (%rax),%xmm0
  subsd  -0x48(%rbp),%xmm0
  movsd  %xmm0,-0x18(%rbp)
  mov    -0x70(%rbp),%rax
  movsd  (%rax),%xmm1
  movsd  -0x48(%rbp),%xmm0
  subsd  %xmm1,%xmm0
  movsd  %xmm0,-0x10(%rbp)
  movsd  D44(%rip),%xmm0
  divsd  -0x68(%rbp),%xmm0
  movsd  %xmm0,-0x8(%rbp)
  movl   $0x0,-0x34(%rbp)
  jmp    L81
L63:
  mov    -0x34(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x78(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movapd %xmm0,%xmm1
  mulsd  -0x18(%rbp),%xmm1
  mov    -0x34(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    0x10(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mulsd  -0x10(%rbp),%xmm0
  addsd  %xmm1,%xmm0
  mov    -0x34(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x50(%rbp),%rax
  add    %rdx,%rax
  mulsd  -0x8(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  addl   $0x1,-0x34(%rbp)
L81:
  mov    -0x34(%rbp),%eax
  cmp    -0x54(%rbp),%eax
  jl     L63
  jmp    L14
L18:
  mov    -0x80(%rbp),%rax
  movsd  (%rax),%xmm0
  addsd  -0x68(%rbp),%xmm0
  comisd -0x48(%rbp),%xmm0
  jb     L32
  mov    0x18(%rbp),%rax
  movsd  (%rax),%xmm1
  movsd  D58(%rip),%xmm0
  comisd %xmm1,%xmm0
  jbe    L155
  mov    -0x80(%rbp),%rax
  movsd  (%rax),%xmm0
  addsd  -0x68(%rbp),%xmm0
  mov    0x18(%rbp),%rax
  movsd  %xmm0,(%rax)
  mov    0x18(%rbp),%rax
  mov    (%rax),%rax
  mov    0x20(%rbp),%rdx
  mov    -0x60(%rbp),%rcx
  mov    %rdx,%rdi
  movq   %rax,%xmm0
  call   *%rcx
  jmp    L155
L32:
  mov    -0x80(%rbp),%rax
  movsd  (%rax),%xmm1
  movsd  -0x68(%rbp),%xmm0
  addsd  %xmm0,%xmm0
  addsd  %xmm1,%xmm0
  comisd -0x48(%rbp),%xmm0
  jb     L319
  mov    0x18(%rbp),%rax
  movsd  (%rax),%xmm1
  movsd  D58(%rip),%xmm0
  comisd %xmm1,%xmm0
  jbe    L34
  mov    -0x80(%rbp),%rax
  movsd  (%rax),%xmm0
  addsd  -0x68(%rbp),%xmm0
  mov    0x18(%rbp),%rax
  movsd  %xmm0,(%rax)
  mov    0x18(%rbp),%rax
  mov    (%rax),%rax
  mov    0x20(%rbp),%rdx
  mov    -0x60(%rbp),%rcx
  mov    %rdx,%rdi
  movq   %rax,%xmm0
  call   *%rcx
L34:
  mov    -0x80(%rbp),%rax
  movsd  (%rax),%xmm0
  mov    -0x70(%rbp),%rax
  movsd  %xmm0,(%rax)
  mov    0x18(%rbp),%rax
  movsd  (%rax),%xmm0
  mov    -0x80(%rbp),%rax
  movsd  %xmm0,(%rax)
  movl   $0x0,-0x34(%rbp)
  jmp    L116
L258:
  mov    -0x34(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    0x10(%rbp),%rax
  add    %rax,%rdx
  mov    -0x34(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rcx
  mov    -0x78(%rbp),%rax
  add    %rcx,%rax
  movsd  (%rdx),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x34(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    0x20(%rbp),%rax
  add    %rax,%rdx
  mov    -0x34(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rcx
  mov    0x10(%rbp),%rax
  add    %rcx,%rax
  movsd  (%rdx),%xmm0
  movsd  %xmm0,(%rax)
  addl   $0x1,-0x34(%rbp)
L116:
  mov    -0x34(%rbp),%eax
  cmp    -0x54(%rbp),%eax
  jl     L258
  mov    -0x80(%rbp),%rax
  movsd  (%rax),%xmm0
  addsd  -0x68(%rbp),%xmm0
  mov    0x18(%rbp),%rax
  movsd  %xmm0,(%rax)
  mov    0x18(%rbp),%rax
  mov    (%rax),%rax
  mov    0x20(%rbp),%rdx
  mov    -0x60(%rbp),%rcx
  mov    %rdx,%rdi
  movq   %rax,%xmm0
  call   *%rcx
  jmp    L155
L319:
  mov    -0x70(%rbp),%rax
  movsd  D38(%rip),%xmm0
  movsd  %xmm0,(%rax)
  mov    0x18(%rbp),%rax
  movsd  D38(%rip),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x80(%rbp),%rax
  movsd  -0x48(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x80(%rbp),%rax
  mov    (%rax),%rax
  mov    -0x60(%rbp),%rdx
  mov    0x10(%rbp),%rdi
  movq   %rax,%xmm0
  call   *%rdx
  movl   $0x0,-0x34(%rbp)
  jmp    L117
L299:
  mov    -0x34(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    0x10(%rbp),%rax
  add    %rax,%rdx
  mov    -0x34(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rcx
  mov    -0x50(%rbp),%rax
  add    %rcx,%rax
  movsd  (%rdx),%xmm0
  movsd  %xmm0,(%rax)
  addl   $0x1,-0x34(%rbp)
L117:
  mov    -0x34(%rbp),%eax
  cmp    -0x54(%rbp),%eax
  jl     L299
  jmp    L14
L155:
  mov    0x18(%rbp),%rax
  movsd  (%rax),%xmm0
  subsd  -0x48(%rbp),%xmm0
  movsd  %xmm0,-0x30(%rbp)
  mov    -0x80(%rbp),%rax
  movsd  (%rax),%xmm1
  movsd  -0x48(%rbp),%xmm0
  subsd  %xmm1,%xmm0
  movsd  %xmm0,-0x28(%rbp)
  movsd  D44(%rip),%xmm0
  divsd  -0x68(%rbp),%xmm0
  movsd  %xmm0,-0x20(%rbp)
  movl   $0x0,-0x34(%rbp)
  jmp    L234
L58:
  mov    -0x34(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    0x10(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movapd %xmm0,%xmm1
  mulsd  -0x30(%rbp),%xmm1
  mov    -0x34(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    0x20(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mulsd  -0x28(%rbp),%xmm0
  addsd  %xmm1,%xmm0
  mov    -0x34(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x50(%rbp),%rax
  add    %rdx,%rax
  mulsd  -0x20(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  addl   $0x1,-0x34(%rbp)
L234:
  mov    -0x34(%rbp),%eax
  cmp    -0x54(%rbp),%eax
  jl     L58
L14:
  leave
  ret
```

tool_calls: name: unpack_data
arguments: tag: D58
type_infered: byte[8]
name: unpack_data
arguments: tag: D38
type_infered: byte[8]
name: unpack_data
arguments: tag: D44
type_infered: f64

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

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

tool: D44: 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);
    }
  }
}
```