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

```asm
<YVU9toI420>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  mov    %rdi,%r12
  push   %rbp
  mov    %edx,%ebp
  push   %rbx
  mov    %ecx,%ebx
  sub    $0x58,%rsp
  mov    0xa0(%rsp),%rcx
  mov    %r8d,0x3c(%rsp)
  mov    %r9d,0x38(%rsp)
  mov    %rcx,0x8(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0x48(%rsp)
  xor    %eax,%eax
  lea    0x44(%rsp),%rax
  push   %rax
  lea    0x48(%rsp),%rax
  push   %rax
  mov    0xe8(%rsp),%eax
  push   %rax
  mov    0xe8(%rsp),%eax
  push   %rax
  mov    0xe8(%rsp),%eax
  push   %rax
  mov    0xe8(%rsp),%eax
  push   %rax
  mov    0xe8(%rsp),%eax
  push   %rax
  mov    0xe8(%rsp),%eax
  push   %rax
  mov    0xe8(%rsp),%eax
  push   %rax
  push   %rcx
  mov    0xe8(%rsp),%eax
  mov    %ebx,%ecx
  push   %rax
  mov    0xe8(%rsp),%eax
  push   %rax
  call   <chk_args@plt>
  add    $0x60,%rsp
  test   %eax,%eax
  je     L128
  mov    0x40(%rsp),%r8d
  lea    0xd0(%rsp),%rcx
  lea    0xc0(%rsp),%rdx
  lea    0x3c(%rsp),%rdi
  lea    0x90(%rsp),%rsi
  call   <adjust_range@plt>
  test   %eax,%eax
  jne    L74
L62:
  movl   $0x0,0x2c(%rsp)
L3:
  mov    0x48(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L66
  mov    0x2c(%rsp),%eax
  add    $0x58,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopw   0x0(%rax,%rax,1)
L74:
  mov    0x44(%rsp),%r8d
  lea    0xd8(%rsp),%rcx
  lea    0xc8(%rsp),%rdx
  lea    0x98(%rsp),%rsi
  lea    0x38(%rsp),%rdi
  call   <adjust_range@plt>
  test   %eax,%eax
  je     L62
  mov    0xc0(%rsp),%edx
  test   $0x1,%dl
  jne    L128
  mov    0xc8(%rsp),%r10d
  mov    %r10d,%eax
  and    $0x1,%eax
  mov    %eax,0x2c(%rsp)
  jne    L128
  test   %ebx,%ebx
  jle    L128
  mov    0xb8(%rsp),%esi
  test   %esi,%esi
  jle    L128
  mov    0xb8(%rsp),%ecx
  movslq %edx,%rax
  movslq 0x3c(%rsp),%rsi
  imul   %r10d,%ecx
  mov    %rsi,%r11
  movslq %ecx,%rcx
  add    %rax,%rcx
  mov    0x8(%rsp),%rax
  lea    (%rax,%rcx,1),%r13
  mov    0x38(%rsp),%eax
  mov    0x98(%rsp),%ecx
  mov    %eax,%edi
  imul   %ebx,%edi
  movslq %edi,%rdi
  add    %rsi,%rdi
  lea    (%r12,%rdi,1),%r14
  test   %ecx,%ecx
  jle    L58
  movslq 0xb8(%rsp),%rax
  movslq %ebx,%rsi
  xor    %r15d,%r15d
  mov    %ebp,0x10(%rsp)
  mov    %ebx,0x18(%rsp)
  mov    %r15d,%ebp
  mov    %r14,%rbx
  mov    %rsi,%r15
  mov    %rax,%r14
  nopw   0x0(%rax,%rax,1)
L152:
  mov    0x90(%rsp),%edx
  mov    %r13,%rsi
  mov    %rbx,%rdi
  add    %r14,%r13
  add    %r15,%rbx
  add    $0x1,%ebp
  call   <memcpy@plt>
  cmp    %ebp,0x98(%rsp)
  jg     L152
  mov    0x10(%rsp),%ebp
  mov    0x18(%rsp),%ebx
  mov    0xc0(%rsp),%edx
  mov    0xc8(%rsp),%r10d
  mov    0x3c(%rsp),%r11d
  mov    0x38(%rsp),%eax
L58:
  mov    0xb0(%rsp),%esi
  imul   0xb8(%rsp),%esi
  mov    0x8(%rsp),%r15
  test   %esi,%esi
  lea    0xf(%rsi),%ecx
  cmovns %esi,%ecx
  imul   %ebx,%ebp
  movslq %esi,%rsi
  sar    $0x4,%ecx
  mov    %ecx,0x30(%rsp)
  test   %ebp,%ebp
  lea    0x3(%rbp),%ecx
  cmovns %ebp,%ecx
  movslq %ebp,%rbp
  sar    $0x2,%ecx
  test   %r10d,%r10d
  mov    %ecx,0x34(%rsp)
  lea    0x3(%r10),%ecx
  cmovns %r10d,%ecx
  sar    $0x2,%ecx
  imul   0xb8(%rsp),%ecx
  test   %ecx,%ecx
  lea    0x3(%rcx),%r9d
  cmovns %ecx,%r9d
  lea    0x3(%rdx),%ecx
  sar    $0x2,%r9d
  test   %edx,%edx
  cmovns %edx,%ecx
  movslq %r9d,%r9
  sar    $0x2,%ecx
  movslq %ecx,%rcx
  add    %rsi,%rcx
  add    %rcx,%r9
  mov    %eax,%ecx
  shr    $0x1f,%ecx
  add    %r9,%r15
  add    %ecx,%eax
  sar    %eax
  imul   %ebx,%eax
  mov    %eax,%r8d
  shr    $0x1f,%r8d
  add    %eax,%r8d
  mov    %r11d,%eax
  shr    $0x1f,%eax
  sar    %r8d
  add    %r11d,%eax
  movslq %r8d,%r8
  sar    %eax
  cltq
  add    %rbp,%rax
  add    %rax,%r8
  and    $0x2,%r10d
  lea    (%r12,%r8,1),%r13
  jne    L26
  mov    0x98(%rsp),%edx
L32:
  cmp    $0x3,%edx
  jle    L160
  mov    %ebx,%ebp
  movslq 0x34(%rsp),%r12
  mov    0xb8(%rsp),%r14d
  sar    %ebp
  movslq %ebp,%rbp
  sar    $0x2,%r14d
  lea    0x0(%rbp,%r12,1),%rax
  mov    %rax,0x8(%rsp)
  movslq %r14d,%rax
  xor    %r14d,%r14d
  mov    %rax,0x10(%rsp)
  movslq %ebx,%rax
  mov    %r15,%rbx
  mov    %rax,0x18(%rsp)
  movslq 0x30(%rsp),%rax
  mov    %rax,0x20(%rsp)
  nopl   0x0(%rax)
L63:
  mov    %rbx,%rsi
  mov    %r13,%rdi
  lea    (%r12,%r13,1),%r15
  add    $0x1,%r14d
  mov    0x90(%rsp),%ecx
  mov    0xc0(%rsp),%edx
  call   <lineYVU9toI420@plt>
  mov    0x90(%rsp),%eax
  lea    0x0(%rbp,%r13,1),%rdi
  mov    %r13,%rsi
  mov    %eax,%edx
  shr    $0x1f,%edx
  add    %eax,%edx
  sar    %edx
  call   <memcpy@plt>
  mov    0x20(%rsp),%rax
  mov    0x90(%rsp),%ecx
  mov    %r15,%rdi
  mov    0xc0(%rsp),%edx
  lea    (%rbx,%rax,1),%rsi
  call   <lineYVU9toI420@plt>
  mov    0x90(%rsp),%eax
  mov    %r15,%rsi
  mov    %eax,%edx
  shr    $0x1f,%edx
  add    %eax,%edx
  mov    0x8(%rsp),%rax
  sar    %edx
  lea    (%rax,%r13,1),%rdi
  call   <memcpy@plt>
  add    0x10(%rsp),%rbx
  add    0x18(%rsp),%r13
  mov    0x98(%rsp),%edx
  test   %edx,%edx
  lea    0x3(%rdx),%eax
  cmovns %edx,%eax
  sar    $0x2,%eax
  cmp    %r14d,%eax
  jg     L63
  mov    %rbx,%r15
L160:
  and    $0x2,%edx
  je     L62
  mov    0x90(%rsp),%ecx
  mov    0xc0(%rsp),%edx
  mov    %r15,%rsi
  mov    %r13,%rdi
  call   <lineYVU9toI420@plt>
  movslq 0x30(%rsp),%rax
  mov    0x90(%rsp),%ecx
  mov    0xc0(%rsp),%edx
  lea    (%r15,%rax,1),%rsi
  movslq 0x34(%rsp),%rax
  lea    0x0(%r13,%rax,1),%rdi
  call   <lineYVU9toI420@plt>
  jmp    L3
  nopl   0x0(%rax,%rax,1)
L26:
  mov    0x90(%rsp),%ecx
  mov    %r15,%rsi
  mov    %r13,%rdi
  call   <lineYVU9toI420@plt>
  movslq 0x30(%rsp),%rsi
  movslq 0x34(%rsp),%rdi
  mov    0xc0(%rsp),%edx
  mov    0x90(%rsp),%ecx
  add    %r15,%rsi
  add    %r13,%rdi
  call   <lineYVU9toI420@plt>
  mov    0xb8(%rsp),%eax
  sar    $0x2,%eax
  cltq
  add    %rax,%r15
  mov    %ebx,%eax
  sar    %eax
  cltq
  add    %rax,%r13
  mov    0x98(%rsp),%eax
  lea    -0x2(%rax),%edx
  mov    %edx,0x98(%rsp)
  jmp    L32
  nopl   0x0(%rax,%rax,1)
L128:
  movl   $0xffffffff,0x2c(%rsp)
  jmp    L3
L66:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
int YVU9toI420(unsigned char *dest_ptr, int dest_width, int dest_height, int dest_pitch, int dest_x, int dest_y, int dest_dx, int dest_dy, unsigned char *src_ptr, int src_width, int src_height, int src_pitch, int src_x, int src_y, int src_dx, int src_dy) {
  int scale_x, scale_y;
  if (!chk_args(dest_ptr, dest_width, dest_height, dest_pitch, dest_x, dest_y, dest_dx, dest_dy, src_ptr, src_width, src_height, src_pitch, src_x, src_y, src_dx, src_dy, &scale_x, &scale_y))
    return -1;
  if (!adjust_range(&dest_x, &dest_dx, &src_x, &src_dx, scale_x) || !adjust_range(&dest_y, &dest_dy, &src_y, &src_dy, scale_y))
    return 0;
  if ((src_x & 1) || (src_y & 1))
    return -1;
  if (dest_pitch <= 0 || src_pitch <= 0)
    return -1;
  {
    unsigned char *s, *d;
    int src_uv_offs, dest_uv_offs;
    register int j;
    s = src_ptr + src_x + src_y * src_pitch;
    d = dest_ptr + dest_x + dest_y * dest_pitch;
    for (j = 0; j < dest_dy; j++) {
      memcpy(d, s, dest_dx);
      s += src_pitch;
      d += dest_pitch;
    }
    src_uv_offs = src_height * src_pitch / 16;
    dest_uv_offs = dest_height * dest_pitch / 4;
    s = (src_ptr + src_height * src_pitch) + src_x / 4 + src_y / 4 * src_pitch / 4;
    d = (dest_ptr + dest_height * dest_pitch) + dest_x / 2 + dest_y / 2 * dest_pitch / 2;
    if (src_y & 2) {
      lineYVU9toI420(d, s, src_x, dest_dx);
      lineYVU9toI420(d + dest_uv_offs, s + src_uv_offs, src_x, dest_dx);
      s += src_pitch / 4;
      d += dest_pitch / 2;
      dest_dy -= 2;
    }
    for (j = 0; j < dest_dy / 4; j++) {
      lineYVU9toI420(d, s, src_x, dest_dx);
      memcpy(d + dest_pitch / 2, d, dest_dx / 2);
      lineYVU9toI420(d + dest_uv_offs, s + src_uv_offs, src_x, dest_dx);
      memcpy(d + dest_pitch / 2 + dest_uv_offs, d + dest_uv_offs, dest_dx / 2);
      s += src_pitch / 4;
      d += dest_pitch;
    }
    if (dest_dy & 2) {
      lineYVU9toI420(d, s, src_x, dest_dx);
      lineYVU9toI420(d + dest_uv_offs, s + src_uv_offs, src_x, dest_dx);
    }
  }
  return 0;
}
```