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

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0xc0,%rsp
  mov    %edi,-0xa4(%rbp)
  mov    %rsi,-0xb0(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  lea    -0x40(%rbp),%rax
  mov    $0x0,%esi
  mov    %rax,%rdi
  call   <gettimeofday@plt>
  cmpl   $0x1,-0xa4(%rbp)
  jg     L255
  lea    D16(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  mov    $0xffffffff,%edi
  call   <exit@plt>
L255:
  mov    -0xb0(%rbp),%rax
  add    $0x8,%rax
  mov    (%rax),%rax
  mov    %rax,%rdi
  call   <atoi@plt>
  mov    %eax,-0x8c(%rbp)
  mov    -0x8c(%rbp),%eax
  cltq
  shl    $0x3,%eax
  mov    %eax,%edi
  call   <malloc@plt>
  mov    %rax,-0x80(%rbp)
  mov    -0x8c(%rbp),%eax
  cltq
  shl    $0x3,%eax
  mov    %eax,%edi
  call   <malloc@plt>
  mov    %rax,-0x78(%rbp)
  mov    -0x8c(%rbp),%eax
  cltq
  shl    $0x3,%eax
  mov    %eax,%edi
  call   <malloc@plt>
  mov    %rax,-0x70(%rbp)
  mov    -0x8c(%rbp),%eax
  cltq
  shl    $0x3,%eax
  mov    %eax,%edi
  call   <malloc@plt>
  mov    %rax,-0x68(%rbp)
  mov    -0x8c(%rbp),%eax
  imul   %eax,%eax
  cltq
  shl    $0x3,%eax
  mov    %eax,%edi
  call   <malloc@plt>
  mov    %rax,-0x60(%rbp)
  mov    -0x8c(%rbp),%eax
  imul   %eax,%eax
  cltq
  shl    $0x3,%eax
  mov    %eax,%edi
  call   <malloc@plt>
  mov    %rax,-0x58(%rbp)
  mov    -0x8c(%rbp),%eax
  imul   %eax,%eax
  cltq
  shl    $0x3,%eax
  mov    %eax,%edi
  call   <malloc@plt>
  mov    %rax,-0x50(%rbp)
  mov    -0x8c(%rbp),%eax
  imul   %eax,%eax
  cltq
  shl    $0x3,%eax
  mov    %eax,%edi
  call   <malloc@plt>
  mov    %rax,-0x48(%rbp)
  movl   $0x0,-0x9c(%rbp)
  jmp    L261
L379:
  mov    -0x9c(%rbp),%eax
  imul   -0x8c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rcx
  mov    -0x9c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x80(%rbp),%rax
  add    %rdx,%rax
  mov    -0x60(%rbp),%rdx
  add    %rcx,%rdx
  mov    %rdx,(%rax)
  addl   $0x1,-0x9c(%rbp)
L261:
  mov    -0x9c(%rbp),%eax
  cmp    -0x8c(%rbp),%eax
  jl     L379
  movl   $0x0,-0x9c(%rbp)
  jmp    L257
L100:
  mov    -0x9c(%rbp),%eax
  imul   -0x8c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rcx
  mov    -0x9c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x78(%rbp),%rax
  add    %rdx,%rax
  mov    -0x58(%rbp),%rdx
  add    %rcx,%rdx
  mov    %rdx,(%rax)
  addl   $0x1,-0x9c(%rbp)
L257:
  mov    -0x9c(%rbp),%eax
  cmp    -0x8c(%rbp),%eax
  jl     L100
  movl   $0x0,-0x9c(%rbp)
  jmp    L298
L160:
  mov    -0x9c(%rbp),%eax
  imul   -0x8c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rcx
  mov    -0x9c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x70(%rbp),%rax
  add    %rdx,%rax
  mov    -0x50(%rbp),%rdx
  add    %rcx,%rdx
  mov    %rdx,(%rax)
  addl   $0x1,-0x9c(%rbp)
L298:
  mov    -0x9c(%rbp),%eax
  cmp    -0x8c(%rbp),%eax
  jl     L160
  movl   $0x0,-0x9c(%rbp)
  jmp    L152
L365:
  mov    -0x9c(%rbp),%eax
  imul   -0x8c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rcx
  mov    -0x9c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x68(%rbp),%rax
  add    %rdx,%rax
  mov    -0x48(%rbp),%rdx
  add    %rcx,%rdx
  mov    %rdx,(%rax)
  addl   $0x1,-0x9c(%rbp)
L152:
  mov    -0x9c(%rbp),%eax
  cmp    -0x8c(%rbp),%eax
  jl     L365
  movl   $0x0,-0x9c(%rbp)
  jmp    L90
L349:
  movl   $0x0,-0x98(%rbp)
  jmp    L199
L93:
  mov    -0x9c(%rbp),%edx
  mov    -0x98(%rbp),%eax
  add    %edx,%eax
  pxor   %xmm3,%xmm3
  cvtsi2sd %eax,%xmm3
  movsd  %xmm3,-0xb8(%rbp)
  mov    $0x0,%eax
  call   <rand@plt>
  pxor   %xmm0,%xmm0
  cvtsi2sd %rax,%xmm0
  mov    -0x9c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x80(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x98(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  mulsd  -0xb8(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  addl   $0x1,-0x98(%rbp)
L199:
  mov    -0x98(%rbp),%eax
  cmp    -0x8c(%rbp),%eax
  jl     L93
  addl   $0x1,-0x9c(%rbp)
L90:
  mov    -0x9c(%rbp),%eax
  cmp    -0x8c(%rbp),%eax
  jl     L349
  movl   $0x0,-0x9c(%rbp)
  jmp    L99
L145:
  movl   $0x0,-0x98(%rbp)
  jmp    L297
L214:
  mov    -0x9c(%rbp),%eax
  imul   -0x98(%rbp),%eax
  pxor   %xmm4,%xmm4
  cvtsi2sd %eax,%xmm4
  movsd  %xmm4,-0xb8(%rbp)
  mov    $0x0,%eax
  call   <rand@plt>
  pxor   %xmm0,%xmm0
  cvtsi2sd %rax,%xmm0
  mov    -0x9c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x78(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x98(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  mulsd  -0xb8(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  addl   $0x1,-0x98(%rbp)
L297:
  mov    -0x98(%rbp),%eax
  cmp    -0x8c(%rbp),%eax
  jl     L214
  addl   $0x1,-0x9c(%rbp)
L99:
  mov    -0x9c(%rbp),%eax
  cmp    -0x8c(%rbp),%eax
  jl     L145
  movl   $0x0,-0x9c(%rbp)
  jmp    L64
L315:
  movl   $0x0,-0x98(%rbp)
  jmp    L141
L234:
  mov    -0x9c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x70(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x98(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  pxor   %xmm0,%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x9c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x68(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x98(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  pxor   %xmm0,%xmm0
  movsd  %xmm0,(%rax)
  addl   $0x1,-0x98(%rbp)
L141:
  mov    -0x98(%rbp),%eax
  cmp    -0x8c(%rbp),%eax
  jl     L234
  addl   $0x1,-0x9c(%rbp)
L64:
  mov    -0x9c(%rbp),%eax
  cmp    -0x8c(%rbp),%eax
  jl     L315
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x88(%rbp)
  movl   $0x0,-0x9c(%rbp)
  jmp    L17
L317:
  movl   $0x0,-0x98(%rbp)
  jmp    L167
L32:
  mov    -0x9c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x80(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x98(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  mov    -0x9c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x78(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x98(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  addsd  %xmm1,%xmm0
  movsd  -0x88(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x88(%rbp)
  addl   $0x1,-0x98(%rbp)
L167:
  mov    -0x98(%rbp),%eax
  cmp    -0x8c(%rbp),%eax
  jl     L32
  addl   $0x1,-0x9c(%rbp)
L17:
  mov    -0x9c(%rbp),%eax
  cmp    -0x8c(%rbp),%eax
  jl     L317
  movl   $0x0,-0x9c(%rbp)
  jmp    L344
L7:
  movl   $0x0,-0x98(%rbp)
  jmp    L354
L61:
  movl   $0x0,-0x94(%rbp)
  jmp    L321
L183:
  mov    -0x9c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x70(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x98(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  mov    -0x9c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x80(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x94(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm2
  mov    -0x94(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x78(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x98(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mulsd  %xmm2,%xmm0
  mov    -0x9c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x70(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x98(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  addsd  %xmm1,%xmm0
  movsd  %xmm0,(%rax)
  movl   $0x0,-0x90(%rbp)
  jmp    L111
L114:
  mov    -0x90(%rbp),%edx
  mov    -0x94(%rbp),%eax
  add    %edx,%eax
  test   %eax,%eax
  jle    L299
  mov    -0x9c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x70(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x98(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  pxor   %xmm1,%xmm1
  cvtsi2sdl -0x94(%rbp),%xmm1
  movapd %xmm1,%xmm2
  mulsd  -0x88(%rbp),%xmm2
  pxor   %xmm1,%xmm1
  cvtsi2sdl -0x90(%rbp),%xmm1
  addsd  %xmm2,%xmm1
  pxor   %xmm2,%xmm2
  cvtsi2sdl -0x94(%rbp),%xmm2
  subsd  %xmm2,%xmm1
  mov    -0x90(%rbp),%edx
  mov    -0x94(%rbp),%eax
  add    %edx,%eax
  pxor   %xmm2,%xmm2
  cvtsi2sd %eax,%xmm2
  divsd  %xmm2,%xmm1
  mov    -0x9c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x70(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x98(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  subsd  %xmm1,%xmm0
  movsd  %xmm0,(%rax)
L299:
  addl   $0x1,-0x90(%rbp)
L111:
  mov    -0x9c(%rbp),%edx
  mov    -0x8c(%rbp),%eax
  add    %eax,%edx
  mov    -0x8c(%rbp),%eax
  add    %edx,%eax
  cmp    %eax,-0x90(%rbp)
  jl     L114
  addl   $0x1,-0x94(%rbp)
L321:
  mov    -0x94(%rbp),%eax
  cmp    -0x8c(%rbp),%eax
  jl     L183
  addl   $0x1,-0x98(%rbp)
L354:
  mov    -0x98(%rbp),%eax
  cmp    -0x8c(%rbp),%eax
  jl     L61
  addl   $0x1,-0x9c(%rbp)
L344:
  mov    -0x9c(%rbp),%eax
  cmp    -0x8c(%rbp),%eax
  jl     L7
  movl   $0x0,-0x9c(%rbp)
  jmp    L305
L43:
  movl   $0x0,-0x98(%rbp)
  jmp    L293
L338:
  mov    -0x9c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x80(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x98(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  mov    -0x9c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x78(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x98(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mov    -0x9c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x68(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x98(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  addsd  %xmm1,%xmm0
  movsd  %xmm0,(%rax)
  addl   $0x1,-0x98(%rbp)
L293:
  mov    -0x98(%rbp),%eax
  cmp    -0x8c(%rbp),%eax
  jl     L338
  addl   $0x1,-0x9c(%rbp)
L305:
  mov    -0x9c(%rbp),%eax
  cmp    -0x8c(%rbp),%eax
  jl     L43
  lea    -0x30(%rbp),%rax
  mov    $0x0,%esi
  mov    %rax,%rdi
  call   <gettimeofday@plt>
  lea    -0x20(%rbp),%rdx
  lea    -0x40(%rbp),%rcx
  lea    -0x30(%rbp),%rax
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <timersub@plt>
  mov    -0x20(%rbp),%rdx
  mov    -0x18(%rbp),%rax
  mov    %rax,%rsi
  lea    D18(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    $0x0,%edi
  call   <exit@plt>
  mov    $0x0,%eax
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L350
  call   <__stack_chk_fail@plt>
L350:
  leave
  ret
```

tool_calls: name: retrieve_data
arguments: tag: D16
type_infered: string
name: retrieve_data
arguments: tag: D18
type_infered: string

tool: D16: Usage: mm matrix_size

tool: D18: %ld.%08ld


assistant: ```c
int main(int argc, char *argv[]) {
  struct timeval start_time, end_time, wall_time;
  gettimeofday(&start_time, NULL);
  int N;
  int tid, nthreads, i, j, k, l;
  double **a, **b, **c, **d, Z;
  double *a_block, *b_block, *c_block, *d_block;
  if (argc < 2) {
    printf("Usage: mm matrix_size\n");
    exit(-1);
  }
  N = atoi(argv[1]);
  a = (double **)malloc(N * sizeof(double *));
  b = (double **)malloc(N * sizeof(double *));
  c = (double **)malloc(N * sizeof(double *));
  d = (double **)malloc(N * sizeof(double *));
  a_block = (double *)malloc(N * N * sizeof(double));
  b_block = (double *)malloc(N * N * sizeof(double));
  c_block = (double *)malloc(N * N * sizeof(double));
  d_block = (double *)malloc(N * N * sizeof(double));
  for (i = 0; i < N; i++)
    a[i] = a_block + i * N;
  for (i = 0; i < N; i++)
    b[i] = b_block + i * N;
  for (i = 0; i < N; i++)
    c[i] = c_block + i * N;
  for (i = 0; i < N; i++)
    d[i] = d_block + i * N;
  for (i = 0; i < N; i++)
    for (j = 0; j < N; j++)
      a[i][j] = (i + j) * ((double)rand());
  for (i = 0; i < N; i++)
    for (j = 0; j < N; j++)
      b[i][j] = i * j * ((double)rand());
  for (i = 0; i < N; i++) {
    for (j = 0; j < N; j++) {
      c[i][j] = 0.0;
      d[i][j] = 0.0;
    }
  }
  Z = 0.0;
  for (i = 0; i < N; i++)
    for (j = 0; j < N; j++) {
      Z += a[i][j] + b[i][j];
    }
  for (i = 0; i < N; i++) {
    for (j = 0; j < N; j++) {
      for (k = 0; k < N; k++) {
        c[i][j] += a[i][k] * b[k][j];
        for (l = 0; l < i + N + N; l++) {
          if ((l + k) > 0)
            c[i][j] -= ((Z * k) + l - k) / (l + k);
        }
      }
    }
  }
  for (i = 0; i < N; i++) {
    for (j = 0; j < N; j++) {
      d[i][j] = a[i][j] + b[i][j];
    }
  }
  gettimeofday(&end_time, NULL);
  timersub(&end_time, &start_time, &wall_time);
  printf("%ld.%08ld\n", (long int)wall_time.tv_sec, (long int)wall_time.tv_usec);
  exit(0);
}
```