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

```asm
<main>:
  endbr64
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x50,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x48(%rsp)
  xor    %eax,%eax
  lea    0x1c(%rsp),%rcx
  lea    0x18(%rsp),%rdx
  lea    0x14(%rsp),%rsi
  lea    D85(%rip),%rdi
  call   <scanf@plt>
  mov    0x1c(%rsp),%eax
  lea    0x1(%rax),%edi
  mov    $0x4,%esi
  call   <calloc@plt>
  mov    %rax,%rbp
  mov    $0x8,%esi
  mov    0x18(%rsp),%edi
  call   <calloc@plt>
  mov    %rax,%r14
  mov    %rax,%rsi
  lea    D96(%rip),%rdi
  mov    $0x0,%eax
  call   <scanf@plt>
  movsd  (%r14),%xmm1
  movsd  %xmm1,0x8(%rsp)
  cmpl   $0x1,0x18(%rsp)
  jle    L50
  lea    0x8(%r14),%rbx
  movsd  %xmm1,(%rsp)
  mov    $0x1,%r12d
  lea    D96(%rip),%r13
L63:
  mov    %rbx,%rsi
  mov    %r13,%rdi
  mov    $0x0,%eax
  call   <scanf@plt>
  movsd  (%rbx),%xmm0
  movapd %xmm0,%xmm5
  maxsd  0x8(%rsp),%xmm5
  movsd  %xmm5,0x8(%rsp)
  minsd  (%rsp),%xmm0
  movsd  %xmm0,(%rsp)
  add    $0x1,%r12d
  add    $0x8,%rbx
  cmp    %r12d,0x18(%rsp)
  jg     L63
L33:
  movsd  (%rsp),%xmm7
  movapd %xmm7,%xmm2
  movsd  D9(%rip),%xmm1
  movapd %xmm7,%xmm0
  andpd  %xmm1,%xmm0
  movsd  D59(%rip),%xmm3
  ucomisd %xmm0,%xmm3
  jbe    L21
  cvttsd2si %xmm7,%rax
  pxor   %xmm0,%xmm0
  cvtsi2sd %rax,%xmm0
  movapd %xmm0,%xmm2
  cmpnlesd %xmm7,%xmm2
  movsd  D42(%rip),%xmm3
  andpd  %xmm3,%xmm2
  subsd  %xmm2,%xmm0
  andnpd %xmm7,%xmm1
  movapd %xmm0,%xmm2
  orpd   %xmm1,%xmm2
L21:
  movsd  %xmm2,(%rsp)
  movsd  0x8(%rsp),%xmm7
  movq   %xmm7,%r13
  movsd  D9(%rip),%xmm1
  movapd %xmm7,%xmm0
  andpd  %xmm1,%xmm0
  movsd  D59(%rip),%xmm2
  ucomisd %xmm0,%xmm2
  jbe    L83
  cvttsd2si %xmm7,%rax
  pxor   %xmm0,%xmm0
  cvtsi2sd %rax,%xmm0
  movapd %xmm7,%xmm2
  cmpnlesd %xmm0,%xmm2
  movsd  D42(%rip),%xmm3
  andpd  %xmm3,%xmm2
  addsd  %xmm2,%xmm0
  andnpd %xmm7,%xmm1
  orpd   %xmm1,%xmm0
  movq   %xmm0,%r13
L83:
  mov    %r13,%r12
  movq   %r13,%xmm1
  subsd  (%rsp),%xmm1
  pxor   %xmm0,%xmm0
  cvtsi2sdl 0x1c(%rsp),%xmm0
  divsd  %xmm0,%xmm1
  movsd  %xmm1,0x8(%rsp)
  lea    0x20(%rsp),%rdi
  mov    $0x0,%esi
  call   <gettimeofday@plt>
  mov    0x14(%rsp),%r8d
  mov    0x18(%rsp),%ecx
  mov    %r14,%rdx
  movsd  0x8(%rsp),%xmm2
  mov    0x1c(%rsp),%esi
  mov    %rbp,%rdi
  movq   %r13,%xmm1
  movsd  (%rsp),%xmm0
  call   <parallel_count@plt>
  lea    0x30(%rsp),%rdi
  mov    $0x0,%esi
  call   <gettimeofday@plt>
  lea    D94(%rip),%rbx
  movq   %r13,%xmm1
  comisd (%rsp),%xmm1
  jb     L27
L68:
  movsd  (%rsp),%xmm0
  mov    %rbx,%rdi
  mov    $0x1,%eax
  call   <printf@plt>
  movsd  (%rsp),%xmm4
  addsd  0x8(%rsp),%xmm4
  movsd  %xmm4,(%rsp)
  movq   %r12,%xmm2
  comisd %xmm4,%xmm2
  jae    L68
L27:
  mov    $0xa,%edi
  call   <putchar@plt>
  cmpl   $0x0,0x1c(%rsp)
  jle    L84
  mov    %rbp,%rbx
  mov    $0x0,%ebp
  lea    D40(%rip),%r12
L99:
  mov    (%rbx),%esi
  mov    %r12,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  add    $0x1,%ebp
  add    $0x4,%rbx
  cmp    %ebp,0x1c(%rsp)
  jg     L99
L84:
  mov    $0xa,%edi
  call   <putchar@plt>
  mov    0x38(%rsp),%rsi
  sub    0x28(%rsp),%rsi
  imul   $0xf4240,0x30(%rsp),%eax
  cltq
  add    %rax,%rsi
  imul   $0xf4240,0x20(%rsp),%eax
  cltq
  sub    %rax,%rsi
  lea    D90(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    0x48(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L72
  mov    $0x0,%eax
  add    $0x50,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
L50:
  movsd  0x8(%rsp),%xmm3
  movsd  %xmm3,(%rsp)
  jmp    L33
L72:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: extract_symbolic_data
arguments: tag: D85
type: string
name: extract_symbolic_data
arguments: tag: D96
type: string
name: extract_symbolic_data
arguments: tag: D9
type: byte[8]
name: extract_symbolic_data
arguments: tag: D59
type: byte[8]
name: extract_symbolic_data
arguments: tag: D42
type: byte[8]
name: extract_symbolic_data
arguments: tag: D94
type: string
name: extract_symbolic_data
arguments: tag: D40
type: string
name: extract_symbolic_data
arguments: tag: D90
type: string

tool: D85:  %d %d %d

tool: D96:  %lf

tool: {"D9": [0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f]}

tool: {"D59": [0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x43]}

tool: {"D42": [0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0x3f]}

tool: D94: %.2lf 

tool: D40: %d 

tool: D90: %lu


assistant: ```c
int main() {
  int nthreads, n, bins, i;
  struct timeval start, end;
  scanf(" %d %d %d", &nthreads, &n, &bins);
  int *bin = (int *)calloc(bins + 1, sizeof(int));
  double *vet = (double *)calloc(n, sizeof(double));
  double max, min;
  double gap;
  long unsigned duration;
  double j;
  scanf(" %lf", &vet[0]);
  max = min = vet[0];
  for (i = 1; i < n; i++) {
    scanf(" %lf", &vet[i]);
    if (max < vet[i]) {
      max = vet[i];
    }
    if (min > vet[i]) {
      min = vet[i];
    }
  }
  min = floor(min);
  max = ceil(max);
  gap = (max - min) / bins;
  gettimeofday(&start, NULL);
  parallel_count(min, max, bin, bins, gap, vet, n, nthreads);
  gettimeofday(&end, NULL);
  for (j = min; j <= max; j += gap) {
    printf("%.2lf ", j);
  }
  printf("\n");
  for (i = 0; i < bins; i++) {
    printf("%d ", bin[i]);
  }
  printf("\n");
  duration = ((end.tv_sec * 1000000 + end.tv_usec) - (start.tv_sec * 1000000 + start.tv_usec));
  printf("%lu\n", duration);
  return 0;
}
```