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

```asm
<png_defilter>:
  endbr64
  push   %r15
  mov    $0xffffffff,%r15d
  push   %r14
  push   %r13
  mov    %r9d,%r13d
  push   %r12
  mov    %r8d,%r12d
  push   %rbp
  mov    %rdi,%rbp
  mov    %edx,%edi
  mov    %r9d,%edx
  push   %rbx
  mov    %rsi,%rbx
  mov    %r8d,%esi
  sub    $0x58,%rsp
  mov    %ecx,(%rsp)
  call   <png_get_scanline_len@plt>
  mov    %eax,%ecx
  cmp    $0x7,%r12d
  jle    L407
  test   %r12d,%r12d
  lea    0x7(%r12),%r15d
  cmovns %r12d,%r15d
  sar    $0x3,%r15d
  neg    %r15d
  imul   %r13d,%r15d
L407:
  mov    %ecx,%eax
  neg    %eax
  mov    %eax,0x28(%rsp)
  mov    (%rsp),%eax
  test   %eax,%eax
  jle    L70
  lea    -0x1(%rcx),%edi
  lea    -0x2(%rcx),%r11d
  xor    %r14d,%r14d
  mov    %r15d,%r8d
  mov    %edi,%eax
  mov    %edi,0x8(%rsp)
  and    $0xfffffff0,%edi
  shr    $0x4,%eax
  mov    %edi,0xc(%rsp)
  sub    $0x1,%eax
  shl    $0x4,%rax
  add    $0x11,%rax
  mov    %rax,0x18(%rsp)
  mov    %edi,%eax
  mov    %rax,0x10(%rsp)
  lea    0x1(%rdi),%eax
  mov    %eax,0x20(%rsp)
  lea    0x1(%r15),%eax
  mov    %eax,0x40(%rsp)
  lea    (%r15,%rcx,1),%eax
  mov    %eax,0x4(%rsp)
  mov    %r15d,%eax
  sub    %ecx,%eax
  mov    %eax,0x24(%rsp)
  mov    %rbp,%rax
  jmp    L426
  nop
L613:
  cmp    $0x1,%dl
  je     L605
  cmp    $0x2,%dl
  je     L497
  cmp    $0x3,%dl
  je     L237
  cmp    $0x4,%dl
  je     L374
L467:
  mov    %r12,%rbx
  mov    %rbp,%rax
L124:
  add    $0x1,%r14d
  cmp    %r14d,(%rsp)
  je     L70
L426:
  movzbl (%rax),%edx
  lea    0x1(%rax),%rbp
  lea    0x1(%rbx),%r12
  mov    %dl,(%rbx)
  test   %dl,%dl
  jne    L613
  cmp    $0x1,%ecx
  jle    L467
  lea    0x2(%rax),%rsi
  mov    %r12,%rdx
  sub    %rsi,%rdx
  cmp    $0xe,%rdx
  jbe    L372
  cmp    $0x6,%r11d
  jbe    L372
  cmp    $0xe,%r11d
  jbe    L757
  mov    0x18(%rsp),%rsi
  mov    $0x1,%edx
L88:
  movdqu (%rax,%rdx,1),%xmm2
  movups %xmm2,(%rbx,%rdx,1)
  add    $0x10,%rdx
  cmp    %rsi,%rdx
  jne    L88
  mov    0x10(%rsp),%rdi
  mov    0xc(%rsp),%r10d
  mov    %r11d,%r13d
  lea    0x0(%rbp,%rdi,1),%rsi
  add    %r12,%rdi
  cmp    %r10d,0x8(%rsp)
  je     L92
  mov    %ecx,%edx
  sub    %r10d,%edx
  lea    -0x1(%rdx),%r9d
  sub    $0x2,%edx
  cmp    $0x6,%edx
  mov    0x20(%rsp),%edx
  jbe    L137
L549:
  add    $0x1,%r10d
  mov    %r11d,%r13d
  mov    (%rax,%r10,1),%rax
  mov    %rax,(%rbx,%r10,1)
  mov    %r9d,%eax
  and    $0xfffffff8,%eax
  mov    %eax,%r10d
  add    %eax,%edx
  add    %r10,%rsi
  add    %r10,%rdi
  cmp    %eax,%r9d
  je     L92
L137:
  movzbl (%rsi),%eax
  mov    %r11d,%r13d
  mov    %al,(%rdi)
  lea    0x1(%rdx),%eax
  cmp    %eax,%ecx
  jle    L92
  movzbl 0x1(%rsi),%eax
  mov    %al,0x1(%rdi)
  lea    0x2(%rdx),%eax
  cmp    %eax,%ecx
  jle    L92
  movzbl 0x2(%rsi),%eax
  mov    %al,0x2(%rdi)
  lea    0x3(%rdx),%eax
  cmp    %ecx,%eax
  jge    L92
L770:
  movzbl 0x3(%rsi),%eax
  mov    %al,0x3(%rdi)
  lea    0x4(%rdx),%eax
  cmp    %eax,%ecx
  jle    L92
  movzbl 0x4(%rsi),%eax
  mov    %al,0x4(%rdi)
  lea    0x5(%rdx),%eax
  cmp    %eax,%ecx
  jle    L92
  movzbl 0x5(%rsi),%eax
  add    $0x6,%edx
  mov    %al,0x5(%rdi)
  cmp    %edx,%ecx
  jle    L92
  movzbl 0x6(%rsi),%eax
  mov    %al,0x6(%rdi)
  nopl   0x0(%rax,%rax,1)
L92:
  add    $0x1,%r13
  add    $0x1,%r14d
  lea    0x0(%rbp,%r13,1),%rax
  lea    (%r12,%r13,1),%rbx
  cmp    %r14d,(%rsp)
  jne    L426
L70:
  add    $0x58,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopw   0x0(%rax,%rax,1)
L605:
  cmp    $0x1,%ecx
  jle    L467
  mov    %r11d,%r13d
  movslq %r8d,%r9
  mov    $0x1,%edx
  lea    0x2(%r13),%rdi
  add    %rbx,%r9
L831:
  lea    (%r8,%rdx,1),%esi
  test   %esi,%esi
  movzbl (%rax,%rdx,1),%esi
  jle    L90
L457:
  add    (%r9,%rdx,1),%sil
  mov    %sil,(%rbx,%rdx,1)
  add    $0x1,%rdx
  cmp    %rdi,%rdx
  je     L92
  lea    (%r8,%rdx,1),%esi
  test   %esi,%esi
  movzbl (%rax,%rdx,1),%esi
  jg     L457
L90:
  mov    %sil,(%rbx,%rdx,1)
  add    $0x1,%rdx
  cmp    %rdx,%rdi
  jne    L831
  jmp    L92
  cs nopw 0x0(%rax,%rax,1)
L497:
  cmp    $0x1,%ecx
  jle    L467
  test   %r14d,%r14d
  je     L780
  movslq 0x28(%rsp),%r15
  cmp    $0x6,%r11d
  seta   %sil
  cmp    $0xfffffffffffffff0,%r15
  setbe  %dl
  test   %dl,%sil
  je     L807
  lea    0x2(%rax),%rsi
  mov    %r12,%rdx
  sub    %rsi,%rdx
  cmp    $0xe,%rdx
  jbe    L807
  cmp    $0xe,%r11d
  jbe    L843
  mov    0x18(%rsp),%rdi
  lea    0x1(%rbx,%r15,1),%rsi
  mov    $0x1,%edx
  nopl   0x0(%rax)
L76:
  movdqu -0x1(%rsi,%rdx,1),%xmm0
  movdqu (%rax,%rdx,1),%xmm3
  paddb  %xmm3,%xmm0
  movups %xmm0,(%rbx,%rdx,1)
  add    $0x10,%rdx
  cmp    %rdi,%rdx
  jne    L76
  mov    0x10(%rsp),%rdi
  mov    %r11d,%r13d
  lea    0x0(%rbp,%rdi,1),%r9
  lea    (%r12,%rdi,1),%rdx
  mov    0xc(%rsp),%edi
  cmp    %edi,0x8(%rsp)
  je     L92
  mov    %ecx,%esi
  sub    %edi,%esi
  lea    -0x1(%rsi),%r10d
  sub    $0x2,%esi
  cmp    $0x6,%esi
  jbe    L344
  mov    %edi,%esi
  mov    0x20(%rsp),%edi
L68:
  lea    (%rbx,%r15,1),%r13
  movq   0x1(%rax,%rsi,1),%xmm1
  mov    %r10d,%eax
  movq   0x1(%rsi,%r13,1),%xmm0
  and    $0xfffffff8,%eax
  mov    %r11d,%r13d
  add    %eax,%edi
  paddb  %xmm1,%xmm0
  movq   %xmm0,0x1(%rbx,%rsi,1)
  mov    %eax,%esi
  add    %rsi,%r9
  add    %rsi,%rdx
  cmp    %eax,%r10d
  je     L92
L420:
  movzbl (%r9),%eax
  add    (%rdx,%r15,1),%al
  mov    %r11d,%r13d
  mov    %al,(%rdx)
  lea    0x1(%rdi),%eax
  cmp    %eax,%ecx
  jle    L92
  movzbl 0x1(%r9),%eax
  add    0x1(%rdx,%r15,1),%al
  mov    %al,0x1(%rdx)
  lea    0x2(%rdi),%eax
  cmp    %eax,%ecx
  jle    L92
  movzbl 0x2(%r9),%eax
  add    0x2(%rdx,%r15,1),%al
  mov    %al,0x2(%rdx)
  lea    0x3(%rdi),%eax
  cmp    %eax,%ecx
  jle    L92
  movzbl 0x3(%r9),%eax
  add    0x3(%rdx,%r15,1),%al
  mov    %al,0x3(%rdx)
  lea    0x4(%rdi),%eax
  cmp    %eax,%ecx
  jle    L92
  movzbl 0x4(%r9),%eax
  add    0x4(%rdx,%r15,1),%al
  mov    %al,0x4(%rdx)
  lea    0x5(%rdi),%eax
  cmp    %eax,%ecx
  jle    L92
  movzbl 0x5(%r9),%eax
  add    $0x6,%edi
  add    0x5(%rdx,%r15,1),%al
  mov    %al,0x5(%rdx)
  cmp    %edi,%ecx
  jle    L92
  movzbl 0x6(%r9),%eax
  add    0x6(%rdx,%r15,1),%al
  mov    %al,0x6(%rdx)
  jmp    L92
  xchg   %ax,%ax
L237:
  cmp    $0x1,%ecx
  jle    L467
  mov    %r11d,%r13d
  test   %r14d,%r14d
  je     L528
  movslq 0x28(%rsp),%r15
  movslq %r8d,%r10
  lea    0x2(%r13),%r9
  mov    $0x1,%edx
  add    %rbx,%r10
  add    %rbx,%r15
L117:
  lea    (%r8,%rdx,1),%esi
  test   %esi,%esi
  movzbl (%r15,%rdx,1),%esi
  jle    L747
L880:
  movzbl (%r10,%rdx,1),%edi
  add    %edi,%esi
  shr    %esi
  add    (%rax,%rdx,1),%sil
  mov    %sil,(%rbx,%rdx,1)
  add    $0x1,%rdx
  cmp    %r9,%rdx
  je     L92
  lea    (%r8,%rdx,1),%esi
  test   %esi,%esi
  movzbl (%r15,%rdx,1),%esi
  jg     L880
L747:
  shr    %esi
  add    (%rax,%rdx,1),%sil
  mov    %sil,(%rbx,%rdx,1)
  add    $0x1,%rdx
  cmp    %rdx,%r9
  jne    L117
  jmp    L92
  nopl   0x0(%rax)
L374:
  cmp    $0x1,%ecx
  jle    L467
  test   %r14d,%r14d
  je     L465
  mov    0x40(%rsp),%r9d
  mov    %ecx,0x2c(%rsp)
  mov    %r8d,%r13d
  mov    %rbp,0x30(%rsp)
  movslq 0x28(%rsp),%r15
  mov    %r12,0x38(%rsp)
  mov    %r11d,0x48(%rsp)
  mov    %r14d,0x44(%rsp)
  mov    %r9d,%r14d
  nopw   0x0(%rax,%rax,1)
L848:
  add    $0x1,%rbp
  movzbl -0x1(%rbp),%ebx
  test   %r14d,%r14d
  jle    L87
  movslq 0x24(%rsp),%rax
  movzbl (%r12,%r15,1),%esi
  add    $0x1,%r12
  add    $0x1,%r14d
  movzbl -0x1(%r12,%rax,1),%edx
  movslq %r13d,%rax
  movzbl -0x1(%r12,%rax,1),%edi
  call   <png_paeth_predictor@plt>
  add    %eax,%ebx
  mov    %bl,-0x1(%r12)
  cmp    0x4(%rsp),%r14d
  jne    L848
L11:
  mov    0x48(%rsp),%r11d
  mov    %r13d,%r8d
  mov    0x2c(%rsp),%ecx
  mov    0x30(%rsp),%rbp
  mov    0x38(%rsp),%r12
  mov    0x44(%rsp),%r14d
  mov    %r11d,%r13d
  jmp    L92
  nopl   0x0(%rax,%rax,1)
L780:
  lea    0x2(%rax),%rsi
  mov    %r12,%rdx
  sub    %rsi,%rdx
  cmp    $0xe,%rdx
  jbe    L151
  cmp    $0x6,%r11d
  jbe    L151
  cmp    $0xe,%r11d
  jbe    L730
  mov    0x18(%rsp),%rsi
  mov    $0x1,%edx
  nopw   0x0(%rax,%rax,1)
L704:
  movdqu (%rax,%rdx,1),%xmm4
  movups %xmm4,(%rbx,%rdx,1)
  add    $0x10,%rdx
  cmp    %rsi,%rdx
  jne    L704
  mov    0x10(%rsp),%rdi
  mov    0xc(%rsp),%r10d
  mov    %r11d,%r13d
  lea    0x0(%rbp,%rdi,1),%rsi
  add    %r12,%rdi
  cmp    %r10d,0x8(%rsp)
  je     L92
  mov    %ecx,%edx
  sub    %r10d,%edx
  lea    -0x1(%rdx),%r9d
  sub    $0x2,%edx
  cmp    $0x6,%edx
  mov    0x20(%rsp),%edx
  jbe    L193
L617:
  add    $0x1,%r10d
  mov    %r11d,%r13d
  mov    (%rax,%r10,1),%rax
  mov    %rax,(%rbx,%r10,1)
  mov    %r9d,%eax
  and    $0xfffffff8,%eax
  mov    %eax,%r10d
  add    %eax,%edx
  add    %r10,%rsi
  add    %r10,%rdi
  cmp    %eax,%r9d
  je     L92
L193:
  movzbl (%rsi),%eax
  mov    %r11d,%r13d
  mov    %al,(%rdi)
  lea    0x1(%rdx),%eax
  cmp    %eax,%ecx
  jle    L92
  movzbl 0x1(%rsi),%eax
  mov    %al,0x1(%rdi)
  lea    0x2(%rdx),%eax
  cmp    %eax,%ecx
  jle    L92
  movzbl 0x2(%rsi),%eax
  mov    %al,0x2(%rdi)
  lea    0x3(%rdx),%eax
  cmp    %eax,%ecx
  jg     L770
  jmp    L92
  nopl   0x0(%rax)
L528:
  movslq %r8d,%r9
  lea    0x2(%r13),%rdi
  mov    $0x1,%edx
  add    %rbx,%r9
L580:
  lea    (%r8,%rdx,1),%esi
  test   %esi,%esi
  jle    L679
L95:
  movzbl (%r9,%rdx,1),%esi
  shr    %esi
  add    (%rax,%rdx,1),%sil
  mov    %sil,(%rbx,%rdx,1)
  add    $0x1,%rdx
  cmp    %rdi,%rdx
  je     L92
  lea    (%r8,%rdx,1),%esi
  test   %esi,%esi
  jg     L95
L679:
  movzbl (%rax,%rdx,1),%esi
  mov    %sil,(%rbx,%rdx,1)
  add    $0x1,%rdx
  cmp    %rdi,%rdx
  jne    L580
  jmp    L92
  nopl   0x0(%rax)
L87:
  movzbl (%r12,%r15,1),%esi
  xor    %edx,%edx
  xor    %edi,%edi
  add    $0x1,%r12
  add    $0x1,%r14d
  call   <png_paeth_predictor@plt>
  add    %eax,%ebx
  mov    %bl,-0x1(%r12)
  cmp    %r14d,0x4(%rsp)
  jne    L848
  jmp    L11
  nopl   (%rax)
L372:
  mov    %r11d,%r13d
  mov    $0x1,%edx
  lea    0x2(%r13),%rdi
  nopl   0x0(%rax)
L492:
  movzbl (%rax,%rdx,1),%esi
  mov    %sil,(%rbx,%rdx,1)
  add    $0x1,%rdx
  cmp    %rdx,%rdi
  jne    L492
  jmp    L92
L465:
  mov    0x40(%rsp),%eax
  mov    %r11d,%r13d
  mov    %ecx,0x30(%rsp)
  mov    %r8d,%r15d
  mov    %r13,0x48(%rsp)
  lea    0x2(%rbx,%r13,1),%rbx
  mov    %r12,%r13
  sub    %r12d,%eax
  mov    %rbp,0x38(%rsp)
  mov    %eax,0x2c(%rsp)
  mov    %r11d,0x44(%rsp)
  jmp    L756
  nopl   0x0(%rax)
L190:
  movslq %r15d,%rax
  xor    %edx,%edx
  xor    %esi,%esi
  movzbl 0x0(%r13,%rax,1),%edi
L281:
  call   <png_paeth_predictor@plt>
  add    $0x1,%r13
  add    %eax,%r12d
  mov    %r12b,-0x1(%r13)
  cmp    %rbx,%r13
  je     L66
L756:
  mov    0x2c(%rsp),%eax
  add    $0x1,%rbp
  movzbl -0x1(%rbp),%r12d
  add    %r13d,%eax
  test   %eax,%eax
  jg     L190
  xor    %edx,%edx
  xor    %esi,%esi
  xor    %edi,%edi
  jmp    L281
L66:
  mov    0x38(%rsp),%rbp
  mov    0x48(%rsp),%r13
  mov    %r15d,%r8d
  mov    0x30(%rsp),%ecx
  mov    0x44(%rsp),%r11d
  lea    0x1(%rbp,%r13,1),%rax
  jmp    L124
L757:
  mov    0x8(%rsp),%r9d
  mov    %r12,%rdi
  mov    %rbp,%rsi
  xor    %r10d,%r10d
  mov    $0x1,%edx
  jmp    L549
L807:
  mov    %r11d,%r13d
  mov    $0x1,%edx
  lea    (%rbx,%r15,1),%r9
  lea    0x2(%r13),%rdi
  xchg   %ax,%ax
L593:
  movzbl (%rax,%rdx,1),%esi
  add    (%r9,%rdx,1),%sil
  mov    %sil,(%rbx,%rdx,1)
  add    $0x1,%rdx
  cmp    %rdx,%rdi
  jne    L593
  jmp    L92
L151:
  mov    %r11d,%r13d
  mov    $0x1,%edx
  lea    0x2(%r13),%rdi
  cs nopw 0x0(%rax,%rax,1)
L870:
  movzbl (%rax,%rdx,1),%esi
  mov    %sil,(%rbx,%rdx,1)
  add    $0x1,%rdx
  cmp    %rdi,%rdx
  jne    L870
  jmp    L92
L730:
  mov    0x8(%rsp),%r9d
  mov    %r12,%rdi
  mov    %rbp,%rsi
  xor    %r10d,%r10d
  mov    $0x1,%edx
  jmp    L617
L843:
  mov    0x8(%rsp),%r10d
  mov    %r12,%rdx
  mov    %rbp,%r9
  xor    %esi,%esi
  mov    $0x1,%edi
  jmp    L68
L344:
  mov    0x20(%rsp),%edi
  jmp    L420
```

