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

```asm
<scale4x_buf>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x88,%rsp
  mov    %rdi,0x28(%rsp)
  mov    %esi,%ebp
  mov    %rdx,%r15
  mov    %ecx,%ebx
  mov    %r8,0x70(%rsp)
  mov    %r9d,0x18(%rsp)
  mov    0xc8(%rsp),%r14d
  mov    0xd8(%rsp),%r13d
  cmpl   $0x3,0xd0(%rsp)
  seta   %dil
  movzbl %dil,%edi
  mov    $0x0,%eax
  call   <assert@plt>
  mov    %ebx,%ebx
  mov    %r15,0x20(%rsp)
  lea    (%r15,%rbx,1),%rsi
  mov    %rsi,(%rsp)
  lea    (%rsi,%rbx,1),%rdx
  mov    %rdx,0x8(%rsp)
  lea    (%rdx,%rbx,1),%rcx
  mov    %rcx,0x10(%rsp)
  lea    (%rcx,%rbx,1),%r12
  lea    (%r12,%rbx,1),%r15
  mov    0x18(%rsp),%r11d
  mov    %r11,0x58(%rsp)
  mov    0x70(%rsp),%rax
  mov    %rax,%rbx
  add    %r11,%rbx
  push   %r13
  push   %r14
  mov    0xd0(%rsp),%r9d
  mov    %rbx,%r8
  mov    %rax,%rcx
  mov    %rax,0x80(%rsp)
  mov    %rax,%rdx
  mov    %r15,%rsi
  mov    %r12,%rdi
  mov    $0x0,%eax
  call   <stage_scale2x@plt>
  mov    0x28(%rsp),%ecx
  lea    (%rcx,%rcx,1),%r11d
  mov    %r11d,0x40(%rsp)
  mov    %r11d,%r10d
  mov    0x80(%rsp),%rax
  mov    %rax,%rdx
  mov    %r10,0x50(%rsp)
  add    %r10,%rdx
  push   %r13
  push   %r14
  mov    0xe0(%rsp),%r9d
  mov    %rdx,0x88(%rsp)
  mov    %rdx,%r8
  mov    %rbx,%rcx
  mov    %rax,0x90(%rsp)
  mov    %rax,%rdx
  mov    0x20(%rsp),%rsi
  mov    0x40(%rsp),%rdi
  mov    $0x0,%eax
  call   <stage_scale2x@plt>
  mov    0x50(%rsp),%r11d
  mov    0x38(%rsp),%ecx
  lea    (%r11,%rcx,1),%r11d
  mov    %r11,0x70(%rsp)
  add    $0x20,%rsp
  push   %r13
  push   %r14
  mov    0xd0(%rsp),%r9d
  mov    0x80(%rsp),%rax
  lea    (%rax,%r11,1),%r8
  mov    0x78(%rsp),%rcx
  mov    %rbx,%rdx
  mov    0x20(%rsp),%rsi
  mov    0x18(%rsp),%rdi
  mov    $0x0,%eax
  call   <stage_scale2x@plt>
  lea    0x0(%rbp,%rbp,1),%eax
  lea    (%rax,%rbp,1),%r11d
  mov    %eax,%r8d
  mov    %ebp,%r10d
  mov    0x38(%rsp),%rbx
  mov    %rbx,%rdx
  mov    %r11,0x48(%rsp)
  add    %r11,%rdx
  mov    %rdx,%rcx
  mov    %rbx,%rdx
  mov    %r8,0x40(%rsp)
  add    %r8,%rdx
  mov    %rbx,%rsi
  mov    %r10,0x38(%rsp)
  add    %r10,%rsi
  mov    %r13d,(%rsp)
  push   %r14
  mov    0xd8(%rsp),%r9d
  push   %r9
  push   0x40(%rsp)
  push   %r15
  mov    %r12,%r9
  mov    %r12,%r8
  mov    %rbx,%rdi
  mov    $0x0,%eax
  call   <stage_scale4x@plt>
  lea    0x0(,%rbp,4),%eax
  mov    %eax,%ebp
  mov    %rbp,0x78(%rsp)
  add    %rbp,%rbx
  add    $0x28,%rsp
  mov    0x40(%rsp),%r11
  lea    (%rbx,%r11,1),%rcx
  mov    0x38(%rsp),%r8
  lea    (%rbx,%r8,1),%rdx
  mov    0x30(%rsp),%r10
  lea    (%rbx,%r10,1),%rsi
  push   %r13
  push   %r14
  mov    0xd8(%rsp),%r11d
  push   %r11
  push   0x28(%rsp)
  push   0x28(%rsp)
  mov    0x50(%rsp),%r9
  mov    %r15,%r8
  mov    %rbx,%rdi
  mov    $0x0,%eax
  call   <stage_scale4x@plt>
  mov    %rbx,%rsi
  add    %rbp,%rsi
  mov    %rsi,0xa8(%rsp)
  add    $0x30,%rsp
  mov    0xd0(%rsp),%edi
  sub    $0x4,%edi
  mov    %edi,0x64(%rsp)
  je     L16
  mov    0x18(%rsp),%eax
  shl    $0x2,%eax
  mov    %eax,%eax
  mov    0x68(%rsp),%rbx
  mov    %rsi,%rbp
  add    0x28(%rsp),%rbp
  sub    0x40(%rsp),%rax
  mov    %rax,0x68(%rsp)
  mov    %r15,0x18(%rsp)
  mov    %rsi,%r15
  jmp    L28
L1:
  mov    0x20(%rsp),%r12
  mov    (%rsp),%rdx
  mov    0x10(%rsp),%rsi
  mov    %rsi,(%rsp)
  mov    0x18(%rsp),%rdi
  mov    %rdi,0x10(%rsp)
  mov    %rdx,0x18(%rsp)
  mov    %rax,0x20(%rsp)
L28:
  mov    0x50(%rsp),%rcx
  sub    0x40(%rsp),%rcx
  add    %rbx,%rcx
  push   %r13
  push   %r14
  mov    0xd0(%rsp),%r9d
  mov    0x78(%rsp),%rax
  lea    (%rax,%rbx,1),%r8
  mov    %rbx,%rdx
  mov    0x28(%rsp),%rsi
  mov    %r12,%rdi
  mov    $0x0,%eax
  call   <stage_scale2x@plt>
  mov    0x48(%rsp),%rcx
  mov    0x38(%rsp),%rax
  sub    %rax,%rcx
  add    %rbp,%rcx
  mov    0x40(%rsp),%rdx
  sub    %rax,%rdx
  add    %rbp,%rdx
  mov    %r13d,(%rsp)
  push   %r14
  mov    0xd8(%rsp),%eax
  push   %rax
  push   %r12
  push   0x38(%rsp)
  mov    0x38(%rsp),%r9
  mov    0x30(%rsp),%r8
  mov    %rbp,%rsi
  mov    %r15,%rdi
  mov    $0x0,%eax
  call   <stage_scale4x@plt>
  mov    0x78(%rsp),%rdi
  add    %rdi,%r15
  add    0x88(%rsp),%rbx
  add    %rdi,%rbp
  mov    0x38(%rsp),%rax
  mov    %r12,0x38(%rsp)
  add    $0x30,%rsp
  subl   $0x1,0x64(%rsp)
  jne    L1
  mov    0x18(%rsp),%r15
  mov    0xd0(%rsp),%eax
  lea    -0x4(%rax),%eax
  mov    %rdi,%rdx
  imul   %rax,%rdx
  add    %rdx,0x78(%rsp)
  imul   0x58(%rsp),%rax
  add    %rax,0x70(%rsp)
L24:
  mov    0x50(%rsp),%rcx
  mov    0x70(%rsp),%rax
  add    %rax,%rcx
  add    0x40(%rsp),%rax
  mov    %rax,%rdx
  push   %r13
  push   %r14
  mov    0xd0(%rsp),%r9d
  mov    %rcx,%r8
  mov    0x10(%rsp),%rsi
  mov    0x30(%rsp),%rdi
  mov    $0x0,%eax
  call   <stage_scale2x@plt>
  mov    0x88(%rsp),%rax
  mov    %rax,%rcx
  mov    0x48(%rsp),%rbp
  add    %rbp,%rcx
  mov    %rax,%rdx
  add    0x40(%rsp),%rdx
  mov    %rax,%rbx
  add    0x38(%rsp),%rbx
  mov    %rbx,%rsi
  mov    %r13d,(%rsp)
  push   %r14
  mov    0xd8(%rsp),%ebx
  push   %rbx
  push   0x40(%rsp)
  push   %r15
  mov    %r12,%r9
  mov    0x40(%rsp),%r8
  mov    %rax,%rbx
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <stage_scale4x@plt>
  mov    %rbx,%rdi
  add    0x78(%rsp),%rdi
  add    $0x28,%rsp
  mov    %rbp,%rcx
  add    %rdi,%rcx
  mov    0x38(%rsp),%rdx
  add    %rdi,%rdx
  mov    0x30(%rsp),%rax
  add    %rdi,%rax
  mov    %rax,%rsi
  push   %r13
  push   %r14
  mov    0xd8(%rsp),%ebx
  push   %rbx
  mov    0x20(%rsp),%rax
  push   %rax
  push   %rax
  mov    0x50(%rsp),%r9
  mov    %r15,%r8
  mov    $0x0,%eax
  call   <stage_scale4x@plt>
  add    $0xb8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L16:
  mov    %r12,0x20(%rsp)
  mov    0x8(%rsp),%r12
  mov    0x10(%rsp),%rax
  mov    (%rsp),%rdi
  mov    %rdi,0x10(%rsp)
  mov    %r15,(%rsp)
  mov    %rax,%r15
  jmp    L24
```

