user: What is the c source code of the assembly code below?

```asm
<png_predict>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x48,%rsp
  mov    %rdi,0x20(%rsp)
  mov    %edx,0x2c(%rsp)
  imul   %r8d,%ecx
  imul   %ecx,%esi
  lea    0x7(%rsi),%eax
  mov    %eax,0x38(%rsp)
  shr    $0x3,%eax
  mov    %eax,0x4(%rsp)
  lea    0x7(%rcx),%edi
  mov    %edi,0x28(%rsp)
  mov    %edi,%r15d
  shr    $0x3,%r15d
  test   %edx,%edx
  je     L426
  lea    0x1(%rax),%ecx
  mov    %ecx,0x30(%rsp)
  movl   $0x0,0xc(%rsp)
  movl   $0x0,0x8(%rsp)
  movl   $0x0,(%rsp)
  sub    %r15d,%eax
  mov    %eax,0x34(%rsp)
  jmp    L330
L12:
  cmp    $0x4,%al
  jne    L133
  cmpl   $0x0,(%rsp)
  je     L306
  mov    $0x0,%r14d
  cmpl   $0x7,0x28(%rsp)
  jbe    L363
  mov    %r12,0x10(%rsp)
L196:
  movzbl 0x1(%rbp,%r14,1),%r12d
  movzbl 0x0(%r13,%r14,1),%esi
  mov    $0x0,%edx
  mov    $0x0,%edi
  mov    $0x0,%eax
  call   <paeth@plt>
  add    %eax,%r12d
  mov    %r12b,(%rbx,%r14,1)
  add    $0x1,%r14
  cmp    %r14d,%r15d
  ja     L196
  mov    0x10(%rsp),%r12
  lea    -0x1(%r15),%eax
  add    $0x1,%rax
  cmpl   $0x7,0x28(%rsp)
  mov    $0x1,%edx
  cmovbe %rdx,%rax
  add    %rax,%r12
  lea    0x0(%r13,%rax,1),%rdi
  mov    %rdi,0x10(%rsp)
  add    %rbx,%rax
  mov    %rax,%rcx
L26:
  cmp    %r15d,0x4(%rsp)
  jbe    L377
  mov    0x34(%rsp),%eax
  lea    -0x1(%rax),%eax
  mov    %rax,0x18(%rsp)
  mov    $0x0,%ebp
  mov    %r15d,0x3c(%rsp)
  mov    %rcx,%r15
L466:
  movzbl (%r12,%rbp,1),%r14d
  movzbl 0x0(%r13,%rbp,1),%edx
  mov    0x10(%rsp),%rax
  movzbl (%rax,%rbp,1),%esi
  movzbl (%rbx,%rbp,1),%edi
  mov    $0x0,%eax
  call   <paeth@plt>
  add    %eax,%r14d
  mov    %r14b,(%r15,%rbp,1)
  mov    %rbp,%rax
  add    $0x1,%rbp
  cmp    0x18(%rsp),%rax
  jne    L466
  mov    0x3c(%rsp),%r15d
  jmp    L377
L218:
  mov    $0x0,%eax
  mov    %rbx,%rcx
  cmpl   $0x7,0x28(%rsp)
  jbe    L415
L343:
  movzbl 0x1(%rbp,%rax,1),%edx
  mov    %dl,(%rbx,%rax,1)
  add    $0x1,%rax
  cmp    %eax,%r15d
  ja     L343
  lea    -0x1(%r15),%ecx
  add    $0x1,%rcx
  cmpl   $0x7,0x28(%rsp)
  mov    $0x1,%eax
  cmovbe %rax,%rcx
  add    %rcx,%r12
  add    %rbx,%rcx
L415:
  cmp    %r15d,0x4(%rsp)
  jbe    L377
  mov    0x34(%rsp),%eax
  lea    -0x1(%rax),%esi
  mov    $0x0,%eax
L96:
  movzbl (%rbx,%rax,1),%edx
  add    (%r12,%rax,1),%dl
  mov    %dl,(%rcx,%rax,1)
  mov    %rax,%rdx
  add    $0x1,%rax
  cmp    %rsi,%rdx
  jne    L96
  jmp    L377
L133:
  cmpl   $0x7,0x38(%rsp)
  jbe    L377
  mov    $0x0,%eax
  mov    0x4(%rsp),%ecx
L194:
  movzbl 0x1(%rbp,%rax,1),%edx
  mov    %dl,(%rbx,%rax,1)
  add    $0x1,%rax
  cmp    %eax,%ecx
  ja     L194
L377:
  addl   $0x1,(%rsp)
  mov    (%rsp),%eax
  mov    0x30(%rsp),%ecx
  add    %ecx,0x8(%rsp)
  mov    0x4(%rsp),%edi
  add    %edi,0xc(%rsp)
  cmp    %eax,0x2c(%rsp)
  je     L426
L330:
  mov    0x8(%rsp),%ebp
  mov    0x20(%rsp),%rax
  add    %rax,%rbp
  mov    0xc(%rsp),%ebx
  add    %rax,%rbx
  mov    0x4(%rsp),%eax
  mov    %rbx,%r13
  sub    %rax,%r13
  lea    0x1(%rbp),%r12
  movzbl 0x0(%rbp),%eax
  cmp    $0x3,%al
  je     L347
  ja     L12
  cmp    $0x1,%al
  je     L218
  cmp    $0x2,%al
  jne    L133
  cmpl   $0x0,(%rsp)
  je     L334
  mov    $0x0,%eax
  mov    0x4(%rsp),%ecx
  cmpl   $0x7,0x38(%rsp)
  jbe    L377
L308:
  movzbl 0x0(%r13,%rax,1),%edx
  add    0x1(%rbp,%rax,1),%dl
  mov    %dl,(%rbx,%rax,1)
  add    $0x1,%rax
  cmp    %eax,%ecx
  ja     L308
  jmp    L377
L334:
  cmpl   $0x7,0x38(%rsp)
  jbe    L377
  mov    $0x0,%eax
  mov    0x4(%rsp),%ecx
L316:
  movzbl 0x1(%rbp,%rax,1),%edx
  mov    %dl,(%rbx,%rax,1)
  add    $0x1,%rax
  cmp    %eax,%ecx
  ja     L316
  jmp    L377
L347:
  cmpl   $0x0,(%rsp)
  je     L111
  mov    $0x0,%eax
  mov    %rbx,%rsi
  cmpl   $0x7,0x28(%rsp)
  jbe    L356
L25:
  movzbl 0x0(%r13,%rax,1),%edx
  shr    %dl
  add    0x1(%rbp,%rax,1),%dl
  mov    %dl,(%rbx,%rax,1)
  add    $0x1,%rax
  cmp    %eax,%r15d
  ja     L25
  lea    -0x1(%r15),%esi
  add    $0x1,%rsi
  cmpl   $0x7,0x28(%rsp)
  mov    $0x1,%eax
  cmovbe %rax,%rsi
  add    %rsi,%r12
  add    %rsi,%r13
  add    %rbx,%rsi
L356:
  cmp    %r15d,0x4(%rsp)
  jbe    L377
  mov    0x34(%rsp),%eax
  lea    -0x1(%rax),%edi
  mov    $0x0,%edx
L10:
  movzbl 0x0(%r13,%rdx,1),%eax
  movzbl (%rbx,%rdx,1),%ecx
  add    %ecx,%eax
  sar    %eax
  add    (%r12,%rdx,1),%al
  mov    %al,(%rsi,%rdx,1)
  mov    %rdx,%rax
  add    $0x1,%rdx
  cmp    %rdi,%rax
  jne    L10
  jmp    L377
L111:
  cmpl   $0x7,0x28(%rsp)
  jbe    L361
  mov    $0x0,%eax
L313:
  movzbl 0x1(%rbp,%rax,1),%edx
  mov    %dl,(%rbx,%rax,1)
  add    $0x1,%rax
  cmp    %eax,%r15d
  ja     L313
  lea    -0x1(%r15),%ecx
  add    $0x1,%rcx
  cmpl   $0x7,0x28(%rsp)
  mov    $0x1,%eax
  cmovbe %rax,%rcx
  add    %rcx,%r12
  add    %rbx,%rcx
L85:
  cmp    %r15d,0x4(%rsp)
  jbe    L377
  mov    0x34(%rsp),%eax
  lea    -0x1(%rax),%esi
  mov    $0x0,%eax
L199:
  movzbl (%rbx,%rax,1),%edx
  shr    %dl
  add    (%r12,%rax,1),%dl
  mov    %dl,(%rcx,%rax,1)
  mov    %rax,%rdx
  add    $0x1,%rax
  cmp    %rdx,%rsi
  jne    L199
  jmp    L377
L361:
  mov    %rbx,%rcx
  jmp    L85
L363:
  mov    %r13,0x10(%rsp)
  mov    %rbx,%rcx
  jmp    L26
L306:
  cmpl   $0x7,0x28(%rsp)
  jbe    L295
  mov    $0x0,%r13d
L265:
  movzbl 0x1(%rbp,%r13,1),%r14d
  mov    $0x0,%edx
  mov    $0x0,%esi
  mov    $0x0,%edi
  mov    $0x0,%eax
  call   <paeth@plt>
  add    %eax,%r14d
  mov    %r14b,(%rbx,%r13,1)
  add    $0x1,%r13
  cmp    %r13d,%r15d
  ja     L265
  lea    -0x1(%r15),%r14d
  add    $0x1,%r14
  cmpl   $0x7,0x28(%rsp)
  mov    $0x1,%eax
  cmovbe %rax,%r14
  add    %r14,%r12
  add    %rbx,%r14
L53:
  cmp    %r15d,0x4(%rsp)
  jbe    L377
  mov    0x34(%rsp),%eax
  lea    -0x1(%rax),%eax
  mov    $0x0,%ebp
  mov    %r15d,0x10(%rsp)
  mov    %rax,%r15
L141:
  movzbl (%r12,%rbp,1),%r13d
  movzbl (%rbx,%rbp,1),%edi
  mov    $0x0,%edx
  mov    $0x0,%esi
  mov    $0x0,%eax
  call   <paeth@plt>
  add    %eax,%r13d
  mov    %r13b,(%r14,%rbp,1)
  mov    %rbp,%rax
  add    $0x1,%rbp
  cmp    %r15,%rax
  jne    L141
  mov    0x10(%rsp),%r15d
  jmp    L377
L295:
  mov    %rbx,%r14
  jmp    L53
L426:
  add    $0x48,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

assistant: ```c
void png_predict(unsigned char *samples, unsigned int width, unsigned int height, unsigned int n, unsigned int depth) {
  unsigned int stride = (width * n * depth + 7) / 8;
  unsigned int bpp = (n * depth + 7) / 8;
  unsigned int i, row;
  for (row = 0; row < height; row++) {
    unsigned char *src = samples + (unsigned int)((stride + 1) * row);
    unsigned char *dst = samples + (unsigned int)(stride * row);
    unsigned char *a = dst;
    unsigned char *b = dst - stride;
    unsigned char *c = dst - stride;
    switch (*src++) {
    default:
    case 0:
      for (i = 0; i < stride; i++)
        *dst++ = *src++;
      break;
    case 1:
      for (i = 0; i < bpp; i++)
        *dst++ = *src++;
      for (i = bpp; i < stride; i++)
        *dst++ = *src++ + *a++;
      break;
    case 2:
      if (row == 0)
        for (i = 0; i < stride; i++)
          *dst++ = *src++;
      else
        for (i = 0; i < stride; i++)
          *dst++ = *src++ + *b++;
      break;
    case 3:
      if (row == 0) {
        for (i = 0; i < bpp; i++)
          *dst++ = *src++;
        for (i = bpp; i < stride; i++)
          *dst++ = *src++ + (*a++ >> 1);
      } else {
        for (i = 0; i < bpp; i++)
          *dst++ = *src++ + (*b++ >> 1);
        for (i = bpp; i < stride; i++)
          *dst++ = *src++ + ((*b++ + *a++) >> 1);
      }
      break;
    case 4:
      if (row == 0) {
        for (i = 0; i < bpp; i++)
          *dst++ = *src++ + paeth(0, 0, 0);
        for (i = bpp; i < stride; i++)
          *dst++ = *src++ + paeth(*a++, 0, 0);
      } else {
        for (i = 0; i < bpp; i++)
          *dst++ = *src++ + paeth(0, *b++, 0);
        for (i = bpp; i < stride; i++)
          *dst++ = *src++ + paeth(*a++, *b++, *c++);
      }
      break;
    }
  }
}
```