user: Please show me the C implementation that matches the assembly code listed below:

```asm
<c_corr_prune>:
  endbr64
  push   %r12
  lea    D7(%rip),%rsi
  push   %rbp
  push   %rbx
  sub    $0x50,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x48(%rsp)
  xor    %eax,%eax
  lea    0x38(%rsp),%r12
  call   <fopen@plt>
  xor    %edi,%edi
  test   %rax,%rax
  mov    %rax,%rbp
  setne  %dil
  xor    %ebx,%ebx
  call   <assert@plt>
  pxor   %xmm7,%xmm7
  movsd  %xmm7,0x10(%rsp)
  movsd  %xmm7,0x18(%rsp)
  movsd  %xmm7,0x8(%rsp)
  movsd  %xmm7,0x20(%rsp)
  movsd  %xmm7,0x28(%rsp)
  nopw   0x0(%rax,%rax,1)
L67:
  mov    %rbp,%rcx
  mov    $0x1,%edx
  mov    $0x8,%esi
  mov    %r12,%rdi
  call   <fread@plt>
  cmp    $0x1,%eax
  jne    L56
  lea    0x40(%rsp),%rdi
  mov    %rbp,%rcx
  mov    $0x1,%edx
  mov    $0x8,%esi
  call   <fread@plt>
  cmp    $0x1,%eax
  jne    L56
  mov    %rbp,%rdi
  call   <feof@plt>
  test   %rax,%rax
  jne    L56
  movsd  0x38(%rsp),%xmm0
  comisd D2(%rip),%xmm0
  jae    L67
  movsd  0x40(%rsp),%xmm1
  comisd D2(%rip),%xmm1
  jae    L67
  movsd  0x28(%rsp),%xmm4
  movsd  0x8(%rsp),%xmm5
  movapd %xmm0,%xmm2
  add    $0x1,%rbx
  mulsd  %xmm0,%xmm2
  addsd  %xmm0,%xmm4
  addsd  %xmm1,%xmm5
  mulsd  %xmm1,%xmm0
  mulsd  %xmm1,%xmm1
  addsd  0x20(%rsp),%xmm2
  addsd  0x10(%rsp),%xmm0
  addsd  0x18(%rsp),%xmm1
  movsd  %xmm4,0x28(%rsp)
  movsd  %xmm2,0x20(%rsp)
  movsd  %xmm5,0x8(%rsp)
  movsd  %xmm0,0x10(%rsp)
  movsd  %xmm1,0x18(%rsp)
  jmp    L67
L56:
  mov    %rbp,%rdi
  call   <fclose@plt>
  test   %rbx,%rbx
  js     L35
  pxor   %xmm3,%xmm3
  cvtsi2sd %rbx,%xmm3
L133:
  movsd  0x28(%rsp),%xmm4
  movsd  0x10(%rsp),%xmm0
  movsd  0x8(%rsp),%xmm1
  mulsd  %xmm3,%xmm0
  movapd %xmm4,%xmm2
  mulsd  %xmm4,%xmm1
  mulsd  %xmm4,%xmm2
  subsd  %xmm1,%xmm0
  movsd  0x20(%rsp),%xmm1
  mulsd  %xmm3,%xmm1
  subsd  %xmm2,%xmm1
  comisd D32(%rip),%xmm1
  jae    L77
  cvttsd2si %xmm1,%rdi
L75:
  movsd  %xmm0,0x20(%rsp)
  movsd  %xmm3,0x10(%rsp)
  call   <sqrt@plt>
  movsd  0x10(%rsp),%xmm3
  movsd  0x20(%rsp),%xmm0
  test   %rax,%rax
  js     L163
  pxor   %xmm1,%xmm1
  cvtsi2sd %rax,%xmm1
L142:
  divsd  %xmm1,%xmm0
  movsd  0x8(%rsp),%xmm1
  mulsd  0x18(%rsp),%xmm3
  mulsd  %xmm1,%xmm1
  subsd  %xmm1,%xmm3
  comisd D32(%rip),%xmm3
  jae    L99
  cvttsd2si %xmm3,%rdi
L120:
  movsd  %xmm0,0x8(%rsp)
  call   <sqrt@plt>
  movsd  0x8(%rsp),%xmm0
  test   %rax,%rax
  js     L15
  pxor   %xmm1,%xmm1
  cvtsi2sd %rax,%xmm1
L130:
  divsd  %xmm1,%xmm0
  mov    0x48(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L3
  add    $0x50,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
  nopl   0x0(%rax,%rax,1)
L77:
  subsd  D32(%rip),%xmm1
  cvttsd2si %xmm1,%rdi
  btc    $0x3f,%rdi
  jmp    L75
  nopw   0x0(%rax,%rax,1)
L99:
  subsd  D32(%rip),%xmm3
  cvttsd2si %xmm3,%rdi
  btc    $0x3f,%rdi
  jmp    L120
  nopl   0x0(%rax)
L35:
  mov    %rbx,%rax
  and    $0x1,%ebx
  pxor   %xmm3,%xmm3
  shr    %rax
  or     %rbx,%rax
  cvtsi2sd %rax,%xmm3
  addsd  %xmm3,%xmm3
  jmp    L133
  cs nopw 0x0(%rax,%rax,1)
L15:
  mov    %rax,%rdx
  and    $0x1,%eax
  pxor   %xmm1,%xmm1
  shr    %rdx
  or     %rax,%rdx
  cvtsi2sd %rdx,%xmm1
  addsd  %xmm1,%xmm1
  jmp    L130
  xchg   %ax,%ax
L163:
  mov    %rax,%rdx
  and    $0x1,%eax
  pxor   %xmm1,%xmm1
  shr    %rdx
  or     %rax,%rdx
  cvtsi2sd %rdx,%xmm1
  addsd  %xmm1,%xmm1
  jmp    L142
L3:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: disassemble_data
arguments: data_label: D7
type_infered: string
name: disassemble_data
arguments: data_label: D2
type_infered: f64
name: disassemble_data
arguments: data_label: D32
type_infered: f32[4]

tool: D7: rb

tool: D2: 0.25

tool: {"D32": [0.0,448.0,0.0,1.625]}

assistant: ```c
double c_corr_prune(const char f_name[]) {
  FILE *const pf = fopen(f_name, "rb");
  assert(pf != NULL);
  double sx = 0, sxx = 0, sy = 0, syy = 0, sxy = 0;
  size_t n = 0;
  while (1) {
    double x, y;
    if (fread(&x, sizeof(double), 1, pf) != 1 || fread(&y, sizeof(double), 1, pf) != 1 || feof(pf)) {
      fclose(pf);
      break;
    }
    if (x >= 0.25 || y >= 0.25)
      continue;
    sx += x;
    sxx += x * x;
    sy += y;
    sxy += x * y;
    syy += y * y;
    ++n;
  }
  return (n * sxy - sx * sy) / sqrt(n * sxx - sx * sx) / sqrt(n * syy - sy * sy);
}
```