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

```asm
<fastBlur4>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %esi,%r11d
  mov    %edx,%r9d
  mov    %ecx,%esi
  cmp    $0x3,%ecx
  je     L352
  cmp    $0x7,%ecx
  jne    L173
  mov    $0x1,%r15d
  mov    $0x3,%ecx
L489:
  cmp    $0x3f,%esi
  jne    L2
  mov    $0x6,%ecx
  jmp    L572
L173:
  cmp    $0x1,%ecx
  sete   %cl
  movzbl %cl,%ecx
  cmp    $0xf,%esi
  jne    L224
  mov    $0x1,%r15d
  mov    $0x4,%ecx
L2:
  cmp    $0x7f,%esi
  je     L53
  test   %r15d,%r15d
  jne    L572
  lea    -0x2(%r11),%eax
  mov    %eax,-0x10(%rsp)
  lea    0x0(,%r11,4),%r10d
  lea    -0x4(,%r11,4),%eax
  mov    %eax,-0x8(%rsp)
  mov    %r10d,%ebx
  neg    %ebx
  lea    -0x1(%r9),%eax
  imul   %r11d,%eax
  shl    $0x2,%eax
  mov    %eax,-0xc(%rsp)
  mov    %r15d,-0x18(%rsp)
  lea    -0x1(%r11),%eax
  mov    %eax,-0x4(%rsp)
  lea    0x1(%rsi),%ecx
  jmp    L362
L224:
  mov    %ecx,%r15d
  jmp    L601
L352:
  mov    $0x1,%r15d
  mov    $0x2,%ecx
L601:
  cmp    $0x1f,%esi
  jne    L489
  mov    $0x5,%ecx
L572:
  lea    -0x2(%r11),%eax
  mov    %eax,-0x14(%rsp)
  lea    0x0(,%r11,4),%ebx
  lea    -0x4(,%r11,4),%eax
  mov    %eax,-0xc(%rsp)
  mov    %ebx,%ebp
  neg    %ebp
  lea    -0x1(%r9),%eax
  imul   %r11d,%eax
  shl    $0x2,%eax
  mov    %eax,-0x10(%rsp)
  movl   $0x0,-0x18(%rsp)
  lea    -0x1(%r11),%r12d
  jmp    L619
L447:
  add    $0x4,%r14d
  cmp    %r13d,%r12d
  je     L507
L33:
  add    $0x1,%r13d
  mov    %r14d,%r8d
  mov    $0x0,%r10d
  test   %r9d,%r9d
  jle    L447
L280:
  lea    0x4(%r8),%edx
  movslq %edx,%rdx
  add    %rdi,%rdx
  movslq %r8d,%rax
  movzbl (%rdi,%rax,1),%eax
  imul   %esi,%eax
  movzbl (%rdx),%r15d
  add    %r15d,%eax
  sar    %cl,%eax
  mov    %al,(%rdx)
  add    $0x1,%r10d
  add    %ebx,%r8d
  cmp    %r10d,%r9d
  jne    L280
  jmp    L447
L20:
  cmpl   $0x0,-0x14(%rsp)
  jns    L507
L229:
  test   %r11d,%r11d
  jle    L390
  mov    -0x18(%rsp),%r14d
  mov    %r11d,%r13d
  neg    %r13d
  jmp    L486
L90:
  sub    $0x4,%r14d
  sub    $0x1,%r13d
  js     L229
L84:
  mov    %r14d,%r8d
  mov    $0x0,%r10d
  test   %r9d,%r9d
  jle    L90
L240:
  lea    -0x4(%r8),%edx
  movslq %edx,%rdx
  add    %rdi,%rdx
  movslq %r8d,%rax
  movzbl (%rdi,%rax,1),%eax
  imul   %esi,%eax
  movzbl (%rdx),%r15d
  add    %r15d,%eax
  sar    %cl,%eax
  mov    %al,(%rdx)
  add    $0x1,%r10d
  add    %ebx,%r8d
  cmp    %r10d,%r9d
  jne    L240
  jmp    L90
L507:
  mov    -0x18(%rsp),%r14d
  add    -0xc(%rsp),%r14d
  mov    -0x14(%rsp),%r13d
  jmp    L84
L23:
  add    $0x4,%r14d
  add    $0x1,%r13d
  je     L390
L486:
  mov    %r14d,%r8d
  mov    $0x1,%r10d
  cmp    $0x1,%r9d
  jle    L23
L150:
  movslq %r8d,%rax
  movzbl (%rdi,%rax,1),%r15d
  imul   %esi,%r15d
  add    %ebx,%r8d
  movslq %r8d,%rdx
  add    %rdi,%rdx
  movzbl (%rdx),%eax
  add    %r15d,%eax
  sar    %cl,%eax
  mov    %al,(%rdx)
  add    $0x1,%r10d
  cmp    %r10d,%r9d
  jne    L150
  jmp    L23
L390:
  mov    %r9d,%r13d
  sub    $0x2,%r13d
  js     L557
  mov    -0x18(%rsp),%r14d
  add    -0x10(%rsp),%r14d
  jmp    L304
L324:
  sub    $0x1,%r13d
  add    %ebp,%r14d
  cmp    $0xffffffff,%r13d
  je     L557
L304:
  mov    %r14d,%r8d
  mov    $0x0,%r10d
  test   %r11d,%r11d
  jle    L324
L581:
  lea    0x0(%rbp,%r8,1),%edx
  movslq %edx,%rdx
  add    %rdi,%rdx
  movslq %r8d,%rax
  movzbl (%rdi,%rax,1),%eax
  imul   %esi,%eax
  movzbl (%rdx),%r15d
  add    %r15d,%eax
  sar    %cl,%eax
  mov    %al,(%rdx)
  add    $0x1,%r10d
  add    $0x4,%r8d
  cmp    %r10d,%r11d
  jne    L581
  jmp    L324
L557:
  addl   $0x1,-0x18(%rsp)
  mov    -0x18(%rsp),%eax
  cmp    $0x3,%eax
  je     L469
L619:
  cmp    $0x1,%r11d
  jle    L20
  mov    -0x18(%rsp),%r14d
  mov    $0x0,%r13d
  jmp    L33
L53:
  mov    $0x7,%ecx
  jmp    L572
L490:
  lea    0x4(%rbp),%r8d
  movslq %r8d,%r8
  add    %rdi,%r8
  movslq %ebp,%rax
  movzbl (%rdi,%rax,1),%eax
  imul   %esi,%eax
  movzbl (%r8),%edx
  add    %edx,%eax
  cltd
  idiv   %ecx
  mov    %al,(%r8)
  add    $0x1,%r12d
  add    %r10d,%ebp
  cmp    %r12d,%r9d
  jne    L490
L534:
  add    $0x4,%r14d
  cmp    %r13d,%r11d
  je     L310
L241:
  add    $0x1,%r13d
  mov    %r14d,%ebp
  mov    %r15d,%r12d
  test   %r9d,%r9d
  jg     L490
  jmp    L534
L129:
  cmpl   $0x0,-0x10(%rsp)
  jns    L287
L353:
  test   %r11d,%r11d
  jle    L208
  mov    -0x18(%rsp),%r14d
  mov    %r11d,%r13d
  neg    %r13d
  jmp    L482
L65:
  lea    -0x4(%rbp),%r8d
  movslq %r8d,%r8
  add    %rdi,%r8
  movslq %ebp,%rax
  movzbl (%rdi,%rax,1),%eax
  imul   %esi,%eax
  movzbl (%r8),%edx
  add    %edx,%eax
  cltd
  idiv   %ecx
  mov    %al,(%r8)
  add    $0x1,%r12d
  add    %r10d,%ebp
  cmp    %r12d,%r9d
  jne    L65
L485:
  sub    $0x4,%r14d
  sub    $0x1,%r13d
  js     L353
L127:
  mov    %r14d,%ebp
  mov    %r15d,%r12d
  test   %r9d,%r9d
  jg     L65
  jmp    L485
L310:
  mov    -0x14(%rsp),%r11d
L287:
  mov    -0x18(%rsp),%r14d
  add    -0x8(%rsp),%r14d
  mov    -0x10(%rsp),%r13d
  jmp    L127
L91:
  movslq %ebp,%rax
  movzbl (%rdi,%rax,1),%edx
  imul   %esi,%edx
  add    %r10d,%ebp
  movslq %ebp,%r8
  add    %rdi,%r8
  movzbl (%r8),%eax
  add    %edx,%eax
  cltd
  idiv   %ecx
  mov    %al,(%r8)
  add    $0x1,%r12d
  cmp    %r12d,%r9d
  jne    L91
L49:
  add    $0x4,%r14d
  add    $0x1,%r13d
  je     L208
L482:
  mov    %r14d,%ebp
  mov    $0x1,%r12d
  cmp    $0x1,%r9d
  jg     L91
  jmp    L49
L208:
  mov    %r9d,%r13d
  sub    $0x2,%r13d
  js     L568
  mov    -0x18(%rsp),%r14d
  add    -0xc(%rsp),%r14d
  jmp    L306
L93:
  lea    0x0(%rbp,%rbx,1),%r8d
  movslq %r8d,%r8
  add    %rdi,%r8
  movslq %ebp,%rax
  movzbl (%rdi,%rax,1),%eax
  imul   %esi,%eax
  movzbl (%r8),%edx
  add    %edx,%eax
  cltd
  idiv   %ecx
  mov    %al,(%r8)
  add    $0x1,%r12d
  add    $0x4,%ebp
  cmp    %r12d,%r11d
  jne    L93
L590:
  sub    $0x1,%r13d
  add    %ebx,%r14d
  cmp    $0xffffffff,%r13d
  je     L568
L306:
  mov    %r14d,%ebp
  mov    %r15d,%r12d
  test   %r11d,%r11d
  jg     L93
  jmp    L590
L568:
  addl   $0x1,-0x18(%rsp)
  mov    -0x18(%rsp),%eax
  cmp    $0x3,%eax
  je     L469
L362:
  cmp    $0x1,%r11d
  jle    L129
  mov    -0x18(%rsp),%r14d
  mov    $0x0,%r13d
  mov    %r11d,-0x14(%rsp)
  mov    -0x4(%rsp),%r11d
  jmp    L241
L469:
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

assistant: ```c
void fastBlur4(unsigned char *img, int w, int h, int size) {
  int x, y;
  int m = size;
  int divZ = 0;
  int canFastDiv = 0;
  if (size == 1)
    divZ = 1, canFastDiv = 1;
  if (size == 3)
    divZ = 2, canFastDiv = 1;
  if (size == 7)
    divZ = 3, canFastDiv = 1;
  if (size == 15)
    divZ = 4, canFastDiv = 1;
  if (size == 31)
    divZ = 5, canFastDiv = 1;
  if (size == 63)
    divZ = 6, canFastDiv = 1;
  if (size == 127)
    divZ = 7, canFastDiv = 1;
  if (canFastDiv) {
    for (int N = 0; N < 3; ++N) {
      for (x = 1; x < w; x++)
        for (y = 0; y < h; y++)
          img[((x + w * y) << 2) + N] = (m * img[((x - 1 + w * y) << 2) + N] + img[((x + w * y) << 2) + N]) >> divZ;
      for (x = w - 2; x >= 0; x--)
        for (y = 0; y < h; y++)
          img[((x + w * y) << 2) + N] = (m * img[((x + 1 + w * y) << 2) + N] + img[((x + w * y) << 2) + N]) >> divZ;
      for (x = 0; x < w; x++)
        for (y = 1; y < h; y++)
          img[((x + w * y) << 2) + N] = (m * img[((x - w + w * y) << 2) + N] + img[((x + w * y) << 2) + N]) >> divZ;
      for (y = h - 2; y >= 0; y--)
        for (x = 0; x < w; x++)
          img[((x + w * y) << 2) + N] = (m * img[((x + w + w * y) << 2) + N] + img[((x + w * y) << 2) + N]) >> divZ;
    }
    return;
  }
  for (int N = 0; N < 3; ++N) {
    for (x = 1; x < w; x++)
      for (y = 0; y < h; y++)
        img[((x + w * y) << 2) + N] = (m * img[((x - 1 + w * y) << 2) + N] + img[((x + w * y) << 2) + N]) / (m + 1);
    for (x = w - 2; x >= 0; x--)
      for (y = 0; y < h; y++)
        img[((x + w * y) << 2) + N] = (m * img[((x + 1 + w * y) << 2) + N] + img[((x + w * y) << 2) + N]) / (m + 1);
    for (x = 0; x < w; x++)
      for (y = 1; y < h; y++)
        img[((x + w * y) << 2) + N] = (m * img[((x - w + w * y) << 2) + N] + img[((x + w * y) << 2) + N]) / (m + 1);
    for (y = h - 2; y >= 0; y--)
      for (x = 0; x < w; x++)
        img[((x + w * y) << 2) + N] = (m * img[((x + w + w * y) << 2) + N] + img[((x + w * y) << 2) + N]) / (m + 1);
  }
}
```