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

```asm
<seventhOrderIIRFilter>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x18,%rsp
  mov    %rdi,%r13
  mov    %rsi,%r12
  mov    %rdx,0x8(%rsp)
  mov    %ecx,%r15d
  movsd  D1(%rip),%xmm0
  ucomisd (%rsi),%xmm0
  jp     L39
  jne    L39
L86:
  mov    $0x8,%esi
  mov    $0x6,%edi
  call   <calloc@plt>
  mov    %rax,%rbp
  mov    $0x8,%esi
  mov    $0x6,%edi
  call   <calloc@plt>
  mov    %rax,%rbx
  mov    $0x8,%esi
  mov    %r15d,%edi
  call   <calloc@plt>
  mov    %rax,%r14
  mov    %rbx,%rax
  lea    0x30(%rbx),%rdx
L61:
  movq   $0x0,(%rax)
  add    $0x8,%rax
  cmp    %rdx,%rax
  jne    L61
  mov    %rbp,%rax
  lea    0x30(%rbp),%rdx
L21:
  movq   $0x0,(%rax)
  add    $0x8,%rax
  cmp    %rdx,%rax
  jne    L21
  test   %r15d,%r15d
  jle    L6
  lea    -0x1(%r15),%ecx
  shl    $0x3,%rcx
  lea    0x8(%r14,%rcx,1),%rdx
  mov    %r14,%rax
L41:
  movq   $0x0,(%rax)
  add    $0x8,%rax
  cmp    %rdx,%rax
  jne    L41
  mov    0x8(%rsp),%rdi
  mov    %rdi,%rax
  lea    0x8(%rdi,%rcx,1),%rsi
  mov    %r14,%rcx
  sub    %rdi,%rcx
L71:
  lea    (%rcx,%rax,1),%rdx
  movsd  0x0(%r13),%xmm0
  mulsd  (%rax),%xmm0
  movsd  0x8(%r13),%xmm1
  mulsd  0x0(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  0x10(%r13),%xmm1
  mulsd  0x8(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  0x18(%r13),%xmm1
  mulsd  0x10(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  0x20(%r13),%xmm1
  mulsd  0x18(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  0x28(%r13),%xmm1
  mulsd  0x20(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  0x30(%r13),%xmm1
  mulsd  0x28(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  0x8(%r12),%xmm1
  mulsd  (%rbx),%xmm1
  movsd  0x10(%r12),%xmm2
  mulsd  0x8(%rbx),%xmm2
  addsd  %xmm2,%xmm1
  movsd  0x18(%r12),%xmm2
  mulsd  0x10(%rbx),%xmm2
  addsd  %xmm2,%xmm1
  movsd  0x20(%r12),%xmm2
  mulsd  0x18(%rbx),%xmm2
  addsd  %xmm2,%xmm1
  movsd  0x28(%r12),%xmm2
  mulsd  0x20(%rbx),%xmm2
  addsd  %xmm2,%xmm1
  movsd  0x30(%r12),%xmm2
  mulsd  0x28(%rbx),%xmm2
  addsd  %xmm2,%xmm1
  subsd  %xmm1,%xmm0
  movsd  %xmm0,(%rdx)
  movsd  0x20(%rbp),%xmm0
  movsd  %xmm0,0x28(%rbp)
  movsd  0x18(%rbp),%xmm0
  movsd  %xmm0,0x20(%rbp)
  movsd  0x10(%rbp),%xmm0
  movsd  %xmm0,0x18(%rbp)
  movsd  0x8(%rbp),%xmm0
  movsd  %xmm0,0x10(%rbp)
  movsd  0x0(%rbp),%xmm0
  movsd  %xmm0,0x8(%rbp)
  movsd  (%rax),%xmm0
  movsd  %xmm0,0x0(%rbp)
  movsd  0x20(%rbx),%xmm0
  movsd  %xmm0,0x28(%rbx)
  movsd  0x18(%rbx),%xmm0
  movsd  %xmm0,0x20(%rbx)
  movsd  0x10(%rbx),%xmm0
  movsd  %xmm0,0x18(%rbx)
  movsd  0x8(%rbx),%xmm0
  movsd  %xmm0,0x10(%rbx)
  movsd  (%rbx),%xmm0
  movsd  %xmm0,0x8(%rbx)
  movsd  (%rdx),%xmm0
  movsd  %xmm0,(%rbx)
  add    $0x8,%rax
  cmp    %rax,%rsi
  jne    L71
L6:
  mov    %rbp,%rdi
  call   <free@plt>
  mov    %rbx,%rdi
  call   <free@plt>
  mov    %r14,%rax
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L39:
  mov    $0x0,%eax
L17:
  movsd  (%r12,%rax,1),%xmm0
  divsd  (%r12),%xmm0
  movsd  %xmm0,(%r12,%rax,1)
  movsd  0x0(%r13,%rax,1),%xmm0
  divsd  (%r12),%xmm0
  movsd  %xmm0,0x0(%r13,%rax,1)
  add    $0x8,%rax
  cmp    $0x38,%rax
  jne    L17
  jmp    L86
```

tool_calls: name: parse_data
arguments: tag: D1
type_infered: f32[2]

tool: {"D1": [0.0,1.875]}

assistant: ```c
double *seventhOrderIIRFilter(double *B, double *A, double *signal, int signalLength) {
  int i;
  int filterLength = 7;
  double *x, *y, *output;
  double zeros = 0;
  double poles = 0;
  if (A[0] != 1) {
    for (i = 0; i < filterLength; i++) {
      A[i] = A[i] / A[0];
      B[i] = B[i] / A[0];
    }
  }
  x = (double *)calloc((filterLength - 1), sizeof(double));
  y = (double *)calloc((filterLength - 1), sizeof(double));
  output = (double *)calloc((signalLength), sizeof(double));
  for (i = 0; i < filterLength - 1; i++)
    y[i] = 0;
  for (i = 0; i < filterLength - 1; i++)
    x[i] = 0;
  for (i = 0; i < signalLength; i++)
    output[i] = 0;
  for (i = 0; i < signalLength; i++) {
    zeros = B[0] * signal[i] + B[1] * x[0] + B[2] * x[1] + B[3] * x[2] + B[4] * x[3] + B[5] * x[4] + B[6] * x[5];
    poles = A[1] * y[0] + A[2] * y[1] + A[3] * y[2] + A[4] * y[3] + A[5] * y[4] + A[6] * y[5];
    output[i] = zeros - poles;
    x[5] = x[4];
    x[4] = x[3];
    x[3] = x[2];
    x[2] = x[1];
    x[1] = x[0];
    x[0] = signal[i];
    y[5] = y[4];
    y[4] = y[3];
    y[3] = y[2];
    y[2] = y[1];
    y[1] = y[0];
    y[0] = output[i];
  }
  free(x);
  free(y);
  return output;
}
```