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], b[3][3] = {};
  int n, x;
 
  for(int i = 0; i < 3; i++)
  {
    for(int j = 0; j < 3; j++)
	{
      scanf("%d",&a[i][j]);
    }
  }
  
  scanf("%d",&n);
  for(int k = 0; k < n; k++)
  {
    scanf("%d",&x);
    for(int i = 0; i < 3; i++)
	{
      for(int j = 0; j < 3; j++)
	  {
        if(a[i][j] == x)
        {
        	b[i][j] = 1;
		}
      }
    }
  }
 
  if(b[0][0]+b[1][1]+b[2][2] == 3 || b[0][2]+b[1][1]+b[2][0] == 3)
  {
      puts("Yes");
      return 0;
    }
 
  for(int i = 0; i < 3; i++)
  {
      if(b[i][0]+b[i][1]+b[i][2] == 3 || b[0][i]+b[1][i]+b[2][i] == 3)
	  {
        puts("Yes");
        return 0;
      }
    }
 
    puts("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
	addq	$-128, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movq	$0, -48(%rbp)
	movq	$0, -40(%rbp)
	movq	$0, -32(%rbp)
	movq	$0, -24(%rbp)
	movl	$0, -16(%rbp)
	movl	$0, -120(%rbp)
	jmp	.L2
.L5:
	movl	$0, -116(%rbp)
	jmp	.L3
.L4:
	leaq	-96(%rbp), %rcx
	movl	-116(%rbp), %eax
	movslq	%eax, %rsi
	movl	-120(%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, -116(%rbp)
.L3:
	cmpl	$2, -116(%rbp)
	jle	.L4
	addl	$1, -120(%rbp)
.L2:
	cmpl	$2, -120(%rbp)
	jle	.L5
	leaq	-128(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -112(%rbp)
	jmp	.L6
.L12:
	leaq	-124(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -108(%rbp)
	jmp	.L7
.L11:
	movl	$0, -104(%rbp)
	jmp	.L8
.L10:
	movl	-104(%rbp), %eax
	movslq	%eax, %rcx
	movl	-108(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	movl	-96(%rbp,%rax,4), %edx
	movl	-124(%rbp), %eax
	cmpl	%eax, %edx
	jne	.L9
	movl	-104(%rbp), %eax
	movslq	%eax, %rcx
	movl	-108(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	movl	$1, -48(%rbp,%rax,4)
.L9:
	addl	$1, -104(%rbp)
.L8:
	cmpl	$2, -104(%rbp)
	jle	.L10
	addl	$1, -108(%rbp)
.L7:
	cmpl	$2, -108(%rbp)
	jle	.L11
	addl	$1, -112(%rbp)
.L6:
	movl	-128(%rbp), %eax
	cmpl	%eax, -112(%rbp)
	jl	.L12
	movl	-48(%rbp), %edx
	movl	-32(%rbp), %eax
	addl	%eax, %edx
	movl	-16(%rbp), %eax
	addl	%edx, %eax
	cmpl	$3, %eax
	je	.L13
	movl	-40(%rbp), %edx
	movl	-32(%rbp), %eax
	addl	%eax, %edx
	movl	-24(%rbp), %eax
	addl	%edx, %eax
	cmpl	$3, %eax
	jne	.L14
.L13:
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
	jmp	.L20
.L14:
	movl	$0, -100(%rbp)
	jmp	.L16
.L19:
	movl	-100(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rbp, %rax
	subq	$48, %rax
	movl	(%rax), %ecx
	movl	-100(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rbp, %rax
	subq	$44, %rax
	movl	(%rax), %eax
	addl	%eax, %ecx
	movl	-100(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rbp, %rax
	subq	$40, %rax
	movl	(%rax), %eax
	addl	%ecx, %eax
	cmpl	$3, %eax
	je	.L17
	movl	-100(%rbp), %eax
	cltq
	movl	-48(%rbp,%rax,4), %edx
	movl	-100(%rbp), %eax
	cltq
	addq	$3, %rax
	movl	-48(%rbp,%rax,4), %eax
	addl	%eax, %edx
	movl	-100(%rbp), %eax
	cltq
	addq	$6, %rax
	movl	-48(%rbp,%rax,4), %eax
	addl	%edx, %eax
	cmpl	$3, %eax
	jne	.L18
.L17:
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
	jmp	.L20
.L18:
	addl	$1, -100(%rbp)
.L16:
	cmpl	$2, -100(%rbp)
	jle	.L19
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
.L20:
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L21
	call	__stack_chk_fail@PLT
.L21:
	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"
.LC2:
	.string	"No"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pxor	%xmm0, %xmm0
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	leaq	.LC0(%rip), %r14
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$152, %rsp
	.cfi_def_cfa_offset 208
	movq	%fs:40, %rax
	movq	%rax, 136(%rsp)
	xorl	%eax, %eax
	leaq	48(%rsp), %rbx
	movaps	%xmm0, 96(%rsp)
	leaq	84(%rsp), %rbp
	movl	$0, 128(%rsp)
	movaps	%xmm0, 112(%rsp)
.L2:
	movq	%rbx, %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	leaq	4(%rbx), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	leaq	8(%rbx), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	addq	$12, %rbx
	cmpq	%rbx, %rbp
	jne	.L2
	leaq	40(%rsp), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	40(%rsp), %eax
	testl	%eax, %eax
	jle	.L3
	leaq	44(%rsp), %rax
	xorl	%r11d, %r11d
	xorl	%r10d, %r10d
	xorl	%r9d, %r9d
	movl	$0, 20(%rsp)
	xorl	%r12d, %r12d
	xorl	%r8d, %r8d
	xorl	%ebp, %ebp
	movq	%rax, 24(%rsp)
	xorl	%r13d, %r13d
	xorl	%r15d, %r15d
	xorl	%ecx, %ecx
	movl	$1, %ebx
	.p2align 4,,10
	.p2align 3
.L15:
	movq	24(%rsp), %rsi
	xorl	%eax, %eax
	movq	%r14, %rdi
	movl	%r11d, 16(%rsp)
	movl	%r8d, 12(%rsp)
	movl	%r10d, 8(%rsp)
	movl	%ecx, 4(%rsp)
	movl	%r9d, (%rsp)
	call	__isoc99_scanf@PLT
	movl	(%rsp), %r9d
	movl	44(%rsp), %eax
	cmpl	%eax, 48(%rsp)
	movl	8(%rsp), %r10d
	cmove	%ebx, %r9d
	cmpl	52(%rsp), %eax
	movl	12(%rsp), %r8d
	cmove	%ebx, %r12d
	cmpl	56(%rsp), %eax
	movl	16(%rsp), %r11d
	cmove	%ebx, %r10d
	cmpl	60(%rsp), %eax
	movl	%r9d, 96(%rsp)
	cmove	%ebx, %r8d
	cmpl	64(%rsp), %eax
	movl	%r12d, 100(%rsp)
	cmove	%ebx, %r15d
	cmpl	68(%rsp), %eax
	movl	%r10d, 104(%rsp)
	cmove	%ebx, %ebp
	cmpl	72(%rsp), %eax
	movl	4(%rsp), %ecx
	movl	%r8d, 108(%rsp)
	cmove	%ebx, %r11d
	cmpl	76(%rsp), %eax
	movl	%r15d, 112(%rsp)
	cmove	%ebx, %r13d
	cmpl	80(%rsp), %eax
	movl	%ebp, 116(%rsp)
	movl	%r11d, 120(%rsp)
	movl	%r13d, 124(%rsp)
	je	.L44
	movl	20(%rsp), %eax
	addl	$1, %ecx
	movl	%eax, 128(%rsp)
	cmpl	%ecx, 40(%rsp)
	jg	.L15
	movl	%r15d, %r13d
	movl	%r9d, %ebp
	movl	%r10d, %r12d
	movl	%r11d, %r15d
.L14:
	leal	0(%r13,%rbp), %eax
	addl	20(%rsp), %eax
	cmpl	$3, %eax
	je	.L16
	leal	(%r12,%r13), %eax
	addl	%r15d, %eax
	cmpl	$3, %eax
	je	.L16
.L3:
	movl	96(%rsp), %eax
	movl	100(%rsp), %r8d
	movl	104(%rsp), %edi
	leal	(%r8,%rax), %edx
	addl	%edi, %edx
	cmpl	$3, %edx
	je	.L16
	movl	108(%rsp), %esi
	movl	120(%rsp), %edx
	addl	%esi, %eax
	addl	%edx, %eax
	cmpl	$3, %eax
	je	.L16
	movl	112(%rsp), %ecx
	movl	116(%rsp), %eax
	addl	%ecx, %esi
	addl	%eax, %esi
	cmpl	$3, %esi
	je	.L16
	movl	124(%rsp), %esi
	addl	%r8d, %ecx
	addl	%esi, %ecx
	cmpl	$3, %ecx
	je	.L16
	movl	128(%rsp), %ecx
	addl	%esi, %edx
	addl	%ecx, %edx
	cmpl	$3, %edx
	je	.L16
	addl	%edi, %eax
	addl	%ecx, %eax
	cmpl	$3, %eax
	je	.L16
	leaq	.LC2(%rip), %rdi
	call	puts@PLT
.L17:
	movq	136(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L45
	addq	$152, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L44:
	.cfi_restore_state
	movl	%ebx, 128(%rsp)
	addl	$1, %ecx
	cmpl	40(%rsp), %ecx
	jge	.L46
	movl	$1, 20(%rsp)
	jmp	.L15
.L16:
	leaq	.LC1(%rip), %rdi
	call	puts@PLT
	jmp	.L17
.L46:
	movl	%r15d, %r13d
	movl	%r9d, %ebp
	movl	%r10d, %r12d
	movl	%r11d, %r15d
	movl	$1, 20(%rsp)
	jmp	.L14
.L45:
	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"
.LC2:
	.string	"No"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pxor	%xmm0, %xmm0
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	leaq	.LC0(%rip), %r14
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$152, %rsp
	.cfi_def_cfa_offset 208
	movq	%fs:40, %rax
	movq	%rax, 136(%rsp)
	xorl	%eax, %eax
	leaq	48(%rsp), %rbx
	movaps	%xmm0, 96(%rsp)
	leaq	84(%rsp), %rbp
	movl	$0, 128(%rsp)
	movaps	%xmm0, 112(%rsp)
.L2:
	movq	%rbx, %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	leaq	4(%rbx), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	leaq	8(%rbx), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	addq	$12, %rbx
	cmpq	%rbx, %rbp
	jne	.L2
	leaq	40(%rsp), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	40(%rsp), %eax
	testl	%eax, %eax
	jle	.L3
	leaq	44(%rsp), %rax
	xorl	%r11d, %r11d
	xorl	%r10d, %r10d
	xorl	%r9d, %r9d
	movl	$0, 20(%rsp)
	xorl	%r12d, %r12d
	xorl	%r8d, %r8d
	xorl	%ebp, %ebp
	movq	%rax, 24(%rsp)
	xorl	%r13d, %r13d
	xorl	%r15d, %r15d
	xorl	%ecx, %ecx
	movl	$1, %ebx
	.p2align 4,,10
	.p2align 3
.L15:
	movq	24(%rsp), %rsi
	xorl	%eax, %eax
	movq	%r14, %rdi
	movl	%r11d, 16(%rsp)
	movl	%r8d, 12(%rsp)
	movl	%r10d, 8(%rsp)
	movl	%ecx, 4(%rsp)
	movl	%r9d, (%rsp)
	call	__isoc99_scanf@PLT
	movl	(%rsp), %r9d
	movl	44(%rsp), %eax
	cmpl	%eax, 48(%rsp)
	movl	8(%rsp), %r10d
	cmove	%ebx, %r9d
	cmpl	52(%rsp), %eax
	movl	12(%rsp), %r8d
	cmove	%ebx, %r12d
	cmpl	56(%rsp), %eax
	movl	16(%rsp), %r11d
	cmove	%ebx, %r10d
	cmpl	60(%rsp), %eax
	movl	%r9d, 96(%rsp)
	cmove	%ebx, %r8d
	cmpl	64(%rsp), %eax
	movl	%r12d, 100(%rsp)
	cmove	%ebx, %r15d
	cmpl	68(%rsp), %eax
	movl	%r10d, 104(%rsp)
	cmove	%ebx, %ebp
	cmpl	72(%rsp), %eax
	movl	4(%rsp), %ecx
	movl	%r8d, 108(%rsp)
	cmove	%ebx, %r11d
	cmpl	76(%rsp), %eax
	movl	%r15d, 112(%rsp)
	cmove	%ebx, %r13d
	cmpl	80(%rsp), %eax
	movl	%ebp, 116(%rsp)
	movl	%r11d, 120(%rsp)
	movl	%r13d, 124(%rsp)
	je	.L44
	movl	20(%rsp), %eax
	addl	$1, %ecx
	movl	%eax, 128(%rsp)
	cmpl	%ecx, 40(%rsp)
	jg	.L15
	movl	%r15d, %r13d
	movl	%r9d, %ebp
	movl	%r10d, %r12d
	movl	%r11d, %r15d
.L14:
	leal	0(%r13,%rbp), %eax
	addl	20(%rsp), %eax
	cmpl	$3, %eax
	je	.L16
	leal	(%r12,%r13), %eax
	addl	%r15d, %eax
	cmpl	$3, %eax
	je	.L16
.L3:
	movl	96(%rsp), %eax
	movl	100(%rsp), %r8d
	movl	104(%rsp), %edi
	leal	(%r8,%rax), %edx
	addl	%edi, %edx
	cmpl	$3, %edx
	je	.L16
	movl	108(%rsp), %esi
	movl	120(%rsp), %edx
	addl	%esi, %eax
	addl	%edx, %eax
	cmpl	$3, %eax
	je	.L16
	movl	112(%rsp), %ecx
	movl	116(%rsp), %eax
	addl	%ecx, %esi
	addl	%eax, %esi
	cmpl	$3, %esi
	je	.L16
	movl	124(%rsp), %esi
	addl	%r8d, %ecx
	addl	%esi, %ecx
	cmpl	$3, %ecx
	je	.L16
	movl	128(%rsp), %ecx
	addl	%esi, %edx
	addl	%ecx, %edx
	cmpl	$3, %edx
	je	.L16
	addl	%edi, %eax
	addl	%ecx, %eax
	cmpl	$3, %eax
	je	.L16
	leaq	.LC2(%rip), %rdi
	call	puts@PLT
.L17:
	movq	136(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L45
	addq	$152, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L44:
	.cfi_restore_state
	movl	%ebx, 128(%rsp)
	addl	$1, %ecx
	cmpl	40(%rsp), %ecx
	jge	.L46
	movl	$1, 20(%rsp)
	jmp	.L15
.L16:
	leaq	.LC1(%rip), %rdi
	call	puts@PLT
	jmp	.L17
.L46:
	movl	%r15d, %r13d
	movl	%r9d, %ebp
	movl	%r10d, %r12d
	movl	%r11d, %r15d
	movl	$1, 20(%rsp)
	jmp	.L14
.L45:
	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], b[3][3] = {};
  int n, x;
 
  for(int i = 0; i < 3; i++)
  {
    for(int j = 0; j < 3; j++)
	{
      scanf("%d",&a[i][j]);
    }
  }
  
  scanf("%d",&n);
  for(int k = 0; k < n; k++)
  {
    scanf("%d",&x);
    for(int i = 0; i < 3; i++)
	{
      for(int j = 0; j < 3; j++)
	  {
        if(a[i][j] == x)
        {
        	b[i][j] = 1;
		}
      }
    }
  }
 
  if(b[0][0]+b[1][1]+b[2][2] == 3 || b[0][2]+b[1][1]+b[2][0] == 3)
  {
      puts("Yes");
      return 0;
    }
 
  for(int i = 0; i < 3; i++)
  {
      if(b[i][0]+b[i][1]+b[i][2] == 3 || b[0][i]+b[1][i]+b[2][i] == 3)
	  {
        puts("Yes");
        return 0;
      }
    }
 
    puts("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 a[3][3], b[3][3] = {};
  int n, x;
 
  for(int i = 0; i < 3; i++)
  {
    for(int j = 0; j < 3; j++)
	{
      scanf("%d",&a[i][j]);
    }
  }
  
  scanf("%d",&n);
  for(int k = 0; k < n; k++)
  {
    scanf("%d",&x);
    for(int i = 0; i < 3; i++)
	{
      for(int j = 0; j < 3; j++)
	  {
        if(a[i][j] == x)
        {
        	b[i][j] = 1;
		}
      }
    }
  }
 
  if(b[0][0]+b[1][1]+b[2][2] == 3 || b[0][2]+b[1][1]+b[2][0] == 3)
  {
      puts("Yes");
      return 0;
    }
 
  for(int i = 0; i < 3; i++)
  {
      if(b[i][0]+b[i][1]+b[i][2] == 3 || b[0][i]+b[1][i]+b[2][i] == 3)
	  {
        puts("Yes");
        return 0;
      }
    }
 
    puts("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
	addq	$-128, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movq	$0, -48(%rbp)
	movq	$0, -40(%rbp)
	movq	$0, -32(%rbp)
	movq	$0, -24(%rbp)
	movl	$0, -16(%rbp)
	movl	$0, -120(%rbp)
	jmp	.L2
.L5:
	movl	$0, -116(%rbp)
	jmp	.L3
.L4:
	leaq	-96(%rbp), %rcx
	movl	-116(%rbp), %eax
	movslq	%eax, %rsi
	movl	-120(%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, -116(%rbp)
.L3:
	cmpl	$2, -116(%rbp)
	jle	.L4
	addl	$1, -120(%rbp)
.L2:
	cmpl	$2, -120(%rbp)
	jle	.L5
	leaq	-128(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -112(%rbp)
	jmp	.L6
.L12:
	leaq	-124(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -108(%rbp)
	jmp	.L7
.L11:
	movl	$0, -104(%rbp)
	jmp	.L8
.L10:
	movl	-104(%rbp), %eax
	movslq	%eax, %rcx
	movl	-108(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	movl	-96(%rbp,%rax,4), %edx
	movl	-124(%rbp), %eax
	cmpl	%eax, %edx
	jne	.L9
	movl	-104(%rbp), %eax
	movslq	%eax, %rcx
	movl	-108(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	movl	$1, -48(%rbp,%rax,4)
.L9:
	addl	$1, -104(%rbp)
.L8:
	cmpl	$2, -104(%rbp)
	jle	.L10
	addl	$1, -108(%rbp)
.L7:
	cmpl	$2, -108(%rbp)
	jle	.L11
	addl	$1, -112(%rbp)
.L6:
	movl	-128(%rbp), %eax
	cmpl	%eax, -112(%rbp)
	jl	.L12
	movl	-48(%rbp), %edx
	movl	-32(%rbp), %eax
	addl	%eax, %edx
	movl	-16(%rbp), %eax
	addl	%edx, %eax
	cmpl	$3, %eax
	je	.L13
	movl	-40(%rbp), %edx
	movl	-32(%rbp), %eax
	addl	%eax, %edx
	movl	-24(%rbp), %eax
	addl	%edx, %eax
	cmpl	$3, %eax
	jne	.L14
.L13:
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
	jmp	.L20
.L14:
	movl	$0, -100(%rbp)
	jmp	.L16
.L19:
	movl	-100(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rbp, %rax
	subq	$48, %rax
	movl	(%rax), %ecx
	movl	-100(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rbp, %rax
	subq	$44, %rax
	movl	(%rax), %eax
	addl	%eax, %ecx
	movl	-100(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rbp, %rax
	subq	$40, %rax
	movl	(%rax), %eax
	addl	%ecx, %eax
	cmpl	$3, %eax
	je	.L17
	movl	-100(%rbp), %eax
	cltq
	movl	-48(%rbp,%rax,4), %edx
	movl	-100(%rbp), %eax
	cltq
	addq	$3, %rax
	movl	-48(%rbp,%rax,4), %eax
	addl	%eax, %edx
	movl	-100(%rbp), %eax
	cltq
	addq	$6, %rax
	movl	-48(%rbp,%rax,4), %eax
	addl	%edx, %eax
	cmpl	$3, %eax
	jne	.L18
.L17:
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
	jmp	.L20
.L18:
	addl	$1, -100(%rbp)
.L16:
	cmpl	$2, -100(%rbp)
	jle	.L19
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
.L20:
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L21
	call	__stack_chk_fail@PLT
.L21:
	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.
val
	.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
	addq	$-128, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movq	$0, -48(%rbp)
	movq	$0, -40(%rbp)
	movq	$0, -32(%rbp)
	movq	$0, -24(%rbp)
	movl	$0, -16(%rbp)
	movl	$0, -120(%rbp)
	jmp	.L2
.L5:
	movl	$0, -116(%rbp)
	jmp	.L3
.L4:
	leaq	-96(%rbp), %rcx
	movl	-116(%rbp), %eax
	movslq	%eax, %rsi
	movl	-120(%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, -116(%rbp)
.L3:
	cmpl	$2, -116(%rbp)
	jle	.L4
	addl	$1, -120(%rbp)
.L2:
	cmpl	$2, -120(%rbp)
	jle	.L5
	leaq	-128(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -112(%rbp)
	jmp	.L6
.L12:
	leaq	-124(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -108(%rbp)
	jmp	.L7
.L11:
	movl	$0, -104(%rbp)
	jmp	.L8
.L10:
	movl	-104(%rbp), %eax
	movslq	%eax, %rcx
	movl	-108(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	movl	-96(%rbp,%rax,4), %edx
	movl	-124(%rbp), %eax
	cmpl	%eax, %edx
	jne	.L9
	movl	-104(%rbp), %eax
	movslq	%eax, %rcx
	movl	-108(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	movl	$1, -48(%rbp,%rax,4)
.L9:
	addl	$1, -104(%rbp)
.L8:
	cmpl	$2, -104(%rbp)
	jle	.L10
	addl	$1, -108(%rbp)
.L7:
	cmpl	$2, -108(%rbp)
	jle	.L11
	addl	$1, -112(%rbp)
.L6:
	movl	-128(%rbp), %eax
	cmpl	%eax, -112(%rbp)
	jl	.L12
	movl	-48(%rbp), %edx
	movl	-32(%rbp), %eax
	addl	%eax, %edx
	movl	-16(%rbp), %eax
	addl	%edx, %eax
	cmpl	$3, %eax
	je	.L13
	movl	-40(%rbp), %edx
	movl	-32(%rbp), %eax
	addl	%eax, %edx
	movl	-24(%rbp), %eax
	addl	%edx, %eax
	cmpl	$3, %eax
	jne	.L14
.L13:
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
	jmp	.L20
.L14:
	movl	$0, -100(%rbp)
	jmp	.L16
.L19:
	movl	-100(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rbp, %rax
	subq	$48, %rax
	movl	(%rax), %ecx
	movl	-100(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rbp, %rax
	subq	$44, %rax
	movl	(%rax), %eax
	addl	%eax, %ecx
	movl	-100(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rbp, %rax
	subq	$40, %rax
	movl	(%rax), %eax
	addl	%ecx, %eax
	cmpl	$3, %eax
	je	.L17
	movl	-100(%rbp), %eax
	cltq
	movl	-48(%rbp,%rax,4), %edx
	movl	-100(%rbp), %eax
	cltq
	addq	$3, %rax
	movl	-48(%rbp,%rax,4), %eax
	addl	%eax, %edx
	movl	-100(%rbp), %eax
	cltq
	addq	$6, %rax
	movl	-48(%rbp,%rax,4), %eax
	addl	%edx, %eax
	cmpl	$3, %eax
	jne	.L18
.L17:
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
	jmp	.L20
.L18:
	addl	$1, -100(%rbp)
.L16:
	cmpl	$2, -100(%rbp)
	jle	.L19
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
.L20:
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L21
	call	__stack_chk_fail@PLT
.L21:
	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:
