Given the following C code and unoptimized assembly code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include <stdio.h>

int main()
{
	int N;
	scanf("%d", &N);
	if (N == 2) {
		printf("-1\n");
		fflush(stdout);
		return 0;
	}
	
	int i, j, k, l, r;
	char ans[10][10][10] = {{}, {}, {},
		{".aa", "a..", "a.."},
		{"abcc", "abdd", "ccab", "ddab"},
		{"abbcc", "a.aab", "ca..b", "ca..a", "bbcca"},
		{"abb.aa", "a.ca..", "bbca..", ".aacbb", "a..c.a", "a..bba"},
		{".aa.aab", "a..a..b", "a..a..c", ".aa.aac", "a..a..b", "a..a..b", "bbccbb."},
		{"abcc....", "abdd....", "ccab....", "ddab....", "....abcc", "....abdd", "....ccab", "....ddab"}
	};
	if (N % 3 == 0) {
		k = N / 3;
		for (l = 0; l < k; l++) {
			for (i = 0; i < 3; i++) {
				for (j = 0; j < k; j++) printf("%s", ans[3][i]);
				printf("\n");
			}
		}
	} else {
		k = (N - 4) / 6;
		r = (N - 4) % 6 + 4;
		for (l = 0; l < k; l++) {
			for (i = 0; i < 6; i++) {
				for (j = 0; j < k; j++) {
					if (j == l) printf("%s", ans[6][i]);
					else printf("......");
				}
				for (j = 0; j < r; j++) printf(".");
				printf("\n");
			}
		}
		for (i = 0; i < r; i++) {
			for (j = 0; j < k * 6; j++) printf(".");
			printf("%s\n", ans[r][i]);
		}
	}	
	fflush(stdout);
	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"-1"
.LC2:
	.string	"%s"
.LC3:
	.string	"......"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$1040, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-1032(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-1032(%rbp), %eax
	cmpl	$2, %eax
	jne	.L2
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movq	stdout(%rip), %rax
	movq	%rax, %rdi
	call	fflush@PLT
	movl	$0, %eax
	jmp	.L26
.L2:
	leaq	-1008(%rbp), %rdx
	movl	$0, %eax
	movl	$125, %ecx
	movq	%rdx, %rdi
	rep stosq
	movq	$6381870, -708(%rbp)
	movw	$0, -700(%rbp)
	movq	$3026529, -698(%rbp)
	movw	$0, -690(%rbp)
	movq	$3026529, -688(%rbp)
	movw	$0, -680(%rbp)
	movq	$1667457633, -608(%rbp)
	movw	$0, -600(%rbp)
	movq	$1684300385, -598(%rbp)
	movw	$0, -590(%rbp)
	movq	$1650549603, -588(%rbp)
	movw	$0, -580(%rbp)
	movq	$1650549860, -578(%rbp)
	movw	$0, -570(%rbp)
	movabsq	$426869154401, %rax
	movq	%rax, -508(%rbp)
	movw	$0, -500(%rbp)
	movabsq	$422540553825, %rax
	movq	%rax, -498(%rbp)
	movw	$0, -490(%rbp)
	movabsq	$421681586531, %rax
	movq	%rax, -488(%rbp)
	movw	$0, -480(%rbp)
	movabsq	$417386619235, %rax
	movq	%rax, -478(%rbp)
	movw	$0, -470(%rbp)
	movabsq	$418279285346, %rax
	movq	%rax, -468(%rbp)
	movw	$0, -460(%rbp)
	movabsq	$107070017921633, %rax
	movq	%rax, -408(%rbp)
	movw	$0, -400(%rbp)
	movabsq	$50776737263201, %rax
	movq	%rax, -398(%rbp)
	movw	$0, -390(%rbp)
	movabsq	$50776737276514, %rax
	movq	%rax, -388(%rbp)
	movw	$0, -380(%rbp)
	movabsq	$108174713643310, %rax
	movq	%rax, -378(%rbp)
	movw	$0, -370(%rbp)
	movabsq	$106851860360801, %rax
	movq	%rax, -368(%rbp)
	movw	$0, -360(%rbp)
	movabsq	$107075181882977, %rax
	movq	%rax, -358(%rbp)
	movw	$0, -350(%rbp)
	movabsq	$27691617735500078, %rax
	movq	%rax, -308(%rbp)
	movw	$0, -300(%rbp)
	movabsq	$27635324451434081, %rax
	movq	%rax, -298(%rbp)
	movw	$0, -290(%rbp)
	movabsq	$27916799428144737, %rsi
	movq	%rsi, -288(%rbp)
	movw	$0, -280(%rbp)
	movabsq	$27973092712210734, %rsi
	movq	%rsi, -278(%rbp)
	movw	$0, -270(%rbp)
	movq	%rax, -268(%rbp)
	movw	$0, -260(%rbp)
	movq	%rax, -258(%rbp)
	movw	$0, -250(%rbp)
	movabsq	$13056023642464866, %rax
	movq	%rax, -248(%rbp)
	movw	$0, -240(%rbp)
	movabsq	$3327647951444206177, %rax
	movq	%rax, -208(%rbp)
	movw	$0, -200(%rbp)
	movabsq	$3327647951461048929, %rax
	movq	%rax, -198(%rbp)
	movw	$0, -190(%rbp)
	movabsq	$3327647951427298147, %rax
	movq	%rax, -188(%rbp)
	movw	$0, -180(%rbp)
	movabsq	$3327647951427298404, %rax
	movq	%rax, -178(%rbp)
	movw	$0, -170(%rbp)
	movabsq	$7161676001975348782, %rax
	movq	%rax, -168(%rbp)
	movw	$0, -160(%rbp)
	movabsq	$7234015070989987374, %rax
	movq	%rax, -158(%rbp)
	movw	$0, -150(%rbp)
	movabsq	$7089056566085561902, %rax
	movq	%rax, -148(%rbp)
	movw	$0, -140(%rbp)
	movabsq	$7089057669892156974, %rax
	movq	%rax, -138(%rbp)
	movw	$0, -130(%rbp)
	movl	-1032(%rbp), %edx
	movslq	%edx, %rax
	imulq	$1431655766, %rax, %rax
	shrq	$32, %rax
	movl	%edx, %ecx
	sarl	$31, %ecx
	subl	%ecx, %eax
	movl	%eax, %ecx
	addl	%ecx, %ecx
	addl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	testl	%eax, %eax
	jne	.L4
	movl	-1032(%rbp), %eax
	movslq	%eax, %rdx
	imulq	$1431655766, %rdx, %rdx
	shrq	$32, %rdx
	sarl	$31, %eax
	movl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	movl	%eax, -1016(%rbp)
	movl	$0, -1020(%rbp)
	jmp	.L5
.L10:
	movl	$0, -1028(%rbp)
	jmp	.L6
.L9:
	movl	$0, -1024(%rbp)
	jmp	.L7
.L8:
	leaq	-1008(%rbp), %rcx
	movl	-1028(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	$300, %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -1024(%rbp)
.L7:
	movl	-1024(%rbp), %eax
	cmpl	-1016(%rbp), %eax
	jl	.L8
	movl	$10, %edi
	call	putchar@PLT
	addl	$1, -1028(%rbp)
.L6:
	cmpl	$2, -1028(%rbp)
	jle	.L9
	addl	$1, -1020(%rbp)
.L5:
	movl	-1020(%rbp), %eax
	cmpl	-1016(%rbp), %eax
	jl	.L10
	jmp	.L11
.L4:
	movl	-1032(%rbp), %eax
	subl	$4, %eax
	movslq	%eax, %rdx
	imulq	$715827883, %rdx, %rdx
	shrq	$32, %rdx
	sarl	$31, %eax
	movl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	movl	%eax, -1016(%rbp)
	movl	-1032(%rbp), %eax
	leal	-4(%rax), %ecx
	movslq	%ecx, %rax
	imulq	$715827883, %rax, %rax
	shrq	$32, %rax
	movl	%ecx, %esi
	sarl	$31, %esi
	movl	%eax, %edx
	subl	%esi, %edx
	movl	%edx, %eax
	addl	%eax, %eax
	addl	%edx, %eax
	addl	%eax, %eax
	subl	%eax, %ecx
	movl	%ecx, %edx
	leal	4(%rdx), %eax
	movl	%eax, -1012(%rbp)
	movl	$0, -1020(%rbp)
	jmp	.L12
.L21:
	movl	$0, -1028(%rbp)
	jmp	.L13
.L20:
	movl	$0, -1024(%rbp)
	jmp	.L14
.L17:
	movl	-1024(%rbp), %eax
	cmpl	-1020(%rbp), %eax
	jne	.L15
	leaq	-1008(%rbp), %rcx
	movl	-1028(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	$600, %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L16
.L15:
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L16:
	addl	$1, -1024(%rbp)
.L14:
	movl	-1024(%rbp), %eax
	cmpl	-1016(%rbp), %eax
	jl	.L17
	movl	$0, -1024(%rbp)
	jmp	.L18
.L19:
	movl	$46, %edi
	call	putchar@PLT
	addl	$1, -1024(%rbp)
.L18:
	movl	-1024(%rbp), %eax
	cmpl	-1012(%rbp), %eax
	jl	.L19
	movl	$10, %edi
	call	putchar@PLT
	addl	$1, -1028(%rbp)
.L13:
	cmpl	$5, -1028(%rbp)
	jle	.L20
	addl	$1, -1020(%rbp)
.L12:
	movl	-1020(%rbp), %eax
	cmpl	-1016(%rbp), %eax
	jl	.L21
	movl	$0, -1028(%rbp)
	jmp	.L22
.L25:
	movl	$0, -1024(%rbp)
	jmp	.L23
.L24:
	movl	$46, %edi
	call	putchar@PLT
	addl	$1, -1024(%rbp)
.L23:
	movl	-1016(%rbp), %edx
	movl	%edx, %eax
	addl	%eax, %eax
	addl	%edx, %eax
	addl	%eax, %eax
	cmpl	%eax, -1024(%rbp)
	jl	.L24
	leaq	-1008(%rbp), %rsi
	movl	-1028(%rbp), %eax
	cltq
	movq	%rax, %rdx
	salq	$2, %rdx
	addq	%rax, %rdx
	leaq	(%rdx,%rdx), %rax
	movq	%rax, %rdx
	movl	-1012(%rbp), %eax
	movslq	%eax, %rcx
	movq	%rcx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rcx
	addq	%rcx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rsi, %rax
	movq	%rax, %rdi
	call	puts@PLT
	addl	$1, -1028(%rbp)
.L22:
	movl	-1028(%rbp), %eax
	cmpl	-1012(%rbp), %eax
	jl	.L25
.L11:
	movq	stdout(%rip), %rax
	movq	%rax, %rdi
	call	fflush@PLT
	movl	$0, %eax
.L26:
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L27
	call	__stack_chk_fail@PLT
.L27:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.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"
.LC1:
	.string	"-1"
.LC2:
	.string	"%s"
.LC3:
	.string	"......"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	.LC0(%rip), %rdi
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$1080, %rsp
	.cfi_def_cfa_offset 1136
	movq	%fs:40, %rax
	movq	%rax, 1064(%rsp)
	xorl	%eax, %eax
	leaq	60(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	60(%rsp), %esi
	cmpl	$2, %esi
	je	.L33
	leaq	64(%rsp), %rdi
	xorl	%eax, %eax
	movl	$125, %ecx
	movl	%esi, %edx
	movdqa	.LC4(%rip), %xmm0
	movq	%rdi, 32(%rsp)
	sarl	$31, %edx
	rep stosq
	movabsq	$12998843075395584, %rax
	movq	$25185, 496(%rsp)
	movups	%xmm0, 364(%rsp)
	movdqa	.LC5(%rip), %xmm0
	movq	%rax, 380(%rsp)
	movabsq	$7017279119882780672, %rax
	movaps	%xmm0, 464(%rsp)
	movdqa	.LC6(%rip), %xmm0
	movq	%rax, 712(%rsp)
	movslq	%esi, %rax
	movaps	%xmm0, 480(%rsp)
	movdqa	.LC7(%rip), %xmm0
	imulq	$1431655766, %rax, %rax
	movl	$3039842, 828(%rsp)
	movups	%xmm0, 564(%rsp)
	movdqa	.LC8(%rip), %xmm0
	shrq	$32, %rax
	movups	%xmm0, 580(%rsp)
	movdqa	.LC9(%rip), %xmm0
	subl	%edx, %eax
	leal	(%rax,%rax,2), %eax
	movups	%xmm0, 596(%rsp)
	movdqa	.LC10(%rip), %xmm0
	movups	%xmm0, 664(%rsp)
	movdqa	.LC11(%rip), %xmm0
	movups	%xmm0, 680(%rsp)
	movdqa	.LC12(%rip), %xmm0
	movups	%xmm0, 696(%rsp)
	movdqa	.LC13(%rip), %xmm0
	movups	%xmm0, 764(%rsp)
	movdqa	.LC14(%rip), %xmm0
	movups	%xmm0, 780(%rsp)
	movdqa	.LC15(%rip), %xmm0
	movups	%xmm0, 796(%rsp)
	movdqa	.LC16(%rip), %xmm0
	movups	%xmm0, 812(%rsp)
	movdqa	.LC17(%rip), %xmm0
	movaps	%xmm0, 864(%rsp)
	movdqa	.LC18(%rip), %xmm0
	movaps	%xmm0, 880(%rsp)
	movdqa	.LC19(%rip), %xmm0
	movaps	%xmm0, 896(%rsp)
	movdqa	.LC20(%rip), %xmm0
	movaps	%xmm0, 912(%rsp)
	movdqa	.LC21(%rip), %xmm0
	movaps	%xmm0, 928(%rsp)
	cmpl	%eax, %esi
	je	.L34
	subl	$4, %esi
	movl	$6, %ecx
	movl	%esi, %eax
	cltd
	idivl	%ecx
	movl	%edx, 44(%rsp)
	movl	%eax, %ebx
	leal	4(%rdx), %ebp
	cmpl	$5, %esi
	jle	.L11
	leaq	664(%rsp), %rax
	xorl	%r12d, %r12d
	leaq	.LC3(%rip), %r13
	movq	%rax, 24(%rsp)
	leaq	724(%rsp), %rax
	movq	%rax, 16(%rsp)
	.p2align 4,,10
	.p2align 3
.L10:
	leal	1(%r12), %eax
	movq	24(%rsp), %r14
	movl	%eax, 8(%rsp)
	.p2align 4,,10
	.p2align 3
.L19:
	xorl	%r15d, %r15d
	.p2align 4,,10
	.p2align 3
.L18:
	cmpl	%r15d, %r12d
	je	.L35
	movq	%r13, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	addl	$1, %r15d
	call	__printf_chk@PLT
	cmpl	%r15d, %ebx
	jg	.L18
.L14:
	testl	%ebp, %ebp
	jle	.L15
	xorl	%r15d, %r15d
	.p2align 4,,10
	.p2align 3
.L16:
	movl	$46, %edi
	addl	$1, %r15d
	call	putchar@PLT
	cmpl	%r15d, %ebp
	jne	.L16
.L15:
	movl	$10, %edi
	addq	$10, %r14
	call	putchar@PLT
	cmpq	16(%rsp), %r14
	jne	.L19
	movl	8(%rsp), %r12d
	cmpl	%r12d, %ebx
	jg	.L10
.L11:
	testl	%ebp, %ebp
	jle	.L6
	movslq	%ebp, %rax
	movq	32(%rsp), %r12
	imull	$6, %ebx, %ebx
	imulq	$100, %rax, %rax
	leaq	74(%rsp,%rax), %r13
	addq	%rax, %r12
	movl	44(%rsp), %eax
	addl	$3, %eax
	imulq	$10, %rax, %rax
	addq	%rax, %r13
	.p2align 4,,10
	.p2align 3
.L20:
	xorl	%ebp, %ebp
	testl	%ebx, %ebx
	jle	.L22
	.p2align 4,,10
	.p2align 3
.L21:
	movl	$46, %edi
	addl	$1, %ebp
	call	putchar@PLT
	cmpl	%ebx, %ebp
	jne	.L21
.L22:
	movq	%r12, %rdi
	addq	$10, %r12
	call	puts@PLT
	cmpq	%r13, %r12
	jne	.L20
.L6:
	movq	stdout(%rip), %rdi
	call	fflush@PLT
.L3:
	movq	1064(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L36
	addq	$1080, %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
.L34:
	.cfi_restore_state
	movl	%esi, %eax
	movl	$3, %ecx
	cltd
	idivl	%ecx
	movl	%eax, %ebp
	cmpl	$2, %esi
	jle	.L6
	leaq	364(%rsp), %rax
	xorl	%r14d, %r14d
	leaq	.LC2(%rip), %r12
	movq	%rax, 8(%rsp)
	leaq	394(%rsp), %r13
	.p2align 4,,10
	.p2align 3
.L5:
	movq	8(%rsp), %rbx
.L9:
	xorl	%r15d, %r15d
	.p2align 4,,10
	.p2align 3
.L7:
	movq	%rbx, %rdx
	movq	%r12, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	addl	$1, %r15d
	cmpl	%r15d, %ebp
	jg	.L7
	movl	$10, %edi
	addq	$10, %rbx
	call	putchar@PLT
	cmpq	%rbx, %r13
	jne	.L9
	addl	$1, %r14d
	cmpl	%r14d, %ebp
	jg	.L5
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L35:
	movq	%r14, %rdx
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movl	8(%rsp), %eax
	movl	%eax, %r15d
	cmpl	%eax, %ebx
	jg	.L18
	jmp	.L14
.L33:
	leaq	.LC1(%rip), %rdi
	call	puts@PLT
	movq	stdout(%rip), %rdi
	call	fflush@PLT
	jmp	.L3
.L36:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC4:
	.quad	6381870
	.quad	198346604544
	.align 16
.LC5:
	.quad	1667457633
	.quad	110382310031360
	.align 16
.LC6:
	.quad	7089056565310783488
	.quad	7233906901463859200
	.align 16
.LC7:
	.quad	426869154401
	.quad	27691617735475200
	.align 16
.LC8:
	.quad	3327704252503031808
	.quad	7017452644373364834
	.align 16
.LC9:
	.quad	6368814
	.quad	418279285346
	.align 16
.LC10:
	.quad	107070017921633
	.quad	3327704253281140736
	.align 16
.LC11:
	.quad	7017560817419681792
	.quad	7002534470607711790
	.align 16
.LC12:
	.quad	1650615137
	.quad	106851860360801
	.align 16
.LC13:
	.quad	27691617735500078
	.quad	3327704025647874048
	.align 16
.LC14:
	.quad	7002585464754405474
	.quad	7002534470614199854
	.align 16
.LC15:
	.quad	426835521121
	.quad	27635324451434081
	.align 16
.LC16:
	.quad	3327704025647874048
	.quad	7161676005495537762
	.align 16
.LC17:
	.quad	3327647951444206177
	.quad	3327707556983406592
	.align 16
.LC18:
	.quad	7089056565310795310
	.quad	7233906902238637614
	.align 16
.LC19:
	.quad	50775878165089
	.quad	7161676001975348782
	.align 16
.LC20:
	.quad	7088998064336011264
	.quad	3327647949776774244
	.align 16
.LC21:
	.quad	3327597176323924835
	.quad	108170435636782
	.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"
.LC1:
	.string	"-1"
.LC2:
	.string	"%s"
.LC3:
	.string	"......"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	.LC0(%rip), %rdi
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$1080, %rsp
	.cfi_def_cfa_offset 1136
	movq	%fs:40, %rax
	movq	%rax, 1064(%rsp)
	xorl	%eax, %eax
	leaq	60(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	60(%rsp), %esi
	cmpl	$2, %esi
	je	.L33
	leaq	64(%rsp), %rdi
	xorl	%eax, %eax
	movl	$125, %ecx
	movl	%esi, %edx
	movdqa	.LC4(%rip), %xmm0
	movq	%rdi, 32(%rsp)
	sarl	$31, %edx
	rep stosq
	movabsq	$12998843075395584, %rax
	movq	$25185, 496(%rsp)
	movups	%xmm0, 364(%rsp)
	movdqa	.LC5(%rip), %xmm0
	movq	%rax, 380(%rsp)
	movabsq	$7017279119882780672, %rax
	movaps	%xmm0, 464(%rsp)
	movdqa	.LC6(%rip), %xmm0
	movq	%rax, 712(%rsp)
	movslq	%esi, %rax
	movaps	%xmm0, 480(%rsp)
	movdqa	.LC7(%rip), %xmm0
	imulq	$1431655766, %rax, %rax
	movl	$3039842, 828(%rsp)
	movups	%xmm0, 564(%rsp)
	movdqa	.LC8(%rip), %xmm0
	shrq	$32, %rax
	movups	%xmm0, 580(%rsp)
	movdqa	.LC9(%rip), %xmm0
	subl	%edx, %eax
	leal	(%rax,%rax,2), %eax
	movups	%xmm0, 596(%rsp)
	movdqa	.LC10(%rip), %xmm0
	movups	%xmm0, 664(%rsp)
	movdqa	.LC11(%rip), %xmm0
	movups	%xmm0, 680(%rsp)
	movdqa	.LC12(%rip), %xmm0
	movups	%xmm0, 696(%rsp)
	movdqa	.LC13(%rip), %xmm0
	movups	%xmm0, 764(%rsp)
	movdqa	.LC14(%rip), %xmm0
	movups	%xmm0, 780(%rsp)
	movdqa	.LC15(%rip), %xmm0
	movups	%xmm0, 796(%rsp)
	movdqa	.LC16(%rip), %xmm0
	movups	%xmm0, 812(%rsp)
	movdqa	.LC17(%rip), %xmm0
	movaps	%xmm0, 864(%rsp)
	movdqa	.LC18(%rip), %xmm0
	movaps	%xmm0, 880(%rsp)
	movdqa	.LC19(%rip), %xmm0
	movaps	%xmm0, 896(%rsp)
	movdqa	.LC20(%rip), %xmm0
	movaps	%xmm0, 912(%rsp)
	movdqa	.LC21(%rip), %xmm0
	movaps	%xmm0, 928(%rsp)
	cmpl	%eax, %esi
	je	.L34
	subl	$4, %esi
	movl	$6, %ecx
	movl	%esi, %eax
	cltd
	idivl	%ecx
	movl	%edx, 44(%rsp)
	movl	%eax, %ebx
	leal	4(%rdx), %ebp
	cmpl	$5, %esi
	jle	.L11
	leaq	664(%rsp), %rax
	xorl	%r12d, %r12d
	leaq	.LC3(%rip), %r13
	movq	%rax, 24(%rsp)
	leaq	724(%rsp), %rax
	movq	%rax, 16(%rsp)
	.p2align 4,,10
	.p2align 3
.L10:
	leal	1(%r12), %eax
	movq	24(%rsp), %r14
	movl	%eax, 8(%rsp)
	.p2align 4,,10
	.p2align 3
.L19:
	xorl	%r15d, %r15d
	.p2align 4,,10
	.p2align 3
.L18:
	cmpl	%r15d, %r12d
	je	.L35
	movq	%r13, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	addl	$1, %r15d
	call	__printf_chk@PLT
	cmpl	%r15d, %ebx
	jg	.L18
.L14:
	testl	%ebp, %ebp
	jle	.L15
	xorl	%r15d, %r15d
	.p2align 4,,10
	.p2align 3
.L16:
	movl	$46, %edi
	addl	$1, %r15d
	call	putchar@PLT
	cmpl	%r15d, %ebp
	jne	.L16
.L15:
	movl	$10, %edi
	addq	$10, %r14
	call	putchar@PLT
	cmpq	16(%rsp), %r14
	jne	.L19
	movl	8(%rsp), %r12d
	cmpl	%r12d, %ebx
	jg	.L10
.L11:
	testl	%ebp, %ebp
	jle	.L6
	movslq	%ebp, %rax
	movq	32(%rsp), %r12
	imull	$6, %ebx, %ebx
	imulq	$100, %rax, %rax
	leaq	74(%rsp,%rax), %r13
	addq	%rax, %r12
	movl	44(%rsp), %eax
	addl	$3, %eax
	imulq	$10, %rax, %rax
	addq	%rax, %r13
	.p2align 4,,10
	.p2align 3
.L20:
	xorl	%ebp, %ebp
	testl	%ebx, %ebx
	jle	.L22
	.p2align 4,,10
	.p2align 3
.L21:
	movl	$46, %edi
	addl	$1, %ebp
	call	putchar@PLT
	cmpl	%ebx, %ebp
	jne	.L21
.L22:
	movq	%r12, %rdi
	addq	$10, %r12
	call	puts@PLT
	cmpq	%r13, %r12
	jne	.L20
.L6:
	movq	stdout(%rip), %rdi
	call	fflush@PLT
.L3:
	movq	1064(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L36
	addq	$1080, %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
.L34:
	.cfi_restore_state
	movl	%esi, %eax
	movl	$3, %ecx
	cltd
	idivl	%ecx
	movl	%eax, %ebp
	cmpl	$2, %esi
	jle	.L6
	leaq	364(%rsp), %rax
	xorl	%r14d, %r14d
	leaq	.LC2(%rip), %r12
	movq	%rax, 8(%rsp)
	leaq	394(%rsp), %r13
	.p2align 4,,10
	.p2align 3
.L5:
	movq	8(%rsp), %rbx
.L9:
	xorl	%r15d, %r15d
	.p2align 4,,10
	.p2align 3
.L7:
	movq	%rbx, %rdx
	movq	%r12, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	addl	$1, %r15d
	cmpl	%r15d, %ebp
	jg	.L7
	movl	$10, %edi
	addq	$10, %rbx
	call	putchar@PLT
	cmpq	%rbx, %r13
	jne	.L9
	addl	$1, %r14d
	cmpl	%r14d, %ebp
	jg	.L5
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L35:
	movq	%r14, %rdx
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movl	8(%rsp), %eax
	movl	%eax, %r15d
	cmpl	%eax, %ebx
	jg	.L18
	jmp	.L14
.L33:
	leaq	.LC1(%rip), %rdi
	call	puts@PLT
	movq	stdout(%rip), %rdi
	call	fflush@PLT
	jmp	.L3
.L36:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC4:
	.quad	6381870
	.quad	198346604544
	.align 16
.LC5:
	.quad	1667457633
	.quad	110382310031360
	.align 16
.LC6:
	.quad	7089056565310783488
	.quad	7233906901463859200
	.align 16
.LC7:
	.quad	426869154401
	.quad	27691617735475200
	.align 16
.LC8:
	.quad	3327704252503031808
	.quad	7017452644373364834
	.align 16
.LC9:
	.quad	6368814
	.quad	418279285346
	.align 16
.LC10:
	.quad	107070017921633
	.quad	3327704253281140736
	.align 16
.LC11:
	.quad	7017560817419681792
	.quad	7002534470607711790
	.align 16
.LC12:
	.quad	1650615137
	.quad	106851860360801
	.align 16
.LC13:
	.quad	27691617735500078
	.quad	3327704025647874048
	.align 16
.LC14:
	.quad	7002585464754405474
	.quad	7002534470614199854
	.align 16
.LC15:
	.quad	426835521121
	.quad	27635324451434081
	.align 16
.LC16:
	.quad	3327704025647874048
	.quad	7161676005495537762
	.align 16
.LC17:
	.quad	3327647951444206177
	.quad	3327707556983406592
	.align 16
.LC18:
	.quad	7089056565310795310
	.quad	7233906902238637614
	.align 16
.LC19:
	.quad	50775878165089
	.quad	7161676001975348782
	.align 16
.LC20:
	.quad	7088998064336011264
	.quad	3327647949776774244
	.align 16
.LC21:
	.quad	3327597176323924835
	.quad	108170435636782
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:

#include <stdio.h>

int main()
{
	int N;
	scanf("%d", &N);
	if (N == 2) {
		printf("-1\n");
		fflush(stdout);
		return 0;
	}
	
	int i, j, k, l, r;
	char ans[10][10][10] = {{}, {}, {},
		{".aa", "a..", "a.."},
		{"abcc", "abdd", "ccab", "ddab"},
		{"abbcc", "a.aab", "ca..b", "ca..a", "bbcca"},
		{"abb.aa", "a.ca..", "bbca..", ".aacbb", "a..c.a", "a..bba"},
		{".aa.aab", "a..a..b", "a..a..c", ".aa.aac", "a..a..b", "a..a..b", "bbccbb."},
		{"abcc....", "abdd....", "ccab....", "ddab....", "....abcc", "....abdd", "....ccab", "....ddab"}
	};
	if (N % 3 == 0) {
		k = N / 3;
		for (l = 0; l < k; l++) {
			for (i = 0; i < 3; i++) {
				for (j = 0; j < k; j++) printf("%s", ans[3][i]);
				printf("\n");
			}
		}
	} else {
		k = (N - 4) / 6;
		r = (N - 4) % 6 + 4;
		for (l = 0; l < k; l++) {
			for (i = 0; i < 6; i++) {
				for (j = 0; j < k; j++) {
					if (j == l) printf("%s", ans[6][i]);
					else printf("......");
				}
				for (j = 0; j < r; j++) printf(".");
				printf("\n");
			}
		}
		for (i = 0; i < r; i++) {
			for (j = 0; j < k * 6; j++) printf(".");
			printf("%s\n", ans[r][i]);
		}
	}	
	fflush(stdout);
	return 0;
}
0
 3
 5
 4
 10
 13
 14
 11
 15
 7

.aa
a..
a..
 abbcc
a.aab
ca..b
ca..a
bbcca
 abcc
abdd
ccab
ddab
 abb.aa....
a.ca......
bbca......
.aacbb....
a..c.a....
a..bba....
......abcc
......abdd
......ccab
......ddab
 abb.aa.......
a.ca.........
bbca.........
.aacbb.......
a..c.a.......
a..bba.......
.......aa.aab
......a..a..b
......a..a..c
.......aa.aac
......a..a..b
......a..a..b
......bbccbb.
 abb.aa........
a.ca..........
bbca..........
.aacbb........
a..c.a........
a..bba........
......abcc....
......abdd....
......ccab....
......ddab....
..........abcc
..........abdd
..........ccab
..........ddab
 abb.aa.....
a.ca.......
bbca.......
.aacbb.....
a..c.a.....
a..bba.....
......abbcc
......a.aab
......ca..b
......ca..a
......bbcca
 .aa.aa.aa.aa.aa
a..a..a..a..a..
a..a..a..a..a..
.aa.aa.aa.aa.aa
a..a..a..a..a..
a..a..a..a..a..
.aa.aa.aa.aa.aa
a..a..a..a..a..
a..a..a..a..a..
.aa.aa.aa.aa.aa
a..a..a..a..a..
a..a..a..a..a..
.aa.aa.aa.aa.aa
a..a..a..a..a..
a..a..a..a..a..
 .aa.aab
a..a..b
a..a..c
.aa.aac
a..a..b
a..a..b
bbccbb.

Given the following C code and unoptimized assembly code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include <stdio.h>

int main()
{
	int N;
	scanf("%d", &N);
	if (N == 2) {
		printf("-1\n");
		fflush(stdout);
		return 0;
	}
	
	int i, j, k, l, r;
	char ans[10][10][10] = {{}, {}, {},
		{".aa", "a..", "a.."},
		{"abcc", "abdd", "ccab", "ddab"},
		{"abbcc", "a.aab", "ca..b", "ca..a", "bbcca"},
		{"abb.aa", "a.ca..", "bbca..", ".aacbb", "a..c.a", "a..bba"},
		{".aa.aab", "a..a..b", "a..a..c", ".aa.aac", "a..a..b", "a..a..b", "bbccbb."},
		{"abcc....", "abdd....", "ccab....", "ddab....", "....abcc", "....abdd", "....ccab", "....ddab"}
	};
	if (N % 3 == 0) {
		k = N / 3;
		for (l = 0; l < k; l++) {
			for (i = 0; i < 3; i++) {
				for (j = 0; j < k; j++) printf("%s", ans[3][i]);
				printf("\n");
			}
		}
	} else {
		k = (N - 4) / 6;
		r = (N - 4) % 6 + 4;
		for (l = 0; l < k; l++) {
			for (i = 0; i < 6; i++) {
				for (j = 0; j < k; j++) {
					if (j == l) printf("%s", ans[6][i]);
					else printf("......");
				}
				for (j = 0; j < r; j++) printf(".");
				printf("\n");
			}
		}
		for (i = 0; i < r; i++) {
			for (j = 0; j < k * 6; j++) printf(".");
			printf("%s\n", ans[r][i]);
		}
	}	
	fflush(stdout);
	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"-1"
.LC2:
	.string	"%s"
.LC3:
	.string	"......"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$1040, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-1032(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-1032(%rbp), %eax
	cmpl	$2, %eax
	jne	.L2
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movq	stdout(%rip), %rax
	movq	%rax, %rdi
	call	fflush@PLT
	movl	$0, %eax
	jmp	.L26
.L2:
	leaq	-1008(%rbp), %rdx
	movl	$0, %eax
	movl	$125, %ecx
	movq	%rdx, %rdi
	rep stosq
	movq	$6381870, -708(%rbp)
	movw	$0, -700(%rbp)
	movq	$3026529, -698(%rbp)
	movw	$0, -690(%rbp)
	movq	$3026529, -688(%rbp)
	movw	$0, -680(%rbp)
	movq	$1667457633, -608(%rbp)
	movw	$0, -600(%rbp)
	movq	$1684300385, -598(%rbp)
	movw	$0, -590(%rbp)
	movq	$1650549603, -588(%rbp)
	movw	$0, -580(%rbp)
	movq	$1650549860, -578(%rbp)
	movw	$0, -570(%rbp)
	movabsq	$426869154401, %rax
	movq	%rax, -508(%rbp)
	movw	$0, -500(%rbp)
	movabsq	$422540553825, %rax
	movq	%rax, -498(%rbp)
	movw	$0, -490(%rbp)
	movabsq	$421681586531, %rax
	movq	%rax, -488(%rbp)
	movw	$0, -480(%rbp)
	movabsq	$417386619235, %rax
	movq	%rax, -478(%rbp)
	movw	$0, -470(%rbp)
	movabsq	$418279285346, %rax
	movq	%rax, -468(%rbp)
	movw	$0, -460(%rbp)
	movabsq	$107070017921633, %rax
	movq	%rax, -408(%rbp)
	movw	$0, -400(%rbp)
	movabsq	$50776737263201, %rax
	movq	%rax, -398(%rbp)
	movw	$0, -390(%rbp)
	movabsq	$50776737276514, %rax
	movq	%rax, -388(%rbp)
	movw	$0, -380(%rbp)
	movabsq	$108174713643310, %rax
	movq	%rax, -378(%rbp)
	movw	$0, -370(%rbp)
	movabsq	$106851860360801, %rax
	movq	%rax, -368(%rbp)
	movw	$0, -360(%rbp)
	movabsq	$107075181882977, %rax
	movq	%rax, -358(%rbp)
	movw	$0, -350(%rbp)
	movabsq	$27691617735500078, %rax
	movq	%rax, -308(%rbp)
	movw	$0, -300(%rbp)
	movabsq	$27635324451434081, %rax
	movq	%rax, -298(%rbp)
	movw	$0, -290(%rbp)
	movabsq	$27916799428144737, %rsi
	movq	%rsi, -288(%rbp)
	movw	$0, -280(%rbp)
	movabsq	$27973092712210734, %rsi
	movq	%rsi, -278(%rbp)
	movw	$0, -270(%rbp)
	movq	%rax, -268(%rbp)
	movw	$0, -260(%rbp)
	movq	%rax, -258(%rbp)
	movw	$0, -250(%rbp)
	movabsq	$13056023642464866, %rax
	movq	%rax, -248(%rbp)
	movw	$0, -240(%rbp)
	movabsq	$3327647951444206177, %rax
	movq	%rax, -208(%rbp)
	movw	$0, -200(%rbp)
	movabsq	$3327647951461048929, %rax
	movq	%rax, -198(%rbp)
	movw	$0, -190(%rbp)
	movabsq	$3327647951427298147, %rax
	movq	%rax, -188(%rbp)
	movw	$0, -180(%rbp)
	movabsq	$3327647951427298404, %rax
	movq	%rax, -178(%rbp)
	movw	$0, -170(%rbp)
	movabsq	$7161676001975348782, %rax
	movq	%rax, -168(%rbp)
	movw	$0, -160(%rbp)
	movabsq	$7234015070989987374, %rax
	movq	%rax, -158(%rbp)
	movw	$0, -150(%rbp)
	movabsq	$7089056566085561902, %rax
	movq	%rax, -148(%rbp)
	movw	$0, -140(%rbp)
	movabsq	$7089057669892156974, %rax
	movq	%rax, -138(%rbp)
	movw	$0, -130(%rbp)
	movl	-1032(%rbp), %edx
	movslq	%edx, %rax
	imulq	$1431655766, %rax, %rax
	shrq	$32, %rax
	movl	%edx, %ecx
	sarl	$31, %ecx
	subl	%ecx, %eax
	movl	%eax, %ecx
	addl	%ecx, %ecx
	addl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	testl	%eax, %eax
	jne	.L4
	movl	-1032(%rbp), %eax
	movslq	%eax, %rdx
	imulq	$1431655766, %rdx, %rdx
	shrq	$32, %rdx
	sarl	$31, %eax
	movl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	movl	%eax, -1016(%rbp)
	movl	$0, -1020(%rbp)
	jmp	.L5
.L10:
	movl	$0, -1028(%rbp)
	jmp	.L6
.L9:
	movl	$0, -1024(%rbp)
	jmp	.L7
.L8:
	leaq	-1008(%rbp), %rcx
	movl	-1028(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	$300, %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -1024(%rbp)
.L7:
	movl	-1024(%rbp), %eax
	cmpl	-1016(%rbp), %eax
	jl	.L8
	movl	$10, %edi
	call	putchar@PLT
	addl	$1, -1028(%rbp)
.L6:
	cmpl	$2, -1028(%rbp)
	jle	.L9
	addl	$1, -1020(%rbp)
.L5:
	movl	-1020(%rbp), %eax
	cmpl	-1016(%rbp), %eax
	jl	.L10
	jmp	.L11
.L4:
	movl	-1032(%rbp), %eax
	subl	$4, %eax
	movslq	%eax, %rdx
	imulq	$715827883, %rdx, %rdx
	shrq	$32, %rdx
	sarl	$31, %eax
	movl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	movl	%eax, -1016(%rbp)
	movl	-1032(%rbp), %eax
	leal	-4(%rax), %ecx
	movslq	%ecx, %rax
	imulq	$715827883, %rax, %rax
	shrq	$32, %rax
	movl	%ecx, %esi
	sarl	$31, %esi
	movl	%eax, %edx
	subl	%esi, %edx
	movl	%edx, %eax
	addl	%eax, %eax
	addl	%edx, %eax
	addl	%eax, %eax
	subl	%eax, %ecx
	movl	%ecx, %edx
	leal	4(%rdx), %eax
	movl	%eax, -1012(%rbp)
	movl	$0, -1020(%rbp)
	jmp	.L12
.L21:
	movl	$0, -1028(%rbp)
	jmp	.L13
.L20:
	movl	$0, -1024(%rbp)
	jmp	.L14
.L17:
	movl	-1024(%rbp), %eax
	cmpl	-1020(%rbp), %eax
	jne	.L15
	leaq	-1008(%rbp), %rcx
	movl	-1028(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	$600, %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L16
.L15:
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L16:
	addl	$1, -1024(%rbp)
.L14:
	movl	-1024(%rbp), %eax
	cmpl	-1016(%rbp), %eax
	jl	.L17
	movl	$0, -1024(%rbp)
	jmp	.L18
.L19:
	movl	$46, %edi
	call	putchar@PLT
	addl	$1, -1024(%rbp)
.L18:
	movl	-1024(%rbp), %eax
	cmpl	-1012(%rbp), %eax
	jl	.L19
	movl	$10, %edi
	call	putchar@PLT
	addl	$1, -1028(%rbp)
.L13:
	cmpl	$5, -1028(%rbp)
	jle	.L20
	addl	$1, -1020(%rbp)
.L12:
	movl	-1020(%rbp), %eax
	cmpl	-1016(%rbp), %eax
	jl	.L21
	movl	$0, -1028(%rbp)
	jmp	.L22
.L25:
	movl	$0, -1024(%rbp)
	jmp	.L23
.L24:
	movl	$46, %edi
	call	putchar@PLT
	addl	$1, -1024(%rbp)
.L23:
	movl	-1016(%rbp), %edx
	movl	%edx, %eax
	addl	%eax, %eax
	addl	%edx, %eax
	addl	%eax, %eax
	cmpl	%eax, -1024(%rbp)
	jl	.L24
	leaq	-1008(%rbp), %rsi
	movl	-1028(%rbp), %eax
	cltq
	movq	%rax, %rdx
	salq	$2, %rdx
	addq	%rax, %rdx
	leaq	(%rdx,%rdx), %rax
	movq	%rax, %rdx
	movl	-1012(%rbp), %eax
	movslq	%eax, %rcx
	movq	%rcx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rcx
	addq	%rcx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rsi, %rax
	movq	%rax, %rdi
	call	puts@PLT
	addl	$1, -1028(%rbp)
.L22:
	movl	-1028(%rbp), %eax
	cmpl	-1012(%rbp), %eax
	jl	.L25
.L11:
	movq	stdout(%rip), %rax
	movq	%rax, %rdi
	call	fflush@PLT
	movl	$0, %eax
.L26:
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L27
	call	__stack_chk_fail@PLT
.L27:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.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
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"-1"
.LC2:
	.string	"%s"
.LC3:
	.string	"......"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$1040, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-1032(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-1032(%rbp), %eax
	cmpl	$2, %eax
	jne	.L2
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movq	stdout(%rip), %rax
	movq	%rax, %rdi
	call	fflush@PLT
	movl	$0, %eax
	jmp	.L26
.L2:
	leaq	-1008(%rbp), %rdx
	movl	$0, %eax
	movl	$125, %ecx
	movq	%rdx, %rdi
	rep stosq
	movq	$6381870, -708(%rbp)
	movw	$0, -700(%rbp)
	movq	$3026529, -698(%rbp)
	movw	$0, -690(%rbp)
	movq	$3026529, -688(%rbp)
	movw	$0, -680(%rbp)
	movq	$1667457633, -608(%rbp)
	movw	$0, -600(%rbp)
	movq	$1684300385, -598(%rbp)
	movw	$0, -590(%rbp)
	movq	$1650549603, -588(%rbp)
	movw	$0, -580(%rbp)
	movq	$1650549860, -578(%rbp)
	movw	$0, -570(%rbp)
	movabsq	$426869154401, %rax
	movq	%rax, -508(%rbp)
	movw	$0, -500(%rbp)
	movabsq	$422540553825, %rax
	movq	%rax, -498(%rbp)
	movw	$0, -490(%rbp)
	movabsq	$421681586531, %rax
	movq	%rax, -488(%rbp)
	movw	$0, -480(%rbp)
	movabsq	$417386619235, %rax
	movq	%rax, -478(%rbp)
	movw	$0, -470(%rbp)
	movabsq	$418279285346, %rax
	movq	%rax, -468(%rbp)
	movw	$0, -460(%rbp)
	movabsq	$107070017921633, %rax
	movq	%rax, -408(%rbp)
	movw	$0, -400(%rbp)
	movabsq	$50776737263201, %rax
	movq	%rax, -398(%rbp)
	movw	$0, -390(%rbp)
	movabsq	$50776737276514, %rax
	movq	%rax, -388(%rbp)
	movw	$0, -380(%rbp)
	movabsq	$108174713643310, %rax
	movq	%rax, -378(%rbp)
	movw	$0, -370(%rbp)
	movabsq	$106851860360801, %rax
	movq	%rax, -368(%rbp)
	movw	$0, -360(%rbp)
	movabsq	$107075181882977, %rax
	movq	%rax, -358(%rbp)
	movw	$0, -350(%rbp)
	movabsq	$27691617735500078, %rax
	movq	%rax, -308(%rbp)
	movw	$0, -300(%rbp)
	movabsq	$27635324451434081, %rax
	movq	%rax, -298(%rbp)
	movw	$0, -290(%rbp)
	movabsq	$27916799428144737, %rsi
	movq	%rsi, -288(%rbp)
	movw	$0, -280(%rbp)
	movabsq	$27973092712210734, %rsi
	movq	%rsi, -278(%rbp)
	movw	$0, -270(%rbp)
	movq	%rax, -268(%rbp)
	movw	$0, -260(%rbp)
	movq	%rax, -258(%rbp)
	movw	$0, -250(%rbp)
	movabsq	$13056023642464866, %rax
	movq	%rax, -248(%rbp)
	movw	$0, -240(%rbp)
	movabsq	$3327647951444206177, %rax
	movq	%rax, -208(%rbp)
	movw	$0, -200(%rbp)
	movabsq	$3327647951461048929, %rax
	movq	%rax, -198(%rbp)
	movw	$0, -190(%rbp)
	movabsq	$3327647951427298147, %rax
	movq	%rax, -188(%rbp)
	movw	$0, -180(%rbp)
	movabsq	$3327647951427298404, %rax
	movq	%rax, -178(%rbp)
	movw	$0, -170(%rbp)
	movabsq	$7161676001975348782, %rax
	movq	%rax, -168(%rbp)
	movw	$0, -160(%rbp)
	movabsq	$7234015070989987374, %rax
	movq	%rax, -158(%rbp)
	movw	$0, -150(%rbp)
	movabsq	$7089056566085561902, %rax
	movq	%rax, -148(%rbp)
	movw	$0, -140(%rbp)
	movabsq	$7089057669892156974, %rax
	movq	%rax, -138(%rbp)
	movw	$0, -130(%rbp)
	movl	-1032(%rbp), %edx
	movslq	%edx, %rax
	imulq	$1431655766, %rax, %rax
	shrq	$32, %rax
	movl	%edx, %ecx
	sarl	$31, %ecx
	subl	%ecx, %eax
	movl	%eax, %ecx
	addl	%ecx, %ecx
	addl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	testl	%eax, %eax
	jne	.L4
	movl	-1032(%rbp), %eax
	movslq	%eax, %rdx
	imulq	$1431655766, %rdx, %rdx
	shrq	$32, %rdx
	sarl	$31, %eax
	movl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	movl	%eax, -1016(%rbp)
	movl	$0, -1020(%rbp)
	jmp	.L5
.L10:
	movl	$0, -1028(%rbp)
	jmp	.L6
.L9:
	movl	$0, -1024(%rbp)
	jmp	.L7
.L8:
	leaq	-1008(%rbp), %rcx
	movl	-1028(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	$300, %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -1024(%rbp)
.L7:
	movl	-1024(%rbp), %eax
	cmpl	-1016(%rbp), %eax
	jl	.L8
	movl	$10, %edi
	call	putchar@PLT
	addl	$1, -1028(%rbp)
.L6:
	cmpl	$2, -1028(%rbp)
	jle	.L9
	addl	$1, -1020(%rbp)
.L5:
	movl	-1020(%rbp), %eax
	cmpl	-1016(%rbp), %eax
	jl	.L10
	jmp	.L11
.L4:
	movl	-1032(%rbp), %eax
	subl	$4, %eax
	movslq	%eax, %rdx
	imulq	$715827883, %rdx, %rdx
	shrq	$32, %rdx
	sarl	$31, %eax
	movl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	movl	%eax, -1016(%rbp)
	movl	-1032(%rbp), %eax
	leal	-4(%rax), %ecx
	movslq	%ecx, %rax
	imulq	$715827883, %rax, %rax
	shrq	$32, %rax
	movl	%ecx, %esi
	sarl	$31, %esi
	movl	%eax, %edx
	subl	%esi, %edx
	movl	%edx, %eax
	addl	%eax, %eax
	addl	%edx, %eax
	addl	%eax, %eax
	subl	%eax, %ecx
	movl	%ecx, %edx
	leal	4(%rdx), %eax
	movl	%eax, -1012(%rbp)
	movl	$0, -1020(%rbp)
	jmp	.L12
.L21:
	movl	$0, -1028(%rbp)
	jmp	.L13
.L20:
	movl	$0, -1024(%rbp)
	jmp	.L14
.L17:
	movl	-1024(%rbp), %eax
	cmpl	-1020(%rbp), %eax
	jne	.L15
	leaq	-1008(%rbp), %rcx
	movl	-1028(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rax, %rax
	addq	$600, %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L16
.L15:
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
.L16:
	addl	$1, -1024(%rbp)
.L14:
	movl	-1024(%rbp), %eax
	cmpl	-1016(%rbp), %eax
	jl	.L17
	movl	$0, -1024(%rbp)
	jmp	.L18
.L19:
	movl	$46, %edi
	call	putchar@PLT
	addl	$1, -1024(%rbp)
.L18:
	movl	-1024(%rbp), %eax
	cmpl	-1012(%rbp), %eax
	jl	.L19
	movl	$10, %edi
	call	putchar@PLT
	addl	$1, -1028(%rbp)
.L13:
	cmpl	$5, -1028(%rbp)
	jle	.L20
	addl	$1, -1020(%rbp)
.L12:
	movl	-1020(%rbp), %eax
	cmpl	-1016(%rbp), %eax
	jl	.L21
	movl	$0, -1028(%rbp)
	jmp	.L22
.L25:
	movl	$0, -1024(%rbp)
	jmp	.L23
.L24:
	movl	$46, %edi
	call	putchar@PLT
	addl	$1, -1024(%rbp)
.L23:
	movl	-1016(%rbp), %edx
	movl	%edx, %eax
	addl	%eax, %eax
	addl	%edx, %eax
	addl	%eax, %eax
	cmpl	%eax, -1024(%rbp)
	jl	.L24
	leaq	-1008(%rbp), %rsi
	movl	-1028(%rbp), %eax
	cltq
	movq	%rax, %rdx
	salq	$2, %rdx
	addq	%rax, %rdx
	leaq	(%rdx,%rdx), %rax
	movq	%rax, %rdx
	movl	-1012(%rbp), %eax
	movslq	%eax, %rcx
	movq	%rcx, %rax
	salq	$2, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rcx
	addq	%rcx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	addq	%rsi, %rax
	movq	%rax, %rdi
	call	puts@PLT
	addl	$1, -1028(%rbp)
.L22:
	movl	-1028(%rbp), %eax
	cmpl	-1012(%rbp), %eax
	jl	.L25
.L11:
	movq	stdout(%rip), %rax
	movq	%rax, %rdi
	call	fflush@PLT
	movl	$0, %eax
.L26:
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L27
	call	__stack_chk_fail@PLT
.L27:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.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:
