user: Please show me the C implementation that matches the assembly code listed below:

```asm
<blurYAlpha>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x28,%rsp
  mov    0x70(%rsp),%ebp
  test   %ecx,%ecx
  jle    L48
  mov    %rdi,%rbx
  mov    %esi,%r14d
  mov    %r8d,%r12d
  mov    %esi,%eax
  imul   0x60(%rsp),%eax
  cltq
  movslq %r9d,%r9
  add    %r9,%rax
  add    %rax,%rbx
  mov    %ecx,0x10(%rsp)
  lea    (%rcx,%rcx,1),%r15d
  lea    0x1(%r15),%esi
  mov    %esi,0xc(%rsp)
  lea    (%r15,%rbp,1),%edi
  call   <allocMemory@plt>
  mov    %rax,%r13
  movzbl %r12b,%r12d
  mov    %r15d,%edx
  mov    %r12d,%esi
  mov    %rax,%rdi
  call   <clearMemory@plt>
  movslq %ebp,%rdi
  add    %r13,%rdi
  mov    %r15d,%edx
  mov    %r12d,%esi
  call   <clearMemory@plt>
  mov    %ebp,%edi
  call   <allocMemory@plt>
  mov    %rax,%r12
  mov    %ebp,%edx
  mov    $0x0,%esi
  mov    %rax,%rdi
  call   <clearMemory@plt>
  mov    0x10(%rsp),%eax
  imul   %r14d,%eax
  cmpl   $0x0,0x68(%rsp)
  jle    L52
  mov    0x68(%rsp),%edx
  lea    (%rbx,%rdx,1),%rdi
  mov    %rdi,0x10(%rsp)
  cltq
  mov    %rax,0x18(%rsp)
L58:
  mov    0x18(%rsp),%rax
  lea    (%rbx,%rax,1),%rdx
  movslq %r15d,%rax
  add    %r13,%rax
  mov    %ebp,%esi
  sub    %r15d,%esi
  test   %esi,%esi
  jle    L49
  mov    %esi,%esi
  add    %rax,%rsi
  movslq %r14d,%rdi
L57:
  add    $0x1,%rax
  movzbl (%rdx),%ecx
  mov    %cl,-0x1(%rax)
  add    %rdi,%rdx
  cmp    %rsi,%rax
  jne    L57
L49:
  mov    0xc(%rsp),%ecx
  mov    %ebp,%edx
  mov    %r13,%rsi
  mov    %r12,%rdi
  call   <boxBlurAlpha@plt>
  test   %ebp,%ebp
  jle    L40
  mov    %ebp,%esi
  add    %r12,%rsi
  mov    %r12,%rax
  mov    %rbx,%rdx
  movslq %r14d,%rdi
L68:
  add    $0x1,%rax
  movzbl -0x1(%rax),%ecx
  mov    %cl,(%rdx)
  add    %rdi,%rdx
  cmp    %rax,%rsi
  jne    L68
L40:
  add    $0x1,%rbx
  cmp    %rbx,0x10(%rsp)
  jne    L58
L52:
  mov    %r12,%rdi
  call   <freeMemory@plt>
  mov    %r13,%rdi
  call   <freeMemory@plt>
L48:
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

assistant: ```c
void blurYAlpha(unsigned char *img, int width, int height, int distance, unsigned char borderAlpha, int rx, int ry, int rw, int rh) {
  if (distance < 1) {
    return;
  }
  unsigned char *src = img + (ry * width) + rx;
  int dist2 = distance << 1;
  int windowLength = dist2 + 1;
  unsigned char *lineBufferIn = allocMemory(rh + dist2);
  clearMemory(lineBufferIn, borderAlpha, dist2);
  clearMemory(lineBufferIn + rh, borderAlpha, dist2);
  unsigned char *lineBufferOut = allocMemory(rh);
  clearMemory(lineBufferOut, 0, rh);
  unsigned char *psrc;
  unsigned char *pline;
  int srcOffs = distance * width;
  int x, y;
  for (x = 0; x < rw; ++x) {
    psrc = src + srcOffs;
    pline = lineBufferIn + dist2;
    for (y = 0; y < rh - dist2; ++y) {
      *pline++ = *psrc;
      psrc += width;
    }
    boxBlurAlpha(lineBufferOut, lineBufferIn, rh, windowLength);
    psrc = src;
    pline = lineBufferOut;
    for (y = 0; y < rh; ++y) {
      *psrc = *pline++;
      psrc += width;
    }
    src++;
  }
  freeMemory(lineBufferOut);
  freeMemory(lineBufferIn);
}
```