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

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x60,%rsp
  mov    %edi,-0x54(%rbp)
  mov    %rsi,-0x60(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  cmpl   $0x1,-0x54(%rbp)
  jg     L57
  mov    -0x60(%rbp),%rax
  mov    (%rax),%rax
  mov    %rax,%rsi
  lea    D6(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    $0x0,%eax
  jmp    L5
L57:
  cmpl   $0x3,-0x54(%rbp)
  jne    L85
  mov    -0x60(%rbp),%rax
  add    $0x10,%rax
  mov    (%rax),%rax
  mov    %rax,%rdi
  call   <atoi@plt>
  mov    %eax,-0x48(%rbp)
  cmpl   $0x0,-0x48(%rbp)
  jg     L36
  mov    -0x48(%rbp),%eax
  mov    %eax,%esi
  lea    D63(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    $0xffffffff,%eax
  jmp    L5
L85:
  movl   $0x64,-0x48(%rbp)
L36:
  mov    $0x800000,%edi
  call   <sqrt@plt>
  mov    %eax,-0x44(%rbp)
  mov    -0x44(%rbp),%eax
  imul   %eax,%eax
  shl    $0x2,%eax
  mov    %eax,%edi
  call   <malloc@plt>
  mov    %rax,-0x40(%rbp)
  lea    -0x30(%rbp),%rax
  mov    $0x0,%esi
  mov    %rax,%rdi
  call   <gettimeofday@plt>
  mov    -0x60(%rbp),%rax
  add    $0x8,%rax
  mov    (%rax),%rax
  lea    D79(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L28
  mov    -0x44(%rbp),%edx
  mov    -0x48(%rbp),%eax
  mov    %edx,%esi
  mov    %eax,%edi
  call   <kernel_cpu_bound@plt>
  mov    %rax,-0x38(%rbp)
  jmp    L21
L28:
  mov    -0x60(%rbp),%rax
  add    $0x8,%rax
  mov    (%rax),%rax
  lea    D57(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L56
  mov    -0x44(%rbp),%edx
  mov    -0x48(%rbp),%ecx
  mov    -0x40(%rbp),%rax
  mov    %ecx,%esi
  mov    %rax,%rdi
  call   <kernel_mem_bound@plt>
  mov    %rax,-0x38(%rbp)
  jmp    L21
L56:
  mov    -0x60(%rbp),%rax
  mov    (%rax),%rax
  mov    %rax,%rsi
  lea    D8(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
L21:
  lea    -0x20(%rbp),%rax
  mov    $0x0,%esi
  mov    %rax,%rdi
  call   <gettimeofday@plt>
  mov    -0x18(%rbp),%rax
  pxor   %xmm1,%xmm1
  cvtsi2sd %rax,%xmm1
  mov    -0x20(%rbp),%rax
  pxor   %xmm0,%xmm0
  cvtsi2sd %rax,%xmm0
  movsd  D23(%rip),%xmm2
  divsd  %xmm2,%xmm0
  addsd  %xmm1,%xmm0
  mov    -0x28(%rbp),%rax
  pxor   %xmm2,%xmm2
  cvtsi2sd %rax,%xmm2
  mov    -0x30(%rbp),%rax
  pxor   %xmm1,%xmm1
  cvtsi2sd %rax,%xmm1
  movsd  D23(%rip),%xmm3
  divsd  %xmm3,%xmm1
  addsd  %xmm2,%xmm1
  subsd  %xmm1,%xmm0
  movq   %xmm0,%rax
  movq   %rax,%xmm0
  lea    D17(%rip),%rax
  mov    %rax,%rdi
  mov    $0x1,%eax
  call   <printf@plt>
  mov    $0x0,%eax
L5:
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L94
  call   <__stack_chk_fail@plt>
L94:
  leave
  ret
```

tool_calls: name: read_data
arguments: data_tag: D6
data_type: string
name: read_data
arguments: data_tag: D63
data_type: string
name: read_data
arguments: data_tag: D79
data_type: string
name: read_data
arguments: data_tag: D57
data_type: string
name: read_data
arguments: data_tag: D8
data_type: string
name: read_data
arguments: data_tag: D23
data_type: f64
name: read_data
arguments: data_tag: D17
data_type: string

tool: D6: Invalid parameters, USAGE: %s [mem|cpu] [trials, default=100]


tool: D63: Invalid number of trials = %d


tool: D79: cpu

tool: D57: mem

tool: D8: Invalid parameters, USAGE: %s [mem|cpu]


tool: D23: 1000000

tool: D17: %f


assistant: ```c
int main(int argc, char *argv[]) {
  unsigned long long nll;
  unsigned int *big_array;
  struct timeval start, end;
  unsigned int sqrt_mem_size;
  int trials;
  if (argc < 2) {
    printf("Invalid parameters, USAGE: %s [mem|cpu] [trials, default=100]\n", argv[0]);
    return 0;
  }
  if (argc == 3) {
    trials = atoi(argv[2]);
    if (trials < 1) {
      printf("Invalid number of trials = %d\n", trials);
      return -1;
    }
  } else {
    trials = 100;
  }
  sqrt_mem_size = (unsigned int)sqrt(sizeof(int) * (((1024 * 1024) / sizeof(int)) * 8));
  big_array = (int *)malloc(sizeof(int) * sqrt_mem_size * sqrt_mem_size);
  gettimeofday(&start, NULL);
  if (strcmp(argv[1], "cpu") == 0)
    nll = kernel_cpu_bound(trials, sqrt_mem_size);
  else if (strcmp(argv[1], "mem") == 0)
    nll = kernel_mem_bound(big_array, trials, sqrt_mem_size);
  else
    printf("Invalid parameters, USAGE: %s [mem|cpu]\n", argv[0]);
  gettimeofday(&end, NULL);
  printf("%f\n", (((double)end.tv_sec + ((double)end.tv_usec / 1000000.0)) - ((double)start.tv_sec + ((double)start.tv_usec / 1000000.0))));
  return 0;
}
```