user: Demonstrate the C code that generates the assembly output below:

```asm
<vc_image_resize_bytes>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x58,%rsp
  mov    0xa0(%rsp),%eax
  mov    0x90(%rsp),%r11d
  mov    0x98(%rsp),%r10d
  mov    %eax,0xc(%rsp)
  test   %edx,%edx
  jle    L147
  test   %r11d,%r11d
  jle    L147
  mov    %esi,%r15d
  test   %esi,%esi
  jle    L147
  mov    %r9d,%ebx
  test   %r9d,%r9d
  jle    L147
  mov    %rdi,%rbp
  mov    %edx,%r12d
  movslq %ecx,%r14
  mov    %r8,%r13
  cmp    %r9d,%esi
  jne    L248
  cmp    %r11d,%edx
  jne    L248
  cmp    %r8,%rdi
  je     L163
  cmp    %r14d,%esi
  jne    L196
  cmp    %r10d,%r9d
  jne    L196
  imul   %esi,%edx
  add    $0x58,%rsp
  mov    %r8,%rsi
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    1110 <vclib_memcpy@plt>
  nopl   0x0(%rax,%rax,1)
L196:
  movslq %r10d,%rbx
  nopl   0x0(%rax,%rax,1)
L90:
  mov    %r13,%rsi
  mov    %rbp,%rdi
  mov    %r15d,%edx
  add    %r14,%rbp
  call   <vclib_memcpy@plt>
  add    %rbx,%r13
  sub    $0x1,%r12d
  jne    L90
L147:
  add    $0x58,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax)
L248:
  cmp    %r11d,%r12d
  jge    L104
  cmp    %ebx,%r15d
  jge    L32
  lea    (%r12,%r12,1),%eax
  cmp    %r11d,%eax
  jne    L232
  lea    (%r15,%r15,1),%eax
  cmp    %ebx,%eax
  jne    L232
  mov    %r10d,%eax
  or     %r13d,%eax
  or     %r14d,%eax
  or     %ebp,%eax
  or     %r15d,%eax
  or     %r11d,%eax
  test   $0xf,%al
  jne    L232
  lea    0x0(,%r14,8),%eax
  mov    %r10d,%ebx
  cltq
  shl    $0x4,%ebx
  mov    %rax,0x10(%rsp)
  movslq %ebx,%rbx
  mov    %rbx,0x18(%rsp)
  mov    %r12d,%ebx
  mov    %r13,%r12
  mov    %r10d,%r13d
  nopw   0x0(%rax,%rax,1)
L220:
  mov    0xc(%rsp),%r9d
  mov    %r12,%rsi
  mov    %rbp,%rdi
  mov    %r13d,%r8d
  mov    %r14d,%ecx
  mov    %r15d,%edx
  sub    $0x8,%ebx
  call   <vcir8_down2_8@plt>
  add    0x10(%rsp),%rbp
  add    0x18(%rsp),%r12
  test   %ebx,%ebx
  jg     L220
  jmp    L147
  nopw   0x0(%rax,%rax,1)
L104:
  mov    %r12d,%eax
  mov    %r13,%r8
  mov    %r11d,%edx
  mov    %ebx,%r9d
  sub    %r11d,%eax
  mov    %r14d,%ecx
  mov    %r15d,%esi
  imul   %r14d,%eax
  cltq
  lea    0x0(%rbp,%rax,1),%rdi
  mov    0xc(%rsp),%eax
  push   %rax
  push   %r10
  mov    %r11d,0x20(%rsp)
  mov    %rdi,0x28(%rsp)
  call   <vcir8_hzoom@plt>
  pop    %rdi
  pop    %r8
  mov    0x10(%rsp),%r11d
  cmp    %r11d,%r12d
  je     L147
  mov    0xc(%rsp),%eax
  mov    %r14d,%r9d
  mov    %r14d,%ecx
  mov    %r15d,%esi
  mov    %rbp,%rdi
  push   %rax
  lea    -0x1(%r11),%eax
  push   %rax
  mov    %r11d,%eax
  shl    $0x10,%eax
  cltd
  idiv   %r12d
  mov    %r12d,%edx
  push   %rax
  push   $0x0
  mov    0x38(%rsp),%r8
  call   <vcir8_vzoom2@plt>
  add    $0x20,%rsp
  jmp    L147
L232:
  xor    %edi,%edi
  mov    %r10d,0x28(%rsp)
  mov    %r11d,0x18(%rsp)
  call   <vclib_obtain_tmp_buf@plt>
  mov    %rax,0x38(%rsp)
  xor    %eax,%eax
  call   <vclib_get_tmp_buf_size@plt>
  lea    0xf(%rbx),%edx
  mov    0x18(%rsp),%r11d
  movl   $0x40,0x20(%rsp)
  and    $0xfffffff0,%edx
  mov    0x28(%rsp),%r10d
  mov    %edx,0x10(%rsp)
  mov    %edx,%edi
  shl    $0x6,%edx
  cmp    %eax,%edx
  jg     L82
L85:
  mov    %r11d,%eax
  lea    -0x1(%r11),%ecx
  mov    %r15d,0x34(%rsp)
  xor    %r11d,%r11d
  shl    $0x10,%eax
  mov    %ecx,0x2c(%rsp)
  mov    0x20(%rsp),%ecx
  mov    %rbp,%r15
  cltd
  mov    0x38(%rsp),%rbp
  mov    %r14d,0x40(%rsp)
  idiv   %r12d
  movl   $0x0,0x18(%rsp)
  mov    %ecx,%edx
  imul   %eax,%edx
  mov    %eax,0x30(%rsp)
  mov    %ecx,%eax
  imul   %r14d,%eax
  mov    %r12d,%r14d
  mov    %r11d,%r12d
  mov    %r10d,%r11d
  mov    %r13,%r10
  mov    %ebx,%r13d
  mov    %ecx,%ebx
  mov    %edx,0x44(%rsp)
  cltq
  mov    %rax,0x48(%rsp)
  nopl   0x0(%rax)
L99:
  mov    %r12d,%eax
  add    %ebx,%r12d
  cmp    %r14d,%r12d
  jle    L219
  mov    %r14d,%r12d
  mov    %r15,%rbp
  mov    0x40(%rsp),%r14d
  mov    0x34(%rsp),%r15d
  sub    %eax,%r12d
  mov    0xc(%rsp),%eax
  mov    %r13d,%ebx
  mov    %r11d,%r9d
  mov    %r10,%r8
  mov    %r12d,%edx
  push   %rax
  mov    0x34(%rsp),%esi
  push   %rsi
  mov    0x40(%rsp),%ecx
  push   %rcx
  mov    0x30(%rsp),%esi
  push   %rsi
  mov    0x30(%rsp),%r13d
  mov    %ebx,%esi
  mov    0x58(%rsp),%rdi
  mov    %r13d,%ecx
  call   <vcir8_vzoom2@plt>
  mov    0x2c(%rsp),%eax
  add    $0x20,%rsp
  mov    %r14d,%ecx
  mov    %r15d,%esi
  mov    %ebx,%r9d
  mov    %r12d,%edx
  mov    %rbp,%rdi
  push   %rax
  push   %r13
  mov    0x48(%rsp),%r8
  call   <vcir8_hzoom@plt>
  pop    %rcx
  pop    %rsi
L257:
  mov    0x38(%rsp),%rdi
  add    $0x58,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    1100 <vclib_release_tmp_buf@plt>
  nopl   0x0(%rax)
L219:
  mov    0xc(%rsp),%eax
  mov    %r11d,%r9d
  mov    %r10,%r8
  mov    %ebx,%edx
  mov    %r13d,%esi
  push   %rax
  mov    0x34(%rsp),%ecx
  push   %rcx
  mov    0x40(%rsp),%edi
  push   %rdi
  mov    0x30(%rsp),%eax
  mov    %rbp,%rdi
  push   %rax
  mov    0x30(%rsp),%ecx
  mov    %r11d,0x48(%rsp)
  mov    %r10,0x40(%rsp)
  call   <vcir8_vzoom2@plt>
  mov    0x2c(%rsp),%esi
  add    $0x20,%rsp
  mov    %ebx,%edx
  mov    %r15,%rdi
  mov    %r13d,%r9d
  mov    %rbp,%r8
  push   %rsi
  mov    0x18(%rsp),%ecx
  push   %rcx
  mov    0x50(%rsp),%ecx
  mov    0x44(%rsp),%esi
  call   <vcir8_hzoom@plt>
  mov    0x54(%rsp),%edx
  add    0x58(%rsp),%r15
  add    %edx,0x28(%rsp)
  cmp    %r14d,%r12d
  pop    %rax
  pop    %rdx
  mov    0x20(%rsp),%r10
  mov    0x28(%rsp),%r11d
  jl     L99
  jmp    L257
  nopw   0x0(%rax,%rax,1)
L82:
  shl    $0x5,%edi
  movl   $0x20,0x20(%rsp)
  cmp    %eax,%edi
  jle    L85
  cltd
  idivl  0x10(%rsp)
  mov    $0x10,%edx
  cmp    %edx,%eax
  cmovle %eax,%edx
  xor    %edi,%edi
  test   %eax,%eax
  setg   %dil
  mov    %edx,0x20(%rsp)
  call   <assert@plt>
  mov    0x28(%rsp),%r10d
  mov    0x18(%rsp),%r11d
  jmp    L85
  nopw   0x0(%rax,%rax,1)
L163:
  xor    %edi,%edi
  cmp    %r10d,%r14d
  sete   %dil
  add    $0x58,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    10d0 <assert@plt>
  nopl   0x0(%rax)
L32:
  mov    %r15d,%eax
  mov    %r10d,%r9d
  mov    %r13,%r8
  mov    %r14d,%ecx
  sub    %ebx,%eax
  mov    %ebx,%esi
  cltq
  lea    0x0(%rbp,%rax,1),%rdi
  mov    0xc(%rsp),%eax
  push   %rax
  lea    -0x1(%r11),%eax
  push   %rax
  mov    %r11d,%eax
  shl    $0x10,%eax
  cltd
  idiv   %r12d
  mov    %r12d,%edx
  push   %rax
  push   $0x0
  mov    %rdi,0x30(%rsp)
  call   <vcir8_vzoom2@plt>
  add    $0x20,%rsp
  cmp    %ebx,%r15d
  je     L147
  mov    0xc(%rsp),%eax
  mov    0x10(%rsp),%r8
  mov    %ebx,%r9d
  mov    %r14d,%ecx
  mov    %r14d,0x90(%rsp)
  mov    %r12d,%edx
  mov    %r15d,%esi
  mov    %rbp,%rdi
  mov    %eax,0x98(%rsp)
  add    $0x58,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    10c0 <vcir8_hzoom@plt>
```

