user: 请显示与下面列出的汇编代码相匹配的C语言实现：

```asm
<testFreq2>:
  endbr64
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x20,%rsp
  mov    %rdi,%rbx
  mov    %rsi,%rbp
  mov    %edx,%r13d
  movsd  %xmm0,0x18(%rsp)
  comisd D28(%rip),%xmm0
  jbe    L260
  pxor   %xmm0,%xmm0
  cvtsi2sd %ecx,%xmm0
  mulsd  D64(%rip),%xmm0
  movsd  D63(%rip),%xmm1
  divsd  %xmm0,%xmm1
  movq   %xmm1,%r14
  movsd  D64(%rip),%xmm2
  movsd  0x18(%rsp),%xmm6
  addsd  %xmm6,%xmm2
  movsd  %xmm2,0x10(%rsp)
  movsd  D64(%rip),%xmm2
  subsd  %xmm6,%xmm2
  movsd  %xmm2,0x8(%rsp)
  mov    $0x1,%esi
  mov    %edx,%edi
  call   <calloc@plt>
  mov    %rax,%r12
  movsd  D64(%rip),%xmm5
  comisd 0x18(%rsp),%xmm5
  setae  %dil
  movzbl %dil,%edi
  call   <assert@plt>
  movsd  0x10(%rsp),%xmm3
  comisd 0x8(%rsp),%xmm3
  seta   %dil
  movzbl %dil,%edi
  call   <assert@plt>
  movsd  0x8(%rsp),%xmm2
  mov    $0x0,%edi
  comisd D28(%rip),%xmm2
  jb     L71
  movsd  D63(%rip),%xmm0
  comisd 0x10(%rsp),%xmm0
  setae  %dil
  movzbl %dil,%edi
L71:
  call   <assert@plt>
  test   %r13d,%r13d
  jle    L197
  mov    %r13d,%edx
  mov    $0x0,%eax
L183:
  movq   %r14,%xmm6
  movq   %r14,%xmm0
  mulsd  (%rbx,%rax,8),%xmm0
  movsd  %xmm0,(%rbx,%rax,8)
  mulsd  0x0(%rbp,%rax,8),%xmm6
  movsd  %xmm6,0x0(%rbp,%rax,8)
  add    $0x1,%rax
  cmp    %rax,%rdx
  jne    L183
  mov    %r12,%rcx
  add    %r12,%rdx
  mov    %r12,%rsi
  neg    %rsi
  shl    $0x3,%rsi
  add    %rsi,%rbx
  add    %rbp,%rsi
  mov    %r12,%rax
  mov    $0x0,%r13d
  pxor   %xmm2,%xmm2
  movapd %xmm2,%xmm3
  jmp    L295
L260:
  test   %edx,%edx
  jle    L194
  mov    %edx,%edx
  mov    $0x0,%eax
  pxor   %xmm2,%xmm2
  movapd %xmm2,%xmm3
L238:
  addsd  (%rbx,%rax,8),%xmm3
  addsd  0x0(%rbp,%rax,8),%xmm2
  add    $0x1,%rax
  cmp    %rax,%rdx
  jne    L238
  pxor   %xmm4,%xmm4
  cvtsi2sd %r13d,%xmm4
  divsd  %xmm4,%xmm3
  divsd  %xmm4,%xmm2
  mov    $0x0,%eax
  pxor   %xmm7,%xmm7
  movsd  %xmm7,0x8(%rsp)
  movapd %xmm7,%xmm4
  movsd  %xmm7,0x10(%rsp)
L155:
  movsd  (%rbx,%rax,8),%xmm1
  subsd  %xmm3,%xmm1
  movsd  0x0(%rbp,%rax,8),%xmm0
  subsd  %xmm2,%xmm0
  movapd %xmm1,%xmm5
  mulsd  %xmm0,%xmm5
  addsd  0x10(%rsp),%xmm5
  movsd  %xmm5,0x10(%rsp)
  mulsd  %xmm1,%xmm1
  addsd  %xmm1,%xmm4
  mulsd  %xmm0,%xmm0
  addsd  0x8(%rsp),%xmm0
  movsd  %xmm0,0x8(%rsp)
  add    $0x1,%rax
  cmp    %rax,%rdx
  jne    L155
  pxor   %xmm0,%xmm0
  ucomisd %xmm4,%xmm0
  ja     L58
L44:
  sqrtsd %xmm4,%xmm4
  movsd  %xmm4,0x18(%rsp)
L135:
  pxor   %xmm0,%xmm0
  movsd  0x8(%rsp),%xmm2
  ucomisd %xmm2,%xmm0
  ja     L19
  sqrtsd %xmm2,%xmm2
  movapd %xmm2,%xmm0
L322:
  mulsd  0x18(%rsp),%xmm0
  movsd  0x10(%rsp),%xmm3
  divsd  %xmm0,%xmm3
  movq   %xmm3,%rbp
  movapd %xmm3,%xmm0
  call   <isnan@plt>
  test   %rax,%rax
  jne    L287
L49:
  movq   %rbp,%xmm0
  add    $0x20,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
L194:
  pxor   %xmm2,%xmm2
  movsd  %xmm2,0x8(%rsp)
  movapd %xmm2,%xmm4
  movsd  %xmm2,0x10(%rsp)
  jmp    L44
L104:
  addsd  %xmm0,%xmm3
  addsd  (%rsi,%rax,8),%xmm2
  movb   $0x1,(%rax)
  add    $0x1,%r13d
L136:
  add    $0x1,%rax
  cmp    %rdx,%rax
  je     L208
L295:
  movsd  (%rbx,%rax,8),%xmm0
  comisd 0x8(%rsp),%xmm0
  jb     L10
  movsd  0x10(%rsp),%xmm4
  comisd %xmm0,%xmm4
  jae    L104
L10:
  movsd  (%rsi,%rax,8),%xmm1
  comisd 0x8(%rsp),%xmm1
  jb     L136
  movsd  0x10(%rsp),%xmm4
  comisd %xmm1,%xmm4
  jb     L136
  jmp    L104
L169:
  add    $0x1,%rcx
  cmp    %rdx,%rcx
  je     L81
L52:
  cmpb   $0x0,(%rcx)
  je     L169
  movsd  (%rbx,%rcx,8),%xmm1
  subsd  %xmm3,%xmm1
  movsd  (%rsi,%rcx,8),%xmm0
  subsd  %xmm2,%xmm0
  movapd %xmm1,%xmm4
  mulsd  %xmm0,%xmm4
  addsd  0x8(%rsp),%xmm4
  movsd  %xmm4,0x8(%rsp)
  mulsd  %xmm1,%xmm1
  addsd  0x10(%rsp),%xmm1
  movsd  %xmm1,0x10(%rsp)
  mulsd  %xmm0,%xmm0
  movq   %rbp,%xmm7
  addsd  %xmm0,%xmm7
  movq   %xmm7,%rbp
  add    $0x1,%r14d
  jmp    L169
L81:
  mov    %r12,%rdi
  call   <free@plt>
  cmp    %r14d,%r13d
  sete   %dil
  movzbl %dil,%edi
  call   <assert@plt>
  pxor   %xmm0,%xmm0
  movsd  0x10(%rsp),%xmm3
  ucomisd %xmm3,%xmm0
  ja     L320
  sqrtsd %xmm3,%xmm3
  movsd  %xmm3,0x10(%rsp)
L69:
  pxor   %xmm0,%xmm0
  movq   %rbp,%xmm2
  ucomisd %xmm2,%xmm0
  ja     L15
  movq   %rbp,%xmm0
  sqrtsd %xmm0,%xmm0
L268:
  mulsd  0x10(%rsp),%xmm0
  movsd  0x8(%rsp),%xmm2
  divsd  %xmm0,%xmm2
  movq   %xmm2,%rbp
  movapd %xmm2,%xmm0
  call   <isnan@plt>
  test   %rax,%rax
  je     L49
  lea    D105(%rip),%rdi
  call   <printf@plt>
  mov    $0x0,%edi
  call   <assert@plt>
  jmp    L49
L320:
  movsd  0x10(%rsp),%xmm0
  call   <sqrt@plt>
  movsd  %xmm0,0x10(%rsp)
  jmp    L69
L15:
  movq   %rbp,%xmm0
  call   <sqrt@plt>
  jmp    L268
L58:
  movapd %xmm4,%xmm0
  call   <sqrt@plt>
  movsd  %xmm0,0x18(%rsp)
  jmp    L135
L19:
  movsd  0x8(%rsp),%xmm0
  call   <sqrt@plt>
  jmp    L322
L287:
  lea    D105(%rip),%rdi
  call   <printf@plt>
  mov    $0x0,%edi
  call   <assert@plt>
  jmp    L49
L197:
  mov    D28(%rip),%rbp
  jmp    L49
L208:
  mov    D28(%rip),%rbp
  test   %r13d,%r13d
  je     L49
  pxor   %xmm0,%xmm0
  cvtsi2sd %r13d,%xmm0
  divsd  %xmm0,%xmm3
  divsd  %xmm0,%xmm2
  mov    $0x0,%r14d
  mov    D28(%rip),%rbp
  mov    %rbp,0x10(%rsp)
  mov    %rbp,0x8(%rsp)
  jmp    L52
```

tool_calls: name: disassemble_data
arguments: data_tag: D28
data_type: f64[2]
name: disassemble_data
arguments: data_tag: D64
data_type: f64
name: disassemble_data
arguments: data_tag: D63
data_type: f64
name: disassemble_data
arguments: data_tag: D105
data_type: string

tool: {"D28": [0.0,0.5]}

tool: D64: 0.5

tool: D63: 1

tool: D105: 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;
  }
}
```