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

```asm
<benchmark>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbx
  sub    $0x28,%rsp
  mov    %edi,%r12d
  mov    %esi,%r13d
  mov    %fs:0x28,%rax
  mov    %rax,-0x38(%rbp)
  xor    %eax,%eax
  movslq %esi,%rax
  lea    0xf(,%rax,8),%rax
  mov    %rax,%rcx
  and    $0xfffffffffffffff0,%rcx
  and    $0xfffffffffffff000,%rax
  mov    %rsp,%rdx
  sub    %rax,%rdx
L50:
  cmp    %rdx,%rsp
  je     L37
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L50
L37:
  mov    %rcx,%rax
  and    $0xfff,%eax
  sub    %rax,%rsp
  test   %rax,%rax
  je     L128
  orq    $0x0,-0x8(%rsp,%rax,1)
L128:
  mov    %rsp,%r14
  test   %r13d,%r13d
  jle    L108
  mov    %r14,%rbx
  mov    %r13d,%eax
  lea    (%r14,%rax,8),%r15
L15:
  mov    $0x0,%eax
  call   <rand_double@plt>
  mulsd  D19(%rip),%xmm0
  subsd  D39(%rip),%xmm0
  movsd  %xmm0,(%rbx)
  add    $0x8,%rbx
  cmp    %r15,%rbx
  jne    L15
L108:
  movq   $0x0,-0x50(%rbp)
  movq   $0x0,-0x48(%rbp)
  mov    $0x0,%eax
  call   <tic@plt>
  movq   %xmm0,%r15
  test   %r12d,%r12d
  jle    L110
  mov    $0x0,%ebx
L0:
  lea    -0x50(%rbp),%rcx
  mov    $0x1,%r8d
  mov    $0x1,%edx
  mov    %r14,%rsi
  mov    D0(%rip),%rax
  movq   %rax,%xmm0
  mov    %r13d,%edi
  call   <stdlib_strided_dmeanstdevpn@plt>
  mov    %ebx,%edx
  shr    $0x1f,%edx
  lea    (%rbx,%rdx,1),%eax
  and    $0x1,%eax
  sub    %edx,%eax
  cltq
  movsd  -0x50(%rbp,%rax,8),%xmm0
  ucomisd %xmm0,%xmm0
  jp     L38
  add    $0x1,%ebx
  cmp    %ebx,%r12d
  jne    L0
  jmp    L3
L38:
  lea    D30(%rip),%rdi
  call   <printf@plt>
  mov    %ebx,%r12d
L3:
  mov    $0x0,%eax
  call   <tic@plt>
  movq   %r15,%xmm1
  subsd  %xmm1,%xmm0
  movq   %xmm0,%rbx
  mov    %r12d,%edx
  shr    $0x1f,%edx
  lea    (%r12,%rdx,1),%eax
  and    $0x1,%eax
  sub    %edx,%eax
  cltq
  movsd  -0x50(%rbp,%rax,8),%xmm0
  ucomisd %xmm0,%xmm0
  jp     L28
L123:
  mov    -0x38(%rbp),%rax
  sub    %fs:0x28,%rax
  jne    L106
  movq   %rbx,%xmm0
  lea    -0x28(%rbp),%rsp
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  pop    %rbp
  ret
L110:
  mov    $0x0,%r12d
  jmp    L3
L28:
  lea    D30(%rip),%rdi
  call   <printf@plt>
  jmp    L123
L106:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: retrieve_data
arguments: label: D19
data_type: f64
name: retrieve_data
arguments: label: D39
data_type: f64
name: retrieve_data
arguments: label: D0
data_type: f64
name: retrieve_data
arguments: label: D30
data_type: string

tool: D19: 20000

tool: D39: 10000

tool: D0: 1

tool: D30: should not return NaN


assistant: ```c
double benchmark(int iterations, int len) {
  double elapsed;
  double out[2];
  double x[len];
  double t;
  int i;
  for (i = 0; i < len; i++) {
    x[i] = (rand_double() * 20000.0) - 10000.0;
  }
  out[0] = 0.0;
  out[1] = 0.0;
  t = tic();
  for (i = 0; i < iterations; i++) {
    stdlib_strided_dmeanstdevpn(len, 1.0, x, 1, out, 1);
    if (out[i % 2] != out[i % 2]) {
      printf("should not return NaN\n");
      break;
    }
  }
  elapsed = tic() - t;
  if (out[i % 2] != out[i % 2]) {
    printf("should not return NaN\n");
  }
  return elapsed;
}
```