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>

int main() {
    int N, i, zero_num=0;
    scanf("%d", &N);

    long int a[N];
    for(i=0; i<N; i++) {
        scanf("%ld", &a[i]);
        if(a[i]==0) {
            zero_num += 1;
        }
    }

    // printf("%ld\n", a[0]);

    if(zero_num==N) {
        printf("Yes\n");
        return 0;
    }

    if(N%3) {
        printf("No\n");
        return 0;
    }

    long int b[3] = {-1, -1, -1};
    b[0] = a[0];

    if(zero_num!=0) {
        for(i=0; i<N; i++) {
            if(a[i]!=0) {
                b[0] = a[i];
                break;
            }
        }
        b[1] = 0;
    }

    if(b[1]==-1) {
        for(i=0; i<N; i++) {
            if(b[0]!=a[i]) {
                b[1] = a[i];
                break;
            }
        }
    }


    for(i=1; i<N; i++) {
        if((b[0]!=a[i])&&(b[1]!=a[i])&&((b[0]^b[1])==a[i])) {
            b[2] = a[i];
            if(N==3) {
                printf("Yes\n");
                return 0;
            }
            break;
        }
    }

    if(((b[1]==-1) || (b[2]==-1)) && (zero_num==0)) {
        printf("No\n");
        return 0;
    }


    int count, j, flag=0;

    if(zero_num != 0) {
        if(b[2]==-1) {
            b[2] = b[0];

            j = 0;
            count = 0;
            for(i=0; i<N; i++) {
                if(b[j]==a[i]) {
                    count += 1;
                }
            }
            if(count==2*(N/3)) {
                if(b[0] == 0) {
                    printf("No\n");
                    return 0;
                } else {
                    flag = 3;
                }
            } else {
                flag = -1;
            }

        } else {
            for(j=0; j<3; j++) {
                count = 0;
                for(i=0; i<N; i++) {
                    if(b[j]==a[i]) {
                        count += 1;
                    }
                }
                if(count==(N/3)) {
                    flag += 1;
                } else {
                    flag = -1;
                    break;
                }
            }
        }
    } else {
        for(j=0; j<3; j++) {
            count = 0;
            for(i=0; i<N; i++) {
                if(b[j]==a[i]) {
                    count += 1;
                }
            }
            if(count==(N/3)) {
                flag += 1;
            } else {
                flag = -1;
                break;
            }
        }
    }


    

    if(flag == 3) {
        printf("Yes\n");
    } else {
        printf("No\n");
    }



    return 0;

}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%ld"
.LC2:
	.string	"Yes"
