Given the following C code and unoptimized assembly code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
w,h,X,Y,C,t,b,d[9][9],q[9][9],a[]={-1,0,1,0};Z(x,y){int i=0,s=1;if(q[y][x])return 0;q[y][x]=1;if(d[y][x])return y==Y&&x==X;for(;i<4;)s+=Z(x+a[i%4],y+a[i++]);return s;}B(x,y,c){int i=0;if(!(c||x-X||y-Y))return 1;memset(q,0,324);if(d[y][x]||Z(x,y)!=c+(x-X||y-Y))return 0;if(b++>95000)return 2;for(d[y][x]=1;i<4;)if(t=B(x+a[i%4],y+a[i++],c-1))return t;return d[y][x]=0;}main(i,j){for(;C=b=j=0,memset(d,-1,324),scanf("%d%d\n",&w,&h),h;puts(C<4||B(X,Y,C)-1?"No":"Yes"))for(;j++<h;)for(i=0;i++<w;)scanf("%d",&t),(d[j][i]=t)||(++C,X=i,Y=j);exit(0);}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	w
	.bss
	.align 4
	.type	w, @object
	.size	w, 4
w:
	.zero	4
	.globl	h
	.align 4
	.type	h, @object
	.size	h, 4
h:
	.zero	4
	.globl	X
	.align 4
	.type	X, @object
	.size	X, 4
X:
	.zero	4
	.globl	Y
	.align 4
	.type	Y, @object
	.size	Y, 4
Y:
	.zero	4
	.globl	C
	.align 4
	.type	C, @object
	.size	C, 4
C:
	.zero	4
	.globl	t
	.align 4
	.type	t, @object
	.size	t, 4
t:
	.zero	4
	.globl	b
	.align 4
	.type	b, @object
	.size	b, 4
b:
	.zero	4
	.globl	d
	.align 32
	.type	d, @object
	.size	d, 324
d:
	.zero	324
	.globl	q
	.align 32
	.type	q, @object
	.size	q, 324
q:
	.zero	324
	.globl	a
	.data
	.align 16
	.type	a, @object
	.size	a, 16
a:
	.long	-1
	.long	0
	.long	1
	.long	0
	.text
	.globl	Z
	.type	Z, @function
