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

```asm
<mmul3>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %rdi,-0x18(%rbp)
  mov    %rsi,-0x20(%rbp)
  mov    %rdx,-0x28(%rbp)
  mov    %ecx,-0x2c(%rbp)
  mov    %r8d,-0x30(%rbp)
  movl   $0x0,-0xc(%rbp)
  jmp    L29
L12:
  movl   $0x0,-0x8(%rbp)
  jmp    L31
L28:
  movl   $0x0,-0x4(%rbp)
  jmp    L59
L56:
  mov    -0xc(%rbp),%eax
  imul   -0x30(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x8(%rbp),%eax
  cltq
  add    %rdx,%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%ecx
  mov    -0xc(%rbp),%eax
  imul   -0x30(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x4(%rbp),%eax
  cltq
  add    %rdx,%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%edx
  mov    -0x4(%rbp),%eax
  imul   -0x30(%rbp),%eax
  movslq %eax,%rsi
  mov    -0x8(%rbp),%eax
  cltq
  add    %rsi,%rax
  lea    0x0(,%rax,4),%rsi
  mov    -0x20(%rbp),%rax
  add    %rsi,%rax
  mov    (%rax),%eax
  imul   %eax,%edx
  mov    -0xc(%rbp),%eax
  imul   -0x30(%rbp),%eax
  movslq %eax,%rsi
  mov    -0x8(%rbp),%eax
  cltq
  add    %rsi,%rax
  lea    0x0(,%rax,4),%rsi
  mov    -0x28(%rbp),%rax
  add    %rsi,%rax
  add    %ecx,%edx
  mov    %edx,(%rax)
  mov    -0xc(%rbp),%eax
  imul   -0x30(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x8(%rbp),%eax
  cltq
  add    %rdx,%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%ecx
  mov    -0xc(%rbp),%eax
  imul   -0x30(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x4(%rbp),%eax
  cltq
  add    %rdx,%rax
  add    $0x1,%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%edx
  mov    -0x4(%rbp),%eax
  add    $0x1,%eax
  imul   -0x30(%rbp),%eax
  movslq %eax,%rsi
  mov    -0x8(%rbp),%eax
  cltq
  add    %rsi,%rax
  lea    0x0(,%rax,4),%rsi
  mov    -0x20(%rbp),%rax
  add    %rsi,%rax
  mov    (%rax),%eax
  imul   %eax,%edx
  mov    -0xc(%rbp),%eax
  imul   -0x30(%rbp),%eax
  movslq %eax,%rsi
  mov    -0x8(%rbp),%eax
  cltq
  add    %rsi,%rax
  lea    0x0(,%rax,4),%rsi
  mov    -0x28(%rbp),%rax
  add    %rsi,%rax
  add    %ecx,%edx
  mov    %edx,(%rax)
  mov    -0xc(%rbp),%eax
  imul   -0x30(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x8(%rbp),%eax
  cltq
  add    %rdx,%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%ecx
  mov    -0xc(%rbp),%eax
  imul   -0x30(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x4(%rbp),%eax
  cltq
  add    %rdx,%rax
  add    $0x2,%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%edx
  mov    -0x4(%rbp),%eax
  add    $0x2,%eax
  imul   -0x30(%rbp),%eax
  movslq %eax,%rsi
  mov    -0x8(%rbp),%eax
  cltq
  add    %rsi,%rax
  lea    0x0(,%rax,4),%rsi
  mov    -0x20(%rbp),%rax
  add    %rsi,%rax
  mov    (%rax),%eax
  imul   %eax,%edx
  mov    -0xc(%rbp),%eax
  imul   -0x30(%rbp),%eax
  movslq %eax,%rsi
  mov    -0x8(%rbp),%eax
  cltq
  add    %rsi,%rax
  lea    0x0(,%rax,4),%rsi
  mov    -0x28(%rbp),%rax
  add    %rsi,%rax
  add    %ecx,%edx
  mov    %edx,(%rax)
  mov    -0xc(%rbp),%eax
  imul   -0x30(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x8(%rbp),%eax
  cltq
  add    %rdx,%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%ecx
  mov    -0xc(%rbp),%eax
  imul   -0x30(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x4(%rbp),%eax
  cltq
  add    %rdx,%rax
  add    $0x3,%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%edx
  mov    -0x4(%rbp),%eax
  add    $0x3,%eax
  imul   -0x30(%rbp),%eax
  movslq %eax,%rsi
  mov    -0x8(%rbp),%eax
  cltq
  add    %rsi,%rax
  lea    0x0(,%rax,4),%rsi
  mov    -0x20(%rbp),%rax
  add    %rsi,%rax
  mov    (%rax),%eax
  imul   %eax,%edx
  mov    -0xc(%rbp),%eax
  imul   -0x30(%rbp),%eax
  movslq %eax,%rsi
  mov    -0x8(%rbp),%eax
  cltq
  add    %rsi,%rax
  lea    0x0(,%rax,4),%rsi
  mov    -0x28(%rbp),%rax
  add    %rsi,%rax
  add    %ecx,%edx
  mov    %edx,(%rax)
  addl   $0x4,-0x4(%rbp)
L59:
  mov    -0x4(%rbp),%eax
  cmp    -0x30(%rbp),%eax
  jl     L56
  addl   $0x1,-0x8(%rbp)
L31:
  mov    -0x8(%rbp),%eax
  cmp    -0x30(%rbp),%eax
  jl     L28
  addl   $0x1,-0xc(%rbp)
L29:
  mov    -0xc(%rbp),%eax
  cmp    -0x2c(%rbp),%eax
  jl     L12
  nop
  nop
  pop    %rbp
  ret
```

assistant: ```c
void mmul3(int *a, int *b, int *res, int h, int w) {
  for (int i = 0; i < h; i++) {
    for (int j = 0; j < w; j++) {
      for (int k = 0; k < w; k += 4) {
        (res + i * w)[j] += (a + i * w)[k] * (b + k * w)[j];
        (res + i * w)[j] += (a + i * w)[k + 1] * (b + (k + 1) * w)[j];
        (res + i * w)[j] += (a + i * w)[k + 2] * (b + (k + 2) * w)[j];
        (res + i * w)[j] += (a + i * w)[k + 3] * (b + (k + 3) * w)[j];
      }
    }
  }
}
```