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

```asm
<fourier>:
  endbr64
  push   %r12
  movapd %xmm0,%xmm2
  push   %rbp
  push   %rbx
  mov    %rdi,%rbx
  sub    $0x30,%rsp
  movsd  D24(%rip),%xmm0
  mulsd  (%rdi),%xmm0
  lea    0x28(%rsp),%rbp
  lea    0x20(%rsp),%r12
  movsd  %xmm2,0x8(%rsp)
  mov    %r12,%rsi
  mov    %rbp,%rdi
  movsd  %xmm0,0x10(%rsp)
  movapd %xmm2,%xmm0
  call   <sincos@plt>
  pxor   %xmm5,%xmm5
  mov    %r12,%rsi
  mov    %rbp,%rdi
  movsd  0x20(%rsp),%xmm0
  mulsd  0x8(%rbx),%xmm0
  movsd  0x10(%rsp),%xmm4
  movsd  0x8(%rsp),%xmm2
  addsd  %xmm0,%xmm4
  movsd  0x28(%rsp),%xmm0
  mulsd  0x60(%rbx),%xmm0
  movsd  %xmm4,0x18(%rsp)
  addsd  %xmm0,%xmm5
  movapd %xmm2,%xmm0
  addsd  %xmm2,%xmm0
  movsd  %xmm5,0x10(%rsp)
  call   <sincos@plt>
  movsd  0x20(%rsp),%xmm0
  mulsd  0x10(%rbx),%xmm0
  mov    %r12,%rsi
  movsd  0x18(%rsp),%xmm6
  movsd  0x10(%rsp),%xmm7
  mov    %rbp,%rdi
  addsd  %xmm0,%xmm6
  movsd  0x28(%rsp),%xmm0
  mulsd  0x68(%rbx),%xmm0
  movsd  %xmm6,0x18(%rsp)
  addsd  %xmm0,%xmm7
  movsd  0x8(%rsp),%xmm0
  mulsd  D11(%rip),%xmm0
  movsd  %xmm7,0x10(%rsp)
  call   <sincos@plt>
  movsd  0x20(%rsp),%xmm0
  mulsd  0x18(%rbx),%xmm0
  mov    %r12,%rsi
  movsd  0x18(%rsp),%xmm3
  movsd  0x10(%rsp),%xmm4
  mov    %rbp,%rdi
  addsd  %xmm0,%xmm3
  movsd  0x28(%rsp),%xmm0
  mulsd  0x70(%rbx),%xmm0
  movsd  %xmm3,0x18(%rsp)
  addsd  %xmm0,%xmm4
  movsd  0x8(%rsp),%xmm0
  mulsd  D53(%rip),%xmm0
  movsd  %xmm4,0x10(%rsp)
  call   <sincos@plt>
  movsd  0x20(%rsp),%xmm0
  mulsd  0x20(%rbx),%xmm0
  mov    %r12,%rsi
  movsd  0x18(%rsp),%xmm5
  movsd  0x10(%rsp),%xmm6
  mov    %rbp,%rdi
  addsd  %xmm0,%xmm5
  movsd  0x28(%rsp),%xmm0
  mulsd  0x78(%rbx),%xmm0
  movsd  %xmm5,0x18(%rsp)
  addsd  %xmm0,%xmm6
  movsd  0x8(%rsp),%xmm0
  mulsd  D46(%rip),%xmm0
  movsd  %xmm6,0x10(%rsp)
  call   <sincos@plt>
  movsd  0x20(%rsp),%xmm0
  mulsd  0x28(%rbx),%xmm0
  mov    %r12,%rsi
  movsd  0x18(%rsp),%xmm7
  movsd  0x10(%rsp),%xmm1
  mov    %rbp,%rdi
  addsd  %xmm0,%xmm7
  movsd  0x28(%rsp),%xmm0
  mulsd  0x80(%rbx),%xmm0
  movsd  %xmm7,0x18(%rsp)
  addsd  %xmm0,%xmm1
  movsd  0x8(%rsp),%xmm0
  mulsd  D59(%rip),%xmm0
  movsd  %xmm1,0x10(%rsp)
  call   <sincos@plt>
  movsd  0x20(%rsp),%xmm0
  mulsd  0x30(%rbx),%xmm0
  mov    %r12,%rsi
  movsd  0x18(%rsp),%xmm3
  movsd  0x10(%rsp),%xmm4
  mov    %rbp,%rdi
  addsd  %xmm0,%xmm3
  movsd  0x28(%rsp),%xmm0
  mulsd  0x88(%rbx),%xmm0
  movsd  %xmm3,0x18(%rsp)
  addsd  %xmm0,%xmm4
  movsd  0x8(%rsp),%xmm0
  mulsd  D72(%rip),%xmm0
  movsd  %xmm4,0x10(%rsp)
  call   <sincos@plt>
  movsd  0x20(%rsp),%xmm0
  mulsd  0x38(%rbx),%xmm0
  mov    %r12,%rsi
  movsd  0x18(%rsp),%xmm5
  movsd  0x10(%rsp),%xmm6
  mov    %rbp,%rdi
  addsd  %xmm0,%xmm5
  movsd  0x28(%rsp),%xmm0
  mulsd  0x90(%rbx),%xmm0
  movsd  %xmm5,0x18(%rsp)
  addsd  %xmm0,%xmm6
  movsd  0x8(%rsp),%xmm0
  mulsd  D35(%rip),%xmm0
  movsd  %xmm6,0x10(%rsp)
  call   <sincos@plt>
  movsd  0x20(%rsp),%xmm0
  mulsd  0x40(%rbx),%xmm0
  mov    %r12,%rsi
  movsd  0x18(%rsp),%xmm2
  movsd  0x10(%rsp),%xmm7
  mov    %rbp,%rdi
  addsd  %xmm0,%xmm2
  movsd  0x28(%rsp),%xmm0
  mulsd  0x98(%rbx),%xmm0
  movsd  %xmm2,0x18(%rsp)
  addsd  %xmm0,%xmm7
  movsd  0x8(%rsp),%xmm0
  mulsd  D63(%rip),%xmm0
  movsd  %xmm7,0x10(%rsp)
  call   <sincos@plt>
  movsd  0x20(%rsp),%xmm0
  mulsd  0x48(%rbx),%xmm0
  mov    %r12,%rsi
  movsd  0x18(%rsp),%xmm1
  movsd  0x10(%rsp),%xmm3
  mov    %rbp,%rdi
  addsd  %xmm0,%xmm1
  movsd  0x28(%rsp),%xmm0
  mulsd  0xa0(%rbx),%xmm0
  movsd  %xmm1,0x18(%rsp)
  addsd  %xmm0,%xmm3
  movsd  0x8(%rsp),%xmm0
  mulsd  D40(%rip),%xmm0
  movsd  %xmm3,0x10(%rsp)
  call   <sincos@plt>
  movsd  0x20(%rsp),%xmm1
  mulsd  0x50(%rbx),%xmm1
  movsd  0x28(%rsp),%xmm0
  mulsd  0xa8(%rbx),%xmm0
  addsd  0x18(%rsp),%xmm1
  addsd  0x10(%rsp),%xmm0
  add    $0x30,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  addsd  %xmm1,%xmm0
  ret
```

