user: 请从给定的汇编指令推导出C源代码：

```asm
<blur>:
  endbr64
  push   %r15
  mov    %rsi,%r15
  push   %r14
  push   %r13
  push   %r12
  mov    %r9,%r12
  push   %rbp
  push   %rbx
  sub    $0x88,%rsp
  mov    %rdi,0x68(%rsp)
  mov    0xc0(%rsp),%ebp
  mov    %edx,0x70(%rsp)
  mov    0xc8(%rsp),%ebx
  mov    %ecx,0xc(%rsp)
  mov    %r8d,0x74(%rsp)
  test   %ecx,%ecx
  jle    L248
  mov    0x70(%rsp),%ecx
  movslq %ebp,%rdi
  mov    0x68(%rsp),%r13
  lea    0x2(%rsi),%r11
  mov    %rdi,0x50(%rsp)
  mov    %r9,%r8
  mov    %r11,%r12
  lea    0x2(%rcx,%rcx,1),%eax
  add    %rdi,%r13
  mov    %r15,0x78(%rsp)
  mov    %eax,0x28(%rsp)
  movslq %ecx,%rax
  sub    %ebp,%ecx
  lea    0x2(%rax,%rax,1),%rax
  mov    %ecx,0x18(%rsp)
  mov    %rax,0x30(%rsp)
  movslq 0x74(%rsp),%rax
  mov    %rax,0x38(%rsp)
  mov    %rdi,%rax
  neg    %rax
  mov    %rax,0x58(%rsp)
  add    %rax,%rax
  mov    %rax,0x60(%rsp)
  xor    %eax,%eax
  test   %ebp,%ebp
  cmovns %ebp,%eax
  mov    %eax,%esi
  mov    %eax,0x20(%rsp)
  cltq
  sub    %rdi,%rax
  sub    %esi,%ecx
  mov    %rax,%rdi
  mov    %rax,0x40(%rsp)
  lea    -0x1(%rbx),%eax
  lea    (%rdi,%rax,1),%rdx
  not    %rax
  mov    %rdx,0x48(%rsp)
  mov    %ecx,%edx
  xor    %ecx,%ecx
  lea    (%rax,%rax,1),%r10
  sub    $0x1,%edx
  mov    %ecx,%r15d
  lea    0x1(%rdi,%rdx,1),%r14
  nopl   0x0(%rax)
L59:
  mov    0x28(%rsp),%edx
  xor    %esi,%esi
  lea    -0x2(%r12),%rdi
  mov    %r10,0x10(%rsp)
  mov    %r8,(%rsp)
  call   <memset@plt>
  test   %ebp,%ebp
  mov    (%rsp),%r8
  mov    0x10(%rsp),%r10
  jle    L207
  mov    0x60(%rsp),%rax
  mov    0x58(%rsp),%r9
  mov    %ebp,%esi
  lea    (%r12,%rax,1),%rdx
  jmp    L314
  nopl   0x0(%rax,%rax,1)
L299:
  add    $0x1,%r9
  add    $0x2,%rdx
  sub    $0x1,%esi
  je     L207
L314:
  movzbl 0x0(%r13,%r9,1),%eax
  test   %eax,%eax
  je     L299
  imul   %ebx,%eax
  movslq %eax,%rcx
  cmp    %esi,%ebx
  jle    L299
  movslq %esi,%rax
  lea    (%r8,%rcx,4),%rdi
  nopl   0x0(%rax,%rax,1)
L321:
  mov    (%rdi,%rax,4),%ecx
  add    %cx,(%rdx,%rax,2)
  add    $0x1,%rax
  cmp    %eax,%ebx
  jg     L321
  add    $0x1,%r9
  add    $0x2,%rdx
  sub    $0x1,%esi
  jne    L314
L207:
  mov    0x18(%rsp),%ecx
  cmp    %ecx,0x20(%rsp)
  jge    L111
  mov    0x48(%rsp),%rax
  mov    0x40(%rsp),%rdi
  lea    0x2(%r12,%rax,2),%rsi
  jmp    L146
  nopl   0x0(%rax,%rax,1)
L134:
  add    $0x1,%rdi
  add    $0x2,%rsi
  cmp    %r14,%rdi
  je     L199
L146:
  movzbl 0x0(%r13,%rdi,1),%eax
  test   %eax,%eax
  je     L134
  imul   %ebx,%eax
  movslq %eax,%rdx
  test   %ebx,%ebx
  jle    L134
  lea    (%r10,%rsi,1),%rax
  lea    (%r8,%rdx,4),%rdx
  nopl   0x0(%rax)
L64:
  mov    (%rdx),%ecx
  add    %cx,(%rax)
  add    $0x2,%rax
  add    $0x4,%rdx
  cmp    %rsi,%rax
  jne    L64
  add    $0x1,%rdi
  add    $0x2,%rsi
  cmp    %r14,%rdi
  jne    L146
L199:
  movslq 0x18(%rsp),%rdi
L505:
  cmp    %edi,0x70(%rsp)
  jle    L509
  mov    0x70(%rsp),%eax
  lea    0x2(%r12),%r11
  lea    (%rax,%rbp,1),%esi
  sub    %edi,%esi
  sub    0x50(%rsp),%rdi
  jmp    L74
  nop
L433:
  sub    $0x1,%esi
  add    $0x1,%rdi
  cmp    %esi,%ebp
  je     L509
L74:
  movzbl 0x0(%r13,%rdi,1),%eax
  test   %eax,%eax
  je     L433
  imul   %ebx,%eax
  movslq %eax,%rdx
  test   %esi,%esi
  jle    L433
  lea    -0x1(%rsi),%ecx
  lea    (%r12,%rdi,2),%rax
  mov    %rcx,%rsi
  add    %rdi,%rcx
  lea    (%r8,%rdx,4),%rdx
  lea    (%r11,%rcx,2),%r9
  nopl   0x0(%rax)
L166:
  mov    (%rdx),%ecx
  add    %cx,(%rax)
  add    $0x2,%rax
  add    $0x4,%rdx
  cmp    %rax,%r9
  jne    L166
  add    $0x1,%rdi
  cmp    %esi,%ebp
  jne    L74
L509:
  add    0x30(%rsp),%r12
  add    $0x1,%r15d
  add    0x38(%rsp),%r13
  cmp    %r15d,0xc(%rsp)
  jne    L59
  mov    0x78(%rsp),%r15
  mov    %r8,%r12
L248:
  mov    0x70(%rsp),%eax
  test   %eax,%eax
  jle    L30
  movslq 0x70(%rsp),%rax
  mov    0xc(%rsp),%r9d
  mov    %r15,0x60(%rsp)
  mov    %r15,%r11
  mov    $0xfffffffffffffffe,%rdx
  mov    %rax,%rdi
  lea    (%rax,%rax,1),%rsi
  sub    %ebp,%r9d
  add    $0x1,%edi
  mov    %rsi,0x40(%rsp)
  lea    0x2(%rsi),%rcx
  mov    %edi,%eax
  movslq %edi,%r10
  mov    %edi,0x48(%rsp)
  imul   %ebp,%eax
  add    %r10,%r10
  cltq
  add    %rax,%rax
  sub    %rax,%rdx
  lea    (%r15,%rsi,1),%rax
  mov    %rax,0x38(%rsp)
  xor    %eax,%eax
  test   %ebp,%ebp
  mov    %rdx,%r13
  cmovns %ebp,%eax
  mov    %ebx,%edx
  sub    %ebp,%edx
  mov    %eax,0x30(%rsp)
  imul   %edi,%eax
  cltq
  lea    0x2(%rax,%rax,1),%rax
  mov    %rax,0x50(%rsp)
  lea    -0x1(%rbp),%eax
  mov    %eax,0x10(%rsp)
  cltq
  mov    %rax,0x18(%rsp)
  movslq %ebp,%rax
  add    %rdx,%rax
  mov    %rax,0x20(%rsp)
  lea    -0x1(%rbx),%eax
  mov    %eax,0x58(%rsp)
  nop
L488:
  lea    0x2(%r11),%rax
  mov    0x40(%rsp),%r15
  xor    %r8d,%r8d
  mov    %rax,0x28(%rsp)
  mov    %rax,%rdi
  test   %ebp,%ebp
  jg     L450
  jmp    L497
  nopw   0x0(%rax,%rax,1)
L45:
  add    $0x1,%r8d
  add    %r10,%rdi
  cmp    %r8d,%ebp
  je     L497
L450:
  movzwl (%rdi),%edx
  test   %edx,%edx
  je     L45
  lea    0x80(%rdx),%esi
  mov    $0x80,%r14d
  lea    (%r15,%rdi,1),%rax
  sar    $0x8,%esi
  mov    %r14w,(%rdi)
  imul   %ebx,%esi
  movslq %esi,%rsi
  cmp    0x10(%rsp),%ebx
  jle    L45
  mov    0x18(%rsp),%rdx
  add    %rsi,%rdx
  add    0x20(%rsp),%rsi
  lea    (%r12,%rdx,4),%rdx
  lea    (%r12,%rsi,4),%r14
  nopl   0x0(%rax,%rax,1)
L144:
  mov    (%rdx),%esi
  add    $0x4,%rdx
  add    %si,(%rax)
  add    %rcx,%rax
  cmp    %rdx,%r14
  jne    L144
  add    $0x1,%r8d
  add    %r10,%rdi
  cmp    %r8d,%ebp
  jne    L450
L497:
  mov    0x30(%rsp),%r8d
  cmp    %r9d,%r8d
  jge    L234
  mov    0x50(%rsp),%rax
  mov    0x58(%rsp),%r15d
  lea    0x4(%r12),%r14
  lea    (%r11,%rax,1),%rdi
  jmp    L262
L269:
  add    $0x1,%r8d
  add    %r10,%rdi
  cmp    %r9d,%r8d
  je     L511
L262:
  movzwl (%rdi),%edx
  test   %edx,%edx
  je     L269
  lea    0x80(%rdx),%esi
  mov    $0x80,%edx
  lea    0x0(%r13,%rdi,1),%rax
  sar    $0x8,%esi
  mov    %dx,(%rdi)
  imul   %ebx,%esi
  movslq %esi,%rsi
  test   %ebx,%ebx
  jle    L269
  mov    %rdi,(%rsp)
  lea    (%r12,%rsi,4),%rdx
  add    %r15,%rsi
  lea    (%r14,%rsi,4),%rsi
  nopw   0x0(%rax,%rax,1)
L408:
  movzwl (%rdx),%edi
  add    $0x4,%rdx
  add    %di,(%rax)
  add    %rcx,%rax
  cmp    %rdx,%rsi
  jne    L408
  mov    (%rsp),%rdi
  add    $0x1,%r8d
  add    %r10,%rdi
  cmp    %r9d,%r8d
  jne    L262
L511:
  mov    %r9d,%eax
L65:
  cmp    %eax,0xc(%rsp)
  jle    L46
  mov    0x48(%rsp),%edx
  mov    0xc(%rsp),%edi
  lea    0x4(%r12),%r14
  imul   %eax,%edx
  lea    (%rdi,%rbp,1),%esi
  sub    %eax,%esi
  movslq %edx,%rdx
  lea    0x2(%r11,%rdx,2),%r8
  jmp    L132
  cs nopw 0x0(%rax,%rax,1)
L438:
  sub    $0x1,%esi
  add    %r10,%r8
  cmp    %esi,%ebp
  je     L46
L132:
  movzwl (%r8),%edx
  test   %edx,%edx
  je     L438
  lea    0x80(%rdx),%edi
  mov    $0x80,%edx
  lea    0x0(%r13,%r8,1),%rax
  sar    $0x8,%edi
  mov    %dx,(%r8)
  imul   %ebx,%edi
  movslq %edi,%rdi
  test   %esi,%esi
  jle    L438
  lea    -0x1(%rsi),%r11d
  lea    (%r12,%rdi,4),%rdx
  add    %r11,%rdi
  mov    %r11,%rsi
  lea    (%r14,%rdi,4),%r11
  nopl   (%rax)
L304:
  mov    (%rdx),%edi
  add    $0x4,%rdx
  add    %di,(%rax)
  add    %rcx,%rax
  cmp    %rdx,%r11
  jne    L304
  add    %r10,%r8
  cmp    %esi,%ebp
  jne    L132
L46:
  mov    0x28(%rsp),%r11
  cmp    %r11,0x38(%rsp)
  jne    L488
  mov    0x60(%rsp),%r15
L30:
  mov    0xc(%rsp),%r11d
  test   %r11d,%r11d
  jle    L342
  movslq 0x70(%rsp),%rcx
  movslq 0x74(%rsp),%rdi
  xor    %esi,%esi
  mov    0x68(%rsp),%r9
  mov    %rcx,%r10
  lea    0x2(%rcx,%rcx,1),%r8
  nopl   0x0(%rax,%rax,1)
L6:
  xor    %eax,%eax
  test   %r10d,%r10d
  jle    L363
  nopw   0x0(%rax,%rax,1)
L170:
  movzbl 0x1(%r15,%rax,2),%edx
  mov    %dl,(%r9,%rax,1)
  add    $0x1,%rax
  cmp    %rcx,%rax
  jne    L170
L363:
  add    $0x1,%esi
  add    %rdi,%r9
  add    %r8,%r15
  cmp    %esi,%r11d
  jne    L6
L342:
  add    $0x88,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L234:
  mov    0x30(%rsp),%eax
  jmp    L65
L111:
  movslq 0x20(%rsp),%rdi
  jmp    L505
```

