user: Converte this assembly snippet into its equivalent C code:

```asm
<benchmark>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r14
  push   %r13
  mov    %edi,%r13d
  push   %r12
  mov    %esi,%r12d
  push   %rbx
  sub    $0x20,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x28(%rbp)
  xor    %eax,%eax
  movslq %esi,%rax
  mov    %rsp,%rcx
  lea    0xf(,%rax,8),%rax
  mov    %rax,%rdx
  and    $0xfffffffffffff000,%rax
  sub    %rax,%rcx
  and    $0xfffffffffffffff0,%rdx
  cmp    %rcx,%rsp
  je     L40
L169:
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  cmp    %rcx,%rsp
  jne    L169
L40:
  and    $0xfff,%edx
  sub    %rdx,%rsp
  test   %rdx,%rdx
  jne    L59
L118:
  mov    %rsp,%r14
  test   %r12d,%r12d
  jle    L84
  lea    -0x1(%r12),%eax
  cmp    $0x2,%eax
  jbe    L22
  mov    %r12d,%edx
  movdqa D14(%rip),%xmm1
  movdqa D1(%rip),%xmm3
  mov    %r14,%rax
  shr    $0x2,%edx
  shl    $0x5,%rdx
  add    %r14,%rdx
  nopl   0x0(%rax)
L2:
  movdqa %xmm1,%xmm0
  add    $0x20,%rax
  paddd  %xmm3,%xmm1
  cvtdq2pd %xmm0,%xmm2
  pshufd $0xee,%xmm0,%xmm0
  movups %xmm2,-0x20(%rax)
  cvtdq2pd %xmm0,%xmm0
  movups %xmm0,-0x10(%rax)
  cmp    %rdx,%rax
  jne    L2
  mov    %r12d,%eax
  and    $0xfffffffc,%eax
  test   $0x3,%r12b
  je     L84
L81:
  pxor   %xmm0,%xmm0
  movslq %eax,%rdx
  lea    0x1(%rax),%ecx
  cvtsi2sd %eax,%xmm0
  lea    (%r14,%rdx,8),%rdx
  movsd  %xmm0,(%rdx)
  cmp    %ecx,%r12d
  jle    L84
  pxor   %xmm0,%xmm0
  add    $0x2,%eax
  cvtsi2sd %ecx,%xmm0
  movsd  %xmm0,0x8(%rdx)
  cmp    %eax,%r12d
  jle    L84
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  movsd  %xmm0,0x10(%rdx)
L84:
  xor    %eax,%eax
  call   <tic@plt>
  movsd  %xmm0,-0x38(%rbp)
  test   %r13d,%r13d
  jle    L27
  xor    %ebx,%ebx
  jmp    L164
  nopl   0x0(%rax)
L32:
  add    $0x1,%ebx
  cmp    %ebx,%r13d
  je     L27
L164:
  mov    $0x1,%edx
  mov    %r14,%rsi
  mov    %r12d,%edi
  call   <stdlib_strided_dminsorted@plt>
  ucomisd %xmm0,%xmm0
  jnp    L32
  lea    D28(%rip),%r12
  mov    %r12,%rdi
  call   <printf@plt>
  xor    %eax,%eax
  call   <tic@plt>
  subsd  -0x38(%rbp),%xmm0
  mov    %r12,%rdi
  movsd  %xmm0,-0x38(%rbp)
  call   <printf@plt>
  movsd  -0x38(%rbp),%xmm0
L149:
  mov    -0x28(%rbp),%rax
  sub    %fs:0x28,%rax
  jne    L116
  lea    -0x20(%rbp),%rsp
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %rbp
  ret
  nop
L27:
  xor    %eax,%eax
  call   <tic@plt>
  subsd  -0x38(%rbp),%xmm0
  jmp    L149
  xchg   %ax,%ax
L59:
  orq    $0x0,-0x8(%rsp,%rdx,1)
  jmp    L118
L22:
  xor    %eax,%eax
  jmp    L81
L116:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: read_data
arguments: data_label: D14
type: f32[4]
name: read_data
arguments: data_label: D1
type: byte[16]
name: read_data
arguments: data_label: D28
type: string

tool: {"D14": [0.0,1.401298464324817e-45,2.802596928649634e-45,4.203895392974451e-45]}

tool: {"D1": [0x04,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x04,0x00,0x00,0x00]}

tool: D28: should not return NaN


assistant: ```c
double benchmark(int iterations, int len) {
  double elapsed;
  double x[len];
  double v;
  double t;
  int i;
  for (i = 0; i < len; i++) {
    x[i] = i;
  }
  v = 0.0;
  t = tic();
  for (i = 0; i < iterations; i++) {
    v = stdlib_strided_dminsorted(len, x, 1);
    if (v != v) {
      printf("should not return NaN\n");
      break;
    }
  }
  elapsed = tic() - t;
  if (v != v) {
    printf("should not return NaN\n");
  }
  return elapsed;
}
```