tool_calls: name: read_data
arguments: data_label: D24
type_infered: f32[2]
name: read_data
arguments: data_label: D11
type_infered: f32[2]
name: read_data
arguments: data_label: D53
type_infered: f32[2]
name: read_data
arguments: data_label: D46
type_infered: f32[2]
name: read_data
arguments: data_label: D59
type_infered: f32[2]
name: read_data
arguments: data_label: D72
type_infered: f32[2]
name: read_data
arguments: data_label: D35
type_infered: f32[2]
name: read_data
arguments: data_label: D63
type_infered: f32[2]
name: read_data
arguments: data_label: D40
type_infered: f32[2]

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

tool: {"D11": [0.0,2.125]}

tool: {"D53": [0.0,2.25]}

tool: {"D46": [0.0,2.3125]}

tool: {"D59": [0.0,2.375]}

tool: {"D72": [0.0,2.4375]}

tool: {"D35": [0.0,2.5]}

tool: {"D63": [0.0,2.53125]}

tool: {"D40": [0.0,2.5625]}

assistant: ```c
double fourier(data, ex)
double data[2][11];
double ex;
{
  register int k;
  double fivesm, sixsm;
  sixsm = data[0][0] / 2.0;
  fivesm = 0.0;
  for (k = 1; k < 11; k++) {
    sixsm += (double)(data[0][k] * cos((double)k * ex));
    fivesm += (double)(data[1][k] * sin((double)k * ex));
  }
  sixsm = sixsm + fivesm;
  return (sixsm);
}
```