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 min(a, b) ((a) < (b) ? (a): (b))
#define max(a, b) ((a) > (b) ? (a): (b))

int n;
int down[1024][1024];
int right[1024][1024];

int side(int y, int x, int maxi)
{
    int d;
    int r;
    int s = min(down[y][x], right[y][x]);
    int i;

    for (i = 1; maxi < s && i < s; i++){
        int t = min(down[y][x + i], right[y + i][x]);
        s = min(s, t);
    }

    return max(maxi, s);
}

int main(void)
{
    while (scanf("%d", &n), n){
        char map[1024][1024];
        int maxi = 0;
        int i, j, k;

        for (i = 0; i < n; i++){
            scanf("%s", map[i]);
        }
        // for (i = 0; i < n; i++) puts(map[i]);

        for (i = 0; i < n; i++){
            int d = 0;
            int r = 0;

            for (j = n - 1; j >= 0; j--){
                d = map[j][i] == '.' ? d + 1 : 0;
                down[j][i] = d;
                r = map[i][j] == '.' ? r + 1 : 0;
                right[i][j] = r;
            }
        }
        // for (i = 0; i < n; i++){
        //     for (j = 0; j < n; j++) printf(" %2d", down[i][j]);
        //     puts("");
        // }
        // puts("");
        // for (i = 0; i < n; i++){
        //     for (j = 0; j < n; j++) printf(" %2d", right[i][j]);
        //     puts("");
        // }

        for (i = 0; i < n - maxi; i++){
            for (j = 0; j < n - maxi; j++){
                maxi = side(i, j, maxi);
            }
        }

        printf("%d\n", maxi);
    }

    return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	n
	.bss
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	down
	.align 32
	.type	down, @object
	.size	down, 4194304
down:
	.zero	4194304
	.globl	right
	.align 32
	.type	right, @object
	.size	right, 4194304
right:
	.zero	4194304
	.text
	.globl	side
	.type	side, @function
side:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -20(%rbp)
	movl	%esi, -24(%rbp)
	movl	%edx, -28(%rbp)
	movl	-24(%rbp), %eax
	movslq	%eax, %rdx
	movl	-20(%rbp), %eax
	cltq
	salq	$10, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	right(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-24(%rbp), %eax
	movslq	%eax, %rcx
	movl	-20(%rbp), %eax
	cltq
	salq	$10, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rcx
	leaq	down(%rip), %rax
	movl	(%rcx,%rax), %eax
	cmpl	%eax, %edx
	cmovle	%edx, %eax
	movl	%eax, -12(%rbp)
	movl	$1, -8(%rbp)
	jmp	.L2
.L4:
	movl	-20(%rbp), %edx
	movl	-8(%rbp), %eax
	addl	%eax, %edx
	movl	-24(%rbp), %eax
	movslq	%eax, %rcx
	movslq	%edx, %rax
	salq	$10, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	right(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-24(%rbp), %ecx
	movl	-8(%rbp), %eax
	addl	%ecx, %eax
	movslq	%eax, %rcx
	movl	-20(%rbp), %eax
	cltq
	salq	$10, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rcx
	leaq	down(%rip), %rax
	movl	(%rcx,%rax), %eax
	cmpl	%eax, %edx
	cmovle	%edx, %eax
	movl	%eax, -4(%rbp)
	movl	-12(%rbp), %edx
	movl	-4(%rbp), %eax
	cmpl	%eax, %edx
	cmovle	%edx, %eax
	movl	%eax, -12(%rbp)
	addl	$1, -8(%rbp)
.L2:
	movl	-28(%rbp), %eax
	cmpl	-12(%rbp), %eax
	jge	.L3
	movl	-8(%rbp), %eax
	cmpl	-12(%rbp), %eax
	jl	.L4
.L3:
	movl	-12(%rbp), %edx
	movl	-28(%rbp), %eax
	cmpl	%eax, %edx
	cmovge	%edx, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	side, .-side
	.section	.rodata
.LC0:
	.string	"%s"
.LC1:
	.string	"%d\n"
.LC2:
	.string	"%d"
	.text
	.globl	main
	.type	main, @function
main:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	leaq	-1048576(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$48, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	jmp	.L7
.L22:
	movl	$0, -1048612(%rbp)
	movl	$0, -1048608(%rbp)
	jmp	.L8
.L9:
	leaq	-1048592(%rbp), %rdx
	movl	-1048608(%rbp), %eax
	cltq
	salq	$10, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -1048608(%rbp)
.L8:
	movl	n(%rip), %eax
	cmpl	%eax, -1048608(%rbp)
	jl	.L9
	movl	$0, -1048608(%rbp)
	jmp	.L10
.L17:
	movl	$0, -1048600(%rbp)
	movl	$0, -1048596(%rbp)
	movl	n(%rip), %eax
	subl	$1, %eax
	movl	%eax, -1048604(%rbp)
	jmp	.L11
.L16:
	movl	-1048608(%rbp), %eax
	movslq	%eax, %rdx
	movl	-1048604(%rbp), %eax
	cltq
	salq	$10, %rax
	addq	%rbp, %rax
	addq	%rdx, %rax
	subq	$1048592, %rax
	movzbl	(%rax), %eax
	cmpb	$46, %al
	jne	.L12
	movl	-1048600(%rbp), %eax
	addl	$1, %eax
	jmp	.L13
.L12:
	movl	$0, %eax
.L13:
	movl	%eax, -1048600(%rbp)
	movl	-1048608(%rbp), %eax
	movslq	%eax, %rdx
	movl	-1048604(%rbp), %eax
	cltq
	salq	$10, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rcx
	leaq	down(%rip), %rdx
	movl	-1048600(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	movl	-1048604(%rbp), %eax
	movslq	%eax, %rdx
	movl	-1048608(%rbp), %eax
	cltq
	salq	$10, %rax
	addq	%rbp, %rax
	addq	%rdx, %rax
	subq	$1048592, %rax
	movzbl	(%rax), %eax
	cmpb	$46, %al
	jne	.L14
	movl	-1048596(%rbp), %eax
	addl	$1, %eax
	jmp	.L15
.L14:
	movl	$0, %eax
.L15:
	movl	%eax, -1048596(%rbp)
	movl	-1048604(%rbp), %eax
	movslq	%eax, %rdx
	movl	-1048608(%rbp), %eax
	cltq
	salq	$10, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rcx
	leaq	right(%rip), %rdx
	movl	-1048596(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	subl	$1, -1048604(%rbp)
.L11:
	cmpl	$0, -1048604(%rbp)
	jns	.L16
	addl	$1, -1048608(%rbp)
.L10:
	movl	n(%rip), %eax
	cmpl	%eax, -1048608(%rbp)
	jl	.L17
	movl	$0, -1048608(%rbp)
	jmp	.L18
.L21:
	movl	$0, -1048604(%rbp)
	jmp	.L19
.L20:
	movl	-1048612(%rbp), %edx
	movl	-1048604(%rbp), %ecx
	movl	-1048608(%rbp), %eax
	movl	%ecx, %esi
	movl	%eax, %edi
	call	side
	movl	%eax, -1048612(%rbp)
	addl	$1, -1048604(%rbp)
.L19:
	movl	n(%rip), %eax
	subl	-1048612(%rbp), %eax
	cmpl	%eax, -1048604(%rbp)
	jl	.L20
	addl	$1, -1048608(%rbp)
.L18:
	movl	n(%rip), %eax
	subl	-1048612(%rbp), %eax
	cmpl	%eax, -1048608(%rbp)
	jl	.L21
	movl	-1048612(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L7:
	leaq	n(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	n(%rip), %eax
	testl	%eax, %eax
	jne	.L22
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L24
	call	__stack_chk_fail@PLT
.L24:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
```

Only output the optimized assembly code. Do not include any other text. Do not write any comments in the assembly code. Wrap the assembly code in ```assembly``` tags.
user
	.file	"temp.c"
	.text
	.p2align 4
	.globl	side
	.type	side, @function
side:
.LFB35:
	.cfi_startproc
	endbr64
	movslq	%edi, %r9
	movslq	%esi, %rsi
	leaq	right(%rip), %rdi
	movl	%edx, %eax
	salq	$10, %r9
	addq	%rsi, %r9
	leaq	down(%rip), %rsi
	movl	(%rsi,%r9,4), %edx
	movl	(%rdi,%r9,4), %ecx
	cmpl	%edx, %ecx
	cmovg	%edx, %ecx
	testl	%eax, %eax
	movl	$1, %edx
	cmovg	%eax, %edx
	cmpl	%edx, %ecx
	jle	.L2
	salq	$2, %r9
	addq	%r9, %rdi
	addq	%rsi, %r9
	movl	$2, %esi
	.p2align 4,,10
	.p2align 3
.L3:
	movl	4096(%rdi), %edx
	movl	-4(%r9,%rsi,4), %r8d
	cmpl	%r8d, %edx
	cmovg	%r8d, %edx
	cmpl	%edx, %ecx
	cmovg	%edx, %ecx
	cmpl	%esi, %eax
	movl	%esi, %edx
	cmovge	%eax, %edx
	addq	$1, %rsi
	addq	$4096, %rdi
	cmpl	%ecx, %edx
	jl	.L3
.L2:
	cmpl	%ecx, %eax
	cmovl	%ecx, %eax
	ret
	.cfi_endproc
.LFE35:
	.size	side, .-side
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%s"
.LC1:
	.string	"%d\n"
.LC2:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB36:
	.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
	leaq	-1048576(%rsp), %r11
	.cfi_def_cfa 11, 1048632
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$24, %rsp
	.cfi_def_cfa_offset 1048656
	leaq	n(%rip), %rbp
	leaq	.LC0(%rip), %rbx
	movq	%fs:40, %rax
	movq	%rax, 1048584(%rsp)
	xorl	%eax, %eax
.L7:
	movq	%rbp, %rsi
	leaq	.LC2(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	n(%rip), %eax
	testl	%eax, %eax
	je	.L21
	jle	.L9
	movq	%rsp, %r14
	xorl	%r12d, %r12d
	movq	%r14, %r13
	.p2align 4,,10
	.p2align 3
.L8:
	movq	%r13, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	addl	$1, %r12d
	call	__isoc99_scanf@PLT
	movl	n(%rip), %r11d
	addq	$1024, %r13
	cmpl	%r12d, %r11d
	jg	.L8
	testl	%r11d, %r11d
	jle	.L9
	leal	-1(%r11), %r10d
	leaq	right(%rip), %r13
	movq	%r14, %r9
	movq	%r10, %r15
	leaq	down(%rip), %r12
	salq	$12, %r10
	movq	%r13, %rdi
	leaq	4096(%r13), %rax
	movq	%r12, %r8
	movslq	%r15d, %r15
	addq	%rax, %r10
	.p2align 4,,10
	.p2align 3
.L15:
	movq	%r15, %rax
	xorl	%esi, %esi
	xorl	%edx, %edx
	.p2align 4,,10
	.p2align 3
.L14:
	movq	%rax, %rcx
	addl	$1, %edx
	salq	$10, %rcx
	cmpb	$46, (%r9,%rcx)
	je	.L10
	xorl	%edx, %edx
.L10:
	movq	%rax, %rcx
	salq	$12, %rcx
	cmpb	$46, (%r14,%rax)
	movl	%edx, (%r8,%rcx)
	je	.L37
	movl	$0, (%rdi,%rax,4)
	subq	$1, %rax
	cmpl	$-1, %eax
	je	.L13
	xorl	%esi, %esi
	jmp	.L14
	.p2align 4,,10
	.p2align 3
.L37:
	addl	$1, %esi
	movl	%esi, (%rdi,%rax,4)
	subq	$1, %rax
	cmpl	$-1, %eax
	jne	.L14
.L13:
	addq	$4096, %rdi
	addq	$4, %r8
	addq	$1024, %r14
	addq	$1, %r9
	cmpq	%r10, %rdi
	jne	.L15
	xorl	%r8d, %r8d
	xorl	%r14d, %r14d
	cmpl	%r8d, %r11d
	jle	.L23
	.p2align 4,,10
	.p2align 3
.L28:
	movq	%r12, %rdi
	movq	%r13, %r9
	xorl	%r10d, %r10d
	.p2align 4,,10
	.p2align 3
.L19:
	movl	(%rdi), %eax
	movl	(%r9), %edx
	cmpl	%eax, %edx
	cmovg	%eax, %edx
	testl	%r8d, %r8d
	movl	$1, %eax
	cmovg	%r8d, %eax
	cmpl	%eax, %edx
	jle	.L17
	movq	%r9, %rsi
	movl	$2, %ecx
	.p2align 4,,10
	.p2align 3
.L18:
	movl	4096(%rsi), %eax
	movl	-4(%rdi,%rcx,4), %r15d
	cmpl	%r15d, %eax
	cmovg	%r15d, %eax
	cmpl	%eax, %edx
	cmovg	%eax, %edx
	cmpl	%ecx, %r8d
	movl	%ecx, %eax
	cmovge	%r8d, %eax
	addq	$1, %rcx
	addq	$4096, %rsi
	cmpl	%eax, %edx
	jg	.L18
.L17:
	cmpl	%edx, %r8d
	movl	%r11d, %eax
	cmovl	%edx, %r8d
	addl	$1, %r10d
	addq	$4, %r9
	addq	$4, %rdi
	subl	%r8d, %eax
	cmpl	%r10d, %eax
	jg	.L19
	addl	$1, %r14d
	cmpl	%r14d, %eax
	jle	.L23
	addq	$4096, %r13
	addq	$4096, %r12
	cmpl	%r8d, %r11d
	jg	.L28
.L23:
	movl	%r8d, %edx
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L7
.L9:
	xorl	%r8d, %r8d
	jmp	.L23
.L21:
	movq	1048584(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L38
	addq	$1048600, %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
.L38:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE36:
	.size	main, .-main
	.globl	right
	.bss
	.align 32
	.type	right, @object
	.size	right, 4194304
right:
	.zero	4194304
	.globl	down
	.align 32
	.type	down, @object
	.size	down, 4194304
down:
	.zero	4194304
	.globl	n
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.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	side
	.type	side, @function
side:
.LFB35:
	.cfi_startproc
	endbr64
	movslq	%edi, %r9
	movslq	%esi, %rsi
	leaq	right(%rip), %rdi
	movl	%edx, %eax
	salq	$10, %r9
	addq	%rsi, %r9
	leaq	down(%rip), %rsi
	movl	(%rsi,%r9,4), %edx
	movl	(%rdi,%r9,4), %ecx
	cmpl	%edx, %ecx
	cmovg	%edx, %ecx
	testl	%eax, %eax
	movl	$1, %edx
	cmovg	%eax, %edx
	cmpl	%edx, %ecx
	jle	.L2
	salq	$2, %r9
	addq	%r9, %rdi
	addq	%rsi, %r9
	movl	$2, %esi
	.p2align 4,,10
	.p2align 3
.L3:
	movl	4096(%rdi), %edx
	movl	-4(%r9,%rsi,4), %r8d
	cmpl	%r8d, %edx
	cmovg	%r8d, %edx
	cmpl	%edx, %ecx
	cmovg	%edx, %ecx
	cmpl	%esi, %eax
	movl	%esi, %edx
	cmovge	%eax, %edx
	addq	$1, %rsi
	addq	$4096, %rdi
	cmpl	%ecx, %edx
	jl	.L3
.L2:
	cmpl	%ecx, %eax
	cmovl	%ecx, %eax
	ret
	.cfi_endproc
.LFE35:
	.size	side, .-side
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%s"
.LC1:
	.string	"%d\n"
.LC2:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB36:
	.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
	leaq	-1048576(%rsp), %r11
	.cfi_def_cfa 11, 1048632
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$24, %rsp
	.cfi_def_cfa_offset 1048656
	leaq	n(%rip), %rbp
	leaq	.LC0(%rip), %rbx
	movq	%fs:40, %rax
	movq	%rax, 1048584(%rsp)
	xorl	%eax, %eax
.L7:
	movq	%rbp, %rsi
	leaq	.LC2(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	n(%rip), %eax
	testl	%eax, %eax
	je	.L21
	jle	.L9
	movq	%rsp, %r14
	xorl	%r12d, %r12d
	movq	%r14, %r13
	.p2align 4,,10
	.p2align 3
.L8:
	movq	%r13, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	addl	$1, %r12d
	call	__isoc99_scanf@PLT
	movl	n(%rip), %r11d
	addq	$1024, %r13
	cmpl	%r12d, %r11d
	jg	.L8
	testl	%r11d, %r11d
	jle	.L9
	leal	-1(%r11), %r10d
	leaq	right(%rip), %r13
	movq	%r14, %r9
	movq	%r10, %r15
	leaq	down(%rip), %r12
	salq	$12, %r10
	movq	%r13, %rdi
	leaq	4096(%r13), %rax
	movq	%r12, %r8
	movslq	%r15d, %r15
	addq	%rax, %r10
	.p2align 4,,10
	.p2align 3
.L15:
	movq	%r15, %rax
	xorl	%esi, %esi
	xorl	%edx, %edx
	.p2align 4,,10
	.p2align 3
.L14:
	movq	%rax, %rcx
	addl	$1, %edx
	salq	$10, %rcx
	cmpb	$46, (%r9,%rcx)
	je	.L10
	xorl	%edx, %edx
.L10:
	movq	%rax, %rcx
	salq	$12, %rcx
	cmpb	$46, (%r14,%rax)
	movl	%edx, (%r8,%rcx)
	je	.L37
	movl	$0, (%rdi,%rax,4)
	subq	$1, %rax
	cmpl	$-1, %eax
	je	.L13
	xorl	%esi, %esi
	jmp	.L14
	.p2align 4,,10
	.p2align 3
.L37:
	addl	$1, %esi
	movl	%esi, (%rdi,%rax,4)
	subq	$1, %rax
	cmpl	$-1, %eax
	jne	.L14
.L13:
	addq	$4096, %rdi
	addq	$4, %r8
	addq	$1024, %r14
	addq	$1, %r9
	cmpq	%r10, %rdi
	jne	.L15
	xorl	%r8d, %r8d
	xorl	%r14d, %r14d
	cmpl	%r8d, %r11d
	jle	.L23
	.p2align 4,,10
	.p2align 3
.L28:
	movq	%r12, %rdi
	movq	%r13, %r9
	xorl	%r10d, %r10d
	.p2align 4,,10
	.p2align 3
.L19:
	movl	(%rdi), %eax
	movl	(%r9), %edx
	cmpl	%eax, %edx
	cmovg	%eax, %edx
	testl	%r8d, %r8d
	movl	$1, %eax
	cmovg	%r8d, %eax
	cmpl	%eax, %edx
	jle	.L17
	movq	%r9, %rsi
	movl	$2, %ecx
	.p2align 4,,10
	.p2align 3
.L18:
	movl	4096(%rsi), %eax
	movl	-4(%rdi,%rcx,4), %r15d
	cmpl	%r15d, %eax
	cmovg	%r15d, %eax
	cmpl	%eax, %edx
	cmovg	%eax, %edx
	cmpl	%ecx, %r8d
	movl	%ecx, %eax
	cmovge	%r8d, %eax
	addq	$1, %rcx
	addq	$4096, %rsi
	cmpl	%eax, %edx
	jg	.L18
.L17:
	cmpl	%edx, %r8d
	movl	%r11d, %eax
	cmovl	%edx, %r8d
	addl	$1, %r10d
	addq	$4, %r9
	addq	$4, %rdi
	subl	%r8d, %eax
	cmpl	%r10d, %eax
	jg	.L19
	addl	$1, %r14d
	cmpl	%r14d, %eax
	jle	.L23
	addq	$4096, %r13
	addq	$4096, %r12
	cmpl	%r8d, %r11d
	jg	.L28
.L23:
	movl	%r8d, %edx
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L7
.L9:
	xorl	%r8d, %r8d
	jmp	.L23
.L21:
	movq	1048584(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L38
	addq	$1048600, %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
.L38:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE36:
	.size	main, .-main
	.globl	right
	.bss
	.align 32
	.type	right, @object
	.size	right, 4194304
right:
	.zero	4194304
	.globl	down
	.align 32
	.type	down, @object
	.size	down, 4194304
down:
	.zero	4194304
	.globl	n
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.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 min(a, b) ((a) < (b) ? (a): (b))
#define max(a, b) ((a) > (b) ? (a): (b))

int n;
int down[1024][1024];
int right[1024][1024];

int side(int y, int x, int maxi)
{
    int d;
    int r;
    int s = min(down[y][x], right[y][x]);
    int i;

    for (i = 1; maxi < s && i < s; i++){
        int t = min(down[y][x + i], right[y + i][x]);
        s = min(s, t);
    }

    return max(maxi, s);
}

int main(void)
{
    while (scanf("%d", &n), n){
        char map[1024][1024];
        int maxi = 0;
        int i, j, k;

        for (i = 0; i < n; i++){
            scanf("%s", map[i]);
        }
        // for (i = 0; i < n; i++) puts(map[i]);

        for (i = 0; i < n; i++){
            int d = 0;
            int r = 0;

            for (j = n - 1; j >= 0; j--){
                d = map[j][i] == '.' ? d + 1 : 0;
                down[j][i] = d;
                r = map[i][j] == '.' ? r + 1 : 0;
                right[i][j] = r;
            }
        }
        // for (i = 0; i < n; i++){
        //     for (j = 0; j < n; j++) printf(" %2d", down[i][j]);
        //     puts("");
        // }
        // puts("");
        // for (i = 0; i < n; i++){
        //     for (j = 0; j < n; j++) printf(" %2d", right[i][j]);
        //     puts("");
        // }

        for (i = 0; i < n - maxi; i++){
            for (j = 0; j < n - maxi; j++){
                maxi = side(i, j, maxi);
            }
        }

        printf("%d\n", maxi);
    }

    return 0;
}
10
...*....**
..........
**....**..
........*.
..*.......
..........
.*........
..........
....*..***
.*....*...
10
*****.****
*..*.*....
****.*....
*....*....
*....*****
..........
****.*****
*..*...*..
****...*..
*..*...*..
0
 10
...*....**
..........
**....**..
*.........
.......*..
..........
../.....*.
..........
....*..***
...*....*/
10
*****.****
*..*.*....
****.*....
.....*..*.
*....*****
..........
*****.*+**
*..*./.*..
****...*..
*..*../*..
0
 10
...*....**
..........
**....**..
*.........
.......*..
..........
../.....*.
..........
....*..***
...*....*/
10
*****.****
....*.*..*
****.*/...
.....*..*.
*../.*****
..........
*****.*+**
*..*./.*..
****...*..
*..*../*..
0
 10
...*....**
..........
**....**..
*.........
.......*..
..........
.*...../..
..........
....*..***
.*....*...
10
*****.****
*..*.*....
....*.****
*....*.-..
*****....*
..........
**+*.*****
*..*...*..
****...*..
*..*../*..
0
 10
...*....**
.....-....
**....**..
*.........
.......*..
.....-....
../.....*.
..........
....*..***
...*....*/
10
*+***.****
-...*.*..*
****.*....
.....*..*.
*....*****
..........
*****.*+**
*./*.0.*..
****...*..
*..*../*..
0
 10
...*....**
.....-....
**....**..
*.........
.......*..
.......-..
../.....*.
..........
....*..***
/*....*...
0
*****.****
....*-*..+
****.*....
.....*..*.
*....*****
..........
*****.*+**
*..*./.*..
****...*..
*.-*../*..
0
 10
../+...-**
........-.
**...,**..
)....-....
..*......-
......../.
../....-*.
..../.....
....*..***
...*....*/
10
*****.***)
*./*.*-...
)***.*....
...//*-.*.
*....**)**
.........-
)****-*+**
*..*...*..
****...*-.
*..*..0*..
0
 10
...*....**
.....-....
**....**..
*.........
-......*..
.......-..
.*...../..
..........
....*..***
/*....*...
0
*****.****
....*-*..+
****.*....
.....*..*.
*....*****
..........
*****.*+**
*..*./.*..
****...*..
*.-*../*..
1
 10
/..*....**
...-......
**....)*..
*.........
-......*..
..--......
../.....*.
...../.../
....*..***
/)....*...
0
**+**.****
../.*-*..+
****.*....
.....*..*.
*....*****
..........
***+*.*+**
*..*./.*..
..*...***)
*.-*.//*..
0
 10
...*....**
..........
**....**..
........*.
.......*..
..........
.*........
..........
....*..***
.*....*...
10
*****.****
*..*.*....
****.*....
*....*....
*....*****
..........
****.*****
*..*...*..
****...*..
*..*...*..
0

5
3
 4
3
 4
2
 5
2
 3
3
 4
 3
2
 5
 3
 5
3

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 min(a, b) ((a) < (b) ? (a): (b))
#define max(a, b) ((a) > (b) ? (a): (b))

int n;
int down[1024][1024];
int right[1024][1024];

int side(int y, int x, int maxi)
{
    int d;
    int r;
    int s = min(down[y][x], right[y][x]);
    int i;

    for (i = 1; maxi < s && i < s; i++){
        int t = min(down[y][x + i], right[y + i][x]);
        s = min(s, t);
    }

    return max(maxi, s);
}

int main(void)
{
    while (scanf("%d", &n), n){
        char map[1024][1024];
        int maxi = 0;
        int i, j, k;

        for (i = 0; i < n; i++){
            scanf("%s", map[i]);
        }
        // for (i = 0; i < n; i++) puts(map[i]);

        for (i = 0; i < n; i++){
            int d = 0;
            int r = 0;

            for (j = n - 1; j >= 0; j--){
                d = map[j][i] == '.' ? d + 1 : 0;
                down[j][i] = d;
                r = map[i][j] == '.' ? r + 1 : 0;
                right[i][j] = r;
            }
        }
        // for (i = 0; i < n; i++){
        //     for (j = 0; j < n; j++) printf(" %2d", down[i][j]);
        //     puts("");
        // }
        // puts("");
        // for (i = 0; i < n; i++){
        //     for (j = 0; j < n; j++) printf(" %2d", right[i][j]);
        //     puts("");
        // }

        for (i = 0; i < n - maxi; i++){
            for (j = 0; j < n - maxi; j++){
                maxi = side(i, j, maxi);
            }
        }

        printf("%d\n", maxi);
    }

    return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	n
	.bss
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	down
	.align 32
	.type	down, @object
	.size	down, 4194304
down:
	.zero	4194304
	.globl	right
	.align 32
	.type	right, @object
	.size	right, 4194304
right:
	.zero	4194304
	.text
	.globl	side
	.type	side, @function
side:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -20(%rbp)
	movl	%esi, -24(%rbp)
	movl	%edx, -28(%rbp)
	movl	-24(%rbp), %eax
	movslq	%eax, %rdx
	movl	-20(%rbp), %eax
	cltq
	salq	$10, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	right(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-24(%rbp), %eax
	movslq	%eax, %rcx
	movl	-20(%rbp), %eax
	cltq
	salq	$10, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rcx
	leaq	down(%rip), %rax
	movl	(%rcx,%rax), %eax
	cmpl	%eax, %edx
	cmovle	%edx, %eax
	movl	%eax, -12(%rbp)
	movl	$1, -8(%rbp)
	jmp	.L2
.L4:
	movl	-20(%rbp), %edx
	movl	-8(%rbp), %eax
	addl	%eax, %edx
	movl	-24(%rbp), %eax
	movslq	%eax, %rcx
	movslq	%edx, %rax
	salq	$10, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	right(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-24(%rbp), %ecx
	movl	-8(%rbp), %eax
	addl	%ecx, %eax
	movslq	%eax, %rcx
	movl	-20(%rbp), %eax
	cltq
	salq	$10, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rcx
	leaq	down(%rip), %rax
	movl	(%rcx,%rax), %eax
	cmpl	%eax, %edx
	cmovle	%edx, %eax
	movl	%eax, -4(%rbp)
	movl	-12(%rbp), %edx
	movl	-4(%rbp), %eax
	cmpl	%eax, %edx
	cmovle	%edx, %eax
	movl	%eax, -12(%rbp)
	addl	$1, -8(%rbp)
.L2:
	movl	-28(%rbp), %eax
	cmpl	-12(%rbp), %eax
	jge	.L3
	movl	-8(%rbp), %eax
	cmpl	-12(%rbp), %eax
	jl	.L4
.L3:
	movl	-12(%rbp), %edx
	movl	-28(%rbp), %eax
	cmpl	%eax, %edx
	cmovge	%edx, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	side, .-side
	.section	.rodata
.LC0:
	.string	"%s"
.LC1:
	.string	"%d\n"
.LC2:
	.string	"%d"
	.text
	.globl	main
	.type	main, @function
main:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	leaq	-1048576(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$48, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	jmp	.L7
.L22:
	movl	$0, -1048612(%rbp)
	movl	$0, -1048608(%rbp)
	jmp	.L8
.L9:
	leaq	-1048592(%rbp), %rdx
	movl	-1048608(%rbp), %eax
	cltq
	salq	$10, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -1048608(%rbp)
.L8:
	movl	n(%rip), %eax
	cmpl	%eax, -1048608(%rbp)
	jl	.L9
	movl	$0, -1048608(%rbp)
	jmp	.L10
.L17:
	movl	$0, -1048600(%rbp)
	movl	$0, -1048596(%rbp)
	movl	n(%rip), %eax
	subl	$1, %eax
	movl	%eax, -1048604(%rbp)
	jmp	.L11
.L16:
	movl	-1048608(%rbp), %eax
	movslq	%eax, %rdx
	movl	-1048604(%rbp), %eax
	cltq
	salq	$10, %rax
	addq	%rbp, %rax
	addq	%rdx, %rax
	subq	$1048592, %rax
	movzbl	(%rax), %eax
	cmpb	$46, %al
	jne	.L12
	movl	-1048600(%rbp), %eax
	addl	$1, %eax
	jmp	.L13
.L12:
	movl	$0, %eax
.L13:
	movl	%eax, -1048600(%rbp)
	movl	-1048608(%rbp), %eax
	movslq	%eax, %rdx
	movl	-1048604(%rbp), %eax
	cltq
	salq	$10, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rcx
	leaq	down(%rip), %rdx
	movl	-1048600(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	movl	-1048604(%rbp), %eax
	movslq	%eax, %rdx
	movl	-1048608(%rbp), %eax
	cltq
	salq	$10, %rax
	addq	%rbp, %rax
	addq	%rdx, %rax
	subq	$1048592, %rax
	movzbl	(%rax), %eax
	cmpb	$46, %al
	jne	.L14
	movl	-1048596(%rbp), %eax
	addl	$1, %eax
	jmp	.L15
.L14:
	movl	$0, %eax
.L15:
	movl	%eax, -1048596(%rbp)
	movl	-1048604(%rbp), %eax
	movslq	%eax, %rdx
	movl	-1048608(%rbp), %eax
	cltq
	salq	$10, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rcx
	leaq	right(%rip), %rdx
	movl	-1048596(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	subl	$1, -1048604(%rbp)
.L11:
	cmpl	$0, -1048604(%rbp)
	jns	.L16
	addl	$1, -1048608(%rbp)
.L10:
	movl	n(%rip), %eax
	cmpl	%eax, -1048608(%rbp)
	jl	.L17
	movl	$0, -1048608(%rbp)
	jmp	.L18
.L21:
	movl	$0, -1048604(%rbp)
	jmp	.L19
.L20:
	movl	-1048612(%rbp), %edx
	movl	-1048604(%rbp), %ecx
	movl	-1048608(%rbp), %eax
	movl	%ecx, %esi
	movl	%eax, %edi
	call	side
	movl	%eax, -1048612(%rbp)
	addl	$1, -1048604(%rbp)
.L19:
	movl	n(%rip), %eax
	subl	-1048612(%rbp), %eax
	cmpl	%eax, -1048604(%rbp)
	jl	.L20
	addl	$1, -1048608(%rbp)
.L18:
	movl	n(%rip), %eax
	subl	-1048612(%rbp), %eax
	cmpl	%eax, -1048608(%rbp)
	jl	.L21
	movl	-1048612(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L7:
	leaq	n(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	n(%rip), %eax
	testl	%eax, %eax
	jne	.L22
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L24
	call	__stack_chk_fail@PLT
.L24:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
```

Only output the optimized assembly code. Do not include any other text. Do not write any comments in the assembly code. Wrap the assembly code in ```assembly``` tags.
train
	.file	"temp.c"
	.text
	.globl	n
	.bss
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	down
	.align 32
	.type	down, @object
	.size	down, 4194304
down:
	.zero	4194304
	.globl	right
	.align 32
	.type	right, @object
	.size	right, 4194304
right:
	.zero	4194304
	.text
	.globl	side
	.type	side, @function
side:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -20(%rbp)
	movl	%esi, -24(%rbp)
	movl	%edx, -28(%rbp)
	movl	-24(%rbp), %eax
	movslq	%eax, %rdx
	movl	-20(%rbp), %eax
	cltq
	salq	$10, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	right(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-24(%rbp), %eax
	movslq	%eax, %rcx
	movl	-20(%rbp), %eax
	cltq
	salq	$10, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rcx
	leaq	down(%rip), %rax
	movl	(%rcx,%rax), %eax
	cmpl	%eax, %edx
	cmovle	%edx, %eax
	movl	%eax, -12(%rbp)
	movl	$1, -8(%rbp)
	jmp	.L2
.L4:
	movl	-20(%rbp), %edx
	movl	-8(%rbp), %eax
	addl	%eax, %edx
	movl	-24(%rbp), %eax
	movslq	%eax, %rcx
	movslq	%edx, %rax
	salq	$10, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	right(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-24(%rbp), %ecx
	movl	-8(%rbp), %eax
	addl	%ecx, %eax
	movslq	%eax, %rcx
	movl	-20(%rbp), %eax
	cltq
	salq	$10, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rcx
	leaq	down(%rip), %rax
	movl	(%rcx,%rax), %eax
	cmpl	%eax, %edx
	cmovle	%edx, %eax
	movl	%eax, -4(%rbp)
	movl	-12(%rbp), %edx
	movl	-4(%rbp), %eax
	cmpl	%eax, %edx
	cmovle	%edx, %eax
	movl	%eax, -12(%rbp)
	addl	$1, -8(%rbp)
.L2:
	movl	-28(%rbp), %eax
	cmpl	-12(%rbp), %eax
	jge	.L3
	movl	-8(%rbp), %eax
	cmpl	-12(%rbp), %eax
	jl	.L4
.L3:
	movl	-12(%rbp), %edx
	movl	-28(%rbp), %eax
	cmpl	%eax, %edx
	cmovge	%edx, %eax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	side, .-side
	.section	.rodata
.LC0:
	.string	"%s"
.LC1:
	.string	"%d\n"
.LC2:
	.string	"%d"
	.text
	.globl	main
	.type	main, @function
main:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	leaq	-1048576(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$48, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	jmp	.L7
.L22:
	movl	$0, -1048612(%rbp)
	movl	$0, -1048608(%rbp)
	jmp	.L8
.L9:
	leaq	-1048592(%rbp), %rdx
	movl	-1048608(%rbp), %eax
	cltq
	salq	$10, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -1048608(%rbp)
.L8:
	movl	n(%rip), %eax
	cmpl	%eax, -1048608(%rbp)
	jl	.L9
	movl	$0, -1048608(%rbp)
	jmp	.L10
.L17:
	movl	$0, -1048600(%rbp)
	movl	$0, -1048596(%rbp)
	movl	n(%rip), %eax
	subl	$1, %eax
	movl	%eax, -1048604(%rbp)
	jmp	.L11
.L16:
	movl	-1048608(%rbp), %eax
	movslq	%eax, %rdx
	movl	-1048604(%rbp), %eax
	cltq
	salq	$10, %rax
	addq	%rbp, %rax
	addq	%rdx, %rax
	subq	$1048592, %rax
	movzbl	(%rax), %eax
	cmpb	$46, %al
	jne	.L12
	movl	-1048600(%rbp), %eax
	addl	$1, %eax
	jmp	.L13
.L12:
	movl	$0, %eax
.L13:
	movl	%eax, -1048600(%rbp)
	movl	-1048608(%rbp), %eax
	movslq	%eax, %rdx
	movl	-1048604(%rbp), %eax
	cltq
	salq	$10, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rcx
	leaq	down(%rip), %rdx
	movl	-1048600(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	movl	-1048604(%rbp), %eax
	movslq	%eax, %rdx
	movl	-1048608(%rbp), %eax
	cltq
	salq	$10, %rax
	addq	%rbp, %rax
	addq	%rdx, %rax
	subq	$1048592, %rax
	movzbl	(%rax), %eax
	cmpb	$46, %al
	jne	.L14
	movl	-1048596(%rbp), %eax
	addl	$1, %eax
	jmp	.L15
.L14:
	movl	$0, %eax
.L15:
	movl	%eax, -1048596(%rbp)
	movl	-1048604(%rbp), %eax
	movslq	%eax, %rdx
	movl	-1048608(%rbp), %eax
	cltq
	salq	$10, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rcx
	leaq	right(%rip), %rdx
	movl	-1048596(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	subl	$1, -1048604(%rbp)
.L11:
	cmpl	$0, -1048604(%rbp)
	jns	.L16
	addl	$1, -1048608(%rbp)
.L10:
	movl	n(%rip), %eax
	cmpl	%eax, -1048608(%rbp)
	jl	.L17
	movl	$0, -1048608(%rbp)
	jmp	.L18
.L21:
	movl	$0, -1048604(%rbp)
	jmp	.L19
.L20:
	movl	-1048612(%rbp), %edx
	movl	-1048604(%rbp), %ecx
	movl	-1048608(%rbp), %eax
	movl	%ecx, %esi
	movl	%eax, %edi
	call	side
	movl	%eax, -1048612(%rbp)
	addl	$1, -1048604(%rbp)
.L19:
	movl	n(%rip), %eax
	subl	-1048612(%rbp), %eax
	cmpl	%eax, -1048604(%rbp)
	jl	.L20
	addl	$1, -1048608(%rbp)
.L18:
	movl	n(%rip), %eax
	subl	-1048612(%rbp), %eax
	cmpl	%eax, -1048608(%rbp)
	jl	.L21
	movl	-1048612(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L7:
	leaq	n(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	n(%rip), %eax
	testl	%eax, %eax
	jne	.L22
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L24
	call	__stack_chk_fail@PLT
.L24:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
