user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<main>:
  endbr64
  push   %r13
  xor    %eax,%eax
  push   %r12
  push   %rbp
  push   %rbx
  xor    %ebx,%ebx
  sub    $0x8,%rsp
  call   <omp_get_num_threads@plt>
  mov    $0x4,%edi
  mov    %eax,%r13d
  call   <malloc@plt>
  mov    %rax,%rbp
  mov    %rax,%rdi
  call   <assert@plt>
  movl   $0x0,0x0(%rbp)
  jmp    L134
  nopl   0x0(%rax,%rax,1)
L29:
  mov    %rbp,%rdi
  call   <atomic_inc@plt>
  cmp    $0x1adb0,%ebx
  je     L44
L134:
  add    $0x1,%ebx
  cmp    $0x2711,%ebx
  jne    L29
  xor    %eax,%eax
  call   <current_time_ns@plt>
  mov    %rbp,%rdi
  mov    %rax,%r12
  call   <atomic_inc@plt>
  jmp    L134
L44:
  imul   $0x186a0,%r13d,%r13d
  xor    %eax,%eax
  call   <current_time_ns@plt>
  pxor   %xmm2,%xmm2
  cvtsi2sd %r13d,%xmm2
  movq   %xmm2,%r13
  sub    %r12,%rax
  js     L96
  pxor   %xmm0,%xmm0
  cvtsi2sd %rax,%xmm0
L163:
  movq   %r13,%xmm1
  lea    D1(%rip),%rdi
  xor    %ebx,%ebx
  divsd  %xmm0,%xmm1
  movapd %xmm1,%xmm0
  call   <printf@plt>
  jmp    L54
  nopw   0x0(%rax,%rax,1)
L143:
  mov    %rbp,%rdi
  call   <atomic_dec@plt>
  cmp    $0x1adb0,%ebx
  je     L150
L54:
  add    $0x1,%ebx
  cmp    $0x2711,%ebx
  jne    L143
  xor    %eax,%eax
  call   <current_time_ns@plt>
  mov    %rbp,%rdi
  mov    %rax,%r12
  call   <atomic_dec@plt>
  jmp    L54
L150:
  xor    %eax,%eax
  call   <current_time_ns@plt>
  sub    %r12,%rax
  js     L1
  pxor   %xmm0,%xmm0
  cvtsi2sd %rax,%xmm0
L57:
  movq   %r13,%xmm1
  lea    D11(%rip),%rdi
  xor    %ebx,%ebx
  divsd  %xmm0,%xmm1
  movapd %xmm1,%xmm0
  call   <printf@plt>
  jmp    L136
  nopl   (%rax)
L59:
  xor    %esi,%esi
  mov    $0x1,%edx
  mov    %rbp,%rdi
  call   <atomic_cas@plt>
  cmp    $0x1adb0,%ebx
  je     L4
L136:
  add    $0x1,%ebx
  cmp    $0x2711,%ebx
  jne    L59
  xor    %eax,%eax
  call   <current_time_ns@plt>
  mov    $0x1,%edx
  xor    %esi,%esi
  mov    %rbp,%rdi
  mov    %rax,%r12
  call   <atomic_cas@plt>
  jmp    L136
L4:
  xor    %eax,%eax
  call   <current_time_ns@plt>
  sub    %r12,%rax
  js     L24
  pxor   %xmm1,%xmm1
  cvtsi2sd %rax,%xmm1
L30:
  movq   %r13,%xmm0
  lea    D29(%rip),%rdi
  divsd  %xmm1,%xmm0
  call   <printf@plt>
  add    $0x8,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
L96:
  mov    %rax,%rdx
  and    $0x1,%eax
  pxor   %xmm0,%xmm0
  shr    %rdx
  or     %rax,%rdx
  cvtsi2sd %rdx,%xmm0
  addsd  %xmm0,%xmm0
  jmp    L163
L24:
  mov    %rax,%rdx
  and    $0x1,%eax
  pxor   %xmm1,%xmm1
  shr    %rdx
  or     %rax,%rdx
  cvtsi2sd %rdx,%xmm1
  addsd  %xmm1,%xmm1
  jmp    L30
L1:
  mov    %rax,%rdx
  and    $0x1,%eax
  pxor   %xmm0,%xmm0
  shr    %rdx
  or     %rax,%rdx
  cvtsi2sd %rdx,%xmm0
  addsd  %xmm0,%xmm0
  jmp    L57
```

tool_calls: name: extract_symbolic_data
arguments: tag: D1
type_guessed: string
name: extract_symbolic_data
arguments: tag: D11
type_guessed: string
name: extract_symbolic_data
arguments: tag: D29
type_guessed: string

tool: D1: INC : %f ops/ns


tool: D11: DEC : %f ops/ns


tool: D29: CAS : %f ops/ns


assistant: ```c
int main(int argc, char **argv) {
  int nthreads;
#pragma omp parallel
#pragma omp single
  { nthreads = omp_get_num_threads(); }
  int *shared = (int *)malloc(sizeof(int));
  assert(shared);
  *shared = 0;
  unsigned long long start, end, elapsed;
#pragma omp parallel
  {
    int i;
    for (i = 0; i < (100000 / 10) + 100000; i++) {
      if (i == (100000 / 10)) {
#pragma omp barrier
#pragma omp master
        start = current_time_ns();
      }
      atomic_inc(shared);
    }
#pragma omp barrier
#pragma omp master
    end = current_time_ns();
  }
  printf("INC : %f ops/ns\n", (double)(100000 * nthreads) / (double)(end - start));
#pragma omp parallel
  {
    int i;
    for (i = 0; i < (100000 / 10) + 100000; i++) {
      if (i == (100000 / 10)) {
#pragma omp barrier
#pragma omp master
        start = current_time_ns();
      }
      atomic_dec(shared);
    }
#pragma omp barrier
#pragma omp master
    end = current_time_ns();
  }
  printf("DEC : %f ops/ns\n", (double)(100000 * nthreads) / (double)(end - start));
#pragma omp parallel
  {
    int i;
    for (i = 0; i < (100000 / 10) + 100000; i++) {
      if (i == (100000 / 10)) {
#pragma omp barrier
#pragma omp master
        start = current_time_ns();
      }
      atomic_cas(shared, 0, 1);
    }
#pragma omp barrier
#pragma omp master
    end = current_time_ns();
  }
  printf("CAS : %f ops/ns\n", (double)(100000 * nthreads) / (double)(end - start));
  return 0;
}
```