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

```asm
<neuralops_omp_caffe_maxpool2d_bwd>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x18,%rsp
  mov    %rdi,-0x68(%rbp)
  mov    %rsi,-0x70(%rbp)
  mov    %rdx,-0x78(%rbp)
  mov    %rcx,-0x80(%rbp)
  mov    %r8,-0x88(%rbp)
  mov    %r9,-0x90(%rbp)
  mov    -0x70(%rbp),%rax
  imul   -0x78(%rbp),%rax
  imul   -0x80(%rbp),%rax
  mov    -0x68(%rbp),%rdx
  imul   %rdx,%rax
  mov    %rax,-0x18(%rbp)
  movq   $0x0,-0x58(%rbp)
  jmp    L40
L87:
  mov    -0x58(%rbp),%rax
  lea    0x0(,%rax,4),%rdx
  mov    0x20(%rbp),%rax
  add    %rdx,%rax
  pxor   %xmm0,%xmm0
  movss  %xmm0,(%rax)
  addq   $0x1,-0x58(%rbp)
L40:
  mov    -0x58(%rbp),%rax
  cmp    -0x18(%rbp),%rax
  jb     L87
  movq   $0x0,-0x50(%rbp)
  jmp    L77
L30:
  mov    -0x50(%rbp),%rax
  imul   -0x70(%rbp),%rax
  imul   -0x78(%rbp),%rax
  imul   -0x80(%rbp),%rax
  lea    0x0(,%rax,4),%rdx
  mov    0x20(%rbp),%rax
  add    %rdx,%rax
  mov    %rax,-0x48(%rbp)
  mov    -0x50(%rbp),%rax
  imul   -0x88(%rbp),%rax
  imul   -0x90(%rbp),%rax
  imul   -0x80(%rbp),%rax
  lea    0x0(,%rax,8),%rdx
  mov    0x10(%rbp),%rax
  add    %rdx,%rax
  mov    %rax,-0x40(%rbp)
  mov    -0x50(%rbp),%rax
  imul   -0x88(%rbp),%rax
  imul   -0x90(%rbp),%rax
  imul   -0x80(%rbp),%rax
  lea    0x0(,%rax,4),%rdx
  mov    0x18(%rbp),%rax
  add    %rdx,%rax
  mov    %rax,-0x38(%rbp)
  movq   $0x0,-0x30(%rbp)
  jmp    L12
L2:
  movq   $0x0,-0x28(%rbp)
  jmp    L51
L57:
  movq   $0x0,-0x20(%rbp)
  jmp    L1
L89:
  mov    -0x28(%rbp),%rax
  imul   -0x88(%rbp),%rax
  mov    %rax,%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  mov    %rax,-0x10(%rbp)
  mov    -0x10(%rbp),%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  mov    %rax,-0x8(%rbp)
  mov    -0x8(%rbp),%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm1
  mov    -0x10(%rbp),%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm0
  mov    -0x8(%rbp),%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  addss  %xmm1,%xmm0
  movss  %xmm0,(%rax)
  addq   $0x1,-0x20(%rbp)
L1:
  mov    -0x20(%rbp),%rax
  cmp    -0x88(%rbp),%rax
  jb     L89
  addq   $0x1,-0x28(%rbp)
L51:
  mov    -0x28(%rbp),%rax
  cmp    -0x90(%rbp),%rax
  jb     L57
  mov    -0x70(%rbp),%rax
  imul   -0x78(%rbp),%rax
  shl    $0x2,%rax
  add    %rax,-0x48(%rbp)
  mov    -0x88(%rbp),%rax
  imul   -0x90(%rbp),%rax
  shl    $0x3,%rax
  add    %rax,-0x40(%rbp)
  mov    -0x88(%rbp),%rax
  imul   -0x90(%rbp),%rax
  shl    $0x2,%rax
  add    %rax,-0x38(%rbp)
  addq   $0x1,-0x30(%rbp)
L12:
  mov    -0x30(%rbp),%rax
  cmp    -0x80(%rbp),%rax
  jb     L2
  addq   $0x1,-0x50(%rbp)
L77:
  mov    -0x50(%rbp),%rax
  cmp    -0x68(%rbp),%rax
  jb     L30
  nop
  nop
  leave
  ret
```

assistant: ```c
void neuralops_omp_caffe_maxpool2d_bwd(size_t batch_sz, size_t in_width, size_t in_height, size_t chan, size_t out_width, size_t out_height, const uint32_t *mask_buf, const float *out_grad, float *in_grad, size_t kernel_w_, size_t kernel_h_, size_t stride_w_, size_t stride_h_, size_t pad_w_, size_t pad_h_) {
  size_t bottom_count = in_width * in_height * chan * batch_sz;
#pragma omp parallel for
  for (size_t i = 0; i < bottom_count; i++) {
    in_grad[i] = 0.0f;
  }
#pragma omp parallel for private(in_grad)
  for (size_t n = 0; n < batch_sz; n++) {
    float *bottom_diff = in_grad + n * in_width * in_height * chan;
    const uint32_t *top_mask = mask_buf + n * out_width * out_height * chan;
    const float *top_diff = out_grad + n * out_width * out_height * chan;
    for (size_t c = 0; c < chan; ++c) {
      for (size_t ph = 0; ph < out_height; ++ph) {
        for (size_t pw = 0; pw < out_width; ++pw) {
          size_t index = ph * out_width + pw;
          uint32_t bottom_index = top_mask[index];
          bottom_diff[bottom_index] += top_diff[index];
        }
      }
      bottom_diff += in_width * in_height;
      top_mask += out_width * out_height;
      top_diff += out_width * out_height;
    }
  }
}
```