user: 请显示与下面列出的汇编代码相匹配的C语言实现：

```asm
<png_defilter>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x50,%rsp
  mov    %rdi,-0x38(%rbp)
  mov    %rsi,-0x40(%rbp)
  mov    %edx,-0x44(%rbp)
  mov    %ecx,-0x48(%rbp)
  mov    %r8d,-0x4c(%rbp)
  mov    %r9d,-0x50(%rbp)
  mov    -0x50(%rbp),%edx
  mov    -0x4c(%rbp),%ecx
  mov    -0x44(%rbp),%eax
  mov    %ecx,%esi
  mov    %eax,%edi
  call   <png_get_scanline_len@plt>
  mov    %eax,-0x18(%rbp)
  cmpl   $0x7,-0x4c(%rbp)
  jg     L356
  movl   $0xffffffff,-0x1c(%rbp)
  jmp    L206
L356:
  mov    -0x4c(%rbp),%eax
  lea    0x7(%rax),%edx
  test   %eax,%eax
  cmovs  %edx,%eax
  sar    $0x3,%eax
  neg    %eax
  mov    %eax,%edx
  mov    -0x50(%rbp),%eax
  imul   %edx,%eax
  mov    %eax,-0x1c(%rbp)
L206:
  mov    -0x18(%rbp),%eax
  neg    %eax
  mov    %eax,-0x14(%rbp)
  movl   $0x0,-0x24(%rbp)
  jmp    L266
L83:
  mov    -0x38(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x38(%rbp)
  movzbl (%rax),%eax
  mov    %al,-0x25(%rbp)
  mov    -0x40(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x40(%rbp)
  movzbl -0x25(%rbp),%edx
  mov    %dl,(%rax)
  cmpb   $0x0,-0x25(%rbp)
  jne    L10
  movl   $0x1,-0x20(%rbp)
  jmp    L188
L143:
  mov    -0x38(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x38(%rbp)
  movzbl (%rax),%eax
  movzbl %al,%eax
  mov    %eax,-0x4(%rbp)
  mov    -0x40(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x40(%rbp)
  mov    -0x4(%rbp),%edx
  mov    %dl,(%rax)
  addl   $0x1,-0x20(%rbp)
L188:
  mov    -0x20(%rbp),%eax
  cmp    -0x18(%rbp),%eax
  jl     L143
  jmp    L299
L10:
  cmpb   $0x1,-0x25(%rbp)
  jne    L214
  movl   $0x1,-0x20(%rbp)
  jmp    L282
L177:
  mov    -0x20(%rbp),%edx
  mov    -0x1c(%rbp),%eax
  add    %edx,%eax
  test   %eax,%eax
  jle    L123
  mov    -0x1c(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  jmp    L141
L123:
  mov    $0x0,%eax
L141:
  mov    %eax,-0x10(%rbp)
  mov    -0x38(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x38(%rbp)
  movzbl (%rax),%eax
  movzbl %al,%eax
  mov    %eax,-0x4(%rbp)
  mov    -0x4(%rbp),%eax
  mov    %eax,%esi
  mov    -0x10(%rbp),%eax
  mov    %eax,%ecx
  mov    -0x40(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x40(%rbp)
  lea    (%rsi,%rcx,1),%edx
  mov    %dl,(%rax)
  addl   $0x1,-0x20(%rbp)
L282:
  mov    -0x20(%rbp),%eax
  cmp    -0x18(%rbp),%eax
  jl     L177
  jmp    L299
L214:
  cmpb   $0x2,-0x25(%rbp)
  jne    L56
  movl   $0x1,-0x20(%rbp)
  jmp    L124
L72:
  cmpl   $0x0,-0x24(%rbp)
  jle    L274
  mov    -0x14(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  jmp    L40
L274:
  mov    $0x0,%eax
L40:
  mov    %eax,-0xc(%rbp)
  mov    -0x38(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x38(%rbp)
  movzbl (%rax),%eax
  movzbl %al,%eax
  mov    %eax,-0x4(%rbp)
  mov    -0x4(%rbp),%eax
  mov    %eax,%esi
  mov    -0xc(%rbp),%eax
  mov    %eax,%ecx
  mov    -0x40(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x40(%rbp)
  lea    (%rsi,%rcx,1),%edx
  mov    %dl,(%rax)
  addl   $0x1,-0x20(%rbp)
L124:
  mov    -0x20(%rbp),%eax
  cmp    -0x18(%rbp),%eax
  jl     L72
  jmp    L299
L56:
  cmpb   $0x3,-0x25(%rbp)
  jne    L325
  movl   $0x1,-0x20(%rbp)
  jmp    L239
L289:
  mov    -0x20(%rbp),%edx
  mov    -0x1c(%rbp),%eax
  add    %edx,%eax
  test   %eax,%eax
  jle    L305
  mov    -0x1c(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  jmp    L112
L305:
  mov    $0x0,%eax
L112:
  mov    %eax,-0x10(%rbp)
  cmpl   $0x0,-0x24(%rbp)
  jle    L11
  mov    -0x14(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  jmp    L340
L11:
  mov    $0x0,%eax
L340:
  mov    %eax,-0xc(%rbp)
  mov    -0x38(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x38(%rbp)
  movzbl (%rax),%eax
  movzbl %al,%eax
  mov    %eax,-0x4(%rbp)
  mov    -0x10(%rbp),%edx
  mov    -0xc(%rbp),%eax
  add    %edx,%eax
  shr    %eax
  mov    %eax,%esi
  mov    -0x4(%rbp),%eax
  mov    %eax,%ecx
  mov    -0x40(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x40(%rbp)
  lea    (%rsi,%rcx,1),%edx
  mov    %dl,(%rax)
  addl   $0x1,-0x20(%rbp)
L239:
  mov    -0x20(%rbp),%eax
  cmp    -0x18(%rbp),%eax
  jl     L289
  jmp    L299
L325:
  cmpb   $0x4,-0x25(%rbp)
  jne    L299
  movl   $0x1,-0x20(%rbp)
  jmp    L253
L116:
  mov    -0x20(%rbp),%edx
  mov    -0x1c(%rbp),%eax
  add    %edx,%eax
  test   %eax,%eax
  jle    L281
  mov    -0x1c(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  jmp    L310
L281:
  mov    $0x0,%eax
L310:
  mov    %eax,-0x10(%rbp)
  cmpl   $0x0,-0x24(%rbp)
  jle    L311
  mov    -0x14(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  jmp    L17
L311:
  mov    $0x0,%eax
L17:
  mov    %eax,-0xc(%rbp)
  cmpl   $0x0,-0x24(%rbp)
  jle    L294
  mov    -0x20(%rbp),%edx
  mov    -0x1c(%rbp),%eax
  add    %edx,%eax
  test   %eax,%eax
  jle    L294
  mov    -0x1c(%rbp),%edx
  mov    -0x14(%rbp),%eax
  add    %edx,%eax
  movslq %eax,%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  jmp    L132
L294:
  mov    $0x0,%eax
L132:
  mov    %eax,-0x8(%rbp)
  mov    -0x38(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x38(%rbp)
  movzbl (%rax),%eax
  movzbl %al,%eax
  mov    %eax,-0x4(%rbp)
  mov    -0x8(%rbp),%edx
  mov    -0xc(%rbp),%ecx
  mov    -0x10(%rbp),%eax
  mov    %ecx,%esi
  mov    %eax,%edi
  call   <png_paeth_predictor@plt>
  mov    %eax,%esi
  mov    -0x4(%rbp),%eax
  mov    %eax,%ecx
  mov    -0x40(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x40(%rbp)
  lea    (%rsi,%rcx,1),%edx
  mov    %dl,(%rax)
  addl   $0x1,-0x20(%rbp)
L253:
  mov    -0x20(%rbp),%eax
  cmp    -0x18(%rbp),%eax
  jl     L116
L299:
  addl   $0x1,-0x24(%rbp)
L266:
  mov    -0x24(%rbp),%eax
  cmp    -0x48(%rbp),%eax
  jl     L83
  nop
  nop
  leave
  ret
```

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);
      }
    }
  }
}
```