assistant: ```c
void blur(unsigned char *buffer, unsigned short *tmp2, int width, int height, int stride, int *m2, int r, int mwidth) {
  int x, y;
  unsigned char *s = buffer;
  unsigned short *t = tmp2 + 1;
  for (y = 0; y < height; y++) {
    memset(t - 1, 0, (width + 1) * sizeof(short));
    for (x = 0; x < r; x++) {
      const int src = s[x];
      if (src) {
        register unsigned short *dstp = t + x - r;
        int mx;
        unsigned *m3 = m2 + src * mwidth;
        for (mx = r - x; mx < mwidth; mx++) {
          dstp[mx] += m3[mx];
        }
      }
    }
    for (; x < width - r; x++) {
      const int src = s[x];
      if (src) {
        register unsigned short *dstp = t + x - r;
        int mx;
        unsigned *m3 = m2 + src * mwidth;
        for (mx = 0; mx < mwidth; mx++) {
          dstp[mx] += m3[mx];
        }
      }
    }
    for (; x < width; x++) {
      const int src = s[x];
      if (src) {
        register unsigned short *dstp = t + x - r;
        int mx;
        const int x2 = r + width - x;
        unsigned *m3 = m2 + src * mwidth;
        for (mx = 0; mx < x2; mx++) {
          dstp[mx] += m3[mx];
        }
      }
    }
    s += stride;
    t += width + 1;
  }
  t = tmp2;
  for (x = 0; x < width; x++) {
    for (y = 0; y < r; y++) {
      unsigned short *srcp = t + y * (width + 1) + 1;
      int src = *srcp;
      if (src) {
        register unsigned short *dstp = srcp - 1 + width + 1;
        const int src2 = (src + 128) >> 8;
        unsigned *m3 = m2 + src2 * mwidth;
        int mx;
        *srcp = 128;
        for (mx = r - 1; mx < mwidth; mx++) {
          *dstp += m3[mx];
          dstp += width + 1;
        }
      }
    }
    for (; y < height - r; y++) {
      unsigned short *srcp = t + y * (width + 1) + 1;
      int src = *srcp;
      if (src) {
        register unsigned short *dstp = srcp - 1 - r * (width + 1);
        const int src2 = (src + 128) >> 8;
        unsigned *m3 = m2 + src2 * mwidth;
        int mx;
        *srcp = 128;
        for (mx = 0; mx < mwidth; mx++) {
          *dstp += m3[mx];
          dstp += width + 1;
        }
      }
    }
    for (; y < height; y++) {
      unsigned short *srcp = t + y * (width + 1) + 1;
      int src = *srcp;
      if (src) {
        const int y2 = r + height - y;
        register unsigned short *dstp = srcp - 1 - r * (width + 1);
        const int src2 = (src + 128) >> 8;
        unsigned *m3 = m2 + src2 * mwidth;
        int mx;
        *srcp = 128;
        for (mx = 0; mx < y2; mx++) {
          *dstp += m3[mx];
          dstp += width + 1;
        }
      }
    }
    t++;
  }
  t = tmp2;
  s = buffer;
  for (y = 0; y < height; y++) {
    for (x = 0; x < width; x++) {
      s[x] = t[x] >> 8;
    }
    s += stride;
    t += width + 1;
  }
}
```