user: Converte this assembly snippet into its equivalent C code:

```asm
<calc_interpolation_params>:
  endbr64
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  lea    -0x18000(%rsp),%r11
L25:
  sub    $0x1000,%rsp
  orq    $0x0,(%rsp)
  cmp    %r11,%rsp
  jne    L25
  sub    $0x40,%rsp
  movapd %xmm0,%xmm6
  movapd %xmm1,%xmm7
  mov    %rsi,%rbx
  mov    %rdx,%r13
  movapd %xmm6,%xmm1
  movapd %xmm4,%xmm5
  mov    %rcx,%r14
  mov    %rdi,%rbp
  maxsd  %xmm7,%xmm1
  mov    %r8,%rcx
  movapd %xmm2,%xmm0
  mov    %r14,%rdx
  movsd  D47(%rip),%xmm4
  movapd %xmm5,%xmm2
  mov    %r13,%rsi
  mov    %rbx,%rdi
  mov    %fs:0x28,%rax
  mov    %rax,0x18038(%rsp)
  xor    %eax,%eax
  movsd  %xmm3,0x8(%rsp)
  movsd  %xmm5,0x18(%rsp)
  movsd  %xmm6,0x10(%rsp)
  movsd  %xmm7,(%rsp)
  call   <calc_2d_angles@plt>
  movsd  0x18(%rsp),%xmm5
  movslq (%rbx),%rdx
  lea    0x10030(%rsp),%rcx
  movsd  0x8(%rsp),%xmm3
  movsd  (%rsp),%xmm7
  lea    0x2c(%rsp),%rdi
  addsd  %xmm5,%xmm5
  movsd  D43(%rip),%xmm0
  mov    D47(%rip),%rsi
  mov    %rdx,%rax
  add    $0x1,%eax
  movsd  0x10(%rsp),%xmm6
  movapd %xmm3,%xmm2
  movapd %xmm7,%xmm1
  mov    %rsi,0x0(%r13,%rdx,8)
  movsd  D29(%rip),%xmm4
  lea    0x30(%rsp),%rsi
  divsd  %xmm5,%xmm0
  movsd  %xmm0,(%r14,%rdx,8)
  lea    0x8030(%rsp),%rdx
  movapd %xmm6,%xmm0
  mov    %eax,(%rbx)
  call   <calc_2d_angles@plt>
  movslq (%rbx),%r12
  movq   $0x0,0x0(%rbp)
  cmp    $0x1,%r12d
  jle    L32
  pxor   %xmm7,%xmm7
  mov    $0x1,%ebx
  pxor   %xmm2,%xmm2
  cvtsi2sdl 0x2c(%rsp),%xmm7
  movsd  %xmm7,0x10(%rsp)
  nopl   (%rax)
L35:
  movsd  0x0(%r13,%rbx,8),%xmm0
  addsd  -0x8(%r13,%rbx,8),%xmm0
  movsd  %xmm2,(%rsp)
  mulsd  D27(%rip),%xmm0
  call   <sin@plt>
  mulsd  0x10(%rsp),%xmm0
  movsd  (%r14,%rbx,8),%xmm1
  addsd  -0x8(%r14,%rbx,8),%xmm1
  movsd  (%rsp),%xmm2
  mulsd  %xmm0,%xmm1
  mulsd  0x8(%rsp),%xmm1
  addsd  %xmm1,%xmm2
  movsd  %xmm2,0x0(%rbp,%rbx,8)
  add    $0x1,%rbx
  cmp    %rbx,%r12
  jne    L35
L32:
  mov    0x18038(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L6
  add    $0x18040,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
L6:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: extract_symbolic_data
arguments: data_label: D47
type_infered: f64
name: extract_symbolic_data
arguments: data_label: D43
type_infered: f64
name: extract_symbolic_data
arguments: data_label: D29
type_infered: byte[8]
name: extract_symbolic_data
arguments: data_label: D27
type_infered: f32[2]

tool: D47: 3.141592653589793

tool: D43: 1

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

tool: {"D27": [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;
}
```