Given the following C code and unoptimized assembly code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include<stdio.h>

void quick(int a[],int left,int right);

int main(){
  int N,ans=1;
  scanf("%d",&N);
  int D[N];
  for (int i = 0; i < N; i++){ scanf("%d",&D[i]);}
  int M;
  scanf("%d",&M);
  int T[M];
  for (int i = 0; i < M; i++){ scanf("%d",&T[i]);}

  quick(D,0,N-1);
  quick(T,0,M-1);

  int i=0,j=0,k=0,count_T=0,count_D=0;
  while (i<M&&N>=M)
  {
    while (T[i]==T[k]&&k<M){ count_T++; k++;}
    while (T[i]!=D[j]&&j<N){ j++; }
    while (T[i]==D[j]&&j<N){ count_D++; j++; }
    if(count_D<count_T){
      ans=1;
      break;
    }else{
      ans=0;
    }
    
    i=k;
    count_D=0;
    count_T=0;
  }

  ans > 0 ? puts("NO") : puts("YES");
  
  return 0;
}

void quick(int a[],int left,int right)
{
    int s,t,i,j;

    if (left<right){
        s=a[left];            
        i=left; j=right+1;      
        while (1){              
            while (a[++i]<s);
            while (a[--j]>s);
            if (i>=j) break;
            t=a[i]; a[i]=a[j]; a[j]=t;
        }
        a[left]=a[j]; a[j]=s;

        quick(a,left,j-1);
        quick(a,j+1,right);
    }
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"NO"
.LC2:
	.string	"YES"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$120, %rsp
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	movq	%rsp, %rax
	movq	%rax, %rbx
	movl	$1, -120(%rbp)
	leaq	-128(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-128(%rbp), %eax
	movslq	%eax, %rdx
	subq	$1, %rdx
	movq	%rdx, -88(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, -144(%rbp)
	movq	$0, -136(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, -160(%rbp)
	movq	$0, -152(%rbp)
	cltq
	leaq	0(,%rax,4), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %esi
	movl	$0, %edx
	divq	%rsi
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L2:
	cmpq	%rdx, %rsp
	je	.L3
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L2
.L3:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L4
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L4:
	movq	%rsp, %rax
	addq	$3, %rax
	shrq	$2, %rax
	salq	$2, %rax
	movq	%rax, -80(%rbp)
	movl	$0, -116(%rbp)
	jmp	.L5
.L6:
	movl	-116(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-80(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -116(%rbp)
.L5:
	movl	-128(%rbp), %eax
	cmpl	%eax, -116(%rbp)
	jl	.L6
	leaq	-124(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-124(%rbp), %eax
	movslq	%eax, %rdx
	subq	$1, %rdx
	movq	%rdx, -72(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, %r14
	movl	$0, %r15d
	movslq	%eax, %rdx
	movq	%rdx, %r12
	movl	$0, %r13d
	cltq
	leaq	0(,%rax,4), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %esi
	movl	$0, %edx
	divq	%rsi
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L7:
	cmpq	%rdx, %rsp
	je	.L8
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L7
.L8:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L9
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L9:
	movq	%rsp, %rax
	addq	$3, %rax
	shrq	$2, %rax
	salq	$2, %rax
	movq	%rax, -64(%rbp)
	movl	$0, -112(%rbp)
	jmp	.L10
.L11:
	movl	-112(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-64(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -112(%rbp)
.L10:
	movl	-124(%rbp), %eax
	cmpl	%eax, -112(%rbp)
	jl	.L11
	movl	-128(%rbp), %eax
	leal	-1(%rax), %edx
	movq	-80(%rbp), %rax
	movl	$0, %esi
	movq	%rax, %rdi
	call	quick
	movl	-124(%rbp), %eax
	leal	-1(%rax), %edx
	movq	-64(%rbp), %rax
	movl	$0, %esi
	movq	%rax, %rdi
	call	quick
	movl	$0, -108(%rbp)
	movl	$0, -104(%rbp)
	movl	$0, -100(%rbp)
	movl	$0, -96(%rbp)
	movl	$0, -92(%rbp)
	jmp	.L12
.L15:
	addl	$1, -96(%rbp)
	addl	$1, -100(%rbp)
.L13:
	movq	-64(%rbp), %rax
	movl	-108(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %ecx
	movq	-64(%rbp), %rax
	movl	-100(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %eax
	cmpl	%eax, %ecx
	jne	.L16
	movl	-124(%rbp), %eax
	cmpl	%eax, -100(%rbp)
	jl	.L15
	jmp	.L16
.L18:
	addl	$1, -104(%rbp)
.L16:
	movq	-64(%rbp), %rax
	movl	-108(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %ecx
	movq	-80(%rbp), %rax
	movl	-104(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %eax
	cmpl	%eax, %ecx
	je	.L19
	movl	-128(%rbp), %eax
	cmpl	%eax, -104(%rbp)
	jl	.L18
	jmp	.L19
.L21:
	addl	$1, -92(%rbp)
	addl	$1, -104(%rbp)
.L19:
	movq	-64(%rbp), %rax
	movl	-108(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %ecx
	movq	-80(%rbp), %rax
	movl	-104(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %eax
	cmpl	%eax, %ecx
	jne	.L20
	movl	-128(%rbp), %eax
	cmpl	%eax, -104(%rbp)
	jl	.L21
.L20:
	movl	-92(%rbp), %eax
	cmpl	-96(%rbp), %eax
	jge	.L22
	movl	$1, -120(%rbp)
	jmp	.L23
.L22:
	movl	$0, -120(%rbp)
	movl	-100(%rbp), %eax
	movl	%eax, -108(%rbp)
	movl	$0, -92(%rbp)
	movl	$0, -96(%rbp)
.L12:
	movl	-124(%rbp), %eax
	cmpl	%eax, -108(%rbp)
	jge	.L23
	movl	-128(%rbp), %edx
	movl	-124(%rbp), %eax
	cmpl	%eax, %edx
	jge	.L13
.L23:
	cmpl	$0, -120(%rbp)
	jle	.L25
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L26
.L25:
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
.L26:
	movl	$0, %eax
	movq	%rbx, %rsp
	movq	-56(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L28
	call	__stack_chk_fail@PLT
.L28:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.globl	quick
	.type	quick, @function
quick:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movq	%rdi, -24(%rbp)
	movl	%esi, -28(%rbp)
	movl	%edx, -32(%rbp)
	movl	-28(%rbp), %eax
	cmpl	-32(%rbp), %eax
	jge	.L37
	movl	-28(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	movl	%eax, -8(%rbp)
	movl	-28(%rbp), %eax
	movl	%eax, -16(%rbp)
	movl	-32(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -12(%rbp)
.L35:
	nop
.L31:
	addl	$1, -16(%rbp)
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	cmpl	%eax, -8(%rbp)
	jg	.L31
	nop
.L32:
	subl	$1, -12(%rbp)
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	cmpl	%eax, -8(%rbp)
	jl	.L32
	movl	-16(%rbp), %eax
	cmpl	-12(%rbp), %eax
	jge	.L38
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	movl	%eax, -4(%rbp)
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	-16(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	movq	-24(%rbp), %rdx
	addq	%rcx, %rdx
	movl	(%rax), %eax
	movl	%eax, (%rdx)
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rax, %rdx
	movl	-4(%rbp), %eax
	movl	%eax, (%rdx)
	jmp	.L35
.L38:
	nop
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	-28(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	movq	-24(%rbp), %rdx
	addq	%rcx, %rdx
	movl	(%rax), %eax
	movl	%eax, (%rdx)
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rax, %rdx
	movl	-8(%rbp), %eax
	movl	%eax, (%rdx)
	movl	-12(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-28(%rbp), %ecx
	movq	-24(%rbp), %rax
	movl	%ecx, %esi
	movq	%rax, %rdi
	call	quick
	movl	-12(%rbp), %eax
	leal	1(%rax), %ecx
	movl	-32(%rbp), %edx
	movq	-24(%rbp), %rax
	movl	%ecx, %esi
	movq	%rax, %rdi
	call	quick
.L37:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	quick, .-quick
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
```

Only output the optimized assembly code. Do not include any other text. Do not write any comments in the assembly code. Wrap the assembly code in ```assembly``` tags.
user
	.file	"temp.c"
	.text
	.p2align 4
	.globl	quick
	.type	quick, @function
quick:
.LFB24:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$104, %rsp
	.cfi_def_cfa_offset 160
	movl	%edx, 88(%rsp)
	cmpl	%edx, %esi
	jge	.L1
	movl	%edx, %eax
	movq	%rdi, %r15
	movl	%esi, %r14d
	addl	$1, %eax
	movl	%eax, 84(%rsp)
.L8:
	movslq	%r14d, %r12
	leal	1(%r14), %r8d
	movl	84(%rsp), %edx
	leaq	(%r15,%r12,4), %r10
	movslq	%r8d, %rax
	movl	(%r10), %ecx
.L3:
	movl	(%r15,%rax,4), %r11d
	cmpl	%ecx, %r11d
	jl	.L4
	movslq	%edx, %rsi
	leaq	-4(%r15,%rsi,4), %r9
.L5:
	movq	%r9, %rdi
	movl	(%r9), %esi
	movl	%edx, 12(%rsp)
	subq	$4, %r9
	subl	$1, %edx
	cmpl	%ecx, %esi
	jg	.L5
	cmpl	%eax, %edx
	jle	.L6
	movl	%esi, (%r15,%rax,4)
	movl	%r11d, (%rdi)
.L4:
	addq	$1, %rax
	jmp	.L3
.L1:
	addq	$104, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
.L6:
	.cfi_restore_state
	movl	12(%rsp), %eax
	movl	%esi, (%r10)
	movl	%edx, 44(%rsp)
	subl	$2, %eax
	movl	%ecx, (%rdi)
	movl	%eax, 40(%rsp)
	cmpl	%r14d, %eax
	jle	.L14
	movl	%r8d, %eax
	movl	%r14d, %r8d
	movl	%eax, %r14d
.L7:
	leaq	(%r15,%r12,4), %r10
	movl	44(%rsp), %edx
	movslq	%r14d, %rax
	movl	(%r10), %ecx
.L9:
	movl	(%r15,%rax,4), %r11d
	cmpl	%r11d, %ecx
	jg	.L10
	movslq	%edx, %rsi
	leaq	-4(%r15,%rsi,4), %r9
.L11:
	movq	%r9, %rdi
	movl	(%r9), %esi
	movl	%edx, 28(%rsp)
	subq	$4, %r9
	subl	$1, %edx
	cmpl	%esi, %ecx
	jl	.L11
	cmpl	%eax, %edx
	jle	.L12
	movl	%esi, (%r15,%rax,4)
	movl	%r11d, (%rdi)
.L10:
	addq	$1, %rax
	jmp	.L9
.L14:
	movl	88(%rsp), %ebx
	cmpl	%ebx, 12(%rsp)
	jge	.L1
	movl	12(%rsp), %r14d
	jmp	.L8
.L12:
	movl	28(%rsp), %eax
	movl	%esi, (%r10)
	movl	%r14d, %r11d
	movl	%edx, 48(%rsp)
	subl	$2, %eax
	movl	%ecx, (%rdi)
	movl	%eax, 52(%rsp)
	cmpl	%r8d, %eax
	jle	.L20
.L13:
	leaq	(%r15,%r12,4), %r10
	movl	48(%rsp), %edx
	movslq	%r11d, %rax
	movl	(%r10), %ecx
.L15:
	movl	(%r15,%rax,4), %ebx
	cmpl	%ebx, %ecx
	jg	.L16
	movslq	%edx, %rsi
	leaq	-4(%r15,%rsi,4), %r9
.L17:
	movq	%r9, %rdi
	movl	(%r9), %esi
	movl	%edx, 8(%rsp)
	subq	$4, %r9
	subl	$1, %edx
	cmpl	%esi, %ecx
	jl	.L17
	cmpl	%eax, %edx
	jle	.L18
	movl	%esi, (%r15,%rax,4)
	movl	%ebx, (%rdi)
.L16:
	addq	$1, %rax
	jmp	.L15
.L20:
	movl	28(%rsp), %ebx
	cmpl	%ebx, 40(%rsp)
	jle	.L14
	movslq	%ebx, %r12
	movq	%r12, %r8
	leal	1(%r12), %r14d
	jmp	.L7
.L18:
	movl	8(%rsp), %eax
	movl	%esi, (%r10)
	movl	%r8d, %r14d
	movl	%edx, 56(%rsp)
	subl	$2, %eax
	movl	%ecx, (%rdi)
	movl	%eax, 60(%rsp)
	cmpl	%r8d, %eax
	jle	.L26
.L19:
	leaq	(%r15,%r12,4), %r8
	movl	56(%rsp), %edx
	movslq	%r11d, %rax
	movl	(%r8), %ecx
.L21:
	movl	(%r15,%rax,4), %r10d
	cmpl	%r10d, %ecx
	jg	.L22
	movslq	%edx, %rsi
	leaq	-4(%r15,%rsi,4), %r9
.L23:
	movq	%r9, %rdi
	movl	(%r9), %esi
	movl	%edx, 16(%rsp)
	subq	$4, %r9
	subl	$1, %edx
	cmpl	%esi, %ecx
	jl	.L23
	cmpl	%eax, %edx
	jle	.L24
	movl	%esi, (%r15,%rax,4)
	movl	%r10d, (%rdi)
.L22:
	addq	$1, %rax
	jmp	.L21
.L26:
	movl	8(%rsp), %ebx
	cmpl	%ebx, 52(%rsp)
	jle	.L20
	movslq	%ebx, %r12
	movq	%r12, %r8
	leal	1(%r12), %r11d
	jmp	.L13
.L24:
	movl	16(%rsp), %eax
	movl	%esi, (%r8)
	movl	%edx, 64(%rsp)
	subl	$2, %eax
	movl	%ecx, (%rdi)
	movl	%eax, 68(%rsp)
	cmpl	%r14d, %eax
	jle	.L32
.L25:
	leaq	(%r15,%r12,4), %r8
	movl	64(%rsp), %r9d
	movslq	%r11d, %rax
	movl	(%r8), %ecx
.L27:
	movl	(%r15,%rax,4), %ebx
	cmpl	%ebx, %ecx
	jg	.L28
	movslq	%r9d, %rdx
	leaq	-4(%r15,%rdx,4), %rdx
	jmp	.L29
.L60:
	movl	%r10d, %r9d
.L29:
	movq	%rdx, %rdi
	movl	(%rdx), %esi
	subq	$4, %rdx
	leal	-1(%r9), %r10d
	cmpl	%esi, %ecx
	jl	.L60
	cmpl	%eax, %r10d
	jle	.L30
	movl	%esi, (%r15,%rax,4)
	movl	%r10d, %r9d
	movl	%ebx, (%rdi)
.L28:
	addq	$1, %rax
	jmp	.L27
.L30:
	leal	-2(%r9), %eax
	movl	%r10d, 72(%rsp)
	movl	%r11d, %r10d
	movl	%r14d, %r11d
	movl	%esi, (%r8)
	movl	%r9d, 32(%rsp)
	movl	%ecx, (%rdi)
	movl	%eax, 76(%rsp)
	cmpl	%r14d, %eax
	jle	.L38
.L31:
	leaq	(%r15,%r12,4), %r9
	movl	72(%rsp), %r14d
	movslq	%r10d, %rax
	movl	(%r9), %ecx
.L33:
	movl	(%r15,%rax,4), %edx
	cmpl	%edx, %ecx
	jg	.L34
	movslq	%r14d, %rsi
	leaq	-4(%r15,%rsi,4), %rsi
	.p2align 4,,10
	.p2align 3
.L35:
	movq	%rsi, %r8
	movl	(%rsi), %edi
	movl	%r14d, 24(%rsp)
	subq	$4, %rsi
	subl	$1, %r14d
	cmpl	%edi, %ecx
	jl	.L35
	cmpl	%eax, %r14d
	jle	.L36
	movl	%edi, (%r15,%rax,4)
	movl	%edx, (%r8)
.L34:
	addq	$1, %rax
	jmp	.L33
.L36:
	movl	24(%rsp), %eax
	movl	%edi, (%r9)
	movl	%ecx, (%r8)
	subl	$2, %eax
	movl	%eax, 80(%rsp)
	cmpl	%r11d, %eax
	jle	.L44
	movl	%r14d, 92(%rsp)
	movl	%r10d, %eax
.L37:
	leaq	(%r15,%r12,4), %r10
	movl	92(%rsp), %ebp
	movslq	%eax, %rcx
	movl	(%r10), %edi
	.p2align 4,,10
	.p2align 3
.L39:
	movl	(%r15,%rcx,4), %r8d
	cmpl	%r8d, %edi
	jg	.L40
	movslq	%ebp, %rdx
	leaq	-4(%r15,%rdx,4), %rdx
	.p2align 4,,10
	.p2align 3
.L41:
	movq	%rdx, %r9
	movl	(%rdx), %esi
	movl	%ebp, %ebx
	subq	$4, %rdx
	subl	$1, %ebp
	cmpl	%esi, %edi
	jl	.L41
	cmpl	%ecx, %ebp
	jle	.L42
	movl	%esi, (%r15,%rcx,4)
	movl	%r8d, (%r9)
.L40:
	addq	$1, %rcx
	jmp	.L39
.L42:
	movl	%ebx, 36(%rsp)
	subl	$2, %ebx
	movl	%esi, (%r10)
	movl	%ebx, 20(%rsp)
	movl	%edi, (%r9)
	cmpl	%ebx, %r11d
	jge	.L50
.L43:
	leaq	(%r15,%r12,4), %r8
	movslq	%eax, %rdi
	movl	%ebp, %ebx
	movl	(%r8), %esi
	.p2align 4,,10
	.p2align 3
.L45:
	movl	(%r15,%rdi,4), %r10d
	cmpl	%r10d, %esi
	jg	.L46
	movslq	%ebx, %rdx
	leaq	-4(%r15,%rdx,4), %rdx
	.p2align 4,,10
	.p2align 3
.L47:
	movq	%rdx, %r9
	movl	(%rdx), %ecx
	movl	%ebx, %r13d
	subq	$4, %rdx
	subl	$1, %ebx
	cmpl	%ecx, %esi
	jl	.L47
	cmpl	%edi, %ebx
	jle	.L48
	movl	%ecx, (%r15,%rdi,4)
	movl	%r10d, (%r9)
.L46:
	addq	$1, %rdi
	jmp	.L45
.L48:
	leal	-2(%r13), %r14d
	movl	%ecx, (%r8)
	movl	%esi, (%r9)
	cmpl	%r14d, %r11d
	jge	.L55
.L49:
	leaq	(%r15,%r12,4), %r9
	cltq
	movl	%ebx, %r12d
	movl	(%r9), %ecx
	.p2align 4,,10
	.p2align 3
.L51:
	movl	(%r15,%rax,4), %esi
	cmpl	%esi, %ecx
	jg	.L52
	movslq	%r12d, %rdx
	leaq	-4(%r15,%rdx,4), %rdx
	jmp	.L53
	.p2align 4,,10
	.p2align 3
.L65:
	movl	%r8d, %r12d
.L53:
	movq	%rdx, %r10
	movl	(%rdx), %edi
	subq	$4, %rdx
	leal	-1(%r12), %r8d
	cmpl	%edi, %ecx
	jl	.L65
	cmpl	%eax, %r8d
	jle	.L54
	movl	%edi, (%r15,%rax,4)
	movl	%r8d, %r12d
	movl	%esi, (%r10)
.L52:
	addq	$1, %rax
	jmp	.L51
.L55:
	cmpl	%r13d, 20(%rsp)
	jle	.L50
	movslq	%r13d, %r12
	movq	%r12, %r11
	leal	1(%r12), %eax
	jmp	.L43
	.p2align 4,,10
	.p2align 3
.L54:
	movl	%edi, (%r9)
	leal	-2(%r12), %edx
	movl	%r11d, %esi
	movq	%r15, %rdi
	movl	%ecx, (%r10)
	call	quick
	cmpl	%r12d, %r14d
	jle	.L55
	movslq	%r12d, %r12
	movq	%r12, %r11
	leal	1(%r12), %eax
	jmp	.L49
.L50:
	movl	36(%rsp), %ebx
	cmpl	%ebx, 80(%rsp)
	jle	.L44
	movslq	%ebx, %r12
	movq	%r12, %r11
	leal	1(%r12), %eax
	jmp	.L37
.L44:
	movl	24(%rsp), %ebx
	cmpl	%ebx, 76(%rsp)
	jle	.L38
	movslq	%ebx, %r12
	movq	%r12, %r11
	leal	1(%r12), %r10d
	jmp	.L31
.L38:
	movl	32(%rsp), %ebx
	cmpl	%ebx, 68(%rsp)
	jle	.L32
	movslq	%ebx, %r12
	movq	%r12, %r14
	leal	1(%r12), %r11d
	jmp	.L25
.L32:
	movl	16(%rsp), %ebx
	cmpl	%ebx, 60(%rsp)
	jle	.L26
	movslq	%ebx, %r12
	movq	%r12, %r14
	leal	1(%r12), %r11d
	jmp	.L19
	.cfi_endproc
.LFE24:
	.size	quick, .-quick
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"NO"
.LC2:
	.string	"YES"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r15
	.cfi_offset 15, -24
	leaq	.LC0(%rip), %r15
	pushq	%r14
	leaq	-64(%rbp), %rsi
	movq	%r15, %rdi
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	-64(%rbp), %rax
	movq	%rsp, %rsi
	movq	%rax, %rdx
	leaq	15(,%rax,4), %rax
	movq	%rax, %rcx
	andq	$-4096, %rax
	subq	%rax, %rsi
	andq	$-16, %rcx
	cmpq	%rsi, %rsp
	je	.L94
.L146:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%rsi, %rsp
	jne	.L146
.L94:
	andl	$4095, %ecx
	subq	%rcx, %rsp
	testq	%rcx, %rcx
	jne	.L147
.L95:
	movq	%rsp, %rbx
	xorl	%r12d, %r12d
	movq	%rbx, %r13
	testl	%edx, %edx
	jle	.L103
	.p2align 4,,10
	.p2align 3
.L102:
	movq	%r13, %rsi
	movq	%r15, %rdi
	xorl	%eax, %eax
	addl	$1, %r12d
	call	__isoc99_scanf@PLT
	addq	$4, %r13
	cmpl	%r12d, -64(%rbp)
	jg	.L102
.L103:
	leaq	-60(%rbp), %rsi
	movq	%r15, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	-60(%rbp), %rax
	movq	%rsp, %rsi
	movq	%rax, %rdx
	leaq	15(,%rax,4), %rax
	movq	%rax, %rcx
	andq	$-4096, %rax
	subq	%rax, %rsi
	andq	$-16, %rcx
	cmpq	%rsi, %rsp
	je	.L98
.L148:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%rsi, %rsp
	jne	.L148
.L98:
	andl	$4095, %ecx
	subq	%rcx, %rsp
	testq	%rcx, %rcx
	jne	.L149
.L99:
	movq	%rsp, %r12
	xorl	%r13d, %r13d
	movq	%r12, %r14
	testl	%edx, %edx
	jle	.L101
	.p2align 4,,10
	.p2align 3
.L105:
	movq	%r14, %rsi
	movq	%r15, %rdi
	xorl	%eax, %eax
	addl	$1, %r13d
	call	__isoc99_scanf@PLT
	addq	$4, %r14
	cmpl	%r13d, -60(%rbp)
	jg	.L105
.L101:
	movl	-64(%rbp), %eax
	xorl	%esi, %esi
	movq	%rbx, %rdi
	xorl	%r13d, %r13d
	leal	-1(%rax), %edx
	call	quick
	movl	-60(%rbp), %eax
	movq	%r12, %rdi
	xorl	%esi, %esi
	leal	-1(%rax), %edx
	call	quick
	movl	-60(%rbp), %r8d
	movl	-64(%rbp), %edi
	xorl	%edx, %edx
	movl	$1, %eax
	cmpl	%r13d, %r8d
	jle	.L112
	.p2align 4,,10
	.p2align 3
.L151:
	cmpl	%edi, %r8d
	jg	.L112
	movslq	%r13d, %rax
	movl	(%r12,%rax,4), %ecx
	leal	1(%r13), %eax
	cltq
	.p2align 4,,10
	.p2align 3
.L106:
	movl	%eax, %esi
	movl	%eax, %r9d
	subl	%r13d, %esi
	subl	$1, %esi
	cmpl	%ecx, (%r12,%rax,4)
	sete	%r11b
	cmpl	%eax, %r8d
	setg	%r10b
	addq	$1, %rax
	testb	%r10b, %r11b
	jne	.L106
	movslq	%edx, %rax
	cmpl	%edx, %edi
	movl	(%rbx,%rax,4), %r10d
	setg	%al
	movl	%eax, %r13d
	cmpl	%r10d, %ecx
	je	.L116
	testb	%al, %al
	je	.L116
	leal	1(%rdx), %eax
	cltq
	jmp	.L108
	.p2align 4,,10
	.p2align 3
.L150:
	testb	%r13b, %r13b
	je	.L107
.L108:
	movl	(%rbx,%rax,4), %r10d
	cmpl	%eax, %edi
	movl	%eax, %r11d
	setg	%r13b
	addq	$1, %rax
	cmpl	%ecx, %r10d
	jne	.L150
.L107:
	cmpl	%r10d, %ecx
	jne	.L110
.L153:
	testb	%r13b, %r13b
	je	.L110
	leal	1(%r11), %eax
	cltq
	.p2align 4,,10
	.p2align 3
.L111:
	movl	%eax, %edx
	subl	%r11d, %edx
	cmpl	%ecx, (%rbx,%rax,4)
	sete	%r14b
	cmpl	%eax, %edi
	leal	-1(%rdx), %r10d
	movl	%eax, %edx
	setg	%r13b
	addq	$1, %rax
	testb	%r13b, %r14b
	jne	.L111
	xorl	%eax, %eax
	cmpl	%r10d, %esi
	jg	.L110
	movl	%r9d, %r13d
	cmpl	%r13d, %r8d
	jg	.L151
.L112:
	cmpl	$1, %eax
	je	.L110
	leaq	.LC2(%rip), %rdi
	call	puts@PLT
.L114:
	movq	-56(%rbp), %rax
	subq	%fs:40, %rax
	jne	.L152
	leaq	-40(%rbp), %rsp
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
	.p2align 4,,10
	.p2align 3
.L116:
	.cfi_restore_state
	movl	%edx, %r11d
	cmpl	%r10d, %ecx
	je	.L153
.L110:
	leaq	.LC1(%rip), %rdi
	call	puts@PLT
	jmp	.L114
.L149:
	orq	$0, -8(%rsp,%rcx)
	jmp	.L99
.L147:
	orq	$0, -8(%rsp,%rcx)
	jmp	.L95
.L152:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:

rule
	.file	"temp.c"
	.text
	.p2align 4
	.globl	quick
	.type	quick, @function
quick:
.LFB24:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$104, %rsp
	.cfi_def_cfa_offset 160
	movl	%edx, 88(%rsp)
	cmpl	%edx, %esi
	jge	.L1
	movl	%edx, %eax
	movq	%rdi, %r15
	movl	%esi, %r14d
	addl	$1, %eax
	movl	%eax, 84(%rsp)
.L8:
	movslq	%r14d, %r12
	leal	1(%r14), %r8d
	movl	84(%rsp), %edx
	leaq	(%r15,%r12,4), %r10
	movslq	%r8d, %rax
	movl	(%r10), %ecx
.L3:
	movl	(%r15,%rax,4), %r11d
	cmpl	%ecx, %r11d
	jl	.L4
	movslq	%edx, %rsi
	leaq	-4(%r15,%rsi,4), %r9
.L5:
	movq	%r9, %rdi
	movl	(%r9), %esi
	movl	%edx, 12(%rsp)
	subq	$4, %r9
	subl	$1, %edx
	cmpl	%ecx, %esi
	jg	.L5
	cmpl	%eax, %edx
	jle	.L6
	movl	%esi, (%r15,%rax,4)
	movl	%r11d, (%rdi)
.L4:
	addq	$1, %rax
	jmp	.L3
.L1:
	addq	$104, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
.L6:
	.cfi_restore_state
	movl	12(%rsp), %eax
	movl	%esi, (%r10)
	movl	%edx, 44(%rsp)
	subl	$2, %eax
	movl	%ecx, (%rdi)
	movl	%eax, 40(%rsp)
	cmpl	%r14d, %eax
	jle	.L14
	movl	%r8d, %eax
	movl	%r14d, %r8d
	movl	%eax, %r14d
.L7:
	leaq	(%r15,%r12,4), %r10
	movl	44(%rsp), %edx
	movslq	%r14d, %rax
	movl	(%r10), %ecx
.L9:
	movl	(%r15,%rax,4), %r11d
	cmpl	%r11d, %ecx
	jg	.L10
	movslq	%edx, %rsi
	leaq	-4(%r15,%rsi,4), %r9
.L11:
	movq	%r9, %rdi
	movl	(%r9), %esi
	movl	%edx, 28(%rsp)
	subq	$4, %r9
	subl	$1, %edx
	cmpl	%esi, %ecx
	jl	.L11
	cmpl	%eax, %edx
	jle	.L12
	movl	%esi, (%r15,%rax,4)
	movl	%r11d, (%rdi)
.L10:
	addq	$1, %rax
	jmp	.L9
.L14:
	movl	88(%rsp), %ebx
	cmpl	%ebx, 12(%rsp)
	jge	.L1
	movl	12(%rsp), %r14d
	jmp	.L8
.L12:
	movl	28(%rsp), %eax
	movl	%esi, (%r10)
	movl	%r14d, %r11d
	movl	%edx, 48(%rsp)
	subl	$2, %eax
	movl	%ecx, (%rdi)
	movl	%eax, 52(%rsp)
	cmpl	%r8d, %eax
	jle	.L20
.L13:
	leaq	(%r15,%r12,4), %r10
	movl	48(%rsp), %edx
	movslq	%r11d, %rax
	movl	(%r10), %ecx
.L15:
	movl	(%r15,%rax,4), %ebx
	cmpl	%ebx, %ecx
	jg	.L16
	movslq	%edx, %rsi
	leaq	-4(%r15,%rsi,4), %r9
.L17:
	movq	%r9, %rdi
	movl	(%r9), %esi
	movl	%edx, 8(%rsp)
	subq	$4, %r9
	subl	$1, %edx
	cmpl	%esi, %ecx
	jl	.L17
	cmpl	%eax, %edx
	jle	.L18
	movl	%esi, (%r15,%rax,4)
	movl	%ebx, (%rdi)
.L16:
	addq	$1, %rax
	jmp	.L15
.L20:
	movl	28(%rsp), %ebx
	cmpl	%ebx, 40(%rsp)
	jle	.L14
	movslq	%ebx, %r12
	movq	%r12, %r8
	leal	1(%r12), %r14d
	jmp	.L7
.L18:
	movl	8(%rsp), %eax
	movl	%esi, (%r10)
	movl	%r8d, %r14d
	movl	%edx, 56(%rsp)
	subl	$2, %eax
	movl	%ecx, (%rdi)
	movl	%eax, 60(%rsp)
	cmpl	%r8d, %eax
	jle	.L26
.L19:
	leaq	(%r15,%r12,4), %r8
	movl	56(%rsp), %edx
	movslq	%r11d, %rax
	movl	(%r8), %ecx
.L21:
	movl	(%r15,%rax,4), %r10d
	cmpl	%r10d, %ecx
	jg	.L22
	movslq	%edx, %rsi
	leaq	-4(%r15,%rsi,4), %r9
.L23:
	movq	%r9, %rdi
	movl	(%r9), %esi
	movl	%edx, 16(%rsp)
	subq	$4, %r9
	subl	$1, %edx
	cmpl	%esi, %ecx
	jl	.L23
	cmpl	%eax, %edx
	jle	.L24
	movl	%esi, (%r15,%rax,4)
	movl	%r10d, (%rdi)
.L22:
	addq	$1, %rax
	jmp	.L21
.L26:
	movl	8(%rsp), %ebx
	cmpl	%ebx, 52(%rsp)
	jle	.L20
	movslq	%ebx, %r12
	movq	%r12, %r8
	leal	1(%r12), %r11d
	jmp	.L13
.L24:
	movl	16(%rsp), %eax
	movl	%esi, (%r8)
	movl	%edx, 64(%rsp)
	subl	$2, %eax
	movl	%ecx, (%rdi)
	movl	%eax, 68(%rsp)
	cmpl	%r14d, %eax
	jle	.L32
.L25:
	leaq	(%r15,%r12,4), %r8
	movl	64(%rsp), %r9d
	movslq	%r11d, %rax
	movl	(%r8), %ecx
.L27:
	movl	(%r15,%rax,4), %ebx
	cmpl	%ebx, %ecx
	jg	.L28
	movslq	%r9d, %rdx
	leaq	-4(%r15,%rdx,4), %rdx
	jmp	.L29
.L60:
	movl	%r10d, %r9d
.L29:
	movq	%rdx, %rdi
	movl	(%rdx), %esi
	subq	$4, %rdx
	leal	-1(%r9), %r10d
	cmpl	%esi, %ecx
	jl	.L60
	cmpl	%eax, %r10d
	jle	.L30
	movl	%esi, (%r15,%rax,4)
	movl	%r10d, %r9d
	movl	%ebx, (%rdi)
.L28:
	addq	$1, %rax
	jmp	.L27
.L30:
	leal	-2(%r9), %eax
	movl	%r10d, 72(%rsp)
	movl	%r11d, %r10d
	movl	%r14d, %r11d
	movl	%esi, (%r8)
	movl	%r9d, 32(%rsp)
	movl	%ecx, (%rdi)
	movl	%eax, 76(%rsp)
	cmpl	%r14d, %eax
	jle	.L38
.L31:
	leaq	(%r15,%r12,4), %r9
	movl	72(%rsp), %r14d
	movslq	%r10d, %rax
	movl	(%r9), %ecx
.L33:
	movl	(%r15,%rax,4), %edx
	cmpl	%edx, %ecx
	jg	.L34
	movslq	%r14d, %rsi
	leaq	-4(%r15,%rsi,4), %rsi
	.p2align 4,,10
	.p2align 3
.L35:
	movq	%rsi, %r8
	movl	(%rsi), %edi
	movl	%r14d, 24(%rsp)
	subq	$4, %rsi
	subl	$1, %r14d
	cmpl	%edi, %ecx
	jl	.L35
	cmpl	%eax, %r14d
	jle	.L36
	movl	%edi, (%r15,%rax,4)
	movl	%edx, (%r8)
.L34:
	addq	$1, %rax
	jmp	.L33
.L36:
	movl	24(%rsp), %eax
	movl	%edi, (%r9)
	movl	%ecx, (%r8)
	subl	$2, %eax
	movl	%eax, 80(%rsp)
	cmpl	%r11d, %eax
	jle	.L44
	movl	%r14d, 92(%rsp)
	movl	%r10d, %eax
.L37:
	leaq	(%r15,%r12,4), %r10
	movl	92(%rsp), %ebp
	movslq	%eax, %rcx
	movl	(%r10), %edi
	.p2align 4,,10
	.p2align 3
.L39:
	movl	(%r15,%rcx,4), %r8d
	cmpl	%r8d, %edi
	jg	.L40
	movslq	%ebp, %rdx
	leaq	-4(%r15,%rdx,4), %rdx
	.p2align 4,,10
	.p2align 3
.L41:
	movq	%rdx, %r9
	movl	(%rdx), %esi
	movl	%ebp, %ebx
	subq	$4, %rdx
	subl	$1, %ebp
	cmpl	%esi, %edi
	jl	.L41
	cmpl	%ecx, %ebp
	jle	.L42
	movl	%esi, (%r15,%rcx,4)
	movl	%r8d, (%r9)
.L40:
	addq	$1, %rcx
	jmp	.L39
.L42:
	movl	%ebx, 36(%rsp)
	subl	$2, %ebx
	movl	%esi, (%r10)
	movl	%ebx, 20(%rsp)
	movl	%edi, (%r9)
	cmpl	%ebx, %r11d
	jge	.L50
.L43:
	leaq	(%r15,%r12,4), %r8
	movslq	%eax, %rdi
	movl	%ebp, %ebx
	movl	(%r8), %esi
	.p2align 4,,10
	.p2align 3
.L45:
	movl	(%r15,%rdi,4), %r10d
	cmpl	%r10d, %esi
	jg	.L46
	movslq	%ebx, %rdx
	leaq	-4(%r15,%rdx,4), %rdx
	.p2align 4,,10
	.p2align 3
.L47:
	movq	%rdx, %r9
	movl	(%rdx), %ecx
	movl	%ebx, %r13d
	subq	$4, %rdx
	subl	$1, %ebx
	cmpl	%ecx, %esi
	jl	.L47
	cmpl	%edi, %ebx
	jle	.L48
	movl	%ecx, (%r15,%rdi,4)
	movl	%r10d, (%r9)
.L46:
	addq	$1, %rdi
	jmp	.L45
.L48:
	leal	-2(%r13), %r14d
	movl	%ecx, (%r8)
	movl	%esi, (%r9)
	cmpl	%r14d, %r11d
	jge	.L55
.L49:
	leaq	(%r15,%r12,4), %r9
	cltq
	movl	%ebx, %r12d
	movl	(%r9), %ecx
	.p2align 4,,10
	.p2align 3
.L51:
	movl	(%r15,%rax,4), %esi
	cmpl	%esi, %ecx
	jg	.L52
	movslq	%r12d, %rdx
	leaq	-4(%r15,%rdx,4), %rdx
	jmp	.L53
	.p2align 4,,10
	.p2align 3
.L65:
	movl	%r8d, %r12d
.L53:
	movq	%rdx, %r10
	movl	(%rdx), %edi
	subq	$4, %rdx
	leal	-1(%r12), %r8d
	cmpl	%edi, %ecx
	jl	.L65
	cmpl	%eax, %r8d
	jle	.L54
	movl	%edi, (%r15,%rax,4)
	movl	%r8d, %r12d
	movl	%esi, (%r10)
.L52:
	addq	$1, %rax
	jmp	.L51
.L55:
	cmpl	%r13d, 20(%rsp)
	jle	.L50
	movslq	%r13d, %r12
	movq	%r12, %r11
	leal	1(%r12), %eax
	jmp	.L43
	.p2align 4,,10
	.p2align 3
.L54:
	movl	%edi, (%r9)
	leal	-2(%r12), %edx
	movl	%r11d, %esi
	movq	%r15, %rdi
	movl	%ecx, (%r10)
	call	quick
	cmpl	%r12d, %r14d
	jle	.L55
	movslq	%r12d, %r12
	movq	%r12, %r11
	leal	1(%r12), %eax
	jmp	.L49
.L50:
	movl	36(%rsp), %ebx
	cmpl	%ebx, 80(%rsp)
	jle	.L44
	movslq	%ebx, %r12
	movq	%r12, %r11
	leal	1(%r12), %eax
	jmp	.L37
.L44:
	movl	24(%rsp), %ebx
	cmpl	%ebx, 76(%rsp)
	jle	.L38
	movslq	%ebx, %r12
	movq	%r12, %r11
	leal	1(%r12), %r10d
	jmp	.L31
.L38:
	movl	32(%rsp), %ebx
	cmpl	%ebx, 68(%rsp)
	jle	.L32
	movslq	%ebx, %r12
	movq	%r12, %r14
	leal	1(%r12), %r11d
	jmp	.L25
.L32:
	movl	16(%rsp), %ebx
	cmpl	%ebx, 60(%rsp)
	jle	.L26
	movslq	%ebx, %r12
	movq	%r12, %r14
	leal	1(%r12), %r11d
	jmp	.L19
	.cfi_endproc
.LFE24:
	.size	quick, .-quick
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"NO"
.LC2:
	.string	"YES"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r15
	.cfi_offset 15, -24
	leaq	.LC0(%rip), %r15
	pushq	%r14
	leaq	-64(%rbp), %rsi
	movq	%r15, %rdi
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	-64(%rbp), %rax
	movq	%rsp, %rsi
	movq	%rax, %rdx
	leaq	15(,%rax,4), %rax
	movq	%rax, %rcx
	andq	$-4096, %rax
	subq	%rax, %rsi
	andq	$-16, %rcx
	cmpq	%rsi, %rsp
	je	.L94
.L146:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%rsi, %rsp
	jne	.L146
.L94:
	andl	$4095, %ecx
	subq	%rcx, %rsp
	testq	%rcx, %rcx
	jne	.L147
.L95:
	movq	%rsp, %rbx
	xorl	%r12d, %r12d
	movq	%rbx, %r13
	testl	%edx, %edx
	jle	.L103
	.p2align 4,,10
	.p2align 3
.L102:
	movq	%r13, %rsi
	movq	%r15, %rdi
	xorl	%eax, %eax
	addl	$1, %r12d
	call	__isoc99_scanf@PLT
	addq	$4, %r13
	cmpl	%r12d, -64(%rbp)
	jg	.L102
.L103:
	leaq	-60(%rbp), %rsi
	movq	%r15, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	-60(%rbp), %rax
	movq	%rsp, %rsi
	movq	%rax, %rdx
	leaq	15(,%rax,4), %rax
	movq	%rax, %rcx
	andq	$-4096, %rax
	subq	%rax, %rsi
	andq	$-16, %rcx
	cmpq	%rsi, %rsp
	je	.L98
.L148:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%rsi, %rsp
	jne	.L148
.L98:
	andl	$4095, %ecx
	subq	%rcx, %rsp
	testq	%rcx, %rcx
	jne	.L149
.L99:
	movq	%rsp, %r12
	xorl	%r13d, %r13d
	movq	%r12, %r14
	testl	%edx, %edx
	jle	.L101
	.p2align 4,,10
	.p2align 3
.L105:
	movq	%r14, %rsi
	movq	%r15, %rdi
	xorl	%eax, %eax
	addl	$1, %r13d
	call	__isoc99_scanf@PLT
	addq	$4, %r14
	cmpl	%r13d, -60(%rbp)
	jg	.L105
.L101:
	movl	-64(%rbp), %eax
	xorl	%esi, %esi
	movq	%rbx, %rdi
	xorl	%r13d, %r13d
	leal	-1(%rax), %edx
	call	quick
	movl	-60(%rbp), %eax
	movq	%r12, %rdi
	xorl	%esi, %esi
	leal	-1(%rax), %edx
	call	quick
	movl	-60(%rbp), %r8d
	movl	-64(%rbp), %edi
	xorl	%edx, %edx
	movl	$1, %eax
	cmpl	%r13d, %r8d
	jle	.L112
	.p2align 4,,10
	.p2align 3
.L151:
	cmpl	%edi, %r8d
	jg	.L112
	movslq	%r13d, %rax
	movl	(%r12,%rax,4), %ecx
	leal	1(%r13), %eax
	cltq
	.p2align 4,,10
	.p2align 3
.L106:
	movl	%eax, %esi
	movl	%eax, %r9d
	subl	%r13d, %esi
	subl	$1, %esi
	cmpl	%ecx, (%r12,%rax,4)
	sete	%r11b
	cmpl	%eax, %r8d
	setg	%r10b
	addq	$1, %rax
	testb	%r10b, %r11b
	jne	.L106
	movslq	%edx, %rax
	cmpl	%edx, %edi
	movl	(%rbx,%rax,4), %r10d
	setg	%al
	movl	%eax, %r13d
	cmpl	%r10d, %ecx
	je	.L116
	testb	%al, %al
	je	.L116
	leal	1(%rdx), %eax
	cltq
	jmp	.L108
	.p2align 4,,10
	.p2align 3
.L150:
	testb	%r13b, %r13b
	je	.L107
.L108:
	movl	(%rbx,%rax,4), %r10d
	cmpl	%eax, %edi
	movl	%eax, %r11d
	setg	%r13b
	addq	$1, %rax
	cmpl	%ecx, %r10d
	jne	.L150
.L107:
	cmpl	%r10d, %ecx
	jne	.L110
.L153:
	testb	%r13b, %r13b
	je	.L110
	leal	1(%r11), %eax
	cltq
	.p2align 4,,10
	.p2align 3
.L111:
	movl	%eax, %edx
	subl	%r11d, %edx
	cmpl	%ecx, (%rbx,%rax,4)
	sete	%r14b
	cmpl	%eax, %edi
	leal	-1(%rdx), %r10d
	movl	%eax, %edx
	setg	%r13b
	addq	$1, %rax
	testb	%r13b, %r14b
	jne	.L111
	xorl	%eax, %eax
	cmpl	%r10d, %esi
	jg	.L110
	movl	%r9d, %r13d
	cmpl	%r13d, %r8d
	jg	.L151
.L112:
	cmpl	$1, %eax
	je	.L110
	leaq	.LC2(%rip), %rdi
	call	puts@PLT
.L114:
	movq	-56(%rbp), %rax
	subq	%fs:40, %rax
	jne	.L152
	leaq	-40(%rbp), %rsp
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
	.p2align 4,,10
	.p2align 3
.L116:
	.cfi_restore_state
	movl	%edx, %r11d
	cmpl	%r10d, %ecx
	je	.L153
.L110:
	leaq	.LC1(%rip), %rdi
	call	puts@PLT
	jmp	.L114
.L149:
	orq	$0, -8(%rsp,%rcx)
	jmp	.L99
.L147:
	orq	$0, -8(%rsp,%rcx)
	jmp	.L95
.L152:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:

#include<stdio.h>

void quick(int a[],int left,int right);

int main(){
  int N,ans=1;
  scanf("%d",&N);
  int D[N];
  for (int i = 0; i < N; i++){ scanf("%d",&D[i]);}
  int M;
  scanf("%d",&M);
  int T[M];
  for (int i = 0; i < M; i++){ scanf("%d",&T[i]);}

  quick(D,0,N-1);
  quick(T,0,M-1);

  int i=0,j=0,k=0,count_T=0,count_D=0;
  while (i<M&&N>=M)
  {
    while (T[i]==T[k]&&k<M){ count_T++; k++;}
    while (T[i]!=D[j]&&j<N){ j++; }
    while (T[i]==D[j]&&j<N){ count_D++; j++; }
    if(count_D<count_T){
      ans=1;
      break;
    }else{
      ans=0;
    }
    
    i=k;
    count_D=0;
    count_T=0;
  }

  ans > 0 ? puts("NO") : puts("YES");
  
  return 0;
}

void quick(int a[],int left,int right)
{
    int s,t,i,j;

    if (left<right){
        s=a[left];            
        i=left; j=right+1;      
        while (1){              
            while (a[++i]<s);
            while (a[--j]>s);
            if (i>=j) break;
            t=a[i]; a[i]=a[j]; a[j]=t;
        }
        a[left]=a[j]; a[j]=s;

        quick(a,left,j-1);
        quick(a,j+1,right);
    }
}
1
13
5
100 100 100 100 100
 15
1 2 2 3 4 3 4 4 8 6 5 3 5 5 7
9
7 4 3 2 1 2 3 8 5
 15
1 2 2 3 3 3 4 4 4 4 5 5 5 5 5
9
7 4 3 2 1 2 3 4 5
 7
100 200 500 700 238 1600 2000
6
100 200 500 700 1600 1600
 1
13
5
100 000 100 100 100
 15
1 2 2 3 3 3 4 4 4 4 5 3 5 5 5
9
7 4 3 2 1 2 3 4 5
 7
100 200 500 700 238 1600 2000
6
100 200 500 337 1600 1600
 1
18
5
100 000 100 100 100
 15
1 2 2 3 4 3 4 4 4 4 5 3 5 5 5
9
7 4 3 2 1 2 3 4 5
 7
100 200 500 700 238 1600 2000
6
100 200 500 337 499 1600

NO
 YES
 NO
 NO
 NO
 NO
 NO
 NO
 NO
 NO

Given the following C code and unoptimized assembly code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include<stdio.h>

void quick(int a[],int left,int right);

int main(){
  int N,ans=1;
  scanf("%d",&N);
  int D[N];
  for (int i = 0; i < N; i++){ scanf("%d",&D[i]);}
  int M;
  scanf("%d",&M);
  int T[M];
  for (int i = 0; i < M; i++){ scanf("%d",&T[i]);}

  quick(D,0,N-1);
  quick(T,0,M-1);

  int i=0,j=0,k=0,count_T=0,count_D=0;
  while (i<M&&N>=M)
  {
    while (T[i]==T[k]&&k<M){ count_T++; k++;}
    while (T[i]!=D[j]&&j<N){ j++; }
    while (T[i]==D[j]&&j<N){ count_D++; j++; }
    if(count_D<count_T){
      ans=1;
      break;
    }else{
      ans=0;
    }
    
    i=k;
    count_D=0;
    count_T=0;
  }

  ans > 0 ? puts("NO") : puts("YES");
  
  return 0;
}

void quick(int a[],int left,int right)
{
    int s,t,i,j;

    if (left<right){
        s=a[left];            
        i=left; j=right+1;      
        while (1){              
            while (a[++i]<s);
            while (a[--j]>s);
            if (i>=j) break;
            t=a[i]; a[i]=a[j]; a[j]=t;
        }
        a[left]=a[j]; a[j]=s;

        quick(a,left,j-1);
        quick(a,j+1,right);
    }
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"NO"
.LC2:
	.string	"YES"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$120, %rsp
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	movq	%rsp, %rax
	movq	%rax, %rbx
	movl	$1, -120(%rbp)
	leaq	-128(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-128(%rbp), %eax
	movslq	%eax, %rdx
	subq	$1, %rdx
	movq	%rdx, -88(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, -144(%rbp)
	movq	$0, -136(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, -160(%rbp)
	movq	$0, -152(%rbp)
	cltq
	leaq	0(,%rax,4), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %esi
	movl	$0, %edx
	divq	%rsi
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L2:
	cmpq	%rdx, %rsp
	je	.L3
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L2
.L3:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L4
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L4:
	movq	%rsp, %rax
	addq	$3, %rax
	shrq	$2, %rax
	salq	$2, %rax
	movq	%rax, -80(%rbp)
	movl	$0, -116(%rbp)
	jmp	.L5
.L6:
	movl	-116(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-80(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -116(%rbp)
.L5:
	movl	-128(%rbp), %eax
	cmpl	%eax, -116(%rbp)
	jl	.L6
	leaq	-124(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-124(%rbp), %eax
	movslq	%eax, %rdx
	subq	$1, %rdx
	movq	%rdx, -72(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, %r14
	movl	$0, %r15d
	movslq	%eax, %rdx
	movq	%rdx, %r12
	movl	$0, %r13d
	cltq
	leaq	0(,%rax,4), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %esi
	movl	$0, %edx
	divq	%rsi
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L7:
	cmpq	%rdx, %rsp
	je	.L8
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L7
.L8:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L9
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L9:
	movq	%rsp, %rax
	addq	$3, %rax
	shrq	$2, %rax
	salq	$2, %rax
	movq	%rax, -64(%rbp)
	movl	$0, -112(%rbp)
	jmp	.L10
.L11:
	movl	-112(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-64(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -112(%rbp)
.L10:
	movl	-124(%rbp), %eax
	cmpl	%eax, -112(%rbp)
	jl	.L11
	movl	-128(%rbp), %eax
	leal	-1(%rax), %edx
	movq	-80(%rbp), %rax
	movl	$0, %esi
	movq	%rax, %rdi
	call	quick
	movl	-124(%rbp), %eax
	leal	-1(%rax), %edx
	movq	-64(%rbp), %rax
	movl	$0, %esi
	movq	%rax, %rdi
	call	quick
	movl	$0, -108(%rbp)
	movl	$0, -104(%rbp)
	movl	$0, -100(%rbp)
	movl	$0, -96(%rbp)
	movl	$0, -92(%rbp)
	jmp	.L12
.L15:
	addl	$1, -96(%rbp)
	addl	$1, -100(%rbp)
.L13:
	movq	-64(%rbp), %rax
	movl	-108(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %ecx
	movq	-64(%rbp), %rax
	movl	-100(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %eax
	cmpl	%eax, %ecx
	jne	.L16
	movl	-124(%rbp), %eax
	cmpl	%eax, -100(%rbp)
	jl	.L15
	jmp	.L16
.L18:
	addl	$1, -104(%rbp)
.L16:
	movq	-64(%rbp), %rax
	movl	-108(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %ecx
	movq	-80(%rbp), %rax
	movl	-104(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %eax
	cmpl	%eax, %ecx
	je	.L19
	movl	-128(%rbp), %eax
	cmpl	%eax, -104(%rbp)
	jl	.L18
	jmp	.L19
.L21:
	addl	$1, -92(%rbp)
	addl	$1, -104(%rbp)
.L19:
	movq	-64(%rbp), %rax
	movl	-108(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %ecx
	movq	-80(%rbp), %rax
	movl	-104(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %eax
	cmpl	%eax, %ecx
	jne	.L20
	movl	-128(%rbp), %eax
	cmpl	%eax, -104(%rbp)
	jl	.L21
.L20:
	movl	-92(%rbp), %eax
	cmpl	-96(%rbp), %eax
	jge	.L22
	movl	$1, -120(%rbp)
	jmp	.L23
.L22:
	movl	$0, -120(%rbp)
	movl	-100(%rbp), %eax
	movl	%eax, -108(%rbp)
	movl	$0, -92(%rbp)
	movl	$0, -96(%rbp)
.L12:
	movl	-124(%rbp), %eax
	cmpl	%eax, -108(%rbp)
	jge	.L23
	movl	-128(%rbp), %edx
	movl	-124(%rbp), %eax
	cmpl	%eax, %edx
	jge	.L13
.L23:
	cmpl	$0, -120(%rbp)
	jle	.L25
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L26
.L25:
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
.L26:
	movl	$0, %eax
	movq	%rbx, %rsp
	movq	-56(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L28
	call	__stack_chk_fail@PLT
.L28:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.globl	quick
	.type	quick, @function
quick:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movq	%rdi, -24(%rbp)
	movl	%esi, -28(%rbp)
	movl	%edx, -32(%rbp)
	movl	-28(%rbp), %eax
	cmpl	-32(%rbp), %eax
	jge	.L37
	movl	-28(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	movl	%eax, -8(%rbp)
	movl	-28(%rbp), %eax
	movl	%eax, -16(%rbp)
	movl	-32(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -12(%rbp)
.L35:
	nop
.L31:
	addl	$1, -16(%rbp)
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	cmpl	%eax, -8(%rbp)
	jg	.L31
	nop
.L32:
	subl	$1, -12(%rbp)
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	cmpl	%eax, -8(%rbp)
	jl	.L32
	movl	-16(%rbp), %eax
	cmpl	-12(%rbp), %eax
	jge	.L38
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	movl	%eax, -4(%rbp)
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	-16(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	movq	-24(%rbp), %rdx
	addq	%rcx, %rdx
	movl	(%rax), %eax
	movl	%eax, (%rdx)
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rax, %rdx
	movl	-4(%rbp), %eax
	movl	%eax, (%rdx)
	jmp	.L35
.L38:
	nop
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	-28(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	movq	-24(%rbp), %rdx
	addq	%rcx, %rdx
	movl	(%rax), %eax
	movl	%eax, (%rdx)
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rax, %rdx
	movl	-8(%rbp), %eax
	movl	%eax, (%rdx)
	movl	-12(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-28(%rbp), %ecx
	movq	-24(%rbp), %rax
	movl	%ecx, %esi
	movq	%rax, %rdi
	call	quick
	movl	-12(%rbp), %eax
	leal	1(%rax), %ecx
	movl	-32(%rbp), %edx
	movq	-24(%rbp), %rax
	movl	%ecx, %esi
	movq	%rax, %rdi
	call	quick
.L37:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	quick, .-quick
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
```

Only output the optimized assembly code. Do not include any other text. Do not write any comments in the assembly code. Wrap the assembly code in ```assembly``` tags.
train
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"NO"
.LC2:
	.string	"YES"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$120, %rsp
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	movq	%rsp, %rax
	movq	%rax, %rbx
	movl	$1, -120(%rbp)
	leaq	-128(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-128(%rbp), %eax
	movslq	%eax, %rdx
	subq	$1, %rdx
	movq	%rdx, -88(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, -144(%rbp)
	movq	$0, -136(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, -160(%rbp)
	movq	$0, -152(%rbp)
	cltq
	leaq	0(,%rax,4), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %esi
	movl	$0, %edx
	divq	%rsi
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L2:
	cmpq	%rdx, %rsp
	je	.L3
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L2
.L3:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L4
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L4:
	movq	%rsp, %rax
	addq	$3, %rax
	shrq	$2, %rax
	salq	$2, %rax
	movq	%rax, -80(%rbp)
	movl	$0, -116(%rbp)
	jmp	.L5
.L6:
	movl	-116(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-80(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -116(%rbp)
.L5:
	movl	-128(%rbp), %eax
	cmpl	%eax, -116(%rbp)
	jl	.L6
	leaq	-124(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-124(%rbp), %eax
	movslq	%eax, %rdx
	subq	$1, %rdx
	movq	%rdx, -72(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, %r14
	movl	$0, %r15d
	movslq	%eax, %rdx
	movq	%rdx, %r12
	movl	$0, %r13d
	cltq
	leaq	0(,%rax,4), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %esi
	movl	$0, %edx
	divq	%rsi
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L7:
	cmpq	%rdx, %rsp
	je	.L8
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L7
.L8:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L9
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L9:
	movq	%rsp, %rax
	addq	$3, %rax
	shrq	$2, %rax
	salq	$2, %rax
	movq	%rax, -64(%rbp)
	movl	$0, -112(%rbp)
	jmp	.L10
.L11:
	movl	-112(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-64(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -112(%rbp)
.L10:
	movl	-124(%rbp), %eax
	cmpl	%eax, -112(%rbp)
	jl	.L11
	movl	-128(%rbp), %eax
	leal	-1(%rax), %edx
	movq	-80(%rbp), %rax
	movl	$0, %esi
	movq	%rax, %rdi
	call	quick
	movl	-124(%rbp), %eax
	leal	-1(%rax), %edx
	movq	-64(%rbp), %rax
	movl	$0, %esi
	movq	%rax, %rdi
	call	quick
	movl	$0, -108(%rbp)
	movl	$0, -104(%rbp)
	movl	$0, -100(%rbp)
	movl	$0, -96(%rbp)
	movl	$0, -92(%rbp)
	jmp	.L12
.L15:
	addl	$1, -96(%rbp)
	addl	$1, -100(%rbp)
.L13:
	movq	-64(%rbp), %rax
	movl	-108(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %ecx
	movq	-64(%rbp), %rax
	movl	-100(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %eax
	cmpl	%eax, %ecx
	jne	.L16
	movl	-124(%rbp), %eax
	cmpl	%eax, -100(%rbp)
	jl	.L15
	jmp	.L16
.L18:
	addl	$1, -104(%rbp)
.L16:
	movq	-64(%rbp), %rax
	movl	-108(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %ecx
	movq	-80(%rbp), %rax
	movl	-104(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %eax
	cmpl	%eax, %ecx
	je	.L19
	movl	-128(%rbp), %eax
	cmpl	%eax, -104(%rbp)
	jl	.L18
	jmp	.L19
.L21:
	addl	$1, -92(%rbp)
	addl	$1, -104(%rbp)
.L19:
	movq	-64(%rbp), %rax
	movl	-108(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %ecx
	movq	-80(%rbp), %rax
	movl	-104(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %eax
	cmpl	%eax, %ecx
	jne	.L20
	movl	-128(%rbp), %eax
	cmpl	%eax, -104(%rbp)
	jl	.L21
.L20:
	movl	-92(%rbp), %eax
	cmpl	-96(%rbp), %eax
	jge	.L22
	movl	$1, -120(%rbp)
	jmp	.L23
.L22:
	movl	$0, -120(%rbp)
	movl	-100(%rbp), %eax
	movl	%eax, -108(%rbp)
	movl	$0, -92(%rbp)
	movl	$0, -96(%rbp)
.L12:
	movl	-124(%rbp), %eax
	cmpl	%eax, -108(%rbp)
	jge	.L23
	movl	-128(%rbp), %edx
	movl	-124(%rbp), %eax
	cmpl	%eax, %edx
	jge	.L13
.L23:
	cmpl	$0, -120(%rbp)
	jle	.L25
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L26
.L25:
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
.L26:
	movl	$0, %eax
	movq	%rbx, %rsp
	movq	-56(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L28
	call	__stack_chk_fail@PLT
.L28:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.globl	quick
	.type	quick, @function
quick:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movq	%rdi, -24(%rbp)
	movl	%esi, -28(%rbp)
	movl	%edx, -32(%rbp)
	movl	-28(%rbp), %eax
	cmpl	-32(%rbp), %eax
	jge	.L37
	movl	-28(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	movl	%eax, -8(%rbp)
	movl	-28(%rbp), %eax
	movl	%eax, -16(%rbp)
	movl	-32(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -12(%rbp)
.L35:
	nop
.L31:
	addl	$1, -16(%rbp)
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	cmpl	%eax, -8(%rbp)
	jg	.L31
	nop
.L32:
	subl	$1, -12(%rbp)
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	cmpl	%eax, -8(%rbp)
	jl	.L32
	movl	-16(%rbp), %eax
	cmpl	-12(%rbp), %eax
	jge	.L38
	movl	-16(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	movl	%eax, -4(%rbp)
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	-16(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	movq	-24(%rbp), %rdx
	addq	%rcx, %rdx
	movl	(%rax), %eax
	movl	%eax, (%rdx)
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rax, %rdx
	movl	-4(%rbp), %eax
	movl	%eax, (%rdx)
	jmp	.L35
.L38:
	nop
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	-28(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	movq	-24(%rbp), %rdx
	addq	%rcx, %rdx
	movl	(%rax), %eax
	movl	%eax, (%rdx)
	movl	-12(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rax, %rdx
	movl	-8(%rbp), %eax
	movl	%eax, (%rdx)
	movl	-12(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-28(%rbp), %ecx
	movq	-24(%rbp), %rax
	movl	%ecx, %esi
	movq	%rax, %rdi
	call	quick
	movl	-12(%rbp), %eax
	leal	1(%rax), %ecx
	movl	-32(%rbp), %edx
	movq	-24(%rbp), %rax
	movl	%ecx, %esi
	movq	%rax, %rdi
	call	quick
.L37:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	quick, .-quick
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
