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

```asm
<stdlib_strided_dnanvarianceyc>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %edi,-0x44(%rbp)
  movsd  %xmm0,-0x50(%rbp)
  mov    %rsi,-0x58(%rbp)
  mov    %edx,-0x48(%rbp)
  cmpl   $0x0,-0x44(%rbp)
  jg     L143
  pxor   %xmm0,%xmm0
  divsd  %xmm0,%xmm0
  jmp    L154
L143:
  cmpl   $0x1,-0x44(%rbp)
  je     L171
  cmpl   $0x0,-0x48(%rbp)
  jne    L217
L171:
  mov    -0x58(%rbp),%rax
  movsd  (%rax),%xmm0
  movsd  %xmm0,-0x20(%rbp)
  movsd  -0x20(%rbp),%xmm0
  ucomisd -0x20(%rbp),%xmm0
  jp     L200
  pxor   %xmm0,%xmm0
  cvtsi2sdl -0x44(%rbp),%xmm0
  subsd  -0x50(%rbp),%xmm0
  pxor   %xmm1,%xmm1
  comisd %xmm1,%xmm0
  jbe    L200
  pxor   %xmm0,%xmm0
  jmp    L154
L200:
  pxor   %xmm0,%xmm0
  divsd  %xmm0,%xmm0
  jmp    L154
L217:
  cmpl   $0x0,-0x48(%rbp)
  jns    L88
  mov    $0x1,%eax
  sub    -0x44(%rbp),%eax
  mov    -0x48(%rbp),%edx
  imul   %edx,%eax
  mov    %eax,-0x3c(%rbp)
  jmp    L45
L88:
  movl   $0x0,-0x3c(%rbp)
L45:
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x18(%rbp)
  jmp    L36
L44:
  mov    -0x3c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x58(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movsd  %xmm0,-0x20(%rbp)
  movsd  -0x20(%rbp),%xmm0
  ucomisd -0x20(%rbp),%xmm0
  jnp    L149
  mov    -0x48(%rbp),%eax
  add    %eax,-0x3c(%rbp)
  movsd  -0x18(%rbp),%xmm1
  movsd  D10(%rip),%xmm0
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x18(%rbp)
L36:
  pxor   %xmm0,%xmm0
  cvtsi2sdl -0x44(%rbp),%xmm0
  comisd -0x18(%rbp),%xmm0
  ja     L44
  jmp    L82
L149:
  nop
L82:
  pxor   %xmm0,%xmm0
  cvtsi2sdl -0x44(%rbp),%xmm0
  ucomisd -0x18(%rbp),%xmm0
  jp     L50
  ucomisd -0x18(%rbp),%xmm0
  jne    L50
  pxor   %xmm0,%xmm0
  divsd  %xmm0,%xmm0
  jmp    L154
L50:
  mov    -0x48(%rbp),%eax
  add    %eax,-0x3c(%rbp)
  movsd  -0x20(%rbp),%xmm0
  movsd  %xmm0,-0x38(%rbp)
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x28(%rbp)
  movsd  D10(%rip),%xmm0
  movsd  %xmm0,-0x30(%rbp)
  movsd  -0x18(%rbp),%xmm1
  movsd  D10(%rip),%xmm0
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x18(%rbp)
  jmp    L15
L134:
  mov    -0x3c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x58(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movsd  %xmm0,-0x20(%rbp)
  movsd  -0x20(%rbp),%xmm0
  ucomisd -0x20(%rbp),%xmm0
  jp     L14
  movsd  -0x30(%rbp),%xmm1
  movsd  D10(%rip),%xmm0
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x30(%rbp)
  movsd  -0x38(%rbp),%xmm0
  addsd  -0x20(%rbp),%xmm0
  movsd  %xmm0,-0x38(%rbp)
  movsd  -0x30(%rbp),%xmm0
  mulsd  -0x20(%rbp),%xmm0
  subsd  -0x38(%rbp),%xmm0
  movsd  %xmm0,-0x8(%rbp)
  movsd  -0x30(%rbp),%xmm0
  movsd  D10(%rip),%xmm1
  subsd  %xmm1,%xmm0
  movapd %xmm0,%xmm1
  mulsd  -0x30(%rbp),%xmm1
  movsd  D10(%rip),%xmm0
  divsd  %xmm1,%xmm0
  mulsd  -0x8(%rbp),%xmm0
  mulsd  -0x8(%rbp),%xmm0
  movsd  -0x28(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x28(%rbp)
L14:
  mov    -0x48(%rbp),%eax
  add    %eax,-0x3c(%rbp)
  movsd  -0x18(%rbp),%xmm1
  movsd  D10(%rip),%xmm0
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x18(%rbp)
L15:
  pxor   %xmm0,%xmm0
  cvtsi2sdl -0x44(%rbp),%xmm0
  comisd -0x18(%rbp),%xmm0
  ja     L134
  movsd  -0x30(%rbp),%xmm0
  subsd  -0x50(%rbp),%xmm0
  movsd  %xmm0,-0x10(%rbp)
  pxor   %xmm0,%xmm0
  comisd -0x10(%rbp),%xmm0
  jb     L20
  pxor   %xmm0,%xmm0
  divsd  %xmm0,%xmm0
  jmp    L154
L20:
  movsd  -0x28(%rbp),%xmm0
  divsd  -0x10(%rbp),%xmm0
L154:
  movq   %xmm0,%rax
  movq   %rax,%xmm0
  pop    %rbp
  ret
```

tool_calls: name: disassemble_data
arguments: label: D10
type_guessed: f64

tool: D10: 1

assistant: ```c
double stdlib_strided_dnanvarianceyc(const int64_t N, const double correction, const double *X, const int64_t stride) {
  double sum;
  int64_t ix;
  double nc;
  double n;
  double S;
  double v;
  double d;
  double i;
  if (N <= 0) {
    return 0.0 / 0.0;
  }
  if (N == 1 || stride == 0) {
    v = X[0];
    if (v == v && (double)N - correction > 0.0) {
      return 0.0;
    }
    return 0.0 / 0.0;
  }
  if (stride < 0) {
    ix = (1 - N) * stride;
  } else {
    ix = 0;
  }
  for (i = 0; i < N; i++) {
    v = X[ix];
    if (v == v) {
      break;
    }
    ix += stride;
  }
  if (i == N) {
    return 0.0 / 0.0;
  }
  ix += stride;
  sum = v;
  S = 0.0;
  n = 1.0;
  i += 1;
  for (; i < N; i++) {
    v = X[ix];
    if (v == v) {
      n += 1.0;
      sum += v;
      d = (n * v) - sum;
      S += (1.0 / (n * (n - 1.0))) * d * d;
    }
    ix += stride;
  }
  nc = n - correction;
  if (nc <= 0.0) {
    return 0.0 / 0.0;
  }
  return S / nc;
}
```