assistant: ```c
void png_defilter(const unsigned char *data, unsigned char *image, int width, int height, int depth, int sample_per_pixel) {
  unsigned char type;
  int i, j;
  int ap, bp;
  unsigned int a, b, c, k;
  int scanline_len;
  scanline_len = png_get_scanline_len(width, depth, sample_per_pixel);
  if (depth < 8)
    ap = -1;
  else
    ap = -(depth / 8 * sample_per_pixel);
  bp = -scanline_len;
  for (i = 0; i < height; i++) {
    { type = (uint8_t) * (data)++; };
    *image++ = type;
    if (type == 0) {
      for (j = 1; j < scanline_len; j++) {
        { k = (uint8_t) * (data)++; };
        *image++ = k;
      }
    } else if (type == 1) {
      for (j = 1; j < scanline_len; j++) {
        a = (j + ap > 0) ? image[ap] : 0;
        { k = (uint8_t) * (data)++; };
        *image++ = k + a;
      }
    } else if (type == 2) {
      for (j = 1; j < scanline_len; j++) {
        b = (i > 0) ? image[bp] : 0;
        { k = (uint8_t) * (data)++; };
        *image++ = k + b;
      }
    } else if (type == 3) {
      for (j = 1; j < scanline_len; j++) {
        a = (j + ap > 0) ? image[ap] : 0;
        b = (i > 0) ? image[bp] : 0;
        { k = (uint8_t) * (data)++; };
        *image++ = k + (a + b) / 2;
      }
    } else if (type == 4) {
      for (j = 1; j < scanline_len; j++) {
        a = (j + ap > 0) ? image[ap] : 0;
        b = (i > 0) ? image[bp] : 0;
        c = (i > 0 && j + ap > 0) ? image[ap + bp] : 0;
        { k = (uint8_t) * (data)++; };
        *image++ = k + png_paeth_predictor(a, b, c);
      }
    }
  }
}
```