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

```asm
<busyloop>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x60,%rsp
  mov    %edi,-0x44(%rbp)
  mov    %esi,-0x48(%rbp)
  mov    %rdx,-0x50(%rbp)
  mov    %rcx,-0x58(%rbp)
  mov    %r8,-0x60(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movl   $0x0,-0x24(%rbp)
  lea    -0x34(%rbp),%rax
  mov    $0x0,%esi
  mov    %rax,%rdi
  call   <gettimeofday@plt>
  mov    -0x34(%rbp),%eax
  mov    %eax,-0x14(%rbp)
  mov    -0x34(%rbp),%eax
  mov    %eax,-0x20(%rbp)
  movl   $0x0,-0x1c(%rbp)
  jmp    L99
L20:
  addl   $0x1,-0x24(%rbp)
  movl   $0x0,-0x18(%rbp)
  movl   $0x0,-0x30(%rbp)
  jmp    L57
L37:
  mov    -0x30(%rbp),%eax
  imul   -0x48(%rbp),%eax
  mov    %eax,-0x10(%rbp)
  movl   $0x0,-0x2c(%rbp)
  jmp    L3
L42:
  mov    -0x2c(%rbp),%eax
  imul   -0x48(%rbp),%eax
  mov    %eax,-0xc(%rbp)
  mov    -0x18(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x60(%rbp),%rax
  add    %rdx,%rax
  pxor   %xmm0,%xmm0
  movsd  %xmm0,(%rax)
  movl   $0x0,-0x28(%rbp)
  jmp    L45
L19:
  mov    -0x18(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x60(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  mov    -0x10(%rbp),%edx
  mov    -0x28(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x50(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm2
  mov    -0x28(%rbp),%edx
  mov    -0xc(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x58(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mulsd  %xmm2,%xmm0
  mov    -0x18(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x60(%rbp),%rax
  add    %rdx,%rax
  addsd  %xmm1,%xmm0
  movsd  %xmm0,(%rax)
  addl   $0x1,-0x28(%rbp)
L45:
  mov    -0x28(%rbp),%eax
  cmp    -0x48(%rbp),%eax
  jl     L19
  addl   $0x1,-0x18(%rbp)
  addl   $0x1,-0x2c(%rbp)
L3:
  mov    -0x2c(%rbp),%eax
  cmp    -0x48(%rbp),%eax
  jl     L42
  addl   $0x1,-0x30(%rbp)
L57:
  mov    -0x30(%rbp),%eax
  cmp    -0x48(%rbp),%eax
  jl     L37
  lea    -0x34(%rbp),%rax
  mov    $0x0,%esi
  mov    %rax,%rdi
  call   <gettimeofday@plt>
  mov    -0x34(%rbp),%eax
  mov    %eax,-0x20(%rbp)
  mov    -0x20(%rbp),%eax
  cmp    -0x14(%rbp),%eax
  jge    L93
  addl   $0xf4240,-0x20(%rbp)
L93:
  mov    -0x20(%rbp),%eax
  sub    -0x14(%rbp),%eax
  mov    %eax,-0x1c(%rbp)
L99:
  mov    -0x1c(%rbp),%eax
  cmp    -0x44(%rbp),%eax
  jl     L20
  mov    -0x1c(%rbp),%eax
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L77
  call   <__stack_chk_fail@plt>
L77:
  leave
  ret
```

assistant: ```c
int busyloop(int burn, int nxny, double *m1, double *m2, double *m1m2) {
  int i, j, k;
  int iters = 0;
  struct timeval tv;
  gettimeofday(&tv, NULL);
  int loopstart = tv.tv_usec;
  int curtime = tv.tv_usec;
  int busy = 0;
  int nxny_x, ioff, joff;
  while (busy < burn) {
    iters++;
    nxny_x = 0;
    for (i = 0; i < nxny; i++) {
      ioff = i * nxny;
      for (j = 0; j < nxny; j++) {
        joff = j * nxny;
        m1m2[nxny_x] = 0;
        for (k = 0; k < nxny; k++) {
          m1m2[nxny_x] += m1[ioff + k] * m2[k + joff];
        }
        nxny_x++;
      }
    }
    gettimeofday(&tv, NULL);
    curtime = tv.tv_usec;
    if (curtime < loopstart)
      curtime += 1000000;
    busy = (curtime - loopstart);
  }
  return busy;
}
```