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 matrix[3][3];
    char x;
    for(int i=0;i<3;i++){
        for(int j=0;j<3;j++){
            scanf("%d", &matrix[i][j]);
        }
    }
    int n;
    scanf("%d",&n);
    int input[n];
    for(int k=0;k<n;k++){
        scanf("%d", &input[k]);
        for(int i=0;i<3;i++){
            for(int j=0;j<3;j++){
                if(input[k] == matrix[i][j]){
                    matrix[i][j] = x;
                }
            }
        }
    }
    int ctr[8] = {0};
    int last=2;
    for(int i=0;i<3;i++){
        if(matrix[i][0]==x){
            ++ctr[0];
        }
        if(matrix[i][2]==x){
            ++ctr[1];
        }
        if(matrix[0][i]==x){
            ++ctr[2];
        }
        if(matrix[2][i]==x){
            ++ctr[3];
        }
        if(matrix[i][i]==x){
            ++ctr[4];
        } 
        if(matrix[i][last--]==x){
            ++ctr[5];
        }
        if(matrix[1][i]==x){
            ++ctr[6];
        }
        if(matrix[i][1]==x){
            ++ctr[7];
        }
    }
    int flag = 0;
    for(int i=0;i<8;i++){
        if(ctr[i]==3){
            flag = 1;
        }
    }
    printf("%s\n", (flag == 1) ? "Yes" : "No");

    return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"Yes"
.LC2:
	.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	$152, %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, -180(%rbp)
	jmp	.L2
.L5:
	movl	$0, -176(%rbp)
	jmp	.L3
.L4:
	leaq	-96(%rbp), %rcx
	movl	-176(%rbp), %eax
	movslq	%eax, %rsi
	movl	-180(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	addq	%rsi, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -176(%rbp)
.L3:
	cmpl	$2, -176(%rbp)
	jle	.L4
	addl	$1, -180(%rbp)
.L2:
	cmpl	$2, -180(%rbp)
	jle	.L5
	leaq	-184(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-184(%rbp), %eax
	movslq	%eax, %rdx
	subq	$1, %rdx
	movq	%rdx, -144(%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, %edi
	movl	$0, %edx
	divq	%rdi
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L6:
	cmpq	%rdx, %rsp
	je	.L7
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L6
.L7:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L8
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L8:
	movq	%rsp, %rax
	addq	$3, %rax
	shrq	$2, %rax
	salq	$2, %rax
	movq	%rax, -136(%rbp)
	movl	$0, -172(%rbp)
	jmp	.L9
.L15:
	movl	-172(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-136(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -168(%rbp)
	jmp	.L10
.L14:
	movl	$0, -164(%rbp)
	jmp	.L11
.L13:
	movq	-136(%rbp), %rax
	movl	-172(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %ecx
	movl	-164(%rbp), %eax
	movslq	%eax, %rsi
	movl	-168(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	addq	%rsi, %rax
	movl	-96(%rbp,%rax,4), %eax
	cmpl	%eax, %ecx
	jne	.L12
	movsbl	-185(%rbp), %edx
	movl	-164(%rbp), %eax
	movslq	%eax, %rsi
	movl	-168(%rbp), %eax
	movslq	%eax, %rcx
	movq	%rcx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	addq	%rsi, %rax
	movl	%edx, -96(%rbp,%rax,4)
.L12:
	addl	$1, -164(%rbp)
.L11:
	cmpl	$2, -164(%rbp)
	jle	.L13
	addl	$1, -168(%rbp)
.L10:
	cmpl	$2, -168(%rbp)
	jle	.L14
	addl	$1, -172(%rbp)
.L9:
	movl	-184(%rbp), %eax
	cmpl	%eax, -172(%rbp)
	jl	.L15
	movq	$0, -128(%rbp)
	movq	$0, -120(%rbp)
	movq	$0, -112(%rbp)
	movq	$0, -104(%rbp)
	movl	$2, -160(%rbp)
	movl	$0, -156(%rbp)
	jmp	.L16
.L25:
	movl	-156(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	leaq	-48(%rax), %rax
	addq	%rbp, %rax
	subq	$48, %rax
	movl	(%rax), %edx
	movsbl	-185(%rbp), %eax
	cmpl	%eax, %edx
	jne	.L17
	movl	-128(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -128(%rbp)
.L17:
	movl	-156(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	leaq	-48(%rax), %rax
	addq	%rbp, %rax
	subq	$40, %rax
	movl	(%rax), %edx
	movsbl	-185(%rbp), %eax
	cmpl	%eax, %edx
	jne	.L18
	movl	-124(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -124(%rbp)
.L18:
	movl	-156(%rbp), %eax
	cltq
	movl	-96(%rbp,%rax,4), %edx
	movsbl	-185(%rbp), %eax
	cmpl	%eax, %edx
	jne	.L19
	movl	-120(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -120(%rbp)
.L19:
	movl	-156(%rbp), %eax
	cltq
	addq	$6, %rax
	movl	-96(%rbp,%rax,4), %edx
	movsbl	-185(%rbp), %eax
	cmpl	%eax, %edx
	jne	.L20
	movl	-116(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -116(%rbp)
.L20:
	movl	-156(%rbp), %eax
	cltq
	salq	$4, %rax
	leaq	-48(%rax), %rax
	addq	%rbp, %rax
	subq	$48, %rax
	movl	(%rax), %edx
	movsbl	-185(%rbp), %eax
	cmpl	%eax, %edx
	jne	.L21
	movl	-112(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -112(%rbp)
.L21:
	movl	-160(%rbp), %eax
	leal	-1(%rax), %edx
	movl	%edx, -160(%rbp)
	movslq	%eax, %rcx
	movl	-156(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	movl	-96(%rbp,%rax,4), %edx
	movsbl	-185(%rbp), %eax
	cmpl	%eax, %edx
	jne	.L22
	movl	-108(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -108(%rbp)
.L22:
	movl	-156(%rbp), %eax
	cltq
	addq	$3, %rax
	movl	-96(%rbp,%rax,4), %edx
	movsbl	-185(%rbp), %eax
	cmpl	%eax, %edx
	jne	.L23
	movl	-104(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -104(%rbp)
.L23:
	movl	-156(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	leaq	-48(%rax), %rax
	addq	%rbp, %rax
	subq	$44, %rax
	movl	(%rax), %edx
	movsbl	-185(%rbp), %eax
	cmpl	%eax, %edx
	jne	.L24
	movl	-100(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -100(%rbp)
.L24:
	addl	$1, -156(%rbp)
.L16:
	cmpl	$2, -156(%rbp)
	jle	.L25
	movl	$0, -152(%rbp)
	movl	$0, -148(%rbp)
	jmp	.L26
.L28:
	movl	-148(%rbp), %eax
	cltq
	movl	-128(%rbp,%rax,4), %eax
	cmpl	$3, %eax
	jne	.L27
	movl	$1, -152(%rbp)
.L27:
	addl	$1, -148(%rbp)
.L26:
	cmpl	$7, -148(%rbp)
	jle	.L28
	cmpl	$1, -152(%rbp)
	jne	.L29
	leaq	.LC1(%rip), %rax
	jmp	.L30
.L29:
	leaq	.LC2(%rip), %rax
.L30:
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
	movq	%rbx, %rsp
	movq	-56(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L32
	call	__stack_chk_fail@PLT
.L32:
	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	"Yes"
.LC1:
	.string	"No"
.LC2:
	.string	"%d"
	.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
	pushq	%r14
	pushq	%r13
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	leaq	.LC2(%rip), %r13
	pushq	%r12
	.cfi_offset 12, -48
	leaq	-60(%rbp), %r12
	pushq	%rbx
	.cfi_offset 3, -56
	leaq	-96(%rbp), %rbx
	subq	$136, %rsp
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
.L2:
	movq	%rbx, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	leaq	4(%rbx), %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	leaq	8(%rbx), %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	addq	$12, %rbx
	cmpq	%r12, %rbx
	jne	.L2
	leaq	-132(%rbp), %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	-132(%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	.L4
.L89:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%rsi, %rsp
	jne	.L89
.L4:
	andl	$4095, %ecx
	subq	%rcx, %rsp
	testq	%rcx, %rcx
	jne	.L90
.L5:
	movq	%rsp, %r12
	xorl	%r14d, %r14d
	xorl	%ebx, %ebx
	testl	%edx, %edx
	jle	.L91
	.p2align 4,,10
	.p2align 3
.L29:
	movq	%r12, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	(%r12), %eax
	cmpl	-96(%rbp), %eax
	jne	.L18
	movl	%ebx, -96(%rbp)
.L18:
	cmpl	-92(%rbp), %eax
	jne	.L19
	movl	%ebx, -92(%rbp)
.L19:
	cmpl	-88(%rbp), %eax
	jne	.L20
	movl	%ebx, -88(%rbp)
.L20:
	cmpl	-84(%rbp), %eax
	jne	.L21
	movl	%ebx, -84(%rbp)
.L21:
	cmpl	-80(%rbp), %eax
	jne	.L22
	movl	%ebx, -80(%rbp)
.L22:
	cmpl	-76(%rbp), %eax
	jne	.L23
	movl	%ebx, -76(%rbp)
.L23:
	cmpl	-72(%rbp), %eax
	jne	.L24
	movl	%ebx, -72(%rbp)
.L24:
	cmpl	-68(%rbp), %eax
	jne	.L25
	movl	%ebx, -68(%rbp)
.L25:
	cmpl	-64(%rbp), %eax
	je	.L92
	addl	$1, %r14d
	addq	$4, %r12
	cmpl	%r14d, -132(%rbp)
	jg	.L29
.L28:
	movl	-88(%rbp), %esi
	cmpl	%ebx, -96(%rbp)
	pxor	%xmm0, %xmm0
	movl	-72(%rbp), %edx
	sete	%r9b
	movaps	%xmm0, -128(%rbp)
	cmpl	%ebx, %esi
	movb	%r9b, -145(%rbp)
	movzbl	%r9b, %eax
	sete	%r15b
	cmpl	%ebx, %edx
	movaps	%xmm0, -112(%rbp)
	sete	%r12b
	movl	%r15d, %r14d
	movzbl	%r15b, %ecx
	sete	-146(%rbp)
	movzbl	%r12b, %r12d
	cmpl	-84(%rbp), %ebx
	je	.L93
	movl	-92(%rbp), %edi
	movb	%r9b, -161(%rbp)
	xorl	%r10d, %r10d
	xorl	%r11d, %r11d
	movl	%eax, -160(%rbp)
	cmpl	%ebx, %edi
	sete	%r10b
	sete	-147(%rbp)
	xorl	%r13d, %r13d
.L48:
	movl	-76(%rbp), %r8d
	movl	%ecx, -152(%rbp)
	cmpl	%r8d, %ebx
	jne	.L12
	leal	1(%rcx), %r15d
	movl	%r15d, -152(%rbp)
	movl	$1, %r15d
.L12:
	movb	%r9b, -148(%rbp)
	movl	%eax, -156(%rbp)
	cmpl	%edi, %ebx
	jne	.L13
	leal	1(%rax), %edi
	movb	$1, -148(%rbp)
	movl	%edi, -156(%rbp)
.L13:
	movl	-68(%rbp), %edi
	cmpl	%edi, %ebx
	jne	.L14
	movb	$1, -146(%rbp)
	addl	$1, %r12d
.L14:
	cmpl	-80(%rbp), %ebx
	jne	.L15
	addl	$1, %eax
	addl	$1, %ecx
	addl	$1, %r11d
	addl	$1, %r10d
	movb	$1, -145(%rbp)
	movl	$1, %r14d
	movl	$1, %r13d
	movb	$1, -147(%rbp)
.L15:
	cmpl	%ebx, %edx
	jne	.L17
	addl	$1, -160(%rbp)
	movb	$1, -161(%rbp)
.L17:
	movl	-64(%rbp), %r9d
	cmpl	%r9d, %ebx
	jne	.L30
	addl	$1, -152(%rbp)
	movl	$1, %r15d
.L30:
	cmpl	%ebx, %esi
	jne	.L31
	addl	$1, -156(%rbp)
	movb	$1, -148(%rbp)
.L31:
	cmpl	%r9d, %ebx
	jne	.L32
	movb	$1, -146(%rbp)
	addl	$1, %r12d
	addl	$1, %eax
	movb	$1, -145(%rbp)
.L32:
	cmpl	%ebx, %edx
	jne	.L33
	addl	$1, %ecx
	movl	$1, %r14d
.L33:
	cmpl	%r8d, %ebx
	jne	.L34
	addl	$1, %r11d
	movl	$1, %r13d
.L34:
	cmpl	%edi, %ebx
	je	.L94
	cmpb	$0, -147(%rbp)
	jne	.L36
.L37:
	testb	%r13b, %r13b
	je	.L38
	movl	%r11d, -104(%rbp)
.L38:
	testb	%r14b, %r14b
	je	.L39
	movl	%ecx, -108(%rbp)
.L39:
	cmpb	$0, -145(%rbp)
	je	.L40
	movl	%eax, -112(%rbp)
.L40:
	cmpb	$0, -146(%rbp)
	je	.L41
	movl	%r12d, -116(%rbp)
.L41:
	cmpb	$0, -148(%rbp)
	je	.L42
	movl	-156(%rbp), %eax
	movl	%eax, -120(%rbp)
.L42:
	testb	%r15b, %r15b
	je	.L43
	movl	-152(%rbp), %eax
	movl	%eax, -124(%rbp)
.L43:
	cmpb	$0, -161(%rbp)
	je	.L44
	movl	-160(%rbp), %eax
	movl	%eax, -128(%rbp)
.L44:
	movdqa	.LC3(%rip), %xmm0
	movdqa	.LC4(%rip), %xmm1
	leaq	.LC0(%rip), %rdi
	movdqa	%xmm0, %xmm2
	pcmpeqd	-112(%rbp), %xmm0
	pcmpeqd	-128(%rbp), %xmm2
	pand	%xmm1, %xmm2
	pand	%xmm0, %xmm1
	pandn	%xmm2, %xmm0
	por	%xmm1, %xmm0
	movdqa	%xmm0, %xmm2
	psrldq	$8, %xmm2
	movdqa	%xmm2, %xmm1
	pcmpgtd	%xmm0, %xmm1
	pand	%xmm1, %xmm2
	pandn	%xmm0, %xmm1
	por	%xmm2, %xmm1
	movdqa	%xmm1, %xmm2
	psrldq	$4, %xmm2
	movdqa	%xmm2, %xmm0
	pcmpgtd	%xmm1, %xmm0
	pand	%xmm0, %xmm2
	pandn	%xmm1, %xmm0
	por	%xmm2, %xmm0
	movd	%xmm0, %eax
	cmpl	$1, %eax
	leaq	.LC1(%rip), %rax
	cmovne	%rax, %rdi
	call	puts@PLT
	movq	-56(%rbp), %rax
	subq	%fs:40, %rax
	jne	.L95
	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
.L92:
	.cfi_restore_state
	movl	%ebx, -64(%rbp)
	addl	$1, %r14d
	addq	$4, %r12
	cmpl	-132(%rbp), %r14d
	jl	.L29
	jmp	.L28
.L94:
	addl	$1, %r10d
.L36:
	movl	%r10d, -100(%rbp)
	jmp	.L37
.L93:
	movl	-92(%rbp), %edi
	xorl	%r10d, %r10d
	leal	1(%rax), %r11d
	movl	$1, %r13d
	movl	%r11d, -160(%rbp)
	movl	$1, %r11d
	cmpl	%edi, %ebx
	movb	$1, -161(%rbp)
	sete	%r10b
	sete	-147(%rbp)
	jmp	.L48
.L90:
	orq	$0, -8(%rsp,%rcx)
	jmp	.L5
.L91:
	xorl	%ebx, %ebx
	jmp	.L28
.L95:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC3:
	.long	3
	.long	3
	.long	3
	.long	3
	.align 16
.LC4:
	.long	1
	.long	1
	.long	1
	.long	1
	.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	"Yes"
.LC1:
	.string	"No"
.LC2:
	.string	"%d"
	.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
	pushq	%r14
	pushq	%r13
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	leaq	.LC2(%rip), %r13
	pushq	%r12
	.cfi_offset 12, -48
	leaq	-60(%rbp), %r12
	pushq	%rbx
	.cfi_offset 3, -56
	leaq	-96(%rbp), %rbx
	subq	$136, %rsp
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
.L2:
	movq	%rbx, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	leaq	4(%rbx), %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	leaq	8(%rbx), %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	addq	$12, %rbx
	cmpq	%r12, %rbx
	jne	.L2
	leaq	-132(%rbp), %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	-132(%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	.L4
.L89:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%rsi, %rsp
	jne	.L89
.L4:
	andl	$4095, %ecx
	subq	%rcx, %rsp
	testq	%rcx, %rcx
	jne	.L90
.L5:
	movq	%rsp, %r12
	xorl	%r14d, %r14d
	xorl	%ebx, %ebx
	testl	%edx, %edx
	jle	.L91
	.p2align 4,,10
	.p2align 3
.L29:
	movq	%r12, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	(%r12), %eax
	cmpl	-96(%rbp), %eax
	jne	.L18
	movl	%ebx, -96(%rbp)
.L18:
	cmpl	-92(%rbp), %eax
	jne	.L19
	movl	%ebx, -92(%rbp)
.L19:
	cmpl	-88(%rbp), %eax
	jne	.L20
	movl	%ebx, -88(%rbp)
.L20:
	cmpl	-84(%rbp), %eax
	jne	.L21
	movl	%ebx, -84(%rbp)
.L21:
	cmpl	-80(%rbp), %eax
	jne	.L22
	movl	%ebx, -80(%rbp)
.L22:
	cmpl	-76(%rbp), %eax
	jne	.L23
	movl	%ebx, -76(%rbp)
.L23:
	cmpl	-72(%rbp), %eax
	jne	.L24
	movl	%ebx, -72(%rbp)
.L24:
	cmpl	-68(%rbp), %eax
	jne	.L25
	movl	%ebx, -68(%rbp)
.L25:
	cmpl	-64(%rbp), %eax
	je	.L92
	addl	$1, %r14d
	addq	$4, %r12
	cmpl	%r14d, -132(%rbp)
	jg	.L29
.L28:
	movl	-88(%rbp), %esi
	cmpl	%ebx, -96(%rbp)
	pxor	%xmm0, %xmm0
	movl	-72(%rbp), %edx
	sete	%r9b
	movaps	%xmm0, -128(%rbp)
	cmpl	%ebx, %esi
	movb	%r9b, -145(%rbp)
	movzbl	%r9b, %eax
	sete	%r15b
	cmpl	%ebx, %edx
	movaps	%xmm0, -112(%rbp)
	sete	%r12b
	movl	%r15d, %r14d
	movzbl	%r15b, %ecx
	sete	-146(%rbp)
	movzbl	%r12b, %r12d
	cmpl	-84(%rbp), %ebx
	je	.L93
	movl	-92(%rbp), %edi
	movb	%r9b, -161(%rbp)
	xorl	%r10d, %r10d
	xorl	%r11d, %r11d
	movl	%eax, -160(%rbp)
	cmpl	%ebx, %edi
	sete	%r10b
	sete	-147(%rbp)
	xorl	%r13d, %r13d
.L48:
	movl	-76(%rbp), %r8d
	movl	%ecx, -152(%rbp)
	cmpl	%r8d, %ebx
	jne	.L12
	leal	1(%rcx), %r15d
	movl	%r15d, -152(%rbp)
	movl	$1, %r15d
.L12:
	movb	%r9b, -148(%rbp)
	movl	%eax, -156(%rbp)
	cmpl	%edi, %ebx
	jne	.L13
	leal	1(%rax), %edi
	movb	$1, -148(%rbp)
	movl	%edi, -156(%rbp)
.L13:
	movl	-68(%rbp), %edi
	cmpl	%edi, %ebx
	jne	.L14
	movb	$1, -146(%rbp)
	addl	$1, %r12d
.L14:
	cmpl	-80(%rbp), %ebx
	jne	.L15
	addl	$1, %eax
	addl	$1, %ecx
	addl	$1, %r11d
	addl	$1, %r10d
	movb	$1, -145(%rbp)
	movl	$1, %r14d
	movl	$1, %r13d
	movb	$1, -147(%rbp)
.L15:
	cmpl	%ebx, %edx
	jne	.L17
	addl	$1, -160(%rbp)
	movb	$1, -161(%rbp)
.L17:
	movl	-64(%rbp), %r9d
	cmpl	%r9d, %ebx
	jne	.L30
	addl	$1, -152(%rbp)
	movl	$1, %r15d
.L30:
	cmpl	%ebx, %esi
	jne	.L31
	addl	$1, -156(%rbp)
	movb	$1, -148(%rbp)
.L31:
	cmpl	%r9d, %ebx
	jne	.L32
	movb	$1, -146(%rbp)
	addl	$1, %r12d
	addl	$1, %eax
	movb	$1, -145(%rbp)
.L32:
	cmpl	%ebx, %edx
	jne	.L33
	addl	$1, %ecx
	movl	$1, %r14d
.L33:
	cmpl	%r8d, %ebx
	jne	.L34
	addl	$1, %r11d
	movl	$1, %r13d
.L34:
	cmpl	%edi, %ebx
	je	.L94
	cmpb	$0, -147(%rbp)
	jne	.L36
.L37:
	testb	%r13b, %r13b
	je	.L38
	movl	%r11d, -104(%rbp)
.L38:
	testb	%r14b, %r14b
	je	.L39
	movl	%ecx, -108(%rbp)
.L39:
	cmpb	$0, -145(%rbp)
	je	.L40
	movl	%eax, -112(%rbp)
.L40:
	cmpb	$0, -146(%rbp)
	je	.L41
	movl	%r12d, -116(%rbp)
.L41:
	cmpb	$0, -148(%rbp)
	je	.L42
	movl	-156(%rbp), %eax
	movl	%eax, -120(%rbp)
.L42:
	testb	%r15b, %r15b
	je	.L43
	movl	-152(%rbp), %eax
	movl	%eax, -124(%rbp)
.L43:
	cmpb	$0, -161(%rbp)
	je	.L44
	movl	-160(%rbp), %eax
	movl	%eax, -128(%rbp)
.L44:
	movdqa	.LC3(%rip), %xmm0
	movdqa	.LC4(%rip), %xmm1
	leaq	.LC0(%rip), %rdi
	movdqa	%xmm0, %xmm2
	pcmpeqd	-112(%rbp), %xmm0
	pcmpeqd	-128(%rbp), %xmm2
	pand	%xmm1, %xmm2
	pand	%xmm0, %xmm1
	pandn	%xmm2, %xmm0
	por	%xmm1, %xmm0
	movdqa	%xmm0, %xmm2
	psrldq	$8, %xmm2
	movdqa	%xmm2, %xmm1
	pcmpgtd	%xmm0, %xmm1
	pand	%xmm1, %xmm2
	pandn	%xmm0, %xmm1
	por	%xmm2, %xmm1
	movdqa	%xmm1, %xmm2
	psrldq	$4, %xmm2
	movdqa	%xmm2, %xmm0
	pcmpgtd	%xmm1, %xmm0
	pand	%xmm0, %xmm2
	pandn	%xmm1, %xmm0
	por	%xmm2, %xmm0
	movd	%xmm0, %eax
	cmpl	$1, %eax
	leaq	.LC1(%rip), %rax
	cmovne	%rax, %rdi
	call	puts@PLT
	movq	-56(%rbp), %rax
	subq	%fs:40, %rax
	jne	.L95
	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
.L92:
	.cfi_restore_state
	movl	%ebx, -64(%rbp)
	addl	$1, %r14d
	addq	$4, %r12
	cmpl	-132(%rbp), %r14d
	jl	.L29
	jmp	.L28
.L94:
	addl	$1, %r10d
.L36:
	movl	%r10d, -100(%rbp)
	jmp	.L37
.L93:
	movl	-92(%rbp), %edi
	xorl	%r10d, %r10d
	leal	1(%rax), %r11d
	movl	$1, %r13d
	movl	%r11d, -160(%rbp)
	movl	$1, %r11d
	cmpl	%edi, %ebx
	movb	$1, -161(%rbp)
	sete	%r10b
	sete	-147(%rbp)
	jmp	.L48
.L90:
	orq	$0, -8(%rsp,%rcx)
	jmp	.L5
.L91:
	xorl	%ebx, %ebx
	jmp	.L28
.L95:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC3:
	.long	3
	.long	3
	.long	3
	.long	3
	.align 16
.LC4:
	.long	1
	.long	1
	.long	1
	.long	1
	.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 matrix[3][3];
    char x;
    for(int i=0;i<3;i++){
        for(int j=0;j<3;j++){
            scanf("%d", &matrix[i][j]);
        }
    }
    int n;
    scanf("%d",&n);
    int input[n];
    for(int k=0;k<n;k++){
        scanf("%d", &input[k]);
        for(int i=0;i<3;i++){
            for(int j=0;j<3;j++){
                if(input[k] == matrix[i][j]){
                    matrix[i][j] = x;
                }
            }
        }
    }
    int ctr[8] = {0};
    int last=2;
    for(int i=0;i<3;i++){
        if(matrix[i][0]==x){
            ++ctr[0];
        }
        if(matrix[i][2]==x){
            ++ctr[1];
        }
        if(matrix[0][i]==x){
            ++ctr[2];
        }
        if(matrix[2][i]==x){
            ++ctr[3];
        }
        if(matrix[i][i]==x){
            ++ctr[4];
        } 
        if(matrix[i][last--]==x){
            ++ctr[5];
        }
        if(matrix[1][i]==x){
            ++ctr[6];
        }
        if(matrix[i][1]==x){
            ++ctr[7];
        }
    }
    int flag = 0;
    for(int i=0;i<8;i++){
        if(ctr[i]==3){
            flag = 1;
        }
    }
    printf("%s\n", (flag == 1) ? "Yes" : "No");

    return 0;
}
60 88 34
92 41 43
39 73 48
10
60
43
88
11
48
73
65
41
92
34
 41 7 46
26 89 2
78 92 8
5
12
45
16
57
17
 84 97 66
79 89 11
61 59 7
7
89
7
146
79
24
84
30
 60 106 34
92 41 43
39 73 48
10
60
43
88
11
48
73
65
41
92
34
 84 97 66
79 89 11
61 59 7
7
95
7
146
79
24
84
30
 41 6 46
26 89 2
78 92 8
5
12
45
16
57
17
 60 68 34
92 41 43
39 73 48
10
60
43
88
11
48
73
65
41
92
34
 84 97 66
79 89 6
61 59 7
7
95
7
146
79
24
84
30
 41 6 46
1 89 2
78 92 8
5
12
45
16
57
17
 60 68 34
92 41 43
39 73 48
10
60
43
88
10
48
73
65
41
92
34

Yes
 No
 Yes
 Yes
 No
 No
 Yes
 No
 No
 Yes

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 matrix[3][3];
    char x;
    for(int i=0;i<3;i++){
        for(int j=0;j<3;j++){
            scanf("%d", &matrix[i][j]);
        }
    }
    int n;
    scanf("%d",&n);
    int input[n];
    for(int k=0;k<n;k++){
        scanf("%d", &input[k]);
        for(int i=0;i<3;i++){
            for(int j=0;j<3;j++){
                if(input[k] == matrix[i][j]){
                    matrix[i][j] = x;
                }
            }
        }
    }
    int ctr[8] = {0};
    int last=2;
    for(int i=0;i<3;i++){
        if(matrix[i][0]==x){
            ++ctr[0];
        }
        if(matrix[i][2]==x){
            ++ctr[1];
        }
        if(matrix[0][i]==x){
            ++ctr[2];
        }
        if(matrix[2][i]==x){
            ++ctr[3];
        }
        if(matrix[i][i]==x){
            ++ctr[4];
        } 
        if(matrix[i][last--]==x){
            ++ctr[5];
        }
        if(matrix[1][i]==x){
            ++ctr[6];
        }
        if(matrix[i][1]==x){
            ++ctr[7];
        }
    }
    int flag = 0;
    for(int i=0;i<8;i++){
        if(ctr[i]==3){
            flag = 1;
        }
    }
    printf("%s\n", (flag == 1) ? "Yes" : "No");

    return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"Yes"
.LC2:
	.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	$152, %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, -180(%rbp)
	jmp	.L2
.L5:
	movl	$0, -176(%rbp)
	jmp	.L3
.L4:
	leaq	-96(%rbp), %rcx
	movl	-176(%rbp), %eax
	movslq	%eax, %rsi
	movl	-180(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	addq	%rsi, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -176(%rbp)
.L3:
	cmpl	$2, -176(%rbp)
	jle	.L4
	addl	$1, -180(%rbp)
.L2:
	cmpl	$2, -180(%rbp)
	jle	.L5
	leaq	-184(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-184(%rbp), %eax
	movslq	%eax, %rdx
	subq	$1, %rdx
	movq	%rdx, -144(%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, %edi
	movl	$0, %edx
	divq	%rdi
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L6:
	cmpq	%rdx, %rsp
	je	.L7
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L6
.L7:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L8
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L8:
	movq	%rsp, %rax
	addq	$3, %rax
	shrq	$2, %rax
	salq	$2, %rax
	movq	%rax, -136(%rbp)
	movl	$0, -172(%rbp)
	jmp	.L9
.L15:
	movl	-172(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-136(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -168(%rbp)
	jmp	.L10
.L14:
	movl	$0, -164(%rbp)
	jmp	.L11
.L13:
	movq	-136(%rbp), %rax
	movl	-172(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %ecx
	movl	-164(%rbp), %eax
	movslq	%eax, %rsi
	movl	-168(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	addq	%rsi, %rax
	movl	-96(%rbp,%rax,4), %eax
	cmpl	%eax, %ecx
	jne	.L12
	movsbl	-185(%rbp), %edx
	movl	-164(%rbp), %eax
	movslq	%eax, %rsi
	movl	-168(%rbp), %eax
	movslq	%eax, %rcx
	movq	%rcx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	addq	%rsi, %rax
	movl	%edx, -96(%rbp,%rax,4)
.L12:
	addl	$1, -164(%rbp)
.L11:
	cmpl	$2, -164(%rbp)
	jle	.L13
	addl	$1, -168(%rbp)
.L10:
	cmpl	$2, -168(%rbp)
	jle	.L14
	addl	$1, -172(%rbp)
.L9:
	movl	-184(%rbp), %eax
	cmpl	%eax, -172(%rbp)
	jl	.L15
	movq	$0, -128(%rbp)
	movq	$0, -120(%rbp)
	movq	$0, -112(%rbp)
	movq	$0, -104(%rbp)
	movl	$2, -160(%rbp)
	movl	$0, -156(%rbp)
	jmp	.L16
.L25:
	movl	-156(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	leaq	-48(%rax), %rax
	addq	%rbp, %rax
	subq	$48, %rax
	movl	(%rax), %edx
	movsbl	-185(%rbp), %eax
	cmpl	%eax, %edx
	jne	.L17
	movl	-128(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -128(%rbp)
.L17:
	movl	-156(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	leaq	-48(%rax), %rax
	addq	%rbp, %rax
	subq	$40, %rax
	movl	(%rax), %edx
	movsbl	-185(%rbp), %eax
	cmpl	%eax, %edx
	jne	.L18
	movl	-124(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -124(%rbp)
.L18:
	movl	-156(%rbp), %eax
	cltq
	movl	-96(%rbp,%rax,4), %edx
	movsbl	-185(%rbp), %eax
	cmpl	%eax, %edx
	jne	.L19
	movl	-120(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -120(%rbp)
.L19:
	movl	-156(%rbp), %eax
	cltq
	addq	$6, %rax
	movl	-96(%rbp,%rax,4), %edx
	movsbl	-185(%rbp), %eax
	cmpl	%eax, %edx
	jne	.L20
	movl	-116(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -116(%rbp)
.L20:
	movl	-156(%rbp), %eax
	cltq
	salq	$4, %rax
	leaq	-48(%rax), %rax
	addq	%rbp, %rax
	subq	$48, %rax
	movl	(%rax), %edx
	movsbl	-185(%rbp), %eax
	cmpl	%eax, %edx
	jne	.L21
	movl	-112(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -112(%rbp)
.L21:
	movl	-160(%rbp), %eax
	leal	-1(%rax), %edx
	movl	%edx, -160(%rbp)
	movslq	%eax, %rcx
	movl	-156(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	movl	-96(%rbp,%rax,4), %edx
	movsbl	-185(%rbp), %eax
	cmpl	%eax, %edx
	jne	.L22
	movl	-108(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -108(%rbp)
.L22:
	movl	-156(%rbp), %eax
	cltq
	addq	$3, %rax
	movl	-96(%rbp,%rax,4), %edx
	movsbl	-185(%rbp), %eax
	cmpl	%eax, %edx
	jne	.L23
	movl	-104(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -104(%rbp)
.L23:
	movl	-156(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	leaq	-48(%rax), %rax
	addq	%rbp, %rax
	subq	$44, %rax
	movl	(%rax), %edx
	movsbl	-185(%rbp), %eax
	cmpl	%eax, %edx
	jne	.L24
	movl	-100(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -100(%rbp)
.L24:
	addl	$1, -156(%rbp)
.L16:
	cmpl	$2, -156(%rbp)
	jle	.L25
	movl	$0, -152(%rbp)
	movl	$0, -148(%rbp)
	jmp	.L26
.L28:
	movl	-148(%rbp), %eax
	cltq
	movl	-128(%rbp,%rax,4), %eax
	cmpl	$3, %eax
	jne	.L27
	movl	$1, -152(%rbp)
.L27:
	addl	$1, -148(%rbp)
.L26:
	cmpl	$7, -148(%rbp)
	jle	.L28
	cmpl	$1, -152(%rbp)
	jne	.L29
	leaq	.LC1(%rip), %rax
	jmp	.L30
.L29:
	leaq	.LC2(%rip), %rax
.L30:
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
	movq	%rbx, %rsp
	movq	-56(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L32
	call	__stack_chk_fail@PLT
.L32:
	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	"Yes"
.LC2:
	.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	$152, %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, -180(%rbp)
	jmp	.L2
.L5:
	movl	$0, -176(%rbp)
	jmp	.L3
.L4:
	leaq	-96(%rbp), %rcx
	movl	-176(%rbp), %eax
	movslq	%eax, %rsi
	movl	-180(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	addq	%rsi, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -176(%rbp)
.L3:
	cmpl	$2, -176(%rbp)
	jle	.L4
	addl	$1, -180(%rbp)
.L2:
	cmpl	$2, -180(%rbp)
	jle	.L5
	leaq	-184(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-184(%rbp), %eax
	movslq	%eax, %rdx
	subq	$1, %rdx
	movq	%rdx, -144(%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, %edi
	movl	$0, %edx
	divq	%rdi
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L6:
	cmpq	%rdx, %rsp
	je	.L7
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L6
.L7:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L8
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L8:
	movq	%rsp, %rax
	addq	$3, %rax
	shrq	$2, %rax
	salq	$2, %rax
	movq	%rax, -136(%rbp)
	movl	$0, -172(%rbp)
	jmp	.L9
.L15:
	movl	-172(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-136(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -168(%rbp)
	jmp	.L10
.L14:
	movl	$0, -164(%rbp)
	jmp	.L11
.L13:
	movq	-136(%rbp), %rax
	movl	-172(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %ecx
	movl	-164(%rbp), %eax
	movslq	%eax, %rsi
	movl	-168(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	addq	%rsi, %rax
	movl	-96(%rbp,%rax,4), %eax
	cmpl	%eax, %ecx
	jne	.L12
	movsbl	-185(%rbp), %edx
	movl	-164(%rbp), %eax
	movslq	%eax, %rsi
	movl	-168(%rbp), %eax
	movslq	%eax, %rcx
	movq	%rcx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	addq	%rsi, %rax
	movl	%edx, -96(%rbp,%rax,4)
.L12:
	addl	$1, -164(%rbp)
.L11:
	cmpl	$2, -164(%rbp)
	jle	.L13
	addl	$1, -168(%rbp)
.L10:
	cmpl	$2, -168(%rbp)
	jle	.L14
	addl	$1, -172(%rbp)
.L9:
	movl	-184(%rbp), %eax
	cmpl	%eax, -172(%rbp)
	jl	.L15
	movq	$0, -128(%rbp)
	movq	$0, -120(%rbp)
	movq	$0, -112(%rbp)
	movq	$0, -104(%rbp)
	movl	$2, -160(%rbp)
	movl	$0, -156(%rbp)
	jmp	.L16
.L25:
	movl	-156(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	leaq	-48(%rax), %rax
	addq	%rbp, %rax
	subq	$48, %rax
	movl	(%rax), %edx
	movsbl	-185(%rbp), %eax
	cmpl	%eax, %edx
	jne	.L17
	movl	-128(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -128(%rbp)
.L17:
	movl	-156(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	leaq	-48(%rax), %rax
	addq	%rbp, %rax
	subq	$40, %rax
	movl	(%rax), %edx
	movsbl	-185(%rbp), %eax
	cmpl	%eax, %edx
	jne	.L18
	movl	-124(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -124(%rbp)
.L18:
	movl	-156(%rbp), %eax
	cltq
	movl	-96(%rbp,%rax,4), %edx
	movsbl	-185(%rbp), %eax
	cmpl	%eax, %edx
	jne	.L19
	movl	-120(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -120(%rbp)
.L19:
	movl	-156(%rbp), %eax
	cltq
	addq	$6, %rax
	movl	-96(%rbp,%rax,4), %edx
	movsbl	-185(%rbp), %eax
	cmpl	%eax, %edx
	jne	.L20
	movl	-116(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -116(%rbp)
.L20:
	movl	-156(%rbp), %eax
	cltq
	salq	$4, %rax
	leaq	-48(%rax), %rax
	addq	%rbp, %rax
	subq	$48, %rax
	movl	(%rax), %edx
	movsbl	-185(%rbp), %eax
	cmpl	%eax, %edx
	jne	.L21
	movl	-112(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -112(%rbp)
.L21:
	movl	-160(%rbp), %eax
	leal	-1(%rax), %edx
	movl	%edx, -160(%rbp)
	movslq	%eax, %rcx
	movl	-156(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	movl	-96(%rbp,%rax,4), %edx
	movsbl	-185(%rbp), %eax
	cmpl	%eax, %edx
	jne	.L22
	movl	-108(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -108(%rbp)
.L22:
	movl	-156(%rbp), %eax
	cltq
	addq	$3, %rax
	movl	-96(%rbp,%rax,4), %edx
	movsbl	-185(%rbp), %eax
	cmpl	%eax, %edx
	jne	.L23
	movl	-104(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -104(%rbp)
.L23:
	movl	-156(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	leaq	-48(%rax), %rax
	addq	%rbp, %rax
	subq	$44, %rax
	movl	(%rax), %edx
	movsbl	-185(%rbp), %eax
	cmpl	%eax, %edx
	jne	.L24
	movl	-100(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -100(%rbp)
.L24:
	addl	$1, -156(%rbp)
.L16:
	cmpl	$2, -156(%rbp)
	jle	.L25
	movl	$0, -152(%rbp)
	movl	$0, -148(%rbp)
	jmp	.L26
.L28:
	movl	-148(%rbp), %eax
	cltq
	movl	-128(%rbp,%rax,4), %eax
	cmpl	$3, %eax
	jne	.L27
	movl	$1, -152(%rbp)
.L27:
	addl	$1, -148(%rbp)
.L26:
	cmpl	$7, -148(%rbp)
	jle	.L28
	cmpl	$1, -152(%rbp)
	jne	.L29
	leaq	.LC1(%rip), %rax
	jmp	.L30
.L29:
	leaq	.LC2(%rip), %rax
.L30:
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
	movq	%rbx, %rsp
	movq	-56(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L32
	call	__stack_chk_fail@PLT
.L32:
	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:
