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>
#include<string.h>

#define MAX 1000

int top,bottom;

typedef struct{
	int x;
	int y;
	int cost;
}queue;
queue q[500000];
char map[MAX+2][MAX+2];
int visited[MAX+2][MAX+2];

void init(){
	int i,j;
	for(i=0;i<MAX+2;i++){
		for(j=0;j<MAX+2;j++){
			visited[i][j]=0;
		}
	}
}
void push(int x,int y,int cost){
	q[top].x=x;
	q[top].y=y;
	q[top].cost=cost;
	top++;
}
queue* pop(void){
	if(top==bottom){return NULL;}
	return &q[bottom++];
}

int main(){
	int h,w,n;
	int i;
	int ans=0;
	int list[10][2];//探索リスト
	int vector[4][2]={{-1,0},{1,0},{0,-1},{0,1}};
	scanf("%d %d %d",&h,&w,&n);
	for(i=0;i<h+2;i++){
		if(i==0||i==h+1){
			memset(map[i],'X',w+2);
		}else{
			int j;
			scanf("%s",&map[i][1]);
			map[i][0]='X';
			map[i][w+1]='X';
			if(strchr(map[i],'S')!=NULL){
				list[0][0]=i;
				list[0][1]=(strchr(map[i],'S')-map[i]);
			}
			for(j=0;j<w+2;j++){
				char* p=(strchr(map[i],'0'+j));
				if(p!=NULL){
					list[j][0]=i;
					list[j][1]=p-map[i];
				}
			}
		}
	}
	for(i=0;i<n;i++){
		init();
		top=0;bottom=0;
		push(list[i][0],list[i][1],0);//スタート地点
		while(1){
			int j;
			queue* now;
			now=pop();
			if(now->x==list[i+1][0]&&now->y==list[i+1][1]){//到達したか否か
				ans+=now->cost;				
				break;
			}
			for(j=0;j<4;j++){
				int next_x=now->x+vector[j][0];
				int next_y=now->y+vector[j][1];
				if(map[next_x][next_y]!='X'&&visited[next_x][next_y]!=1){
					visited[next_x][next_y]=1;
					push(next_x,next_y,now->cost+1);
				}
			}
		}
	}
	printf("%d\n",ans);
	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	top
	.bss
	.align 4
	.type	top, @object
	.size	top, 4
top:
	.zero	4
	.globl	bottom
	.align 4
	.type	bottom, @object
	.size	bottom, 4
bottom:
	.zero	4
	.globl	q
	.align 32
	.type	q, @object
	.size	q, 6000000
q:
	.zero	6000000
	.globl	map
	.align 32
	.type	map, @object
	.size	map, 1004004
map:
	.zero	1004004
	.globl	visited
	.align 32
	.type	visited, @object
	.size	visited, 4016016
visited:
	.zero	4016016
	.text
	.globl	init
	.type	init, @function
init:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	$0, -8(%rbp)
	jmp	.L2
.L5:
	movl	$0, -4(%rbp)
	jmp	.L3
.L4:
	movl	-4(%rbp), %eax
	movslq	%eax, %rdx
	movl	-8(%rbp), %eax
	cltq
	imulq	$1002, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	visited(%rip), %rax
	movl	$0, (%rdx,%rax)
	addl	$1, -4(%rbp)
.L3:
	cmpl	$1001, -4(%rbp)
	jle	.L4
	addl	$1, -8(%rbp)
.L2:
	cmpl	$1001, -8(%rbp)
	jle	.L5
	nop
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	init, .-init
	.globl	push
	.type	push, @function
push:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -4(%rbp)
	movl	%esi, -8(%rbp)
	movl	%edx, -12(%rbp)
	movl	top(%rip), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rcx
	leaq	q(%rip), %rdx
	movl	-4(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	movl	top(%rip), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rcx
	leaq	4+q(%rip), %rdx
	movl	-8(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	movl	top(%rip), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rcx
	leaq	8+q(%rip), %rdx
	movl	-12(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	movl	top(%rip), %eax
	addl	$1, %eax
	movl	%eax, top(%rip)
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	push, .-push
	.globl	pop
	.type	pop, @function
pop:
.LFB2:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	top(%rip), %edx
	movl	bottom(%rip), %eax
	cmpl	%eax, %edx
	jne	.L8
	movl	$0, %eax
	jmp	.L9
.L8:
	movl	bottom(%rip), %eax
	leal	1(%rax), %edx
	movl	%edx, bottom(%rip)
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	leaq	q(%rip), %rdx
	addq	%rdx, %rax
.L9:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	pop, .-pop
	.section	.rodata
.LC0:
	.string	"%d %d %d"
.LC1:
	.string	"%s"
.LC2:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB3:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$192, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -164(%rbp)
	movl	$-1, -128(%rbp)
	movl	$0, -124(%rbp)
	movl	$1, -120(%rbp)
	movl	$0, -116(%rbp)
	movl	$0, -112(%rbp)
	movl	$-1, -108(%rbp)
	movl	$0, -104(%rbp)
	movl	$1, -100(%rbp)
	leaq	-172(%rbp), %rcx
	leaq	-176(%rbp), %rdx
	leaq	-180(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -168(%rbp)
	jmp	.L11
.L19:
	cmpl	$0, -168(%rbp)
	je	.L12
	movl	-180(%rbp), %eax
	addl	$1, %eax
	cmpl	%eax, -168(%rbp)
	jne	.L13
.L12:
	movl	-176(%rbp), %eax
	addl	$2, %eax
	cltq
	movl	-168(%rbp), %edx
	movslq	%edx, %rdx
	imulq	$1002, %rdx, %rdx
	leaq	map(%rip), %rcx
	addq	%rdx, %rcx
	movq	%rax, %rdx
	movl	$88, %esi
	movq	%rcx, %rdi
	call	memset@PLT
	jmp	.L14
.L13:
	movl	-168(%rbp), %eax
	cltq
	imulq	$1002, %rax, %rax
	leaq	1(%rax), %rdx
	leaq	map(%rip), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-168(%rbp), %eax
	cltq
	imulq	$1002, %rax, %rax
	leaq	map(%rip), %rdx
	movb	$88, (%rax,%rdx)
	movl	-176(%rbp), %eax
	addl	$1, %eax
	movslq	%eax, %rdx
	movl	-168(%rbp), %eax
	cltq
	imulq	$1002, %rax, %rax
	addq	%rax, %rdx
	leaq	map(%rip), %rax
	addq	%rdx, %rax
	movb	$88, (%rax)
	movl	-168(%rbp), %eax
	cltq
	imulq	$1002, %rax, %rax
	leaq	map(%rip), %rdx
	addq	%rdx, %rax
	movl	$83, %esi
	movq	%rax, %rdi
	call	strchr@PLT
	testq	%rax, %rax
	je	.L15
	movl	-168(%rbp), %eax
	movl	%eax, -96(%rbp)
	movl	-168(%rbp), %eax
	cltq
	imulq	$1002, %rax, %rax
	leaq	map(%rip), %rdx
	addq	%rdx, %rax
	movl	$83, %esi
	movq	%rax, %rdi
	call	strchr@PLT
	movl	-168(%rbp), %edx
	movslq	%edx, %rdx
	imulq	$1002, %rdx, %rdx
	leaq	map(%rip), %rcx
	addq	%rcx, %rdx
	subq	%rdx, %rax
	movl	%eax, -92(%rbp)
.L15:
	movl	$0, -160(%rbp)
	jmp	.L16
.L18:
	movl	-160(%rbp), %eax
	leal	48(%rax), %edx
	movl	-168(%rbp), %eax
	cltq
	imulq	$1002, %rax, %rax
	leaq	map(%rip), %rcx
	addq	%rcx, %rax
	movl	%edx, %esi
	movq	%rax, %rdi
	call	strchr@PLT
	movq	%rax, -136(%rbp)
	cmpq	$0, -136(%rbp)
	je	.L17
	movl	-160(%rbp), %eax
	cltq
	movl	-168(%rbp), %edx
	movl	%edx, -96(%rbp,%rax,8)
	movl	-168(%rbp), %eax
	cltq
	imulq	$1002, %rax, %rax
	leaq	map(%rip), %rdx
	addq	%rax, %rdx
	movq	-136(%rbp), %rax
	subq	%rdx, %rax
	movl	%eax, %edx
	movl	-160(%rbp), %eax
	cltq
	movl	%edx, -92(%rbp,%rax,8)
.L17:
	addl	$1, -160(%rbp)
.L16:
	movl	-176(%rbp), %eax
	addl	$1, %eax
	cmpl	%eax, -160(%rbp)
	jle	.L18
.L14:
	addl	$1, -168(%rbp)
.L11:
	movl	-180(%rbp), %eax
	addl	$1, %eax
	cmpl	%eax, -168(%rbp)
	jle	.L19
	movl	$0, -168(%rbp)
	jmp	.L20
.L27:
	movl	$0, %eax
	call	init
	movl	$0, top(%rip)
	movl	$0, bottom(%rip)
	movl	-168(%rbp), %eax
	cltq
	movl	-92(%rbp,%rax,8), %ecx
	movl	-168(%rbp), %eax
	cltq
	movl	-96(%rbp,%rax,8), %eax
	movl	$0, %edx
	movl	%ecx, %esi
	movl	%eax, %edi
	call	push
.L26:
	call	pop
	movq	%rax, -144(%rbp)
	movq	-144(%rbp), %rax
	movl	(%rax), %edx
	movl	-168(%rbp), %eax
	addl	$1, %eax
	cltq
	movl	-96(%rbp,%rax,8), %eax
	cmpl	%eax, %edx
	jne	.L21
	movq	-144(%rbp), %rax
	movl	4(%rax), %edx
	movl	-168(%rbp), %eax
	addl	$1, %eax
	cltq
	movl	-92(%rbp,%rax,8), %eax
	cmpl	%eax, %edx
	jne	.L21
	movq	-144(%rbp), %rax
	movl	8(%rax), %eax
	addl	%eax, -164(%rbp)
	jmp	.L30
.L21:
	movl	$0, -156(%rbp)
	jmp	.L23
.L25:
	movq	-144(%rbp), %rax
	movl	(%rax), %edx
	movl	-156(%rbp), %eax
	cltq
	movl	-128(%rbp,%rax,8), %eax
	addl	%edx, %eax
	movl	%eax, -152(%rbp)
	movq	-144(%rbp), %rax
	movl	4(%rax), %edx
	movl	-156(%rbp), %eax
	cltq
	movl	-124(%rbp,%rax,8), %eax
	addl	%edx, %eax
	movl	%eax, -148(%rbp)
	movl	-148(%rbp), %eax
	movslq	%eax, %rdx
	movl	-152(%rbp), %eax
	cltq
	imulq	$1002, %rax, %rax
	addq	%rax, %rdx
	leaq	map(%rip), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	cmpb	$88, %al
	je	.L24
	movl	-148(%rbp), %eax
	movslq	%eax, %rdx
	movl	-152(%rbp), %eax
	cltq
	imulq	$1002, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	visited(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	$1, %eax
	je	.L24
	movl	-148(%rbp), %eax
	movslq	%eax, %rdx
	movl	-152(%rbp), %eax
	cltq
	imulq	$1002, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	visited(%rip), %rax
	movl	$1, (%rdx,%rax)
	movq	-144(%rbp), %rax
	movl	8(%rax), %eax
	leal	1(%rax), %edx
	movl	-148(%rbp), %ecx
	movl	-152(%rbp), %eax
	movl	%ecx, %esi
	movl	%eax, %edi
	call	push
.L24:
	addl	$1, -156(%rbp)
.L23:
	cmpl	$3, -156(%rbp)
	jle	.L25
	jmp	.L26
.L30:
	addl	$1, -168(%rbp)
.L20:
	movl	-172(%rbp), %eax
	cmpl	%eax, -168(%rbp)
	jl	.L27
	movl	-164(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L29
	call	__stack_chk_fail@PLT
.L29:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE3:
	.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	init
	.type	init, @function
init:
.LFB35:
	.cfi_startproc
	endbr64
	movl	$4016016, %edx
	xorl	%esi, %esi
	leaq	visited(%rip), %rdi
	jmp	memset@PLT
	.cfi_endproc
.LFE35:
	.size	init, .-init
	.p2align 4
	.globl	push
	.type	push, @function
push:
.LFB36:
	.cfi_startproc
	endbr64
	movl	%edx, %r8d
	movd	%edi, %xmm0
	movslq	top(%rip), %rdx
	movd	%esi, %xmm1
	leaq	q(%rip), %rcx
	punpckldq	%xmm1, %xmm0
	movq	%rdx, %rax
	leaq	(%rdx,%rdx,2), %rdx
	salq	$2, %rdx
	addl	$1, %eax
	movq	%xmm0, (%rcx,%rdx)
	movl	%r8d, 8(%rcx,%rdx)
	movl	%eax, top(%rip)
	ret
	.cfi_endproc
.LFE36:
	.size	push, .-push
	.p2align 4
	.globl	pop
	.type	pop, @function
pop:
.LFB37:
	.cfi_startproc
	endbr64
	movslq	bottom(%rip), %rax
	cmpl	%eax, top(%rip)
	je	.L6
	leal	1(%rax), %edx
	movl	%edx, bottom(%rip)
	leaq	(%rax,%rax,2), %rdx
	leaq	q(%rip), %rax
	leaq	(%rax,%rdx,4), %rax
	ret
	.p2align 4,,10
	.p2align 3
.L6:
	xorl	%eax, %eax
	ret
	.cfi_endproc
.LFE37:
	.size	pop, .-pop
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d %d %d"
.LC1:
	.string	"%s"
.LC2:
	.string	"%d\n"
	.section	.text.unlikely,"ax",@progbits
.LCOLDB3:
	.section	.text.startup,"ax",@progbits
.LHOTB3:
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB38:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	.LC0(%rip), %rdi
	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	$136, %rsp
	.cfi_def_cfa_offset 192
	movq	%fs:40, %rax
	movq	%rax, 120(%rsp)
	xorl	%eax, %eax
	leaq	28(%rsp), %rcx
	leaq	24(%rsp), %rdx
	leaq	20(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	20(%rsp), %eax
	addl	$1, %eax
	js	.L20
	leaq	map(%rip), %r12
	xorl	%ebp, %ebp
	leaq	.LC1(%rip), %r13
	movq	%r12, %rbx
	jmp	.L19
.L34:
	movl	24(%rsp), %eax
	movl	$88, %esi
	movq	%rbx, %rdi
	leal	2(%rax), %edx
	movslq	%edx, %rdx
	call	memset@PLT
.L13:
	movl	20(%rsp), %edx
	leal	1(%rbp), %ecx
	addq	$1002, %rbx
	leal	1(%rdx), %eax
	cmpl	%ebp, %edx
	jl	.L20
	movl	%ecx, %ebp
.L19:
	testl	%ebp, %ebp
	je	.L34
	cmpl	%ebp, %eax
	je	.L34
	leaq	1(%rbx), %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	24(%rsp), %eax
	movb	$88, (%rbx)
	movq	%rbx, %rdi
	movl	$83, %esi
	leal	1(%rax), %r15d
	movslq	%ebp, %rax
	imulq	$1002, %rax, %rax
	movslq	%r15d, %rdx
	addq	%r12, %rax
	movb	$88, (%rax,%rdx)
	call	strchr@PLT
	testq	%rax, %rax
	je	.L14
	movl	$83, %esi
	movq	%rbx, %rdi
	movl	%ebp, 32(%rsp)
	call	strchr@PLT
	subq	%rbx, %rax
	movl	%eax, 36(%rsp)
.L14:
	movl	%r15d, %eax
	xorl	%r14d, %r14d
	movq	%rax, (%rsp)
	testl	%r15d, %r15d
	jns	.L17
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L32:
	movq	%rax, %r14
.L17:
	leal	48(%r14), %esi
	movq	%rbx, %rdi
	call	strchr@PLT
	testq	%rax, %rax
	je	.L16
	subq	%rbx, %rax
	movd	%ebp, %xmm0
	movd	%eax, %xmm5
	punpckldq	%xmm5, %xmm0
	movq	%xmm0, 32(%rsp,%r14,8)
.L16:
	leaq	1(%r14), %rax
	cmpq	%r14, (%rsp)
	jne	.L32
	jmp	.L13
.L20:
	movl	28(%rsp), %eax
	xorl	%r13d, %r13d
	movl	%eax, 12(%rsp)
	testl	%eax, %eax
	jle	.L10
	movl	$1, (%rsp)
	leaq	q(%rip), %r15
	leaq	32(%rsp), %r12
	xorl	%r13d, %r13d
	leaq	visited(%rip), %r10
	movq	%r15, %rbx
	leaq	map(%rip), %rbp
.L21:
	xorl	%esi, %esi
	movq	%r10, %rdi
	movl	$4016016, %edx
	call	memset@PLT
	leaq	q(%rip), %rcx
	xorl	%r9d, %r9d
	movl	$1, %esi
	movq	%rax, %r10
	movq	(%r12), %rax
	movl	$0, 8+q(%rip)
	movq	%rax, (%r15)
	movl	(%rsp), %eax
	movq	%rbx, %r15
	movl	%eax, 8(%rsp)
	jmp	.L30
.L23:
	leal	-1(%rdx), %edi
	movslq	%eax, %r8
	movd	%eax, %xmm1
	movd	%edi, %xmm0
	movslq	%edi, %rdi
	imulq	$1002, %rdi, %rdi
	punpckldq	%xmm1, %xmm0
	leaq	0(%rbp,%rdi), %r11
	cmpb	$88, (%r11,%r8)
	je	.L25
	addq	%r8, %rdi
	cmpl	$1, (%r10,%rdi,4)
	je	.L25
	movl	8(%rcx), %eax
	movslq	%esi, %rdx
	movl	$1, (%r10,%rdi,4)
	addl	$1, %esi
	leaq	(%rdx,%rdx,2), %rdx
	addl	$1, %eax
	movq	%xmm0, (%rbx,%rdx,4)
	movl	%eax, 8(%rbx,%rdx,4)
	movslq	4(%rcx), %r8
	movl	(%rcx), %edx
	movq	%r8, %rax
.L25:
	leal	1(%rdx), %edi
	movd	%eax, %xmm2
	movd	%edi, %xmm0
	movslq	%edi, %rdi
	imulq	$1002, %rdi, %rdi
	punpckldq	%xmm2, %xmm0
	leaq	0(%rbp,%rdi), %r11
	cmpb	$88, (%r11,%r8)
	je	.L26
	addq	%r8, %rdi
	cmpl	$1, (%r10,%rdi,4)
	je	.L26
	movl	8(%rcx), %eax
	movslq	%esi, %rdx
	movl	$1, (%r10,%rdi,4)
	addl	$1, %esi
	leaq	(%rdx,%rdx,2), %rdx
	addl	$1, %eax
	movq	%xmm0, (%rbx,%rdx,4)
	movl	%eax, 8(%rbx,%rdx,4)
	movl	(%rcx), %edx
	movl	4(%rcx), %eax
.L26:
	leal	-1(%rax), %edi
	movd	%edx, %xmm0
	movd	%edi, %xmm3
	movslq	%edi, %r11
	movslq	%edx, %rdi
	imulq	$1002, %rdi, %r8
	punpckldq	%xmm3, %xmm0
	leaq	0(%rbp,%r8), %r14
	cmpb	$88, (%r14,%r11)
	je	.L27
	addq	%r11, %r8
	cmpl	$1, (%r10,%r8,4)
	je	.L27
	movl	8(%rcx), %eax
	movslq	%esi, %rdx
	movl	$1, (%r10,%r8,4)
	addl	$1, %esi
	leaq	(%rdx,%rdx,2), %rdx
	addl	$1, %eax
	movq	%xmm0, (%rbx,%rdx,4)
	movl	%eax, 8(%rbx,%rdx,4)
	movslq	(%rcx), %rdi
	movl	4(%rcx), %eax
	movq	%rdi, %rdx
.L27:
	imulq	$1002, %rdi, %rdi
	addl	$1, %eax
	movd	%edx, %xmm0
	movd	%eax, %xmm4
	cltq
	punpckldq	%xmm4, %xmm0
	leaq	0(%rbp,%rdi), %r8
	cmpb	$88, (%r8,%rax)
	je	.L28
	addq	%rax, %rdi
	cmpl	$1, (%r10,%rdi,4)
	je	.L28
	movl	8(%rcx), %eax
	movl	$1, (%r10,%rdi,4)
	movslq	%esi, %rdi
	addl	$1, %esi
	leaq	(%rdi,%rdi,2), %rdi
	addl	$1, %eax
	movq	%xmm0, (%rbx,%rdi,4)
	movl	%eax, 8(%rbx,%rdi,4)
.L28:
	addq	$12, %rcx
	cmpl	%r9d, %esi
	je	.L22
.L30:
	movl	%r9d, %edi
	movl	(%rcx), %edx
	movl	4(%rcx), %eax
	addl	$1, %r9d
	cmpl	8(%r12), %edx
	jne	.L23
	cmpl	%eax, 12(%r12)
	jne	.L23
	movslq	%edi, %rax
	addl	$1, (%rsp)
	movl	12(%rsp), %ecx
	addq	$8, %r12
	leaq	(%rax,%rax,2), %rax
	addl	8(%rbx,%rax,4), %r13d
	cmpl	%ecx, 8(%rsp)
	jl	.L21
	movl	%r9d, bottom(%rip)
	movl	%esi, top(%rip)
.L10:
	xorl	%eax, %eax
	movl	%r13d, %edx
	movl	$1, %edi
	leaq	.LC2(%rip), %rsi
	call	__printf_chk@PLT
	movq	120(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L47
	addq	$136, %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
.L47:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
	.section	.text.unlikely
	.cfi_startproc
	.type	main.cold, @function
main.cold:
.LFSB38:
.L22:
	.cfi_def_cfa_offset 192
	.cfi_offset 3, -56
	.cfi_offset 6, -48
	.cfi_offset 12, -40
	.cfi_offset 13, -32
	.cfi_offset 14, -24
	.cfi_offset 15, -16
	movl	%esi, bottom(%rip)
	movl	%esi, top(%rip)
	movl	0, %eax
	ud2
	.cfi_endproc
.LFE38:
	.section	.text.startup
	.size	main, .-main
	.section	.text.unlikely
	.size	main.cold, .-main.cold
.LCOLDE3:
	.section	.text.startup
.LHOTE3:
	.globl	visited
	.bss
	.align 32
	.type	visited, @object
	.size	visited, 4016016
visited:
	.zero	4016016
	.globl	map
	.align 32
	.type	map, @object
	.size	map, 1004004
map:
	.zero	1004004
	.globl	q
	.align 32
	.type	q, @object
	.size	q, 6000000
q:
	.zero	6000000
	.globl	bottom
	.align 4
	.type	bottom, @object
	.size	bottom, 4
bottom:
	.zero	4
	.globl	top
	.align 4
	.type	top, @object
	.size	top, 4
top:
	.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	init
	.type	init, @function
init:
.LFB35:
	.cfi_startproc
	endbr64
	movl	$4016016, %edx
	xorl	%esi, %esi
	leaq	visited(%rip), %rdi
	jmp	memset@PLT
	.cfi_endproc
.LFE35:
	.size	init, .-init
	.p2align 4
	.globl	push
	.type	push, @function
push:
.LFB36:
	.cfi_startproc
	endbr64
	movl	%edx, %r8d
	movd	%edi, %xmm0
	movslq	top(%rip), %rdx
	movd	%esi, %xmm1
	leaq	q(%rip), %rcx
	punpckldq	%xmm1, %xmm0
	movq	%rdx, %rax
	leaq	(%rdx,%rdx,2), %rdx
	salq	$2, %rdx
	addl	$1, %eax
	movq	%xmm0, (%rcx,%rdx)
	movl	%r8d, 8(%rcx,%rdx)
	movl	%eax, top(%rip)
	ret
	.cfi_endproc
.LFE36:
	.size	push, .-push
	.p2align 4
	.globl	pop
	.type	pop, @function
pop:
.LFB37:
	.cfi_startproc
	endbr64
	movslq	bottom(%rip), %rax
	cmpl	%eax, top(%rip)
	je	.L6
	leal	1(%rax), %edx
	movl	%edx, bottom(%rip)
	leaq	(%rax,%rax,2), %rdx
	leaq	q(%rip), %rax
	leaq	(%rax,%rdx,4), %rax
	ret
	.p2align 4,,10
	.p2align 3
.L6:
	xorl	%eax, %eax
	ret
	.cfi_endproc
.LFE37:
	.size	pop, .-pop
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d %d %d"
.LC1:
	.string	"%s"
.LC2:
	.string	"%d\n"
	.section	.text.unlikely,"ax",@progbits
.LCOLDB3:
	.section	.text.startup,"ax",@progbits
.LHOTB3:
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB38:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	.LC0(%rip), %rdi
	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	$136, %rsp
	.cfi_def_cfa_offset 192
	movq	%fs:40, %rax
	movq	%rax, 120(%rsp)
	xorl	%eax, %eax
	leaq	28(%rsp), %rcx
	leaq	24(%rsp), %rdx
	leaq	20(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	20(%rsp), %eax
	addl	$1, %eax
	js	.L20
	leaq	map(%rip), %r12
	xorl	%ebp, %ebp
	leaq	.LC1(%rip), %r13
	movq	%r12, %rbx
	jmp	.L19
.L34:
	movl	24(%rsp), %eax
	movl	$88, %esi
	movq	%rbx, %rdi
	leal	2(%rax), %edx
	movslq	%edx, %rdx
	call	memset@PLT
.L13:
	movl	20(%rsp), %edx
	leal	1(%rbp), %ecx
	addq	$1002, %rbx
	leal	1(%rdx), %eax
	cmpl	%ebp, %edx
	jl	.L20
	movl	%ecx, %ebp
.L19:
	testl	%ebp, %ebp
	je	.L34
	cmpl	%ebp, %eax
	je	.L34
	leaq	1(%rbx), %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	24(%rsp), %eax
	movb	$88, (%rbx)
	movq	%rbx, %rdi
	movl	$83, %esi
	leal	1(%rax), %r15d
	movslq	%ebp, %rax
	imulq	$1002, %rax, %rax
	movslq	%r15d, %rdx
	addq	%r12, %rax
	movb	$88, (%rax,%rdx)
	call	strchr@PLT
	testq	%rax, %rax
	je	.L14
	movl	$83, %esi
	movq	%rbx, %rdi
	movl	%ebp, 32(%rsp)
	call	strchr@PLT
	subq	%rbx, %rax
	movl	%eax, 36(%rsp)
.L14:
	movl	%r15d, %eax
	xorl	%r14d, %r14d
	movq	%rax, (%rsp)
	testl	%r15d, %r15d
	jns	.L17
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L32:
	movq	%rax, %r14
.L17:
	leal	48(%r14), %esi
	movq	%rbx, %rdi
	call	strchr@PLT
	testq	%rax, %rax
	je	.L16
	subq	%rbx, %rax
	movd	%ebp, %xmm0
	movd	%eax, %xmm5
	punpckldq	%xmm5, %xmm0
	movq	%xmm0, 32(%rsp,%r14,8)
.L16:
	leaq	1(%r14), %rax
	cmpq	%r14, (%rsp)
	jne	.L32
	jmp	.L13
.L20:
	movl	28(%rsp), %eax
	xorl	%r13d, %r13d
	movl	%eax, 12(%rsp)
	testl	%eax, %eax
	jle	.L10
	movl	$1, (%rsp)
	leaq	q(%rip), %r15
	leaq	32(%rsp), %r12
	xorl	%r13d, %r13d
	leaq	visited(%rip), %r10
	movq	%r15, %rbx
	leaq	map(%rip), %rbp
.L21:
	xorl	%esi, %esi
	movq	%r10, %rdi
	movl	$4016016, %edx
	call	memset@PLT
	leaq	q(%rip), %rcx
	xorl	%r9d, %r9d
	movl	$1, %esi
	movq	%rax, %r10
	movq	(%r12), %rax
	movl	$0, 8+q(%rip)
	movq	%rax, (%r15)
	movl	(%rsp), %eax
	movq	%rbx, %r15
	movl	%eax, 8(%rsp)
	jmp	.L30
.L23:
	leal	-1(%rdx), %edi
	movslq	%eax, %r8
	movd	%eax, %xmm1
	movd	%edi, %xmm0
	movslq	%edi, %rdi
	imulq	$1002, %rdi, %rdi
	punpckldq	%xmm1, %xmm0
	leaq	0(%rbp,%rdi), %r11
	cmpb	$88, (%r11,%r8)
	je	.L25
	addq	%r8, %rdi
	cmpl	$1, (%r10,%rdi,4)
	je	.L25
	movl	8(%rcx), %eax
	movslq	%esi, %rdx
	movl	$1, (%r10,%rdi,4)
	addl	$1, %esi
	leaq	(%rdx,%rdx,2), %rdx
	addl	$1, %eax
	movq	%xmm0, (%rbx,%rdx,4)
	movl	%eax, 8(%rbx,%rdx,4)
	movslq	4(%rcx), %r8
	movl	(%rcx), %edx
	movq	%r8, %rax
.L25:
	leal	1(%rdx), %edi
	movd	%eax, %xmm2
	movd	%edi, %xmm0
	movslq	%edi, %rdi
	imulq	$1002, %rdi, %rdi
	punpckldq	%xmm2, %xmm0
	leaq	0(%rbp,%rdi), %r11
	cmpb	$88, (%r11,%r8)
	je	.L26
	addq	%r8, %rdi
	cmpl	$1, (%r10,%rdi,4)
	je	.L26
	movl	8(%rcx), %eax
	movslq	%esi, %rdx
	movl	$1, (%r10,%rdi,4)
	addl	$1, %esi
	leaq	(%rdx,%rdx,2), %rdx
	addl	$1, %eax
	movq	%xmm0, (%rbx,%rdx,4)
	movl	%eax, 8(%rbx,%rdx,4)
	movl	(%rcx), %edx
	movl	4(%rcx), %eax
.L26:
	leal	-1(%rax), %edi
	movd	%edx, %xmm0
	movd	%edi, %xmm3
	movslq	%edi, %r11
	movslq	%edx, %rdi
	imulq	$1002, %rdi, %r8
	punpckldq	%xmm3, %xmm0
	leaq	0(%rbp,%r8), %r14
	cmpb	$88, (%r14,%r11)
	je	.L27
	addq	%r11, %r8
	cmpl	$1, (%r10,%r8,4)
	je	.L27
	movl	8(%rcx), %eax
	movslq	%esi, %rdx
	movl	$1, (%r10,%r8,4)
	addl	$1, %esi
	leaq	(%rdx,%rdx,2), %rdx
	addl	$1, %eax
	movq	%xmm0, (%rbx,%rdx,4)
	movl	%eax, 8(%rbx,%rdx,4)
	movslq	(%rcx), %rdi
	movl	4(%rcx), %eax
	movq	%rdi, %rdx
.L27:
	imulq	$1002, %rdi, %rdi
	addl	$1, %eax
	movd	%edx, %xmm0
	movd	%eax, %xmm4
	cltq
	punpckldq	%xmm4, %xmm0
	leaq	0(%rbp,%rdi), %r8
	cmpb	$88, (%r8,%rax)
	je	.L28
	addq	%rax, %rdi
	cmpl	$1, (%r10,%rdi,4)
	je	.L28
	movl	8(%rcx), %eax
	movl	$1, (%r10,%rdi,4)
	movslq	%esi, %rdi
	addl	$1, %esi
	leaq	(%rdi,%rdi,2), %rdi
	addl	$1, %eax
	movq	%xmm0, (%rbx,%rdi,4)
	movl	%eax, 8(%rbx,%rdi,4)
.L28:
	addq	$12, %rcx
	cmpl	%r9d, %esi
	je	.L22
.L30:
	movl	%r9d, %edi
	movl	(%rcx), %edx
	movl	4(%rcx), %eax
	addl	$1, %r9d
	cmpl	8(%r12), %edx
	jne	.L23
	cmpl	%eax, 12(%r12)
	jne	.L23
	movslq	%edi, %rax
	addl	$1, (%rsp)
	movl	12(%rsp), %ecx
	addq	$8, %r12
	leaq	(%rax,%rax,2), %rax
	addl	8(%rbx,%rax,4), %r13d
	cmpl	%ecx, 8(%rsp)
	jl	.L21
	movl	%r9d, bottom(%rip)
	movl	%esi, top(%rip)
.L10:
	xorl	%eax, %eax
	movl	%r13d, %edx
	movl	$1, %edi
	leaq	.LC2(%rip), %rsi
	call	__printf_chk@PLT
	movq	120(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L47
	addq	$136, %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
.L47:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
	.section	.text.unlikely
	.cfi_startproc
	.type	main.cold, @function
main.cold:
.LFSB38:
.L22:
	.cfi_def_cfa_offset 192
	.cfi_offset 3, -56
	.cfi_offset 6, -48
	.cfi_offset 12, -40
	.cfi_offset 13, -32
	.cfi_offset 14, -24
	.cfi_offset 15, -16
	movl	%esi, bottom(%rip)
	movl	%esi, top(%rip)
	movl	0, %eax
	ud2
	.cfi_endproc
.LFE38:
	.section	.text.startup
	.size	main, .-main
	.section	.text.unlikely
	.size	main.cold, .-main.cold
.LCOLDE3:
	.section	.text.startup
.LHOTE3:
	.globl	visited
	.bss
	.align 32
	.type	visited, @object
	.size	visited, 4016016
visited:
	.zero	4016016
	.globl	map
	.align 32
	.type	map, @object
	.size	map, 1004004
map:
	.zero	1004004
	.globl	q
	.align 32
	.type	q, @object
	.size	q, 6000000
q:
	.zero	6000000
	.globl	bottom
	.align 4
	.type	bottom, @object
	.size	bottom, 4
bottom:
	.zero	4
	.globl	top
	.align 4
	.type	top, @object
	.size	top, 4
top:
	.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>
#include<string.h>

#define MAX 1000

int top,bottom;

typedef struct{
	int x;
	int y;
	int cost;
}queue;
queue q[500000];
char map[MAX+2][MAX+2];
int visited[MAX+2][MAX+2];

void init(){
	int i,j;
	for(i=0;i<MAX+2;i++){
		for(j=0;j<MAX+2;j++){
			visited[i][j]=0;
		}
	}
}
void push(int x,int y,int cost){
	q[top].x=x;
	q[top].y=y;
	q[top].cost=cost;
	top++;
}
queue* pop(void){
	if(top==bottom){return NULL;}
	return &q[bottom++];
}

int main(){
	int h,w,n;
	int i;
	int ans=0;
	int list[10][2];//探索リスト
	int vector[4][2]={{-1,0},{1,0},{0,-1},{0,1}};
	scanf("%d %d %d",&h,&w,&n);
	for(i=0;i<h+2;i++){
		if(i==0||i==h+1){
			memset(map[i],'X',w+2);
		}else{
			int j;
			scanf("%s",&map[i][1]);
			map[i][0]='X';
			map[i][w+1]='X';
			if(strchr(map[i],'S')!=NULL){
				list[0][0]=i;
				list[0][1]=(strchr(map[i],'S')-map[i]);
			}
			for(j=0;j<w+2;j++){
				char* p=(strchr(map[i],'0'+j));
				if(p!=NULL){
					list[j][0]=i;
					list[j][1]=p-map[i];
				}
			}
		}
	}
	for(i=0;i<n;i++){
		init();
		top=0;bottom=0;
		push(list[i][0],list[i][1],0);//スタート地点
		while(1){
			int j;
			queue* now;
			now=pop();
			if(now->x==list[i+1][0]&&now->y==list[i+1][1]){//到達したか否か
				ans+=now->cost;				
				break;
			}
			for(j=0;j<4;j++){
				int next_x=now->x+vector[j][0];
				int next_y=now->y+vector[j][1];
				if(map[next_x][next_y]!='X'&&visited[next_x][next_y]!=1){
					visited[next_x][next_y]=1;
					push(next_x,next_y,now->cost+1);
				}
			}
		}
	}
	printf("%d\n",ans);
	return 0;
}
3 3 1
S..
...
..1

4

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>
#include<string.h>

#define MAX 1000

int top,bottom;

typedef struct{
	int x;
	int y;
	int cost;
}queue;
queue q[500000];
char map[MAX+2][MAX+2];
int visited[MAX+2][MAX+2];

void init(){
	int i,j;
	for(i=0;i<MAX+2;i++){
		for(j=0;j<MAX+2;j++){
			visited[i][j]=0;
		}
	}
}
void push(int x,int y,int cost){
	q[top].x=x;
	q[top].y=y;
	q[top].cost=cost;
	top++;
}
queue* pop(void){
	if(top==bottom){return NULL;}
	return &q[bottom++];
}

int main(){
	int h,w,n;
	int i;
	int ans=0;
	int list[10][2];//探索リスト
	int vector[4][2]={{-1,0},{1,0},{0,-1},{0,1}};
	scanf("%d %d %d",&h,&w,&n);
	for(i=0;i<h+2;i++){
		if(i==0||i==h+1){
			memset(map[i],'X',w+2);
		}else{
			int j;
			scanf("%s",&map[i][1]);
			map[i][0]='X';
			map[i][w+1]='X';
			if(strchr(map[i],'S')!=NULL){
				list[0][0]=i;
				list[0][1]=(strchr(map[i],'S')-map[i]);
			}
			for(j=0;j<w+2;j++){
				char* p=(strchr(map[i],'0'+j));
				if(p!=NULL){
					list[j][0]=i;
					list[j][1]=p-map[i];
				}
			}
		}
	}
	for(i=0;i<n;i++){
		init();
		top=0;bottom=0;
		push(list[i][0],list[i][1],0);//スタート地点
		while(1){
			int j;
			queue* now;
			now=pop();
			if(now->x==list[i+1][0]&&now->y==list[i+1][1]){//到達したか否か
				ans+=now->cost;				
				break;
			}
			for(j=0;j<4;j++){
				int next_x=now->x+vector[j][0];
				int next_y=now->y+vector[j][1];
				if(map[next_x][next_y]!='X'&&visited[next_x][next_y]!=1){
					visited[next_x][next_y]=1;
					push(next_x,next_y,now->cost+1);
				}
			}
		}
	}
	printf("%d\n",ans);
	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	top
	.bss
	.align 4
	.type	top, @object
	.size	top, 4
top:
	.zero	4
	.globl	bottom
	.align 4
	.type	bottom, @object
	.size	bottom, 4
bottom:
	.zero	4
	.globl	q
	.align 32
	.type	q, @object
	.size	q, 6000000
q:
	.zero	6000000
	.globl	map
	.align 32
	.type	map, @object
	.size	map, 1004004
map:
	.zero	1004004
	.globl	visited
	.align 32
	.type	visited, @object
	.size	visited, 4016016
visited:
	.zero	4016016
	.text
	.globl	init
	.type	init, @function
init:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	$0, -8(%rbp)
	jmp	.L2
.L5:
	movl	$0, -4(%rbp)
	jmp	.L3
.L4:
	movl	-4(%rbp), %eax
	movslq	%eax, %rdx
	movl	-8(%rbp), %eax
	cltq
	imulq	$1002, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	visited(%rip), %rax
	movl	$0, (%rdx,%rax)
	addl	$1, -4(%rbp)
.L3:
	cmpl	$1001, -4(%rbp)
	jle	.L4
	addl	$1, -8(%rbp)
.L2:
	cmpl	$1001, -8(%rbp)
	jle	.L5
	nop
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	init, .-init
	.globl	push
	.type	push, @function
push:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -4(%rbp)
	movl	%esi, -8(%rbp)
	movl	%edx, -12(%rbp)
	movl	top(%rip), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rcx
	leaq	q(%rip), %rdx
	movl	-4(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	movl	top(%rip), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rcx
	leaq	4+q(%rip), %rdx
	movl	-8(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	movl	top(%rip), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rcx
	leaq	8+q(%rip), %rdx
	movl	-12(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	movl	top(%rip), %eax
	addl	$1, %eax
	movl	%eax, top(%rip)
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	push, .-push
	.globl	pop
	.type	pop, @function
pop:
.LFB2:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	top(%rip), %edx
	movl	bottom(%rip), %eax
	cmpl	%eax, %edx
	jne	.L8
	movl	$0, %eax
	jmp	.L9
.L8:
	movl	bottom(%rip), %eax
	leal	1(%rax), %edx
	movl	%edx, bottom(%rip)
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	leaq	q(%rip), %rdx
	addq	%rdx, %rax
.L9:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	pop, .-pop
	.section	.rodata
.LC0:
	.string	"%d %d %d"
.LC1:
	.string	"%s"
.LC2:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB3:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$192, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -164(%rbp)
	movl	$-1, -128(%rbp)
	movl	$0, -124(%rbp)
	movl	$1, -120(%rbp)
	movl	$0, -116(%rbp)
	movl	$0, -112(%rbp)
	movl	$-1, -108(%rbp)
	movl	$0, -104(%rbp)
	movl	$1, -100(%rbp)
	leaq	-172(%rbp), %rcx
	leaq	-176(%rbp), %rdx
	leaq	-180(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -168(%rbp)
	jmp	.L11
.L19:
	cmpl	$0, -168(%rbp)
	je	.L12
	movl	-180(%rbp), %eax
	addl	$1, %eax
	cmpl	%eax, -168(%rbp)
	jne	.L13
.L12:
	movl	-176(%rbp), %eax
	addl	$2, %eax
	cltq
	movl	-168(%rbp), %edx
	movslq	%edx, %rdx
	imulq	$1002, %rdx, %rdx
	leaq	map(%rip), %rcx
	addq	%rdx, %rcx
	movq	%rax, %rdx
	movl	$88, %esi
	movq	%rcx, %rdi
	call	memset@PLT
	jmp	.L14
.L13:
	movl	-168(%rbp), %eax
	cltq
	imulq	$1002, %rax, %rax
	leaq	1(%rax), %rdx
	leaq	map(%rip), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-168(%rbp), %eax
	cltq
	imulq	$1002, %rax, %rax
	leaq	map(%rip), %rdx
	movb	$88, (%rax,%rdx)
	movl	-176(%rbp), %eax
	addl	$1, %eax
	movslq	%eax, %rdx
	movl	-168(%rbp), %eax
	cltq
	imulq	$1002, %rax, %rax
	addq	%rax, %rdx
	leaq	map(%rip), %rax
	addq	%rdx, %rax
	movb	$88, (%rax)
	movl	-168(%rbp), %eax
	cltq
	imulq	$1002, %rax, %rax
	leaq	map(%rip), %rdx
	addq	%rdx, %rax
	movl	$83, %esi
	movq	%rax, %rdi
	call	strchr@PLT
	testq	%rax, %rax
	je	.L15
	movl	-168(%rbp), %eax
	movl	%eax, -96(%rbp)
	movl	-168(%rbp), %eax
	cltq
	imulq	$1002, %rax, %rax
	leaq	map(%rip), %rdx
	addq	%rdx, %rax
	movl	$83, %esi
	movq	%rax, %rdi
	call	strchr@PLT
	movl	-168(%rbp), %edx
	movslq	%edx, %rdx
	imulq	$1002, %rdx, %rdx
	leaq	map(%rip), %rcx
	addq	%rcx, %rdx
	subq	%rdx, %rax
	movl	%eax, -92(%rbp)
.L15:
	movl	$0, -160(%rbp)
	jmp	.L16
.L18:
	movl	-160(%rbp), %eax
	leal	48(%rax), %edx
	movl	-168(%rbp), %eax
	cltq
	imulq	$1002, %rax, %rax
	leaq	map(%rip), %rcx
	addq	%rcx, %rax
	movl	%edx, %esi
	movq	%rax, %rdi
	call	strchr@PLT
	movq	%rax, -136(%rbp)
	cmpq	$0, -136(%rbp)
	je	.L17
	movl	-160(%rbp), %eax
	cltq
	movl	-168(%rbp), %edx
	movl	%edx, -96(%rbp,%rax,8)
	movl	-168(%rbp), %eax
	cltq
	imulq	$1002, %rax, %rax
	leaq	map(%rip), %rdx
	addq	%rax, %rdx
	movq	-136(%rbp), %rax
	subq	%rdx, %rax
	movl	%eax, %edx
	movl	-160(%rbp), %eax
	cltq
	movl	%edx, -92(%rbp,%rax,8)
.L17:
	addl	$1, -160(%rbp)
.L16:
	movl	-176(%rbp), %eax
	addl	$1, %eax
	cmpl	%eax, -160(%rbp)
	jle	.L18
.L14:
	addl	$1, -168(%rbp)
.L11:
	movl	-180(%rbp), %eax
	addl	$1, %eax
	cmpl	%eax, -168(%rbp)
	jle	.L19
	movl	$0, -168(%rbp)
	jmp	.L20
.L27:
	movl	$0, %eax
	call	init
	movl	$0, top(%rip)
	movl	$0, bottom(%rip)
	movl	-168(%rbp), %eax
	cltq
	movl	-92(%rbp,%rax,8), %ecx
	movl	-168(%rbp), %eax
	cltq
	movl	-96(%rbp,%rax,8), %eax
	movl	$0, %edx
	movl	%ecx, %esi
	movl	%eax, %edi
	call	push
.L26:
	call	pop
	movq	%rax, -144(%rbp)
	movq	-144(%rbp), %rax
	movl	(%rax), %edx
	movl	-168(%rbp), %eax
	addl	$1, %eax
	cltq
	movl	-96(%rbp,%rax,8), %eax
	cmpl	%eax, %edx
	jne	.L21
	movq	-144(%rbp), %rax
	movl	4(%rax), %edx
	movl	-168(%rbp), %eax
	addl	$1, %eax
	cltq
	movl	-92(%rbp,%rax,8), %eax
	cmpl	%eax, %edx
	jne	.L21
	movq	-144(%rbp), %rax
	movl	8(%rax), %eax
	addl	%eax, -164(%rbp)
	jmp	.L30
.L21:
	movl	$0, -156(%rbp)
	jmp	.L23
.L25:
	movq	-144(%rbp), %rax
	movl	(%rax), %edx
	movl	-156(%rbp), %eax
	cltq
	movl	-128(%rbp,%rax,8), %eax
	addl	%edx, %eax
	movl	%eax, -152(%rbp)
	movq	-144(%rbp), %rax
	movl	4(%rax), %edx
	movl	-156(%rbp), %eax
	cltq
	movl	-124(%rbp,%rax,8), %eax
	addl	%edx, %eax
	movl	%eax, -148(%rbp)
	movl	-148(%rbp), %eax
	movslq	%eax, %rdx
	movl	-152(%rbp), %eax
	cltq
	imulq	$1002, %rax, %rax
	addq	%rax, %rdx
	leaq	map(%rip), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	cmpb	$88, %al
	je	.L24
	movl	-148(%rbp), %eax
	movslq	%eax, %rdx
	movl	-152(%rbp), %eax
	cltq
	imulq	$1002, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	visited(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	$1, %eax
	je	.L24
	movl	-148(%rbp), %eax
	movslq	%eax, %rdx
	movl	-152(%rbp), %eax
	cltq
	imulq	$1002, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	visited(%rip), %rax
	movl	$1, (%rdx,%rax)
	movq	-144(%rbp), %rax
	movl	8(%rax), %eax
	leal	1(%rax), %edx
	movl	-148(%rbp), %ecx
	movl	-152(%rbp), %eax
	movl	%ecx, %esi
	movl	%eax, %edi
	call	push
.L24:
	addl	$1, -156(%rbp)
.L23:
	cmpl	$3, -156(%rbp)
	jle	.L25
	jmp	.L26
.L30:
	addl	$1, -168(%rbp)
.L20:
	movl	-172(%rbp), %eax
	cmpl	%eax, -168(%rbp)
	jl	.L27
	movl	-164(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L29
	call	__stack_chk_fail@PLT
.L29:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE3:
	.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	top
	.bss
	.align 4
	.type	top, @object
	.size	top, 4
top:
	.zero	4
	.globl	bottom
	.align 4
	.type	bottom, @object
	.size	bottom, 4
bottom:
	.zero	4
	.globl	q
	.align 32
	.type	q, @object
	.size	q, 6000000
q:
	.zero	6000000
	.globl	map
	.align 32
	.type	map, @object
	.size	map, 1004004
map:
	.zero	1004004
	.globl	visited
	.align 32
	.type	visited, @object
	.size	visited, 4016016
visited:
	.zero	4016016
	.text
	.globl	init
	.type	init, @function
init:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	$0, -8(%rbp)
	jmp	.L2
.L5:
	movl	$0, -4(%rbp)
	jmp	.L3
.L4:
	movl	-4(%rbp), %eax
	movslq	%eax, %rdx
	movl	-8(%rbp), %eax
	cltq
	imulq	$1002, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	visited(%rip), %rax
	movl	$0, (%rdx,%rax)
	addl	$1, -4(%rbp)
.L3:
	cmpl	$1001, -4(%rbp)
	jle	.L4
	addl	$1, -8(%rbp)
.L2:
	cmpl	$1001, -8(%rbp)
	jle	.L5
	nop
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	init, .-init
	.globl	push
	.type	push, @function
push:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -4(%rbp)
	movl	%esi, -8(%rbp)
	movl	%edx, -12(%rbp)
	movl	top(%rip), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rcx
	leaq	q(%rip), %rdx
	movl	-4(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	movl	top(%rip), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rcx
	leaq	4+q(%rip), %rdx
	movl	-8(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	movl	top(%rip), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rcx
	leaq	8+q(%rip), %rdx
	movl	-12(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	movl	top(%rip), %eax
	addl	$1, %eax
	movl	%eax, top(%rip)
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	push, .-push
	.globl	pop
	.type	pop, @function
pop:
.LFB2:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	top(%rip), %edx
	movl	bottom(%rip), %eax
	cmpl	%eax, %edx
	jne	.L8
	movl	$0, %eax
	jmp	.L9
.L8:
	movl	bottom(%rip), %eax
	leal	1(%rax), %edx
	movl	%edx, bottom(%rip)
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	leaq	q(%rip), %rdx
	addq	%rdx, %rax
.L9:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	pop, .-pop
	.section	.rodata
.LC0:
	.string	"%d %d %d"
.LC1:
	.string	"%s"
.LC2:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB3:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$192, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -164(%rbp)
	movl	$-1, -128(%rbp)
	movl	$0, -124(%rbp)
	movl	$1, -120(%rbp)
	movl	$0, -116(%rbp)
	movl	$0, -112(%rbp)
	movl	$-1, -108(%rbp)
	movl	$0, -104(%rbp)
	movl	$1, -100(%rbp)
	leaq	-172(%rbp), %rcx
	leaq	-176(%rbp), %rdx
	leaq	-180(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -168(%rbp)
	jmp	.L11
.L19:
	cmpl	$0, -168(%rbp)
	je	.L12
	movl	-180(%rbp), %eax
	addl	$1, %eax
	cmpl	%eax, -168(%rbp)
	jne	.L13
.L12:
	movl	-176(%rbp), %eax
	addl	$2, %eax
	cltq
	movl	-168(%rbp), %edx
	movslq	%edx, %rdx
	imulq	$1002, %rdx, %rdx
	leaq	map(%rip), %rcx
	addq	%rdx, %rcx
	movq	%rax, %rdx
	movl	$88, %esi
	movq	%rcx, %rdi
	call	memset@PLT
	jmp	.L14
.L13:
	movl	-168(%rbp), %eax
	cltq
	imulq	$1002, %rax, %rax
	leaq	1(%rax), %rdx
	leaq	map(%rip), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-168(%rbp), %eax
	cltq
	imulq	$1002, %rax, %rax
	leaq	map(%rip), %rdx
	movb	$88, (%rax,%rdx)
	movl	-176(%rbp), %eax
	addl	$1, %eax
	movslq	%eax, %rdx
	movl	-168(%rbp), %eax
	cltq
	imulq	$1002, %rax, %rax
	addq	%rax, %rdx
	leaq	map(%rip), %rax
	addq	%rdx, %rax
	movb	$88, (%rax)
	movl	-168(%rbp), %eax
	cltq
	imulq	$1002, %rax, %rax
	leaq	map(%rip), %rdx
	addq	%rdx, %rax
	movl	$83, %esi
	movq	%rax, %rdi
	call	strchr@PLT
	testq	%rax, %rax
	je	.L15
	movl	-168(%rbp), %eax
	movl	%eax, -96(%rbp)
	movl	-168(%rbp), %eax
	cltq
	imulq	$1002, %rax, %rax
	leaq	map(%rip), %rdx
	addq	%rdx, %rax
	movl	$83, %esi
	movq	%rax, %rdi
	call	strchr@PLT
	movl	-168(%rbp), %edx
	movslq	%edx, %rdx
	imulq	$1002, %rdx, %rdx
	leaq	map(%rip), %rcx
	addq	%rcx, %rdx
	subq	%rdx, %rax
	movl	%eax, -92(%rbp)
.L15:
	movl	$0, -160(%rbp)
	jmp	.L16
.L18:
	movl	-160(%rbp), %eax
	leal	48(%rax), %edx
	movl	-168(%rbp), %eax
	cltq
	imulq	$1002, %rax, %rax
	leaq	map(%rip), %rcx
	addq	%rcx, %rax
	movl	%edx, %esi
	movq	%rax, %rdi
	call	strchr@PLT
	movq	%rax, -136(%rbp)
	cmpq	$0, -136(%rbp)
	je	.L17
	movl	-160(%rbp), %eax
	cltq
	movl	-168(%rbp), %edx
	movl	%edx, -96(%rbp,%rax,8)
	movl	-168(%rbp), %eax
	cltq
	imulq	$1002, %rax, %rax
	leaq	map(%rip), %rdx
	addq	%rax, %rdx
	movq	-136(%rbp), %rax
	subq	%rdx, %rax
	movl	%eax, %edx
	movl	-160(%rbp), %eax
	cltq
	movl	%edx, -92(%rbp,%rax,8)
.L17:
	addl	$1, -160(%rbp)
.L16:
	movl	-176(%rbp), %eax
	addl	$1, %eax
	cmpl	%eax, -160(%rbp)
	jle	.L18
.L14:
	addl	$1, -168(%rbp)
.L11:
	movl	-180(%rbp), %eax
	addl	$1, %eax
	cmpl	%eax, -168(%rbp)
	jle	.L19
	movl	$0, -168(%rbp)
	jmp	.L20
.L27:
	movl	$0, %eax
	call	init
	movl	$0, top(%rip)
	movl	$0, bottom(%rip)
	movl	-168(%rbp), %eax
	cltq
	movl	-92(%rbp,%rax,8), %ecx
	movl	-168(%rbp), %eax
	cltq
	movl	-96(%rbp,%rax,8), %eax
	movl	$0, %edx
	movl	%ecx, %esi
	movl	%eax, %edi
	call	push
.L26:
	call	pop
	movq	%rax, -144(%rbp)
	movq	-144(%rbp), %rax
	movl	(%rax), %edx
	movl	-168(%rbp), %eax
	addl	$1, %eax
	cltq
	movl	-96(%rbp,%rax,8), %eax
	cmpl	%eax, %edx
	jne	.L21
	movq	-144(%rbp), %rax
	movl	4(%rax), %edx
	movl	-168(%rbp), %eax
	addl	$1, %eax
	cltq
	movl	-92(%rbp,%rax,8), %eax
	cmpl	%eax, %edx
	jne	.L21
	movq	-144(%rbp), %rax
	movl	8(%rax), %eax
	addl	%eax, -164(%rbp)
	jmp	.L30
.L21:
	movl	$0, -156(%rbp)
	jmp	.L23
.L25:
	movq	-144(%rbp), %rax
	movl	(%rax), %edx
	movl	-156(%rbp), %eax
	cltq
	movl	-128(%rbp,%rax,8), %eax
	addl	%edx, %eax
	movl	%eax, -152(%rbp)
	movq	-144(%rbp), %rax
	movl	4(%rax), %edx
	movl	-156(%rbp), %eax
	cltq
	movl	-124(%rbp,%rax,8), %eax
	addl	%edx, %eax
	movl	%eax, -148(%rbp)
	movl	-148(%rbp), %eax
	movslq	%eax, %rdx
	movl	-152(%rbp), %eax
	cltq
	imulq	$1002, %rax, %rax
	addq	%rax, %rdx
	leaq	map(%rip), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	cmpb	$88, %al
	je	.L24
	movl	-148(%rbp), %eax
	movslq	%eax, %rdx
	movl	-152(%rbp), %eax
	cltq
	imulq	$1002, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	visited(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	$1, %eax
	je	.L24
	movl	-148(%rbp), %eax
	movslq	%eax, %rdx
	movl	-152(%rbp), %eax
	cltq
	imulq	$1002, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	visited(%rip), %rax
	movl	$1, (%rdx,%rax)
	movq	-144(%rbp), %rax
	movl	8(%rax), %eax
	leal	1(%rax), %edx
	movl	-148(%rbp), %ecx
	movl	-152(%rbp), %eax
	movl	%ecx, %esi
	movl	%eax, %edi
	call	push
.L24:
	addl	$1, -156(%rbp)
.L23:
	cmpl	$3, -156(%rbp)
	jle	.L25
	jmp	.L26
.L30:
	addl	$1, -168(%rbp)
.L20:
	movl	-172(%rbp), %eax
	cmpl	%eax, -168(%rbp)
	jl	.L27
	movl	-164(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L29
	call	__stack_chk_fail@PLT
.L29:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE3:
	.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:
