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 width,height;
char map[20][21];
 
int tansaku(int x,int y) {
    int result=1;
    if(x<0 || x>=width || y<0 || y>=height)return 0;
    if(map[y][x]=='#')return 0;
    map[y][x]='#';
    result+=tansaku(x-1,y);
    result+=tansaku(x+1,y);
    result+=tansaku(x,y-1);
    result+=tansaku(x,y+1);
    return result;
}
 
int main(void) {
    int i,j;
    int sx,sy;
    while(1) {
        scanf("%d%d",&width,&height);
        if(width==0 && height==0)break;
        for(i=0;i<height;i++) {
            scanf("%s",map[i]);
            for(j=0;j<width;j++) {
                if(map[i][j]=='@'){sx=j;sy=i;}
            }
        }
        printf("%d\n",tansaku(sx,sy));
    }
    return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	width
	.bss
	.align 4
	.type	width, @object
	.size	width, 4
width:
	.zero	4
	.globl	height
	.align 4
	.type	height, @object
	.size	height, 4
height:
	.zero	4
	.globl	map
	.align 32
	.type	map, @object
	.size	map, 420
map:
	.zero	420
	.text
	.globl	tansaku
	.type	tansaku, @function
tansaku:
.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	$1, -4(%rbp)
	cmpl	$0, -20(%rbp)
	js	.L2
	movl	width(%rip), %eax
	cmpl	%eax, -20(%rbp)
	jge	.L2
	cmpl	$0, -24(%rbp)
	js	.L2
	movl	height(%rip), %eax
	cmpl	%eax, -24(%rbp)
	jl	.L3
.L2:
	movl	$0, %eax
	jmp	.L4
.L3:
	movl	-20(%rbp), %eax
	movslq	%eax, %rcx
	movl	-24(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	(%rax,%rcx), %rdx
	leaq	map(%rip), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	cmpb	$35, %al
	jne	.L5
	movl	$0, %eax
	jmp	.L4
.L5:
	movl	-20(%rbp), %eax
	movslq	%eax, %rcx
	movl	-24(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	(%rax,%rcx), %rdx
	leaq	map(%rip), %rax
	addq	%rdx, %rax
	movb	$35, (%rax)
	movl	-20(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-24(%rbp), %eax
	movl	%eax, %esi
	movl	%edx, %edi
	call	tansaku
	addl	%eax, -4(%rbp)
	movl	-20(%rbp), %eax
	leal	1(%rax), %edx
	movl	-24(%rbp), %eax
	movl	%eax, %esi
	movl	%edx, %edi
	call	tansaku
	addl	%eax, -4(%rbp)
	movl	-24(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-20(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	tansaku
	addl	%eax, -4(%rbp)
	movl	-24(%rbp), %eax
	leal	1(%rax), %edx
	movl	-20(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	tansaku
	addl	%eax, -4(%rbp)
	movl	-4(%rbp), %eax
.L4:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	tansaku, .-tansaku
	.section	.rodata
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%s"
.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	$16, %rsp
.L14:
	leaq	height(%rip), %rax
	movq	%rax, %rdx
	leaq	width(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	width(%rip), %eax
	testl	%eax, %eax
	jne	.L7
	movl	height(%rip), %eax
	testl	%eax, %eax
	je	.L17
.L7:
	movl	$0, -16(%rbp)
	jmp	.L9
.L13:
	movl	-16(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	map(%rip), %rdx
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -12(%rbp)
	jmp	.L10
.L12:
	movl	-12(%rbp), %eax
	movslq	%eax, %rcx
	movl	-16(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	(%rax,%rcx), %rdx
	leaq	map(%rip), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	cmpb	$64, %al
	jne	.L11
	movl	-12(%rbp), %eax
	movl	%eax, -8(%rbp)
	movl	-16(%rbp), %eax
	movl	%eax, -4(%rbp)
.L11:
	addl	$1, -12(%rbp)
.L10:
	movl	width(%rip), %eax
	cmpl	%eax, -12(%rbp)
	jl	.L12
	addl	$1, -16(%rbp)
.L9:
	movl	height(%rip), %eax
	cmpl	%eax, -16(%rbp)
	jl	.L13
	movl	-4(%rbp), %edx
	movl	-8(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	tansaku
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L14
.L17:
	nop
	movl	$0, %eax
	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	tansaku
	.type	tansaku, @function
tansaku:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movl	%esi, %eax
	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	$8, %rsp
	.cfi_def_cfa_offset 64
	orl	%edi, %eax
	js	.L4
	cmpl	width(%rip), %edi
	movl	%edi, %r13d
	jge	.L4
	movslq	%esi, %rax
	movl	%esi, %ebp
	leal	-1(%rdi), %r14d
	xorl	%r15d, %r15d
	leaq	(%rax,%rax,4), %rdx
	leaq	(%rax,%rdx,4), %r12
	movslq	%edi, %rax
	addq	%rax, %r12
	leaq	map(%rip), %rax
	addq	%rax, %r12
	.p2align 4,,10
	.p2align 3
.L3:
	cmpl	%ebp, height(%rip)
	jle	.L1
	cmpb	$35, (%r12)
	je	.L1
	movb	$35, (%r12)
	movl	%ebp, %esi
	movl	%r14d, %edi
	addq	$21, %r12
	call	tansaku
	movl	%ebp, %esi
	leal	1(%r13), %edi
	leal	1(%rax), %ebx
	call	tansaku
	leal	-1(%rbp), %esi
	movl	%r13d, %edi
	addl	$1, %ebp
	addl	%eax, %ebx
	call	tansaku
	addl	%eax, %ebx
	addl	%ebx, %r15d
	cmpl	%r13d, width(%rip)
	jg	.L3
.L1:
	addq	$8, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	movl	%r15d, %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
.L4:
	.cfi_restore_state
	xorl	%r15d, %r15d
	jmp	.L1
	.cfi_endproc
.LFE23:
	.size	tansaku, .-tansaku
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%s"
.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
	leaq	height(%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
	leaq	.LC1(%rip), %rbx
	subq	$8, %rsp
	.cfi_def_cfa_offset 64
	.p2align 4,,10
	.p2align 3
.L15:
	xorl	%eax, %eax
	movq	%r13, %rdx
	leaq	width(%rip), %rsi
	leaq	.LC0(%rip), %rdi
	call	__isoc99_scanf@PLT
	movl	height(%rip), %eax
	movl	%eax, %ecx
	orl	width(%rip), %ecx
	je	.L9
	testl	%eax, %eax
	jle	.L10
	leaq	map(%rip), %r12
	xorl	%ebp, %ebp
	.p2align 4,,10
	.p2align 3
.L14:
	movq	%r12, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	width(%rip), %rdx
	testl	%edx, %edx
	jle	.L11
	xorl	%eax, %eax
	.p2align 4,,10
	.p2align 3
.L13:
	cmpb	$64, (%r12,%rax)
	cmove	%ebp, %r15d
	cmove	%eax, %r14d
	addq	$1, %rax
	cmpq	%rdx, %rax
	jne	.L13
.L11:
	addl	$1, %ebp
	addq	$21, %r12
	cmpl	%ebp, height(%rip)
	jg	.L14
.L10:
	movl	%r15d, %esi
	movl	%r14d, %edi
	call	tansaku
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	movl	%eax, %edx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L15
.L9:
	addq	$8, %rsp
	.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
	.cfi_endproc
.LFE24:
	.size	main, .-main
	.globl	map
	.bss
	.align 32
	.type	map, @object
	.size	map, 420
map:
	.zero	420
	.globl	height
	.align 4
	.type	height, @object
	.size	height, 4
height:
	.zero	4
	.globl	width
	.align 4
	.type	width, @object
	.size	width, 4
width:
	.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	tansaku
	.type	tansaku, @function
tansaku:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movl	%esi, %eax
	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	$8, %rsp
	.cfi_def_cfa_offset 64
	orl	%edi, %eax
	js	.L4
	cmpl	width(%rip), %edi
	movl	%edi, %r13d
	jge	.L4
	movslq	%esi, %rax
	movl	%esi, %ebp
	leal	-1(%rdi), %r14d
	xorl	%r15d, %r15d
	leaq	(%rax,%rax,4), %rdx
	leaq	(%rax,%rdx,4), %r12
	movslq	%edi, %rax
	addq	%rax, %r12
	leaq	map(%rip), %rax
	addq	%rax, %r12
	.p2align 4,,10
	.p2align 3
.L3:
	cmpl	%ebp, height(%rip)
	jle	.L1
	cmpb	$35, (%r12)
	je	.L1
	movb	$35, (%r12)
	movl	%ebp, %esi
	movl	%r14d, %edi
	addq	$21, %r12
	call	tansaku
	movl	%ebp, %esi
	leal	1(%r13), %edi
	leal	1(%rax), %ebx
	call	tansaku
	leal	-1(%rbp), %esi
	movl	%r13d, %edi
	addl	$1, %ebp
	addl	%eax, %ebx
	call	tansaku
	addl	%eax, %ebx
	addl	%ebx, %r15d
	cmpl	%r13d, width(%rip)
	jg	.L3
.L1:
	addq	$8, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	movl	%r15d, %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
.L4:
	.cfi_restore_state
	xorl	%r15d, %r15d
	jmp	.L1
	.cfi_endproc
.LFE23:
	.size	tansaku, .-tansaku
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%s"
.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
	leaq	height(%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
	leaq	.LC1(%rip), %rbx
	subq	$8, %rsp
	.cfi_def_cfa_offset 64
	.p2align 4,,10
	.p2align 3
.L15:
	xorl	%eax, %eax
	movq	%r13, %rdx
	leaq	width(%rip), %rsi
	leaq	.LC0(%rip), %rdi
	call	__isoc99_scanf@PLT
	movl	height(%rip), %eax
	movl	%eax, %ecx
	orl	width(%rip), %ecx
	je	.L9
	testl	%eax, %eax
	jle	.L10
	leaq	map(%rip), %r12
	xorl	%ebp, %ebp
	.p2align 4,,10
	.p2align 3
.L14:
	movq	%r12, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	width(%rip), %rdx
	testl	%edx, %edx
	jle	.L11
	xorl	%eax, %eax
	.p2align 4,,10
	.p2align 3
.L13:
	cmpb	$64, (%r12,%rax)
	cmove	%ebp, %r15d
	cmove	%eax, %r14d
	addq	$1, %rax
	cmpq	%rdx, %rax
	jne	.L13
.L11:
	addl	$1, %ebp
	addq	$21, %r12
	cmpl	%ebp, height(%rip)
	jg	.L14
.L10:
	movl	%r15d, %esi
	movl	%r14d, %edi
	call	tansaku
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	movl	%eax, %edx
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L15
.L9:
	addq	$8, %rsp
	.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
	.cfi_endproc
.LFE24:
	.size	main, .-main
	.globl	map
	.bss
	.align 32
	.type	map, @object
	.size	map, 420
map:
	.zero	420
	.globl	height
	.align 4
	.type	height, @object
	.size	height, 4
height:
	.zero	4
	.globl	width
	.align 4
	.type	width, @object
	.size	width, 4
width:
	.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:


#include <stdio.h>
 
int width,height;
char map[20][21];
 
int tansaku(int x,int y) {
    int result=1;
    if(x<0 || x>=width || y<0 || y>=height)return 0;
    if(map[y][x]=='#')return 0;
    map[y][x]='#';
    result+=tansaku(x-1,y);
    result+=tansaku(x+1,y);
    result+=tansaku(x,y-1);
    result+=tansaku(x,y+1);
    return result;
}
 
int main(void) {
    int i,j;
    int sx,sy;
    while(1) {
        scanf("%d%d",&width,&height);
        if(width==0 && height==0)break;
        for(i=0;i<height;i++) {
            scanf("%s",map[i]);
            for(j=0;j<width;j++) {
                if(map[i][j]=='@'){sx=j;sy=i;}
            }
        }
        printf("%d\n",tansaku(sx,sy));
    }
    return 0;
}
6 9
....#.
.....#
......
......
......
......
......
@...#
.#..#.
11 9
.#.........
.#.#######.
.#.#.....#.
.#.#.###.#.
.#.#..@#.#.
.#.#####.#.
.#.......#.
.#########.
...........
11 6
..#..#..#..
..#..#..#..
..#..#..###
..#..#..#@.
..#..#..#..
..#..#..#..
7 7
#.#....
..#.#..
.###
...@...
.###
..#.#..
..#.#..
0 0
 6 9
....#.
.....#
......
......
......
......
......
#@...#
.#..#.
11 9
.#.........
.#.#######.
.#.#.....#.
.#.#.###.#.
.#.#..@#.#.
.#.#####.#.
.#.......#.
.#########.
...........
11 6
..#..#..#..
..#..#..#..
..#..#..###
..#..#..#@.
..#..#..#..
..#..#..#..
7 7
..#.#..
..#.#..
###.###
...@...
###."##
..#.#..
..#.#..
0 0
 6 9
....#.
.....#
......
......
......
......
......
@...#
."..#.
11 9
.#.........
.#.#######.
.#.....#.#.
.#.#.###.#.
.#.#..@#.#.
.#.#####.#.
.#.......#.
.#########.
...........
11 6
..#..#..#..
..#..#..#..
..#..#..###
..#..#..#@.
..#..#..#..
..#..#..#..
7 7
#.#....
..#.#..
.###
...@...
.###
..#.#..
..#.#..
0 0
 6 9
....#.
.....#
......
......
......
......
......
@...#
."..#.
11 9
.#.........
.#.#######.
.#.....#.#.
.#.#.###.#.
.#.#..@#.#.
.#.#####.#.
.#.......#.
.#########.
...........
11 6
..#..#..#..
..#..#..#..
..#.."..###
..#..#..#@.
..#..#..#..
..#..#..#..
7 7
#.#....
..#.#..
.###
...@...
.###
..#.#..
..#.#..
0 0
 6 9
....#.
.....#
......
......
......
......
......
@...#
.#..#.
11 9
.#.........
.#.#######.
.#.#.....#.
.#.#.###.#.
.#.#..@#.#.
.#.#####.#.
.#.......#.
.#########.
...........
11 6
..#..#..#..
..#..#..#..
###..#..#..
..#..#..#@.
..#..#..#..
..#..#..#..
7 7
..#.#..
..#.#..
.###
...@...
.###
..#.#..
..#.#..
0 0
 6 9
....#.
.....#
......
......
......
......
......
#@...#
.#..#.
11 9
.#.........
.#.#######.
.#.#.....#.
.#.#.###.#.
.#.#..@#.#.
.#.#####.#.
.#.......#.
.#########.
...........
11 6
..#..#..#..
..#..#..#..
..#..#..###
..#..#..#@.
..#..#..#..
..#..#..#..
13 7
..#.#..
..#.#..
###.###
...@...
###.###
..#.#..
..#.#..
0 0
 6 9
....#.
.....#
......
......
......
......
......
#@...#
.#..#.
12 9
.#.........
.#.#######.
.#.#.....#.
.#.#.###.#.
.#.#..@#.#.
.#.#####.#.
.#.......#.
.#########.
...........
11 6
..#..#..#..
..#..#..#..
..#..#..###
..#..#..#@.
..#..#..#..
..#..#..#..
7 7
..#.#..
..#.#..
###.###
...@...
###."##
..#.#..
..#.#..
0 0
 6 9
....#.
.....#
......
......
......
......
......
@...#
."..#.
11 9
.#.........
.#.#######.
.".....#.#.
.#.#.###.#.
.#.#..@#.#.
.#.#####.#.
.#.......#.
.#########.
...........
11 6
..#..#..#..
..#..#..#..
..#.."..###
..#..#..#@.
..#..#..#..
..#..#..#..
7 7
#.#....
..#.#..
.###
...@...
.###
..#.#..
..#.#..
0 0
 6 9
....#.
.....#
......
......
......
......
......
@...#
."..#.
11 9
.#.........
.#.#######.
##.....#...
.#.#.###.#.
.#.#..@#.#.
.#.#####.#.
.#.......#.
.#########.
...........
11 6
..#..#..#..
..#..#..#..
..#..#..###
..#..#..#@.
..#..#..#..
..#..#..#..
7 7
#.#....
..#.#..
.###
./.@...
.###
..#.#..
..#.#..
0 0
 6 9
./..#.
.....#
......
......
......
......
......
@...#
."..#.
11 9
.#.........
.#######.#.
.#.....#.#.
.#.#.###.#.
.#.#..@#.#.
.#.#####.#.
.#.......#.
.#########.
...........
11 6
..#..#..#..
..#..#..#..
..#.."..#"#
..#..#..#@.
..#..#..#..
..#..#..#..
7 7
#.#....
..#.#..
.###
...@...
.###
..#.#..
..#.#..
0 0

48
59
6
31
 45
59
6
14
 49
59
6
31
 49
59
6
32
 48
59
12
29
 45
59
6
28
 45
68
6
14
 49
60
6
32
 49
57
6
31
 49
59
11
32

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 width,height;
char map[20][21];
 
int tansaku(int x,int y) {
    int result=1;
    if(x<0 || x>=width || y<0 || y>=height)return 0;
    if(map[y][x]=='#')return 0;
    map[y][x]='#';
    result+=tansaku(x-1,y);
    result+=tansaku(x+1,y);
    result+=tansaku(x,y-1);
    result+=tansaku(x,y+1);
    return result;
}
 
int main(void) {
    int i,j;
    int sx,sy;
    while(1) {
        scanf("%d%d",&width,&height);
        if(width==0 && height==0)break;
        for(i=0;i<height;i++) {
            scanf("%s",map[i]);
            for(j=0;j<width;j++) {
                if(map[i][j]=='@'){sx=j;sy=i;}
            }
        }
        printf("%d\n",tansaku(sx,sy));
    }
    return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	width
	.bss
	.align 4
	.type	width, @object
	.size	width, 4
width:
	.zero	4
	.globl	height
	.align 4
	.type	height, @object
	.size	height, 4
height:
	.zero	4
	.globl	map
	.align 32
	.type	map, @object
	.size	map, 420
map:
	.zero	420
	.text
	.globl	tansaku
	.type	tansaku, @function
tansaku:
.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	$1, -4(%rbp)
	cmpl	$0, -20(%rbp)
	js	.L2
	movl	width(%rip), %eax
	cmpl	%eax, -20(%rbp)
	jge	.L2
	cmpl	$0, -24(%rbp)
	js	.L2
	movl	height(%rip), %eax
	cmpl	%eax, -24(%rbp)
	jl	.L3
.L2:
	movl	$0, %eax
	jmp	.L4
.L3:
	movl	-20(%rbp), %eax
	movslq	%eax, %rcx
	movl	-24(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	(%rax,%rcx), %rdx
	leaq	map(%rip), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	cmpb	$35, %al
	jne	.L5
	movl	$0, %eax
	jmp	.L4
.L5:
	movl	-20(%rbp), %eax
	movslq	%eax, %rcx
	movl	-24(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	(%rax,%rcx), %rdx
	leaq	map(%rip), %rax
	addq	%rdx, %rax
	movb	$35, (%rax)
	movl	-20(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-24(%rbp), %eax
	movl	%eax, %esi
	movl	%edx, %edi
	call	tansaku
	addl	%eax, -4(%rbp)
	movl	-20(%rbp), %eax
	leal	1(%rax), %edx
	movl	-24(%rbp), %eax
	movl	%eax, %esi
	movl	%edx, %edi
	call	tansaku
	addl	%eax, -4(%rbp)
	movl	-24(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-20(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	tansaku
	addl	%eax, -4(%rbp)
	movl	-24(%rbp), %eax
	leal	1(%rax), %edx
	movl	-20(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	tansaku
	addl	%eax, -4(%rbp)
	movl	-4(%rbp), %eax
.L4:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	tansaku, .-tansaku
	.section	.rodata
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%s"
.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	$16, %rsp
.L14:
	leaq	height(%rip), %rax
	movq	%rax, %rdx
	leaq	width(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	width(%rip), %eax
	testl	%eax, %eax
	jne	.L7
	movl	height(%rip), %eax
	testl	%eax, %eax
	je	.L17
.L7:
	movl	$0, -16(%rbp)
	jmp	.L9
.L13:
	movl	-16(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	map(%rip), %rdx
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -12(%rbp)
	jmp	.L10
.L12:
	movl	-12(%rbp), %eax
	movslq	%eax, %rcx
	movl	-16(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	(%rax,%rcx), %rdx
	leaq	map(%rip), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	cmpb	$64, %al
	jne	.L11
	movl	-12(%rbp), %eax
	movl	%eax, -8(%rbp)
	movl	-16(%rbp), %eax
	movl	%eax, -4(%rbp)
.L11:
	addl	$1, -12(%rbp)
.L10:
	movl	width(%rip), %eax
	cmpl	%eax, -12(%rbp)
	jl	.L12
	addl	$1, -16(%rbp)
.L9:
	movl	height(%rip), %eax
	cmpl	%eax, -16(%rbp)
	jl	.L13
	movl	-4(%rbp), %edx
	movl	-8(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	tansaku
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L14
.L17:
	nop
	movl	$0, %eax
	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.
train
	.file	"temp.c"
	.text
	.globl	width
	.bss
	.align 4
	.type	width, @object
	.size	width, 4
width:
	.zero	4
	.globl	height
	.align 4
	.type	height, @object
	.size	height, 4
height:
	.zero	4
	.globl	map
	.align 32
	.type	map, @object
	.size	map, 420
map:
	.zero	420
	.text
	.globl	tansaku
	.type	tansaku, @function
tansaku:
.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	$1, -4(%rbp)
	cmpl	$0, -20(%rbp)
	js	.L2
	movl	width(%rip), %eax
	cmpl	%eax, -20(%rbp)
	jge	.L2
	cmpl	$0, -24(%rbp)
	js	.L2
	movl	height(%rip), %eax
	cmpl	%eax, -24(%rbp)
	jl	.L3
.L2:
	movl	$0, %eax
	jmp	.L4
.L3:
	movl	-20(%rbp), %eax
	movslq	%eax, %rcx
	movl	-24(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	(%rax,%rcx), %rdx
	leaq	map(%rip), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	cmpb	$35, %al
	jne	.L5
	movl	$0, %eax
	jmp	.L4
.L5:
	movl	-20(%rbp), %eax
	movslq	%eax, %rcx
	movl	-24(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	(%rax,%rcx), %rdx
	leaq	map(%rip), %rax
	addq	%rdx, %rax
	movb	$35, (%rax)
	movl	-20(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-24(%rbp), %eax
	movl	%eax, %esi
	movl	%edx, %edi
	call	tansaku
	addl	%eax, -4(%rbp)
	movl	-20(%rbp), %eax
	leal	1(%rax), %edx
	movl	-24(%rbp), %eax
	movl	%eax, %esi
	movl	%edx, %edi
	call	tansaku
	addl	%eax, -4(%rbp)
	movl	-24(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-20(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	tansaku
	addl	%eax, -4(%rbp)
	movl	-24(%rbp), %eax
	leal	1(%rax), %edx
	movl	-20(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	tansaku
	addl	%eax, -4(%rbp)
	movl	-4(%rbp), %eax
.L4:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	tansaku, .-tansaku
	.section	.rodata
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%s"
.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	$16, %rsp
.L14:
	leaq	height(%rip), %rax
	movq	%rax, %rdx
	leaq	width(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	width(%rip), %eax
	testl	%eax, %eax
	jne	.L7
	movl	height(%rip), %eax
	testl	%eax, %eax
	je	.L17
.L7:
	movl	$0, -16(%rbp)
	jmp	.L9
.L13:
	movl	-16(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	map(%rip), %rdx
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -12(%rbp)
	jmp	.L10
.L12:
	movl	-12(%rbp), %eax
	movslq	%eax, %rcx
	movl	-16(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	(%rax,%rcx), %rdx
	leaq	map(%rip), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	cmpb	$64, %al
	jne	.L11
	movl	-12(%rbp), %eax
	movl	%eax, -8(%rbp)
	movl	-16(%rbp), %eax
	movl	%eax, -4(%rbp)
.L11:
	addl	$1, -12(%rbp)
.L10:
	movl	width(%rip), %eax
	cmpl	%eax, -12(%rbp)
	jl	.L12
	addl	$1, -16(%rbp)
.L9:
	movl	height(%rip), %eax
	cmpl	%eax, -16(%rbp)
	jl	.L13
	movl	-4(%rbp), %edx
	movl	-8(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	tansaku
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L14
.L17:
	nop
	movl	$0, %eax
	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:
