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(void) {
	int H, W;
	char S[64][64] = {{0}};
	int i, j, k, l;
	if (scanf("%d%d", &H, &W) != 2) return 1;
	for (i = 1; i <= H; i++) {
		if (scanf("%62s", S[i] + 1) != 1) return 1;
	}
	for (i = 1; i <= H; i++) {
		for (j = 1; j <= W; j++) {
			if (S[i][j] == '.') {
				int count = 0;
				for (k = -1; k <= 1; k++) {
					for (l = -1; l <= 1; l++) {
						if (S[i + k][j + l] == '#') count++;
					}
				}
				S[i][j] = count + '0';
			}
		}
	}
	for (i = 1; i <= H; i++) {
		puts(S[i] + 1);
	}
	return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%62s"
	.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	$4096, %rsp
	orq	$0, (%rsp)
	subq	$48, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-4112(%rbp), %rdx
	movl	$0, %eax
	movl	$512, %ecx
	movq	%rdx, %rdi
	rep stosq
	leaq	-4136(%rbp), %rdx
	leaq	-4140(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	cmpl	$2, %eax
	je	.L2
	movl	$1, %eax
	jmp	.L19
.L2:
	movl	$1, -4132(%rbp)
	jmp	.L4
.L6:
	leaq	-4112(%rbp), %rdx
	movl	-4132(%rbp), %eax
	cltq
	salq	$6, %rax
	addq	%rdx, %rax
	addq	$1, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	cmpl	$1, %eax
	je	.L5
	movl	$1, %eax
	jmp	.L19
.L5:
	addl	$1, -4132(%rbp)
.L4:
	movl	-4140(%rbp), %eax
	cmpl	%eax, -4132(%rbp)
	jle	.L6
	movl	$1, -4132(%rbp)
	jmp	.L7
.L16:
	movl	$1, -4128(%rbp)
	jmp	.L8
.L15:
	movl	-4128(%rbp), %eax
	movslq	%eax, %rdx
	movl	-4132(%rbp), %eax
	cltq
	salq	$6, %rax
	addq	%rbp, %rax
	addq	%rdx, %rax
	subq	$4112, %rax
	movzbl	(%rax), %eax
	cmpb	$46, %al
	jne	.L9
	movl	$0, -4116(%rbp)
	movl	$-1, -4124(%rbp)
	jmp	.L10
.L14:
	movl	$-1, -4120(%rbp)
	jmp	.L11
.L13:
	movl	-4132(%rbp), %edx
	movl	-4124(%rbp), %eax
	addl	%edx, %eax
	movl	-4128(%rbp), %ecx
	movl	-4120(%rbp), %edx
	addl	%ecx, %edx
	movslq	%edx, %rdx
	cltq
	salq	$6, %rax
	addq	%rbp, %rax
	addq	%rdx, %rax
	subq	$4112, %rax
	movzbl	(%rax), %eax
	cmpb	$35, %al
	jne	.L12
	addl	$1, -4116(%rbp)
.L12:
	addl	$1, -4120(%rbp)
.L11:
	cmpl	$1, -4120(%rbp)
	jle	.L13
	addl	$1, -4124(%rbp)
.L10:
	cmpl	$1, -4124(%rbp)
	jle	.L14
	movl	-4116(%rbp), %eax
	addl	$48, %eax
	movl	%eax, %edx
	movl	-4128(%rbp), %eax
	movslq	%eax, %rcx
	movl	-4132(%rbp), %eax
	cltq
	salq	$6, %rax
	addq	%rbp, %rax
	addq	%rcx, %rax
	subq	$4112, %rax
	movb	%dl, (%rax)
.L9:
	addl	$1, -4128(%rbp)
.L8:
	movl	-4136(%rbp), %eax
	cmpl	%eax, -4128(%rbp)
	jle	.L15
	addl	$1, -4132(%rbp)
.L7:
	movl	-4140(%rbp), %eax
	cmpl	%eax, -4132(%rbp)
	jle	.L16
	movl	$1, -4132(%rbp)
	jmp	.L17
.L18:
	leaq	-4112(%rbp), %rdx
	movl	-4132(%rbp), %eax
	cltq
	salq	$6, %rax
	addq	%rdx, %rax
	addq	$1, %rax
	movq	%rax, %rdi
	call	puts@PLT
	addl	$1, -4132(%rbp)
.L17:
	movl	-4140(%rbp), %eax
	cmpl	%eax, -4132(%rbp)
	jle	.L18
	movl	$0, %eax
.L19:
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L20
	call	__stack_chk_fail@PLT
.L20:
	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%d"
.LC1:
	.string	"%62s"
	.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
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$4096, %rsp
	.cfi_def_cfa_offset 4152
	orq	$0, (%rsp)
	subq	$40, %rsp
	.cfi_def_cfa_offset 4192
	movl	$512, %ecx
	movq	%fs:40, %rax
	movq	%rax, 4120(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %r13
	leaq	12(%rsp), %rdx
	movq	%r13, %rdi
	leaq	8(%rsp), %rsi
	rep stosq
	leaq	.LC0(%rip), %rdi
	call	__isoc99_scanf@PLT
	cmpl	$2, %eax
	jne	.L5
	cmpl	$0, 8(%rsp)
	jle	.L18
	leaq	81(%rsp), %rbp
	movl	$1, %r14d
	leaq	.LC1(%rip), %r15
	movq	%rbp, %r12
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L29:
	movl	8(%rsp), %eax
	addl	$1, %r14d
	addq	$64, %r12
	cmpl	%r14d, %eax
	jl	.L28
.L6:
	movq	%r12, %rsi
	movq	%r15, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	%eax, %ebx
	cmpl	$1, %eax
	je	.L29
.L5:
	movl	$1, %eax
.L1:
	movq	4120(%rsp), %rdx
	subq	%fs:40, %rdx
	jne	.L30
	addq	$4136, %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
	.p2align 4,,10
	.p2align 3
.L31:
	.cfi_restore_state
	subq	$64, %r9
	addq	$64, %rsi
	addq	$64, %rdi
	cmpq	%r11, %r9
	jne	.L8
	.p2align 4,,10
	.p2align 3
.L17:
	movq	%rbp, %rdi
	addl	$1, %ebx
	addq	$64, %rbp
	call	puts@PLT
	cmpl	%ebx, 8(%rsp)
	jge	.L17
.L18:
	xorl	%eax, %eax
	jmp	.L1
.L28:
	testl	%eax, %eax
	jle	.L18
	movl	12(%rsp), %edx
	testl	%edx, %edx
	jle	.L17
	leal	-1(%rax), %r11d
	leal	-1(%rdx), %esi
	movl	$128, %edi
	movq	$-64, %r9
	imulq	$-64, %r11, %r11
	addq	%rbp, %rsi
	leaq	-64(%r13), %r12
	addq	$-128, %r11
	.p2align 4,,10
	.p2align 3
.L8:
	movq	%r12, %rdx
	leaq	(%r12,%rdi), %rax
	subq	%r9, %rdx
	jmp	.L16
	.p2align 4,,10
	.p2align 3
.L9:
	addq	$1, %rax
	addq	$1, %rdx
	cmpq	%rsi, %rax
	je	.L31
.L16:
	cmpb	$46, 1(%rax)
	jne	.L9
	xorl	%ecx, %ecx
	cmpb	$35, (%rdx)
	sete	%cl
	xorl	%r8d, %r8d
	cmpb	$35, 1(%rdx)
	sete	%r8b
	addl	%r8d, %ecx
	xorl	%r8d, %r8d
	cmpb	$35, 2(%rdx)
	sete	%r8b
	addl	%r8d, %ecx
	xorl	%r8d, %r8d
	cmpb	$35, (%rax)
	sete	%r8b
	addl	%r8d, %ecx
	xorl	%r8d, %r8d
	cmpb	$35, 2(%rax)
	sete	%r8b
	xorl	%r10d, %r10d
	addl	%r8d, %ecx
	leaq	(%rax,%r9), %r8
	cmpb	$35, (%r8,%rdi)
	sete	%r10b
	addl	%r10d, %ecx
	cmpb	$35, 1(%r8,%rdi)
	jne	.L14
	addl	$1, %ecx
.L14:
	cmpb	$35, 2(%r8,%rdi)
	jne	.L15
	addl	$1, %ecx
.L15:
	addl	$48, %ecx
	movb	%cl, 1(%rax)
	jmp	.L9
.L30:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.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:

rule
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%62s"
	.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
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$4096, %rsp
	.cfi_def_cfa_offset 4152
	orq	$0, (%rsp)
	subq	$40, %rsp
	.cfi_def_cfa_offset 4192
	movl	$512, %ecx
	movq	%fs:40, %rax
	movq	%rax, 4120(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %r13
	leaq	12(%rsp), %rdx
	movq	%r13, %rdi
	leaq	8(%rsp), %rsi
	rep stosq
	leaq	.LC0(%rip), %rdi
	call	__isoc99_scanf@PLT
	cmpl	$2, %eax
	jne	.L5
	cmpl	$0, 8(%rsp)
	jle	.L18
	leaq	81(%rsp), %rbp
	movl	$1, %r14d
	leaq	.LC1(%rip), %r15
	movq	%rbp, %r12
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L29:
	movl	8(%rsp), %eax
	addl	$1, %r14d
	addq	$64, %r12
	cmpl	%r14d, %eax
	jl	.L28
.L6:
	movq	%r12, %rsi
	movq	%r15, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	%eax, %ebx
	cmpl	$1, %eax
	je	.L29
.L5:
	movl	$1, %eax
.L1:
	movq	4120(%rsp), %rdx
	subq	%fs:40, %rdx
	jne	.L30
	addq	$4136, %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
	.p2align 4,,10
	.p2align 3
.L31:
	.cfi_restore_state
	subq	$64, %r9
	addq	$64, %rsi
	addq	$64, %rdi
	cmpq	%r11, %r9
	jne	.L8
	.p2align 4,,10
	.p2align 3
.L17:
	movq	%rbp, %rdi
	addl	$1, %ebx
	addq	$64, %rbp
	call	puts@PLT
	cmpl	%ebx, 8(%rsp)
	jge	.L17
.L18:
	xorl	%eax, %eax
	jmp	.L1
.L28:
	testl	%eax, %eax
	jle	.L18
	movl	12(%rsp), %edx
	testl	%edx, %edx
	jle	.L17
	leal	-1(%rax), %r11d
	leal	-1(%rdx), %esi
	movl	$128, %edi
	movq	$-64, %r9
	imulq	$-64, %r11, %r11
	addq	%rbp, %rsi
	leaq	-64(%r13), %r12
	addq	$-128, %r11
	.p2align 4,,10
	.p2align 3
.L8:
	movq	%r12, %rdx
	leaq	(%r12,%rdi), %rax
	subq	%r9, %rdx
	jmp	.L16
	.p2align 4,,10
	.p2align 3
.L9:
	addq	$1, %rax
	addq	$1, %rdx
	cmpq	%rsi, %rax
	je	.L31
.L16:
	cmpb	$46, 1(%rax)
	jne	.L9
	xorl	%ecx, %ecx
	cmpb	$35, (%rdx)
	sete	%cl
	xorl	%r8d, %r8d
	cmpb	$35, 1(%rdx)
	sete	%r8b
	addl	%r8d, %ecx
	xorl	%r8d, %r8d
	cmpb	$35, 2(%rdx)
	sete	%r8b
	addl	%r8d, %ecx
	xorl	%r8d, %r8d
	cmpb	$35, (%rax)
	sete	%r8b
	addl	%r8d, %ecx
	xorl	%r8d, %r8d
	cmpb	$35, 2(%rax)
	sete	%r8b
	xorl	%r10d, %r10d
	addl	%r8d, %ecx
	leaq	(%rax,%r9), %r8
	cmpb	$35, (%r8,%rdi)
	sete	%r10b
	addl	%r10d, %ecx
	cmpb	$35, 1(%r8,%rdi)
	jne	.L14
	addl	$1, %ecx
.L14:
	cmpb	$35, 2(%r8,%rdi)
	jne	.L15
	addl	$1, %ecx
.L15:
	addl	$48, %ecx
	movb	%cl, 1(%rax)
	jmp	.L9
.L30:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.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:

#include <stdio.h>

int main(void) {
	int H, W;
	char S[64][64] = {{0}};
	int i, j, k, l;
	if (scanf("%d%d", &H, &W) != 2) return 1;
	for (i = 1; i <= H; i++) {
		if (scanf("%62s", S[i] + 1) != 1) return 1;
	}
	for (i = 1; i <= H; i++) {
		for (j = 1; j <= W; j++) {
			if (S[i][j] == '.') {
				int count = 0;
				for (k = -1; k <= 1; k++) {
					for (l = -1; l <= 1; l++) {
						if (S[i + k][j + l] == '#') count++;
					}
				}
				S[i][j] = count + '0';
			}
		}
	}
	for (i = 1; i <= H; i++) {
		puts(S[i] + 1);
	}
	return 0;
}

3 7
.....
.#.#.
.....
 6 8
.
.#.##
.#
.#..#.
.##..
.#...

11211
1#2#1
11211
 1
2#3##
3#
3#42#1
3##21
2#310

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(void) {
	int H, W;
	char S[64][64] = {{0}};
	int i, j, k, l;
	if (scanf("%d%d", &H, &W) != 2) return 1;
	for (i = 1; i <= H; i++) {
		if (scanf("%62s", S[i] + 1) != 1) return 1;
	}
	for (i = 1; i <= H; i++) {
		for (j = 1; j <= W; j++) {
			if (S[i][j] == '.') {
				int count = 0;
				for (k = -1; k <= 1; k++) {
					for (l = -1; l <= 1; l++) {
						if (S[i + k][j + l] == '#') count++;
					}
				}
				S[i][j] = count + '0';
			}
		}
	}
	for (i = 1; i <= H; i++) {
		puts(S[i] + 1);
	}
	return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%62s"
	.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	$4096, %rsp
	orq	$0, (%rsp)
	subq	$48, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-4112(%rbp), %rdx
	movl	$0, %eax
	movl	$512, %ecx
	movq	%rdx, %rdi
	rep stosq
	leaq	-4136(%rbp), %rdx
	leaq	-4140(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	cmpl	$2, %eax
	je	.L2
	movl	$1, %eax
	jmp	.L19
.L2:
	movl	$1, -4132(%rbp)
	jmp	.L4
.L6:
	leaq	-4112(%rbp), %rdx
	movl	-4132(%rbp), %eax
	cltq
	salq	$6, %rax
	addq	%rdx, %rax
	addq	$1, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	cmpl	$1, %eax
	je	.L5
	movl	$1, %eax
	jmp	.L19
.L5:
	addl	$1, -4132(%rbp)
.L4:
	movl	-4140(%rbp), %eax
	cmpl	%eax, -4132(%rbp)
	jle	.L6
	movl	$1, -4132(%rbp)
	jmp	.L7
.L16:
	movl	$1, -4128(%rbp)
	jmp	.L8
.L15:
	movl	-4128(%rbp), %eax
	movslq	%eax, %rdx
	movl	-4132(%rbp), %eax
	cltq
	salq	$6, %rax
	addq	%rbp, %rax
	addq	%rdx, %rax
	subq	$4112, %rax
	movzbl	(%rax), %eax
	cmpb	$46, %al
	jne	.L9
	movl	$0, -4116(%rbp)
	movl	$-1, -4124(%rbp)
	jmp	.L10
.L14:
	movl	$-1, -4120(%rbp)
	jmp	.L11
.L13:
	movl	-4132(%rbp), %edx
	movl	-4124(%rbp), %eax
	addl	%edx, %eax
	movl	-4128(%rbp), %ecx
	movl	-4120(%rbp), %edx
	addl	%ecx, %edx
	movslq	%edx, %rdx
	cltq
	salq	$6, %rax
	addq	%rbp, %rax
	addq	%rdx, %rax
	subq	$4112, %rax
	movzbl	(%rax), %eax
	cmpb	$35, %al
	jne	.L12
	addl	$1, -4116(%rbp)
.L12:
	addl	$1, -4120(%rbp)
.L11:
	cmpl	$1, -4120(%rbp)
	jle	.L13
	addl	$1, -4124(%rbp)
.L10:
	cmpl	$1, -4124(%rbp)
	jle	.L14
	movl	-4116(%rbp), %eax
	addl	$48, %eax
	movl	%eax, %edx
	movl	-4128(%rbp), %eax
	movslq	%eax, %rcx
	movl	-4132(%rbp), %eax
	cltq
	salq	$6, %rax
	addq	%rbp, %rax
	addq	%rcx, %rax
	subq	$4112, %rax
	movb	%dl, (%rax)
.L9:
	addl	$1, -4128(%rbp)
.L8:
	movl	-4136(%rbp), %eax
	cmpl	%eax, -4128(%rbp)
	jle	.L15
	addl	$1, -4132(%rbp)
.L7:
	movl	-4140(%rbp), %eax
	cmpl	%eax, -4132(%rbp)
	jle	.L16
	movl	$1, -4132(%rbp)
	jmp	.L17
.L18:
	leaq	-4112(%rbp), %rdx
	movl	-4132(%rbp), %eax
	cltq
	salq	$6, %rax
	addq	%rdx, %rax
	addq	$1, %rax
	movq	%rax, %rdi
	call	puts@PLT
	addl	$1, -4132(%rbp)
.L17:
	movl	-4140(%rbp), %eax
	cmpl	%eax, -4132(%rbp)
	jle	.L18
	movl	$0, %eax
.L19:
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L20
	call	__stack_chk_fail@PLT
.L20:
	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%d"
.LC1:
	.string	"%62s"
	.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	$4096, %rsp
	orq	$0, (%rsp)
	subq	$48, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-4112(%rbp), %rdx
	movl	$0, %eax
	movl	$512, %ecx
	movq	%rdx, %rdi
	rep stosq
	leaq	-4136(%rbp), %rdx
	leaq	-4140(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	cmpl	$2, %eax
	je	.L2
	movl	$1, %eax
	jmp	.L19
.L2:
	movl	$1, -4132(%rbp)
	jmp	.L4
.L6:
	leaq	-4112(%rbp), %rdx
	movl	-4132(%rbp), %eax
	cltq
	salq	$6, %rax
	addq	%rdx, %rax
	addq	$1, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	cmpl	$1, %eax
	je	.L5
	movl	$1, %eax
	jmp	.L19
.L5:
	addl	$1, -4132(%rbp)
.L4:
	movl	-4140(%rbp), %eax
	cmpl	%eax, -4132(%rbp)
	jle	.L6
	movl	$1, -4132(%rbp)
	jmp	.L7
.L16:
	movl	$1, -4128(%rbp)
	jmp	.L8
.L15:
	movl	-4128(%rbp), %eax
	movslq	%eax, %rdx
	movl	-4132(%rbp), %eax
	cltq
	salq	$6, %rax
	addq	%rbp, %rax
	addq	%rdx, %rax
	subq	$4112, %rax
	movzbl	(%rax), %eax
	cmpb	$46, %al
	jne	.L9
	movl	$0, -4116(%rbp)
	movl	$-1, -4124(%rbp)
	jmp	.L10
.L14:
	movl	$-1, -4120(%rbp)
	jmp	.L11
.L13:
	movl	-4132(%rbp), %edx
	movl	-4124(%rbp), %eax
	addl	%edx, %eax
	movl	-4128(%rbp), %ecx
	movl	-4120(%rbp), %edx
	addl	%ecx, %edx
	movslq	%edx, %rdx
	cltq
	salq	$6, %rax
	addq	%rbp, %rax
	addq	%rdx, %rax
	subq	$4112, %rax
	movzbl	(%rax), %eax
	cmpb	$35, %al
	jne	.L12
	addl	$1, -4116(%rbp)
.L12:
	addl	$1, -4120(%rbp)
.L11:
	cmpl	$1, -4120(%rbp)
	jle	.L13
	addl	$1, -4124(%rbp)
.L10:
	cmpl	$1, -4124(%rbp)
	jle	.L14
	movl	-4116(%rbp), %eax
	addl	$48, %eax
	movl	%eax, %edx
	movl	-4128(%rbp), %eax
	movslq	%eax, %rcx
	movl	-4132(%rbp), %eax
	cltq
	salq	$6, %rax
	addq	%rbp, %rax
	addq	%rcx, %rax
	subq	$4112, %rax
	movb	%dl, (%rax)
.L9:
	addl	$1, -4128(%rbp)
.L8:
	movl	-4136(%rbp), %eax
	cmpl	%eax, -4128(%rbp)
	jle	.L15
	addl	$1, -4132(%rbp)
.L7:
	movl	-4140(%rbp), %eax
	cmpl	%eax, -4132(%rbp)
	jle	.L16
	movl	$1, -4132(%rbp)
	jmp	.L17
.L18:
	leaq	-4112(%rbp), %rdx
	movl	-4132(%rbp), %eax
	cltq
	salq	$6, %rax
	addq	%rdx, %rax
	addq	$1, %rax
	movq	%rax, %rdi
	call	puts@PLT
	addl	$1, -4132(%rbp)
.L17:
	movl	-4140(%rbp), %eax
	cmpl	%eax, -4132(%rbp)
	jle	.L18
	movl	$0, %eax
.L19:
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L20
	call	__stack_chk_fail@PLT
.L20:
	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:
