user: 请将这段汇编代码片段转换成等效的C代码：

```asm
<testFreq2>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x90,%rsp
  mov    %rdi,-0x68(%rbp)
  mov    %rsi,-0x70(%rbp)
  mov    %edx,-0x74(%rbp)
  mov    %ecx,-0x78(%rbp)
  movsd  %xmm0,-0x80(%rbp)
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x50(%rbp)
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x48(%rbp)
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x40(%rbp)
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x28(%rbp)
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x38(%rbp)
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x30(%rbp)
  movsd  -0x80(%rbp),%xmm0
  pxor   %xmm1,%xmm1
  comisd %xmm1,%xmm0
  jbe    L168
  pxor   %xmm1,%xmm1
  cvtsi2sdl -0x78(%rbp),%xmm1
  movsd  D77(%rip),%xmm0
  mulsd  %xmm0,%xmm1
  movsd  D58(%rip),%xmm0
  divsd  %xmm1,%xmm0
  movsd  %xmm0,-0x20(%rbp)
  movsd  -0x80(%rbp),%xmm1
  movsd  D77(%rip),%xmm0
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x18(%rbp)
  movsd  D77(%rip),%xmm0
  subsd  -0x80(%rbp),%xmm0
  movsd  %xmm0,-0x10(%rbp)
  movl   $0x0,-0x58(%rbp)
  movl   $0x0,-0x54(%rbp)
  mov    -0x74(%rbp),%eax
  mov    $0x1,%esi
  mov    %eax,%edi
  call   <calloc@plt>
  mov    %rax,-0x8(%rbp)
  movsd  -0x80(%rbp),%xmm0
  pxor   %xmm1,%xmm1
  comisd %xmm1,%xmm0
  jbe    L63
  movsd  D77(%rip),%xmm0
  comisd -0x80(%rbp),%xmm0
  jb     L63
  mov    $0x1,%eax
  jmp    L55
L63:
  mov    $0x0,%eax
L55:
  mov    %eax,%edi
  call   <assert@plt>
  movsd  -0x18(%rbp),%xmm0
  comisd -0x10(%rbp),%xmm0
  seta   %al
  movzbl %al,%eax
  mov    %eax,%edi
  call   <assert@plt>
  movsd  -0x10(%rbp),%xmm0
  pxor   %xmm1,%xmm1
  comisd %xmm1,%xmm0
  jb     L124
  movsd  D58(%rip),%xmm0
  comisd -0x18(%rbp),%xmm0
  jb     L124
  mov    $0x1,%eax
  jmp    L210
L124:
  mov    $0x0,%eax
L210:
  mov    %eax,%edi
  call   <assert@plt>
  movl   $0x0,-0x5c(%rbp)
  jmp    L251
L199:
  mov    -0x5c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x68(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mov    -0x5c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x68(%rbp),%rax
  add    %rdx,%rax
  mulsd  -0x20(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x5c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x70(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mov    -0x5c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x70(%rbp),%rax
  add    %rdx,%rax
  mulsd  -0x20(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  addl   $0x1,-0x5c(%rbp)
L251:
  mov    -0x5c(%rbp),%eax
  cmp    -0x74(%rbp),%eax
  jl     L199
  movl   $0x0,-0x5c(%rbp)
  jmp    L269
L139:
  mov    -0x5c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x68(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  comisd -0x10(%rbp),%xmm0
  jb     L111
  mov    -0x5c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x68(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  movsd  -0x18(%rbp),%xmm0
  comisd %xmm1,%xmm0
  jae    L0
L111:
  mov    -0x5c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x70(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  comisd -0x10(%rbp),%xmm0
  jb     L246
  mov    -0x5c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x70(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  movsd  -0x18(%rbp),%xmm0
  comisd %xmm1,%xmm0
  jb     L246
L0:
  mov    -0x5c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x68(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movsd  -0x38(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x38(%rbp)
  mov    -0x5c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x70(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movsd  -0x30(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x30(%rbp)
  mov    -0x5c(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  movb   $0x1,(%rax)
  addl   $0x1,-0x58(%rbp)
L246:
  addl   $0x1,-0x5c(%rbp)
L269:
  mov    -0x5c(%rbp),%eax
  cmp    -0x74(%rbp),%eax
  jl     L139
  cmpl   $0x0,-0x58(%rbp)
  jne    L6
  pxor   %xmm0,%xmm0
  jmp    L204
L6:
  pxor   %xmm1,%xmm1
  cvtsi2sdl -0x58(%rbp),%xmm1
  movsd  -0x38(%rbp),%xmm0
  divsd  %xmm1,%xmm0
  movsd  %xmm0,-0x38(%rbp)
  pxor   %xmm1,%xmm1
  cvtsi2sdl -0x58(%rbp),%xmm1
  movsd  -0x30(%rbp),%xmm0
  divsd  %xmm1,%xmm0
  movsd  %xmm0,-0x30(%rbp)
  movl   $0x0,-0x5c(%rbp)
  jmp    L165
L18:
  mov    -0x5c(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  test   %al,%al
  je     L113
  mov    -0x5c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x68(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movapd %xmm0,%xmm1
  subsd  -0x38(%rbp),%xmm1
  mov    -0x5c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x70(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  subsd  -0x30(%rbp),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  -0x50(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x50(%rbp)
  mov    -0x5c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x68(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movapd %xmm0,%xmm1
  subsd  -0x38(%rbp),%xmm1
  mov    -0x5c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x68(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  subsd  -0x38(%rbp),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  -0x48(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x48(%rbp)
  mov    -0x5c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x70(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movapd %xmm0,%xmm1
  subsd  -0x30(%rbp),%xmm1
  mov    -0x5c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x70(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  subsd  -0x30(%rbp),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  -0x40(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x40(%rbp)
  addl   $0x1,-0x54(%rbp)
L113:
  addl   $0x1,-0x5c(%rbp)
L165:
  mov    -0x5c(%rbp),%eax
  cmp    -0x74(%rbp),%eax
  jl     L18
  mov    -0x8(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  mov    -0x54(%rbp),%eax
  cmp    -0x58(%rbp),%eax
  sete   %al
  movzbl %al,%eax
  mov    %eax,%edi
  call   <assert@plt>
  mov    -0x48(%rbp),%rax
  movq   %rax,%xmm0
  call   <sqrt@plt>
  movsd  %xmm0,-0x88(%rbp)
  mov    -0x40(%rbp),%rax
  movq   %rax,%xmm0
  call   <sqrt@plt>
  movsd  -0x88(%rbp),%xmm1
  mulsd  %xmm0,%xmm1
  movsd  -0x50(%rbp),%xmm0
  divsd  %xmm1,%xmm0
  movsd  %xmm0,-0x28(%rbp)
  mov    -0x28(%rbp),%rax
  movq   %rax,%xmm0
  call   <isnan@plt>
  test   %rax,%rax
  je     L3
  lea    D37(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  mov    $0x0,%edi
  call   <assert@plt>
L3:
  movsd  -0x28(%rbp),%xmm0
  jmp    L204
L168:
  movl   $0x0,-0x5c(%rbp)
  jmp    L41
L238:
  mov    -0x5c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x68(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movsd  -0x38(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x38(%rbp)
  mov    -0x5c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x70(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movsd  -0x30(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x30(%rbp)
  addl   $0x1,-0x5c(%rbp)
L41:
  mov    -0x5c(%rbp),%eax
  cmp    -0x74(%rbp),%eax
  jl     L238
  pxor   %xmm1,%xmm1
  cvtsi2sdl -0x74(%rbp),%xmm1
  movsd  -0x38(%rbp),%xmm0
  divsd  %xmm1,%xmm0
  movsd  %xmm0,-0x38(%rbp)
  pxor   %xmm1,%xmm1
  cvtsi2sdl -0x74(%rbp),%xmm1
  movsd  -0x30(%rbp),%xmm0
  divsd  %xmm1,%xmm0
  movsd  %xmm0,-0x30(%rbp)
  movl   $0x0,-0x5c(%rbp)
  jmp    L214
L201:
  mov    -0x5c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x68(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movapd %xmm0,%xmm1
  subsd  -0x38(%rbp),%xmm1
  mov    -0x5c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x70(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  subsd  -0x30(%rbp),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  -0x50(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x50(%rbp)
  mov    -0x5c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x68(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movapd %xmm0,%xmm1
  subsd  -0x38(%rbp),%xmm1
  mov    -0x5c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x68(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  subsd  -0x38(%rbp),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  -0x48(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x48(%rbp)
  mov    -0x5c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x70(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movapd %xmm0,%xmm1
  subsd  -0x30(%rbp),%xmm1
  mov    -0x5c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x70(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  subsd  -0x30(%rbp),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  -0x40(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x40(%rbp)
  addl   $0x1,-0x5c(%rbp)
L214:
  mov    -0x5c(%rbp),%eax
  cmp    -0x74(%rbp),%eax
  jl     L201
  mov    -0x48(%rbp),%rax
  movq   %rax,%xmm0
  call   <sqrt@plt>
  movsd  %xmm0,-0x88(%rbp)
  mov    -0x40(%rbp),%rax
  movq   %rax,%xmm0
  call   <sqrt@plt>
  movsd  -0x88(%rbp),%xmm1
  mulsd  %xmm0,%xmm1
  movsd  -0x50(%rbp),%xmm0
  divsd  %xmm1,%xmm0
  movsd  %xmm0,-0x28(%rbp)
  mov    -0x28(%rbp),%rax
  movq   %rax,%xmm0
  call   <isnan@plt>
  test   %rax,%rax
  je     L103
  lea    D37(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  mov    $0x0,%edi
  call   <assert@plt>
L103:
  movsd  -0x28(%rbp),%xmm0
L204:
  movq   %xmm0,%rax
  movq   %rax,%xmm0
  leave
  ret
```

tool_calls: name: unpack_data
arguments: data_tag: D77
type_infered: f64
name: unpack_data
arguments: data_tag: D58
type_infered: f64
name: unpack_data
arguments: data_tag: D37
type_infered: string

tool: D77: 0.5

tool: D58: 1

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


assistant: ```c
double testFreq2(double *vect1, double *vect2, int n, int reps, double bootstopCutoff) {
  int i;
  double sum_xy = 0.0, sum_x = 0.0, sum_y = 0.0, corr = 0.0;
  double av1 = 0.0, av2 = 0.0;
  if (bootstopCutoff > 0.0) {
    const double scale = 1.0 / ((double)reps * 0.5);
    const double upper_bound = 0.5 + bootstopCutoff;
    const double lower_bound = 0.5 - bootstopCutoff;
    int count = 0, verify = 0;
    char *isSet = (char *)calloc(n, sizeof(char));
    assert(bootstopCutoff > 0.0 && bootstopCutoff <= 0.5);
    assert(lower_bound < upper_bound);
    assert(lower_bound >= 0.0 && upper_bound <= 1.0);
    for (i = 0; i < n; i++) {
      vect1[i] *= scale;
      vect2[i] *= scale;
    }
    for (i = 0; i < n; i++) {
      if ((vect1[i] >= lower_bound && vect1[i] <= upper_bound) || (vect2[i] >= lower_bound && vect2[i] <= upper_bound)) {
        av1 += vect1[i];
        av2 += vect2[i];
        isSet[i] = 1;
        count++;
      }
    }
    if (count == 0) {
      return 0.0;
    }
    av1 /= ((double)count);
    av2 /= ((double)count);
    for (i = 0; i < n; i++) {
      if (isSet[i]) {
        sum_xy += ((vect1[i] - av1) * (vect2[i] - av2));
        sum_x += ((vect1[i] - av1) * (vect1[i] - av1));
        sum_y += ((vect2[i] - av2) * (vect2[i] - av2));
        verify++;
      }
    }
    free(isSet);
    assert(verify == count);
    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;
  } else {
    for (i = 0; i < n; i++) {
      av1 += vect1[i];
      av2 += vect2[i];
    }
    av1 /= ((double)n);
    av2 /= ((double)n);
    for (i = 0; i < n; i++) {
      sum_xy += ((vect1[i] - av1) * (vect2[i] - av2));
      sum_x += ((vect1[i] - av1) * (vect1[i] - av1));
      sum_y += ((vect2[i] - av2) * (vect2[i] - av2));
    }
    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;
  }
}
```