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 X[17][17]={0};
int i,j;
int f(int x,int y){
    if(x<=0||x>i||y<=0||y>j||X[x][y]==-1)return 0;
    if(x==1 && y==1)return 1;
    return f(x-1,y)+f(x,y-1);
}
int main(void){
    int n,d,e,k,l,m;
    while(1){
    scanf("%d%d",&i,&j);
    if(i==0 && j==0)break;
    scanf("%d",&n);
    for(l=0;l<17;l++){
        for(m=0;m<17;m++){
            X[l][m]=0;
        }
    }
    for(k=0;k<n;k++){
        scanf("%d%d",&d,&e);
        X[d][e]=-1;
    }
    printf("%d\n",f(i,j));
    }
    return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	X
	.bss
	.align 32
	.type	X, @object
	.size	X, 1156
X:
	.zero	1156
	.globl	i
	.align 4
	.type	i, @object
	.size	i, 4
i:
	.zero	4
	.globl	j
	.align 4
	.type	j, @object
	.size	j, 4
j:
	.zero	4
	.text
	.globl	f
	.type	f, @function
f:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset 3, -24
	movl	%edi, -20(%rbp)
	movl	%esi, -24(%rbp)
	cmpl	$0, -20(%rbp)
	jle	.L2
	movl	i(%rip), %eax
	cmpl	%eax, -20(%rbp)
	jg	.L2
	cmpl	$0, -24(%rbp)
	jle	.L2
	movl	j(%rip), %eax
	cmpl	%eax, -24(%rbp)
	jg	.L2
	movl	-24(%rbp), %eax
	movslq	%eax, %rcx
	movl	-20(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$4, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	X(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	$-1, %eax
	jne	.L3
.L2:
	movl	$0, %eax
	jmp	.L4
.L3:
	cmpl	$1, -20(%rbp)
	jne	.L5
	cmpl	$1, -24(%rbp)
	jne	.L5
	movl	$1, %eax
	jmp	.L4
.L5:
	movl	-20(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-24(%rbp), %eax
	movl	%eax, %esi
	movl	%edx, %edi
	call	f
	movl	%eax, %ebx
	movl	-24(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-20(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	f
	addl	%ebx, %eax
.L4:
	movq	-8(%rbp), %rbx
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	f, .-f
	.section	.rodata
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%d"
.LC2:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.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
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
.L15:
	leaq	j(%rip), %rax
	movq	%rax, %rdx
	leaq	i(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	i(%rip), %eax
	testl	%eax, %eax
	jne	.L7
	movl	j(%rip), %eax
	testl	%eax, %eax
	je	.L19
.L7:
	leaq	-32(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -16(%rbp)
	jmp	.L9
.L12:
	movl	$0, -12(%rbp)
	jmp	.L10
.L11:
	movl	-12(%rbp), %eax
	movslq	%eax, %rcx
	movl	-16(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$4, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	X(%rip), %rax
	movl	$0, (%rdx,%rax)
	addl	$1, -12(%rbp)
.L10:
	cmpl	$16, -12(%rbp)
	jle	.L11
	addl	$1, -16(%rbp)
.L9:
	cmpl	$16, -16(%rbp)
	jle	.L12
	movl	$0, -20(%rbp)
	jmp	.L13
.L14:
	leaq	-24(%rbp), %rdx
	leaq	-28(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-28(%rbp), %eax
	movl	-24(%rbp), %edx
	movslq	%edx, %rcx
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$4, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	X(%rip), %rax
	movl	$-1, (%rdx,%rax)
	addl	$1, -20(%rbp)
.L13:
	movl	-32(%rbp), %eax
	cmpl	%eax, -20(%rbp)
	jl	.L14
	movl	j(%rip), %edx
	movl	i(%rip), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	f
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L15
.L19:
	nop
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L17
	call	__stack_chk_fail@PLT
.L17:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.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	f
	.type	f, @function
f:
.LFB23:
	.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
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$248, %rsp
	.cfi_def_cfa_offset 304
	movl	%esi, 28(%rsp)
	testl	%edi, %edi
	jle	.L46
	movl	i(%rip), %r10d
	testl	%esi, %esi
	jle	.L46
	movl	%edi, %r9d
	cmpl	%r10d, %edi
	jg	.L46
	movslq	%edi, %rax
	movslq	%esi, %rcx
	movl	j(%rip), %r11d
	xorl	%r8d, %r8d
	movq	%rax, %rdx
	movl	%r8d, 8(%rsp)
	salq	$4, %rdx
	movl	%r9d, 192(%rsp)
	movl	%r11d, %r8d
	movl	%r10d, %r11d
	addq	%rax, %rdx
	leaq	-136(%rcx,%rdx), %rcx
	leaq	X(%rip), %rdx
	leaq	(%rdx,%rcx,4), %rbx
	leal	-1(%rdi), %edx
	imulq	$-68, %rax, %rcx
	movq	%rdx, %rax
	movl	%edx, 116(%rsp)
	salq	$4, %rax
	movq	%rbx, 72(%rsp)
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rcx, %r9
	movq	%rax, 136(%rsp)
	leal	-2(%rdi), %eax
	movslq	%eax, %rdx
	movl	%eax, 96(%rsp)
	movq	%rdx, %rax
	salq	$4, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, 144(%rsp)
	leal	-3(%rdi), %eax
	movslq	%eax, %rdx
	movl	%eax, 100(%rsp)
	movq	%rdx, %rax
	salq	$4, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, 152(%rsp)
	leal	-4(%rdi), %eax
	movslq	%eax, %rdx
	movl	%eax, 104(%rsp)
	movq	%rdx, %rax
	salq	$4, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, 160(%rsp)
	leal	-5(%rdi), %eax
	movslq	%eax, %rdx
	movl	%eax, 108(%rsp)
	movq	%rdx, %rax
	salq	$4, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, 168(%rsp)
	leal	-6(%rdi), %eax
	movslq	%eax, %rdx
	movl	%eax, 112(%rsp)
	movq	%rdx, %rax
	salq	$4, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, 176(%rsp)
	leal	-7(%rdi), %eax
	movslq	%eax, %rdx
	movl	%eax, 120(%rsp)
	movq	%rdx, %rax
	salq	$4, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, 184(%rsp)
	leal	-8(%rdi), %eax
	leal	-9(%rdi), %edi
	movl	%eax, 124(%rsp)
.L44:
	movl	28(%rsp), %eax
	cmpl	%eax, %r8d
	jl	.L127
	movq	72(%rsp), %rcx
	cmpl	$-1, 544(%rcx)
	je	.L127
	cmpl	$1, 192(%rsp)
	jne	.L3
	cmpl	$1, %eax
	je	.L130
.L3:
	movl	116(%rsp), %eax
	cmpl	%r11d, %eax
	jg	.L4
	testl	%eax, %eax
	je	.L4
	movq	72(%rsp), %rax
	xorl	%r10d, %r10d
	movq	%rax, 64(%rsp)
	movl	28(%rsp), %eax
	movl	%eax, 12(%rsp)
	movq	%r9, %rax
	movl	%r10d, %r9d
	movl	%r11d, %r10d
	movl	%r8d, %r11d
	movq	%rax, %r8
.L42:
	movq	64(%rsp), %rax
	movq	136(%rsp), %rcx
	addq	%r8, %rax
	cmpl	$-1, 544(%rax,%rcx)
	je	.L54
	cmpl	$1, 116(%rsp)
	jne	.L6
	cmpl	$1, 12(%rsp)
	je	.L131
.L6:
	movl	96(%rsp), %esi
	cmpl	%r10d, %esi
	setg	%al
	testl	%esi, %esi
	sete	%dl
	orb	%dl, %al
	jne	.L7
	movl	12(%rsp), %eax
	cmpl	%eax, %r11d
	jl	.L7
	movq	64(%rsp), %rbx
	movl	%eax, 16(%rsp)
	xorl	%r15d, %r15d
	movl	%r9d, 80(%rsp)
	movl	%r11d, %r9d
	movl	%r15d, %r11d
	movq	%rbx, 56(%rsp)
.L40:
	movq	56(%rsp), %rax
	movq	144(%rsp), %rcx
	addq	%r8, %rax
	cmpl	$-1, 544(%rax,%rcx)
	je	.L53
	cmpl	$1, 96(%rsp)
	jne	.L9
	cmpl	$1, 16(%rsp)
	je	.L132
.L9:
	movl	100(%rsp), %esi
	cmpl	%r10d, %esi
	setg	%al
	testl	%esi, %esi
	sete	%dl
	orb	%dl, %al
	jne	.L10
	movl	16(%rsp), %eax
	cmpl	%eax, %r9d
	jl	.L10
	movq	56(%rsp), %rbx
	movl	%eax, 20(%rsp)
	xorl	%r14d, %r14d
	movl	%r9d, %ebp
	movl	%r11d, 84(%rsp)
	movq	%r8, %r9
	movl	%r10d, %r11d
	movl	%r14d, %r8d
	movq	%rbx, 32(%rsp)
.L38:
	movq	32(%rsp), %rax
	movq	152(%rsp), %rcx
	addq	%r9, %rax
	cmpl	$-1, 544(%rax,%rcx)
	je	.L52
	cmpl	$1, 100(%rsp)
	jne	.L12
	cmpl	$1, 20(%rsp)
	je	.L133
.L12:
	movl	104(%rsp), %ebx
	cmpl	%r11d, %ebx
	setg	%al
	testl	%ebx, %ebx
	sete	%dl
	orb	%dl, %al
	jne	.L13
	movl	20(%rsp), %eax
	cmpl	%eax, %ebp
	jl	.L13
	movq	32(%rsp), %rbx
	movl	%eax, 24(%rsp)
	xorl	%r10d, %r10d
	movl	%r8d, 88(%rsp)
	movq	%rbx, 48(%rsp)
.L36:
	movq	48(%rsp), %rax
	movq	160(%rsp), %rcx
	addq	%r9, %rax
	cmpl	$-1, 544(%rax,%rcx)
	je	.L51
	cmpl	$1, 104(%rsp)
	jne	.L15
	cmpl	$1, 24(%rsp)
	je	.L134
.L15:
	movl	108(%rsp), %esi
	cmpl	%r11d, %esi
	setg	%al
	testl	%esi, %esi
	sete	%dl
	orb	%dl, %al
	jne	.L16
	movl	24(%rsp), %ecx
	cmpl	%ecx, %ebp
	jl	.L16
	movq	48(%rsp), %rax
	movl	%r10d, 92(%rsp)
	xorl	%ebx, %ebx
	movq	%rax, 40(%rsp)
.L34:
	movq	40(%rsp), %rax
	movq	168(%rsp), %rsi
	addq	%r9, %rax
	cmpl	$-1, 544(%rax,%rsi)
	je	.L50
	cmpl	$1, 108(%rsp)
	jne	.L18
	cmpl	$1, %ecx
	je	.L135
.L18:
	movl	112(%rsp), %esi
	cmpl	%r11d, %esi
	setg	%al
	testl	%esi, %esi
	sete	%dl
	orb	%dl, %al
	jne	.L19
	cmpl	%ecx, %ebp
	jl	.L19
	movq	40(%rsp), %r10
	movl	%ecx, %r14d
	xorl	%r12d, %r12d
.L32:
	movq	176(%rsp), %rdx
	leaq	(%r10,%r9), %rax
	cmpl	$-1, 544(%rax,%rdx)
	je	.L49
	cmpl	$1, 112(%rsp)
	jne	.L21
	cmpl	$1, %r14d
	je	.L136
.L21:
	movl	120(%rsp), %esi
	cmpl	%r11d, %esi
	setg	%al
	testl	%esi, %esi
	sete	%dl
	orb	%dl, %al
	jne	.L22
	cmpl	%r14d, %ebp
	jl	.L22
	movq	%r10, %r8
	movl	%r14d, %r15d
	xorl	%r13d, %r13d
.L30:
	movq	184(%rsp), %rsi
	leaq	(%r8,%r9), %rax
	cmpl	$-1, 544(%rax,%rsi)
	je	.L48
	cmpl	$1, 120(%rsp)
	jne	.L24
	cmpl	$1, %r15d
	je	.L137
.L24:
	movl	124(%rsp), %edx
	cmpl	%r11d, %edx
	setg	%al
	testl	%edx, %edx
	sete	%dl
	orb	%dl, %al
	jne	.L25
	cmpl	%r15d, %ebp
	jl	.L25
	movq	%r8, 128(%rsp)
	movl	%r15d, %esi
	xorl	%edx, %edx
.L28:
	movq	128(%rsp), %rax
	cmpl	$-1, (%rax)
	je	.L47
	cmpl	$1, 124(%rsp)
	jne	.L27
	cmpl	$1, %esi
	je	.L138
.L27:
	movq	%r9, 232(%rsp)
	movl	%r11d, 228(%rsp)
	movq	%r8, 216(%rsp)
	movl	%edx, 224(%rsp)
	movq	%r10, 208(%rsp)
	movl	%ecx, 204(%rsp)
	movl	%esi, 200(%rsp)
	movl	%edi, 196(%rsp)
	call	f
	movl	224(%rsp), %edx
	movl	200(%rsp), %esi
	subq	$4, 128(%rsp)
	movl	196(%rsp), %edi
	addl	%eax, %edx
	subl	$1, %esi
	movl	204(%rsp), %ecx
	movq	208(%rsp), %r10
	movq	216(%rsp), %r8
	movl	228(%rsp), %r11d
	movq	232(%rsp), %r9
	je	.L47
	cmpl	%esi, %ebp
	jge	.L28
.L47:
	addl	%edx, %r13d
.L25:
	subq	$4, %r8
	subl	$1, %r15d
	je	.L48
	cmpl	%r15d, %ebp
	jge	.L30
.L48:
	addl	%r13d, %r12d
.L22:
	subl	$1, %r14d
	subq	$4, %r10
	cmpl	%r14d, %ebp
	jl	.L49
	testl	%r14d, %r14d
	jne	.L32
.L49:
	addl	%r12d, %ebx
.L19:
	subl	$1, %ecx
	subq	$4, 40(%rsp)
	cmpl	%ecx, %ebp
	jl	.L50
	testl	%ecx, %ecx
	jne	.L34
.L50:
	movl	92(%rsp), %r10d
	addl	%ebx, %r10d
.L16:
	subq	$4, 48(%rsp)
	subl	$1, 24(%rsp)
	movl	24(%rsp), %eax
	je	.L51
	cmpl	%eax, %ebp
	jge	.L36
.L51:
	movl	88(%rsp), %r8d
	addl	%r10d, %r8d
.L13:
	subl	$1, 20(%rsp)
	movl	20(%rsp), %eax
	subq	$4, 32(%rsp)
	cmpl	%eax, %ebp
	jl	.L52
	testl	%eax, %eax
	jne	.L38
.L52:
	movl	%r11d, %r10d
	movl	84(%rsp), %r11d
	movl	%r8d, %r14d
	movq	%r9, %r8
	movl	%ebp, %r9d
	addl	%r14d, %r11d
.L10:
	subl	$1, 16(%rsp)
	movl	16(%rsp), %eax
	subq	$4, 56(%rsp)
	cmpl	%eax, %r9d
	jl	.L53
	testl	%eax, %eax
	jne	.L40
.L53:
	movl	%r11d, %r15d
	movl	%r9d, %r11d
	movl	80(%rsp), %r9d
	addl	%r15d, %r9d
.L7:
	subl	$1, 12(%rsp)
	movl	12(%rsp), %eax
	subq	$4, 64(%rsp)
	cmpl	%eax, %r11d
	jl	.L54
	testl	%eax, %eax
	jne	.L42
.L54:
	movq	%r8, %rax
	movl	%r11d, %r8d
	movl	%r10d, %r11d
	movl	%r9d, %r10d
	addl	%r10d, 8(%rsp)
	movq	%rax, %r9
.L4:
	subl	$1, 28(%rsp)
	movl	28(%rsp), %eax
	subq	$4, 72(%rsp)
	testl	%eax, %eax
	jg	.L44
.L127:
	movl	8(%rsp), %r8d
.L1:
	addq	$248, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	movl	%r8d, %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
.L136:
	.cfi_restore_state
	leal	1(%r12,%rbx), %ebx
	jmp	.L19
.L137:
	leal	1(%r13,%r12), %r12d
	jmp	.L22
.L135:
	movl	92(%rsp), %r10d
	leal	1(%r10,%rbx), %r10d
	jmp	.L16
	.p2align 4,,10
	.p2align 3
.L138:
	leal	1(%rdx,%r13), %r13d
	jmp	.L25
.L134:
	movl	88(%rsp), %r8d
	leal	1(%r8,%r10), %r8d
	jmp	.L13
.L131:
	movq	%r8, %rax
	movl	%r11d, %r8d
	movl	%r10d, %r11d
	movl	%r9d, %r10d
	movq	%rax, %r9
	movl	8(%rsp), %eax
	leal	1(%r10,%rax), %eax
	movl	%eax, 8(%rsp)
	jmp	.L4
.L132:
	movl	%r11d, %r15d
	movl	%r9d, %r11d
	movl	80(%rsp), %r9d
	leal	1(%r9,%r15), %r9d
	jmp	.L7
.L133:
	movl	%r11d, %r10d
	movl	84(%rsp), %r11d
	movl	%r8d, %r14d
	movq	%r9, %r8
	movl	%ebp, %r9d
	leal	1(%r11,%r14), %r11d
	jmp	.L10
.L46:
	xorl	%r8d, %r8d
	jmp	.L1
.L130:
	movl	8(%rsp), %r8d
	addl	$1, %r8d
	jmp	.L1
	.cfi_endproc
.LFE23:
	.size	f, .-f
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%d"
.LC2:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB24:
	.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
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	leaq	.LC0(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	X(%rip), %rbx
	subq	$56, %rsp
	.cfi_def_cfa_offset 112
	movq	%fs:40, %rax
	movq	%rax, 40(%rsp)
	xorl	%eax, %eax
	leaq	28(%rsp), %rax
	movq	%rax, 8(%rsp)
.L147:
	xorl	%eax, %eax
	leaq	j(%rip), %rdx
	leaq	i(%rip), %rsi
	movq	%rbp, %rdi
	call	__isoc99_scanf@PLT
	movl	i(%rip), %eax
	orl	j(%rip), %eax
	je	.L140
	movq	8(%rsp), %rsi
	xorl	%eax, %eax
	xorl	%r14d, %r14d
	leaq	36(%rsp), %r13
	leaq	.LC1(%rip), %rdi
	leaq	32(%rsp), %r12
	call	__isoc99_scanf@PLT
	xorl	%eax, %eax
	movl	$144, %ecx
	movq	%rbx, %rdi
	rep stosq
	movl	28(%rsp), %eax
	movl	$0, (%rdi)
	testl	%eax, %eax
	jle	.L144
	.p2align 4,,10
	.p2align 3
.L141:
	movq	%r13, %rdx
	movq	%r12, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	32(%rsp), %rdx
	movslq	36(%rsp), %rcx
	addl	$1, %r14d
	movq	%rdx, %rax
	salq	$4, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	movl	$-1, (%rbx,%rax,4)
	cmpl	%r14d, 28(%rsp)
	jg	.L141
.L144:
	movl	i(%rip), %r12d
	movl	j(%rip), %edx
	testl	%r12d, %r12d
	jle	.L150
	testl	%edx, %edx
	jle	.L150
	movslq	%r12d, %rcx
	movslq	%edx, %r13
	leal	-1(%r12), %r14d
	xorl	%r15d, %r15d
	movq	%rcx, %rax
	salq	$4, %rax
	addq	%rcx, %rax
	leaq	(%rbx,%rax,4), %rax
	movq	%rax, (%rsp)
.L146:
	movq	(%rsp), %rax
	movl	%r13d, %esi
	cmpl	$-1, (%rax,%r13,4)
	je	.L142
	cmpl	$1, %r12d
	jne	.L145
	cmpl	$1, %r13d
	je	.L162
.L145:
	movl	%r14d, %edi
	subq	$1, %r13
	call	f
	addl	%eax, %r15d
	testl	%r13d, %r13d
	jg	.L146
.L142:
	movl	%r15d, %edx
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L147
.L162:
	addl	$1, %r15d
	jmp	.L142
.L140:
	movq	40(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L163
	addq	$56, %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
.L150:
	.cfi_restore_state
	xorl	%r15d, %r15d
	jmp	.L142
.L163:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE24:
	.size	main, .-main
	.globl	j
	.bss
	.align 4
	.type	j, @object
	.size	j, 4
j:
	.zero	4
	.globl	i
	.align 4
	.type	i, @object
	.size	i, 4
i:
	.zero	4
	.globl	X
	.align 32
	.type	X, @object
	.size	X, 1156
X:
	.zero	1156
	.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	f
	.type	f, @function
f:
.LFB23:
	.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
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$248, %rsp
	.cfi_def_cfa_offset 304
	movl	%esi, 28(%rsp)
	testl	%edi, %edi
	jle	.L46
	movl	i(%rip), %r10d
	testl	%esi, %esi
	jle	.L46
	movl	%edi, %r9d
	cmpl	%r10d, %edi
	jg	.L46
	movslq	%edi, %rax
	movslq	%esi, %rcx
	movl	j(%rip), %r11d
	xorl	%r8d, %r8d
	movq	%rax, %rdx
	movl	%r8d, 8(%rsp)
	salq	$4, %rdx
	movl	%r9d, 192(%rsp)
	movl	%r11d, %r8d
	movl	%r10d, %r11d
	addq	%rax, %rdx
	leaq	-136(%rcx,%rdx), %rcx
	leaq	X(%rip), %rdx
	leaq	(%rdx,%rcx,4), %rbx
	leal	-1(%rdi), %edx
	imulq	$-68, %rax, %rcx
	movq	%rdx, %rax
	movl	%edx, 116(%rsp)
	salq	$4, %rax
	movq	%rbx, 72(%rsp)
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rcx, %r9
	movq	%rax, 136(%rsp)
	leal	-2(%rdi), %eax
	movslq	%eax, %rdx
	movl	%eax, 96(%rsp)
	movq	%rdx, %rax
	salq	$4, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, 144(%rsp)
	leal	-3(%rdi), %eax
	movslq	%eax, %rdx
	movl	%eax, 100(%rsp)
	movq	%rdx, %rax
	salq	$4, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, 152(%rsp)
	leal	-4(%rdi), %eax
	movslq	%eax, %rdx
	movl	%eax, 104(%rsp)
	movq	%rdx, %rax
	salq	$4, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, 160(%rsp)
	leal	-5(%rdi), %eax
	movslq	%eax, %rdx
	movl	%eax, 108(%rsp)
	movq	%rdx, %rax
	salq	$4, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, 168(%rsp)
	leal	-6(%rdi), %eax
	movslq	%eax, %rdx
	movl	%eax, 112(%rsp)
	movq	%rdx, %rax
	salq	$4, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, 176(%rsp)
	leal	-7(%rdi), %eax
	movslq	%eax, %rdx
	movl	%eax, 120(%rsp)
	movq	%rdx, %rax
	salq	$4, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, 184(%rsp)
	leal	-8(%rdi), %eax
	leal	-9(%rdi), %edi
	movl	%eax, 124(%rsp)
.L44:
	movl	28(%rsp), %eax
	cmpl	%eax, %r8d
	jl	.L127
	movq	72(%rsp), %rcx
	cmpl	$-1, 544(%rcx)
	je	.L127
	cmpl	$1, 192(%rsp)
	jne	.L3
	cmpl	$1, %eax
	je	.L130
.L3:
	movl	116(%rsp), %eax
	cmpl	%r11d, %eax
	jg	.L4
	testl	%eax, %eax
	je	.L4
	movq	72(%rsp), %rax
	xorl	%r10d, %r10d
	movq	%rax, 64(%rsp)
	movl	28(%rsp), %eax
	movl	%eax, 12(%rsp)
	movq	%r9, %rax
	movl	%r10d, %r9d
	movl	%r11d, %r10d
	movl	%r8d, %r11d
	movq	%rax, %r8
.L42:
	movq	64(%rsp), %rax
	movq	136(%rsp), %rcx
	addq	%r8, %rax
	cmpl	$-1, 544(%rax,%rcx)
	je	.L54
	cmpl	$1, 116(%rsp)
	jne	.L6
	cmpl	$1, 12(%rsp)
	je	.L131
.L6:
	movl	96(%rsp), %esi
	cmpl	%r10d, %esi
	setg	%al
	testl	%esi, %esi
	sete	%dl
	orb	%dl, %al
	jne	.L7
	movl	12(%rsp), %eax
	cmpl	%eax, %r11d
	jl	.L7
	movq	64(%rsp), %rbx
	movl	%eax, 16(%rsp)
	xorl	%r15d, %r15d
	movl	%r9d, 80(%rsp)
	movl	%r11d, %r9d
	movl	%r15d, %r11d
	movq	%rbx, 56(%rsp)
.L40:
	movq	56(%rsp), %rax
	movq	144(%rsp), %rcx
	addq	%r8, %rax
	cmpl	$-1, 544(%rax,%rcx)
	je	.L53
	cmpl	$1, 96(%rsp)
	jne	.L9
	cmpl	$1, 16(%rsp)
	je	.L132
.L9:
	movl	100(%rsp), %esi
	cmpl	%r10d, %esi
	setg	%al
	testl	%esi, %esi
	sete	%dl
	orb	%dl, %al
	jne	.L10
	movl	16(%rsp), %eax
	cmpl	%eax, %r9d
	jl	.L10
	movq	56(%rsp), %rbx
	movl	%eax, 20(%rsp)
	xorl	%r14d, %r14d
	movl	%r9d, %ebp
	movl	%r11d, 84(%rsp)
	movq	%r8, %r9
	movl	%r10d, %r11d
	movl	%r14d, %r8d
	movq	%rbx, 32(%rsp)
.L38:
	movq	32(%rsp), %rax
	movq	152(%rsp), %rcx
	addq	%r9, %rax
	cmpl	$-1, 544(%rax,%rcx)
	je	.L52
	cmpl	$1, 100(%rsp)
	jne	.L12
	cmpl	$1, 20(%rsp)
	je	.L133
.L12:
	movl	104(%rsp), %ebx
	cmpl	%r11d, %ebx
	setg	%al
	testl	%ebx, %ebx
	sete	%dl
	orb	%dl, %al
	jne	.L13
	movl	20(%rsp), %eax
	cmpl	%eax, %ebp
	jl	.L13
	movq	32(%rsp), %rbx
	movl	%eax, 24(%rsp)
	xorl	%r10d, %r10d
	movl	%r8d, 88(%rsp)
	movq	%rbx, 48(%rsp)
.L36:
	movq	48(%rsp), %rax
	movq	160(%rsp), %rcx
	addq	%r9, %rax
	cmpl	$-1, 544(%rax,%rcx)
	je	.L51
	cmpl	$1, 104(%rsp)
	jne	.L15
	cmpl	$1, 24(%rsp)
	je	.L134
.L15:
	movl	108(%rsp), %esi
	cmpl	%r11d, %esi
	setg	%al
	testl	%esi, %esi
	sete	%dl
	orb	%dl, %al
	jne	.L16
	movl	24(%rsp), %ecx
	cmpl	%ecx, %ebp
	jl	.L16
	movq	48(%rsp), %rax
	movl	%r10d, 92(%rsp)
	xorl	%ebx, %ebx
	movq	%rax, 40(%rsp)
.L34:
	movq	40(%rsp), %rax
	movq	168(%rsp), %rsi
	addq	%r9, %rax
	cmpl	$-1, 544(%rax,%rsi)
	je	.L50
	cmpl	$1, 108(%rsp)
	jne	.L18
	cmpl	$1, %ecx
	je	.L135
.L18:
	movl	112(%rsp), %esi
	cmpl	%r11d, %esi
	setg	%al
	testl	%esi, %esi
	sete	%dl
	orb	%dl, %al
	jne	.L19
	cmpl	%ecx, %ebp
	jl	.L19
	movq	40(%rsp), %r10
	movl	%ecx, %r14d
	xorl	%r12d, %r12d
.L32:
	movq	176(%rsp), %rdx
	leaq	(%r10,%r9), %rax
	cmpl	$-1, 544(%rax,%rdx)
	je	.L49
	cmpl	$1, 112(%rsp)
	jne	.L21
	cmpl	$1, %r14d
	je	.L136
.L21:
	movl	120(%rsp), %esi
	cmpl	%r11d, %esi
	setg	%al
	testl	%esi, %esi
	sete	%dl
	orb	%dl, %al
	jne	.L22
	cmpl	%r14d, %ebp
	jl	.L22
	movq	%r10, %r8
	movl	%r14d, %r15d
	xorl	%r13d, %r13d
.L30:
	movq	184(%rsp), %rsi
	leaq	(%r8,%r9), %rax
	cmpl	$-1, 544(%rax,%rsi)
	je	.L48
	cmpl	$1, 120(%rsp)
	jne	.L24
	cmpl	$1, %r15d
	je	.L137
.L24:
	movl	124(%rsp), %edx
	cmpl	%r11d, %edx
	setg	%al
	testl	%edx, %edx
	sete	%dl
	orb	%dl, %al
	jne	.L25
	cmpl	%r15d, %ebp
	jl	.L25
	movq	%r8, 128(%rsp)
	movl	%r15d, %esi
	xorl	%edx, %edx
.L28:
	movq	128(%rsp), %rax
	cmpl	$-1, (%rax)
	je	.L47
	cmpl	$1, 124(%rsp)
	jne	.L27
	cmpl	$1, %esi
	je	.L138
.L27:
	movq	%r9, 232(%rsp)
	movl	%r11d, 228(%rsp)
	movq	%r8, 216(%rsp)
	movl	%edx, 224(%rsp)
	movq	%r10, 208(%rsp)
	movl	%ecx, 204(%rsp)
	movl	%esi, 200(%rsp)
	movl	%edi, 196(%rsp)
	call	f
	movl	224(%rsp), %edx
	movl	200(%rsp), %esi
	subq	$4, 128(%rsp)
	movl	196(%rsp), %edi
	addl	%eax, %edx
	subl	$1, %esi
	movl	204(%rsp), %ecx
	movq	208(%rsp), %r10
	movq	216(%rsp), %r8
	movl	228(%rsp), %r11d
	movq	232(%rsp), %r9
	je	.L47
	cmpl	%esi, %ebp
	jge	.L28
.L47:
	addl	%edx, %r13d
.L25:
	subq	$4, %r8
	subl	$1, %r15d
	je	.L48
	cmpl	%r15d, %ebp
	jge	.L30
.L48:
	addl	%r13d, %r12d
.L22:
	subl	$1, %r14d
	subq	$4, %r10
	cmpl	%r14d, %ebp
	jl	.L49
	testl	%r14d, %r14d
	jne	.L32
.L49:
	addl	%r12d, %ebx
.L19:
	subl	$1, %ecx
	subq	$4, 40(%rsp)
	cmpl	%ecx, %ebp
	jl	.L50
	testl	%ecx, %ecx
	jne	.L34
.L50:
	movl	92(%rsp), %r10d
	addl	%ebx, %r10d
.L16:
	subq	$4, 48(%rsp)
	subl	$1, 24(%rsp)
	movl	24(%rsp), %eax
	je	.L51
	cmpl	%eax, %ebp
	jge	.L36
.L51:
	movl	88(%rsp), %r8d
	addl	%r10d, %r8d
.L13:
	subl	$1, 20(%rsp)
	movl	20(%rsp), %eax
	subq	$4, 32(%rsp)
	cmpl	%eax, %ebp
	jl	.L52
	testl	%eax, %eax
	jne	.L38
.L52:
	movl	%r11d, %r10d
	movl	84(%rsp), %r11d
	movl	%r8d, %r14d
	movq	%r9, %r8
	movl	%ebp, %r9d
	addl	%r14d, %r11d
.L10:
	subl	$1, 16(%rsp)
	movl	16(%rsp), %eax
	subq	$4, 56(%rsp)
	cmpl	%eax, %r9d
	jl	.L53
	testl	%eax, %eax
	jne	.L40
.L53:
	movl	%r11d, %r15d
	movl	%r9d, %r11d
	movl	80(%rsp), %r9d
	addl	%r15d, %r9d
.L7:
	subl	$1, 12(%rsp)
	movl	12(%rsp), %eax
	subq	$4, 64(%rsp)
	cmpl	%eax, %r11d
	jl	.L54
	testl	%eax, %eax
	jne	.L42
.L54:
	movq	%r8, %rax
	movl	%r11d, %r8d
	movl	%r10d, %r11d
	movl	%r9d, %r10d
	addl	%r10d, 8(%rsp)
	movq	%rax, %r9
.L4:
	subl	$1, 28(%rsp)
	movl	28(%rsp), %eax
	subq	$4, 72(%rsp)
	testl	%eax, %eax
	jg	.L44
.L127:
	movl	8(%rsp), %r8d
.L1:
	addq	$248, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	movl	%r8d, %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
.L136:
	.cfi_restore_state
	leal	1(%r12,%rbx), %ebx
	jmp	.L19
.L137:
	leal	1(%r13,%r12), %r12d
	jmp	.L22
.L135:
	movl	92(%rsp), %r10d
	leal	1(%r10,%rbx), %r10d
	jmp	.L16
	.p2align 4,,10
	.p2align 3
.L138:
	leal	1(%rdx,%r13), %r13d
	jmp	.L25
.L134:
	movl	88(%rsp), %r8d
	leal	1(%r8,%r10), %r8d
	jmp	.L13
.L131:
	movq	%r8, %rax
	movl	%r11d, %r8d
	movl	%r10d, %r11d
	movl	%r9d, %r10d
	movq	%rax, %r9
	movl	8(%rsp), %eax
	leal	1(%r10,%rax), %eax
	movl	%eax, 8(%rsp)
	jmp	.L4
.L132:
	movl	%r11d, %r15d
	movl	%r9d, %r11d
	movl	80(%rsp), %r9d
	leal	1(%r9,%r15), %r9d
	jmp	.L7
.L133:
	movl	%r11d, %r10d
	movl	84(%rsp), %r11d
	movl	%r8d, %r14d
	movq	%r9, %r8
	movl	%ebp, %r9d
	leal	1(%r11,%r14), %r11d
	jmp	.L10
.L46:
	xorl	%r8d, %r8d
	jmp	.L1
.L130:
	movl	8(%rsp), %r8d
	addl	$1, %r8d
	jmp	.L1
	.cfi_endproc
.LFE23:
	.size	f, .-f
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%d"
.LC2:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB24:
	.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
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	leaq	.LC0(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	X(%rip), %rbx
	subq	$56, %rsp
	.cfi_def_cfa_offset 112
	movq	%fs:40, %rax
	movq	%rax, 40(%rsp)
	xorl	%eax, %eax
	leaq	28(%rsp), %rax
	movq	%rax, 8(%rsp)
.L147:
	xorl	%eax, %eax
	leaq	j(%rip), %rdx
	leaq	i(%rip), %rsi
	movq	%rbp, %rdi
	call	__isoc99_scanf@PLT
	movl	i(%rip), %eax
	orl	j(%rip), %eax
	je	.L140
	movq	8(%rsp), %rsi
	xorl	%eax, %eax
	xorl	%r14d, %r14d
	leaq	36(%rsp), %r13
	leaq	.LC1(%rip), %rdi
	leaq	32(%rsp), %r12
	call	__isoc99_scanf@PLT
	xorl	%eax, %eax
	movl	$144, %ecx
	movq	%rbx, %rdi
	rep stosq
	movl	28(%rsp), %eax
	movl	$0, (%rdi)
	testl	%eax, %eax
	jle	.L144
	.p2align 4,,10
	.p2align 3
.L141:
	movq	%r13, %rdx
	movq	%r12, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	32(%rsp), %rdx
	movslq	36(%rsp), %rcx
	addl	$1, %r14d
	movq	%rdx, %rax
	salq	$4, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	movl	$-1, (%rbx,%rax,4)
	cmpl	%r14d, 28(%rsp)
	jg	.L141
.L144:
	movl	i(%rip), %r12d
	movl	j(%rip), %edx
	testl	%r12d, %r12d
	jle	.L150
	testl	%edx, %edx
	jle	.L150
	movslq	%r12d, %rcx
	movslq	%edx, %r13
	leal	-1(%r12), %r14d
	xorl	%r15d, %r15d
	movq	%rcx, %rax
	salq	$4, %rax
	addq	%rcx, %rax
	leaq	(%rbx,%rax,4), %rax
	movq	%rax, (%rsp)
.L146:
	movq	(%rsp), %rax
	movl	%r13d, %esi
	cmpl	$-1, (%rax,%r13,4)
	je	.L142
	cmpl	$1, %r12d
	jne	.L145
	cmpl	$1, %r13d
	je	.L162
.L145:
	movl	%r14d, %edi
	subq	$1, %r13
	call	f
	addl	%eax, %r15d
	testl	%r13d, %r13d
	jg	.L146
.L142:
	movl	%r15d, %edx
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L147
.L162:
	addl	$1, %r15d
	jmp	.L142
.L140:
	movq	40(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L163
	addq	$56, %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
.L150:
	.cfi_restore_state
	xorl	%r15d, %r15d
	jmp	.L142
.L163:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE24:
	.size	main, .-main
	.globl	j
	.bss
	.align 4
	.type	j, @object
	.size	j, 4
j:
	.zero	4
	.globl	i
	.align 4
	.type	i, @object
	.size	i, 4
i:
	.zero	4
	.globl	X
	.align 32
	.type	X, @object
	.size	X, 1156
X:
	.zero	1156
	.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 X[17][17]={0};
int i,j;
int f(int x,int y){
    if(x<=0||x>i||y<=0||y>j||X[x][y]==-1)return 0;
    if(x==1 && y==1)return 1;
    return f(x-1,y)+f(x,y-1);
}
int main(void){
    int n,d,e,k,l,m;
    while(1){
    scanf("%d%d",&i,&j);
    if(i==0 && j==0)break;
    scanf("%d",&n);
    for(l=0;l<17;l++){
        for(m=0;m<17;m++){
            X[l][m]=0;
        }
    }
    for(k=0;k<n;k++){
        scanf("%d%d",&d,&e);
        X[d][e]=-1;
    }
    printf("%d\n",f(i,j));
    }
    return 0;
}
5 4
3
2 2
2 3
4 2
5 4
3
2 2
2 3
4 2
0 0

5
5

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 X[17][17]={0};
int i,j;
int f(int x,int y){
    if(x<=0||x>i||y<=0||y>j||X[x][y]==-1)return 0;
    if(x==1 && y==1)return 1;
    return f(x-1,y)+f(x,y-1);
}
int main(void){
    int n,d,e,k,l,m;
    while(1){
    scanf("%d%d",&i,&j);
    if(i==0 && j==0)break;
    scanf("%d",&n);
    for(l=0;l<17;l++){
        for(m=0;m<17;m++){
            X[l][m]=0;
        }
    }
    for(k=0;k<n;k++){
        scanf("%d%d",&d,&e);
        X[d][e]=-1;
    }
    printf("%d\n",f(i,j));
    }
    return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	X
	.bss
	.align 32
	.type	X, @object
	.size	X, 1156
X:
	.zero	1156
	.globl	i
	.align 4
	.type	i, @object
	.size	i, 4
i:
	.zero	4
	.globl	j
	.align 4
	.type	j, @object
	.size	j, 4
j:
	.zero	4
	.text
	.globl	f
	.type	f, @function
f:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset 3, -24
	movl	%edi, -20(%rbp)
	movl	%esi, -24(%rbp)
	cmpl	$0, -20(%rbp)
	jle	.L2
	movl	i(%rip), %eax
	cmpl	%eax, -20(%rbp)
	jg	.L2
	cmpl	$0, -24(%rbp)
	jle	.L2
	movl	j(%rip), %eax
	cmpl	%eax, -24(%rbp)
	jg	.L2
	movl	-24(%rbp), %eax
	movslq	%eax, %rcx
	movl	-20(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$4, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	X(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	$-1, %eax
	jne	.L3
.L2:
	movl	$0, %eax
	jmp	.L4
.L3:
	cmpl	$1, -20(%rbp)
	jne	.L5
	cmpl	$1, -24(%rbp)
	jne	.L5
	movl	$1, %eax
	jmp	.L4
.L5:
	movl	-20(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-24(%rbp), %eax
	movl	%eax, %esi
	movl	%edx, %edi
	call	f
	movl	%eax, %ebx
	movl	-24(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-20(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	f
	addl	%ebx, %eax
.L4:
	movq	-8(%rbp), %rbx
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	f, .-f
	.section	.rodata
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%d"
.LC2:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.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
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
.L15:
	leaq	j(%rip), %rax
	movq	%rax, %rdx
	leaq	i(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	i(%rip), %eax
	testl	%eax, %eax
	jne	.L7
	movl	j(%rip), %eax
	testl	%eax, %eax
	je	.L19
.L7:
	leaq	-32(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -16(%rbp)
	jmp	.L9
.L12:
	movl	$0, -12(%rbp)
	jmp	.L10
.L11:
	movl	-12(%rbp), %eax
	movslq	%eax, %rcx
	movl	-16(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$4, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	X(%rip), %rax
	movl	$0, (%rdx,%rax)
	addl	$1, -12(%rbp)
.L10:
	cmpl	$16, -12(%rbp)
	jle	.L11
	addl	$1, -16(%rbp)
.L9:
	cmpl	$16, -16(%rbp)
	jle	.L12
	movl	$0, -20(%rbp)
	jmp	.L13
.L14:
	leaq	-24(%rbp), %rdx
	leaq	-28(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-28(%rbp), %eax
	movl	-24(%rbp), %edx
	movslq	%edx, %rcx
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$4, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	X(%rip), %rax
	movl	$-1, (%rdx,%rax)
	addl	$1, -20(%rbp)
.L13:
	movl	-32(%rbp), %eax
	cmpl	%eax, -20(%rbp)
	jl	.L14
	movl	j(%rip), %edx
	movl	i(%rip), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	f
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L15
.L19:
	nop
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L17
	call	__stack_chk_fail@PLT
.L17:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.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
	.globl	X
	.bss
	.align 32
	.type	X, @object
	.size	X, 1156
X:
	.zero	1156
	.globl	i
	.align 4
	.type	i, @object
	.size	i, 4
i:
	.zero	4
	.globl	j
	.align 4
	.type	j, @object
	.size	j, 4
j:
	.zero	4
	.text
	.globl	f
	.type	f, @function
f:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset 3, -24
	movl	%edi, -20(%rbp)
	movl	%esi, -24(%rbp)
	cmpl	$0, -20(%rbp)
	jle	.L2
	movl	i(%rip), %eax
	cmpl	%eax, -20(%rbp)
	jg	.L2
	cmpl	$0, -24(%rbp)
	jle	.L2
	movl	j(%rip), %eax
	cmpl	%eax, -24(%rbp)
	jg	.L2
	movl	-24(%rbp), %eax
	movslq	%eax, %rcx
	movl	-20(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$4, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	X(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	$-1, %eax
	jne	.L3
.L2:
	movl	$0, %eax
	jmp	.L4
.L3:
	cmpl	$1, -20(%rbp)
	jne	.L5
	cmpl	$1, -24(%rbp)
	jne	.L5
	movl	$1, %eax
	jmp	.L4
.L5:
	movl	-20(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-24(%rbp), %eax
	movl	%eax, %esi
	movl	%edx, %edi
	call	f
	movl	%eax, %ebx
	movl	-24(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-20(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	f
	addl	%ebx, %eax
.L4:
	movq	-8(%rbp), %rbx
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	f, .-f
	.section	.rodata
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%d"
.LC2:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.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
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
.L15:
	leaq	j(%rip), %rax
	movq	%rax, %rdx
	leaq	i(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	i(%rip), %eax
	testl	%eax, %eax
	jne	.L7
	movl	j(%rip), %eax
	testl	%eax, %eax
	je	.L19
.L7:
	leaq	-32(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -16(%rbp)
	jmp	.L9
.L12:
	movl	$0, -12(%rbp)
	jmp	.L10
.L11:
	movl	-12(%rbp), %eax
	movslq	%eax, %rcx
	movl	-16(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$4, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	X(%rip), %rax
	movl	$0, (%rdx,%rax)
	addl	$1, -12(%rbp)
.L10:
	cmpl	$16, -12(%rbp)
	jle	.L11
	addl	$1, -16(%rbp)
.L9:
	cmpl	$16, -16(%rbp)
	jle	.L12
	movl	$0, -20(%rbp)
	jmp	.L13
.L14:
	leaq	-24(%rbp), %rdx
	leaq	-28(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-28(%rbp), %eax
	movl	-24(%rbp), %edx
	movslq	%edx, %rcx
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$4, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	X(%rip), %rax
	movl	$-1, (%rdx,%rax)
	addl	$1, -20(%rbp)
.L13:
	movl	-32(%rbp), %eax
	cmpl	%eax, -20(%rbp)
	jl	.L14
	movl	j(%rip), %edx
	movl	i(%rip), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	f
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L15
.L19:
	nop
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L17
	call	__stack_chk_fail@PLT
.L17:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.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:
