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

```asm
<testFreq>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x60,%rsp
  mov    %rdi,-0x48(%rbp)
  mov    %rsi,-0x50(%rbp)
  mov    %edx,-0x54(%rbp)
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x30(%rbp)
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x28(%rbp)
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x20(%rbp)
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x18(%rbp)
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x10(%rbp)
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x8(%rbp)
  movl   $0x0,-0x34(%rbp)
  jmp    L5
L49:
  mov    -0x34(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movsd  -0x30(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x30(%rbp)
  mov    -0x34(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x50(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movsd  -0x28(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x28(%rbp)
  addl   $0x1,-0x34(%rbp)
L5:
  mov    -0x34(%rbp),%eax
  cmp    -0x54(%rbp),%eax
  jl     L49
  pxor   %xmm1,%xmm1
  cvtsi2sdl -0x54(%rbp),%xmm1
  movsd  -0x30(%rbp),%xmm0
  divsd  %xmm1,%xmm0
  movsd  %xmm0,-0x30(%rbp)
  pxor   %xmm1,%xmm1
  cvtsi2sdl -0x54(%rbp),%xmm1
  movsd  -0x28(%rbp),%xmm0
  divsd  %xmm1,%xmm0
  movsd  %xmm0,-0x28(%rbp)
  movsd  -0x28(%rbp),%xmm0
  mov    -0x30(%rbp),%rax
  movapd %xmm0,%xmm1
  movq   %rax,%xmm0
  lea    D14(%rip),%rax
  mov    %rax,%rdi
  mov    $0x2,%eax
  call   <printf@plt>
  movl   $0x0,-0x34(%rbp)
  jmp    L39
L25:
  mov    -0x34(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movapd %xmm0,%xmm1
  subsd  -0x30(%rbp),%xmm1
  mov    -0x34(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x50(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  subsd  -0x28(%rbp),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  -0x20(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x20(%rbp)
  mov    -0x34(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movapd %xmm0,%xmm1
  subsd  -0x30(%rbp),%xmm1
  mov    -0x34(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  subsd  -0x30(%rbp),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  -0x18(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x18(%rbp)
  mov    -0x34(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x50(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movapd %xmm0,%xmm1
  subsd  -0x28(%rbp),%xmm1
  mov    -0x34(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x50(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  subsd  -0x28(%rbp),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  -0x10(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x10(%rbp)
  addl   $0x1,-0x34(%rbp)
L39:
  mov    -0x34(%rbp),%eax
  cmp    -0x54(%rbp),%eax
  jl     L25
  mov    -0x18(%rbp),%rax
  movq   %rax,%xmm0
  call   <sqrt@plt>
  movsd  %xmm0,-0x60(%rbp)
  mov    -0x10(%rbp),%rax
  movq   %rax,%xmm0
  call   <sqrt@plt>
  movsd  -0x60(%rbp),%xmm1
  mulsd  %xmm0,%xmm1
  movsd  -0x20(%rbp),%xmm0
  divsd  %xmm1,%xmm0
  movsd  %xmm0,-0x8(%rbp)
  mov    -0x8(%rbp),%rax
  movq   %rax,%xmm0
  call   <isnan@plt>
  test   %rax,%rax
  je     L38
  lea    D18(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  mov    $0x0,%edi
  call   <assert@plt>
L38:
  movsd  -0x8(%rbp),%xmm0
  movq   %xmm0,%rax
  movq   %rax,%xmm0
  leave
  ret
```

tool_calls: name: unpack_data
arguments: label: D14
type_infered: string
name: unpack_data
arguments: label: D18
type_infered: string

tool: D14: Average %f %f


tool: D18: Numerical Error pearson correlation is not a number

assistant: ```c
double testFreq(double *vect1, double *vect2, int n) {
  int i;
  double avg1 = 0.0, avg2 = 0.0, sum_xy = 0.0, sum_x = 0.0, sum_y = 0.0, corr = 0.0;
  for (i = 0; i < n; i++) {
    avg1 += vect1[i];
    avg2 += vect2[i];
  }
  avg1 /= ((double)n);
  avg2 /= ((double)n);
  printf("Average %f %f\n", avg1, avg2);
  for (i = 0; i < n; i++) {
    sum_xy += ((vect1[i] - avg1) * (vect2[i] - avg2));
    sum_x += ((vect1[i] - avg1) * (vect1[i] - avg1));
    sum_y += ((vect2[i] - avg2) * (vect2[i] - avg2));
  }
  corr = sum_xy / (sqrt(sum_x) * sqrt(sum_y));
  if (isnan(corr)) {
    printf("Numerical Error pearson correlation is not a number\n");
    assert(0);
  }
  return corr;
}
```