Z:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movl	%edi, -20(%rbp)
	movl	%esi, -24(%rbp)
	movl	$0, -8(%rbp)
	movl	$1, -4(%rbp)
	movl	-20(%rbp), %eax
	movslq	%eax, %rcx
	movl	-24(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$3, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	q(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	je	.L2
	movl	$0, %eax
	jmp	.L3
.L2:
	movl	-20(%rbp), %eax
	movslq	%eax, %rcx
	movl	-24(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$3, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	q(%rip), %rax
	movl	$1, (%rdx,%rax)
	movl	-20(%rbp), %eax
	movslq	%eax, %rcx
	movl	-24(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$3, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	d(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	je	.L7
	movl	Y(%rip), %eax
	cmpl	%eax, -24(%rbp)
	jne	.L5
	movl	X(%rip), %eax
	cmpl	%eax, -20(%rbp)
	jne	.L5
	movl	$1, %eax
	jmp	.L3
.L5:
	movl	$0, %eax
	jmp	.L3
.L8:
	movl	-8(%rbp), %eax
	leal	1(%rax), %edx
	movl	%edx, -8(%rbp)
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-24(%rbp), %eax
	addl	%eax, %edx
	movl	-8(%rbp), %eax
	movl	%eax, %ecx
	sarl	$31, %ecx
	shrl	$30, %ecx
	addl	%ecx, %eax
	andl	$3, %eax
	subl	%ecx, %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	a(%rip), %rax
	movl	(%rcx,%rax), %ecx
	movl	-20(%rbp), %eax
	addl	%ecx, %eax
	movl	%edx, %esi
	movl	%eax, %edi
	movl	$0, %eax
	call	Z
	addl	%eax, -4(%rbp)
.L7:
	cmpl	$3, -8(%rbp)
	jle	.L8
	movl	-4(%rbp), %eax
.L3:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	Z, .-Z
	.globl	B
	.type	B, @function
B:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movl	%edi, -20(%rbp)
	movl	%esi, -24(%rbp)
	movl	%edx, -28(%rbp)
	movl	$0, -4(%rbp)
	cmpl	$0, -28(%rbp)
	jne	.L10
	movl	X(%rip), %eax
	cmpl	%eax, -20(%rbp)
	jne	.L10
	movl	Y(%rip), %eax
	cmpl	%eax, -24(%rbp)
	jne	.L10
	movl	$1, %eax
	jmp	.L11
.L10:
	movl	$324, %edx
	movl	$0, %esi
	leaq	q(%rip), %rax
	movq	%rax, %rdi
	call	memset@PLT
	movl	-20(%rbp), %eax
	movslq	%eax, %rcx
	movl	-24(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$3, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	d(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	jne	.L12
	movl	-24(%rbp), %edx
	movl	-20(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	movl	$0, %eax
	call	Z
	movl	X(%rip), %edx
	cmpl	%edx, -20(%rbp)
	jne	.L13
	movl	Y(%rip), %edx
	cmpl	%edx, -24(%rbp)
	je	.L14
.L13:
	movl	$1, %ecx
	jmp	.L15
.L14:
	movl	$0, %ecx
.L15:
	movl	-28(%rbp), %edx
	addl	%ecx, %edx
	cmpl	%edx, %eax
	je	.L16
.L12:
	movl	$0, %eax
	jmp	.L11
.L16:
	movl	b(%rip), %eax
	leal	1(%rax), %edx
	movl	%edx, b(%rip)
	cmpl	$95000, %eax
	jle	.L17
	movl	$2, %eax
	jmp	.L11
.L17:
	movl	-20(%rbp), %eax
	movslq	%eax, %rcx
	movl	-24(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$3, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	d(%rip), %rax
	movl	$1, (%rdx,%rax)
	jmp	.L18
.L19:
	movl	-28(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-4(%rbp), %eax
	leal	1(%rax), %ecx
	movl	%ecx, -4(%rbp)
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	a(%rip), %rax
	movl	(%rcx,%rax), %ecx
	movl	-24(%rbp), %eax
	addl	%eax, %ecx
	movl	-4(%rbp), %eax
	movl	%eax, %esi
	sarl	$31, %esi
	shrl	$30, %esi
	addl	%esi, %eax
	andl	$3, %eax
	subl	%esi, %eax
	cltq
	leaq	0(,%rax,4), %rsi
	leaq	a(%rip), %rax
	movl	(%rsi,%rax), %esi
	movl	-20(%rbp), %eax
	addl	%esi, %eax
	movl	%ecx, %esi
	movl	%eax, %edi
	movl	$0, %eax
	call	B
	movl	%eax, t(%rip)
	movl	t(%rip), %eax
	testl	%eax, %eax
	je	.L18
	movl	t(%rip), %eax
	jmp	.L11
.L18:
	cmpl	$3, -4(%rbp)
	jle	.L19
	movl	-20(%rbp), %eax
	movslq	%eax, %rcx
	movl	-24(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$3, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	d(%rip), %rax
	movl	$0, (%rdx,%rax)
	movl	-20(%rbp), %eax
	movslq	%eax, %rcx
	movl	-24(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$3, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	d(%rip), %rax
	movl	(%rdx,%rax), %eax
.L11:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	B, .-B
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"No"
.LC2:
	.string	"Yes"
.LC3:
	.string	"%d%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB2:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	movl	%edi, -4(%rbp)
	movl	%esi, -8(%rbp)
	jmp	.L21
.L27:
	movl	$0, -4(%rbp)
	jmp	.L23
.L26:
	leaq	t(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	scanf@PLT
	movl	t(%rip), %edx
	movl	-4(%rbp), %eax
	movslq	%eax, %rsi
	movl	-8(%rbp), %eax
	movslq	%eax, %rcx
	movq	%rcx, %rax
	salq	$3, %rax
	addq	%rcx, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,4), %rcx
	leaq	d(%rip), %rax
	movl	%edx, (%rcx,%rax)
	movl	-4(%rbp), %eax
	movslq	%eax, %rcx
	movl	-8(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$3, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	d(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	jne	.L23
	movl	C(%rip), %eax
	addl	$1, %eax
	movl	%eax, C(%rip)
	movl	-4(%rbp), %eax
	movl	%eax, X(%rip)
	movl	-8(%rbp), %eax
	movl	%eax, Y(%rip)
	movl	Y(%rip), %eax
	testl	%eax, %eax
.L23:
	movl	-4(%rbp), %eax
	leal	1(%rax), %edx
	movl	%edx, -4(%rbp)
	movl	w(%rip), %edx
	cmpl	%edx, %eax
	jl	.L26
.L22:
	movl	-8(%rbp), %eax
	leal	1(%rax), %edx
	movl	%edx, -8(%rbp)
	movl	h(%rip), %edx
	cmpl	%edx, %eax
	jl	.L27
	movl	C(%rip), %eax
	cmpl	$3, %eax
	jle	.L28
	movl	C(%rip), %edx
	movl	Y(%rip), %ecx
	movl	X(%rip), %eax
	movl	%ecx, %esi
	movl	%eax, %edi
	movl	$0, %eax
	call	B
	cmpl	$1, %eax
	je	.L29
.L28:
	leaq	.LC1(%rip), %rax
	jmp	.L30
.L29:
	leaq	.LC2(%rip), %rax
.L30:
	movq	%rax, %rdi
	call	puts@PLT
.L21:
	movl	$0, -8(%rbp)
	movl	-8(%rbp), %eax
	movl	%eax, b(%rip)
	movl	b(%rip), %eax
	movl	%eax, C(%rip)
	movl	$324, %edx
	movl	$-1, %esi
	leaq	d(%rip), %rax
	movq	%rax, %rdi
	call	memset@PLT
	leaq	h(%rip), %rax
	movq	%rax, %rdx
	leaq	w(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	scanf@PLT
	movl	h(%rip), %eax
	testl	%eax, %eax
	jne	.L22
	movl	$0, %edi
	call	exit@PLT
	.cfi_endproc
.LFE2:
	.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
	.p2align 4
	.globl	Z
	.type	Z, @function
Z:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movslq	%esi, %rax
	movslq	%edi, %rdx
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	leaq	(%rax,%rax,8), %rax
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	addq	%rdx, %rax
	leaq	q(%rip), %r13
	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	$184, %rsp
	.cfi_def_cfa_offset 240
	movl	0(%r13,%rax,4), %r9d
	movl	%edi, 168(%rsp)
	movl	%esi, 172(%rsp)
	testl	%r9d, %r9d
	jne	.L2
	movl	$1, 0(%r13,%rax,4)
	leaq	d(%rip), %rcx
	movl	(%rcx,%rax,4), %r8d
	testl	%r8d, %r8d
	jne	.L52
	movq	$1, 136(%rsp)
	leaq	-4+a(%rip), %r14
	movl	$1, 164(%rsp)
	leaq	4(%r14), %r15
.L3:
	movq	136(%rsp), %rax
	movl	172(%rsp), %esi
	movl	168(%rsp), %ebx
	addl	(%r14,%rax,4), %esi
	andl	$3, %eax
	addl	(%r15,%rax,4), %ebx
	movslq	%esi, %rax
	movl	%esi, 152(%rsp)
	movslq	%ebx, %rdx
	leaq	(%rax,%rax,8), %rax
	movl	%ebx, 156(%rsp)
	addq	%rdx, %rax
	movl	0(%r13,%rax,4), %edi
	testl	%edi, %edi
	jne	.L5
	movl	$1, 0(%r13,%rax,4)
	leaq	d(%rip), %rcx
	movq	$1, 120(%rsp)
	movl	(%rcx,%rax,4), %ecx
	movl	$1, 160(%rsp)
	testl	%ecx, %ecx
	jne	.L53
.L6:
	movq	120(%rsp), %rax
	movl	152(%rsp), %ebx
	movl	156(%rsp), %ecx
	addl	(%r14,%rax,4), %ebx
	andl	$3, %eax
	addl	(%r15,%rax,4), %ecx
	movslq	%ebx, %rax
	movl	%ebx, 132(%rsp)
	movslq	%ecx, %rdx
	leaq	(%rax,%rax,8), %rax
	movl	%ecx, 144(%rsp)
	addq	%rdx, %rax
	movl	0(%r13,%rax,4), %edx
	testl	%edx, %edx
	jne	.L7
	movl	$1, 0(%r13,%rax,4)
	leaq	d(%rip), %rdi
	movq	$1, 96(%rsp)
	movl	(%rdi,%rax,4), %eax
	movl	$1, 148(%rsp)
	testl	%eax, %eax
	jne	.L54
.L8:
	movq	96(%rsp), %rax
	movl	132(%rsp), %ecx
	movl	144(%rsp), %edi
	addl	(%r14,%rax,4), %ecx
	andl	$3, %eax
	addl	(%r15,%rax,4), %edi
	movslq	%ecx, %rax
	movl	%ecx, 112(%rsp)
	movslq	%edi, %rdx
	leaq	(%rax,%rax,8), %rax
	movl	%edi, 116(%rsp)
	addq	%rdx, %rax
	movl	0(%r13,%rax,4), %r12d
	testl	%r12d, %r12d
	jne	.L9
	movl	$1, 0(%r13,%rax,4)
	leaq	d(%rip), %rcx
	movq	$1, 80(%rsp)
	movl	(%rcx,%rax,4), %ebp
	movl	$1, 128(%rsp)
	testl	%ebp, %ebp
	jne	.L55
.L10:
	movq	80(%rsp), %rax
	movl	112(%rsp), %edi
	movl	116(%rsp), %ecx
	addl	(%r14,%rax,4), %edi
	andl	$3, %eax
	addl	(%r15,%rax,4), %ecx
	movslq	%edi, %rax
	movl	%edi, 92(%rsp)
	movslq	%ecx, %rdx
	leaq	(%rax,%rax,8), %rax
	movl	%ecx, 104(%rsp)
	addq	%rdx, %rax
	movl	0(%r13,%rax,4), %ebx
	testl	%ebx, %ebx
	jne	.L11
	leaq	d(%rip), %rdi
	movl	$1, 108(%rsp)
	movl	$1, 0(%r13,%rax,4)
	movl	(%rdi,%rax,4), %r11d
	movq	$1, 56(%rsp)
	testl	%r11d, %r11d
	jne	.L56
.L12:
	movq	56(%rsp), %rax
	movl	92(%rsp), %ecx
	movl	104(%rsp), %esi
	addl	(%r14,%rax,4), %ecx
	andl	$3, %eax
	addl	(%r15,%rax,4), %esi
	movslq	%ecx, %rax
	movl	%ecx, 72(%rsp)
	movslq	%esi, %rdx
	leaq	(%rax,%rax,8), %rax
	movl	%esi, 76(%rsp)
	addq	%rdx, %rax
	movl	0(%r13,%rax,4), %r10d
	testl	%r10d, %r10d
	jne	.L13
	leaq	d(%rip), %rsi
	movl	$1, 88(%rsp)
	movl	$1, 0(%r13,%rax,4)
	movl	(%rsi,%rax,4), %r9d
	movq	$1, 32(%rsp)
	testl	%r9d, %r9d
	jne	.L57
.L14:
	movq	32(%rsp), %rax
	movl	72(%rsp), %ecx
	movl	76(%rsp), %edx
	addl	(%r14,%rax,4), %ecx
	andl	$3, %eax
	addl	(%r15,%rax,4), %edx
	movslq	%ecx, %rax
	movl	%ecx, 44(%rsp)
	movl	%edx, 64(%rsp)
	leaq	(%rax,%rax,8), %rax
	movslq	%edx, %rdx
	addq	%rdx, %rax
	movl	0(%r13,%rax,4), %r8d
	testl	%r8d, %r8d
	jne	.L15
	leaq	d(%rip), %rcx
	movl	$1, 68(%rsp)
	movl	$1, 0(%r13,%rax,4)
	movl	(%rcx,%rax,4), %edi
	movq	$1, 8(%rsp)
	testl	%edi, %edi
	jne	.L58
.L16:
	movq	8(%rsp), %rax
	movl	44(%rsp), %ecx
	movl	64(%rsp), %edx
	addl	(%r14,%rax,4), %ecx
	andl	$3, %eax
	addl	(%r15,%rax,4), %edx
	movslq	%ecx, %rax
	movl	%ecx, 24(%rsp)
	movl	%edx, 28(%rsp)
	leaq	(%rax,%rax,8), %rax
	movslq	%edx, %rdx
	addq	%rdx, %rax
	movl	0(%r13,%rax,4), %esi
	testl	%esi, %esi
	jne	.L17
	leaq	d(%rip), %rcx
	movl	$1, %r12d
	movl	$1, 0(%r13,%rax,4)
	movl	(%rcx,%rax,4), %ecx
	movl	$1, 40(%rsp)
	movq	%r12, %rbx
	testl	%ecx, %ecx
	jne	.L59
.L18:
	movq	%rbx, %rax
	movl	24(%rsp), %r8d
	addl	(%r14,%rbx,4), %r8d
	andl	$3, %eax
	movl	28(%rsp), %r12d
	addl	(%r15,%rax,4), %r12d
	movslq	%r8d, %rax
	movslq	%r12d, %rdx
	leaq	(%rax,%rax,8), %rax
	addq	%rdx, %rax
	movl	0(%r13,%rax,4), %edx
	testl	%edx, %edx
	jne	.L19
	leaq	d(%rip), %rcx
	movl	$1, %edx
	movl	$1, %ebp
	movl	$1, 0(%r13,%rax,4)
	movl	(%rcx,%rax,4), %eax
	testl	%eax, %eax
	jne	.L60
	movl	%r12d, 20(%rsp)
	movl	%r8d, %r12d
	movq	%rbx, 48(%rsp)
	movq	%rdx, %rbx
.L20:
	movl	(%r14,%rbx,4), %esi
	movq	%rbx, %rax
	movl	20(%rsp), %edi
	addq	$1, %rbx
	andl	$3, %eax
	addl	(%r15,%rax,4), %edi
	addl	%r12d, %esi
	xorl	%eax, %eax
	call	Z
	addl	%eax, %ebp
	cmpq	$5, %rbx
	jne	.L20
	addl	%ebp, 40(%rsp)
	movq	48(%rsp), %rbx
.L19:
	addq	$1, %rbx
	cmpq	$5, %rbx
	jne	.L18
	movl	40(%rsp), %edi
	addl	%edi, 68(%rsp)
.L17:
	addq	$1, 8(%rsp)
	movq	8(%rsp), %rax
	cmpq	$5, %rax
	jne	.L16
	movl	68(%rsp), %edi
	addl	%edi, 88(%rsp)
.L15:
	addq	$1, 32(%rsp)
	movq	32(%rsp), %rax
	cmpq	$5, %rax
	jne	.L14
	movl	88(%rsp), %esi
	addl	%esi, 108(%rsp)
.L13:
	addq	$1, 56(%rsp)
	movq	56(%rsp), %rax
	cmpq	$5, %rax
	jne	.L12
	movl	108(%rsp), %edi
	addl	%edi, 128(%rsp)
.L11:
	addq	$1, 80(%rsp)
	movq	80(%rsp), %rax
	cmpq	$5, %rax
	jne	.L10
	movl	128(%rsp), %esi
	addl	%esi, 148(%rsp)
.L9:
	addq	$1, 96(%rsp)
	movq	96(%rsp), %rax
	cmpq	$5, %rax
	jne	.L8
	movl	148(%rsp), %edx
	addl	%edx, 160(%rsp)
.L7:
	addq	$1, 120(%rsp)
	movq	120(%rsp), %rax
	cmpq	$5, %rax
	jne	.L6
	movl	160(%rsp), %ebx
	addl	%ebx, 164(%rsp)
.L5:
	addq	$1, 136(%rsp)
	movq	136(%rsp), %rax
	cmpq	$5, %rax
	jne	.L3
	jmp	.L1
.L52:
	cmpl	Y(%rip), %esi
	je	.L61
.L2:
	movl	$0, 164(%rsp)
.L1:
	movl	164(%rsp), %eax
	addq	$184, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	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
.L60:
	.cfi_restore_state
	cmpl	Y(%rip), %r8d
	jne	.L19
	xorl	%eax, %eax
	cmpl	X(%rip), %r12d
	sete	%al
	addl	%eax, 40(%rsp)
	jmp	.L19
	.p2align 4,,10
	.p2align 3
.L59:
	movl	24(%rsp), %eax
	cmpl	Y(%rip), %eax
	jne	.L17
	movl	28(%rsp), %eax
	cmpl	X(%rip), %eax
	sete	%al
	movzbl	%al, %eax
	addl	%eax, 68(%rsp)
	jmp	.L17
	.p2align 4,,10
	.p2align 3
.L58:
	movl	44(%rsp), %eax
	cmpl	Y(%rip), %eax
	jne	.L15
	movl	64(%rsp), %eax
	cmpl	X(%rip), %eax
	sete	%al
	movzbl	%al, %eax
	addl	%eax, 88(%rsp)
	jmp	.L15
	.p2align 4,,10
	.p2align 3
.L57:
	cmpl	Y(%rip), %ecx
	jne	.L13
	movl	76(%rsp), %eax
	cmpl	X(%rip), %eax
	sete	%al
	movzbl	%al, %eax
	addl	%eax, 108(%rsp)
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L56:
	movl	92(%rsp), %eax
	cmpl	Y(%rip), %eax
	jne	.L11
	cmpl	X(%rip), %ecx
	sete	%al
	movzbl	%al, %eax
	addl	%eax, 128(%rsp)
	jmp	.L11
.L55:
	movl	112(%rsp), %eax
	cmpl	Y(%rip), %eax
	jne	.L9
	cmpl	X(%rip), %edi
	sete	%al
	movzbl	%al, %eax
	addl	%eax, 148(%rsp)
	jmp	.L9
.L54:
	cmpl	Y(%rip), %ebx
	jne	.L7
	cmpl	X(%rip), %ecx
	sete	%al
	movzbl	%al, %eax
	addl	%eax, 160(%rsp)
	jmp	.L7
.L53:
	cmpl	Y(%rip), %esi
	jne	.L5
	cmpl	X(%rip), %ebx
	sete	%al
	movzbl	%al, %eax
	addl	%eax, 164(%rsp)
	jmp	.L5
.L61:
	cmpl	X(%rip), %edi
	movl	$1, 164(%rsp)
	jne	.L2
	jmp	.L1
	.cfi_endproc
.LFE0:
	.size	Z, .-Z
	.p2align 4
	.globl	B
	.type	B, @function
B:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	movl	%esi, %r12d
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	movl	%edx, %ebp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	movl	%edi, %ebx
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	testl	%edx, %edx
	jne	.L63
	cmpl	%edi, X(%rip)
	je	.L74
.L63:
	leaq	q(%rip), %rdx
	xorl	%eax, %eax
	movslq	%r12d, %r15
	movslq	%ebx, %r14
	movl	$40, %ecx
	movq	%rdx, %rdi
	leaq	d(%rip), %r13
	rep stosq
	leaq	(%r15,%r15,8), %rax
	addq	%r14, %rax
	movl	0(%r13,%rax,4), %eax
	movl	$0, (%rdi)
	testl	%eax, %eax
	je	.L65
.L67:
	xorl	%eax, %eax
.L62:
	addq	$24, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	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
.L65:
	.cfi_restore_state
	xorl	%eax, %eax
	movl	%r12d, %esi
	movl	%ebx, %edi
	call	Z
	cmpl	%ebx, X(%rip)
	movl	$1, %edx
	jne	.L66
	xorl	%edx, %edx
	cmpl	%r12d, Y(%rip)
	setne	%dl
.L66:
	addl	%ebp, %edx
	cmpl	%edx, %eax
	jne	.L67
	movl	b(%rip), %edx
	leal	1(%rdx), %eax
	movl	%eax, b(%rip)
	movl	$2, %eax
	cmpl	$95000, %edx
	jg	.L62
	leaq	(%r15,%r15,8), %rax
	addq	%r14, %rax
	movl	$1, 0(%r13,%rax,4)
	leal	-1(%rbp), %eax
	movl	$1, %ebp
	movl	%eax, 12(%rsp)
.L68:
	leaq	-4+a(%rip), %rax
	leaq	a(%rip), %rcx
	movl	12(%rsp), %edx
	movl	(%rax,%rbp,4), %esi
	movq	%rbp, %rax
	andl	$3, %eax
	movl	(%rcx,%rax,4), %edi
	addl	%r12d, %esi
	xorl	%eax, %eax
	addl	%ebx, %edi
	call	B
	movl	%eax, t(%rip)
	testl	%eax, %eax
	jne	.L62
	addq	$1, %rbp
	cmpq	$5, %rbp
	jne	.L68
	leaq	(%r15,%r15,8), %rdx
	addq	%r14, %rdx
	movl	$0, 0(%r13,%rdx,4)
	addq	$24, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	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
.L74:
	.cfi_restore_state
	cmpl	%esi, Y(%rip)
	movl	$1, %eax
	jne	.L63
	jmp	.L62
	.cfi_endproc
.LFE1:
	.size	B, .-B
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"No"
.LC1:
	.string	"Yes"
.LC2:
	.string	"%d"
.LC3:
	.string	"%d%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB2:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	h(%rip), %r15
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	leaq	t(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	leaq	.LC2(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$8, %rsp
	.cfi_def_cfa_offset 64
	.p2align 4,,10
	.p2align 3
.L76:
	movq	$-1, %rax
	movl	$40, %ecx
	movq	%r15, %rdx
	movl	$0, b(%rip)
	leaq	d(%rip), %rdi
	leaq	w(%rip), %rsi
	movl	$0, C(%rip)
	rep stosq
	xorl	%eax, %eax
	movl	$-1, (%rdi)
	leaq	.LC3(%rip), %rdi
	call	scanf@PLT
	movl	h(%rip), %eax
	testl	%eax, %eax
	je	.L86
	jle	.L82
	movl	w(%rip), %eax
	leaq	36+d(%rip), %rbx
	movl	$1, %r13d
	testl	%eax, %eax
	jle	.L82
	.p2align 4,,10
	.p2align 3
.L88:
	movl	$1, %r14d
	.p2align 4,,10
	.p2align 3
.L80:
	movq	%r12, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	scanf@PLT
	movl	t(%rip), %eax
	movl	%eax, (%rbx,%r14,4)
	testl	%eax, %eax
	jne	.L77
	movl	%r14d, X(%rip)
	movl	w(%rip), %eax
	addq	$1, %r14
	leal	-1(%r14), %ecx
	addl	$1, C(%rip)
	movl	%r13d, Y(%rip)
	cmpl	%eax, %ecx
	jl	.L80
.L79:
	cmpl	%r13d, h(%rip)
	jle	.L82
	addl	$1, %r13d
	addq	$36, %rbx
	testl	%eax, %eax
	jg	.L88
.L82:
	movl	C(%rip), %edx
	cmpl	$3, %edx
	jg	.L83
.L85:
	leaq	.LC0(%rip), %rdi
.L84:
	call	puts@PLT
	jmp	.L76
	.p2align 4,,10
	.p2align 3
.L77:
	addq	$1, %r14
	movl	w(%rip), %eax
	leal	-1(%r14), %ecx
	cmpl	%ecx, %eax
	jg	.L80
	jmp	.L79
.L83:
	movl	Y(%rip), %esi
	movl	X(%rip), %edi
	xorl	%eax, %eax
	call	B
	cmpl	$1, %eax
	jne	.L85
	leaq	.LC1(%rip), %rdi
	jmp	.L84
.L86:
	xorl	%edi, %edi
	call	exit@PLT
	.cfi_endproc
.LFE2:
	.size	main, .-main
	.globl	a
	.data
	.align 16
	.type	a, @object
	.size	a, 16
a:
	.long	-1
	.long	0
	.long	1
	.long	0
	.globl	q
	.bss
	.align 32
	.type	q, @object
	.size	q, 324
q:
	.zero	324
	.globl	d
	.align 32
	.type	d, @object
	.size	d, 324
d:
	.zero	324
	.globl	b
	.align 4
	.type	b, @object
	.size	b, 4
b:
	.zero	4
	.globl	t
	.align 4
	.type	t, @object
	.size	t, 4
t:
	.zero	4
	.globl	C
	.align 4
	.type	C, @object
	.size	C, 4
C:
	.zero	4
	.globl	Y
	.align 4
	.type	Y, @object
	.size	Y, 4
Y:
	.zero	4
	.globl	X
	.align 4
	.type	X, @object
	.size	X, 4
X:
	.zero	4
	.globl	h
	.align 4
	.type	h, @object
	.size	h, 4
h:
	.zero	4
	.globl	w
	.align 4
	.type	w, @object
	.size	w, 4
w:
	.zero	4
	.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
	.p2align 4
	.globl	Z
	.type	Z, @function
Z:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movslq	%esi, %rax
	movslq	%edi, %rdx
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	leaq	(%rax,%rax,8), %rax
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	addq	%rdx, %rax
	leaq	q(%rip), %r13
	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	$184, %rsp
	.cfi_def_cfa_offset 240
	movl	0(%r13,%rax,4), %r9d
	movl	%edi, 168(%rsp)
	movl	%esi, 172(%rsp)
	testl	%r9d, %r9d
	jne	.L2
	movl	$1, 0(%r13,%rax,4)
	leaq	d(%rip), %rcx
	movl	(%rcx,%rax,4), %r8d
	testl	%r8d, %r8d
	jne	.L52
	movq	$1, 136(%rsp)
	leaq	-4+a(%rip), %r14
	movl	$1, 164(%rsp)
	leaq	4(%r14), %r15
.L3:
	movq	136(%rsp), %rax
	movl	172(%rsp), %esi
	movl	168(%rsp), %ebx
	addl	(%r14,%rax,4), %esi
	andl	$3, %eax
	addl	(%r15,%rax,4), %ebx
	movslq	%esi, %rax
	movl	%esi, 152(%rsp)
	movslq	%ebx, %rdx
	leaq	(%rax,%rax,8), %rax
	movl	%ebx, 156(%rsp)
	addq	%rdx, %rax
	movl	0(%r13,%rax,4), %edi
	testl	%edi, %edi
	jne	.L5
	movl	$1, 0(%r13,%rax,4)
	leaq	d(%rip), %rcx
	movq	$1, 120(%rsp)
	movl	(%rcx,%rax,4), %ecx
	movl	$1, 160(%rsp)
	testl	%ecx, %ecx
	jne	.L53
.L6:
	movq	120(%rsp), %rax
	movl	152(%rsp), %ebx
	movl	156(%rsp), %ecx
	addl	(%r14,%rax,4), %ebx
	andl	$3, %eax
	addl	(%r15,%rax,4), %ecx
	movslq	%ebx, %rax
	movl	%ebx, 132(%rsp)
	movslq	%ecx, %rdx
	leaq	(%rax,%rax,8), %rax
	movl	%ecx, 144(%rsp)
	addq	%rdx, %rax
	movl	0(%r13,%rax,4), %edx
	testl	%edx, %edx
	jne	.L7
	movl	$1, 0(%r13,%rax,4)
	leaq	d(%rip), %rdi
	movq	$1, 96(%rsp)
	movl	(%rdi,%rax,4), %eax
	movl	$1, 148(%rsp)
	testl	%eax, %eax
	jne	.L54
.L8:
	movq	96(%rsp), %rax
	movl	132(%rsp), %ecx
	movl	144(%rsp), %edi
	addl	(%r14,%rax,4), %ecx
	andl	$3, %eax
	addl	(%r15,%rax,4), %edi
	movslq	%ecx, %rax
	movl	%ecx, 112(%rsp)
	movslq	%edi, %rdx
	leaq	(%rax,%rax,8), %rax
	movl	%edi, 116(%rsp)
	addq	%rdx, %rax
	movl	0(%r13,%rax,4), %r12d
	testl	%r12d, %r12d
	jne	.L9
	movl	$1, 0(%r13,%rax,4)
	leaq	d(%rip), %rcx
	movq	$1, 80(%rsp)
	movl	(%rcx,%rax,4), %ebp
	movl	$1, 128(%rsp)
	testl	%ebp, %ebp
	jne	.L55
.L10:
	movq	80(%rsp), %rax
	movl	112(%rsp), %edi
	movl	116(%rsp), %ecx
	addl	(%r14,%rax,4), %edi
	andl	$3, %eax
	addl	(%r15,%rax,4), %ecx
	movslq	%edi, %rax
	movl	%edi, 92(%rsp)
	movslq	%ecx, %rdx
	leaq	(%rax,%rax,8), %rax
	movl	%ecx, 104(%rsp)
	addq	%rdx, %rax
	movl	0(%r13,%rax,4), %ebx
	testl	%ebx, %ebx
	jne	.L11
	leaq	d(%rip), %rdi
	movl	$1, 108(%rsp)
	movl	$1, 0(%r13,%rax,4)
	movl	(%rdi,%rax,4), %r11d
	movq	$1, 56(%rsp)
	testl	%r11d, %r11d
	jne	.L56
.L12:
	movq	56(%rsp), %rax
	movl	92(%rsp), %ecx
	movl	104(%rsp), %esi
	addl	(%r14,%rax,4), %ecx
	andl	$3, %eax
	addl	(%r15,%rax,4), %esi
	movslq	%ecx, %rax
	movl	%ecx, 72(%rsp)
	movslq	%esi, %rdx
	leaq	(%rax,%rax,8), %rax
	movl	%esi, 76(%rsp)
	addq	%rdx, %rax
	movl	0(%r13,%rax,4), %r10d
	testl	%r10d, %r10d
	jne	.L13
	leaq	d(%rip), %rsi
	movl	$1, 88(%rsp)
	movl	$1, 0(%r13,%rax,4)
	movl	(%rsi,%rax,4), %r9d
	movq	$1, 32(%rsp)
	testl	%r9d, %r9d
	jne	.L57
.L14:
	movq	32(%rsp), %rax
	movl	72(%rsp), %ecx
	movl	76(%rsp), %edx
	addl	(%r14,%rax,4), %ecx
	andl	$3, %eax
	addl	(%r15,%rax,4), %edx
	movslq	%ecx, %rax
	movl	%ecx, 44(%rsp)
	movl	%edx, 64(%rsp)
	leaq	(%rax,%rax,8), %rax
	movslq	%edx, %rdx
	addq	%rdx, %rax
	movl	0(%r13,%rax,4), %r8d
	testl	%r8d, %r8d
	jne	.L15
	leaq	d(%rip), %rcx
	movl	$1, 68(%rsp)
	movl	$1, 0(%r13,%rax,4)
	movl	(%rcx,%rax,4), %edi
	movq	$1, 8(%rsp)
	testl	%edi, %edi
	jne	.L58
.L16:
	movq	8(%rsp), %rax
	movl	44(%rsp), %ecx
	movl	64(%rsp), %edx
	addl	(%r14,%rax,4), %ecx
	andl	$3, %eax
	addl	(%r15,%rax,4), %edx
	movslq	%ecx, %rax
	movl	%ecx, 24(%rsp)
	movl	%edx, 28(%rsp)
	leaq	(%rax,%rax,8), %rax
	movslq	%edx, %rdx
	addq	%rdx, %rax
	movl	0(%r13,%rax,4), %esi
	testl	%esi, %esi
	jne	.L17
	leaq	d(%rip), %rcx
	movl	$1, %r12d
	movl	$1, 0(%r13,%rax,4)
	movl	(%rcx,%rax,4), %ecx
	movl	$1, 40(%rsp)
	movq	%r12, %rbx
	testl	%ecx, %ecx
	jne	.L59
.L18:
	movq	%rbx, %rax
	movl	24(%rsp), %r8d
	addl	(%r14,%rbx,4), %r8d
	andl	$3, %eax
	movl	28(%rsp), %r12d
	addl	(%r15,%rax,4), %r12d
	movslq	%r8d, %rax
	movslq	%r12d, %rdx
	leaq	(%rax,%rax,8), %rax
	addq	%rdx, %rax
	movl	0(%r13,%rax,4), %edx
	testl	%edx, %edx
	jne	.L19
	leaq	d(%rip), %rcx
	movl	$1, %edx
	movl	$1, %ebp
	movl	$1, 0(%r13,%rax,4)
	movl	(%rcx,%rax,4), %eax
	testl	%eax, %eax
	jne	.L60
	movl	%r12d, 20(%rsp)
	movl	%r8d, %r12d
	movq	%rbx, 48(%rsp)
	movq	%rdx, %rbx
.L20:
	movl	(%r14,%rbx,4), %esi
	movq	%rbx, %rax
	movl	20(%rsp), %edi
	addq	$1, %rbx
	andl	$3, %eax
	addl	(%r15,%rax,4), %edi
	addl	%r12d, %esi
	xorl	%eax, %eax
	call	Z
	addl	%eax, %ebp
	cmpq	$5, %rbx
	jne	.L20
	addl	%ebp, 40(%rsp)
	movq	48(%rsp), %rbx
.L19:
	addq	$1, %rbx
	cmpq	$5, %rbx
	jne	.L18
	movl	40(%rsp), %edi
	addl	%edi, 68(%rsp)
.L17:
	addq	$1, 8(%rsp)
	movq	8(%rsp), %rax
	cmpq	$5, %rax
	jne	.L16
	movl	68(%rsp), %edi
	addl	%edi, 88(%rsp)
.L15:
	addq	$1, 32(%rsp)
	movq	32(%rsp), %rax
	cmpq	$5, %rax
	jne	.L14
	movl	88(%rsp), %esi
	addl	%esi, 108(%rsp)
.L13:
	addq	$1, 56(%rsp)
	movq	56(%rsp), %rax
	cmpq	$5, %rax
	jne	.L12
	movl	108(%rsp), %edi
	addl	%edi, 128(%rsp)
.L11:
	addq	$1, 80(%rsp)
	movq	80(%rsp), %rax
	cmpq	$5, %rax
	jne	.L10
	movl	128(%rsp), %esi
	addl	%esi, 148(%rsp)
.L9:
	addq	$1, 96(%rsp)
	movq	96(%rsp), %rax
	cmpq	$5, %rax
	jne	.L8
	movl	148(%rsp), %edx
	addl	%edx, 160(%rsp)
.L7:
	addq	$1, 120(%rsp)
	movq	120(%rsp), %rax
	cmpq	$5, %rax
	jne	.L6
	movl	160(%rsp), %ebx
	addl	%ebx, 164(%rsp)
.L5:
	addq	$1, 136(%rsp)
	movq	136(%rsp), %rax
	cmpq	$5, %rax
	jne	.L3
	jmp	.L1
.L52:
	cmpl	Y(%rip), %esi
	je	.L61
.L2:
	movl	$0, 164(%rsp)
.L1:
	movl	164(%rsp), %eax
	addq	$184, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	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
.L60:
	.cfi_restore_state
	cmpl	Y(%rip), %r8d
	jne	.L19
	xorl	%eax, %eax
	cmpl	X(%rip), %r12d
	sete	%al
	addl	%eax, 40(%rsp)
	jmp	.L19
	.p2align 4,,10
	.p2align 3
.L59:
	movl	24(%rsp), %eax
	cmpl	Y(%rip), %eax
	jne	.L17
	movl	28(%rsp), %eax
	cmpl	X(%rip), %eax
	sete	%al
	movzbl	%al, %eax
	addl	%eax, 68(%rsp)
	jmp	.L17
	.p2align 4,,10
	.p2align 3
.L58:
	movl	44(%rsp), %eax
	cmpl	Y(%rip), %eax
	jne	.L15
	movl	64(%rsp), %eax
	cmpl	X(%rip), %eax
	sete	%al
	movzbl	%al, %eax
	addl	%eax, 88(%rsp)
	jmp	.L15
	.p2align 4,,10
	.p2align 3
.L57:
	cmpl	Y(%rip), %ecx
	jne	.L13
	movl	76(%rsp), %eax
	cmpl	X(%rip), %eax
	sete	%al
	movzbl	%al, %eax
	addl	%eax, 108(%rsp)
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L56:
	movl	92(%rsp), %eax
	cmpl	Y(%rip), %eax
	jne	.L11
	cmpl	X(%rip), %ecx
	sete	%al
	movzbl	%al, %eax
	addl	%eax, 128(%rsp)
	jmp	.L11
.L55:
	movl	112(%rsp), %eax
	cmpl	Y(%rip), %eax
	jne	.L9
	cmpl	X(%rip), %edi
	sete	%al
	movzbl	%al, %eax
	addl	%eax, 148(%rsp)
	jmp	.L9
.L54:
	cmpl	Y(%rip), %ebx
	jne	.L7
	cmpl	X(%rip), %ecx
	sete	%al
	movzbl	%al, %eax
	addl	%eax, 160(%rsp)
	jmp	.L7
.L53:
	cmpl	Y(%rip), %esi
	jne	.L5
	cmpl	X(%rip), %ebx
	sete	%al
	movzbl	%al, %eax
	addl	%eax, 164(%rsp)
	jmp	.L5
.L61:
	cmpl	X(%rip), %edi
	movl	$1, 164(%rsp)
	jne	.L2
	jmp	.L1
	.cfi_endproc
.LFE0:
	.size	Z, .-Z
	.p2align 4
	.globl	B
	.type	B, @function
B:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	movl	%esi, %r12d
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	movl	%edx, %ebp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	movl	%edi, %ebx
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	testl	%edx, %edx
	jne	.L63
	cmpl	%edi, X(%rip)
	je	.L74
.L63:
	leaq	q(%rip), %rdx
	xorl	%eax, %eax
	movslq	%r12d, %r15
	movslq	%ebx, %r14
	movl	$40, %ecx
	movq	%rdx, %rdi
	leaq	d(%rip), %r13
	rep stosq
	leaq	(%r15,%r15,8), %rax
	addq	%r14, %rax
	movl	0(%r13,%rax,4), %eax
	movl	$0, (%rdi)
	testl	%eax, %eax
	je	.L65
.L67:
	xorl	%eax, %eax
.L62:
	addq	$24, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	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
.L65:
	.cfi_restore_state
	xorl	%eax, %eax
	movl	%r12d, %esi
	movl	%ebx, %edi
	call	Z
	cmpl	%ebx, X(%rip)
	movl	$1, %edx
	jne	.L66
	xorl	%edx, %edx
	cmpl	%r12d, Y(%rip)
	setne	%dl
.L66:
	addl	%ebp, %edx
	cmpl	%edx, %eax
	jne	.L67
	movl	b(%rip), %edx
	leal	1(%rdx), %eax
	movl	%eax, b(%rip)
	movl	$2, %eax
	cmpl	$95000, %edx
	jg	.L62
	leaq	(%r15,%r15,8), %rax
	addq	%r14, %rax
	movl	$1, 0(%r13,%rax,4)
	leal	-1(%rbp), %eax
	movl	$1, %ebp
	movl	%eax, 12(%rsp)
.L68:
	leaq	-4+a(%rip), %rax
	leaq	a(%rip), %rcx
	movl	12(%rsp), %edx
	movl	(%rax,%rbp,4), %esi
	movq	%rbp, %rax
	andl	$3, %eax
	movl	(%rcx,%rax,4), %edi
	addl	%r12d, %esi
	xorl	%eax, %eax
	addl	%ebx, %edi
	call	B
	movl	%eax, t(%rip)
	testl	%eax, %eax
	jne	.L62
	addq	$1, %rbp
	cmpq	$5, %rbp
	jne	.L68
	leaq	(%r15,%r15,8), %rdx
	addq	%r14, %rdx
	movl	$0, 0(%r13,%rdx,4)
	addq	$24, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	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
.L74:
	.cfi_restore_state
	cmpl	%esi, Y(%rip)
	movl	$1, %eax
	jne	.L63
	jmp	.L62
	.cfi_endproc
.LFE1:
	.size	B, .-B
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"No"
.LC1:
	.string	"Yes"
.LC2:
	.string	"%d"
.LC3:
	.string	"%d%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB2:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	h(%rip), %r15
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	leaq	t(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	leaq	.LC2(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$8, %rsp
	.cfi_def_cfa_offset 64
	.p2align 4,,10
	.p2align 3
.L76:
	movq	$-1, %rax
	movl	$40, %ecx
	movq	%r15, %rdx
	movl	$0, b(%rip)
	leaq	d(%rip), %rdi
	leaq	w(%rip), %rsi
	movl	$0, C(%rip)
	rep stosq
	xorl	%eax, %eax
	movl	$-1, (%rdi)
	leaq	.LC3(%rip), %rdi
	call	scanf@PLT
	movl	h(%rip), %eax
	testl	%eax, %eax
	je	.L86
	jle	.L82
	movl	w(%rip), %eax
	leaq	36+d(%rip), %rbx
	movl	$1, %r13d
	testl	%eax, %eax
	jle	.L82
	.p2align 4,,10
	.p2align 3
.L88:
	movl	$1, %r14d
	.p2align 4,,10
	.p2align 3
.L80:
	movq	%r12, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	scanf@PLT
	movl	t(%rip), %eax
	movl	%eax, (%rbx,%r14,4)
	testl	%eax, %eax
	jne	.L77
	movl	%r14d, X(%rip)
	movl	w(%rip), %eax
	addq	$1, %r14
	leal	-1(%r14), %ecx
	addl	$1, C(%rip)
	movl	%r13d, Y(%rip)
	cmpl	%eax, %ecx
	jl	.L80
.L79:
	cmpl	%r13d, h(%rip)
	jle	.L82
	addl	$1, %r13d
	addq	$36, %rbx
	testl	%eax, %eax
	jg	.L88
.L82:
	movl	C(%rip), %edx
	cmpl	$3, %edx
	jg	.L83
.L85:
	leaq	.LC0(%rip), %rdi
.L84:
	call	puts@PLT
	jmp	.L76
	.p2align 4,,10
	.p2align 3
.L77:
	addq	$1, %r14
	movl	w(%rip), %eax
	leal	-1(%r14), %ecx
	cmpl	%ecx, %eax
	jg	.L80
	jmp	.L79
.L83:
	movl	Y(%rip), %esi
	movl	X(%rip), %edi
	xorl	%eax, %eax
	call	B
	cmpl	$1, %eax
	jne	.L85
	leaq	.LC1(%rip), %rdi
	jmp	.L84
.L86:
	xorl	%edi, %edi
	call	exit@PLT
	.cfi_endproc
.LFE2:
	.size	main, .-main
	.globl	a
	.data
	.align 16
	.type	a, @object
	.size	a, 16
a:
	.long	-1
	.long	0
	.long	1
	.long	0
	.globl	q
	.bss
	.align 32
	.type	q, @object
	.size	q, 324
q:
	.zero	324
	.globl	d
	.align 32
	.type	d, @object
	.size	d, 324
d:
	.zero	324
	.globl	b
	.align 4
	.type	b, @object
	.size	b, 4
b:
	.zero	4
	.globl	t
	.align 4
	.type	t, @object
	.size	t, 4
t:
	.zero	4
	.globl	C
	.align 4
	.type	C, @object
	.size	C, 4
C:
	.zero	4
	.globl	Y
	.align 4
	.type	Y, @object
	.size	Y, 4
Y:
	.zero	4
	.globl	X
	.align 4
	.type	X, @object
	.size	X, 4
X:
	.zero	4
	.globl	h
	.align 4
	.type	h, @object
	.size	h, 4
h:
	.zero	4
	.globl	w
	.align 4
	.type	w, @object
	.size	w, 4
w:
	.zero	4
	.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:

w,h,X,Y,C,t,b,d[9][9],q[9][9],a[]={-1,0,1,0};Z(x,y){int i=0,s=1;if(q[y][x])return 0;q[y][x]=1;if(d[y][x])return y==Y&&x==X;for(;i<4;)s+=Z(x+a[i%4],y+a[i++]);return s;}B(x,y,c){int i=0;if(!(c||x-X||y-Y))return 1;memset(q,0,324);if(d[y][x]||Z(x,y)!=c+(x-X||y-Y))return 0;if(b++>95000)return 2;for(d[y][x]=1;i<4;)if(t=B(x+a[i%4],y+a[i++],c-1))return t;return d[y][x]=0;}main(i,j){for(;C=b=j=0,memset(d,-1,324),scanf("%d%d\n",&w,&h),h;puts(C<4||B(X,Y,C)-1?"No":"Yes"))for(;j++<h;)for(i=0;i++<w;)scanf("%d",&t),(d[j][i]=t)||(++C,X=i,Y=j);exit(0);}
5 4
0 0 0 0 0
0 1 1 0 0
0 0 1 0 1
1 0 0 0 1
5 4
0 0 0 0 0
0 1 0 0 0
0 0 0 0 1
1 0 0 0 1
0 0
 5 4
0 0 0 0 0
0 1 1 0 0
0 0 1 0 0
1 0 0 0 1
5 4
0 0 0 0 0
0 1 0 0 0
0 0 0 0 1
1 0 0 0 1
0 0
 5 4
0 0 0 0 0
0 1 1 0 0
0 0 1 0 1
1 0 0 0 1
5 4
0 0 0 1 0
0 1 0 0 0
0 0 0 0 1
1 0 0 0 1
0 0
 5 4
0 0 0 0 0
0 0 1 0 0
0 0 1 0 1
1 0 0 0 1
5 4
0 0 0 1 0
0 1 0 0 0
0 0 0 0 1
1 0 0 0 1
0 0
 5 4
0 0 0 0 0
0 0 1 0 0
0 0 1 0 1
1 0 0 0 1
3 4
0 0 0 1 0
0 1 0 1 0
0 0 1 0 1
1 0 0 0 1
0 0
 3 4
0 0 1 0 0
0 1 1 1 0
0 0 1 0 1
1 0 0 0 1
5 4
0 0 0 0 0
0 1 1 0 0
1 0 0 0 1
1 0 0 0 1
0 0
 5 2
0 0 0 0 0
0 1 1 1 0
0 0 0 0 1
1 0 0 0 1
5 4
0 0 0 0 0
0 1 0 0 0
0 0 0 0 1
1 1 0 0 1
0 0
 5 4
0 0 0 0 0
0 1 1 0 0
0 1 1 0 1
1 0 0 0 1
5 4
0 0 0 0 0
0 1 0 0 0
0 0 0 0 1
1 0 0 0 1
0 0
 5 4
0 0 0 0 0
0 1 1 0 0
0 0 1 0 0
1 0 1 0 1
5 4
0 0 0 0 0
0 1 0 0 0
0 0 0 0 1
1 0 0 0 1
0 0
 5 4
0 0 0 0 0
0 1 1 0 1
0 0 1 0 0
1 0 1 0 1
5 4
0 0 0 0 0
0 1 0 0 0
0 0 0 0 1
1 0 0 0 1
0 0

Yes
Yes
 No
Yes
 Yes
No
 No
No
 No
No
 No
 No
 No
Yes
 No
Yes
 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
w,h,X,Y,C,t,b,d[9][9],q[9][9],a[]={-1,0,1,0};Z(x,y){int i=0,s=1;if(q[y][x])return 0;q[y][x]=1;if(d[y][x])return y==Y&&x==X;for(;i<4;)s+=Z(x+a[i%4],y+a[i++]);return s;}B(x,y,c){int i=0;if(!(c||x-X||y-Y))return 1;memset(q,0,324);if(d[y][x]||Z(x,y)!=c+(x-X||y-Y))return 0;if(b++>95000)return 2;for(d[y][x]=1;i<4;)if(t=B(x+a[i%4],y+a[i++],c-1))return t;return d[y][x]=0;}main(i,j){for(;C=b=j=0,memset(d,-1,324),scanf("%d%d\n",&w,&h),h;puts(C<4||B(X,Y,C)-1?"No":"Yes"))for(;j++<h;)for(i=0;i++<w;)scanf("%d",&t),(d[j][i]=t)||(++C,X=i,Y=j);exit(0);}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	w
	.bss
	.align 4
	.type	w, @object
	.size	w, 4
w:
	.zero	4
	.globl	h
	.align 4
	.type	h, @object
	.size	h, 4
h:
	.zero	4
	.globl	X
	.align 4
	.type	X, @object
	.size	X, 4
X:
	.zero	4
	.globl	Y
	.align 4
	.type	Y, @object
	.size	Y, 4
Y:
	.zero	4
	.globl	C
	.align 4
	.type	C, @object
	.size	C, 4
C:
	.zero	4
	.globl	t
	.align 4
	.type	t, @object
	.size	t, 4
t:
	.zero	4
	.globl	b
	.align 4
	.type	b, @object
	.size	b, 4
b:
	.zero	4
	.globl	d
	.align 32
	.type	d, @object
	.size	d, 324
d:
	.zero	324
	.globl	q
	.align 32
	.type	q, @object
	.size	q, 324
q:
	.zero	324
	.globl	a
	.data
	.align 16
	.type	a, @object
	.size	a, 16
a:
	.long	-1
	.long	0
	.long	1
	.long	0
	.text
	.globl	Z
	.type	Z, @function
Z:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movl	%edi, -20(%rbp)
	movl	%esi, -24(%rbp)
	movl	$0, -8(%rbp)
	movl	$1, -4(%rbp)
	movl	-20(%rbp), %eax
	movslq	%eax, %rcx
	movl	-24(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$3, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	q(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	je	.L2
	movl	$0, %eax
	jmp	.L3
.L2:
	movl	-20(%rbp), %eax
	movslq	%eax, %rcx
	movl	-24(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$3, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	q(%rip), %rax
	movl	$1, (%rdx,%rax)
	movl	-20(%rbp), %eax
	movslq	%eax, %rcx
	movl	-24(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$3, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	d(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	je	.L7
	movl	Y(%rip), %eax
	cmpl	%eax, -24(%rbp)
	jne	.L5
	movl	X(%rip), %eax
	cmpl	%eax, -20(%rbp)
	jne	.L5
	movl	$1, %eax
	jmp	.L3
.L5:
	movl	$0, %eax
	jmp	.L3
.L8:
	movl	-8(%rbp), %eax
	leal	1(%rax), %edx
	movl	%edx, -8(%rbp)
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-24(%rbp), %eax
	addl	%eax, %edx
	movl	-8(%rbp), %eax
	movl	%eax, %ecx
	sarl	$31, %ecx
	shrl	$30, %ecx
	addl	%ecx, %eax
	andl	$3, %eax
	subl	%ecx, %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	a(%rip), %rax
	movl	(%rcx,%rax), %ecx
	movl	-20(%rbp), %eax
	addl	%ecx, %eax
	movl	%edx, %esi
	movl	%eax, %edi
	movl	$0, %eax
	call	Z
	addl	%eax, -4(%rbp)
.L7:
	cmpl	$3, -8(%rbp)
	jle	.L8
	movl	-4(%rbp), %eax
.L3:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	Z, .-Z
	.globl	B
	.type	B, @function
B:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movl	%edi, -20(%rbp)
	movl	%esi, -24(%rbp)
	movl	%edx, -28(%rbp)
	movl	$0, -4(%rbp)
	cmpl	$0, -28(%rbp)
	jne	.L10
	movl	X(%rip), %eax
	cmpl	%eax, -20(%rbp)
	jne	.L10
	movl	Y(%rip), %eax
	cmpl	%eax, -24(%rbp)
	jne	.L10
	movl	$1, %eax
	jmp	.L11
.L10:
	movl	$324, %edx
	movl	$0, %esi
	leaq	q(%rip), %rax
	movq	%rax, %rdi
	call	memset@PLT
	movl	-20(%rbp), %eax
	movslq	%eax, %rcx
	movl	-24(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$3, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	d(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	jne	.L12
	movl	-24(%rbp), %edx
	movl	-20(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	movl	$0, %eax
	call	Z
	movl	X(%rip), %edx
	cmpl	%edx, -20(%rbp)
	jne	.L13
	movl	Y(%rip), %edx
	cmpl	%edx, -24(%rbp)
	je	.L14
.L13:
	movl	$1, %ecx
	jmp	.L15
.L14:
	movl	$0, %ecx
.L15:
	movl	-28(%rbp), %edx
	addl	%ecx, %edx
	cmpl	%edx, %eax
	je	.L16
.L12:
	movl	$0, %eax
	jmp	.L11
.L16:
	movl	b(%rip), %eax
	leal	1(%rax), %edx
	movl	%edx, b(%rip)
	cmpl	$95000, %eax
	jle	.L17
	movl	$2, %eax
	jmp	.L11
.L17:
	movl	-20(%rbp), %eax
	movslq	%eax, %rcx
	movl	-24(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$3, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	d(%rip), %rax
	movl	$1, (%rdx,%rax)
	jmp	.L18
.L19:
	movl	-28(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-4(%rbp), %eax
	leal	1(%rax), %ecx
	movl	%ecx, -4(%rbp)
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	a(%rip), %rax
	movl	(%rcx,%rax), %ecx
	movl	-24(%rbp), %eax
	addl	%eax, %ecx
	movl	-4(%rbp), %eax
	movl	%eax, %esi
	sarl	$31, %esi
	shrl	$30, %esi
	addl	%esi, %eax
	andl	$3, %eax
	subl	%esi, %eax
	cltq
	leaq	0(,%rax,4), %rsi
	leaq	a(%rip), %rax
	movl	(%rsi,%rax), %esi
	movl	-20(%rbp), %eax
	addl	%esi, %eax
	movl	%ecx, %esi
	movl	%eax, %edi
	movl	$0, %eax
	call	B
	movl	%eax, t(%rip)
	movl	t(%rip), %eax
	testl	%eax, %eax
	je	.L18
	movl	t(%rip), %eax
	jmp	.L11
.L18:
	cmpl	$3, -4(%rbp)
	jle	.L19
	movl	-20(%rbp), %eax
	movslq	%eax, %rcx
	movl	-24(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$3, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	d(%rip), %rax
	movl	$0, (%rdx,%rax)
	movl	-20(%rbp), %eax
	movslq	%eax, %rcx
	movl	-24(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$3, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	d(%rip), %rax
	movl	(%rdx,%rax), %eax
.L11:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	B, .-B
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"No"
.LC2:
	.string	"Yes"
.LC3:
	.string	"%d%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB2:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	movl	%edi, -4(%rbp)
	movl	%esi, -8(%rbp)
	jmp	.L21
.L27:
	movl	$0, -4(%rbp)
	jmp	.L23
.L26:
	leaq	t(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	scanf@PLT
	movl	t(%rip), %edx
	movl	-4(%rbp), %eax
	movslq	%eax, %rsi
	movl	-8(%rbp), %eax
	movslq	%eax, %rcx
	movq	%rcx, %rax
	salq	$3, %rax
	addq	%rcx, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,4), %rcx
	leaq	d(%rip), %rax
	movl	%edx, (%rcx,%rax)
	movl	-4(%rbp), %eax
	movslq	%eax, %rcx
	movl	-8(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$3, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	d(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	jne	.L23
	movl	C(%rip), %eax
	addl	$1, %eax
	movl	%eax, C(%rip)
	movl	-4(%rbp), %eax
	movl	%eax, X(%rip)
	movl	-8(%rbp), %eax
	movl	%eax, Y(%rip)
	movl	Y(%rip), %eax
	testl	%eax, %eax
.L23:
	movl	-4(%rbp), %eax
	leal	1(%rax), %edx
	movl	%edx, -4(%rbp)
	movl	w(%rip), %edx
	cmpl	%edx, %eax
	jl	.L26
.L22:
	movl	-8(%rbp), %eax
	leal	1(%rax), %edx
	movl	%edx, -8(%rbp)
	movl	h(%rip), %edx
	cmpl	%edx, %eax
	jl	.L27
	movl	C(%rip), %eax
	cmpl	$3, %eax
	jle	.L28
	movl	C(%rip), %edx
	movl	Y(%rip), %ecx
	movl	X(%rip), %eax
	movl	%ecx, %esi
	movl	%eax, %edi
	movl	$0, %eax
	call	B
	cmpl	$1, %eax
	je	.L29
.L28:
	leaq	.LC1(%rip), %rax
	jmp	.L30
.L29:
	leaq	.LC2(%rip), %rax
.L30:
	movq	%rax, %rdi
	call	puts@PLT
.L21:
	movl	$0, -8(%rbp)
	movl	-8(%rbp), %eax
	movl	%eax, b(%rip)
	movl	b(%rip), %eax
	movl	%eax, C(%rip)
	movl	$324, %edx
	movl	$-1, %esi
	leaq	d(%rip), %rax
	movq	%rax, %rdi
	call	memset@PLT
	leaq	h(%rip), %rax
	movq	%rax, %rdx
	leaq	w(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	scanf@PLT
	movl	h(%rip), %eax
	testl	%eax, %eax
	jne	.L22
	movl	$0, %edi
	call	exit@PLT
	.cfi_endproc
.LFE2:
	.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
	.globl	w
	.bss
	.align 4
	.type	w, @object
	.size	w, 4
w:
	.zero	4
	.globl	h
	.align 4
	.type	h, @object
	.size	h, 4
h:
	.zero	4
	.globl	X
	.align 4
	.type	X, @object
	.size	X, 4
X:
	.zero	4
	.globl	Y
	.align 4
	.type	Y, @object
	.size	Y, 4
Y:
	.zero	4
	.globl	C
	.align 4
	.type	C, @object
	.size	C, 4
C:
	.zero	4
	.globl	t
	.align 4
	.type	t, @object
	.size	t, 4
t:
	.zero	4
	.globl	b
	.align 4
	.type	b, @object
	.size	b, 4
b:
	.zero	4
	.globl	d
	.align 32
	.type	d, @object
	.size	d, 324
d:
	.zero	324
	.globl	q
	.align 32
	.type	q, @object
	.size	q, 324
q:
	.zero	324
	.globl	a
	.data
	.align 16
	.type	a, @object
	.size	a, 16
a:
	.long	-1
	.long	0
	.long	1
	.long	0
	.text
	.globl	Z
	.type	Z, @function
Z:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movl	%edi, -20(%rbp)
	movl	%esi, -24(%rbp)
	movl	$0, -8(%rbp)
	movl	$1, -4(%rbp)
	movl	-20(%rbp), %eax
	movslq	%eax, %rcx
	movl	-24(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$3, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	q(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	je	.L2
	movl	$0, %eax
	jmp	.L3
.L2:
	movl	-20(%rbp), %eax
	movslq	%eax, %rcx
	movl	-24(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$3, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	q(%rip), %rax
	movl	$1, (%rdx,%rax)
	movl	-20(%rbp), %eax
	movslq	%eax, %rcx
	movl	-24(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$3, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	d(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	je	.L7
	movl	Y(%rip), %eax
	cmpl	%eax, -24(%rbp)
	jne	.L5
	movl	X(%rip), %eax
	cmpl	%eax, -20(%rbp)
	jne	.L5
	movl	$1, %eax
	jmp	.L3
.L5:
	movl	$0, %eax
	jmp	.L3
.L8:
	movl	-8(%rbp), %eax
	leal	1(%rax), %edx
	movl	%edx, -8(%rbp)
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	a(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-24(%rbp), %eax
	addl	%eax, %edx
	movl	-8(%rbp), %eax
	movl	%eax, %ecx
	sarl	$31, %ecx
	shrl	$30, %ecx
	addl	%ecx, %eax
	andl	$3, %eax
	subl	%ecx, %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	a(%rip), %rax
	movl	(%rcx,%rax), %ecx
	movl	-20(%rbp), %eax
	addl	%ecx, %eax
	movl	%edx, %esi
	movl	%eax, %edi
	movl	$0, %eax
	call	Z
	addl	%eax, -4(%rbp)
.L7:
	cmpl	$3, -8(%rbp)
	jle	.L8
	movl	-4(%rbp), %eax
.L3:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	Z, .-Z
	.globl	B
	.type	B, @function
B:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movl	%edi, -20(%rbp)
	movl	%esi, -24(%rbp)
	movl	%edx, -28(%rbp)
	movl	$0, -4(%rbp)
	cmpl	$0, -28(%rbp)
	jne	.L10
	movl	X(%rip), %eax
	cmpl	%eax, -20(%rbp)
	jne	.L10
	movl	Y(%rip), %eax
	cmpl	%eax, -24(%rbp)
	jne	.L10
	movl	$1, %eax
	jmp	.L11
.L10:
	movl	$324, %edx
	movl	$0, %esi
	leaq	q(%rip), %rax
	movq	%rax, %rdi
	call	memset@PLT
	movl	-20(%rbp), %eax
	movslq	%eax, %rcx
	movl	-24(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$3, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	d(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	jne	.L12
	movl	-24(%rbp), %edx
	movl	-20(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	movl	$0, %eax
	call	Z
	movl	X(%rip), %edx
	cmpl	%edx, -20(%rbp)
	jne	.L13
	movl	Y(%rip), %edx
	cmpl	%edx, -24(%rbp)
	je	.L14
.L13:
	movl	$1, %ecx
	jmp	.L15
.L14:
	movl	$0, %ecx
.L15:
	movl	-28(%rbp), %edx
	addl	%ecx, %edx
	cmpl	%edx, %eax
	je	.L16
.L12:
	movl	$0, %eax
	jmp	.L11
.L16:
	movl	b(%rip), %eax
	leal	1(%rax), %edx
	movl	%edx, b(%rip)
	cmpl	$95000, %eax
	jle	.L17
	movl	$2, %eax
	jmp	.L11
.L17:
	movl	-20(%rbp), %eax
	movslq	%eax, %rcx
	movl	-24(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$3, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	d(%rip), %rax
	movl	$1, (%rdx,%rax)
	jmp	.L18
.L19:
	movl	-28(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-4(%rbp), %eax
	leal	1(%rax), %ecx
	movl	%ecx, -4(%rbp)
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	a(%rip), %rax
	movl	(%rcx,%rax), %ecx
	movl	-24(%rbp), %eax
	addl	%eax, %ecx
	movl	-4(%rbp), %eax
	movl	%eax, %esi
	sarl	$31, %esi
	shrl	$30, %esi
	addl	%esi, %eax
	andl	$3, %eax
	subl	%esi, %eax
	cltq
	leaq	0(,%rax,4), %rsi
	leaq	a(%rip), %rax
	movl	(%rsi,%rax), %esi
	movl	-20(%rbp), %eax
	addl	%esi, %eax
	movl	%ecx, %esi
	movl	%eax, %edi
	movl	$0, %eax
	call	B
	movl	%eax, t(%rip)
	movl	t(%rip), %eax
	testl	%eax, %eax
	je	.L18
	movl	t(%rip), %eax
	jmp	.L11
.L18:
	cmpl	$3, -4(%rbp)
	jle	.L19
	movl	-20(%rbp), %eax
	movslq	%eax, %rcx
	movl	-24(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$3, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	d(%rip), %rax
	movl	$0, (%rdx,%rax)
	movl	-20(%rbp), %eax
	movslq	%eax, %rcx
	movl	-24(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$3, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	d(%rip), %rax
	movl	(%rdx,%rax), %eax
.L11:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	B, .-B
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"No"
.LC2:
	.string	"Yes"
.LC3:
	.string	"%d%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB2:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	movl	%edi, -4(%rbp)
	movl	%esi, -8(%rbp)
	jmp	.L21
.L27:
	movl	$0, -4(%rbp)
	jmp	.L23
.L26:
	leaq	t(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	scanf@PLT
	movl	t(%rip), %edx
	movl	-4(%rbp), %eax
	movslq	%eax, %rsi
	movl	-8(%rbp), %eax
	movslq	%eax, %rcx
	movq	%rcx, %rax
	salq	$3, %rax
	addq	%rcx, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,4), %rcx
	leaq	d(%rip), %rax
	movl	%edx, (%rcx,%rax)
	movl	-4(%rbp), %eax
	movslq	%eax, %rcx
	movl	-8(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$3, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	d(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	jne	.L23
	movl	C(%rip), %eax
	addl	$1, %eax
	movl	%eax, C(%rip)
	movl	-4(%rbp), %eax
	movl	%eax, X(%rip)
	movl	-8(%rbp), %eax
	movl	%eax, Y(%rip)
	movl	Y(%rip), %eax
	testl	%eax, %eax
.L23:
	movl	-4(%rbp), %eax
	leal	1(%rax), %edx
	movl	%edx, -4(%rbp)
	movl	w(%rip), %edx
	cmpl	%edx, %eax
	jl	.L26
.L22:
	movl	-8(%rbp), %eax
	leal	1(%rax), %edx
	movl	%edx, -8(%rbp)
	movl	h(%rip), %edx
	cmpl	%edx, %eax
	jl	.L27
	movl	C(%rip), %eax
	cmpl	$3, %eax
	jle	.L28
	movl	C(%rip), %edx
	movl	Y(%rip), %ecx
	movl	X(%rip), %eax
	movl	%ecx, %esi
	movl	%eax, %edi
	movl	$0, %eax
	call	B
	cmpl	$1, %eax
	je	.L29
.L28:
	leaq	.LC1(%rip), %rax
	jmp	.L30
.L29:
	leaq	.LC2(%rip), %rax
.L30:
	movq	%rax, %rdi
	call	puts@PLT
.L21:
	movl	$0, -8(%rbp)
	movl	-8(%rbp), %eax
	movl	%eax, b(%rip)
	movl	b(%rip), %eax
	movl	%eax, C(%rip)
	movl	$324, %edx
	movl	$-1, %esi
	leaq	d(%rip), %rax
	movq	%rax, %rdi
	call	memset@PLT
	leaq	h(%rip), %rax
	movq	%rax, %rdx
	leaq	w(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	scanf@PLT
	movl	h(%rip), %eax
	testl	%eax, %eax
	jne	.L22
	movl	$0, %edi
	call	exit@PLT
	.cfi_endproc
.LFE2:
	.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:
