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

```asm
<migstep>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbx
  sub    $0x98,%rsp
  mov    %rdi,-0x78(%rbp)
  mov    %rsi,-0x80(%rbp)
  mov    %edx,-0x84(%rbp)
  mov    %ecx,-0x88(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x38(%rbp)
  xor    %eax,%eax
  mov    %rsp,%rax
  mov    %rax,-0x90(%rbp)
  mov    -0x88(%rbp),%eax
  cltq
  sub    $0x1,%rax
  mov    %rax,-0x60(%rbp)
  mov    -0x88(%rbp),%eax
  cltq
  mov    %rax,-0xa0(%rbp)
  movq   $0x0,-0x98(%rbp)
  mov    -0x88(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rbx
  mov    -0x84(%rbp),%eax
  cltq
  sub    $0x1,%rax
  mov    %rax,-0x58(%rbp)
  mov    -0x88(%rbp),%eax
  cltq
  mov    %rax,%r14
  mov    $0x0,%r15d
  mov    -0x84(%rbp),%eax
  cltq
  mov    %rax,%r12
  mov    $0x0,%r13d
  mov    %r15,%rdx
  imul   %r12,%rdx
  mov    %r13,%rax
  imul   %r14,%rax
  lea    (%rdx,%rax,1),%rcx
  mov    %r14,%rax
  mul    %r12
  add    %rdx,%rcx
  mov    %rcx,%rdx
  mov    -0x88(%rbp),%eax
  cltq
  mov    %rax,%r10
  mov    $0x0,%r11d
  mov    -0x84(%rbp),%eax
  cltq
  mov    %rax,%r8
  mov    $0x0,%r9d
  mov    %r11,%rdx
  imul   %r8,%rdx
  mov    %r9,%rax
  imul   %r10,%rax
  lea    (%rdx,%rax,1),%rcx
  mov    %r10,%rax
  mul    %r8
  add    %rdx,%rcx
  mov    %rcx,%rdx
  mov    -0x88(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x84(%rbp),%eax
  cltq
  imul   %rdx,%rax
  lea    0x0(,%rax,8),%rdx
  mov    $0x10,%eax
  sub    $0x1,%rax
  add    %rdx,%rax
  mov    $0x10,%edi
  mov    $0x0,%edx
  div    %rdi
  imul   $0x10,%rax,%rax
  mov    %rax,%rcx
  and    $0xfffffffffffff000,%rcx
  mov    %rsp,%rdx
  sub    %rcx,%rdx
L41:
  cmp    %rdx,%rsp
  je     L86
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L41
L86:
  mov    %rax,%rdx
  and    $0xfff,%edx
  sub    %rdx,%rsp
  mov    %rax,%rdx
  and    $0xfff,%edx
  test   %rdx,%rdx
  je     L48
  and    $0xfff,%eax
  sub    $0x8,%rax
  add    %rsp,%rax
  orq    $0x0,(%rax)
L48:
  mov    %rsp,%rax
  add    $0x7,%rax
  shr    $0x3,%rax
  shl    $0x3,%rax
  mov    %rax,-0x50(%rbp)
  mov    -0x88(%rbp),%eax
  cltq
  mov    %eax,%edx
  mov    -0x84(%rbp),%eax
  cltq
  imul   %edx,%eax
  shl    $0x3,%eax
  mov    %eax,%edx
  mov    -0x50(%rbp),%rax
  mov    %edx,%esi
  mov    %rax,%rdi
  call   <bzero@plt>
  movl   $0x0,-0x6c(%rbp)
  jmp    L6
L46:
  movl   $0x0,-0x68(%rbp)
  jmp    L87
L7:
  movl   $0x0,-0x64(%rbp)
  jmp    L24
L61:
  mov    -0x84(%rbp),%eax
  cltq
  sub    $0x1,%rax
  mov    %rax,-0x48(%rbp)
  mov    -0x84(%rbp),%eax
  cltq
  mov    %rax,-0xb0(%rbp)
  movq   $0x0,-0xa8(%rbp)
  mov    -0x6c(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x84(%rbp),%eax
  cltq
  imul   %rdx,%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x80(%rbp),%rax
  add    %rax,%rdx
  mov    -0x64(%rbp),%eax
  cltq
  movsd  (%rdx,%rax,8),%xmm1
  mov    -0x88(%rbp),%eax
  cltq
  sub    $0x1,%rax
  mov    %rax,-0x40(%rbp)
  mov    -0x88(%rbp),%eax
  cltq
  mov    %rax,-0xc0(%rbp)
  movq   $0x0,-0xb8(%rbp)
  mov    -0x64(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x88(%rbp),%eax
  cltq
  imul   %rdx,%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x78(%rbp),%rax
  add    %rax,%rdx
  mov    -0x68(%rbp),%eax
  cltq
  movsd  (%rdx,%rax,8),%xmm0
  mulsd  %xmm0,%xmm1
  mov    %rbx,%rcx
  shr    $0x3,%rcx
  mov    -0x50(%rbp),%rax
  mov    -0x68(%rbp),%edx
  movslq %edx,%rsi
  mov    -0x6c(%rbp),%edx
  movslq %edx,%rdx
  imul   %rcx,%rdx
  add    %rsi,%rdx
  movsd  (%rax,%rdx,8),%xmm0
  mov    %rbx,%rcx
  shr    $0x3,%rcx
  addsd  %xmm1,%xmm0
  mov    -0x50(%rbp),%rax
  mov    -0x68(%rbp),%edx
  movslq %edx,%rsi
  mov    -0x6c(%rbp),%edx
  movslq %edx,%rdx
  imul   %rcx,%rdx
  add    %rsi,%rdx
  movsd  %xmm0,(%rax,%rdx,8)
  addl   $0x1,-0x64(%rbp)
L24:
  mov    -0x64(%rbp),%eax
  cmp    -0x84(%rbp),%eax
  jl     L61
  addl   $0x1,-0x68(%rbp)
L87:
  mov    -0x68(%rbp),%eax
  cmp    -0x88(%rbp),%eax
  jl     L7
  addl   $0x1,-0x6c(%rbp)
L6:
  mov    -0x6c(%rbp),%eax
  cmp    -0x84(%rbp),%eax
  jl     L46
  mov    -0x84(%rbp),%eax
  cltq
  mov    %eax,%edx
  mov    -0x88(%rbp),%eax
  cltq
  imul   %edx,%eax
  shl    $0x3,%eax
  mov    %eax,%edx
  mov    -0x50(%rbp),%rcx
  mov    -0x78(%rbp),%rax
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <memcpy@plt>
  nop
  mov    -0x90(%rbp),%rsp
  mov    -0x38(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L19
  call   <__stack_chk_fail@plt>
L19:
  lea    -0x28(%rbp),%rsp
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  pop    %rbp
  ret
```

assistant: ```c
void migstep(double *vec, const double *mig, const int nislands, const int nhap) {
  int i, j, k;
  double vec2[nislands][nhap];
  bzero(vec2, sizeof(vec2));
  for (i = 0; i < nislands; ++i)
    for (j = 0; j < nhap; ++j) {
      for (k = 0; k < nislands; ++k)
        vec2[i][j] += ((double(*)[nislands])mig)[i][k] * ((double(*)[nhap])vec)[k][j];
    }
  memcpy(vec, (double *)vec2, sizeof(double) * nislands * nhap);
  return;
}
```