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

```asm
<mmx_blur16>:
  endbr64
  push   %r15
  push   %r14
  mov    %r8d,%r14d
  push   %r13
  push   %r12
  mov    %esi,%r12d
  push   %rbp
  mov    %edx,%ebp
  push   %rbx
  sub    $0x18,%rsp
  mov    %rdi,(%rsp)
  mov    %ecx,0xc(%rsp)
  test   %edx,%edx
  jle    L49
  movslq 0xc(%rsp),%r13
  mov    %rdi,%r15
  xor    %ebx,%ebx
  add    %r13,%r13
  nopl   0x0(%rax,%rax,1)
L52:
  mov    %r15,%rdi
  mov    %r14d,%edx
  mov    %r12d,%esi
  add    $0x1,%ebx
  call   <mmx16_blurrow@plt>
  add    %r13,%r15
  cmp    %ebx,%ebp
  jne    L52
L49:
  test   %r12d,%r12d
  je     L35
  testb  $0x2,(%rsp)
  jne    L73
  cmp    $0x1,%r12d
  jle    L43
L125:
  mov    0xc(%rsp),%eax
  lea    (%rax,%rax,1),%r15d
  testb  $0x3,(%rsp)
  jne    L75
  cmp    $0x3,%r12d
  jle    L117
L115:
  mov    (%rsp),%rbx
  mov    %r12d,%r13d
  nopl   0x0(%rax)
L71:
  mov    %rbx,%rdi
  mov    %r14d,%ecx
  mov    %r15d,%edx
  mov    %ebp,%esi
  call   <mmx16_blurcol_4@plt>
  sub    $0x4,%r13d
  add    $0x8,%rbx
  cmp    $0x3,%r13d
  jg     L71
  lea    -0x4(%r12),%esi
  mov    $0x8,%edi
  mov    %esi,%eax
  shr    $0x2,%eax
  lea    0x1(%rax),%ecx
  shl    $0x3,%rcx
  cmp    $0x3,%r12d
  cmovle %rdi,%rcx
  neg    %eax
  add    %rcx,(%rsp)
  xor    %ecx,%ecx
  shl    $0x2,%eax
  cmp    $0x3,%r12d
  cmovle %ecx,%eax
  lea    (%rax,%rsi,1),%r12d
L34:
  cmp    $0x1,%r12d
  jle    L43
L117:
  mov    (%rsp),%rbx
  mov    %r14d,%ecx
  mov    %r15d,%edx
  mov    %ebp,%esi
  sub    $0x2,%r12d
  mov    %rbx,%rdi
  call   <mmx16_blurcol_2@plt>
  mov    %rbx,%rax
  add    $0x4,%rax
  mov    %rax,(%rsp)
L43:
  test   %r12d,%r12d
  je     L35
  mov    0xc(%rsp),%edx
  mov    (%rsp),%rdi
  add    $0x18,%rsp
  mov    %r14d,%ecx
  pop    %rbx
  mov    %ebp,%esi
  pop    %rbp
  add    %edx,%edx
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    10b0 <mmx16_blurcol@plt>
  nopw   0x0(%rax,%rax,1)
L35:
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopw   0x0(%rax,%rax,1)
L75:
  mov    (%rsp),%rbx
  mov    %r14d,%ecx
  mov    %r15d,%edx
  mov    %ebp,%esi
  sub    $0x2,%r12d
  mov    %rbx,%rdi
  call   <mmx16_blurcol_2@plt>
  mov    %rbx,%rax
  add    $0x4,%rax
  mov    %rax,(%rsp)
  cmp    $0x3,%r12d
  jg     L115
  jmp    L34
  nopw   0x0(%rax,%rax,1)
L73:
  mov    (%rsp),%rdi
  mov    0xc(%rsp),%eax
  mov    %r14d,%ecx
  mov    %ebp,%esi
  sub    $0x1,%r12d
  lea    0x2(%rdi),%rbx
  lea    (%rax,%rax,1),%edx
  call   <mmx16_blurcol@plt>
  mov    %rbx,(%rsp)
  cmp    $0x1,%r12d
  jg     L125
  jmp    L43
```

assistant: ```c
void mmx_blur16(unsigned short *img, int width, int height, int step_width, int alpha32) {
  int row, col;
  int ii;
  for (row = 0; row < height; ++row)
    mmx16_blurrow(img + row * step_width, width, alpha32);
  if (width && (unsigned int)img & 0x2) {
    mmx16_blurcol(img++, height, step_width * 2, alpha32);
    width--;
  }
  if (width >= 2 && (unsigned int)img & 0x3) {
    mmx16_blurcol_2(img, height, step_width * 2, alpha32);
    img += 2;
    width -= 2;
  }
  while (width >= 4) {
    mmx16_blurcol_4(img, height, step_width * 2, alpha32);
    img += 4;
    width -= 4;
  }
  if (width >= 2) {
    mmx16_blurcol_2(img, height, step_width * 2, alpha32);
    img += 2;
    width -= 2;
  }
  if (width) {
    mmx16_blurcol(img, height, step_width * 2, alpha32);
    img += 1;
    width -= 1;
  }
}
```