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
  mov    %edi,%r13d
  push   %r12
  mov    %esi,%r12d
  push   %rbx
  sub    $0x28,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x38(%rbp)
  xor    %eax,%eax
  movslq %esi,%rax
  mov    %rsp,%rcx
  mov    %rax,-0x48(%rbp)
  lea    0xf(,%rax,8),%rax
  mov    %rax,%rsi
  mov    %rax,%rdx
  and    $0xfffffffffffff000,%rsi
  and    $0xfffffffffffffff0,%rdx
  sub    %rsi,%rcx
  cmp    %rcx,%rsp
  je     L7
L82:
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  cmp    %rcx,%rsp
  jne    L82
L7:
  and    $0xfff,%edx
  sub    %rdx,%rsp
  test   %rdx,%rdx
  jne    L112
L31:
  mov    %rax,%rdx
  mov    %rsp,%rcx
  and    $0xfffffffffffff000,%rax
  mov    %rsp,%rbx
  sub    %rax,%rcx
  and    $0xfffffffffffffff0,%rdx
  cmp    %rcx,%rsp
  je     L157
L43:
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  cmp    %rcx,%rsp
  jne    L43
L157:
  and    $0xfff,%edx
  sub    %rdx,%rsp
  test   %rdx,%rdx
  jne    L9
L120:
  lea    0x7(%rsp),%rcx
  mov    %rcx,%rax
  and    $0xfffffffffffffff8,%rcx
  shr    $0x3,%rax
  mov    %rcx,%r15
  mov    %rax,-0x50(%rbp)
  test   %r12d,%r12d
  jle    L70
  xor    %r14d,%r14d
  nopl   (%rax)
L116:
  xor    %eax,%eax
  call   <rand_double@plt>
  mulsd  D26(%rip),%xmm0
  movq   $0x0,(%r15,%r14,8)
  subsd  D32(%rip),%xmm0
  movsd  %xmm0,(%rbx,%r14,8)
  add    $0x1,%r14
  cmp    -0x48(%rbp),%r14
  jne    L116
L70:
  xor    %eax,%eax
  call   <tic@plt>
  movsd  %xmm0,-0x48(%rbp)
  test   %r13d,%r13d
  jle    L75
  xor    %r14d,%r14d
  jmp    L149
  nopl   (%rax)
L86:
  add    $0x1,%r14d
  cmp    %r14d,%r13d
  je     L75
L149:
  mov    $0x1,%r8d
  mov    %r15,%rcx
  mov    %rbx,%rsi
  mov    %r12d,%edi
  mov    $0x1,%edx
  call   <c_dswap@plt>
  movsd  (%r15),%xmm0
  ucomisd %xmm0,%xmm0
  jnp    L86
  lea    D19(%rip),%rdi
  call   <printf@plt>
L75:
  xor    %eax,%eax
  call   <tic@plt>
  mov    -0x50(%rbp),%rax
  subsd  -0x48(%rbp),%xmm0
  movsd  0x0(,%rax,8),%xmm1
  ucomisd %xmm1,%xmm1
  jp     L49
L48:
  mov    -0x38(%rbp),%rax
  sub    %fs:0x28,%rax
  jne    L159
  lea    -0x28(%rbp),%rsp
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  pop    %rbp
  ret
  xchg   %ax,%ax
L112:
  orq    $0x0,-0x8(%rsp,%rdx,1)
  jmp    L31
  nopl   0x0(%rax,%rax,1)
L49:
  lea    D19(%rip),%rdi
  movsd  %xmm0,-0x48(%rbp)
  call   <printf@plt>
  movsd  -0x48(%rbp),%xmm0
  jmp    L48
L9:
  orq    $0x0,-0x8(%rsp,%rdx,1)
  jmp    L120
L159:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: extract_symbolic_data
arguments: data_label: D26
datatype: f64
name: extract_symbolic_data
arguments: data_label: D32
datatype: f64
name: extract_symbolic_data
arguments: data_label: D19
datatype: string

tool: D26: 20000

tool: D32: 10000

tool: D19: should not return NaN


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