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

```asm
<calc_interpolation_params>:
  endbr64
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  lea    -0x18000(%rsp),%r11
L0:
  sub    $0x1000,%rsp
  orq    $0x0,(%rsp)
  cmp    %r11,%rsp
  jne    L0
  sub    $0x40,%rsp
  mov    %rdi,%r13
  mov    %rsi,%r14
  mov    %rdx,%rbp
  mov    %rcx,%r12
  mov    %r8,%rcx
  movq   %xmm0,%rbx
  movsd  %xmm1,0x10(%rsp)
  movapd %xmm2,%xmm0
  movapd %xmm4,%xmm7
  mov    %fs:0x28,%rax
  mov    %rax,0x18038(%rsp)
  xor    %eax,%eax
  mov    D17(%rip),%rax
  movq   %rax,%xmm4
  movsd  %xmm3,0x8(%rsp)
  movsd  %xmm7,0x18(%rsp)
  movapd %xmm7,%xmm2
  movq   %rbx,%xmm5
  maxsd  %xmm1,%xmm5
  movapd %xmm5,%xmm1
  mov    %r12,%rdx
  mov    %rbp,%rsi
  mov    %r14,%rdi
  call   <calc_2d_angles@plt>
  movslq (%r14),%rax
  mov    D17(%rip),%rdx
  mov    %rdx,0x0(%rbp,%rax,8)
  movslq (%r14),%rax
  movsd  0x18(%rsp),%xmm0
  addsd  %xmm0,%xmm0
  movsd  D15(%rip),%xmm1
  divsd  %xmm0,%xmm1
  movsd  %xmm1,(%r12,%rax,8)
  addl   $0x1,(%r14)
  lea    0x10030(%rsp),%rcx
  lea    0x8030(%rsp),%rdx
  lea    0x30(%rsp),%rsi
  lea    0x2c(%rsp),%rdi
  movsd  D30(%rip),%xmm4
  movsd  0x8(%rsp),%xmm3
  movapd %xmm3,%xmm2
  movsd  0x10(%rsp),%xmm1
  movq   %rbx,%xmm0
  call   <calc_2d_angles@plt>
  movq   $0x0,0x0(%r13)
  cmpl   $0x1,(%r14)
  jle    L31
  pxor   %xmm7,%xmm7
  cvtsi2sdl 0x2c(%rsp),%xmm7
  movsd  %xmm7,0x10(%rsp)
  mov    $0x1,%ebx
L38:
  movsd  0x0(%rbp,%rbx,8),%xmm0
  addsd  -0x8(%rbp,%rbx,8),%xmm0
  mulsd  D12(%rip),%xmm0
  call   <sin@plt>
  movsd  (%r12,%rbx,8),%xmm1
  addsd  -0x8(%r12,%rbx,8),%xmm1
  mulsd  0x10(%rsp),%xmm0
  mulsd  %xmm0,%xmm1
  mulsd  0x8(%rsp),%xmm1
  addsd  -0x8(%r13,%rbx,8),%xmm1
  movsd  %xmm1,0x0(%r13,%rbx,8)
  add    $0x1,%rbx
  cmp    %ebx,(%r14)
  jg     L38
L31:
  mov    0x18038(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L30
  add    $0x18040,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
L30:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: extract_symbolic_data
arguments: data_tag: D17
datatype: f64
name: extract_symbolic_data
arguments: data_tag: D15
datatype: f64
name: extract_symbolic_data
arguments: data_tag: D30
datatype: byte[8]
name: extract_symbolic_data
arguments: data_tag: D12
datatype: f32[2]

tool: D17: 3.141592653589793

tool: D15: 1

tool: {"D30": [0x18,0x2d,0x44,0x54,0xfb,0x21,0x19,0x40]}

tool: {"D12": [0.0,1.75]}

assistant: ```c
void calc_interpolation_params(double *t, int *ncones, double *theta_cones, double *kmax_cones, double *dcf_cones, double fov1, double fov2, double fov3, double res12, double res3) {
  int nphiest, count;
  double theta_temp[4096], kmax_temp[4096], dcf_temp[4096];
  double fov12;
  fov12 = (fov1 > fov2) ? fov1 : fov2;
  calc_2d_angles(ncones, theta_cones, kmax_cones, dcf_cones, fov3, fov12, res3, res12, 3.1415926535897932384626433832795028841971);
  theta_cones[*ncones] = 3.1415926535897932384626433832795028841971;
  kmax_cones[*ncones] = 1.0 / (2.0 * res3);
  (*ncones)++;
  calc_2d_angles(&nphiest, theta_temp, kmax_temp, dcf_temp, fov1, fov2, res12, res12, 2.0 * 3.1415926535897932384626433832795028841971);
  t[0] = 0.0;
  for (count = 1; count < *ncones; count++)
    t[count] = t[count - 1] + (double)nphiest * sin((theta_cones[count] + theta_cones[count - 1]) / 2.0) * (kmax_cones[count] + kmax_cones[count - 1]) * res12;
  return;
}
```