assistant: ```c
void scale4x_buf(void *void_dst, unsigned dst_slice, void *void_mid, unsigned mid_slice, const void *void_src, unsigned src_slice, unsigned pixel, unsigned width, unsigned height, unsigned opt) {
  unsigned char *dst = (unsigned char *)void_dst;
  const unsigned char *src = (const unsigned char *)void_src;
  unsigned count;
  unsigned char *mid[6];
  assert(height >= 4);
  count = height;
  mid[0] = (unsigned char *)void_mid;
  mid[1] = mid[0] + mid_slice;
  mid[2] = mid[1] + mid_slice;
  mid[3] = mid[2] + mid_slice;
  mid[4] = mid[3] + mid_slice;
  mid[5] = mid[4] + mid_slice;
  stage_scale2x((mid[(-2 + 6)]), (mid[(-1 + 6)]), (src + (0) * src_slice), (src + (0) * src_slice), (src + (1) * src_slice), pixel, width, opt);
  stage_scale2x((mid[(0)]), (mid[(1)]), (src + (0) * src_slice), (src + (1) * src_slice), (src + (2) * src_slice), pixel, width, opt);
  stage_scale2x((mid[(2)]), (mid[(3)]), (src + (1) * src_slice), (src + (2) * src_slice), (src + (3) * src_slice), pixel, width, opt);
  stage_scale4x((dst + (0) * dst_slice), (dst + (1) * dst_slice), (dst + (2) * dst_slice), (dst + (3) * dst_slice), (mid[(-2 + 6)]), (mid[(-2 + 6)]), (mid[(-1 + 6)]), (mid[(0)]), pixel, width, opt);
  dst = (dst + (4) * dst_slice);
  stage_scale4x((dst + (0) * dst_slice), (dst + (1) * dst_slice), (dst + (2) * dst_slice), (dst + (3) * dst_slice), (mid[(-1 + 6)]), (mid[(0)]), (mid[(1)]), (mid[(2)]), pixel, width, opt);
  dst = (dst + (4) * dst_slice);
  count -= 4;
  while (count) {
    unsigned char *tmp;
    stage_scale2x((mid[(4)]), (mid[(5)]), (src + (2) * src_slice), (src + (3) * src_slice), (src + (4) * src_slice), pixel, width, opt);
    stage_scale4x((dst + (0) * dst_slice), (dst + (1) * dst_slice), (dst + (2) * dst_slice), (dst + (3) * dst_slice), (mid[(1)]), (mid[(2)]), (mid[(3)]), (mid[(4)]), pixel, width, opt);
    dst = (dst + (4) * dst_slice);
    src = (src + (1) * src_slice);
    tmp = (mid[(0)]);
    (mid[(0)]) = (mid[(2)]);
    (mid[(2)]) = (mid[(4)]);
    (mid[(4)]) = tmp;
    tmp = (mid[(1)]);
    (mid[(1)]) = (mid[(3)]);
    (mid[(3)]) = (mid[(5)]);
    (mid[(5)]) = tmp;
    --count;
  }
  stage_scale2x((mid[(4)]), (mid[(5)]), (src + (2) * src_slice), (src + (3) * src_slice), (src + (3) * src_slice), pixel, width, opt);
  stage_scale4x((dst + (0) * dst_slice), (dst + (1) * dst_slice), (dst + (2) * dst_slice), (dst + (3) * dst_slice), (mid[(1)]), (mid[(2)]), (mid[(3)]), (mid[(4)]), pixel, width, opt);
  dst = (dst + (4) * dst_slice);
  stage_scale4x((dst + (0) * dst_slice), (dst + (1) * dst_slice), (dst + (2) * dst_slice), (dst + (3) * dst_slice), (mid[(3)]), (mid[(4)]), (mid[(5)]), (mid[(5)]), pixel, width, opt);
}
```