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<stdlib.h>
#include<string.h>
#include<stdint.h>
#include<tgmath.h>
#include<stdbool.h>
#include<sys/queue.h>
#include<time.h>
#define ll long long
#define min(a, b) ((a) > (b) ? (b) : (a))
#define max(a, b) ((a) > (b) ? (a) : (b))

int h, w, t[55][55], u, dx[]={0,1,0,-1}, dy[]={-1,0,1,0};
char s[55][55];

main(){
    scanf("%d%d", &h, &w);
    for(int i=0; i<h; i++){
        scanf("%s", s[i]);
        for(int j=0; j<w; j++){
            t[i][j] = -1;
            u += (s[i][j]=='.');
        }
    }
    int que[3333], l=0, r=0;
    que[r++] = 0;
    t[0][0] = 1;
    while(r != l){
        int x = que[l]/100, y = que[l]%100;
        l++;
        for(int i=0; i<4; i++){
            int nx = x+dx[i], ny = y+dy[i];
            if(0<=nx&&nx<h && 0<=ny&&ny<w && t[nx][ny]==-1 && s[nx][ny]=='.'){
                t[nx][ny] = t[x][y] + 1;
                que[r++] = nx*100 + ny;
            }
        }
    }
    if(t[h-1][w-1] == -1)puts("-1");
    else printf("%d\n", u - t[h-1][w-1]);
    return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	h
	.bss
	.align 4
	.type	h, @object
	.size	h, 4
h:
	.zero	4
	.globl	w
	.align 4
	.type	w, @object
	.size	w, 4
w:
	.zero	4
	.globl	t
	.align 32
	.type	t, @object
	.size	t, 12100
t:
	.zero	12100
	.globl	u
	.align 4
	.type	u, @object
	.size	u, 4
u:
	.zero	4
	.globl	dx
	.data
	.align 16
	.type	dx, @object
	.size	dx, 16
dx:
	.long	0
	.long	1
	.long	0
	.long	-1
	.globl	dy
	.align 16
	.type	dy, @object
	.size	dy, 16
dy:
	.long	-1
	.long	0
	.long	1
	.long	0
	.globl	s
	.bss
	.align 32
	.type	s, @object
	.size	s, 3025
s:
	.zero	3025
	.section	.rodata
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%s"
.LC2:
	.string	"-1"
.LC3:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$4096, %rsp
	orq	$0, (%rsp)
	subq	$4096, %rsp
	orq	$0, (%rsp)
	subq	$4096, %rsp
	orq	$0, (%rsp)
	subq	$1104, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	w(%rip), %rax
	movq	%rax, %rdx
	leaq	h(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -13380(%rbp)
	jmp	.L2
.L5:
	movl	-13380(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	leaq	s(%rip), %rdx
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -13376(%rbp)
	jmp	.L3
.L4:
	movl	-13376(%rbp), %eax
	movslq	%eax, %rcx
	movl	-13380(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	t(%rip), %rax
	movl	$-1, (%rdx,%rax)
	movl	-13376(%rbp), %eax
	movslq	%eax, %rcx
	movl	-13380(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	leaq	(%rax,%rcx), %rdx
	leaq	s(%rip), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	cmpb	$46, %al
	sete	%al
	movzbl	%al, %edx
	movl	u(%rip), %eax
	addl	%edx, %eax
	movl	%eax, u(%rip)
	addl	$1, -13376(%rbp)
.L3:
	movl	w(%rip), %eax
	cmpl	%eax, -13376(%rbp)
	jl	.L4
	addl	$1, -13380(%rbp)
.L2:
	movl	h(%rip), %eax
	cmpl	%eax, -13380(%rbp)
	jl	.L5
	movl	$0, -13372(%rbp)
	movl	$0, -13368(%rbp)
	movl	-13368(%rbp), %eax
	leal	1(%rax), %edx
	movl	%edx, -13368(%rbp)
	cltq
	movl	$0, -13344(%rbp,%rax,4)
	movl	$1, t(%rip)
	jmp	.L6
.L10:
	movl	-13372(%rbp), %eax
	cltq
	movl	-13344(%rbp,%rax,4), %eax
	movslq	%eax, %rdx
	imulq	$1374389535, %rdx, %rdx
	shrq	$32, %rdx
	sarl	$5, %edx
	sarl	$31, %eax
	movl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	movl	%eax, -13360(%rbp)
	movl	-13372(%rbp), %eax
	cltq
	movl	-13344(%rbp,%rax,4), %eax
	movslq	%eax, %rdx
	imulq	$1374389535, %rdx, %rdx
	shrq	$32, %rdx
	sarl	$5, %edx
	movl	%eax, %ecx
	sarl	$31, %ecx
	subl	%ecx, %edx
	movl	%edx, -13356(%rbp)
	movl	-13356(%rbp), %edx
	imull	$100, %edx, %edx
	subl	%edx, %eax
	movl	%eax, -13356(%rbp)
	addl	$1, -13372(%rbp)
	movl	$0, -13364(%rbp)
	jmp	.L7
.L9:
	movl	-13364(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	dx(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-13360(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, -13352(%rbp)
	movl	-13364(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	dy(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-13356(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, -13348(%rbp)
	cmpl	$0, -13352(%rbp)
	js	.L8
	movl	h(%rip), %eax
	cmpl	%eax, -13352(%rbp)
	jge	.L8
	cmpl	$0, -13348(%rbp)
	js	.L8
	movl	w(%rip), %eax
	cmpl	%eax, -13348(%rbp)
	jge	.L8
	movl	-13348(%rbp), %eax
	movslq	%eax, %rcx
	movl	-13352(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	t(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	$-1, %eax
	jne	.L8
	movl	-13348(%rbp), %eax
	movslq	%eax, %rcx
	movl	-13352(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	leaq	(%rax,%rcx), %rdx
	leaq	s(%rip), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	cmpb	$46, %al
	jne	.L8
	movl	-13356(%rbp), %eax
	movslq	%eax, %rcx
	movl	-13360(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	t(%rip), %rax
	movl	(%rdx,%rax), %eax
	leal	1(%rax), %ecx
	movl	-13348(%rbp), %eax
	movslq	%eax, %rsi
	movl	-13352(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,4), %rdx
	leaq	t(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	-13352(%rbp), %eax
	imull	$100, %eax, %ecx
	movl	-13368(%rbp), %eax
	leal	1(%rax), %edx
	movl	%edx, -13368(%rbp)
	movl	-13348(%rbp), %edx
	addl	%ecx, %edx
	cltq
	movl	%edx, -13344(%rbp,%rax,4)
.L8:
	addl	$1, -13364(%rbp)
.L7:
	cmpl	$3, -13364(%rbp)
	jle	.L9
.L6:
	movl	-13368(%rbp), %eax
	cmpl	-13372(%rbp), %eax
	jne	.L10
	movl	h(%rip), %eax
	leal	-1(%rax), %edx
	movl	w(%rip), %eax
	subl	$1, %eax
	movslq	%eax, %rcx
	movslq	%edx, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	t(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	$-1, %eax
	jne	.L11
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L12
.L11:
	movl	u(%rip), %ecx
	movl	h(%rip), %eax
	leal	-1(%rax), %edx
	movl	w(%rip), %eax
	subl	$1, %eax
	movslq	%eax, %rsi
	movslq	%edx, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,4), %rdx
	leaq	t(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	%ecx, %eax
	subl	%edx, %eax
	movl	%eax, %esi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L12:
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L14
	call	__stack_chk_fail@PLT
.L14:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
```

Only output the optimized assembly code. Do not include any other text. Do not write any comments in the assembly code. Wrap the assembly code in ```assembly``` tags.
user
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%s"
.LC4:
	.string	"-1"
.LC5:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB51:
	.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	$4096, %rsp
	.cfi_def_cfa_offset 4152
	orq	$0, (%rsp)
	subq	$4096, %rsp
	.cfi_def_cfa_offset 8248
	orq	$0, (%rsp)
	subq	$4096, %rsp
	.cfi_def_cfa_offset 12344
	orq	$0, (%rsp)
	subq	$1112, %rsp
	.cfi_def_cfa_offset 13456
	leaq	w(%rip), %rdx
	leaq	h(%rip), %rsi
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 13384(%rsp)
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	h(%rip), %ecx
	testl	%ecx, %ecx
	jle	.L2
	leaq	t(%rip), %rax
	leaq	s(%rip), %r13
	xorl	%ebp, %ebp
	movq	%rax, 32(%rsp)
	movq	%rax, %r12
	leaq	.LC1(%rip), %r14
	.p2align 4,,10
	.p2align 3
.L7:
	movq	%r13, %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	w(%rip), %ebx
	testl	%ebx, %ebx
	jle	.L3
	movl	%ebx, %edx
	movl	$255, %esi
	movq	%r12, %rdi
	movl	u(%rip), %r15d
	salq	$2, %rdx
	call	memset@PLT
	leal	-1(%rbx), %eax
	cmpl	$14, %eax
	jbe	.L17
	movdqu	0(%r13), %xmm2
	pxor	%xmm5, %xmm5
	pxor	%xmm3, %xmm3
	movl	%ebx, %eax
	shrl	$4, %eax
	pcmpeqb	.LC2(%rip), %xmm2
	pand	.LC3(%rip), %xmm2
	movdqa	%xmm2, %xmm1
	punpckhbw	%xmm5, %xmm2
	punpcklbw	%xmm5, %xmm1
	movdqa	%xmm1, %xmm4
	movdqa	%xmm1, %xmm0
	movdqa	%xmm2, %xmm1
	punpcklwd	%xmm3, %xmm4
	punpckhwd	%xmm3, %xmm0
	punpcklwd	%xmm3, %xmm1
	paddd	%xmm4, %xmm0
	punpckhwd	%xmm3, %xmm2
	paddd	%xmm1, %xmm0
	paddd	%xmm2, %xmm0
	cmpl	$1, %eax
	je	.L5
	movdqu	16(%r13), %xmm1
	pcmpeqb	.LC2(%rip), %xmm1
	pand	.LC3(%rip), %xmm1
	movdqa	%xmm1, %xmm2
	punpckhbw	%xmm5, %xmm1
	punpcklbw	%xmm5, %xmm2
	movdqa	%xmm2, %xmm4
	punpckhwd	%xmm3, %xmm2
	punpcklwd	%xmm3, %xmm4
	paddd	%xmm4, %xmm0
	paddd	%xmm2, %xmm0
	movdqa	%xmm1, %xmm2
	punpckhwd	%xmm3, %xmm1
	punpcklwd	%xmm3, %xmm2
	paddd	%xmm2, %xmm0
	paddd	%xmm1, %xmm0
	cmpl	$2, %eax
	je	.L5
	movdqu	32(%r13), %xmm1
	pcmpeqb	.LC2(%rip), %xmm1
	pand	.LC3(%rip), %xmm1
	movdqa	%xmm1, %xmm2
	punpckhbw	%xmm5, %xmm1
	punpcklbw	%xmm5, %xmm2
	movdqa	%xmm2, %xmm4
	punpckhwd	%xmm3, %xmm2
	punpcklwd	%xmm3, %xmm4
	paddd	%xmm4, %xmm0
	paddd	%xmm2, %xmm0
	movdqa	%xmm1, %xmm2
	punpckhwd	%xmm3, %xmm1
	punpcklwd	%xmm3, %xmm2
	paddd	%xmm2, %xmm0
	paddd	%xmm1, %xmm0
.L5:
	movdqa	%xmm0, %xmm1
	psrldq	$8, %xmm1
	paddd	%xmm1, %xmm0
	movdqa	%xmm0, %xmm1
	psrldq	$4, %xmm1
	paddd	%xmm1, %xmm0
	movd	%xmm0, %eax
	addl	%eax, %r15d
	movl	%ebx, %eax
	andl	$-16, %eax
	testb	$15, %bl
	je	.L6
.L4:
	movslq	%ebp, %rcx
	leaq	s(%rip), %rdi
	movslq	%eax, %rsi
	leaq	(%rcx,%rcx,4), %rdx
	leaq	(%rcx,%rdx,2), %rdx
	leaq	(%rdx,%rdx,4), %rdx
	addq	%rdi, %rdx
	cmpb	$46, (%rdx,%rsi)
	sete	%sil
	movzbl	%sil, %esi
	addl	%esi, %r15d
	leal	1(%rax), %esi
	cmpl	%esi, %ebx
	jle	.L6
	movslq	%esi, %rsi
	cmpb	$46, (%rdx,%rsi)
	sete	%sil
	movzbl	%sil, %esi
	addl	%esi, %r15d
	leal	2(%rax), %esi
	cmpl	%esi, %ebx
	jle	.L6
	movslq	%esi, %rsi
	cmpb	$46, (%rdx,%rsi)
	sete	%sil
	movzbl	%sil, %esi
	addl	%esi, %r15d
	leal	3(%rax), %esi
	cmpl	%esi, %ebx
	jle	.L6
	movslq	%esi, %rsi
	cmpb	$46, (%rdx,%rsi)
	sete	%sil
	movzbl	%sil, %esi
	addl	%esi, %r15d
	leal	4(%rax), %esi
	cmpl	%esi, %ebx
	jle	.L6
	movslq	%esi, %rsi
	cmpb	$46, (%rdx,%rsi)
	sete	%sil
	movzbl	%sil, %esi
	addl	%esi, %r15d
	leal	5(%rax), %esi
	cmpl	%esi, %ebx
	jle	.L6
	movslq	%esi, %rsi
	cmpb	$46, (%rdx,%rsi)
	sete	%sil
	movzbl	%sil, %esi
	addl	%esi, %r15d
	leal	6(%rax), %esi
	cmpl	%esi, %ebx
	jle	.L6
	movslq	%esi, %rsi
	cmpb	$46, (%rdx,%rsi)
	sete	%sil
	movzbl	%sil, %esi
	addl	%esi, %r15d
	leal	7(%rax), %esi
	cmpl	%esi, %ebx
	jle	.L6
	movslq	%esi, %rsi
	cmpb	$46, (%rdx,%rsi)
	sete	%sil
	movzbl	%sil, %esi
	addl	%esi, %r15d
	leal	8(%rax), %esi
	cmpl	%esi, %ebx
	jle	.L6
	movslq	%esi, %rsi
	cmpb	$46, (%rdx,%rsi)
	sete	%sil
	movzbl	%sil, %esi
	addl	%esi, %r15d
	leal	9(%rax), %esi
	cmpl	%esi, %ebx
	jle	.L6
	movslq	%esi, %rsi
	cmpb	$46, (%rdx,%rsi)
	sete	%dl
	movzbl	%dl, %edx
	addl	%edx, %r15d
	leal	10(%rax), %edx
	cmpl	%edx, %ebx
	jle	.L6
	movslq	%edx, %rsi
	leaq	(%rcx,%rcx,4), %rdx
	leaq	(%rcx,%rdx,2), %rdx
	xorl	%ecx, %ecx
	leaq	(%rdx,%rdx,4), %rdx
	addq	%rdi, %rdx
	cmpb	$46, (%rdx,%rsi)
	sete	%cl
	addl	%ecx, %r15d
	leal	11(%rax), %ecx
	cmpl	%ecx, %ebx
	jle	.L6
	movslq	%ecx, %rcx
	cmpb	$46, (%rdx,%rcx)
	sete	%cl
	movzbl	%cl, %ecx
	addl	%ecx, %r15d
	leal	12(%rax), %ecx
	cmpl	%ecx, %ebx
	jle	.L6
	movslq	%ecx, %rcx
	cmpb	$46, (%rdx,%rcx)
	sete	%cl
	movzbl	%cl, %ecx
	addl	%ecx, %r15d
	leal	13(%rax), %ecx
	cmpl	%ecx, %ebx
	jle	.L6
	movslq	%ecx, %rcx
	cmpb	$46, (%rdx,%rcx)
	sete	%cl
	addl	$14, %eax
	movzbl	%cl, %ecx
	addl	%ecx, %r15d
	cmpl	%eax, %ebx
	jle	.L6
	cltq
	cmpb	$46, (%rdx,%rax)
	sete	%al
	movzbl	%al, %eax
	addl	%eax, %r15d
	.p2align 4,,10
	.p2align 3
.L6:
	movl	%r15d, u(%rip)
.L3:
	movl	h(%rip), %ecx
	addl	$1, %ebp
	addq	$55, %r13
	addq	$220, %r12
	cmpl	%ebp, %ecx
	jg	.L7
.L8:
	movl	8+dx(%rip), %eax
	movl	%ebx, 28(%rsp)
	xorl	%esi, %esi
	leaq	48(%rsp), %r9
	movl	$0, 48(%rsp)
	movl	dx(%rip), %r12d
	movl	%eax, 16(%rsp)
	movl	8+dy(%rip), %eax
	movl	$1, t(%rip)
	movl	dy(%rip), %ebp
	movl	%eax, 20(%rsp)
	movl	12+dx(%rip), %eax
	movl	$1, 12(%rsp)
	movl	4+dx(%rip), %r11d
	movl	%eax, 24(%rsp)
	movl	4+dy(%rip), %r10d
	movl	12+dy(%rip), %r14d
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L9:
	leal	(%rax,%r11), %edi
	leal	(%rdx,%r10), %r8d
	movl	%edi, %ebx
	orl	%r8d, %ebx
	js	.L10
	cmpl	%edi, %ecx
	jg	.L40
.L10:
	movl	16(%rsp), %ebx
	leal	(%rax,%rbx), %edi
	movl	20(%rsp), %ebx
	leal	(%rdx,%rbx), %r8d
	movl	%edi, %ebx
	orl	%r8d, %ebx
	js	.L11
	cmpl	%edi, %ecx
	jg	.L41
.L11:
	movl	24(%rsp), %edi
	leal	(%rdx,%r14), %r8d
	addl	%eax, %edi
	movl	%edi, %ebx
	orl	%r8d, %ebx
	js	.L12
	cmpl	%edi, %ecx
	jg	.L42
.L12:
	addq	$1, %rsi
	cmpl	%esi, 12(%rsp)
	je	.L43
.L13:
	movslq	(%r9,%rsi,4), %rax
	movq	%rax, %rdx
	imulq	$1374389535, %rax, %rax
	movl	%edx, %edi
	sarl	$31, %edi
	sarq	$37, %rax
	subl	%edi, %eax
	imull	$100, %eax, %edi
	subl	%edi, %edx
	leal	(%rax,%r12), %edi
	leal	(%rdx,%rbp), %r8d
	movl	%edi, %ebx
	orl	%r8d, %ebx
	js	.L9
	cmpl	%edi, %ecx
	jle	.L9
	cmpl	28(%rsp), %r8d
	jge	.L9
	movslq	%edi, %rbx
	movslq	%r8d, %r13
	leaq	(%rbx,%rbx,4), %r15
	movq	%r13, 40(%rsp)
	leaq	(%rbx,%r15,2), %r15
	leaq	(%r15,%r15,4), %r15
	addq	%r13, %r15
	movq	32(%rsp), %r13
	cmpl	$-1, 0(%r13,%r15,4)
	jne	.L9
	imulq	$55, %rbx, %rbx
	movq	40(%rsp), %r13
	leaq	s(%rip), %r15
	addq	%rbx, %r15
	cmpb	$46, (%r15,%r13)
	jne	.L9
	movq	%r13, %r15
	imull	$100, %edi, %edi
	movslq	%edx, %r13
	addq	%rbx, %r15
	movslq	%eax, %rbx
	imulq	$55, %rbx, %rbx
	addl	%r8d, %edi
	addq	%r13, %rbx
	movq	32(%rsp), %r13
	movl	0(%r13,%rbx,4), %ebx
	addl	$1, %ebx
	movl	%ebx, 0(%r13,%r15,4)
	movslq	12(%rsp), %rbx
	movl	%edi, 48(%rsp,%rbx,4)
	leal	1(%rbx), %edi
	movl	%edi, 12(%rsp)
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L42:
	cmpl	28(%rsp), %r8d
	jge	.L12
	movslq	%edi, %rbx
	movslq	%r8d, %r13
	leaq	(%rbx,%rbx,4), %r15
	movq	%r13, 40(%rsp)
	leaq	(%rbx,%r15,2), %r15
	leaq	(%r15,%r15,4), %r15
	addq	%r13, %r15
	movq	32(%rsp), %r13
	cmpl	$-1, 0(%r13,%r15,4)
	jne	.L12
	imulq	$55, %rbx, %rbx
	movq	40(%rsp), %r13
	leaq	s(%rip), %r15
	addq	%rbx, %r15
	cmpb	$46, (%r15,%r13)
	jne	.L12
	cltq
	imull	$100, %edi, %edi
	movslq	%edx, %rdx
	addq	%r13, %rbx
	imulq	$55, %rax, %rax
	addl	%r8d, %edi
	addq	%rdx, %rax
	movq	32(%rsp), %rdx
	movl	(%rdx,%rax,4), %eax
	addl	$1, %eax
	movl	%eax, (%rdx,%rbx,4)
	movslq	12(%rsp), %rax
	movl	%edi, 48(%rsp,%rax,4)
	leal	1(%rax), %eax
	movl	%eax, 12(%rsp)
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L40:
	cmpl	28(%rsp), %r8d
	jge	.L10
	movslq	%edi, %rbx
	movslq	%r8d, %r13
	leaq	(%rbx,%rbx,4), %r15
	movq	%r13, 40(%rsp)
	leaq	(%rbx,%r15,2), %r15
	leaq	(%r15,%r15,4), %r15
	addq	%r13, %r15
	movq	32(%rsp), %r13
	cmpl	$-1, 0(%r13,%r15,4)
	jne	.L10
	imulq	$55, %rbx, %rbx
	movq	40(%rsp), %r13
	leaq	s(%rip), %r15
	addq	%rbx, %r15
	cmpb	$46, (%r15,%r13)
	jne	.L10
	movq	%r13, %r15
	imull	$100, %edi, %edi
	movslq	%edx, %r13
	addq	%rbx, %r15
	movslq	%eax, %rbx
	imulq	$55, %rbx, %rbx
	addl	%r8d, %edi
	addq	%r13, %rbx
	movq	32(%rsp), %r13
	movl	0(%r13,%rbx,4), %ebx
	addl	$1, %ebx
	movl	%ebx, 0(%r13,%r15,4)
	movslq	12(%rsp), %rbx
	movl	%edi, 48(%rsp,%rbx,4)
	leal	1(%rbx), %edi
	movl	%edi, 12(%rsp)
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L41:
	cmpl	28(%rsp), %r8d
	jge	.L11
	movslq	%edi, %rbx
	movslq	%r8d, %r13
	leaq	(%rbx,%rbx,4), %r15
	movq	%r13, 40(%rsp)
	leaq	(%rbx,%r15,2), %r15
	leaq	(%r15,%r15,4), %r15
	addq	%r13, %r15
	movq	32(%rsp), %r13
	cmpl	$-1, 0(%r13,%r15,4)
	jne	.L11
	imulq	$55, %rbx, %rbx
	movq	40(%rsp), %r13
	leaq	s(%rip), %r15
	addq	%rbx, %r15
	cmpb	$46, (%r15,%r13)
	jne	.L11
	movq	%r13, %r15
	imull	$100, %edi, %edi
	movslq	%edx, %r13
	addq	%rbx, %r15
	movslq	%eax, %rbx
	imulq	$55, %rbx, %rbx
	addl	%r8d, %edi
	addq	%r13, %rbx
	movq	32(%rsp), %r13
	movl	0(%r13,%rbx,4), %ebx
	addl	$1, %ebx
	movl	%ebx, 0(%r13,%r15,4)
	movslq	12(%rsp), %rbx
	movl	%edi, 48(%rsp,%rbx,4)
	leal	1(%rbx), %edi
	movl	%edi, 12(%rsp)
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L43:
	leal	-1(%rcx), %edx
	movl	28(%rsp), %ebx
	movslq	%edx, %rdx
	leaq	(%rdx,%rdx,4), %rcx
	leal	-1(%rbx), %eax
	leaq	(%rdx,%rcx,2), %rdx
	cltq
	movq	32(%rsp), %rcx
	leaq	(%rdx,%rdx,4), %rdx
	addq	%rdx, %rax
	movl	(%rcx,%rax,4), %eax
	cmpl	$-1, %eax
	je	.L44
	movl	u(%rip), %edx
	leaq	.LC5(%rip), %rsi
	movl	$1, %edi
	subl	%eax, %edx
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L15:
	movq	13384(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L45
	addq	$13400, %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
.L17:
	.cfi_restore_state
	xorl	%eax, %eax
	jmp	.L4
.L44:
	leaq	.LC4(%rip), %rdi
	call	puts@PLT
	jmp	.L15
.L2:
	leaq	t(%rip), %rax
	movl	w(%rip), %ebx
	movq	%rax, 32(%rsp)
	jmp	.L8
.L45:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE51:
	.size	main, .-main
	.globl	s
	.bss
	.align 32
	.type	s, @object
	.size	s, 3025
s:
	.zero	3025
	.globl	dy
	.data
	.align 16
	.type	dy, @object
	.size	dy, 16
dy:
	.long	-1
	.long	0
	.long	1
	.long	0
	.globl	dx
	.align 16
	.type	dx, @object
	.size	dx, 16
dx:
	.long	0
	.long	1
	.long	0
	.long	-1
	.globl	u
	.bss
	.align 4
	.type	u, @object
	.size	u, 4
u:
	.zero	4
	.globl	t
	.align 32
	.type	t, @object
	.size	t, 12100
t:
	.zero	12100
	.globl	w
	.align 4
	.type	w, @object
	.size	w, 4
w:
	.zero	4
	.globl	h
	.align 4
	.type	h, @object
	.size	h, 4
h:
	.zero	4
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC2:
	.byte	46
	.byte	46
	.byte	46
	.byte	46
	.byte	46
	.byte	46
	.byte	46
	.byte	46
	.byte	46
	.byte	46
	.byte	46
	.byte	46
	.byte	46
	.byte	46
	.byte	46
	.byte	46
	.align 16
.LC3:
	.byte	1
	.byte	1
	.byte	1
	.byte	1
	.byte	1
	.byte	1
	.byte	1
	.byte	1
	.byte	1
	.byte	1
	.byte	1
	.byte	1
	.byte	1
	.byte	1
	.byte	1
	.byte	1
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:

rule
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%s"
.LC4:
	.string	"-1"
.LC5:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB51:
	.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	$4096, %rsp
	.cfi_def_cfa_offset 4152
	orq	$0, (%rsp)
	subq	$4096, %rsp
	.cfi_def_cfa_offset 8248
	orq	$0, (%rsp)
	subq	$4096, %rsp
	.cfi_def_cfa_offset 12344
	orq	$0, (%rsp)
	subq	$1112, %rsp
	.cfi_def_cfa_offset 13456
	leaq	w(%rip), %rdx
	leaq	h(%rip), %rsi
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 13384(%rsp)
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	h(%rip), %ecx
	testl	%ecx, %ecx
	jle	.L2
	leaq	t(%rip), %rax
	leaq	s(%rip), %r13
	xorl	%ebp, %ebp
	movq	%rax, 32(%rsp)
	movq	%rax, %r12
	leaq	.LC1(%rip), %r14
	.p2align 4,,10
	.p2align 3
.L7:
	movq	%r13, %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	w(%rip), %ebx
	testl	%ebx, %ebx
	jle	.L3
	movl	%ebx, %edx
	movl	$255, %esi
	movq	%r12, %rdi
	movl	u(%rip), %r15d
	salq	$2, %rdx
	call	memset@PLT
	leal	-1(%rbx), %eax
	cmpl	$14, %eax
	jbe	.L17
	movdqu	0(%r13), %xmm2
	pxor	%xmm5, %xmm5
	pxor	%xmm3, %xmm3
	movl	%ebx, %eax
	shrl	$4, %eax
	pcmpeqb	.LC2(%rip), %xmm2
	pand	.LC3(%rip), %xmm2
	movdqa	%xmm2, %xmm1
	punpckhbw	%xmm5, %xmm2
	punpcklbw	%xmm5, %xmm1
	movdqa	%xmm1, %xmm4
	movdqa	%xmm1, %xmm0
	movdqa	%xmm2, %xmm1
	punpcklwd	%xmm3, %xmm4
	punpckhwd	%xmm3, %xmm0
	punpcklwd	%xmm3, %xmm1
	paddd	%xmm4, %xmm0
	punpckhwd	%xmm3, %xmm2
	paddd	%xmm1, %xmm0
	paddd	%xmm2, %xmm0
	cmpl	$1, %eax
	je	.L5
	movdqu	16(%r13), %xmm1
	pcmpeqb	.LC2(%rip), %xmm1
	pand	.LC3(%rip), %xmm1
	movdqa	%xmm1, %xmm2
	punpckhbw	%xmm5, %xmm1
	punpcklbw	%xmm5, %xmm2
	movdqa	%xmm2, %xmm4
	punpckhwd	%xmm3, %xmm2
	punpcklwd	%xmm3, %xmm4
	paddd	%xmm4, %xmm0
	paddd	%xmm2, %xmm0
	movdqa	%xmm1, %xmm2
	punpckhwd	%xmm3, %xmm1
	punpcklwd	%xmm3, %xmm2
	paddd	%xmm2, %xmm0
	paddd	%xmm1, %xmm0
	cmpl	$2, %eax
	je	.L5
	movdqu	32(%r13), %xmm1
	pcmpeqb	.LC2(%rip), %xmm1
	pand	.LC3(%rip), %xmm1
	movdqa	%xmm1, %xmm2
	punpckhbw	%xmm5, %xmm1
	punpcklbw	%xmm5, %xmm2
	movdqa	%xmm2, %xmm4
	punpckhwd	%xmm3, %xmm2
	punpcklwd	%xmm3, %xmm4
	paddd	%xmm4, %xmm0
	paddd	%xmm2, %xmm0
	movdqa	%xmm1, %xmm2
	punpckhwd	%xmm3, %xmm1
	punpcklwd	%xmm3, %xmm2
	paddd	%xmm2, %xmm0
	paddd	%xmm1, %xmm0
.L5:
	movdqa	%xmm0, %xmm1
	psrldq	$8, %xmm1
	paddd	%xmm1, %xmm0
	movdqa	%xmm0, %xmm1
	psrldq	$4, %xmm1
	paddd	%xmm1, %xmm0
	movd	%xmm0, %eax
	addl	%eax, %r15d
	movl	%ebx, %eax
	andl	$-16, %eax
	testb	$15, %bl
	je	.L6
.L4:
	movslq	%ebp, %rcx
	leaq	s(%rip), %rdi
	movslq	%eax, %rsi
	leaq	(%rcx,%rcx,4), %rdx
	leaq	(%rcx,%rdx,2), %rdx
	leaq	(%rdx,%rdx,4), %rdx
	addq	%rdi, %rdx
	cmpb	$46, (%rdx,%rsi)
	sete	%sil
	movzbl	%sil, %esi
	addl	%esi, %r15d
	leal	1(%rax), %esi
	cmpl	%esi, %ebx
	jle	.L6
	movslq	%esi, %rsi
	cmpb	$46, (%rdx,%rsi)
	sete	%sil
	movzbl	%sil, %esi
	addl	%esi, %r15d
	leal	2(%rax), %esi
	cmpl	%esi, %ebx
	jle	.L6
	movslq	%esi, %rsi
	cmpb	$46, (%rdx,%rsi)
	sete	%sil
	movzbl	%sil, %esi
	addl	%esi, %r15d
	leal	3(%rax), %esi
	cmpl	%esi, %ebx
	jle	.L6
	movslq	%esi, %rsi
	cmpb	$46, (%rdx,%rsi)
	sete	%sil
	movzbl	%sil, %esi
	addl	%esi, %r15d
	leal	4(%rax), %esi
	cmpl	%esi, %ebx
	jle	.L6
	movslq	%esi, %rsi
	cmpb	$46, (%rdx,%rsi)
	sete	%sil
	movzbl	%sil, %esi
	addl	%esi, %r15d
	leal	5(%rax), %esi
	cmpl	%esi, %ebx
	jle	.L6
	movslq	%esi, %rsi
	cmpb	$46, (%rdx,%rsi)
	sete	%sil
	movzbl	%sil, %esi
	addl	%esi, %r15d
	leal	6(%rax), %esi
	cmpl	%esi, %ebx
	jle	.L6
	movslq	%esi, %rsi
	cmpb	$46, (%rdx,%rsi)
	sete	%sil
	movzbl	%sil, %esi
	addl	%esi, %r15d
	leal	7(%rax), %esi
	cmpl	%esi, %ebx
	jle	.L6
	movslq	%esi, %rsi
	cmpb	$46, (%rdx,%rsi)
	sete	%sil
	movzbl	%sil, %esi
	addl	%esi, %r15d
	leal	8(%rax), %esi
	cmpl	%esi, %ebx
	jle	.L6
	movslq	%esi, %rsi
	cmpb	$46, (%rdx,%rsi)
	sete	%sil
	movzbl	%sil, %esi
	addl	%esi, %r15d
	leal	9(%rax), %esi
	cmpl	%esi, %ebx
	jle	.L6
	movslq	%esi, %rsi
	cmpb	$46, (%rdx,%rsi)
	sete	%dl
	movzbl	%dl, %edx
	addl	%edx, %r15d
	leal	10(%rax), %edx
	cmpl	%edx, %ebx
	jle	.L6
	movslq	%edx, %rsi
	leaq	(%rcx,%rcx,4), %rdx
	leaq	(%rcx,%rdx,2), %rdx
	xorl	%ecx, %ecx
	leaq	(%rdx,%rdx,4), %rdx
	addq	%rdi, %rdx
	cmpb	$46, (%rdx,%rsi)
	sete	%cl
	addl	%ecx, %r15d
	leal	11(%rax), %ecx
	cmpl	%ecx, %ebx
	jle	.L6
	movslq	%ecx, %rcx
	cmpb	$46, (%rdx,%rcx)
	sete	%cl
	movzbl	%cl, %ecx
	addl	%ecx, %r15d
	leal	12(%rax), %ecx
	cmpl	%ecx, %ebx
	jle	.L6
	movslq	%ecx, %rcx
	cmpb	$46, (%rdx,%rcx)
	sete	%cl
	movzbl	%cl, %ecx
	addl	%ecx, %r15d
	leal	13(%rax), %ecx
	cmpl	%ecx, %ebx
	jle	.L6
	movslq	%ecx, %rcx
	cmpb	$46, (%rdx,%rcx)
	sete	%cl
	addl	$14, %eax
	movzbl	%cl, %ecx
	addl	%ecx, %r15d
	cmpl	%eax, %ebx
	jle	.L6
	cltq
	cmpb	$46, (%rdx,%rax)
	sete	%al
	movzbl	%al, %eax
	addl	%eax, %r15d
	.p2align 4,,10
	.p2align 3
.L6:
	movl	%r15d, u(%rip)
.L3:
	movl	h(%rip), %ecx
	addl	$1, %ebp
	addq	$55, %r13
	addq	$220, %r12
	cmpl	%ebp, %ecx
	jg	.L7
.L8:
	movl	8+dx(%rip), %eax
	movl	%ebx, 28(%rsp)
	xorl	%esi, %esi
	leaq	48(%rsp), %r9
	movl	$0, 48(%rsp)
	movl	dx(%rip), %r12d
	movl	%eax, 16(%rsp)
	movl	8+dy(%rip), %eax
	movl	$1, t(%rip)
	movl	dy(%rip), %ebp
	movl	%eax, 20(%rsp)
	movl	12+dx(%rip), %eax
	movl	$1, 12(%rsp)
	movl	4+dx(%rip), %r11d
	movl	%eax, 24(%rsp)
	movl	4+dy(%rip), %r10d
	movl	12+dy(%rip), %r14d
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L9:
	leal	(%rax,%r11), %edi
	leal	(%rdx,%r10), %r8d
	movl	%edi, %ebx
	orl	%r8d, %ebx
	js	.L10
	cmpl	%edi, %ecx
	jg	.L40
.L10:
	movl	16(%rsp), %ebx
	leal	(%rax,%rbx), %edi
	movl	20(%rsp), %ebx
	leal	(%rdx,%rbx), %r8d
	movl	%edi, %ebx
	orl	%r8d, %ebx
	js	.L11
	cmpl	%edi, %ecx
	jg	.L41
.L11:
	movl	24(%rsp), %edi
	leal	(%rdx,%r14), %r8d
	addl	%eax, %edi
	movl	%edi, %ebx
	orl	%r8d, %ebx
	js	.L12
	cmpl	%edi, %ecx
	jg	.L42
.L12:
	addq	$1, %rsi
	cmpl	%esi, 12(%rsp)
	je	.L43
.L13:
	movslq	(%r9,%rsi,4), %rax
	movq	%rax, %rdx
	imulq	$1374389535, %rax, %rax
	movl	%edx, %edi
	sarl	$31, %edi
	sarq	$37, %rax
	subl	%edi, %eax
	imull	$100, %eax, %edi
	subl	%edi, %edx
	leal	(%rax,%r12), %edi
	leal	(%rdx,%rbp), %r8d
	movl	%edi, %ebx
	orl	%r8d, %ebx
	js	.L9
	cmpl	%edi, %ecx
	jle	.L9
	cmpl	28(%rsp), %r8d
	jge	.L9
	movslq	%edi, %rbx
	movslq	%r8d, %r13
	leaq	(%rbx,%rbx,4), %r15
	movq	%r13, 40(%rsp)
	leaq	(%rbx,%r15,2), %r15
	leaq	(%r15,%r15,4), %r15
	addq	%r13, %r15
	movq	32(%rsp), %r13
	cmpl	$-1, 0(%r13,%r15,4)
	jne	.L9
	imulq	$55, %rbx, %rbx
	movq	40(%rsp), %r13
	leaq	s(%rip), %r15
	addq	%rbx, %r15
	cmpb	$46, (%r15,%r13)
	jne	.L9
	movq	%r13, %r15
	imull	$100, %edi, %edi
	movslq	%edx, %r13
	addq	%rbx, %r15
	movslq	%eax, %rbx
	imulq	$55, %rbx, %rbx
	addl	%r8d, %edi
	addq	%r13, %rbx
	movq	32(%rsp), %r13
	movl	0(%r13,%rbx,4), %ebx
	addl	$1, %ebx
	movl	%ebx, 0(%r13,%r15,4)
	movslq	12(%rsp), %rbx
	movl	%edi, 48(%rsp,%rbx,4)
	leal	1(%rbx), %edi
	movl	%edi, 12(%rsp)
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L42:
	cmpl	28(%rsp), %r8d
	jge	.L12
	movslq	%edi, %rbx
	movslq	%r8d, %r13
	leaq	(%rbx,%rbx,4), %r15
	movq	%r13, 40(%rsp)
	leaq	(%rbx,%r15,2), %r15
	leaq	(%r15,%r15,4), %r15
	addq	%r13, %r15
	movq	32(%rsp), %r13
	cmpl	$-1, 0(%r13,%r15,4)
	jne	.L12
	imulq	$55, %rbx, %rbx
	movq	40(%rsp), %r13
	leaq	s(%rip), %r15
	addq	%rbx, %r15
	cmpb	$46, (%r15,%r13)
	jne	.L12
	cltq
	imull	$100, %edi, %edi
	movslq	%edx, %rdx
	addq	%r13, %rbx
	imulq	$55, %rax, %rax
	addl	%r8d, %edi
	addq	%rdx, %rax
	movq	32(%rsp), %rdx
	movl	(%rdx,%rax,4), %eax
	addl	$1, %eax
	movl	%eax, (%rdx,%rbx,4)
	movslq	12(%rsp), %rax
	movl	%edi, 48(%rsp,%rax,4)
	leal	1(%rax), %eax
	movl	%eax, 12(%rsp)
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L40:
	cmpl	28(%rsp), %r8d
	jge	.L10
	movslq	%edi, %rbx
	movslq	%r8d, %r13
	leaq	(%rbx,%rbx,4), %r15
	movq	%r13, 40(%rsp)
	leaq	(%rbx,%r15,2), %r15
	leaq	(%r15,%r15,4), %r15
	addq	%r13, %r15
	movq	32(%rsp), %r13
	cmpl	$-1, 0(%r13,%r15,4)
	jne	.L10
	imulq	$55, %rbx, %rbx
	movq	40(%rsp), %r13
	leaq	s(%rip), %r15
	addq	%rbx, %r15
	cmpb	$46, (%r15,%r13)
	jne	.L10
	movq	%r13, %r15
	imull	$100, %edi, %edi
	movslq	%edx, %r13
	addq	%rbx, %r15
	movslq	%eax, %rbx
	imulq	$55, %rbx, %rbx
	addl	%r8d, %edi
	addq	%r13, %rbx
	movq	32(%rsp), %r13
	movl	0(%r13,%rbx,4), %ebx
	addl	$1, %ebx
	movl	%ebx, 0(%r13,%r15,4)
	movslq	12(%rsp), %rbx
	movl	%edi, 48(%rsp,%rbx,4)
	leal	1(%rbx), %edi
	movl	%edi, 12(%rsp)
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L41:
	cmpl	28(%rsp), %r8d
	jge	.L11
	movslq	%edi, %rbx
	movslq	%r8d, %r13
	leaq	(%rbx,%rbx,4), %r15
	movq	%r13, 40(%rsp)
	leaq	(%rbx,%r15,2), %r15
	leaq	(%r15,%r15,4), %r15
	addq	%r13, %r15
	movq	32(%rsp), %r13
	cmpl	$-1, 0(%r13,%r15,4)
	jne	.L11
	imulq	$55, %rbx, %rbx
	movq	40(%rsp), %r13
	leaq	s(%rip), %r15
	addq	%rbx, %r15
	cmpb	$46, (%r15,%r13)
	jne	.L11
	movq	%r13, %r15
	imull	$100, %edi, %edi
	movslq	%edx, %r13
	addq	%rbx, %r15
	movslq	%eax, %rbx
	imulq	$55, %rbx, %rbx
	addl	%r8d, %edi
	addq	%r13, %rbx
	movq	32(%rsp), %r13
	movl	0(%r13,%rbx,4), %ebx
	addl	$1, %ebx
	movl	%ebx, 0(%r13,%r15,4)
	movslq	12(%rsp), %rbx
	movl	%edi, 48(%rsp,%rbx,4)
	leal	1(%rbx), %edi
	movl	%edi, 12(%rsp)
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L43:
	leal	-1(%rcx), %edx
	movl	28(%rsp), %ebx
	movslq	%edx, %rdx
	leaq	(%rdx,%rdx,4), %rcx
	leal	-1(%rbx), %eax
	leaq	(%rdx,%rcx,2), %rdx
	cltq
	movq	32(%rsp), %rcx
	leaq	(%rdx,%rdx,4), %rdx
	addq	%rdx, %rax
	movl	(%rcx,%rax,4), %eax
	cmpl	$-1, %eax
	je	.L44
	movl	u(%rip), %edx
	leaq	.LC5(%rip), %rsi
	movl	$1, %edi
	subl	%eax, %edx
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L15:
	movq	13384(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L45
	addq	$13400, %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
.L17:
	.cfi_restore_state
	xorl	%eax, %eax
	jmp	.L4
.L44:
	leaq	.LC4(%rip), %rdi
	call	puts@PLT
	jmp	.L15
.L2:
	leaq	t(%rip), %rax
	movl	w(%rip), %ebx
	movq	%rax, 32(%rsp)
	jmp	.L8
.L45:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE51:
	.size	main, .-main
	.globl	s
	.bss
	.align 32
	.type	s, @object
	.size	s, 3025
s:
	.zero	3025
	.globl	dy
	.data
	.align 16
	.type	dy, @object
	.size	dy, 16
dy:
	.long	-1
	.long	0
	.long	1
	.long	0
	.globl	dx
	.align 16
	.type	dx, @object
	.size	dx, 16
dx:
	.long	0
	.long	1
	.long	0
	.long	-1
	.globl	u
	.bss
	.align 4
	.type	u, @object
	.size	u, 4
u:
	.zero	4
	.globl	t
	.align 32
	.type	t, @object
	.size	t, 12100
t:
	.zero	12100
	.globl	w
	.align 4
	.type	w, @object
	.size	w, 4
w:
	.zero	4
	.globl	h
	.align 4
	.type	h, @object
	.size	h, 4
h:
	.zero	4
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC2:
	.byte	46
	.byte	46
	.byte	46
	.byte	46
	.byte	46
	.byte	46
	.byte	46
	.byte	46
	.byte	46
	.byte	46
	.byte	46
	.byte	46
	.byte	46
	.byte	46
	.byte	46
	.byte	46
	.align 16
.LC3:
	.byte	1
	.byte	1
	.byte	1
	.byte	1
	.byte	1
	.byte	1
	.byte	1
	.byte	1
	.byte	1
	.byte	1
	.byte	1
	.byte	1
	.byte	1
	.byte	1
	.byte	1
	.byte	1
	.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<stdlib.h>
#include<string.h>
#include<stdint.h>
#include<tgmath.h>
#include<stdbool.h>
#include<sys/queue.h>
#include<time.h>
#define ll long long
#define min(a, b) ((a) > (b) ? (b) : (a))
#define max(a, b) ((a) > (b) ? (a) : (b))

int h, w, t[55][55], u, dx[]={0,1,0,-1}, dy[]={-1,0,1,0};
char s[55][55];

main(){
    scanf("%d%d", &h, &w);
    for(int i=0; i<h; i++){
        scanf("%s", s[i]);
        for(int j=0; j<w; j++){
            t[i][j] = -1;
            u += (s[i][j]=='.');
        }
    }
    int que[3333], l=0, r=0;
    que[r++] = 0;
    t[0][0] = 1;
    while(r != l){
        int x = que[l]/100, y = que[l]%100;
        l++;
        for(int i=0; i<4; i++){
            int nx = x+dx[i], ny = y+dy[i];
            if(0<=nx&&nx<h && 0<=ny&&ny<w && t[nx][ny]==-1 && s[nx][ny]=='.'){
                t[nx][ny] = t[x][y] + 1;
                que[r++] = nx*100 + ny;
            }
        }
    }
    if(t[h-1][w-1] == -1)puts("-1");
    else printf("%d\n", u - t[h-1][w-1]);
    return 0;
}
10 37
.....................................
...#...####...####..###...###...###..
..#.#..#...#.##....#...#.#...#.#...#.
..#.#..#...#.#.....#...#.#...#.#...#.
.###.#.###.#.#...#.....#.##..#.#...#.
.#####.####..#.....#...#..##....##...
.#...#.#...#.#.....#...#.#...#.#...#.
.#...#.#...#.##....#...#.#...#.#...#.
.#...#.####...####..###...###...###..
.....................................
 10 37
.....................................
...#...####...####..###...###...###..
..#.#..#...#.##....#...#.#...#.#...#.
..#.#..#...#.#.....#...#.#...#.#...#.
.###.#.###.#.#...#.....#.##..#.#...#.
.#####.####..#.....#...#..##....##...
.#...#.#...#.#.....#...#.#...#.#...#.
.#...#.#...#.##....#...#.#...#.#...#.
.#...#.####...####..###...###...###..
..../................................
 6 37
.....................................
...#...####...####..###...###...###..
..#.#..#...#.##....#...#.#...#.#...#.
..#.#..#...#.#.....#...#.#...#.#...#.
.###.#.###.#.#...#.....#.##..#.#...#.
.#####.####..#.....#...#..##....##...
.#...#.#...#.#...#.....#.#...#.#...#.
.#...#.#...#.##....#...#.#...#.#...#.
.#...#.####...####..###...###...###..
..../................................
 10 37
.....................................
...#...####...####..###...###...##"..
..#.#..#...#.##....#...#.#...#.#...#.
.#...#.#...#.#...#.....#.#...#..#.#..
.###.#.###.#.#...#.....#.##..#.#...#.
.#####.####..#.....#.-.#..##....##...
.#...#.#...#.#.....#...#.#...#.#...#.
.#...#.#...#.##....#...#.#...#.#...#.
.#...#.####...####..###...###...###..
..../................................
 6 37
.....................................
...#...####...####..###...###...###..
..#.#..#...#.##....#...#.#...#.#...#.
..#.#..#...#.#.....#...#.#...#.#...#.
.###.#.###.#.#...#./...#.##..#.#...#.
.#####.####..#.....#...#..##....##...
.#...#.#...#.#...#.....#.#...#.#...#.
.#...#.#...#.##....#...#.#...#.#...#.
.#...#.####...####..###...###...###..
..../................................
 10 37
.....................................
...#...####...####..###...###...##"..
..#.#..#...#.##....#...#.#...#.#...#.
.#...#.#...#.#...#.....#.#...#..#.#..
.###.#.###.#.#.-.#.....#.##..#.#...#.
.#####.####..#.....#.-.#..##....##...
.#...#.#...#.#.....#...#.#...#.#...#.
.#...#.#...#.##....#...#.#...#.#...#.
.#...#.####...####..###...###...###..
..../................................
 3 3
..#
.#.
...
 10 37
.....................................
...#...####...####..###...###...##"..
..#.#..#...#.##....#...#.#...#.#...#.
.#...#.#...#.#...#.....#.#...#..#.#..
.###.#.###.#.#.-.#.....#.##..#.#...#.
.#####.####..#.....#.-.#..##....##...
.#...#.#...#.#.....#...#.#...#.#...#.
.#...#.#...#.##....#...#.#...#.#...#.
.#...#.####...####..###...###...###..
..../.......-........................
 6 37
.....................................
...#...####...####..###...###...###..
..#.#..#...#.##....#...#.#...#.#...#.
..#.#..#...#.#../..#...#.#...#.#...#.
.###.#.###.#.#...#./...#.##..#.#...#.
.#####.####..#.....#...#..##....##...
.#...#.#...#.#...#-....#.#...#.#...#.
.#...#.#...#.##....#...#.#...#.#...#.
.#...#.#"##...####..###...###...###..
..../................................
 10 37
.....................................
.."##...###...###..####...####...#...
..#.#..#...#.##....#...#.#...#.#...#.
.#...#.#...#.#...#.....#.#...#..#.#..
.###.#.###.#.#.-.#.....#.##..#.#...#.
.#####.####..#.....#.-.#..##....##...
.#...#.#...#.#.....#...#.#...#.#...#.
.#...#.#../#.##....$...#.#...#.#...#.
.#...#.####...####..###...###...###..
..../.......-........................

209
 208
 107
 207
 106
 206
 2
 205
 105
 204

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<stdlib.h>
#include<string.h>
#include<stdint.h>
#include<tgmath.h>
#include<stdbool.h>
#include<sys/queue.h>
#include<time.h>
#define ll long long
#define min(a, b) ((a) > (b) ? (b) : (a))
#define max(a, b) ((a) > (b) ? (a) : (b))

int h, w, t[55][55], u, dx[]={0,1,0,-1}, dy[]={-1,0,1,0};
char s[55][55];

main(){
    scanf("%d%d", &h, &w);
    for(int i=0; i<h; i++){
        scanf("%s", s[i]);
        for(int j=0; j<w; j++){
            t[i][j] = -1;
            u += (s[i][j]=='.');
        }
    }
    int que[3333], l=0, r=0;
    que[r++] = 0;
    t[0][0] = 1;
    while(r != l){
        int x = que[l]/100, y = que[l]%100;
        l++;
        for(int i=0; i<4; i++){
            int nx = x+dx[i], ny = y+dy[i];
            if(0<=nx&&nx<h && 0<=ny&&ny<w && t[nx][ny]==-1 && s[nx][ny]=='.'){
                t[nx][ny] = t[x][y] + 1;
                que[r++] = nx*100 + ny;
            }
        }
    }
    if(t[h-1][w-1] == -1)puts("-1");
    else printf("%d\n", u - t[h-1][w-1]);
    return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	h
	.bss
	.align 4
	.type	h, @object
	.size	h, 4
h:
	.zero	4
	.globl	w
	.align 4
	.type	w, @object
	.size	w, 4
w:
	.zero	4
	.globl	t
	.align 32
	.type	t, @object
	.size	t, 12100
t:
	.zero	12100
	.globl	u
	.align 4
	.type	u, @object
	.size	u, 4
u:
	.zero	4
	.globl	dx
	.data
	.align 16
	.type	dx, @object
	.size	dx, 16
dx:
	.long	0
	.long	1
	.long	0
	.long	-1
	.globl	dy
	.align 16
	.type	dy, @object
	.size	dy, 16
dy:
	.long	-1
	.long	0
	.long	1
	.long	0
	.globl	s
	.bss
	.align 32
	.type	s, @object
	.size	s, 3025
s:
	.zero	3025
	.section	.rodata
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%s"
.LC2:
	.string	"-1"
.LC3:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$4096, %rsp
	orq	$0, (%rsp)
	subq	$4096, %rsp
	orq	$0, (%rsp)
	subq	$4096, %rsp
	orq	$0, (%rsp)
	subq	$1104, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	w(%rip), %rax
	movq	%rax, %rdx
	leaq	h(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -13380(%rbp)
	jmp	.L2
.L5:
	movl	-13380(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	leaq	s(%rip), %rdx
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -13376(%rbp)
	jmp	.L3
.L4:
	movl	-13376(%rbp), %eax
	movslq	%eax, %rcx
	movl	-13380(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	t(%rip), %rax
	movl	$-1, (%rdx,%rax)
	movl	-13376(%rbp), %eax
	movslq	%eax, %rcx
	movl	-13380(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	leaq	(%rax,%rcx), %rdx
	leaq	s(%rip), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	cmpb	$46, %al
	sete	%al
	movzbl	%al, %edx
	movl	u(%rip), %eax
	addl	%edx, %eax
	movl	%eax, u(%rip)
	addl	$1, -13376(%rbp)
.L3:
	movl	w(%rip), %eax
	cmpl	%eax, -13376(%rbp)
	jl	.L4
	addl	$1, -13380(%rbp)
.L2:
	movl	h(%rip), %eax
	cmpl	%eax, -13380(%rbp)
	jl	.L5
	movl	$0, -13372(%rbp)
	movl	$0, -13368(%rbp)
	movl	-13368(%rbp), %eax
	leal	1(%rax), %edx
	movl	%edx, -13368(%rbp)
	cltq
	movl	$0, -13344(%rbp,%rax,4)
	movl	$1, t(%rip)
	jmp	.L6
.L10:
	movl	-13372(%rbp), %eax
	cltq
	movl	-13344(%rbp,%rax,4), %eax
	movslq	%eax, %rdx
	imulq	$1374389535, %rdx, %rdx
	shrq	$32, %rdx
	sarl	$5, %edx
	sarl	$31, %eax
	movl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	movl	%eax, -13360(%rbp)
	movl	-13372(%rbp), %eax
	cltq
	movl	-13344(%rbp,%rax,4), %eax
	movslq	%eax, %rdx
	imulq	$1374389535, %rdx, %rdx
	shrq	$32, %rdx
	sarl	$5, %edx
	movl	%eax, %ecx
	sarl	$31, %ecx
	subl	%ecx, %edx
	movl	%edx, -13356(%rbp)
	movl	-13356(%rbp), %edx
	imull	$100, %edx, %edx
	subl	%edx, %eax
	movl	%eax, -13356(%rbp)
	addl	$1, -13372(%rbp)
	movl	$0, -13364(%rbp)
	jmp	.L7
.L9:
	movl	-13364(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	dx(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-13360(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, -13352(%rbp)
	movl	-13364(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	dy(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-13356(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, -13348(%rbp)
	cmpl	$0, -13352(%rbp)
	js	.L8
	movl	h(%rip), %eax
	cmpl	%eax, -13352(%rbp)
	jge	.L8
	cmpl	$0, -13348(%rbp)
	js	.L8
	movl	w(%rip), %eax
	cmpl	%eax, -13348(%rbp)
	jge	.L8
	movl	-13348(%rbp), %eax
	movslq	%eax, %rcx
	movl	-13352(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	t(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	$-1, %eax
	jne	.L8
	movl	-13348(%rbp), %eax
	movslq	%eax, %rcx
	movl	-13352(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	leaq	(%rax,%rcx), %rdx
	leaq	s(%rip), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	cmpb	$46, %al
	jne	.L8
	movl	-13356(%rbp), %eax
	movslq	%eax, %rcx
	movl	-13360(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	t(%rip), %rax
	movl	(%rdx,%rax), %eax
	leal	1(%rax), %ecx
	movl	-13348(%rbp), %eax
	movslq	%eax, %rsi
	movl	-13352(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,4), %rdx
	leaq	t(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	-13352(%rbp), %eax
	imull	$100, %eax, %ecx
	movl	-13368(%rbp), %eax
	leal	1(%rax), %edx
	movl	%edx, -13368(%rbp)
	movl	-13348(%rbp), %edx
	addl	%ecx, %edx
	cltq
	movl	%edx, -13344(%rbp,%rax,4)
.L8:
	addl	$1, -13364(%rbp)
.L7:
	cmpl	$3, -13364(%rbp)
	jle	.L9
.L6:
	movl	-13368(%rbp), %eax
	cmpl	-13372(%rbp), %eax
	jne	.L10
	movl	h(%rip), %eax
	leal	-1(%rax), %edx
	movl	w(%rip), %eax
	subl	$1, %eax
	movslq	%eax, %rcx
	movslq	%edx, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	t(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	$-1, %eax
	jne	.L11
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L12
.L11:
	movl	u(%rip), %ecx
	movl	h(%rip), %eax
	leal	-1(%rax), %edx
	movl	w(%rip), %eax
	subl	$1, %eax
	movslq	%eax, %rsi
	movslq	%edx, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,4), %rdx
	leaq	t(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	%ecx, %eax
	subl	%edx, %eax
	movl	%eax, %esi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L12:
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L14
	call	__stack_chk_fail@PLT
.L14:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.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	h
	.bss
	.align 4
	.type	h, @object
	.size	h, 4
h:
	.zero	4
	.globl	w
	.align 4
	.type	w, @object
	.size	w, 4
w:
	.zero	4
	.globl	t
	.align 32
	.type	t, @object
	.size	t, 12100
t:
	.zero	12100
	.globl	u
	.align 4
	.type	u, @object
	.size	u, 4
u:
	.zero	4
	.globl	dx
	.data
	.align 16
	.type	dx, @object
	.size	dx, 16
dx:
	.long	0
	.long	1
	.long	0
	.long	-1
	.globl	dy
	.align 16
	.type	dy, @object
	.size	dy, 16
dy:
	.long	-1
	.long	0
	.long	1
	.long	0
	.globl	s
	.bss
	.align 32
	.type	s, @object
	.size	s, 3025
s:
	.zero	3025
	.section	.rodata
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%s"
.LC2:
	.string	"-1"
.LC3:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$4096, %rsp
	orq	$0, (%rsp)
	subq	$4096, %rsp
	orq	$0, (%rsp)
	subq	$4096, %rsp
	orq	$0, (%rsp)
	subq	$1104, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	w(%rip), %rax
	movq	%rax, %rdx
	leaq	h(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -13380(%rbp)
	jmp	.L2
.L5:
	movl	-13380(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	leaq	s(%rip), %rdx
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -13376(%rbp)
	jmp	.L3
.L4:
	movl	-13376(%rbp), %eax
	movslq	%eax, %rcx
	movl	-13380(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	t(%rip), %rax
	movl	$-1, (%rdx,%rax)
	movl	-13376(%rbp), %eax
	movslq	%eax, %rcx
	movl	-13380(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	leaq	(%rax,%rcx), %rdx
	leaq	s(%rip), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	cmpb	$46, %al
	sete	%al
	movzbl	%al, %edx
	movl	u(%rip), %eax
	addl	%edx, %eax
	movl	%eax, u(%rip)
	addl	$1, -13376(%rbp)
.L3:
	movl	w(%rip), %eax
	cmpl	%eax, -13376(%rbp)
	jl	.L4
	addl	$1, -13380(%rbp)
.L2:
	movl	h(%rip), %eax
	cmpl	%eax, -13380(%rbp)
	jl	.L5
	movl	$0, -13372(%rbp)
	movl	$0, -13368(%rbp)
	movl	-13368(%rbp), %eax
	leal	1(%rax), %edx
	movl	%edx, -13368(%rbp)
	cltq
	movl	$0, -13344(%rbp,%rax,4)
	movl	$1, t(%rip)
	jmp	.L6
.L10:
	movl	-13372(%rbp), %eax
	cltq
	movl	-13344(%rbp,%rax,4), %eax
	movslq	%eax, %rdx
	imulq	$1374389535, %rdx, %rdx
	shrq	$32, %rdx
	sarl	$5, %edx
	sarl	$31, %eax
	movl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	movl	%eax, -13360(%rbp)
	movl	-13372(%rbp), %eax
	cltq
	movl	-13344(%rbp,%rax,4), %eax
	movslq	%eax, %rdx
	imulq	$1374389535, %rdx, %rdx
	shrq	$32, %rdx
	sarl	$5, %edx
	movl	%eax, %ecx
	sarl	$31, %ecx
	subl	%ecx, %edx
	movl	%edx, -13356(%rbp)
	movl	-13356(%rbp), %edx
	imull	$100, %edx, %edx
	subl	%edx, %eax
	movl	%eax, -13356(%rbp)
	addl	$1, -13372(%rbp)
	movl	$0, -13364(%rbp)
	jmp	.L7
.L9:
	movl	-13364(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	dx(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-13360(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, -13352(%rbp)
	movl	-13364(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	dy(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-13356(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, -13348(%rbp)
	cmpl	$0, -13352(%rbp)
	js	.L8
	movl	h(%rip), %eax
	cmpl	%eax, -13352(%rbp)
	jge	.L8
	cmpl	$0, -13348(%rbp)
	js	.L8
	movl	w(%rip), %eax
	cmpl	%eax, -13348(%rbp)
	jge	.L8
	movl	-13348(%rbp), %eax
	movslq	%eax, %rcx
	movl	-13352(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	t(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	$-1, %eax
	jne	.L8
	movl	-13348(%rbp), %eax
	movslq	%eax, %rcx
	movl	-13352(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	leaq	(%rax,%rcx), %rdx
	leaq	s(%rip), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	cmpb	$46, %al
	jne	.L8
	movl	-13356(%rbp), %eax
	movslq	%eax, %rcx
	movl	-13360(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	t(%rip), %rax
	movl	(%rdx,%rax), %eax
	leal	1(%rax), %ecx
	movl	-13348(%rbp), %eax
	movslq	%eax, %rsi
	movl	-13352(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,4), %rdx
	leaq	t(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	-13352(%rbp), %eax
	imull	$100, %eax, %ecx
	movl	-13368(%rbp), %eax
	leal	1(%rax), %edx
	movl	%edx, -13368(%rbp)
	movl	-13348(%rbp), %edx
	addl	%ecx, %edx
	cltq
	movl	%edx, -13344(%rbp,%rax,4)
.L8:
	addl	$1, -13364(%rbp)
.L7:
	cmpl	$3, -13364(%rbp)
	jle	.L9
.L6:
	movl	-13368(%rbp), %eax
	cmpl	-13372(%rbp), %eax
	jne	.L10
	movl	h(%rip), %eax
	leal	-1(%rax), %edx
	movl	w(%rip), %eax
	subl	$1, %eax
	movslq	%eax, %rcx
	movslq	%edx, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	t(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	$-1, %eax
	jne	.L11
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L12
.L11:
	movl	u(%rip), %ecx
	movl	h(%rip), %eax
	leal	-1(%rax), %edx
	movl	w(%rip), %eax
	subl	$1, %eax
	movslq	%eax, %rsi
	movslq	%edx, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,4), %rdx
	leaq	t(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	%ecx, %eax
	subl	%edx, %eax
	movl	%eax, %esi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L12:
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L14
	call	__stack_chk_fail@PLT
.L14:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.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:
