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 a[3][3][2] = {0};
	for(int i = 0; i < 3; i++)
	{
		for(int j = 0; j < 3; j++)
		{
			scanf("%d", &a[i][j][0]);
		}
	}
	int n;
	scanf("%d", &n);
	for(int k = 0; k < n; k++)
	{
		int x, found = 0; scanf("%d", &x);
		for(int i = 0; i < 3; i++)
		{
			for(int j = 0; j < 3; j++)
			{
				if(x == a[i][j][0])
				{
					a[i][j][1] = 1;
					found = 1;
					break;
				}
			}
			if (found) break;
		}
	}
	int yes = 0, rcount[3] = {0}, ccount[3] = {0}, d1 = 0, d2 = 0;
	for(int i = 0; i < 3; i++)
	{
		for(int j = 0; j < 3; j++)
		{
			if(a[i][j][1] == 1) 
			{
				rcount[i]++;
				ccount[j]++;
			}
			if(i == j && a[i][j][1] == 1) d1++;
			if (i + j == 2 && a[i][j][1] == 1) d2++;
		}
	}
	for(int i = 0; i < 3; i++)
	{
		if(rcount[i] == 3 || ccount[i] == 3)
		{
			yes = 1;
			break;
		}
	}
//	printf("%d %d %d\n", yes, d1, d2);
	(yes || d1 == 3 || d2 == 3)? puts("Yes\n") : puts("No\n");
	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"Yes\n"
.LC2:
	.string	"No\n"
	.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	$160, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movq	$0, -80(%rbp)
	movq	$0, -72(%rbp)
	movq	$0, -64(%rbp)
	movq	$0, -56(%rbp)
	movq	$0, -48(%rbp)
	movq	$0, -40(%rbp)
	movq	$0, -32(%rbp)
	movq	$0, -24(%rbp)
	movq	$0, -16(%rbp)
	movl	$0, -152(%rbp)
	jmp	.L2
.L5:
	movl	$0, -148(%rbp)
	jmp	.L3