.LC3:
	.string	"No"
	.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	$88, %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	$0, -112(%rbp)
	leaq	-120(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-120(%rbp), %eax
	movslq	%eax, %rdx
	subq	$1, %rdx
	movq	%rdx, -96(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, %r14
	movl	$0, %r15d
	movslq	%eax, %rdx
	movq	%rdx, %r12
	movl	$0, %r13d
	cltq
	leaq	0(,%rax,8), %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	$7, %rax
	shrq	$3, %rax
	salq	$3, %rax
	movq	%rax, -88(%rbp)
	movl	$0, -116(%rbp)
	jmp	.L5
.L7:
	movl	-116(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-88(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	-88(%rbp), %rax
	movl	-116(%rbp), %edx
	movslq	%edx, %rdx
	movq	(%rax,%rdx,8), %rax
	testq	%rax, %rax
	jne	.L6
	addl	$1, -112(%rbp)
.L6:
	addl	$1, -116(%rbp)
.L5:
	movl	-120(%rbp), %eax
	cmpl	%eax, -116(%rbp)
	jl	.L7
	movl	-120(%rbp), %eax
	cmpl	%eax, -112(%rbp)
	jne	.L8
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
	jmp	.L9
.L8:
	movl	-120(%rbp), %edx
	movslq	%edx, %rax
	imulq	$1431655766, %rax, %rax
	shrq	$32, %rax
	movl	%edx, %ecx
	sarl	$31, %ecx
	subl	%ecx, %eax
	movl	%eax, %ecx
	addl	%ecx, %ecx
	addl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	testl	%eax, %eax
	je	.L10
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
	jmp	.L9
.L10:
	movq	$-1, -80(%rbp)
	movq	$-1, -72(%rbp)
	movq	$-1, -64(%rbp)
	movq	-88(%rbp), %rax
	movq	(%rax), %rax
	movq	%rax, -80(%rbp)
	cmpl	$0, -112(%rbp)
	je	.L11
	movl	$0, -116(%rbp)
	jmp	.L12
.L15:
	movq	-88(%rbp), %rax
	movl	-116(%rbp), %edx
	movslq	%edx, %rdx
	movq	(%rax,%rdx,8), %rax
	testq	%rax, %rax
	je	.L13
	movq	-88(%rbp), %rax
	movl	-116(%rbp), %edx
	movslq	%edx, %rdx
	movq	(%rax,%rdx,8), %rax
	movq	%rax, -80(%rbp)
	jmp	.L14
.L13:
	addl	$1, -116(%rbp)
.L12:
	movl	-120(%rbp), %eax
	cmpl	%eax, -116(%rbp)
	jl	.L15
.L14:
	movq	$0, -72(%rbp)
.L11:
	movq	-72(%rbp), %rax
	cmpq	$-1, %rax
	jne	.L16
	movl	$0, -116(%rbp)
	jmp	.L17
.L19:
	movq	-80(%rbp), %rcx
	movq	-88(%rbp), %rax
	movl	-116(%rbp), %edx
	movslq	%edx, %rdx
	movq	(%rax,%rdx,8), %rax
	cmpq	%rax, %rcx
	je	.L18
	movq	-88(%rbp), %rax
	movl	-116(%rbp), %edx
	movslq	%edx, %rdx
	movq	(%rax,%rdx,8), %rax
	movq	%rax, -72(%rbp)
	jmp	.L16
.L18:
	addl	$1, -116(%rbp)
.L17:
	movl	-120(%rbp), %eax
	cmpl	%eax, -116(%rbp)
	jl	.L19
.L16:
	movl	$1, -116(%rbp)
	jmp	.L20
.L24:
	movq	-80(%rbp), %rcx
	movq	-88(%rbp), %rax
	movl	-116(%rbp), %edx
	movslq	%edx, %rdx
	movq	(%rax,%rdx,8), %rax
	cmpq	%rax, %rcx
	je	.L21
	movq	-72(%rbp), %rcx
	movq	-88(%rbp), %rax
	movl	-116(%rbp), %edx
	movslq	%edx, %rdx
	movq	(%rax,%rdx,8), %rax
	cmpq	%rax, %rcx
	je	.L21
	movq	-80(%rbp), %rdx
	movq	-72(%rbp), %rax
	movq	%rdx, %rcx
	xorq	%rax, %rcx
	movq	-88(%rbp), %rax
	movl	-116(%rbp), %edx
	movslq	%edx, %rdx
	movq	(%rax,%rdx,8), %rax
	cmpq	%rax, %rcx
	jne	.L21
	movq	-88(%rbp), %rax
	movl	-116(%rbp), %edx
	movslq	%edx, %rdx
	movq	(%rax,%rdx,8), %rax
	movq	%rax, -64(%rbp)
	movl	-120(%rbp), %eax
	cmpl	$3, %eax
	jne	.L56
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
	jmp	.L9
.L21:
	addl	$1, -116(%rbp)
.L20:
	movl	-120(%rbp), %eax
	cmpl	%eax, -116(%rbp)
	jl	.L24
	jmp	.L23
.L56:
	nop
.L23:
	movq	-72(%rbp), %rax
	cmpq	$-1, %rax
	je	.L25
	movq	-64(%rbp), %rax
	cmpq	$-1, %rax
	jne	.L26
.L25:
	cmpl	$0, -112(%rbp)
	jne	.L26
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
	jmp	.L9
.L26:
	movl	$0, -100(%rbp)
	cmpl	$0, -112(%rbp)
	je	.L27
	movq	-64(%rbp), %rax
	cmpq	$-1, %rax
	jne	.L28
	movq	-80(%rbp), %rax
	movq	%rax, -64(%rbp)
	movl	$0, -104(%rbp)
	movl	$0, -108(%rbp)
	movl	$0, -116(%rbp)
	jmp	.L29
.L31:
	movl	-104(%rbp), %eax
	cltq
	movq	-80(%rbp,%rax,8), %rcx
	movq	-88(%rbp), %rax
	movl	-116(%rbp), %edx
	movslq	%edx, %rdx
	movq	(%rax,%rdx,8), %rax
	cmpq	%rax, %rcx
	jne	.L30
	addl	$1, -108(%rbp)
.L30:
	addl	$1, -116(%rbp)
.L29:
	movl	-120(%rbp), %eax
	cmpl	%eax, -116(%rbp)
	jl	.L31
	movl	-120(%rbp), %eax
	movslq	%eax, %rdx
	imulq	$1431655766, %rdx, %rdx
	shrq	$32, %rdx
	sarl	$31, %eax
	movl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	addl	%eax, %eax
	cmpl	%eax, -108(%rbp)
	jne	.L32
	movq	-80(%rbp), %rax
	testq	%rax, %rax
	jne	.L33
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
	jmp	.L9
.L33:
	movl	$3, -100(%rbp)
	jmp	.L42
.L32:
	movl	$-1, -100(%rbp)
	jmp	.L42
.L28:
	movl	$0, -104(%rbp)
	jmp	.L35
.L41:
	movl	$0, -108(%rbp)
	movl	$0, -116(%rbp)
	jmp	.L36
.L38:
	movl	-104(%rbp), %eax
	cltq
	movq	-80(%rbp,%rax,8), %rcx
	movq	-88(%rbp), %rax
	movl	-116(%rbp), %edx
	movslq	%edx, %rdx
	movq	(%rax,%rdx,8), %rax
	cmpq	%rax, %rcx
	jne	.L37
	addl	$1, -108(%rbp)
.L37:
	addl	$1, -116(%rbp)
.L36:
	movl	-120(%rbp), %eax
	cmpl	%eax, -116(%rbp)
	jl	.L38
	movl	-120(%rbp), %eax
	movslq	%eax, %rdx
	imulq	$1431655766, %rdx, %rdx
	shrq	$32, %rdx
	sarl	$31, %eax
	movl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	cmpl	%eax, -108(%rbp)
	jne	.L39
	addl	$1, -100(%rbp)
	jmp	.L54
.L39:
	movl	$-1, -100(%rbp)
	jmp	.L42
.L54:
	addl	$1, -104(%rbp)
.L35:
	cmpl	$2, -104(%rbp)
	jle	.L41
	jmp	.L42
.L27:
	movl	$0, -104(%rbp)
	jmp	.L43
.L49:
	movl	$0, -108(%rbp)
	movl	$0, -116(%rbp)
	jmp	.L44
.L46:
	movl	-104(%rbp), %eax
	cltq
	movq	-80(%rbp,%rax,8), %rcx
	movq	-88(%rbp), %rax
	movl	-116(%rbp), %edx
	movslq	%edx, %rdx
	movq	(%rax,%rdx,8), %rax
	cmpq	%rax, %rcx
	jne	.L45
	addl	$1, -108(%rbp)
.L45:
	addl	$1, -116(%rbp)
.L44:
	movl	-120(%rbp), %eax
	cmpl	%eax, -116(%rbp)
	jl	.L46
	movl	-120(%rbp), %eax
	movslq	%eax, %rdx
	imulq	$1431655766, %rdx, %rdx
	shrq	$32, %rdx
	sarl	$31, %eax
	movl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	cmpl	%eax, -108(%rbp)
	jne	.L47
	addl	$1, -100(%rbp)
	jmp	.L55
.L47:
	movl	$-1, -100(%rbp)
	jmp	.L42
.L55:
	addl	$1, -104(%rbp)
.L43:
	cmpl	$2, -104(%rbp)
	jle	.L49
.L42:
	cmpl	$3, -100(%rbp)
	jne	.L50
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L51
.L50:
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
.L51:
	movl	$0, %eax
.L9:
	movq	%rbx, %rsp
	movq	-56(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L53
	call	__stack_chk_fail@PLT
.L53:
	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
	.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"
.LC1:
	.string	"%ld"
.LC2:
	.string	"Yes"
.LC3:
	.string	"No"
	.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
	leaq	.LC0(%rip), %rdi
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r15
	pushq	%r14
	leaq	-84(%rbp), %rsi
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$72, %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
	call	__isoc99_scanf@PLT
	movslq	-84(%rbp), %rax
	movq	%rsp, %rsi
	movq	%rax, %rcx
	leaq	15(,%rax,8), %rax
	movq	%rax, %rdx
	andq	$-4096, %rax
	subq	%rax, %rsi
	andq	$-16, %rdx
	cmpq	%rsi, %rsp
	je	.L3
.L76:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%rsi, %rsp
	jne	.L76
.L3:
	andl	$4095, %edx
	subq	%rdx, %rsp
	testq	%rdx, %rdx
	jne	.L77
.L4:
	leaq	7(%rsp), %r12
	movq	%r12, %rax
	andq	$-8, %r12
	shrq	$3, %rax
	movq	%rax, -104(%rbp)
	testl	%ecx, %ecx
	jle	.L45
	movq	%r12, %rbx
	xorl	%r14d, %r14d
	leaq	.LC1(%rip), %r13
	xorl	%r15d, %r15d
	.p2align 4,,10
	.p2align 3
.L7:
	movq	%rbx, %rsi
	xorl	%eax, %eax
	movq	%r13, %rdi
	call	__isoc99_scanf@PLT
	cmpq	$1, (%rbx)
	movl	-84(%rbp), %ecx
	adcl	$0, %r14d
	addl	$1, %r15d
	addq	$8, %rbx
	cmpl	%r15d, %ecx
	jg	.L7
.L5:
	cmpl	%r14d, %ecx
	je	.L22
	movslq	%ecx, %rsi
	movl	%ecx, %eax
	imulq	$1431655766, %rsi, %rsi
	sarl	$31, %eax
	shrq	$32, %rsi
	subl	%eax, %esi
	leal	(%rsi,%rsi,2), %eax
	movl	%ecx, %esi
	subl	%eax, %esi
	jne	.L27
	movq	-104(%rbp), %rax
	movq	$-1, -72(%rbp)
	movq	$-1, -64(%rbp)
	movq	0(,%rax,8), %rdi
	movq	%rdi, -80(%rbp)
	testl	%r14d, %r14d
	jne	.L78
	testl	%ecx, %ecx
	jle	.L27
	leal	-1(%rcx), %edx
	leaq	8(%r12), %rbx
	movq	%r12, %rax
	leaq	(%rbx,%rdx,8), %r9
	jmp	.L19
	.p2align 4,,10
	.p2align 3
.L17:
	addq	$8, %rax
	cmpq	%r9, %rax
	je	.L18
.L19:
	movq	(%rax), %rdx
	cmpq	%rdx, %rdi
	je	.L17
	movq	%rdx, -72(%rbp)
.L18:
	movq	-72(%rbp), %r10
	cmpl	$1, %ecx
	jne	.L15
.L23:
	addq	$1, %r10
	je	.L79
.L16:
	cmpq	$-1, -64(%rbp)
	je	.L80
	movl	%ecx, %eax
	movl	$3, %esi
	leaq	8(%r12), %rbx
	cltd
	idivl	%esi
	testl	%r14d, %r14d
	jne	.L28
	leal	-1(%rcx), %edx
	leaq	-80(%rbp), %r10
	leaq	-56(%rbp), %r11
	leaq	8(%r12,%rdx,8), %r9
.L41:
	xorl	%esi, %esi
	testl	%ecx, %ecx
	jle	.L40
	movq	(%r10), %r8
	movq	%r12, %rdx
	xorl	%esi, %esi
	.p2align 4,,10
	.p2align 3
.L38:
	xorl	%edi, %edi
	cmpq	(%rdx), %r8
	sete	%dil
	addq	$8, %rdx
	addl	%edi, %esi
	cmpq	%r9, %rdx
	jne	.L38
.L40:
	cmpl	%esi, %eax
	jne	.L27
	addq	$8, %r10
	cmpq	%r11, %r10
	jne	.L41
.L22:
	leaq	.LC2(%rip), %rdi
	call	puts@PLT
	jmp	.L9
.L80:
	testl	%r14d, %r14d
	je	.L27
.L43:
	movq	-80(%rbp), %rdi
	testl	%ecx, %ecx
	jle	.L29
	leal	-1(%rcx), %eax
	leaq	8(%r12,%rax,8), %rdx
	.p2align 4,,10
	.p2align 3
.L31:
	xorl	%eax, %eax
	cmpq	(%r12), %rdi
	sete	%al
	addq	$8, %r12
	addl	%eax, %esi
	cmpq	%rdx, %r12
	jne	.L31
.L29:
	movl	%ecx, %eax
	movl	$3, %r8d
	cltd
	idivl	%r8d
	addl	%eax, %eax
	cmpl	%esi, %eax
	je	.L81
.L27:
	leaq	.LC3(%rip), %rdi
	call	puts@PLT
.L9:
	movq	-56(%rbp), %rax
	subq	%fs:40, %rax
	jne	.L82
	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
.L78:
	.cfi_restore_state
	testl	%ecx, %ecx
	jle	.L12
	leal	-1(%rcx), %edx
	movq	%r12, %rax
	leaq	8(%r12,%rdx,8), %rdi
	jmp	.L14
	.p2align 4,,10
	.p2align 3
.L13:
	addq	$8, %rax
	cmpq	%rdi, %rax
	je	.L12
.L14:
	movq	(%rax), %rdx
	testq	%rdx, %rdx
	je	.L13
	movq	%rdx, -80(%rbp)
.L12:
	movq	$0, -72(%rbp)
	xorl	%r10d, %r10d
	leaq	8(%r12), %rbx
	cmpl	$1, %ecx
	jle	.L16
.L15:
	movq	-80(%rbp), %rdi
	leal	-2(%rcx), %eax
	movq	%rbx, %rdx
	leaq	16(%r12,%rax,8), %r9
	movq	%rdi, %r11
	xorq	%r10, %r11
	.p2align 4,,10
	.p2align 3
.L24:
	movq	(%rdx), %rax
	cmpq	%rax, %rdi
	je	.L21
	cmpq	%r10, %rax
	je	.L21
	cmpq	%r11, %rax
	je	.L83
.L21:
	addq	$8, %rdx
	cmpq	%r9, %rdx
	jne	.L24
	jmp	.L23
.L79:
	testl	%r14d, %r14d
	je	.L27
	cmpq	$-1, -64(%rbp)
	je	.L43
.L28:
	movl	%ecx, %eax
	movl	$3, %esi
	xorl	%r10d, %r10d
	cltd
	idivl	%esi
	leal	-1(%rcx), %edx
	leaq	(%rbx,%rdx,8), %r9
.L34:
	xorl	%esi, %esi
	testl	%ecx, %ecx
	jle	.L36
	movq	-80(%rbp,%r10,8), %r8
	movq	%r12, %rdx
	xorl	%esi, %esi
	.p2align 4,,10
	.p2align 3
.L33:
	xorl	%edi, %edi
	cmpq	%r8, (%rdx)
	sete	%dil
	addq	$8, %rdx
	addl	%edi, %esi
	cmpq	%r9, %rdx
	jne	.L33
.L36:
	cmpl	%esi, %eax
	jne	.L27
	addq	$1, %r10
	cmpq	$3, %r10
	jne	.L34
	jmp	.L22
.L83:
	movq	%r11, -64(%rbp)
	cmpl	$3, %ecx
	jne	.L23
	jmp	.L22
.L77:
	orq	$0, -8(%rsp,%rdx)
	jmp	.L4
.L45:
	xorl	%r14d, %r14d
	jmp	.L5
.L81:
	testq	%rdi, %rdi
	jne	.L22
	jmp	.L27
.L82:
	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
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%ld"
.LC2:
	.string	"Yes"
.LC3:
	.string	"No"
	.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
	leaq	.LC0(%rip), %rdi
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r15
	pushq	%r14
	leaq	-84(%rbp), %rsi
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$72, %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
	call	__isoc99_scanf@PLT
	movslq	-84(%rbp), %rax
	movq	%rsp, %rsi
	movq	%rax, %rcx
	leaq	15(,%rax,8), %rax
	movq	%rax, %rdx
	andq	$-4096, %rax
	subq	%rax, %rsi
	andq	$-16, %rdx
	cmpq	%rsi, %rsp
	je	.L3
.L76:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%rsi, %rsp
	jne	.L76
.L3:
	andl	$4095, %edx
	subq	%rdx, %rsp
	testq	%rdx, %rdx
	jne	.L77
.L4:
	leaq	7(%rsp), %r12
	movq	%r12, %rax
	andq	$-8, %r12
	shrq	$3, %rax
	movq	%rax, -104(%rbp)
	testl	%ecx, %ecx
	jle	.L45
	movq	%r12, %rbx
	xorl	%r14d, %r14d
	leaq	.LC1(%rip), %r13
	xorl	%r15d, %r15d
	.p2align 4,,10
	.p2align 3
.L7:
	movq	%rbx, %rsi
	xorl	%eax, %eax
	movq	%r13, %rdi
	call	__isoc99_scanf@PLT
	cmpq	$1, (%rbx)
	movl	-84(%rbp), %ecx
	adcl	$0, %r14d
	addl	$1, %r15d
	addq	$8, %rbx
	cmpl	%r15d, %ecx
	jg	.L7
.L5:
	cmpl	%r14d, %ecx
	je	.L22
	movslq	%ecx, %rsi
	movl	%ecx, %eax
	imulq	$1431655766, %rsi, %rsi
	sarl	$31, %eax
	shrq	$32, %rsi
	subl	%eax, %esi
	leal	(%rsi,%rsi,2), %eax
	movl	%ecx, %esi
	subl	%eax, %esi
	jne	.L27
	movq	-104(%rbp), %rax
	movq	$-1, -72(%rbp)
	movq	$-1, -64(%rbp)
	movq	0(,%rax,8), %rdi
	movq	%rdi, -80(%rbp)
	testl	%r14d, %r14d
	jne	.L78
	testl	%ecx, %ecx
	jle	.L27
	leal	-1(%rcx), %edx
	leaq	8(%r12), %rbx
	movq	%r12, %rax
	leaq	(%rbx,%rdx,8), %r9
	jmp	.L19
	.p2align 4,,10
	.p2align 3
.L17:
	addq	$8, %rax
	cmpq	%r9, %rax
	je	.L18
.L19:
	movq	(%rax), %rdx
	cmpq	%rdx, %rdi
	je	.L17
	movq	%rdx, -72(%rbp)
.L18:
	movq	-72(%rbp), %r10
	cmpl	$1, %ecx
	jne	.L15
.L23:
	addq	$1, %r10
	je	.L79
.L16:
	cmpq	$-1, -64(%rbp)
	je	.L80
	movl	%ecx, %eax
	movl	$3, %esi
	leaq	8(%r12), %rbx
	cltd
	idivl	%esi
	testl	%r14d, %r14d
	jne	.L28
	leal	-1(%rcx), %edx
	leaq	-80(%rbp), %r10
	leaq	-56(%rbp), %r11
	leaq	8(%r12,%rdx,8), %r9
.L41:
	xorl	%esi, %esi
	testl	%ecx, %ecx
	jle	.L40
	movq	(%r10), %r8
	movq	%r12, %rdx
	xorl	%esi, %esi
	.p2align 4,,10
	.p2align 3
.L38:
	xorl	%edi, %edi
	cmpq	(%rdx), %r8
	sete	%dil
	addq	$8, %rdx
	addl	%edi, %esi
	cmpq	%r9, %rdx
	jne	.L38
.L40:
	cmpl	%esi, %eax
	jne	.L27
	addq	$8, %r10
	cmpq	%r11, %r10
	jne	.L41
.L22:
	leaq	.LC2(%rip), %rdi
	call	puts@PLT
	jmp	.L9
.L80:
	testl	%r14d, %r14d
	je	.L27
.L43:
	movq	-80(%rbp), %rdi
	testl	%ecx, %ecx
	jle	.L29
	leal	-1(%rcx), %eax
	leaq	8(%r12,%rax,8), %rdx
	.p2align 4,,10
	.p2align 3
.L31:
	xorl	%eax, %eax
	cmpq	(%r12), %rdi
	sete	%al
	addq	$8, %r12
	addl	%eax, %esi
	cmpq	%rdx, %r12
	jne	.L31
.L29:
	movl	%ecx, %eax
	movl	$3, %r8d
	cltd
	idivl	%r8d
	addl	%eax, %eax
	cmpl	%esi, %eax
	je	.L81
.L27:
	leaq	.LC3(%rip), %rdi
	call	puts@PLT
.L9:
	movq	-56(%rbp), %rax
	subq	%fs:40, %rax
	jne	.L82
	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
.L78:
	.cfi_restore_state
	testl	%ecx, %ecx
	jle	.L12
	leal	-1(%rcx), %edx
	movq	%r12, %rax
	leaq	8(%r12,%rdx,8), %rdi
	jmp	.L14
	.p2align 4,,10
	.p2align 3
.L13:
	addq	$8, %rax
	cmpq	%rdi, %rax
	je	.L12
.L14:
	movq	(%rax), %rdx
	testq	%rdx, %rdx
	je	.L13
	movq	%rdx, -80(%rbp)
.L12:
	movq	$0, -72(%rbp)
	xorl	%r10d, %r10d
	leaq	8(%r12), %rbx
	cmpl	$1, %ecx
	jle	.L16
.L15:
	movq	-80(%rbp), %rdi
	leal	-2(%rcx), %eax
	movq	%rbx, %rdx
	leaq	16(%r12,%rax,8), %r9
	movq	%rdi, %r11
	xorq	%r10, %r11
	.p2align 4,,10
	.p2align 3
.L24:
	movq	(%rdx), %rax
	cmpq	%rax, %rdi
	je	.L21
	cmpq	%r10, %rax
	je	.L21
	cmpq	%r11, %rax
	je	.L83
.L21:
	addq	$8, %rdx
	cmpq	%r9, %rdx
	jne	.L24
	jmp	.L23
.L79:
	testl	%r14d, %r14d
	je	.L27
	cmpq	$-1, -64(%rbp)
	je	.L43
.L28:
	movl	%ecx, %eax
	movl	$3, %esi
	xorl	%r10d, %r10d
	cltd
	idivl	%esi
	leal	-1(%rcx), %edx
	leaq	(%rbx,%rdx,8), %r9
.L34:
	xorl	%esi, %esi
	testl	%ecx, %ecx
	jle	.L36
	movq	-80(%rbp,%r10,8), %r8
	movq	%r12, %rdx
	xorl	%esi, %esi
	.p2align 4,,10
	.p2align 3
.L33:
	xorl	%edi, %edi
	cmpq	%r8, (%rdx)
	sete	%dil
	addq	$8, %rdx
	addl	%edi, %esi
	cmpq	%r9, %rdx
	jne	.L33
.L36:
	cmpl	%esi, %eax
	jne	.L27
	addq	$1, %r10
	cmpq	$3, %r10
	jne	.L34
	jmp	.L22
.L83:
	movq	%r11, -64(%rbp)
	cmpl	$3, %ecx
	jne	.L23
	jmp	.L22
.L77:
	orq	$0, -8(%rsp,%rdx)
	jmp	.L4
.L45:
	xorl	%r14d, %r14d
	jmp	.L5
.L81:
	testq	%rdi, %rdi
	jne	.L22
	jmp	.L27
.L82:
	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>

int main() {
    int N, i, zero_num=0;
    scanf("%d", &N);

    long int a[N];
    for(i=0; i<N; i++) {
        scanf("%ld", &a[i]);
        if(a[i]==0) {
            zero_num += 1;
        }
    }

    // printf("%ld\n", a[0]);

    if(zero_num==N) {
        printf("Yes\n");
        return 0;
    }

    if(N%3) {
        printf("No\n");
        return 0;
    }

    long int b[3] = {-1, -1, -1};
    b[0] = a[0];

    if(zero_num!=0) {
        for(i=0; i<N; i++) {
            if(a[i]!=0) {
                b[0] = a[i];
                break;
            }
        }
        b[1] = 0;
    }

    if(b[1]==-1) {
        for(i=0; i<N; i++) {
            if(b[0]!=a[i]) {
                b[1] = a[i];
                break;
            }
        }
    }


    for(i=1; i<N; i++) {
        if((b[0]!=a[i])&&(b[1]!=a[i])&&((b[0]^b[1])==a[i])) {
            b[2] = a[i];
            if(N==3) {
                printf("Yes\n");
                return 0;
            }
            break;
        }
    }

    if(((b[1]==-1) || (b[2]==-1)) && (zero_num==0)) {
        printf("No\n");
        return 0;
    }


    int count, j, flag=0;

    if(zero_num != 0) {
        if(b[2]==-1) {
            b[2] = b[0];

            j = 0;
            count = 0;
            for(i=0; i<N; i++) {
                if(b[j]==a[i]) {
                    count += 1;
                }
            }
            if(count==2*(N/3)) {
                if(b[0] == 0) {
                    printf("No\n");
                    return 0;
                } else {
                    flag = 3;
                }
            } else {
                flag = -1;
            }

        } else {
            for(j=0; j<3; j++) {
                count = 0;
                for(i=0; i<N; i++) {
                    if(b[j]==a[i]) {
                        count += 1;
                    }
                }
                if(count==(N/3)) {
                    flag += 1;
                } else {
                    flag = -1;
                    break;
                }
            }
        }
    } else {
        for(j=0; j<3; j++) {
            count = 0;
            for(i=0; i<N; i++) {
                if(b[j]==a[i]) {
                    count += 1;
                }
            }
            if(count==(N/3)) {
                flag += 1;
            } else {
                flag = -1;
                break;
            }
        }
    }


    

    if(flag == 3) {
        printf("Yes\n");
    } else {
        printf("No\n");
    }



    return 0;

}
3
1 2 0
 3
3 2 1
 4
1 2 4 11
 3
0 2 0
 4
0 2 4 11
 3
0 1 0
 4
0 4 4 11
 3
0 1 -1
 4
0 4 4 20
 3
1 2 1

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>

int main() {
    int N, i, zero_num=0;
    scanf("%d", &N);

    long int a[N];
    for(i=0; i<N; i++) {
        scanf("%ld", &a[i]);
        if(a[i]==0) {
            zero_num += 1;
        }
    }

    // printf("%ld\n", a[0]);

    if(zero_num==N) {
        printf("Yes\n");
        return 0;
    }

    if(N%3) {
        printf("No\n");
        return 0;
    }

    long int b[3] = {-1, -1, -1};
    b[0] = a[0];

    if(zero_num!=0) {
        for(i=0; i<N; i++) {
            if(a[i]!=0) {
                b[0] = a[i];
                break;
            }
        }
        b[1] = 0;
    }

    if(b[1]==-1) {
        for(i=0; i<N; i++) {
            if(b[0]!=a[i]) {
                b[1] = a[i];
                break;
            }
        }
    }


    for(i=1; i<N; i++) {
        if((b[0]!=a[i])&&(b[1]!=a[i])&&((b[0]^b[1])==a[i])) {
            b[2] = a[i];
            if(N==3) {
                printf("Yes\n");
                return 0;
            }
            break;
        }
    }

    if(((b[1]==-1) || (b[2]==-1)) && (zero_num==0)) {
        printf("No\n");
        return 0;
    }


    int count, j, flag=0;

    if(zero_num != 0) {
        if(b[2]==-1) {
            b[2] = b[0];

            j = 0;
            count = 0;
            for(i=0; i<N; i++) {
                if(b[j]==a[i]) {
                    count += 1;
                }
            }
            if(count==2*(N/3)) {
                if(b[0] == 0) {
                    printf("No\n");
                    return 0;
                } else {
                    flag = 3;
                }
            } else {
                flag = -1;
            }

        } else {
            for(j=0; j<3; j++) {
                count = 0;
                for(i=0; i<N; i++) {
                    if(b[j]==a[i]) {
                        count += 1;
                    }
                }
                if(count==(N/3)) {
                    flag += 1;
                } else {
                    flag = -1;
                    break;
                }
            }
        }
    } else {
        for(j=0; j<3; j++) {
            count = 0;
            for(i=0; i<N; i++) {
                if(b[j]==a[i]) {
                    count += 1;
                }
            }
            if(count==(N/3)) {
                flag += 1;
            } else {
                flag = -1;
                break;
            }
        }
    }


    

    if(flag == 3) {
        printf("Yes\n");
    } else {
        printf("No\n");
    }



    return 0;

}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%ld"
.LC2:
	.string	"Yes"
.LC3:
	.string	"No"
	.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	$88, %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	$0, -112(%rbp)
	leaq	-120(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-120(%rbp), %eax
	movslq	%eax, %rdx
	subq	$1, %rdx
	movq	%rdx, -96(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, %r14
	movl	$0, %r15d
	movslq	%eax, %rdx
	movq	%rdx, %r12
	movl	$0, %r13d
	cltq
	leaq	0(,%rax,8), %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	$7, %rax
	shrq	$3, %rax
	salq	$3, %rax
	movq	%rax, -88(%rbp)
	movl	$0, -116(%rbp)
	jmp	.L5
.L7:
	movl	-116(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-88(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	-88(%rbp), %rax
	movl	-116(%rbp), %edx
	movslq	%edx, %rdx
	movq	(%rax,%rdx,8), %rax
	testq	%rax, %rax
	jne	.L6
	addl	$1, -112(%rbp)
.L6:
	addl	$1, -116(%rbp)
.L5:
	movl	-120(%rbp), %eax
	cmpl	%eax, -116(%rbp)
	jl	.L7
	movl	-120(%rbp), %eax
	cmpl	%eax, -112(%rbp)
	jne	.L8
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
	jmp	.L9
.L8:
	movl	-120(%rbp), %edx
	movslq	%edx, %rax
	imulq	$1431655766, %rax, %rax
	shrq	$32, %rax
	movl	%edx, %ecx
	sarl	$31, %ecx
	subl	%ecx, %eax
	movl	%eax, %ecx
	addl	%ecx, %ecx
	addl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	testl	%eax, %eax
	je	.L10
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
	jmp	.L9
.L10:
	movq	$-1, -80(%rbp)
	movq	$-1, -72(%rbp)
	movq	$-1, -64(%rbp)
	movq	-88(%rbp), %rax
	movq	(%rax), %rax
	movq	%rax, -80(%rbp)
	cmpl	$0, -112(%rbp)
	je	.L11
	movl	$0, -116(%rbp)
	jmp	.L12
.L15:
	movq	-88(%rbp), %rax
	movl	-116(%rbp), %edx
	movslq	%edx, %rdx
	movq	(%rax,%rdx,8), %rax
	testq	%rax, %rax
	je	.L13
	movq	-88(%rbp), %rax
	movl	-116(%rbp), %edx
	movslq	%edx, %rdx
	movq	(%rax,%rdx,8), %rax
	movq	%rax, -80(%rbp)
	jmp	.L14
.L13:
	addl	$1, -116(%rbp)
.L12:
	movl	-120(%rbp), %eax
	cmpl	%eax, -116(%rbp)
	jl	.L15
.L14:
	movq	$0, -72(%rbp)
.L11:
	movq	-72(%rbp), %rax
	cmpq	$-1, %rax
	jne	.L16
	movl	$0, -116(%rbp)
	jmp	.L17
.L19:
	movq	-80(%rbp), %rcx
	movq	-88(%rbp), %rax
	movl	-116(%rbp), %edx
	movslq	%edx, %rdx
	movq	(%rax,%rdx,8), %rax
	cmpq	%rax, %rcx
	je	.L18
	movq	-88(%rbp), %rax
	movl	-116(%rbp), %edx
	movslq	%edx, %rdx
	movq	(%rax,%rdx,8), %rax
	movq	%rax, -72(%rbp)
	jmp	.L16
.L18:
	addl	$1, -116(%rbp)
.L17:
	movl	-120(%rbp), %eax
	cmpl	%eax, -116(%rbp)
	jl	.L19
.L16:
	movl	$1, -116(%rbp)
	jmp	.L20
.L24:
	movq	-80(%rbp), %rcx
	movq	-88(%rbp), %rax
	movl	-116(%rbp), %edx
	movslq	%edx, %rdx
	movq	(%rax,%rdx,8), %rax
	cmpq	%rax, %rcx
	je	.L21
	movq	-72(%rbp), %rcx
	movq	-88(%rbp), %rax
	movl	-116(%rbp), %edx
	movslq	%edx, %rdx
	movq	(%rax,%rdx,8), %rax
	cmpq	%rax, %rcx
	je	.L21
	movq	-80(%rbp), %rdx
	movq	-72(%rbp), %rax
	movq	%rdx, %rcx
	xorq	%rax, %rcx
	movq	-88(%rbp), %rax
	movl	-116(%rbp), %edx
	movslq	%edx, %rdx
	movq	(%rax,%rdx,8), %rax
	cmpq	%rax, %rcx
	jne	.L21
	movq	-88(%rbp), %rax
	movl	-116(%rbp), %edx
	movslq	%edx, %rdx
	movq	(%rax,%rdx,8), %rax
	movq	%rax, -64(%rbp)
	movl	-120(%rbp), %eax
	cmpl	$3, %eax
	jne	.L56
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
	jmp	.L9
.L21:
	addl	$1, -116(%rbp)
.L20:
	movl	-120(%rbp), %eax
	cmpl	%eax, -116(%rbp)
	jl	.L24
	jmp	.L23
.L56:
	nop
.L23:
	movq	-72(%rbp), %rax
	cmpq	$-1, %rax
	je	.L25
	movq	-64(%rbp), %rax
	cmpq	$-1, %rax
	jne	.L26
.L25:
	cmpl	$0, -112(%rbp)
	jne	.L26
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
	jmp	.L9
.L26:
	movl	$0, -100(%rbp)
	cmpl	$0, -112(%rbp)
	je	.L27
	movq	-64(%rbp), %rax
	cmpq	$-1, %rax
	jne	.L28
	movq	-80(%rbp), %rax
	movq	%rax, -64(%rbp)
	movl	$0, -104(%rbp)
	movl	$0, -108(%rbp)
	movl	$0, -116(%rbp)
	jmp	.L29
.L31:
	movl	-104(%rbp), %eax
	cltq
	movq	-80(%rbp,%rax,8), %rcx
	movq	-88(%rbp), %rax
	movl	-116(%rbp), %edx
	movslq	%edx, %rdx
	movq	(%rax,%rdx,8), %rax
	cmpq	%rax, %rcx
	jne	.L30
	addl	$1, -108(%rbp)
.L30:
	addl	$1, -116(%rbp)
.L29:
	movl	-120(%rbp), %eax
	cmpl	%eax, -116(%rbp)
	jl	.L31
	movl	-120(%rbp), %eax
	movslq	%eax, %rdx
	imulq	$1431655766, %rdx, %rdx
	shrq	$32, %rdx
	sarl	$31, %eax
	movl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	addl	%eax, %eax
	cmpl	%eax, -108(%rbp)
	jne	.L32
	movq	-80(%rbp), %rax
	testq	%rax, %rax
	jne	.L33
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
	jmp	.L9
.L33:
	movl	$3, -100(%rbp)
	jmp	.L42
.L32:
	movl	$-1, -100(%rbp)
	jmp	.L42
.L28:
	movl	$0, -104(%rbp)
	jmp	.L35
.L41:
	movl	$0, -108(%rbp)
	movl	$0, -116(%rbp)
	jmp	.L36
.L38:
	movl	-104(%rbp), %eax
	cltq
	movq	-80(%rbp,%rax,8), %rcx
	movq	-88(%rbp), %rax
	movl	-116(%rbp), %edx
	movslq	%edx, %rdx
	movq	(%rax,%rdx,8), %rax
	cmpq	%rax, %rcx
	jne	.L37
	addl	$1, -108(%rbp)
.L37:
	addl	$1, -116(%rbp)
.L36:
	movl	-120(%rbp), %eax
	cmpl	%eax, -116(%rbp)
	jl	.L38
	movl	-120(%rbp), %eax
	movslq	%eax, %rdx
	imulq	$1431655766, %rdx, %rdx
	shrq	$32, %rdx
	sarl	$31, %eax
	movl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	cmpl	%eax, -108(%rbp)
	jne	.L39
	addl	$1, -100(%rbp)
	jmp	.L54
.L39:
	movl	$-1, -100(%rbp)
	jmp	.L42
.L54:
	addl	$1, -104(%rbp)
.L35:
	cmpl	$2, -104(%rbp)
	jle	.L41
	jmp	.L42
.L27:
	movl	$0, -104(%rbp)
	jmp	.L43
.L49:
	movl	$0, -108(%rbp)
	movl	$0, -116(%rbp)
	jmp	.L44
.L46:
	movl	-104(%rbp), %eax
	cltq
	movq	-80(%rbp,%rax,8), %rcx
	movq	-88(%rbp), %rax
	movl	-116(%rbp), %edx
	movslq	%edx, %rdx
	movq	(%rax,%rdx,8), %rax
	cmpq	%rax, %rcx
	jne	.L45
	addl	$1, -108(%rbp)
.L45:
	addl	$1, -116(%rbp)
.L44:
	movl	-120(%rbp), %eax
	cmpl	%eax, -116(%rbp)
	jl	.L46
	movl	-120(%rbp), %eax
	movslq	%eax, %rdx
	imulq	$1431655766, %rdx, %rdx
	shrq	$32, %rdx
	sarl	$31, %eax
	movl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	cmpl	%eax, -108(%rbp)
	jne	.L47
	addl	$1, -100(%rbp)
	jmp	.L55
.L47:
	movl	$-1, -100(%rbp)
	jmp	.L42
.L55:
	addl	$1, -104(%rbp)
.L43:
	cmpl	$2, -104(%rbp)
	jle	.L49
.L42:
	cmpl	$3, -100(%rbp)
	jne	.L50
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L51
.L50:
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
.L51:
	movl	$0, %eax
.L9:
	movq	%rbx, %rsp
	movq	-56(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L53
	call	__stack_chk_fail@PLT
.L53:
	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
	.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	"%ld"
.LC2:
	.string	"Yes"
.LC3:
	.string	"No"
	.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	$88, %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	$0, -112(%rbp)
	leaq	-120(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-120(%rbp), %eax
	movslq	%eax, %rdx
	subq	$1, %rdx
	movq	%rdx, -96(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, %r14
	movl	$0, %r15d
	movslq	%eax, %rdx
	movq	%rdx, %r12
	movl	$0, %r13d
	cltq
	leaq	0(,%rax,8), %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	$7, %rax
	shrq	$3, %rax
	salq	$3, %rax
	movq	%rax, -88(%rbp)
	movl	$0, -116(%rbp)
	jmp	.L5
.L7:
	movl	-116(%rbp), %eax
	cltq
	leaq	0(,%rax,8), %rdx
	movq	-88(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	-88(%rbp), %rax
	movl	-116(%rbp), %edx
	movslq	%edx, %rdx
	movq	(%rax,%rdx,8), %rax
	testq	%rax, %rax
	jne	.L6
	addl	$1, -112(%rbp)
.L6:
	addl	$1, -116(%rbp)
.L5:
	movl	-120(%rbp), %eax
	cmpl	%eax, -116(%rbp)
	jl	.L7
	movl	-120(%rbp), %eax
	cmpl	%eax, -112(%rbp)
	jne	.L8
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
	jmp	.L9
.L8:
	movl	-120(%rbp), %edx
	movslq	%edx, %rax
	imulq	$1431655766, %rax, %rax
	shrq	$32, %rax
	movl	%edx, %ecx
	sarl	$31, %ecx
	subl	%ecx, %eax
	movl	%eax, %ecx
	addl	%ecx, %ecx
	addl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	testl	%eax, %eax
	je	.L10
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
	jmp	.L9
.L10:
	movq	$-1, -80(%rbp)
	movq	$-1, -72(%rbp)
	movq	$-1, -64(%rbp)
	movq	-88(%rbp), %rax
	movq	(%rax), %rax
	movq	%rax, -80(%rbp)
	cmpl	$0, -112(%rbp)
	je	.L11
	movl	$0, -116(%rbp)
	jmp	.L12
.L15:
	movq	-88(%rbp), %rax
	movl	-116(%rbp), %edx
	movslq	%edx, %rdx
	movq	(%rax,%rdx,8), %rax
	testq	%rax, %rax
	je	.L13
	movq	-88(%rbp), %rax
	movl	-116(%rbp), %edx
	movslq	%edx, %rdx
	movq	(%rax,%rdx,8), %rax
	movq	%rax, -80(%rbp)
	jmp	.L14
.L13:
	addl	$1, -116(%rbp)
.L12:
	movl	-120(%rbp), %eax
	cmpl	%eax, -116(%rbp)
	jl	.L15
.L14:
	movq	$0, -72(%rbp)
.L11:
	movq	-72(%rbp), %rax
	cmpq	$-1, %rax
	jne	.L16
	movl	$0, -116(%rbp)
	jmp	.L17
.L19:
	movq	-80(%rbp), %rcx
	movq	-88(%rbp), %rax
	movl	-116(%rbp), %edx
	movslq	%edx, %rdx
	movq	(%rax,%rdx,8), %rax
	cmpq	%rax, %rcx
	je	.L18
	movq	-88(%rbp), %rax
	movl	-116(%rbp), %edx
	movslq	%edx, %rdx
	movq	(%rax,%rdx,8), %rax
	movq	%rax, -72(%rbp)
	jmp	.L16
.L18:
	addl	$1, -116(%rbp)
.L17:
	movl	-120(%rbp), %eax
	cmpl	%eax, -116(%rbp)
	jl	.L19
.L16:
	movl	$1, -116(%rbp)
	jmp	.L20
.L24:
	movq	-80(%rbp), %rcx
	movq	-88(%rbp), %rax
	movl	-116(%rbp), %edx
	movslq	%edx, %rdx
	movq	(%rax,%rdx,8), %rax
	cmpq	%rax, %rcx
	je	.L21
	movq	-72(%rbp), %rcx
	movq	-88(%rbp), %rax
	movl	-116(%rbp), %edx
	movslq	%edx, %rdx
	movq	(%rax,%rdx,8), %rax
	cmpq	%rax, %rcx
	je	.L21
	movq	-80(%rbp), %rdx
	movq	-72(%rbp), %rax
	movq	%rdx, %rcx
	xorq	%rax, %rcx
	movq	-88(%rbp), %rax
	movl	-116(%rbp), %edx
	movslq	%edx, %rdx
	movq	(%rax,%rdx,8), %rax
	cmpq	%rax, %rcx
	jne	.L21
	movq	-88(%rbp), %rax
	movl	-116(%rbp), %edx
	movslq	%edx, %rdx
	movq	(%rax,%rdx,8), %rax
	movq	%rax, -64(%rbp)
	movl	-120(%rbp), %eax
	cmpl	$3, %eax
	jne	.L56
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
	jmp	.L9
.L21:
	addl	$1, -116(%rbp)
.L20:
	movl	-120(%rbp), %eax
	cmpl	%eax, -116(%rbp)
	jl	.L24
	jmp	.L23
.L56:
	nop
.L23:
	movq	-72(%rbp), %rax
	cmpq	$-1, %rax
	je	.L25
	movq	-64(%rbp), %rax
	cmpq	$-1, %rax
	jne	.L26
.L25:
	cmpl	$0, -112(%rbp)
	jne	.L26
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
	jmp	.L9
.L26:
	movl	$0, -100(%rbp)
	cmpl	$0, -112(%rbp)
	je	.L27
	movq	-64(%rbp), %rax
	cmpq	$-1, %rax
	jne	.L28
	movq	-80(%rbp), %rax
	movq	%rax, -64(%rbp)
	movl	$0, -104(%rbp)
	movl	$0, -108(%rbp)
	movl	$0, -116(%rbp)
	jmp	.L29
.L31:
	movl	-104(%rbp), %eax
	cltq
	movq	-80(%rbp,%rax,8), %rcx
	movq	-88(%rbp), %rax
	movl	-116(%rbp), %edx
	movslq	%edx, %rdx
	movq	(%rax,%rdx,8), %rax
	cmpq	%rax, %rcx
	jne	.L30
	addl	$1, -108(%rbp)
.L30:
	addl	$1, -116(%rbp)
.L29:
	movl	-120(%rbp), %eax
	cmpl	%eax, -116(%rbp)
	jl	.L31
	movl	-120(%rbp), %eax
	movslq	%eax, %rdx
	imulq	$1431655766, %rdx, %rdx
	shrq	$32, %rdx
	sarl	$31, %eax
	movl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	addl	%eax, %eax
	cmpl	%eax, -108(%rbp)
	jne	.L32
	movq	-80(%rbp), %rax
	testq	%rax, %rax
	jne	.L33
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
	jmp	.L9
.L33:
	movl	$3, -100(%rbp)
	jmp	.L42
.L32:
	movl	$-1, -100(%rbp)
	jmp	.L42
.L28:
	movl	$0, -104(%rbp)
	jmp	.L35
.L41:
	movl	$0, -108(%rbp)
	movl	$0, -116(%rbp)
	jmp	.L36
.L38:
	movl	-104(%rbp), %eax
	cltq
	movq	-80(%rbp,%rax,8), %rcx
	movq	-88(%rbp), %rax
	movl	-116(%rbp), %edx
	movslq	%edx, %rdx
	movq	(%rax,%rdx,8), %rax
	cmpq	%rax, %rcx
	jne	.L37
	addl	$1, -108(%rbp)
.L37:
	addl	$1, -116(%rbp)
.L36:
	movl	-120(%rbp), %eax
	cmpl	%eax, -116(%rbp)
	jl	.L38
	movl	-120(%rbp), %eax
	movslq	%eax, %rdx
	imulq	$1431655766, %rdx, %rdx
	shrq	$32, %rdx
	sarl	$31, %eax
	movl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	cmpl	%eax, -108(%rbp)
	jne	.L39
	addl	$1, -100(%rbp)
	jmp	.L54
.L39:
	movl	$-1, -100(%rbp)
	jmp	.L42
.L54:
	addl	$1, -104(%rbp)
.L35:
	cmpl	$2, -104(%rbp)
	jle	.L41
	jmp	.L42
.L27:
	movl	$0, -104(%rbp)
	jmp	.L43
.L49:
	movl	$0, -108(%rbp)
	movl	$0, -116(%rbp)
	jmp	.L44
.L46:
	movl	-104(%rbp), %eax
	cltq
	movq	-80(%rbp,%rax,8), %rcx
	movq	-88(%rbp), %rax
	movl	-116(%rbp), %edx
	movslq	%edx, %rdx
	movq	(%rax,%rdx,8), %rax
	cmpq	%rax, %rcx
	jne	.L45
	addl	$1, -108(%rbp)
.L45:
	addl	$1, -116(%rbp)
.L44:
	movl	-120(%rbp), %eax
	cmpl	%eax, -116(%rbp)
	jl	.L46
	movl	-120(%rbp), %eax
	movslq	%eax, %rdx
	imulq	$1431655766, %rdx, %rdx
	shrq	$32, %rdx
	sarl	$31, %eax
	movl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	cmpl	%eax, -108(%rbp)
	jne	.L47
	addl	$1, -100(%rbp)
	jmp	.L55
.L47:
	movl	$-1, -100(%rbp)
	jmp	.L42
.L55:
	addl	$1, -104(%rbp)
.L43:
	cmpl	$2, -104(%rbp)
	jle	.L49
.L42:
	cmpl	$3, -100(%rbp)
	jne	.L50
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L51
.L50:
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
.L51:
	movl	$0, %eax
.L9:
	movq	%rbx, %rsp
	movq	-56(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L53
	call	__stack_chk_fail@PLT
.L53:
	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
	.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:
