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

```asm
<main>:
  endbr64
  push   %rbx
  sub    $0x40,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x38(%rsp)
  xor    %eax,%eax
  cmp    $0x1,%edi
  jg     L16
L24:
  movsd  D46(%rip),%xmm0
  lea    D65(%rip),%rdi
  call   <printf@plt>
  lea    0x10(%rsp),%rdi
  mov    $0x0,%esi
  call   <gettimeofday@plt>
  movsd  D20(%rip),%xmm7
  movsd  %xmm7,0x8(%rsp)
  mov    $0xf4240,%ebx
L2:
  mov    $0x0,%eax
  pxor   %xmm7,%xmm7
  movsd  %xmm7,(%rsp)
  movsd  D85(%rip),%xmm4
  movsd  D0(%rip),%xmm3
  movsd  D56(%rip),%xmm2
L48:
  pxor   %xmm0,%xmm0
  cvtsi2sd %rax,%xmm0
  addsd  %xmm4,%xmm0
  mulsd  0x8(%rsp),%xmm0
  mulsd  %xmm0,%xmm0
  addsd  %xmm3,%xmm0
  movapd %xmm2,%xmm1
  divsd  %xmm0,%xmm1
  addsd  (%rsp),%xmm1
  movsd  %xmm1,(%rsp)
  add    $0x1,%rax
  cmp    %rbx,%rax
  jl     L48
  lea    0x20(%rsp),%rdi
  mov    $0x0,%esi
  call   <gettimeofday@plt>
  movsd  (%rsp),%xmm0
  mulsd  0x8(%rsp),%xmm0
  lea    D40(%rip),%rdi
  call   <printf@plt>
  mov    0x20(%rsp),%rax
  sub    0x10(%rsp),%rax
  pxor   %xmm0,%xmm0
  cvtsi2sd %rax,%xmm0
  divsd  D46(%rip),%xmm0
  mov    0x28(%rsp),%rax
  sub    0x18(%rsp),%rax
  pxor   %xmm1,%xmm1
  cvtsi2sd %rax,%xmm1
  addsd  %xmm1,%xmm0
  lea    D73(%rip),%rdi
  call   <printf@plt>
  mov    0x38(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L20
  mov    $0x0,%eax
  add    $0x40,%rsp
  pop    %rbx
  ret
L16:
  mov    0x8(%rsi),%rdi
  call   <atoll@plt>
  mov    %rax,%rbx
  cmp    $0x63,%rax
  jle    L24
  pxor   %xmm7,%xmm7
  cvtsi2sd %rax,%xmm7
  movsd  %xmm7,(%rsp)
  movapd %xmm7,%xmm0
  lea    D65(%rip),%rdi
  call   <printf@plt>
  lea    0x10(%rsp),%rdi
  mov    $0x0,%esi
  call   <gettimeofday@plt>
  movsd  D0(%rip),%xmm0
  movapd %xmm0,%xmm2
  divsd  (%rsp),%xmm2
  movsd  %xmm2,0x8(%rsp)
  jmp    L2
L20:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: read_data
arguments: label: D46
type_guessed: f64
name: read_data
arguments: label: D65
type_guessed: string
name: read_data
arguments: label: D20
type_guessed: byte[8]
name: read_data
arguments: label: D85
type_guessed: f64
name: read_data
arguments: label: D0
type_guessed: f64
name: read_data
arguments: label: D56
type_guessed: f64
name: read_data
arguments: label: D40
type_guessed: string
name: read_data
arguments: label: D73
type_guessed: string

tool: D46: 1000000

tool: D65: 
num_steps = %lld


tool: {"D20": [0x8d,0xed,0xb5,0xa0,0xf7,0xc6,0xb0,0x3e]}

tool: D85: 0.5

tool: D0: 1

tool: D56: 4

tool: D40: PI = %f


tool: D73: Time : %lf sec


assistant: ```c
int main(int argc, char **argv) {
  double x, sum, step;
  long long i, num_steps = 1000000;
  struct timeval start, end;
  if (argc > 1)
    num_steps = atoll(argv[1]);
  if (num_steps < 100)
    num_steps = 1000000;
  printf("\nnum_steps = %lld\n", num_steps);
  gettimeofday(&start, NULL);
  sum = 0.0;
  step = 1.0 / (double)num_steps;
  for (i = 0; i < num_steps; i++) {
    x = (i + 0.5) * step;
    sum += 4.0 / (1.0 + x * x);
  }
  gettimeofday(&end, NULL);
  printf("PI = %f\n", sum * step);
  printf("Time : %lf sec\n", (double)(end.tv_sec - start.tv_sec) + (double)(end.tv_usec - start.tv_usec) / 1000000.0);
  return 0;
}
```