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>
#define size 50
int main()
{
    int ar[size];
    int n,i,count=0;
    scanf("%d",&n);
    for (i=1; i<=n; i++)
    {
        scanf("%d",&ar[i]);
    }
    for(i=1;i<=n;i++)
    {
        if(ar[i]!=i)
            count++;
    }
    if(count>2)
        printf("NO");
    else
        printf("YES");
    return 0;
    
}
```

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
	subq	$224, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -212(%rbp)
	leaq	-220(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$1, -216(%rbp)
	jmp	.L2
.L3:
	leaq	-208(%rbp), %rdx
	movl	-216(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -216(%rbp)
.L2:
	movl	-220(%rbp), %eax
	cmpl	%eax, -216(%rbp)
	jle	.L3
	movl	$1, -216(%rbp)
	jmp	.L4
.L6:
	movl	-216(%rbp), %eax
	cltq
	movl	-208(%rbp,%rax,4), %eax
	cmpl	%eax, -216(%rbp)
	je	.L5
	addl	$1, -212(%rbp)
.L5:
	addl	$1, -216(%rbp)
.L4:
	movl	-220(%rbp), %eax
	cmpl	%eax, -216(%rbp)
	jle	.L6
	cmpl	$2, -212(%rbp)
	jle	.L7
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L8
.L7:
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L8:
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L10
	call	__stack_chk_fail@PLT
.L10:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.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:
```

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
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC14:
	.string	"YES"
.LC15:
	.string	"NO"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	leaq	.LC0(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	movq	%r12, %rdi
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	subq	$224, %rsp
	.cfi_def_cfa_offset 256
	movq	%fs:40, %rax
	movq	%rax, 216(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	testl	%eax, %eax
	jle	.L12
	leaq	20(%rsp), %rbp
	movl	$1, %ebx
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%rbp, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	addq	$4, %rbp
	cmpl	%ebx, %eax
	jge	.L3
	testl	%eax, %eax
	jle	.L12
	leal	-1(%rax), %edx
	cmpl	$2, %edx
	jbe	.L14
	movdqu	20(%rsp), %xmm0
	movl	%eax, %edx
	shrl	$2, %edx
	pcmpeqd	.LC1(%rip), %xmm0
	pandn	.LC2(%rip), %xmm0
	cmpl	$1, %edx
	je	.L5
	movdqu	36(%rsp), %xmm1
	pxor	%xmm2, %xmm2
	pcmpeqd	.LC3(%rip), %xmm1
	pcmpeqd	%xmm2, %xmm1
	psubd	%xmm1, %xmm0
	cmpl	$2, %edx
	je	.L5
	movdqu	52(%rsp), %xmm1
	pcmpeqd	.LC4(%rip), %xmm1
	pcmpeqd	%xmm2, %xmm1
	psubd	%xmm1, %xmm0
	cmpl	$3, %edx
	je	.L5
	movdqu	68(%rsp), %xmm1
	pcmpeqd	.LC5(%rip), %xmm1
	pcmpeqd	%xmm2, %xmm1
	psubd	%xmm1, %xmm0
	cmpl	$4, %edx
	je	.L5
	movdqu	84(%rsp), %xmm1
	pcmpeqd	.LC6(%rip), %xmm1
	pcmpeqd	%xmm2, %xmm1
	psubd	%xmm1, %xmm0
	cmpl	$5, %edx
	je	.L5
	movdqu	100(%rsp), %xmm1
	pcmpeqd	.LC7(%rip), %xmm1
	pcmpeqd	%xmm2, %xmm1
	psubd	%xmm1, %xmm0
	cmpl	$6, %edx
	je	.L5
	movdqu	116(%rsp), %xmm1
	pcmpeqd	.LC8(%rip), %xmm1
	pcmpeqd	%xmm2, %xmm1
	psubd	%xmm1, %xmm0
	cmpl	$7, %edx
	je	.L5
	movdqu	132(%rsp), %xmm1
	pcmpeqd	.LC9(%rip), %xmm1
	pcmpeqd	%xmm2, %xmm1
	psubd	%xmm1, %xmm0
	cmpl	$8, %edx
	je	.L5
	movdqu	148(%rsp), %xmm1
	pcmpeqd	.LC10(%rip), %xmm1
	pcmpeqd	%xmm2, %xmm1
	psubd	%xmm1, %xmm0
	cmpl	$9, %edx
	je	.L5
	movdqu	164(%rsp), %xmm1
	pcmpeqd	.LC11(%rip), %xmm1
	pcmpeqd	%xmm2, %xmm1
	psubd	%xmm1, %xmm0
	cmpl	$10, %edx
	je	.L5
	movdqu	180(%rsp), %xmm1
	pcmpeqd	.LC12(%rip), %xmm1
	pcmpeqd	%xmm2, %xmm1
	psubd	%xmm1, %xmm0
	cmpl	$11, %edx
	je	.L5
	movdqu	196(%rsp), %xmm1
	pcmpeqd	.LC13(%rip), %xmm1
	pcmpeqd	%xmm2, %xmm1
	psubd	%xmm1, %xmm0
	.p2align 4,,10
	.p2align 3
.L5:
	movdqa	%xmm0, %xmm1
	movl	%eax, %esi
	psrldq	$8, %xmm1
	andl	$-4, %esi
	paddd	%xmm1, %xmm0
	leal	1(%rsi), %ecx
	movdqa	%xmm0, %xmm1
	psrldq	$4, %xmm1
	paddd	%xmm1, %xmm0
	movd	%xmm0, %edx
	cmpl	%esi, %eax
	je	.L6
.L4:
	movslq	%ecx, %rsi
	cmpl	%ecx, 16(%rsp,%rsi,4)
	je	.L7
	addl	$1, %edx
.L7:
	leal	1(%rcx), %esi
	cmpl	%esi, %eax
	jl	.L6
	movslq	%esi, %rdi
	cmpl	16(%rsp,%rdi,4), %esi
	je	.L8
	addl	$1, %edx
.L8:
	addl	$2, %ecx
	cmpl	%ecx, %eax
	jl	.L6
	movslq	%ecx, %rax
	cmpl	16(%rsp,%rax,4), %ecx
	je	.L6
	addl	$1, %edx
.L6:
	cmpl	$2, %edx
	jle	.L12
	leaq	.LC15(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L11:
	movq	216(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L51
	addq	$224, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
.L12:
	.cfi_restore_state
	leaq	.LC14(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L11
.L14:
	xorl	%edx, %edx
	movl	$1, %ecx
	jmp	.L4
.L51:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC1:
	.long	1
	.long	2
	.long	3
	.long	4
	.align 16
.LC2:
	.long	1
	.long	1
	.long	1
	.long	1
	.align 16
.LC3:
	.long	5
	.long	6
	.long	7
	.long	8
	.align 16
.LC4:
	.long	9
	.long	10
	.long	11
	.long	12
	.align 16
.LC5:
	.long	13
	.long	14
	.long	15
	.long	16
	.align 16
.LC6:
	.long	17
	.long	18
	.long	19
	.long	20
	.align 16
.LC7:
	.long	21
	.long	22
	.long	23
	.long	24
	.align 16
.LC8:
	.long	25
	.long	26
	.long	27
	.long	28
	.align 16
.LC9:
	.long	29
	.long	30
	.long	31
	.long	32
	.align 16
.LC10:
	.long	33
	.long	34
	.long	35
	.long	36
	.align 16
.LC11:
	.long	37
	.long	38
	.long	39
	.long	40
	.align 16
.LC12:
	.long	41
	.long	42
	.long	43
	.long	44
	.align 16
.LC13:
	.long	45
	.long	46
	.long	47
	.long	48
	.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
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC14:
	.string	"YES"
.LC15:
	.string	"NO"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	leaq	.LC0(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	movq	%r12, %rdi
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	subq	$224, %rsp
	.cfi_def_cfa_offset 256
	movq	%fs:40, %rax
	movq	%rax, 216(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	testl	%eax, %eax
	jle	.L12
	leaq	20(%rsp), %rbp
	movl	$1, %ebx
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%rbp, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	addq	$4, %rbp
	cmpl	%ebx, %eax
	jge	.L3
	testl	%eax, %eax
	jle	.L12
	leal	-1(%rax), %edx
	cmpl	$2, %edx
	jbe	.L14
	movdqu	20(%rsp), %xmm0
	movl	%eax, %edx
	shrl	$2, %edx
	pcmpeqd	.LC1(%rip), %xmm0
	pandn	.LC2(%rip), %xmm0
	cmpl	$1, %edx
	je	.L5
	movdqu	36(%rsp), %xmm1
	pxor	%xmm2, %xmm2
	pcmpeqd	.LC3(%rip), %xmm1
	pcmpeqd	%xmm2, %xmm1
	psubd	%xmm1, %xmm0
	cmpl	$2, %edx
	je	.L5
	movdqu	52(%rsp), %xmm1
	pcmpeqd	.LC4(%rip), %xmm1
	pcmpeqd	%xmm2, %xmm1
	psubd	%xmm1, %xmm0
	cmpl	$3, %edx
	je	.L5
	movdqu	68(%rsp), %xmm1
	pcmpeqd	.LC5(%rip), %xmm1
	pcmpeqd	%xmm2, %xmm1
	psubd	%xmm1, %xmm0
	cmpl	$4, %edx
	je	.L5
	movdqu	84(%rsp), %xmm1
	pcmpeqd	.LC6(%rip), %xmm1
	pcmpeqd	%xmm2, %xmm1
	psubd	%xmm1, %xmm0
	cmpl	$5, %edx
	je	.L5
	movdqu	100(%rsp), %xmm1
	pcmpeqd	.LC7(%rip), %xmm1
	pcmpeqd	%xmm2, %xmm1
	psubd	%xmm1, %xmm0
	cmpl	$6, %edx
	je	.L5
	movdqu	116(%rsp), %xmm1
	pcmpeqd	.LC8(%rip), %xmm1
	pcmpeqd	%xmm2, %xmm1
	psubd	%xmm1, %xmm0
	cmpl	$7, %edx
	je	.L5
	movdqu	132(%rsp), %xmm1
	pcmpeqd	.LC9(%rip), %xmm1
	pcmpeqd	%xmm2, %xmm1
	psubd	%xmm1, %xmm0
	cmpl	$8, %edx
	je	.L5
	movdqu	148(%rsp), %xmm1
	pcmpeqd	.LC10(%rip), %xmm1
	pcmpeqd	%xmm2, %xmm1
	psubd	%xmm1, %xmm0
	cmpl	$9, %edx
	je	.L5
	movdqu	164(%rsp), %xmm1
	pcmpeqd	.LC11(%rip), %xmm1
	pcmpeqd	%xmm2, %xmm1
	psubd	%xmm1, %xmm0
	cmpl	$10, %edx
	je	.L5
	movdqu	180(%rsp), %xmm1
	pcmpeqd	.LC12(%rip), %xmm1
	pcmpeqd	%xmm2, %xmm1
	psubd	%xmm1, %xmm0
	cmpl	$11, %edx
	je	.L5
	movdqu	196(%rsp), %xmm1
	pcmpeqd	.LC13(%rip), %xmm1
	pcmpeqd	%xmm2, %xmm1
	psubd	%xmm1, %xmm0
	.p2align 4,,10
	.p2align 3
.L5:
	movdqa	%xmm0, %xmm1
	movl	%eax, %esi
	psrldq	$8, %xmm1
	andl	$-4, %esi
	paddd	%xmm1, %xmm0
	leal	1(%rsi), %ecx
	movdqa	%xmm0, %xmm1
	psrldq	$4, %xmm1
	paddd	%xmm1, %xmm0
	movd	%xmm0, %edx
	cmpl	%esi, %eax
	je	.L6
.L4:
	movslq	%ecx, %rsi
	cmpl	%ecx, 16(%rsp,%rsi,4)
	je	.L7
	addl	$1, %edx
.L7:
	leal	1(%rcx), %esi
	cmpl	%esi, %eax
	jl	.L6
	movslq	%esi, %rdi
	cmpl	16(%rsp,%rdi,4), %esi
	je	.L8
	addl	$1, %edx
.L8:
	addl	$2, %ecx
	cmpl	%ecx, %eax
	jl	.L6
	movslq	%ecx, %rax
	cmpl	16(%rsp,%rax,4), %ecx
	je	.L6
	addl	$1, %edx
.L6:
	cmpl	$2, %edx
	jle	.L12
	leaq	.LC15(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L11:
	movq	216(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L51
	addq	$224, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
.L12:
	.cfi_restore_state
	leaq	.LC14(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L11
.L14:
	xorl	%edx, %edx
	movl	$1, %ecx
	jmp	.L4
.L51:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC1:
	.long	1
	.long	2
	.long	3
	.long	4
	.align 16
.LC2:
	.long	1
	.long	1
	.long	1
	.long	1
	.align 16
.LC3:
	.long	5
	.long	6
	.long	7
	.long	8
	.align 16
.LC4:
	.long	9
	.long	10
	.long	11
	.long	12
	.align 16
.LC5:
	.long	13
	.long	14
	.long	15
	.long	16
	.align 16
.LC6:
	.long	17
	.long	18
	.long	19
	.long	20
	.align 16
.LC7:
	.long	21
	.long	22
	.long	23
	.long	24
	.align 16
.LC8:
	.long	25
	.long	26
	.long	27
	.long	28
	.align 16
.LC9:
	.long	29
	.long	30
	.long	31
	.long	32
	.align 16
.LC10:
	.long	33
	.long	34
	.long	35
	.long	36
	.align 16
.LC11:
	.long	37
	.long	38
	.long	39
	.long	40
	.align 16
.LC12:
	.long	41
	.long	42
	.long	43
	.long	44
	.align 16
.LC13:
	.long	45
	.long	46
	.long	47
	.long	48
	.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>
#define size 50
int main()
{
    int ar[size];
    int n,i,count=0;
    scanf("%d",&n);
    for (i=1; i<=n; i++)
    {
        scanf("%d",&ar[i]);
    }
    for(i=1;i<=n;i++)
    {
        if(ar[i]!=i)
            count++;
    }
    if(count>2)
        printf("NO");
    else
        printf("YES");
    return 0;
    
}

5
3 4 3 5 1
 5
5 0 3 4 1
 5
3 4 3 0 1
 5
5 0 3 7 1
 5
3 4 3 1 1
 5
5 0 3 4 2
 5
3 4 1 1 1
 5
4 0 3 4 2
 5
3 8 1 1 1
 5
8 0 3 4 2

NO NO 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>
#define size 50
int main()
{
    int ar[size];
    int n,i,count=0;
    scanf("%d",&n);
    for (i=1; i<=n; i++)
    {
        scanf("%d",&ar[i]);
    }
    for(i=1;i<=n;i++)
    {
        if(ar[i]!=i)
            count++;
    }
    if(count>2)
        printf("NO");
    else
        printf("YES");
    return 0;
    
}
```

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
	subq	$224, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -212(%rbp)
	leaq	-220(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$1, -216(%rbp)
	jmp	.L2
.L3:
	leaq	-208(%rbp), %rdx
	movl	-216(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -216(%rbp)
.L2:
	movl	-220(%rbp), %eax
	cmpl	%eax, -216(%rbp)
	jle	.L3
	movl	$1, -216(%rbp)
	jmp	.L4
.L6:
	movl	-216(%rbp), %eax
	cltq
	movl	-208(%rbp,%rax,4), %eax
	cmpl	%eax, -216(%rbp)
	je	.L5
	addl	$1, -212(%rbp)
.L5:
	addl	$1, -216(%rbp)
.L4:
	movl	-220(%rbp), %eax
	cmpl	%eax, -216(%rbp)
	jle	.L6
	cmpl	$2, -212(%rbp)
	jle	.L7
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L8
.L7:
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L8:
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L10
	call	__stack_chk_fail@PLT
.L10:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.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:
```

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
	subq	$224, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -212(%rbp)
	leaq	-220(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$1, -216(%rbp)
	jmp	.L2
.L3:
	leaq	-208(%rbp), %rdx
	movl	-216(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -216(%rbp)
.L2:
	movl	-220(%rbp), %eax
	cmpl	%eax, -216(%rbp)
	jle	.L3
	movl	$1, -216(%rbp)
	jmp	.L4
.L6:
	movl	-216(%rbp), %eax
	cltq
	movl	-208(%rbp,%rax,4), %eax
	cmpl	%eax, -216(%rbp)
	je	.L5
	addl	$1, -212(%rbp)
.L5:
	addl	$1, -216(%rbp)
.L4:
	movl	-220(%rbp), %eax
	cmpl	%eax, -216(%rbp)
	jle	.L6
	cmpl	$2, -212(%rbp)
	jle	.L7
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L8
.L7:
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L8:
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L10
	call	__stack_chk_fail@PLT
.L10:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.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:
