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

```asm
<main>:
  endbr64
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x1000,%rsp
  orq    $0x0,(%rsp)
  sub    $0xf80,%rsp
  mov    $0x3e8,%ecx
  xor    %ebp,%ebp
  pxor   %xmm2,%xmm2
  cvtsi2sd %ebp,%xmm2
  mov    %fs:0x28,%rax
  mov    %rax,0x1f78(%rsp)
  xor    %eax,%eax
  lea    0x30(%rsp),%rbx
  mov    %rbx,%rdi
  rep stos %rax,%es:(%rdi)
  nopl   0x0(%rax,%rax,1)
L20:
  divsd  D87(%rip),%xmm2
  movapd %xmm2,%xmm1
  add    $0x1,%ebp
  pxor   %xmm2,%xmm2
  movapd %xmm1,%xmm3
  cvtsi2sd %ebp,%xmm2
  movsd  D48(%rip),%xmm0
  movsd  %xmm1,0x20(%rsp)
  mulsd  %xmm1,%xmm3
  movapd %xmm2,%xmm4
  movsd  %xmm2,0x28(%rsp)
  divsd  D87(%rip),%xmm4
  movsd  %xmm4,0x8(%rsp)
  subsd  %xmm3,%xmm0
  cvttsd2si %xmm0,%edi
  call   <sqrt@plt>
  movsd  0x8(%rsp),%xmm4
  movsd  D48(%rip),%xmm5
  movsd  %xmm0,0x10(%rsp)
  movapd %xmm4,%xmm3
  mulsd  %xmm4,%xmm3
  subsd  %xmm3,%xmm5
  cvttsd2si %xmm5,%edi
  call   <sqrt@plt>
  xor    %eax,%eax
  movsd  %xmm0,0x18(%rsp)
  call   <omp_get_thread_num@plt>
  movsd  0x20(%rsp),%xmm1
  movsd  0x8(%rsp),%xmm3
  cmp    $0x3d0900,%ebp
  movsd  0x28(%rsp),%xmm2
  subsd  %xmm1,%xmm3
  movsd  0x10(%rsp),%xmm1
  addsd  0x18(%rsp),%xmm1
  movapd %xmm3,%xmm0
  mulsd  %xmm1,%xmm0
  mulsd  D53(%rip),%xmm0
  addsd  0x30(%rsp,%rax,8),%xmm0
  movsd  %xmm0,0x30(%rsp,%rax,8)
  jne    L20
  mov    %rbx,%rbp
  lea    0x1f70(%rsp),%rdx
  pxor   %xmm0,%xmm0
  mov    %rbx,%rax
  nopl   0x0(%rax)
L16:
  movsd  (%rax),%xmm1
  add    $0x10,%rax
  addsd  %xmm0,%xmm1
  movsd  -0x8(%rax),%xmm0
  addsd  %xmm1,%xmm0
  cmp    %rax,%rdx
  jne    L16
  mulsd  D14(%rip),%xmm0
  lea    D5(%rip),%rdi
  add    $0x50,%rbx
  lea    D38(%rip),%r12
  cvttsd2si %xmm0,%esi
  call   <printf@plt>
  nopl   (%rax)
L35:
  movsd  D14(%rip),%xmm0
  mulsd  0x0(%rbp),%xmm0
  mov    %r12,%rdi
  add    $0x8,%rbp
  cvttsd2si %xmm0,%esi
  call   <printf@plt>
  cmp    %rbp,%rbx
  jne    L35
  mov    0x1f78(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L33
  add    $0x1f80,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
L33:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: extract_symbolic_data
arguments: tag: D87
datatype: f32[2]
name: extract_symbolic_data
arguments: tag: D48
datatype: f64
name: extract_symbolic_data
arguments: tag: D53
datatype: f64
name: extract_symbolic_data
arguments: tag: D14
datatype: f32[2]
name: extract_symbolic_data
arguments: tag: D5
datatype: string
name: extract_symbolic_data
arguments: tag: D38
datatype: string

tool: {"D87": [0.0,12.9073486328125]}

tool: D48: 1

tool: D53: 0.5

tool: {"D14": [0.0,2.25]}

tool: D5: %.12f



tool: D38: %.12f


assistant: ```c
int main() {
  int N = 4000000;
  double smi[1000];
  int i;
  for (i = 0; i < 1000; i++)
    smi[i] = 0;
#pragma omp parallel for
  for (i = 0; i < N; i++) {
    double x1 = i / ((double)N);
    double x2 = (i + 1) / ((double)N);
    double y1 = sqrt(1 - x1 * x1);
    double y2 = sqrt(1 - x2 * x2);
    smi[omp_get_thread_num()] += (x2 - x1) * (y1 + y2) * 0.5;
  }
  double sm = 0;
  for (i = 0; i < 1000; i++)
    sm += smi[i];
  printf("%.12f\n\n", sm * 4);
  for (i = 0; i < 10; i++) {
    printf("%.12f\n", 4 * smi[i]);
  }
  return 0;
}
```