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

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  mov    %edi,-0x24(%rbp)
  mov    %rsi,-0x30(%rbp)
  mov    $0x0,%eax
  call   <omp_get_num_threads@plt>
  mov    %eax,-0x14(%rbp)
  mov    -0x14(%rbp),%eax
  mov    %eax,%esi
  lea    D22(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  movl   $0x0,-0x18(%rbp)
  mov    $0x0,%eax
  call   <current_time_ns@plt>
  mov    %rax,-0x10(%rbp)
  movl   $0x0,-0x1c(%rbp)
  jmp    L29
L30:
  addl   $0x1,-0x18(%rbp)
  addl   $0x1,-0x1c(%rbp)
L29:
  cmpl   $0x270f,-0x1c(%rbp)
  jle    L30
  mov    $0x0,%eax
  call   <current_time_ns@plt>
  mov    %rax,-0x8(%rbp)
  cmpl   $0x2710,-0x18(%rbp)
  sete   %al
  movzbl %al,%eax
  mov    %eax,%edi
  call   <assert@plt>
  mov    -0x8(%rbp),%rax
  sub    -0x10(%rbp),%rax
  test   %rax,%rax
  js     L17
  pxor   %xmm0,%xmm0
  cvtsi2sd %rax,%xmm0
  jmp    L52
L17:
  mov    %rax,%rdx
  shr    %rdx
  and    $0x1,%eax
  or     %rax,%rdx
  pxor   %xmm0,%xmm0
  cvtsi2sd %rdx,%xmm0
  addsd  %xmm0,%xmm0
L52:
  movsd  D9(%rip),%xmm2
  movapd %xmm0,%xmm1
  divsd  %xmm2,%xmm1
  movsd  D67(%rip),%xmm0
  divsd  %xmm1,%xmm0
  movq   %xmm0,%rax
  movq   %rax,%xmm0
  mov    $0x2710,%esi
  lea    D47(%rip),%rax
  mov    %rax,%rdi
  mov    $0x1,%eax
  call   <printf@plt>
  mov    -0x8(%rbp),%rax
  sub    -0x10(%rbp),%rax
  test   %rax,%rax
  js     L45
  pxor   %xmm0,%xmm0
  cvtsi2sd %rax,%xmm0
  jmp    L7
L45:
  mov    %rax,%rdx
  shr    %rdx
  and    $0x1,%eax
  or     %rax,%rdx
  pxor   %xmm0,%xmm0
  cvtsi2sd %rdx,%xmm0
  addsd  %xmm0,%xmm0
L7:
  movsd  D9(%rip),%xmm2
  movapd %xmm0,%xmm1
  divsd  %xmm2,%xmm1
  movsd  D67(%rip),%xmm0
  divsd  %xmm1,%xmm0
  movq   %xmm0,%rax
  movq   %rax,%xmm0
  mov    $0x2710,%esi
  lea    D28(%rip),%rax
  mov    %rax,%rdi
  mov    $0x1,%eax
  call   <printf@plt>
  mov    $0x0,%eax
  leave
  ret
```

tool_calls: name: parse_data
arguments: data_label: D22
type: string
name: parse_data
arguments: data_label: D9
type: f64
name: parse_data
arguments: data_label: D67
type: byte[8]
name: parse_data
arguments: data_label: D47
type: string
name: parse_data
arguments: data_label: D28
type: string

tool: D22: Using %d OpenMP threads


tool: D9: 1000

tool: {"D67": [0x00,0x00,0x00,0x00,0x00,0x88,0xc3,0x40]}

tool: D47: METRIC recursive_reduction %d %.20f


tool: D28: METRIC flat_reduction %d %.20f


assistant: ```c
int main(int argc, char **argv) {
  int nthreads;
#pragma omp parallel default(none) shared(nthreads)
#pragma omp master
  { nthreads = omp_get_num_threads(); }
  printf("Using %d OpenMP threads\n", nthreads);
#pragma omp parallel default(none)
#pragma omp master
  {
    int i;
    unsigned sum = 0;
    const unsigned long long start_time = current_time_ns();
#pragma omp parallel for default(none) private(i) reduction(+ : sum)
    for (i = 0; i < 10000; i++) {
      sum += 1;
    }
    const unsigned long long end_time = current_time_ns();
    assert(sum == 10000);
    printf("METRIC recursive_reduction %d %.20f\n", 10000, (double)10000 / ((double)(end_time - start_time) / 1000.0));
    printf("METRIC flat_reduction %d %.20f\n", 10000, (double)10000 / ((double)(end_time - start_time) / 1000.0));
  }
  return 0;
}
```