user: Please show me the C implementation that matches the assembly code listed below:

```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)
L10:
  divsd  D12(%rip),%xmm2
  movapd %xmm2,%xmm1
  add    $0x1,%ebp
  pxor   %xmm2,%xmm2
  movapd %xmm1,%xmm3
  cvtsi2sd %ebp,%xmm2
  movsd  D51(%rip),%xmm0
  movsd  %xmm1,0x20(%rsp)
  mulsd  %xmm1,%xmm3
  movapd %xmm2,%xmm4
  movsd  %xmm2,0x28(%rsp)
  divsd  D12(%rip),%xmm4
  movsd  %xmm4,0x8(%rsp)
  subsd  %xmm3,%xmm0
  cvttsd2si %xmm0,%edi
  call   <sqrt@plt>
  movsd  0x8(%rsp),%xmm4
  movsd  D51(%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  D18(%rip),%xmm0
  addsd  0x30(%rsp,%rax,8),%xmm0
  movsd  %xmm0,0x30(%rsp,%rax,8)
  jne    L10
  mov    %rbx,%rbp
  lea    0x1f70(%rsp),%rdx
  pxor   %xmm0,%xmm0
  mov    %rbx,%rax
  nopl   0x0(%rax)
L35:
  addsd  (%rax),%xmm0
  add    $0x8,%rax
  cmp    %rdx,%rax
  jne    L35
  mulsd  D33(%rip),%xmm0
  lea    D44(%rip),%rdi
  add    $0x50,%rbx
  lea    D8(%rip),%r12
  cvttsd2si %xmm0,%esi
  call   <printf@plt>
  nopl   0x0(%rax,%rax,1)
L13:
  movsd  D33(%rip),%xmm0
  mulsd  0x0(%rbp),%xmm0
  mov    %r12,%rdi
  add    $0x8,%rbp
  cvttsd2si %xmm0,%esi
  call   <printf@plt>
  cmp    %rbp,%rbx
  jne    L13
  mov    0x1f78(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L17
  add    $0x1f80,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
L17:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: disassemble_data
arguments: data_tag: D12
datatype: f32[2]
name: disassemble_data
arguments: data_tag: D51
datatype: f64
name: disassemble_data
arguments: data_tag: D18
datatype: f64
name: disassemble_data
arguments: data_tag: D33
datatype: f32[2]
name: disassemble_data
arguments: data_tag: D44
datatype: string
name: disassemble_data
arguments: data_tag: D8
datatype: string

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

tool: D51: 1

tool: D18: 0.5

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

tool: D44: %.12f



tool: D8: %.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;
}
```