assistant: ```c
void vc_image_resize_bytes(unsigned char *dest, int destw, int desth, int dest_pitch, const unsigned char *src, int srcw, int srch, int src_pitch, int smooth_flag) {
  if (desth <= 0 || srch <= 0 || destw <= 0 || srcw <= 0)
    return;
  if (destw == srcw && desth == srch) {
    if (dest == src) {
      assert(dest_pitch == src_pitch);
      return;
    }
    if (dest_pitch == destw && src_pitch == srcw) {
      vclib_memcpy(dest, src, destw * desth);
    } else {
      do {
        vclib_memcpy(dest, src, destw);
        dest += dest_pitch;
        src += src_pitch;
      } while (--desth > 0);
    }
  } else if (desth >= srch) {
    unsigned char *ptr = dest + dest_pitch * (desth - srch);
    vcir8_hzoom(ptr, destw, srch, dest_pitch, src, srcw, src_pitch, smooth_flag);
    if (desth != srch) {
      vcir8_vzoom2(dest, destw, desth, dest_pitch, ptr, dest_pitch, 0, (srch << 16) / desth, srch - 1, smooth_flag);
    }
  } else if (destw >= srcw) {
    unsigned char *ptr = dest + (destw - srcw);
    vcir8_vzoom2(ptr, srcw, desth, dest_pitch, src, src_pitch, 0, (srch << 16) / desth, srch - 1, smooth_flag);
    if (destw != srcw) {
      vcir8_hzoom(dest, destw, desth, dest_pitch, ptr, srcw, dest_pitch, smooth_flag);
    }
  } else {
    int i, j, step, pos, buf_pitch, buf_size;
    unsigned char *bufptr;
    if (desth * 2 == srch && destw * 2 == srcw && ((destw | srch | dest_pitch | src_pitch | ((int)dest) | ((int)src)) & 15) == 0) {
      while (desth > 0) {
        vcir8_down2_8(dest, src, destw, dest_pitch, src_pitch, smooth_flag);
        dest += dest_pitch << 3;
        src += src_pitch << 4;
        desth -= 8;
      }
      return;
    }
    bufptr = vclib_obtain_tmp_buf(0);
    buf_size = vclib_get_tmp_buf_size();
    buf_pitch = (srcw + 15) & ~15;
    j = 64;
    if (buf_pitch * j > buf_size) {
      j = 32;
      if (buf_pitch * j > buf_size) {
        j = buf_size / buf_pitch;
        if (j > 16)
          j = 16;
        assert(j > 0);
      }
    }
    pos = 0;
    step = (srch << 16) / desth;
    for (i = 0; i < desth; i += j) {
      if (i + j > desth) {
        j = desth - i;
      }
      vcir8_vzoom2(bufptr, srcw, j, buf_pitch, src, src_pitch, pos, step, srch - 1, smooth_flag);
      vcir8_hzoom(dest, destw, j, dest_pitch, bufptr, srcw, buf_pitch, smooth_flag);
      pos += j * step;
      dest += j * dest_pitch;
    }
    vclib_release_tmp_buf(bufptr);
  }
}
```