.L4:
	leaq	-80(%rbp), %rcx
	movl	-148(%rbp), %eax
	movslq	%eax, %rsi
	movl	-152(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	addq	%rsi, %rax
	salq	$3, %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -148(%rbp)
.L3:
	cmpl	$2, -148(%rbp)
	jle	.L4
	addl	$1, -152(%rbp)
.L2:
	cmpl	$2, -152(%rbp)
	jle	.L5
	leaq	-160(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -144(%rbp)
	jmp	.L6
.L15:
	movl	$0, -140(%rbp)
	leaq	-156(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -136(%rbp)
	jmp	.L7
.L14:
	movl	$0, -132(%rbp)
	jmp	.L8
.L11:
	movl	-132(%rbp), %eax
	movslq	%eax, %rcx
	movl	-136(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	movl	-80(%rbp,%rax,8), %edx
	movl	-156(%rbp), %eax
	cmpl	%eax, %edx
	jne	.L9
	movl	-132(%rbp), %eax
	movslq	%eax, %rcx
	movl	-136(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	movl	$1, -76(%rbp,%rax,8)
	movl	$1, -140(%rbp)
	jmp	.L10
.L9:
	addl	$1, -132(%rbp)
.L8:
	cmpl	$2, -132(%rbp)
	jle	.L11
.L10:
	cmpl	$0, -140(%rbp)
	jne	.L33
	addl	$1, -136(%rbp)
.L7:
	cmpl	$2, -136(%rbp)
	jle	.L14
	jmp	.L13
.L33:
	nop
.L13:
	addl	$1, -144(%rbp)
.L6:
	movl	-160(%rbp), %eax
	cmpl	%eax, -144(%rbp)
	jl	.L15
	movl	$0, -128(%rbp)
	movq	$0, -104(%rbp)
	movl	$0, -96(%rbp)
	movq	$0, -92(%rbp)
	movl	$0, -84(%rbp)
	movl	$0, -124(%rbp)
	movl	$0, -120(%rbp)
	movl	$0, -116(%rbp)
	jmp	.L16
.L22:
	movl	$0, -112(%rbp)
	jmp	.L17
.L21:
	movl	-112(%rbp), %eax
	movslq	%eax, %rcx
	movl	-116(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	movl	-76(%rbp,%rax,8), %eax
	cmpl	$1, %eax
	jne	.L18
	movl	-116(%rbp), %eax
	cltq
	movl	-104(%rbp,%rax,4), %eax
	leal	1(%rax), %edx
	movl	-116(%rbp), %eax
	cltq
	movl	%edx, -104(%rbp,%rax,4)
	movl	-112(%rbp), %eax
	cltq
	movl	-92(%rbp,%rax,4), %eax
	leal	1(%rax), %edx
	movl	-112(%rbp), %eax
	cltq
	movl	%edx, -92(%rbp,%rax,4)
.L18:
	movl	-116(%rbp), %eax
	cmpl	-112(%rbp), %eax
	jne	.L19
	movl	-112(%rbp), %eax
	movslq	%eax, %rcx
	movl	-116(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	movl	-76(%rbp,%rax,8), %eax
	cmpl	$1, %eax
	jne	.L19
	addl	$1, -124(%rbp)
.L19:
	movl	-116(%rbp), %edx
	movl	-112(%rbp), %eax
	addl	%edx, %eax
	cmpl	$2, %eax
	jne	.L20
	movl	-112(%rbp), %eax
	movslq	%eax, %rcx
	movl	-116(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	movl	-76(%rbp,%rax,8), %eax
	cmpl	$1, %eax
	jne	.L20
	addl	$1, -120(%rbp)
.L20:
	addl	$1, -112(%rbp)
.L17:
	cmpl	$2, -112(%rbp)
	jle	.L21
	addl	$1, -116(%rbp)
.L16:
	cmpl	$2, -116(%rbp)
	jle	.L22
	movl	$0, -108(%rbp)
	jmp	.L23
.L27:
	movl	-108(%rbp), %eax
	cltq
	movl	-104(%rbp,%rax,4), %eax
	cmpl	$3, %eax
	je	.L24
	movl	-108(%rbp), %eax
	cltq
	movl	-92(%rbp,%rax,4), %eax
	cmpl	$3, %eax
	jne	.L25
.L24:
	movl	$1, -128(%rbp)
	jmp	.L26
.L25:
	addl	$1, -108(%rbp)
.L23:
	cmpl	$2, -108(%rbp)
	jle	.L27
.L26:
	cmpl	$0, -128(%rbp)
	jne	.L28
	cmpl	$3, -124(%rbp)
	je	.L28
	cmpl	$3, -120(%rbp)
	jne	.L29
.L28:
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L30
.L29:
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
.L30:
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L32
	call	__stack_chk_fail@PLT
.L32:
	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"
.LC1:
	.string	"Yes\n"
.LC2:
	.string	"No\n"
	.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
	pxor	%xmm0, %xmm0
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	leaq	.LC0(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	subq	$112, %rsp
	.cfi_def_cfa_offset 144
	movq	%fs:40, %rax
	movq	%rax, 104(%rsp)
	xorl	%eax, %eax
	leaq	32(%rsp), %rbx
	movaps	%xmm0, 32(%rsp)
	leaq	104(%rsp), %r12
	movq	$0, 96(%rsp)
	movaps	%xmm0, 48(%rsp)
	movaps	%xmm0, 64(%rsp)
	movaps	%xmm0, 80(%rsp)
.L2:
	movq	%rbx, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	leaq	8(%rbx), %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	leaq	16(%rbx), %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	addq	$24, %rbx
	cmpq	%rbx, %r12
	jne	.L2
	movq	%rsp, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	xorl	%ebx, %ebx
	call	__isoc99_scanf@PLT
	movl	(%rsp), %eax
	leaq	4(%rsp), %r12
	testl	%eax, %eax
	jle	.L17
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%r12, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %eax
	cmpl	%eax, 32(%rsp)
	je	.L31
	cmpl	40(%rsp), %eax
	je	.L32
	cmpl	48(%rsp), %eax
	je	.L33
	cmpl	56(%rsp), %eax
	je	.L34
	cmpl	64(%rsp), %eax
	je	.L35
	cmpl	72(%rsp), %eax
	je	.L36
	cmpl	80(%rsp), %eax
	je	.L37
	cmpl	88(%rsp), %eax
	je	.L38
	cmpl	96(%rsp), %eax
	je	.L50
.L16:
	addl	$1, %ebx
	cmpl	%ebx, (%rsp)
	jg	.L3
.L17:
	movl	36(%rsp), %eax
	movq	$0, 8(%rsp)
	movl	$0, 16(%rsp)
	movq	$0, 20(%rsp)
	movl	$0, 28(%rsp)
	cmpl	$1, %eax
	je	.L51
	xorl	%r8d, %r8d
	xorl	%eax, %eax
.L4:
	movl	44(%rsp), %ecx
	cmpl	$1, %ecx
	je	.L52
	xorl	%edi, %edi
	xorl	%ecx, %ecx
.L5:
	movl	52(%rsp), %edx
	cmpl	$1, %edx
	je	.L53
	xorl	%esi, %esi
	xorl	%edx, %edx
.L6:
	cmpl	$1, 60(%rsp)
	movl	%eax, %r10d
	je	.L54
.L7:
	cmpl	$1, 68(%rsp)
	movl	%edx, %r9d
	je	.L55
.L8:
	cmpl	$1, 76(%rsp)
	je	.L56
.L9:
	cmpl	$1, 84(%rsp)
	je	.L57
.L10:
	cmpl	$1, 92(%rsp)
	jne	.L11
	addl	$1, 16(%rsp)
	addl	$1, %ecx
	movl	$1, %edi
.L11:
	cmpl	$1, 100(%rsp)
	je	.L58
	testb	%sil, %sil
	je	.L14
.L13:
	movl	%edx, 28(%rsp)
.L14:
	testb	%dil, %dil
	je	.L18
	movl	%ecx, 24(%rsp)
.L18:
	testb	%r8b, %r8b
	je	.L19
	movl	%r10d, 20(%rsp)
.L19:
	cmpl	$3, 8(%rsp)
	je	.L20
	cmpl	$3, 20(%rsp)
	je	.L20
	cmpl	$3, 12(%rsp)
	je	.L20
	cmpl	$3, 24(%rsp)
	je	.L20
	cmpl	$3, 16(%rsp)
	je	.L20
	cmpl	$3, 28(%rsp)
	je	.L20
	cmpl	$3, %eax
	je	.L20
	cmpl	$3, %r9d
	je	.L20
	leaq	.LC2(%rip), %rdi
	call	puts@PLT
.L23:
	movq	104(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L59
	addq	$112, %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
.L56:
	.cfi_restore_state
	addl	$1, 12(%rsp)
	addl	$1, %edx
	movl	$1, %esi
	jmp	.L9
.L55:
	addl	$1, 12(%rsp)
	addl	$1, %ecx
	addl	$1, %eax
	movl	$1, %edi
	leal	1(%rdx), %r9d
	jmp	.L8
.L54:
	movl	$1, 12(%rsp)
	leal	1(%rax), %r10d
	movl	$1, %r8d
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L20:
	leaq	.LC1(%rip), %rdi
	call	puts@PLT
	jmp	.L23
.L31:
	xorl	%edx, %edx
	xorl	%eax, %eax
	.p2align 4,,10
	.p2align 3
.L15:
	leaq	(%rax,%rax,2), %rax
	addq	%rdx, %rax
	movl	$1, 36(%rsp,%rax,8)
	jmp	.L16
.L32:
	movl	$1, %edx
	xorl	%eax, %eax
	jmp	.L15
.L33:
	movl	$2, %edx
	xorl	%eax, %eax
	jmp	.L15
.L34:
	xorl	%edx, %edx
	movl	$1, %eax
	jmp	.L15
.L35:
	movl	$1, %edx
	movl	$1, %eax
	jmp	.L15
.L36:
	movl	$2, %edx
	movl	$1, %eax
	jmp	.L15
.L37:
	xorl	%edx, %edx
	movl	$2, %eax
	jmp	.L15
.L38:
	movl	$1, %edx
	movl	$2, %eax
	jmp	.L15
.L53:
	addl	$1, 8(%rsp)
	movl	$1, %esi
	jmp	.L6
.L52:
	addl	$1, 8(%rsp)
	movl	$1, %edi
	jmp	.L5
.L51:
	movl	$1, 8(%rsp)
	movl	$1, %r8d
	jmp	.L4
.L50:
	movl	$2, %edx
	movl	$2, %eax
	jmp	.L15
.L57:
	movl	$1, 16(%rsp)
	addl	$1, %r10d
	addl	$1, %r9d
	movl	$1, %r8d
	jmp	.L10
.L58:
	addl	$1, 16(%rsp)
	addl	$1, %edx
	addl	$1, %eax
	jmp	.L13
.L59:
	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	"Yes\n"
.LC2:
	.string	"No\n"
	.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
	pxor	%xmm0, %xmm0
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	leaq	.LC0(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	subq	$112, %rsp
	.cfi_def_cfa_offset 144
	movq	%fs:40, %rax
	movq	%rax, 104(%rsp)
	xorl	%eax, %eax
	leaq	32(%rsp), %rbx
	movaps	%xmm0, 32(%rsp)
	leaq	104(%rsp), %r12
	movq	$0, 96(%rsp)
	movaps	%xmm0, 48(%rsp)
	movaps	%xmm0, 64(%rsp)
	movaps	%xmm0, 80(%rsp)
.L2:
	movq	%rbx, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	leaq	8(%rbx), %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	leaq	16(%rbx), %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	addq	$24, %rbx
	cmpq	%rbx, %r12
	jne	.L2
	movq	%rsp, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	xorl	%ebx, %ebx
	call	__isoc99_scanf@PLT
	movl	(%rsp), %eax
	leaq	4(%rsp), %r12
	testl	%eax, %eax
	jle	.L17
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%r12, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %eax
	cmpl	%eax, 32(%rsp)
	je	.L31
	cmpl	40(%rsp), %eax
	je	.L32
	cmpl	48(%rsp), %eax
	je	.L33
	cmpl	56(%rsp), %eax
	je	.L34
	cmpl	64(%rsp), %eax
	je	.L35
	cmpl	72(%rsp), %eax
	je	.L36
	cmpl	80(%rsp), %eax
	je	.L37
	cmpl	88(%rsp), %eax
	je	.L38
	cmpl	96(%rsp), %eax
	je	.L50
.L16:
	addl	$1, %ebx
	cmpl	%ebx, (%rsp)
	jg	.L3
.L17:
	movl	36(%rsp), %eax
	movq	$0, 8(%rsp)
	movl	$0, 16(%rsp)
	movq	$0, 20(%rsp)
	movl	$0, 28(%rsp)
	cmpl	$1, %eax
	je	.L51
	xorl	%r8d, %r8d
	xorl	%eax, %eax
.L4:
	movl	44(%rsp), %ecx
	cmpl	$1, %ecx
	je	.L52
	xorl	%edi, %edi
	xorl	%ecx, %ecx
.L5:
	movl	52(%rsp), %edx
	cmpl	$1, %edx
	je	.L53
	xorl	%esi, %esi
	xorl	%edx, %edx
.L6:
	cmpl	$1, 60(%rsp)
	movl	%eax, %r10d
	je	.L54
.L7:
	cmpl	$1, 68(%rsp)
	movl	%edx, %r9d
	je	.L55
.L8:
	cmpl	$1, 76(%rsp)
	je	.L56
.L9:
	cmpl	$1, 84(%rsp)
	je	.L57
.L10:
	cmpl	$1, 92(%rsp)
	jne	.L11
	addl	$1, 16(%rsp)
	addl	$1, %ecx
	movl	$1, %edi
.L11:
	cmpl	$1, 100(%rsp)
	je	.L58
	testb	%sil, %sil
	je	.L14
.L13:
	movl	%edx, 28(%rsp)
.L14:
	testb	%dil, %dil
	je	.L18
	movl	%ecx, 24(%rsp)
.L18:
	testb	%r8b, %r8b
	je	.L19
	movl	%r10d, 20(%rsp)
.L19:
	cmpl	$3, 8(%rsp)
	je	.L20
	cmpl	$3, 20(%rsp)
	je	.L20
	cmpl	$3, 12(%rsp)
	je	.L20
	cmpl	$3, 24(%rsp)
	je	.L20
	cmpl	$3, 16(%rsp)
	je	.L20
	cmpl	$3, 28(%rsp)
	je	.L20
	cmpl	$3, %eax
	je	.L20
	cmpl	$3, %r9d
	je	.L20
	leaq	.LC2(%rip), %rdi
	call	puts@PLT
.L23:
	movq	104(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L59
	addq	$112, %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
.L56:
	.cfi_restore_state
	addl	$1, 12(%rsp)
	addl	$1, %edx
	movl	$1, %esi
	jmp	.L9
.L55:
	addl	$1, 12(%rsp)
	addl	$1, %ecx
	addl	$1, %eax
	movl	$1, %edi
	leal	1(%rdx), %r9d
	jmp	.L8
.L54:
	movl	$1, 12(%rsp)
	leal	1(%rax), %r10d
	movl	$1, %r8d
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L20:
	leaq	.LC1(%rip), %rdi
	call	puts@PLT
	jmp	.L23
.L31:
	xorl	%edx, %edx
	xorl	%eax, %eax
	.p2align 4,,10
	.p2align 3
.L15:
	leaq	(%rax,%rax,2), %rax
	addq	%rdx, %rax
	movl	$1, 36(%rsp,%rax,8)
	jmp	.L16
.L32:
	movl	$1, %edx
	xorl	%eax, %eax
	jmp	.L15
.L33:
	movl	$2, %edx
	xorl	%eax, %eax
	jmp	.L15
.L34:
	xorl	%edx, %edx
	movl	$1, %eax
	jmp	.L15
.L35:
	movl	$1, %edx
	movl	$1, %eax
	jmp	.L15
.L36:
	movl	$2, %edx
	movl	$1, %eax
	jmp	.L15
.L37:
	xorl	%edx, %edx
	movl	$2, %eax
	jmp	.L15
.L38:
	movl	$1, %edx
	movl	$2, %eax
	jmp	.L15
.L53:
	addl	$1, 8(%rsp)
	movl	$1, %esi
	jmp	.L6
.L52:
	addl	$1, 8(%rsp)
	movl	$1, %edi
	jmp	.L5
.L51:
	movl	$1, 8(%rsp)
	movl	$1, %r8d
	jmp	.L4
.L50:
	movl	$2, %edx
	movl	$2, %eax
	jmp	.L15
.L57:
	movl	$1, 16(%rsp)
	addl	$1, %r10d
	addl	$1, %r9d
	movl	$1, %r8d
	jmp	.L10
.L58:
	addl	$1, 16(%rsp)
	addl	$1, %edx
	addl	$1, %eax
	jmp	.L13
.L59:
	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 a[3][3][2] = {0};
	for(int i = 0; i < 3; i++)
	{
		for(int j = 0; j < 3; j++)
		{
			scanf("%d", &a[i][j][0]);
		}
	}
	int n;
	scanf("%d", &n);
	for(int k = 0; k < n; k++)
	{
		int x, found = 0; scanf("%d", &x);
		for(int i = 0; i < 3; i++)
		{
			for(int j = 0; j < 3; j++)
			{
				if(x == a[i][j][0])
				{
					a[i][j][1] = 1;
					found = 1;
					break;
				}
			}
			if (found) break;
		}
	}
	int yes = 0, rcount[3] = {0}, ccount[3] = {0}, d1 = 0, d2 = 0;
	for(int i = 0; i < 3; i++)
	{
		for(int j = 0; j < 3; j++)
		{
			if(a[i][j][1] == 1) 
			{
				rcount[i]++;
				ccount[j]++;
			}
			if(i == j && a[i][j][1] == 1) d1++;
			if (i + j == 2 && a[i][j][1] == 1) d2++;
		}
	}
	for(int i = 0; i < 3; i++)
	{
		if(rcount[i] == 3 || ccount[i] == 3)
		{
			yes = 1;
			break;
		}
	}
//	printf("%d %d %d\n", yes, d1, d2);
	(yes || d1 == 3 || d2 == 3)? puts("Yes\n") : puts("No\n");
	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 a[3][3][2] = {0};
	for(int i = 0; i < 3; i++)
	{
		for(int j = 0; j < 3; j++)
		{
			scanf("%d", &a[i][j][0]);
		}
	}
	int n;
	scanf("%d", &n);
	for(int k = 0; k < n; k++)
	{
		int x, found = 0; scanf("%d", &x);
		for(int i = 0; i < 3; i++)
		{
			for(int j = 0; j < 3; j++)
			{
				if(x == a[i][j][0])
				{
					a[i][j][1] = 1;
					found = 1;
					break;
				}
			}
			if (found) break;
		}
	}
	int yes = 0, rcount[3] = {0}, ccount[3] = {0}, d1 = 0, d2 = 0;
	for(int i = 0; i < 3; i++)
	{
		for(int j = 0; j < 3; j++)
		{
			if(a[i][j][1] == 1) 
			{
				rcount[i]++;
				ccount[j]++;
			}
			if(i == j && a[i][j][1] == 1) d1++;
			if (i + j == 2 && a[i][j][1] == 1) d2++;
		}
	}
	for(int i = 0; i < 3; i++)
	{
		if(rcount[i] == 3 || ccount[i] == 3)
		{
			yes = 1;
			break;
		}
	}
//	printf("%d %d %d\n", yes, d1, d2);
	(yes || d1 == 3 || d2 == 3)? puts("Yes\n") : puts("No\n");
	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"Yes\n"
.LC2:
	.string	"No\n"
	.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	$160, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movq	$0, -80(%rbp)
	movq	$0, -72(%rbp)
	movq	$0, -64(%rbp)
	movq	$0, -56(%rbp)
	movq	$0, -48(%rbp)
	movq	$0, -40(%rbp)
	movq	$0, -32(%rbp)
	movq	$0, -24(%rbp)
	movq	$0, -16(%rbp)
	movl	$0, -152(%rbp)
	jmp	.L2
.L5:
	movl	$0, -148(%rbp)
	jmp	.L3
.L4:
	leaq	-80(%rbp), %rcx
	movl	-148(%rbp), %eax
	movslq	%eax, %rsi
	movl	-152(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	addq	%rsi, %rax
	salq	$3, %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -148(%rbp)
.L3:
	cmpl	$2, -148(%rbp)
	jle	.L4
	addl	$1, -152(%rbp)
.L2:
	cmpl	$2, -152(%rbp)
	jle	.L5
	leaq	-160(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -144(%rbp)
	jmp	.L6
.L15:
	movl	$0, -140(%rbp)
	leaq	-156(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -136(%rbp)
	jmp	.L7
.L14:
	movl	$0, -132(%rbp)
	jmp	.L8
.L11:
	movl	-132(%rbp), %eax
	movslq	%eax, %rcx
	movl	-136(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	movl	-80(%rbp,%rax,8), %edx
	movl	-156(%rbp), %eax
	cmpl	%eax, %edx
	jne	.L9
	movl	-132(%rbp), %eax
	movslq	%eax, %rcx
	movl	-136(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	movl	$1, -76(%rbp,%rax,8)
	movl	$1, -140(%rbp)
	jmp	.L10
.L9:
	addl	$1, -132(%rbp)
.L8:
	cmpl	$2, -132(%rbp)
	jle	.L11
.L10:
	cmpl	$0, -140(%rbp)
	jne	.L33
	addl	$1, -136(%rbp)
.L7:
	cmpl	$2, -136(%rbp)
	jle	.L14
	jmp	.L13
.L33:
	nop
.L13:
	addl	$1, -144(%rbp)
.L6:
	movl	-160(%rbp), %eax
	cmpl	%eax, -144(%rbp)
	jl	.L15
	movl	$0, -128(%rbp)
	movq	$0, -104(%rbp)
	movl	$0, -96(%rbp)
	movq	$0, -92(%rbp)
	movl	$0, -84(%rbp)
	movl	$0, -124(%rbp)
	movl	$0, -120(%rbp)
	movl	$0, -116(%rbp)
	jmp	.L16
.L22:
	movl	$0, -112(%rbp)
	jmp	.L17
.L21:
	movl	-112(%rbp), %eax
	movslq	%eax, %rcx
	movl	-116(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	movl	-76(%rbp,%rax,8), %eax
	cmpl	$1, %eax
	jne	.L18
	movl	-116(%rbp), %eax
	cltq
	movl	-104(%rbp,%rax,4), %eax
	leal	1(%rax), %edx
	movl	-116(%rbp), %eax
	cltq
	movl	%edx, -104(%rbp,%rax,4)
	movl	-112(%rbp), %eax
	cltq
	movl	-92(%rbp,%rax,4), %eax
	leal	1(%rax), %edx
	movl	-112(%rbp), %eax
	cltq
	movl	%edx, -92(%rbp,%rax,4)
.L18:
	movl	-116(%rbp), %eax
	cmpl	-112(%rbp), %eax
	jne	.L19
	movl	-112(%rbp), %eax
	movslq	%eax, %rcx
	movl	-116(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	movl	-76(%rbp,%rax,8), %eax
	cmpl	$1, %eax
	jne	.L19
	addl	$1, -124(%rbp)
.L19:
	movl	-116(%rbp), %edx
	movl	-112(%rbp), %eax
	addl	%edx, %eax
	cmpl	$2, %eax
	jne	.L20
	movl	-112(%rbp), %eax
	movslq	%eax, %rcx
	movl	-116(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	movl	-76(%rbp,%rax,8), %eax
	cmpl	$1, %eax
	jne	.L20
	addl	$1, -120(%rbp)
.L20:
	addl	$1, -112(%rbp)
.L17:
	cmpl	$2, -112(%rbp)
	jle	.L21
	addl	$1, -116(%rbp)
.L16:
	cmpl	$2, -116(%rbp)
	jle	.L22
	movl	$0, -108(%rbp)
	jmp	.L23
.L27:
	movl	-108(%rbp), %eax
	cltq
	movl	-104(%rbp,%rax,4), %eax
	cmpl	$3, %eax
	je	.L24
	movl	-108(%rbp), %eax
	cltq
	movl	-92(%rbp,%rax,4), %eax
	cmpl	$3, %eax
	jne	.L25
.L24:
	movl	$1, -128(%rbp)
	jmp	.L26
.L25:
	addl	$1, -108(%rbp)
.L23:
	cmpl	$2, -108(%rbp)
	jle	.L27
.L26:
	cmpl	$0, -128(%rbp)
	jne	.L28
	cmpl	$3, -124(%rbp)
	je	.L28
	cmpl	$3, -120(%rbp)
	jne	.L29
.L28:
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L30
.L29:
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
.L30:
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L32
	call	__stack_chk_fail@PLT
.L32:
	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	"Yes\n"
.LC2:
	.string	"No\n"
	.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	$160, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movq	$0, -80(%rbp)
	movq	$0, -72(%rbp)
	movq	$0, -64(%rbp)
	movq	$0, -56(%rbp)
	movq	$0, -48(%rbp)
	movq	$0, -40(%rbp)
	movq	$0, -32(%rbp)
	movq	$0, -24(%rbp)
	movq	$0, -16(%rbp)
	movl	$0, -152(%rbp)
	jmp	.L2
.L5:
	movl	$0, -148(%rbp)
	jmp	.L3
.L4:
	leaq	-80(%rbp), %rcx
	movl	-148(%rbp), %eax
	movslq	%eax, %rsi
	movl	-152(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	addq	%rsi, %rax
	salq	$3, %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -148(%rbp)
.L3:
	cmpl	$2, -148(%rbp)
	jle	.L4
	addl	$1, -152(%rbp)
.L2:
	cmpl	$2, -152(%rbp)
	jle	.L5
	leaq	-160(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -144(%rbp)
	jmp	.L6
.L15:
	movl	$0, -140(%rbp)
	leaq	-156(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -136(%rbp)
	jmp	.L7
.L14:
	movl	$0, -132(%rbp)
	jmp	.L8
.L11:
	movl	-132(%rbp), %eax
	movslq	%eax, %rcx
	movl	-136(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	movl	-80(%rbp,%rax,8), %edx
	movl	-156(%rbp), %eax
	cmpl	%eax, %edx
	jne	.L9
	movl	-132(%rbp), %eax
	movslq	%eax, %rcx
	movl	-136(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	movl	$1, -76(%rbp,%rax,8)
	movl	$1, -140(%rbp)
	jmp	.L10
.L9:
	addl	$1, -132(%rbp)
.L8:
	cmpl	$2, -132(%rbp)
	jle	.L11
.L10:
	cmpl	$0, -140(%rbp)
	jne	.L33
	addl	$1, -136(%rbp)
.L7:
	cmpl	$2, -136(%rbp)
	jle	.L14
	jmp	.L13
.L33:
	nop
.L13:
	addl	$1, -144(%rbp)
.L6:
	movl	-160(%rbp), %eax
	cmpl	%eax, -144(%rbp)
	jl	.L15
	movl	$0, -128(%rbp)
	movq	$0, -104(%rbp)
	movl	$0, -96(%rbp)
	movq	$0, -92(%rbp)
	movl	$0, -84(%rbp)
	movl	$0, -124(%rbp)
	movl	$0, -120(%rbp)
	movl	$0, -116(%rbp)
	jmp	.L16
.L22:
	movl	$0, -112(%rbp)
	jmp	.L17
.L21:
	movl	-112(%rbp), %eax
	movslq	%eax, %rcx
	movl	-116(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	movl	-76(%rbp,%rax,8), %eax
	cmpl	$1, %eax
	jne	.L18
	movl	-116(%rbp), %eax
	cltq
	movl	-104(%rbp,%rax,4), %eax
	leal	1(%rax), %edx
	movl	-116(%rbp), %eax
	cltq
	movl	%edx, -104(%rbp,%rax,4)
	movl	-112(%rbp), %eax
	cltq
	movl	-92(%rbp,%rax,4), %eax
	leal	1(%rax), %edx
	movl	-112(%rbp), %eax
	cltq
	movl	%edx, -92(%rbp,%rax,4)
.L18:
	movl	-116(%rbp), %eax
	cmpl	-112(%rbp), %eax
	jne	.L19
	movl	-112(%rbp), %eax
	movslq	%eax, %rcx
	movl	-116(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	movl	-76(%rbp,%rax,8), %eax
	cmpl	$1, %eax
	jne	.L19
	addl	$1, -124(%rbp)
.L19:
	movl	-116(%rbp), %edx
	movl	-112(%rbp), %eax
	addl	%edx, %eax
	cmpl	$2, %eax
	jne	.L20
	movl	-112(%rbp), %eax
	movslq	%eax, %rcx
	movl	-116(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	movl	-76(%rbp,%rax,8), %eax
	cmpl	$1, %eax
	jne	.L20
	addl	$1, -120(%rbp)
.L20:
	addl	$1, -112(%rbp)
.L17:
	cmpl	$2, -112(%rbp)
	jle	.L21
	addl	$1, -116(%rbp)
.L16:
	cmpl	$2, -116(%rbp)
	jle	.L22
	movl	$0, -108(%rbp)
	jmp	.L23
.L27:
	movl	-108(%rbp), %eax
	cltq
	movl	-104(%rbp,%rax,4), %eax
	cmpl	$3, %eax
	je	.L24
	movl	-108(%rbp), %eax
	cltq
	movl	-92(%rbp,%rax,4), %eax
	cmpl	$3, %eax
	jne	.L25
.L24:
	movl	$1, -128(%rbp)
	jmp	.L26
.L25:
	addl	$1, -108(%rbp)
.L23:
	cmpl	$2, -108(%rbp)
	jle	.L27
.L26:
	cmpl	$0, -128(%rbp)
	jne	.L28
	cmpl	$3, -124(%rbp)
	je	.L28
	cmpl	$3, -120(%rbp)
	jne	.L29
.L28:
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L30
.L29:
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
.L30:
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L32
	call	__stack_chk_fail@PLT
.L32:
	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:
