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

int i,j,k,h,w,min,ans,mat[700][700],max[700][700];
char c;

int main(){
	while(scanf("%d %d",&h,&w)*h*w){
		for(i=0;i<h;i++){
			k=0;
			scanf("\n");
			for(j=0;j<w;j++){
				scanf("%c",&c);
				if(c=='.')k++; else k=0;
				mat[i][j]=k;
			}
		}

		ans=0;
		for(j=w-1;j>=0;j--){
			for(k=h-1;k>=0;k--){
				min=mat[k][j];
				if(min*(h-k)<ans)continue;
				for(i=1;i+k<h;i++){
					if(min>mat[i+k][j])min=mat[i+k][j];
					if(min==0)break;
					if(min*(i+1)>ans)ans=min*(i+1);
				}
			}
		}
		printf("%d\n",ans);
	}
	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	i
	.bss
	.align 4
	.type	i, @object
	.size	i, 4
i:
	.zero	4
	.globl	j
	.align 4
	.type	j, @object
	.size	j, 4
j:
	.zero	4
	.globl	k
	.align 4
	.type	k, @object
	.size	k, 4
k:
	.zero	4
	.globl	h
	.align 4
	.type	h, @object
	.size	h, 4
h:
	.zero	4
	.globl	w
	.align 4
	.type	w, @object
	.size	w, 4
w:
	.zero	4
	.globl	min
	.align 4
	.type	min, @object
	.size	min, 4
min:
	.zero	4
	.globl	ans
	.align 4
	.type	ans, @object
	.size	ans, 4
ans:
	.zero	4
	.globl	mat
	.align 32
	.type	mat, @object
	.size	mat, 1960000
mat:
	.zero	1960000
	.globl	max
	.align 32
	.type	max, @object
	.size	max, 1960000
max:
	.zero	1960000
	.globl	c
	.type	c, @object
	.size	c, 1
c:
	.zero	1
	.section	.rodata
.LC0:
	.string	"\n"
.LC1:
	.string	"%c"
.LC2:
	.string	"%d\n"
.LC3:
	.string	"%d %d"
	.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
	jmp	.L2
.L20:
	movl	$0, i(%rip)
	jmp	.L3
.L8:
	movl	$0, k(%rip)
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, j(%rip)
	jmp	.L4
.L7:
	leaq	c(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movzbl	c(%rip), %eax
	cmpb	$46, %al
	jne	.L5
	movl	k(%rip), %eax
	addl	$1, %eax
	movl	%eax, k(%rip)
	jmp	.L6
.L5:
	movl	$0, k(%rip)
.L6:
	movl	i(%rip), %edx
	movl	j(%rip), %ecx
	movl	k(%rip), %eax
	movslq	%ecx, %rcx
	movslq	%edx, %rdx
	imulq	$700, %rdx, %rdx
	addq	%rcx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	mat(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	j(%rip), %eax
	addl	$1, %eax
	movl	%eax, j(%rip)
.L4:
	movl	j(%rip), %edx
	movl	w(%rip), %eax
	cmpl	%eax, %edx
	jl	.L7
	movl	i(%rip), %eax
	addl	$1, %eax
	movl	%eax, i(%rip)
.L3:
	movl	i(%rip), %edx
	movl	h(%rip), %eax
	cmpl	%eax, %edx
	jl	.L8
	movl	$0, ans(%rip)
	movl	w(%rip), %eax
	subl	$1, %eax
	movl	%eax, j(%rip)
	jmp	.L9
.L19:
	movl	h(%rip), %eax
	subl	$1, %eax
	movl	%eax, k(%rip)
	jmp	.L10
.L18:
	movl	k(%rip), %eax
	movl	j(%rip), %edx
	movslq	%edx, %rdx
	cltq
	imulq	$700, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	mat(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, min(%rip)
	movl	h(%rip), %eax
	movl	k(%rip), %ecx
	subl	%ecx, %eax
	movl	%eax, %edx
	movl	min(%rip), %eax
	imull	%eax, %edx
	movl	ans(%rip), %eax
	cmpl	%eax, %edx
	jl	.L22
	movl	$1, i(%rip)
	jmp	.L13
.L17:
	movl	i(%rip), %edx
	movl	k(%rip), %eax
	addl	%eax, %edx
	movl	j(%rip), %eax
	movslq	%eax, %rcx
	movslq	%edx, %rax
	imulq	$700, %rax, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	mat(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	min(%rip), %eax
	cmpl	%eax, %edx
	jge	.L14
	movl	i(%rip), %edx
	movl	k(%rip), %eax
	addl	%eax, %edx
	movl	j(%rip), %eax
	movslq	%eax, %rcx
	movslq	%edx, %rax
	imulq	$700, %rax, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	mat(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, min(%rip)
.L14:
	movl	min(%rip), %eax
	testl	%eax, %eax
	je	.L23
	movl	i(%rip), %eax
	leal	1(%rax), %edx
	movl	min(%rip), %eax
	imull	%eax, %edx
	movl	ans(%rip), %eax
	cmpl	%eax, %edx
	jle	.L16
	movl	i(%rip), %eax
	leal	1(%rax), %edx
	movl	min(%rip), %eax
	imull	%edx, %eax
	movl	%eax, ans(%rip)
.L16:
	movl	i(%rip), %eax
	addl	$1, %eax
	movl	%eax, i(%rip)
.L13:
	movl	i(%rip), %edx
	movl	k(%rip), %eax
	addl	%eax, %edx
	movl	h(%rip), %eax
	cmpl	%eax, %edx
	jl	.L17
	jmp	.L12
.L22:
	nop
	jmp	.L12
.L23:
	nop
.L12:
	movl	k(%rip), %eax
	subl	$1, %eax
	movl	%eax, k(%rip)
.L10:
	movl	k(%rip), %eax
	testl	%eax, %eax
	jns	.L18
	movl	j(%rip), %eax
	subl	$1, %eax
	movl	%eax, j(%rip)
.L9:
	movl	j(%rip), %eax
	testl	%eax, %eax
	jns	.L19
	movl	ans(%rip), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L2:
	leaq	w(%rip), %rax
	movq	%rax, %rdx
	leaq	h(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	h(%rip), %edx
	imull	%eax, %edx
	movl	w(%rip), %eax
	imull	%edx, %eax
	testl	%eax, %eax
	jne	.L20
	movl	$0, %eax
	popq	%rbp
	.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	"\n"
.LC1:
	.string	"%c"
.LC2:
	.string	"%d\n"
.LC3:
	.string	"%d %d"
	.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
	leaq	w(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$8, %rsp
	.cfi_def_cfa_offset 64
.L2:
	movq	%rbp, %rdx
	leaq	h(%rip), %rsi
	leaq	.LC3(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	h(%rip), %r11d
	movl	w(%rip), %edx
	imull	%r11d, %eax
	imull	%edx, %eax
	testl	%eax, %eax
	je	.L39
	movl	$0, i(%rip)
	testl	%r11d, %r11d
	jle	.L3
	leaq	.LC0(%rip), %r15
	leaq	c(%rip), %r13
	leaq	.LC1(%rip), %r12
	leaq	mat(%rip), %r14
	.p2align 4,,10
	.p2align 3
.L9:
	movl	$0, k(%rip)
	movq	%r15, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	w(%rip), %edx
	movl	$0, j(%rip)
	testl	%edx, %edx
	jg	.L8
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L5:
	movslq	i(%rip), %rdx
	movslq	j(%rip), %rsi
	movl	$0, k(%rip)
	movq	%rdx, %rcx
	imulq	$700, %rdx, %rdx
	movq	%rsi, %rax
	addq	%rsi, %rdx
	movl	$0, (%r14,%rdx,4)
.L37:
	movl	w(%rip), %edx
	addl	$1, %eax
	movl	%eax, j(%rip)
	cmpl	%edx, %eax
	jge	.L7
.L8:
	xorl	%eax, %eax
	movq	%r13, %rsi
	movq	%r12, %rdi
	call	__isoc99_scanf@PLT
	cmpb	$46, c(%rip)
	jne	.L5
	movslq	i(%rip), %rdx
	movl	k(%rip), %eax
	movslq	j(%rip), %rdi
	movq	%rdx, %rcx
	imulq	$700, %rdx, %rdx
	leal	1(%rax), %esi
	movl	%esi, k(%rip)
	movq	%rdi, %rax
	addq	%rdi, %rdx
	movl	%esi, (%r14,%rdx,4)
	jmp	.L37
.L4:
	movl	i(%rip), %ecx
	.p2align 4,,10
	.p2align 3
.L7:
	movl	h(%rip), %r11d
	addl	$1, %ecx
	movl	%ecx, i(%rip)
	cmpl	%r11d, %ecx
	jl	.L9
.L3:
	movl	$0, ans(%rip)
	leal	-1(%rdx), %ecx
	movl	%ecx, j(%rip)
	testl	%ecx, %ecx
	js	.L20
	movslq	%r11d, %rsi
	movslq	%ecx, %r13
	movslq	%edx, %r10
	movl	%ecx, %ecx
	subq	$2, %r10
	movl	min(%rip), %eax
	xorl	%r12d, %r12d
	xorl	%r8d, %r8d
	imulq	$700, %rsi, %rsi
	leaq	mat(%rip), %rdi
	subq	%rcx, %r10
	xorl	%ecx, %ecx
	leal	-1(%r11), %r15d
	addq	%r13, %rsi
	leaq	-2800(%rdi,%rsi,4), %r14
	xorl	%esi, %esi
	.p2align 4,,10
	.p2align 3
.L16:
	testl	%r15d, %r15d
	js	.L21
	movl	%r11d, %r9d
	movq	%r14, %rdi
	movl	$1, %esi
	jmp	.L15
	.p2align 4,,10
	.p2align 3
.L12:
	subq	$2800, %rdi
	leal	1(%rsi), %edx
	subl	$1, %r9d
	cmpl	%r11d, %esi
	je	.L40
	movl	%edx, %esi
.L15:
	movl	(%rdi), %eax
	movl	%eax, %edx
	imull	%esi, %edx
	cmpl	%r8d, %edx
	jl	.L12
	cmpl	%r11d, %r9d
	jge	.L22
	movq	%rdi, %rcx
	movl	$1, %ebx
	jmp	.L14
	.p2align 4,,10
	.p2align 3
.L41:
	addl	$1, %ebx
	movl	%ebx, %edx
	imull	%eax, %edx
	cmpl	%r8d, %edx
	jle	.L13
	movl	%edx, %r8d
	movl	$1, %r12d
.L13:
	addq	$2800, %rcx
	cmpl	%ebx, %esi
	je	.L23
.L14:
	movl	2800(%rcx), %edx
	cmpl	%edx, %eax
	cmovg	%edx, %eax
	testl	%eax, %eax
	jne	.L41
.L23:
	movl	$1, %ecx
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L40:
	movl	$-1, %edx
	movl	$1, %esi
.L11:
	subq	$1, %r13
	subq	$4, %r14
	cmpq	%r10, %r13
	jne	.L16
	movl	%edx, k(%rip)
	movl	$-1, j(%rip)
	testb	%cl, %cl
	je	.L17
	movl	%ebx, i(%rip)
.L17:
	testb	%r12b, %r12b
	je	.L26
	movl	%r8d, ans(%rip)
.L18:
	testb	%sil, %sil
	je	.L10
	movl	%eax, min(%rip)
	movl	ans(%rip), %r8d
.L10:
	movl	%r8d, %edx
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L2
.L22:
	movl	$1, %ecx
	movl	$1, %ebx
	jmp	.L12
.L21:
	movl	%r15d, %edx
	jmp	.L11
.L26:
	xorl	%r8d, %r8d
	jmp	.L18
.L39:
	addq	$8, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
.L20:
	.cfi_restore_state
	xorl	%r8d, %r8d
	jmp	.L10
	.cfi_endproc
.LFE51:
	.size	main, .-main
	.globl	c
	.bss
	.type	c, @object
	.size	c, 1
c:
	.zero	1
	.globl	max
	.align 32
	.type	max, @object
	.size	max, 1960000
max:
	.zero	1960000
	.globl	mat
	.align 32
	.type	mat, @object
	.size	mat, 1960000
mat:
	.zero	1960000
	.globl	ans
	.align 4
	.type	ans, @object
	.size	ans, 4
ans:
	.zero	4
	.globl	min
	.align 4
	.type	min, @object
	.size	min, 4
min:
	.zero	4
	.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
	.globl	k
	.align 4
	.type	k, @object
	.size	k, 4
k:
	.zero	4
	.globl	j
	.align 4
	.type	j, @object
	.size	j, 4
j:
	.zero	4
	.globl	i
	.align 4
	.type	i, @object
	.size	i, 4
i:
	.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
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"\n"
.LC1:
	.string	"%c"
.LC2:
	.string	"%d\n"
.LC3:
	.string	"%d %d"
	.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
	leaq	w(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$8, %rsp
	.cfi_def_cfa_offset 64
.L2:
	movq	%rbp, %rdx
	leaq	h(%rip), %rsi
	leaq	.LC3(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	h(%rip), %r11d
	movl	w(%rip), %edx
	imull	%r11d, %eax
	imull	%edx, %eax
	testl	%eax, %eax
	je	.L39
	movl	$0, i(%rip)
	testl	%r11d, %r11d
	jle	.L3
	leaq	.LC0(%rip), %r15
	leaq	c(%rip), %r13
	leaq	.LC1(%rip), %r12
	leaq	mat(%rip), %r14
	.p2align 4,,10
	.p2align 3
.L9:
	movl	$0, k(%rip)
	movq	%r15, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	w(%rip), %edx
	movl	$0, j(%rip)
	testl	%edx, %edx
	jg	.L8
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L5:
	movslq	i(%rip), %rdx
	movslq	j(%rip), %rsi
	movl	$0, k(%rip)
	movq	%rdx, %rcx
	imulq	$700, %rdx, %rdx
	movq	%rsi, %rax
	addq	%rsi, %rdx
	movl	$0, (%r14,%rdx,4)
.L37:
	movl	w(%rip), %edx
	addl	$1, %eax
	movl	%eax, j(%rip)
	cmpl	%edx, %eax
	jge	.L7
.L8:
	xorl	%eax, %eax
	movq	%r13, %rsi
	movq	%r12, %rdi
	call	__isoc99_scanf@PLT
	cmpb	$46, c(%rip)
	jne	.L5
	movslq	i(%rip), %rdx
	movl	k(%rip), %eax
	movslq	j(%rip), %rdi
	movq	%rdx, %rcx
	imulq	$700, %rdx, %rdx
	leal	1(%rax), %esi
	movl	%esi, k(%rip)
	movq	%rdi, %rax
	addq	%rdi, %rdx
	movl	%esi, (%r14,%rdx,4)
	jmp	.L37
.L4:
	movl	i(%rip), %ecx
	.p2align 4,,10
	.p2align 3
.L7:
	movl	h(%rip), %r11d
	addl	$1, %ecx
	movl	%ecx, i(%rip)
	cmpl	%r11d, %ecx
	jl	.L9
.L3:
	movl	$0, ans(%rip)
	leal	-1(%rdx), %ecx
	movl	%ecx, j(%rip)
	testl	%ecx, %ecx
	js	.L20
	movslq	%r11d, %rsi
	movslq	%ecx, %r13
	movslq	%edx, %r10
	movl	%ecx, %ecx
	subq	$2, %r10
	movl	min(%rip), %eax
	xorl	%r12d, %r12d
	xorl	%r8d, %r8d
	imulq	$700, %rsi, %rsi
	leaq	mat(%rip), %rdi
	subq	%rcx, %r10
	xorl	%ecx, %ecx
	leal	-1(%r11), %r15d
	addq	%r13, %rsi
	leaq	-2800(%rdi,%rsi,4), %r14
	xorl	%esi, %esi
	.p2align 4,,10
	.p2align 3
.L16:
	testl	%r15d, %r15d
	js	.L21
	movl	%r11d, %r9d
	movq	%r14, %rdi
	movl	$1, %esi
	jmp	.L15
	.p2align 4,,10
	.p2align 3
.L12:
	subq	$2800, %rdi
	leal	1(%rsi), %edx
	subl	$1, %r9d
	cmpl	%r11d, %esi
	je	.L40
	movl	%edx, %esi
.L15:
	movl	(%rdi), %eax
	movl	%eax, %edx
	imull	%esi, %edx
	cmpl	%r8d, %edx
	jl	.L12
	cmpl	%r11d, %r9d
	jge	.L22
	movq	%rdi, %rcx
	movl	$1, %ebx
	jmp	.L14
	.p2align 4,,10
	.p2align 3
.L41:
	addl	$1, %ebx
	movl	%ebx, %edx
	imull	%eax, %edx
	cmpl	%r8d, %edx
	jle	.L13
	movl	%edx, %r8d
	movl	$1, %r12d
.L13:
	addq	$2800, %rcx
	cmpl	%ebx, %esi
	je	.L23
.L14:
	movl	2800(%rcx), %edx
	cmpl	%edx, %eax
	cmovg	%edx, %eax
	testl	%eax, %eax
	jne	.L41
.L23:
	movl	$1, %ecx
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L40:
	movl	$-1, %edx
	movl	$1, %esi
.L11:
	subq	$1, %r13
	subq	$4, %r14
	cmpq	%r10, %r13
	jne	.L16
	movl	%edx, k(%rip)
	movl	$-1, j(%rip)
	testb	%cl, %cl
	je	.L17
	movl	%ebx, i(%rip)
.L17:
	testb	%r12b, %r12b
	je	.L26
	movl	%r8d, ans(%rip)
.L18:
	testb	%sil, %sil
	je	.L10
	movl	%eax, min(%rip)
	movl	ans(%rip), %r8d
.L10:
	movl	%r8d, %edx
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L2
.L22:
	movl	$1, %ecx
	movl	$1, %ebx
	jmp	.L12
.L21:
	movl	%r15d, %edx
	jmp	.L11
.L26:
	xorl	%r8d, %r8d
	jmp	.L18
.L39:
	addq	$8, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
.L20:
	.cfi_restore_state
	xorl	%r8d, %r8d
	jmp	.L10
	.cfi_endproc
.LFE51:
	.size	main, .-main
	.globl	c
	.bss
	.type	c, @object
	.size	c, 1
c:
	.zero	1
	.globl	max
	.align 32
	.type	max, @object
	.size	max, 1960000
max:
	.zero	1960000
	.globl	mat
	.align 32
	.type	mat, @object
	.size	mat, 1960000
mat:
	.zero	1960000
	.globl	ans
	.align 4
	.type	ans, @object
	.size	ans, 4
ans:
	.zero	4
	.globl	min
	.align 4
	.type	min, @object
	.size	min, 4
min:
	.zero	4
	.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
	.globl	k
	.align 4
	.type	k, @object
	.size	k, 4
k:
	.zero	4
	.globl	j
	.align 4
	.type	j, @object
	.size	j, 4
j:
	.zero	4
	.globl	i
	.align 4
	.type	i, @object
	.size	i, 4
i:
	.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>
#include <stdlib.h>

int i,j,k,h,w,min,ans,mat[700][700],max[700][700];
char c;

int main(){
	while(scanf("%d %d",&h,&w)*h*w){
		for(i=0;i<h;i++){
			k=0;
			scanf("\n");
			for(j=0;j<w;j++){
				scanf("%c",&c);
				if(c=='.')k++; else k=0;
				mat[i][j]=k;
			}
		}

		ans=0;
		for(j=w-1;j>=0;j--){
			for(k=h-1;k>=0;k--){
				min=mat[k][j];
				if(min*(h-k)<ans)continue;
				for(i=1;i+k<h;i++){
					if(min>mat[i+k][j])min=mat[i+k][j];
					if(min==0)break;
					if(min*(i+1)>ans)ans=min*(i+1);
				}
			}
		}
		printf("%d\n",ans);
	}
	return 0;
}
10 10
...*....**
..........
**....**..
........*.
..*.......
**........
.*........
..........
....*..***
.*....*...
10 10
..*....*..
.*.*...*..
*****..*..
*...*..*..
*...*..*..
..........
.***.*..**
..*..*...*
.*...*...*
****..***.
2 3
...
...
0 0
 10 10
...*....**
..........
**....**..
........*.
..*.......
**........
.*........
..........
....*..***
.*....*...
10 10
..*....*..
.*.*...*..
*****..*..
*...*..*..
..*..*...*
..........
.***.*..**
..*..*...*
.*...*...*
****..***.
2 3
...
...
0 0
 10 10
...*....**
..........
**....**..
........*.
..*.......
**........
.*........
..........
....*..***
.*....*...
10 10
..*....*..
.*.*...*..
*****..*..
*...*..*..
*...*..*..
..........
****.*...*
*...*..*..
.*...*...*
****..***.
2 2
...
...
0 0
 10 10
...*....**
..........
**....**..
........*.
..*.......
**........
.*........
..........
....*..***
...*....*.
10 10
..*....*..
.*.*...*..
*****..*..
*...*..*..
*...*..*..
..........
****.*...*
*...*..*..
.*...*...*
****..***.
2 1
...
...
0 0
 10 10
...*....**
..........
**....**..
.*........
..*.......
**........
.*........
..........
....*..***
.*....*...
10 10
..*....*..
.*.*...*..
..*..*****
*...*..*..
..*..*...*
..........
.***.*..**
..*..*...*
.*...*...*
****..***.
2 3
...
...
0 0
 10 6
...*....**
..........
**....**..
........*.
..*.......
**........
.*........
..........
....*..***
.*....*...
10 10
..*....*..
.*.*...*..
*****..*..
*.*.*.....
*...*..*..
..........
.**..**.**
..*..*...*
.*...*...*
****..***.
2 3
...
...
0 0
 10 10
...*....**
..........
**.*...*..
........*.
.......*..
**........
.*........
..........
....*..***
.*....*...
10 10
..*....*..
.*.*...*..
*****..*..
*...*..*..
*...*..*..
..........
****.*...*
..*..*...*
.*...*...*
****..***.
2 3
...
...
0 0
 10 10
...*....**
..........
..**....**
........*.
..*.......
**........
.*........
..........
....*..***
.*....*...
10 10
..*....*..
.*.*...*..
*****..*..
*.*.*.....
*...*..*..
..........
.**..**.**
..*..*...*
.*...*...*
****..***.
2 3
...
...
0 0
 10 10
...*....**
..........
..**....**
........*.
..*.......
**........
.*........
..........
....*..***
...*....*.
10 10
..*....*..
.*.*...*..
*****..*..
*...*..*..
*...*..*..
..........
****.*...*
*...*..*..
.*...*...*
****..***.
2 1
...
...
0 0
 10 10
...*.*..*.
..........
**....**..
........*.
..*.......
........**
.*........
..........
..*....***
.*....*...
10 10
....*..*..
.*.*...*..
*****..*..
*.*.*.....
*...*..*..
..........
.***.*..**
..*..*...*
.*...*...*
****..***.
2 3
...
...
0 0

28
12
6
 28
10
6
 28
12
2
 28
12
2
 35
10
6
 14
 25
12
6
 32
12
6
 32
12
2
 27
12
6

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

int i,j,k,h,w,min,ans,mat[700][700],max[700][700];
char c;

int main(){
	while(scanf("%d %d",&h,&w)*h*w){
		for(i=0;i<h;i++){
			k=0;
			scanf("\n");
			for(j=0;j<w;j++){
				scanf("%c",&c);
				if(c=='.')k++; else k=0;
				mat[i][j]=k;
			}
		}

		ans=0;
		for(j=w-1;j>=0;j--){
			for(k=h-1;k>=0;k--){
				min=mat[k][j];
				if(min*(h-k)<ans)continue;
				for(i=1;i+k<h;i++){
					if(min>mat[i+k][j])min=mat[i+k][j];
					if(min==0)break;
					if(min*(i+1)>ans)ans=min*(i+1);
				}
			}
		}
		printf("%d\n",ans);
	}
	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	i
	.bss
	.align 4
	.type	i, @object
	.size	i, 4
i:
	.zero	4
	.globl	j
	.align 4
	.type	j, @object
	.size	j, 4
j:
	.zero	4
	.globl	k
	.align 4
	.type	k, @object
	.size	k, 4
k:
	.zero	4
	.globl	h
	.align 4
	.type	h, @object
	.size	h, 4
h:
	.zero	4
	.globl	w
	.align 4
	.type	w, @object
	.size	w, 4
w:
	.zero	4
	.globl	min
	.align 4
	.type	min, @object
	.size	min, 4
min:
	.zero	4
	.globl	ans
	.align 4
	.type	ans, @object
	.size	ans, 4
ans:
	.zero	4
	.globl	mat
	.align 32
	.type	mat, @object
	.size	mat, 1960000
mat:
	.zero	1960000
	.globl	max
	.align 32
	.type	max, @object
	.size	max, 1960000
max:
	.zero	1960000
	.globl	c
	.type	c, @object
	.size	c, 1
c:
	.zero	1
	.section	.rodata
.LC0:
	.string	"\n"
.LC1:
	.string	"%c"
.LC2:
	.string	"%d\n"
.LC3:
	.string	"%d %d"
	.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
	jmp	.L2
.L20:
	movl	$0, i(%rip)
	jmp	.L3
.L8:
	movl	$0, k(%rip)
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, j(%rip)
	jmp	.L4
.L7:
	leaq	c(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movzbl	c(%rip), %eax
	cmpb	$46, %al
	jne	.L5
	movl	k(%rip), %eax
	addl	$1, %eax
	movl	%eax, k(%rip)
	jmp	.L6
.L5:
	movl	$0, k(%rip)
.L6:
	movl	i(%rip), %edx
	movl	j(%rip), %ecx
	movl	k(%rip), %eax
	movslq	%ecx, %rcx
	movslq	%edx, %rdx
	imulq	$700, %rdx, %rdx
	addq	%rcx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	mat(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	j(%rip), %eax
	addl	$1, %eax
	movl	%eax, j(%rip)
.L4:
	movl	j(%rip), %edx
	movl	w(%rip), %eax
	cmpl	%eax, %edx
	jl	.L7
	movl	i(%rip), %eax
	addl	$1, %eax
	movl	%eax, i(%rip)
.L3:
	movl	i(%rip), %edx
	movl	h(%rip), %eax
	cmpl	%eax, %edx
	jl	.L8
	movl	$0, ans(%rip)
	movl	w(%rip), %eax
	subl	$1, %eax
	movl	%eax, j(%rip)
	jmp	.L9
.L19:
	movl	h(%rip), %eax
	subl	$1, %eax
	movl	%eax, k(%rip)
	jmp	.L10
.L18:
	movl	k(%rip), %eax
	movl	j(%rip), %edx
	movslq	%edx, %rdx
	cltq
	imulq	$700, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	mat(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, min(%rip)
	movl	h(%rip), %eax
	movl	k(%rip), %ecx
	subl	%ecx, %eax
	movl	%eax, %edx
	movl	min(%rip), %eax
	imull	%eax, %edx
	movl	ans(%rip), %eax
	cmpl	%eax, %edx
	jl	.L22
	movl	$1, i(%rip)
	jmp	.L13
.L17:
	movl	i(%rip), %edx
	movl	k(%rip), %eax
	addl	%eax, %edx
	movl	j(%rip), %eax
	movslq	%eax, %rcx
	movslq	%edx, %rax
	imulq	$700, %rax, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	mat(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	min(%rip), %eax
	cmpl	%eax, %edx
	jge	.L14
	movl	i(%rip), %edx
	movl	k(%rip), %eax
	addl	%eax, %edx
	movl	j(%rip), %eax
	movslq	%eax, %rcx
	movslq	%edx, %rax
	imulq	$700, %rax, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	mat(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, min(%rip)
.L14:
	movl	min(%rip), %eax
	testl	%eax, %eax
	je	.L23
	movl	i(%rip), %eax
	leal	1(%rax), %edx
	movl	min(%rip), %eax
	imull	%eax, %edx
	movl	ans(%rip), %eax
	cmpl	%eax, %edx
	jle	.L16
	movl	i(%rip), %eax
	leal	1(%rax), %edx
	movl	min(%rip), %eax
	imull	%edx, %eax
	movl	%eax, ans(%rip)
.L16:
	movl	i(%rip), %eax
	addl	$1, %eax
	movl	%eax, i(%rip)
.L13:
	movl	i(%rip), %edx
	movl	k(%rip), %eax
	addl	%eax, %edx
	movl	h(%rip), %eax
	cmpl	%eax, %edx
	jl	.L17
	jmp	.L12
.L22:
	nop
	jmp	.L12
.L23:
	nop
.L12:
	movl	k(%rip), %eax
	subl	$1, %eax
	movl	%eax, k(%rip)
.L10:
	movl	k(%rip), %eax
	testl	%eax, %eax
	jns	.L18
	movl	j(%rip), %eax
	subl	$1, %eax
	movl	%eax, j(%rip)
.L9:
	movl	j(%rip), %eax
	testl	%eax, %eax
	jns	.L19
	movl	ans(%rip), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L2:
	leaq	w(%rip), %rax
	movq	%rax, %rdx
	leaq	h(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	h(%rip), %edx
	imull	%eax, %edx
	movl	w(%rip), %eax
	imull	%edx, %eax
	testl	%eax, %eax
	jne	.L20
	movl	$0, %eax
	popq	%rbp
	.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	i
	.bss
	.align 4
	.type	i, @object
	.size	i, 4
i:
	.zero	4
	.globl	j
	.align 4
	.type	j, @object
	.size	j, 4
j:
	.zero	4
	.globl	k
	.align 4
	.type	k, @object
	.size	k, 4
k:
	.zero	4
	.globl	h
	.align 4
	.type	h, @object
	.size	h, 4
h:
	.zero	4
	.globl	w
	.align 4
	.type	w, @object
	.size	w, 4
w:
	.zero	4
	.globl	min
	.align 4
	.type	min, @object
	.size	min, 4
min:
	.zero	4
	.globl	ans
	.align 4
	.type	ans, @object
	.size	ans, 4
ans:
	.zero	4
	.globl	mat
	.align 32
	.type	mat, @object
	.size	mat, 1960000
mat:
	.zero	1960000
	.globl	max
	.align 32
	.type	max, @object
	.size	max, 1960000
max:
	.zero	1960000
	.globl	c
	.type	c, @object
	.size	c, 1
c:
	.zero	1
	.section	.rodata
.LC0:
	.string	"\n"
.LC1:
	.string	"%c"
.LC2:
	.string	"%d\n"
.LC3:
	.string	"%d %d"
	.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
	jmp	.L2
.L20:
	movl	$0, i(%rip)
	jmp	.L3
.L8:
	movl	$0, k(%rip)
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, j(%rip)
	jmp	.L4
.L7:
	leaq	c(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movzbl	c(%rip), %eax
	cmpb	$46, %al
	jne	.L5
	movl	k(%rip), %eax
	addl	$1, %eax
	movl	%eax, k(%rip)
	jmp	.L6
.L5:
	movl	$0, k(%rip)
.L6:
	movl	i(%rip), %edx
	movl	j(%rip), %ecx
	movl	k(%rip), %eax
	movslq	%ecx, %rcx
	movslq	%edx, %rdx
	imulq	$700, %rdx, %rdx
	addq	%rcx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	mat(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	j(%rip), %eax
	addl	$1, %eax
	movl	%eax, j(%rip)
.L4:
	movl	j(%rip), %edx
	movl	w(%rip), %eax
	cmpl	%eax, %edx
	jl	.L7
	movl	i(%rip), %eax
	addl	$1, %eax
	movl	%eax, i(%rip)
.L3:
	movl	i(%rip), %edx
	movl	h(%rip), %eax
	cmpl	%eax, %edx
	jl	.L8
	movl	$0, ans(%rip)
	movl	w(%rip), %eax
	subl	$1, %eax
	movl	%eax, j(%rip)
	jmp	.L9
.L19:
	movl	h(%rip), %eax
	subl	$1, %eax
	movl	%eax, k(%rip)
	jmp	.L10
.L18:
	movl	k(%rip), %eax
	movl	j(%rip), %edx
	movslq	%edx, %rdx
	cltq
	imulq	$700, %rax, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	mat(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, min(%rip)
	movl	h(%rip), %eax
	movl	k(%rip), %ecx
	subl	%ecx, %eax
	movl	%eax, %edx
	movl	min(%rip), %eax
	imull	%eax, %edx
	movl	ans(%rip), %eax
	cmpl	%eax, %edx
	jl	.L22
	movl	$1, i(%rip)
	jmp	.L13
.L17:
	movl	i(%rip), %edx
	movl	k(%rip), %eax
	addl	%eax, %edx
	movl	j(%rip), %eax
	movslq	%eax, %rcx
	movslq	%edx, %rax
	imulq	$700, %rax, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	mat(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	min(%rip), %eax
	cmpl	%eax, %edx
	jge	.L14
	movl	i(%rip), %edx
	movl	k(%rip), %eax
	addl	%eax, %edx
	movl	j(%rip), %eax
	movslq	%eax, %rcx
	movslq	%edx, %rax
	imulq	$700, %rax, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	mat(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, min(%rip)
.L14:
	movl	min(%rip), %eax
	testl	%eax, %eax
	je	.L23
	movl	i(%rip), %eax
	leal	1(%rax), %edx
	movl	min(%rip), %eax
	imull	%eax, %edx
	movl	ans(%rip), %eax
	cmpl	%eax, %edx
	jle	.L16
	movl	i(%rip), %eax
	leal	1(%rax), %edx
	movl	min(%rip), %eax
	imull	%edx, %eax
	movl	%eax, ans(%rip)
.L16:
	movl	i(%rip), %eax
	addl	$1, %eax
	movl	%eax, i(%rip)
.L13:
	movl	i(%rip), %edx
	movl	k(%rip), %eax
	addl	%eax, %edx
	movl	h(%rip), %eax
	cmpl	%eax, %edx
	jl	.L17
	jmp	.L12
.L22:
	nop
	jmp	.L12
.L23:
	nop
.L12:
	movl	k(%rip), %eax
	subl	$1, %eax
	movl	%eax, k(%rip)
.L10:
	movl	k(%rip), %eax
	testl	%eax, %eax
	jns	.L18
	movl	j(%rip), %eax
	subl	$1, %eax
	movl	%eax, j(%rip)
.L9:
	movl	j(%rip), %eax
	testl	%eax, %eax
	jns	.L19
	movl	ans(%rip), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L2:
	leaq	w(%rip), %rax
	movq	%rax, %rdx
	leaq	h(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	h(%rip), %edx
	imull	%eax, %edx
	movl	w(%rip), %eax
	imull	%edx, %eax
	testl	%eax, %eax
	jne	.L20
	movl	$0, %eax
	popq	%rbp
	.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:
