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

```c
#include <stdio.h>
int main()
{
	int x, y;
	scanf("%d%d", &x, &y);
	char str[2][110] = {""};
	char tab[110][110] = {""};
	for(int i=0; i<x*y; ++i)
	{
		char ch;
		scanf(" %c", &ch);
		if(ch == '#')
		{
			str[0][i/y] = 1;
			str[1][i%y] = 1;
		}
		tab[i/y][i%y] = ch; 
	}
	for(int i=0; i<x; ++i)
	{
		int flag = 0;
		for(int j=0; j<y; ++j)
		{
			if(str[0][i] + str[1][j] == 2)
			{
				putchar(tab[i][j]);
				flag = 1;				
			}			
		}
		if(flag) puts(""); 
	}
	
	return 0;
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d%d"
.LC1:
	.string	" %c"
.LC2:
	.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
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$4096, %rsp
	.cfi_def_cfa_offset 4152
	orq	$0, (%rsp)
	subq	$4096, %rsp
	.cfi_def_cfa_offset 8248
	orq	$0, (%rsp)
	subq	$4096, %rsp
	.cfi_def_cfa_offset 12344
	orq	$0, (%rsp)
	subq	$72, %rsp
	.cfi_def_cfa_offset 12416
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 12344(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rdx
	leaq	8(%rsp), %rsi
	leaq	16(%rsp), %r13
	leaq	240(%rsp), %rbp
	call	__isoc99_scanf@PLT
	xorl	%eax, %eax
	movl	$27, %ecx
	movq	%r13, %rdi
	rep stosq
	movl	$12100, %edx
	xorl	%esi, %esi
	movl	$0, (%rdi)
	movq	%rbp, %rdi
	call	memset@PLT
	movl	8(%rsp), %eax
	movl	12(%rsp), %ecx
	movl	%eax, %edx
	imull	%ecx, %edx
	testl	%edx, %edx
	jle	.L2
	xorl	%r14d, %r14d
	leaq	7(%rsp), %r12
	leaq	.LC1(%rip), %rbx
	.p2align 4,,10
	.p2align 3
.L5:
	movq	%r12, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	%r14d, %eax
	movl	12(%rsp), %ecx
	movzbl	7(%rsp), %esi
	cltd
	idivl	%ecx
	cmpb	$35, %sil
	je	.L3
	cltq
	movslq	%edx, %rdx
	addl	$1, %r14d
	imulq	$110, %rax, %rax
	addq	$12352, %rax
	addq	%rsp, %rax
	movb	%sil, -12112(%rdx,%rax)
	movl	8(%rsp), %eax
	movl	%eax, %edx
	imull	%ecx, %edx
	cmpl	%edx, %r14d
	jl	.L5
.L2:
	testl	%eax, %eax
	jle	.L6
	xorl	%r12d, %r12d
	.p2align 4,,10
	.p2align 3
.L7:
	testl	%ecx, %ecx
	jle	.L13
	movsbl	0(%r13,%r12), %r14d
	xorl	%ebx, %ebx
	xorl	%esi, %esi
	leaq	126(%rsp), %r15
	.p2align 4,,10
	.p2align 3
.L12:
	movsbl	(%r15,%rbx), %eax
	addl	%r14d, %eax
	cmpl	$2, %eax
	je	.L20
	addq	$1, %rbx
	cmpl	%ebx, %ecx
	jg	.L12
	testl	%esi, %esi
	jne	.L10
.L18:
	movl	8(%rsp), %eax
.L13:
	addq	$1, %r12
	addq	$110, %rbp
	cmpl	%r12d, %eax
	jle	.L6
	movl	12(%rsp), %ecx
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L20:
	movsbl	0(%rbp,%rbx), %edi
	movq	stdout(%rip), %rsi
	addq	$1, %rbx
	call	putc@PLT
	movl	12(%rsp), %ecx
	cmpl	%ebx, %ecx
	jle	.L10
	movl	$1, %esi
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L3:
	cltq
	movslq	%edx, %rdx
	addl	$1, %r14d
	movb	$1, 16(%rsp,%rax)
	imulq	$110, %rax, %rax
	movb	$1, 126(%rsp,%rdx)
	addq	$12352, %rax
	addq	%rsp, %rax
	movb	$35, -12112(%rdx,%rax)
	movl	8(%rsp), %eax
	movl	%ecx, %edx
	imull	%eax, %edx
	cmpl	%r14d, %edx
	jg	.L5
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L10:
	leaq	.LC2(%rip), %rdi
	call	puts@PLT
	jmp	.L18
	.p2align 4,,10
	.p2align 3
.L6:
	movq	12344(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L21
	addq	$12360, %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
.L21:
	.cfi_restore_state
	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:
```

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.
Optimized Assembly Code:

user
```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d%d"
.LC1:
	.string	" %c"
.LC2:
	.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
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$4096, %rsp
	.cfi_def_cfa_offset 4152
	orq	$0, (%rsp)
	subq	$4096, %rsp
	.cfi_def_cfa_offset 8248
	orq	$0, (%rsp)
	subq	$4096, %rsp
	.cfi_def_cfa_offset 12344
	orq	$0, (%rsp)
	subq	$72, %rsp
	.cfi_def_cfa_offset 12416
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 12344(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rdx
	leaq	8(%rsp), %rsi
	leaq	16(%rsp), %r13
	leaq	240(%rsp), %rbp
	call	__isoc99_scanf@PLT
	xorl	%eax, %eax
	movl	$27, %ecx
	movq	%r13, %rdi
	rep stosq
	movl	$12100, %edx
	xorl	%esi, %esi
	movl	$0, (%rdi)
	movq	%rbp, %rdi
	call	memset@PLT
	movl	8(%rsp), %eax
	movl	12(%rsp), %ecx
	movl	%eax, %edx
	imull	%ecx, %edx
	testl	%edx, %edx
	jle	.L2
	xorl	%r14d, %r14d
	leaq	7(%rsp), %r12
	leaq	.LC1(%rip), %rbx
	.p2align 4,,10
	.p2align 3
.L5:
	movq	%r12, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	%r14d, %eax
	movl	12(%rsp), %ecx
	movzbl	7(%rsp), %esi
	cltd
	idivl	%ecx
	cmpb	$35, %sil
	je	.L3
	cltq
	movslq	%edx, %rdx
	addl	$1, %r14d
	imulq	$110, %rax, %rax
	addq	$12352, %rax
	addq	%rsp, %rax
	movb	%sil, -12112(%rdx,%rax)
	movl	8(%rsp), %eax
	movl	%eax, %edx
	imull	%ecx, %edx
	cmpl	%edx, %r14d
	jl	.L5
.L2:
	testl	%eax, %eax
	jle	.L6
	xorl	%r12d, %r12d
	.p2align 4,,10
	.p2align 3
.L7:
	testl	%ecx, %ecx
	jle	.L13
	movsbl	0(%r13,%r12), %r14d
	xorl	%ebx, %ebx
	xorl	%esi, %esi
	leaq	126(%rsp), %r15
	.p2align 4,,10
	.p2align 3
.L12:
	movsbl	(%r15,%rbx), %eax
	addl	%r14d, %eax
	cmpl	$2, %eax
	je	.L20
	addq	$1, %rbx
	cmpl	%ebx, %ecx
	jg	.L12
	testl	%esi, %esi
	jne	.L10
.L18:
	movl	8(%rsp), %eax
.L13:
	addq	$1, %r12
	addq	$110, %rbp
	cmpl	%r12d, %eax
	jle	.L6
	movl	12(%rsp), %ecx
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L20:
	movsbl	0(%rbp,%rbx), %edi
	movq	stdout(%rip), %rsi
	addq	$1, %rbx
	call	putc@PLT
	movl	12(%rsp), %ecx
	cmpl	%ebx, %ecx
	jle	.L10
	movl	$1, %esi
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L3:
	cltq
	movslq	%edx, %rdx
	addl	$1, %r14d
	movb	$1, 16(%rsp,%rax)
	imulq	$110, %rax, %rax
	movb	$1, 126(%rsp,%rdx)
	addq	$12352, %rax
	addq	%rsp, %rax
	movb	$35, -12112(%rdx,%rax)
	movl	8(%rsp), %eax
	movl	%ecx, %edx
	imull	%eax, %edx
	cmpl	%r14d, %edx
	jg	.L5
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L10:
	leaq	.LC2(%rip), %rdi
	call	puts@PLT
	jmp	.L18
	.p2align 4,,10
	.p2align 3
.L6:
	movq	12344(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L21
	addq	$12360, %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
.L21:
	.cfi_restore_state
	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
```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d%d"
.LC1:
	.string	" %c"
.LC2:
	.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
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$4096, %rsp
	.cfi_def_cfa_offset 4152
	orq	$0, (%rsp)
	subq	$4096, %rsp
	.cfi_def_cfa_offset 8248
	orq	$0, (%rsp)
	subq	$4096, %rsp
	.cfi_def_cfa_offset 12344
	orq	$0, (%rsp)
	subq	$72, %rsp
	.cfi_def_cfa_offset 12416
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 12344(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rdx
	leaq	8(%rsp), %rsi
	leaq	16(%rsp), %r13
	leaq	240(%rsp), %rbp
	call	__isoc99_scanf@PLT
	xorl	%eax, %eax
	movl	$27, %ecx
	movq	%r13, %rdi
	rep stosq
	movl	$12100, %edx
	xorl	%esi, %esi
	movl	$0, (%rdi)
	movq	%rbp, %rdi
	call	memset@PLT
	movl	8(%rsp), %eax
	movl	12(%rsp), %ecx
	movl	%eax, %edx
	imull	%ecx, %edx
	testl	%edx, %edx
	jle	.L2
	xorl	%r14d, %r14d
	leaq	7(%rsp), %r12
	leaq	.LC1(%rip), %rbx
	.p2align 4,,10
	.p2align 3
.L5:
	movq	%r12, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	%r14d, %eax
	movl	12(%rsp), %ecx
	movzbl	7(%rsp), %esi
	cltd
	idivl	%ecx
	cmpb	$35, %sil
	je	.L3
	cltq
	movslq	%edx, %rdx
	addl	$1, %r14d
	imulq	$110, %rax, %rax
	addq	$12352, %rax
	addq	%rsp, %rax
	movb	%sil, -12112(%rdx,%rax)
	movl	8(%rsp), %eax
	movl	%eax, %edx
	imull	%ecx, %edx
	cmpl	%edx, %r14d
	jl	.L5
.L2:
	testl	%eax, %eax
	jle	.L6
	xorl	%r12d, %r12d
	.p2align 4,,10
	.p2align 3
.L7:
	testl	%ecx, %ecx
	jle	.L13
	movsbl	0(%r13,%r12), %r14d
	xorl	%ebx, %ebx
	xorl	%esi, %esi
	leaq	126(%rsp), %r15
	.p2align 4,,10
	.p2align 3
.L12:
	movsbl	(%r15,%rbx), %eax
	addl	%r14d, %eax
	cmpl	$2, %eax
	je	.L20
	addq	$1, %rbx
	cmpl	%ebx, %ecx
	jg	.L12
	testl	%esi, %esi
	jne	.L10
.L18:
	movl	8(%rsp), %eax
.L13:
	addq	$1, %r12
	addq	$110, %rbp
	cmpl	%r12d, %eax
	jle	.L6
	movl	12(%rsp), %ecx
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L20:
	movsbl	0(%rbp,%rbx), %edi
	movq	stdout(%rip), %rsi
	addq	$1, %rbx
	call	putc@PLT
	movl	12(%rsp), %ecx
	cmpl	%ebx, %ecx
	jle	.L10
	movl	$1, %esi
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L3:
	cltq
	movslq	%edx, %rdx
	addl	$1, %r14d
	movb	$1, 16(%rsp,%rax)
	imulq	$110, %rax, %rax
	movb	$1, 126(%rsp,%rdx)
	addq	$12352, %rax
	addq	%rsp, %rax
	movb	$35, -12112(%rdx,%rax)
	movl	8(%rsp), %eax
	movl	%ecx, %edx
	imull	%eax, %edx
	cmpl	%r14d, %edx
	jg	.L5
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L10:
	leaq	.LC2(%rip), %rdi
	call	puts@PLT
	jmp	.L18
	.p2align 4,,10
	.p2align 3
.L6:
	movq	12344(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L21
	addq	$12360, %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
.L21:
	.cfi_restore_state
	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:
```
```c
#include <stdio.h>
int main()
{
	int x, y;
	scanf("%d%d", &x, &y);
	char str[2][110] = {""};
	char tab[110][110] = {""};
	for(int i=0; i<x*y; ++i)
	{
		char ch;
		scanf(" %c", &ch);
		if(ch == '#')
		{
			str[0][i/y] = 1;
			str[1][i%y] = 1;
		}
		tab[i/y][i%y] = ch; 
	}
	for(int i=0; i<x; ++i)
	{
		int flag = 0;
		for(int j=0; j<y; ++j)
		{
			if(str[0][i] + str[1][j] == 2)
			{
				putchar(tab[i][j]);
				flag = 1;				
			}			
		}
		if(flag) puts(""); 
	}
	
	return 0;
}```
Given the following C code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include <stdio.h>
int main()
{
	int x, y;
	scanf("%d%d", &x, &y);
	char str[2][110] = {""};
	char tab[110][110] = {""};
	for(int i=0; i<x*y; ++i)
	{
		char ch;
		scanf(" %c", &ch);
		if(ch == '#')
		{
			str[0][i/y] = 1;
			str[1][i%y] = 1;
		}
		tab[i/y][i%y] = ch; 
	}
	for(int i=0; i<x; ++i)
	{
		int flag = 0;
		for(int j=0; j<y; ++j)
		{
			if(str[0][i] + str[1][j] == 2)
			{
				putchar(tab[i][j]);
				flag = 1;				
			}			
		}
		if(flag) puts(""); 
	}
	
	return 0;
}```

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.
Optimized Assembly Code:

4 4
##.#
....
##.$
.#.#
 4 5
-....
.....
..#..
.....
 7 6
..../.
....#.
.#....
..#...
..#...
......
.#..#.
 4 4
.#
....
.#
#.#.
 4 4
##.#
....
##.$
#.#.
 3 4
.#
....
.#
#-#.
 7 6
.././.
....#.
.#....
/..#..
..#...
......
.#..#.
 3 4
.#
....
.#
$-#.
 8 4
#.##
.-..
##.$
#.#.
 7 6
.././.
....#.
.#....
/..#..
..#...
......
.#..".

###
##$
.##
 #
 ..#
#..
.#.
.#.
#.#
 .#..
...#
#.#.
 ##.#
##.$
#.#.
 .#..
...#
#-#.
 ...#
#...
..#.
.#..
#..#
 #..
..#
-#.
 #.##
##.$
#.#.
 ...#
#...
..#.
.#..
#.."

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

```c
#include <stdio.h>
int main()
{
	int x, y;
	scanf("%d%d", &x, &y);
	char str[2][110] = {""};
	char tab[110][110] = {""};
	for(int i=0; i<x*y; ++i)
	{
		char ch;
		scanf(" %c", &ch);
		if(ch == '#')
		{
			str[0][i/y] = 1;
			str[1][i%y] = 1;
		}
		tab[i/y][i%y] = ch; 
	}
	for(int i=0; i<x; ++i)
	{
		int flag = 0;
		for(int j=0; j<y; ++j)
		{
			if(str[0][i] + str[1][j] == 2)
			{
				putchar(tab[i][j]);
				flag = 1;				
			}			
		}
		if(flag) puts(""); 
	}
	
	return 0;
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d%d"
.LC1:
	.string	" %c"
.LC2:
	.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
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$4096, %rsp
	.cfi_def_cfa_offset 4152
	orq	$0, (%rsp)
	subq	$4096, %rsp
	.cfi_def_cfa_offset 8248
	orq	$0, (%rsp)
	subq	$4096, %rsp
	.cfi_def_cfa_offset 12344
	orq	$0, (%rsp)
	subq	$72, %rsp
	.cfi_def_cfa_offset 12416
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 12344(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rdx
	leaq	8(%rsp), %rsi
	leaq	16(%rsp), %r13
	leaq	240(%rsp), %rbp
	call	__isoc99_scanf@PLT
	xorl	%eax, %eax
	movl	$27, %ecx
	movq	%r13, %rdi
	rep stosq
	movl	$12100, %edx
	xorl	%esi, %esi
	movl	$0, (%rdi)
	movq	%rbp, %rdi
	call	memset@PLT
	movl	8(%rsp), %eax
	movl	12(%rsp), %ecx
	movl	%eax, %edx
	imull	%ecx, %edx
	testl	%edx, %edx
	jle	.L2
	xorl	%r14d, %r14d
	leaq	7(%rsp), %r12
	leaq	.LC1(%rip), %rbx
	.p2align 4,,10
	.p2align 3
.L5:
	movq	%r12, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	%r14d, %eax
	movl	12(%rsp), %ecx
	movzbl	7(%rsp), %esi
	cltd
	idivl	%ecx
	cmpb	$35, %sil
	je	.L3
	cltq
	movslq	%edx, %rdx
	addl	$1, %r14d
	imulq	$110, %rax, %rax
	addq	$12352, %rax
	addq	%rsp, %rax
	movb	%sil, -12112(%rdx,%rax)
	movl	8(%rsp), %eax
	movl	%eax, %edx
	imull	%ecx, %edx
	cmpl	%edx, %r14d
	jl	.L5
.L2:
	testl	%eax, %eax
	jle	.L6
	xorl	%r12d, %r12d
	.p2align 4,,10
	.p2align 3
.L7:
	testl	%ecx, %ecx
	jle	.L13
	movsbl	0(%r13,%r12), %r14d
	xorl	%ebx, %ebx
	xorl	%esi, %esi
	leaq	126(%rsp), %r15
	.p2align 4,,10
	.p2align 3
.L12:
	movsbl	(%r15,%rbx), %eax
	addl	%r14d, %eax
	cmpl	$2, %eax
	je	.L20
	addq	$1, %rbx
	cmpl	%ebx, %ecx
	jg	.L12
	testl	%esi, %esi
	jne	.L10
.L18:
	movl	8(%rsp), %eax
.L13:
	addq	$1, %r12
	addq	$110, %rbp
	cmpl	%r12d, %eax
	jle	.L6
	movl	12(%rsp), %ecx
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L20:
	movsbl	0(%rbp,%rbx), %edi
	movq	stdout(%rip), %rsi
	addq	$1, %rbx
	call	putc@PLT
	movl	12(%rsp), %ecx
	cmpl	%ebx, %ecx
	jle	.L10
	movl	$1, %esi
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L3:
	cltq
	movslq	%edx, %rdx
	addl	$1, %r14d
	movb	$1, 16(%rsp,%rax)
	imulq	$110, %rax, %rax
	movb	$1, 126(%rsp,%rdx)
	addq	$12352, %rax
	addq	%rsp, %rax
	movb	$35, -12112(%rdx,%rax)
	movl	8(%rsp), %eax
	movl	%ecx, %edx
	imull	%eax, %edx
	cmpl	%r14d, %edx
	jg	.L5
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L10:
	leaq	.LC2(%rip), %rdi
	call	puts@PLT
	jmp	.L18
	.p2align 4,,10
	.p2align 3
.L6:
	movq	12344(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L21
	addq	$12360, %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
.L21:
	.cfi_restore_state
	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:
```

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.
Optimized Assembly Code:

train
```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d%d"
.LC1:
	.string	" %c"
.LC2:
	.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
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$4096, %rsp
	.cfi_def_cfa_offset 4152
	orq	$0, (%rsp)
	subq	$4096, %rsp
	.cfi_def_cfa_offset 8248
	orq	$0, (%rsp)
	subq	$4096, %rsp
	.cfi_def_cfa_offset 12344
	orq	$0, (%rsp)
	subq	$72, %rsp
	.cfi_def_cfa_offset 12416
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 12344(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rdx
	leaq	8(%rsp), %rsi
	leaq	16(%rsp), %r13
	leaq	240(%rsp), %rbp
	call	__isoc99_scanf@PLT
	xorl	%eax, %eax
	movl	$27, %ecx
	movq	%r13, %rdi
	rep stosq
	movl	$12100, %edx
	xorl	%esi, %esi
	movl	$0, (%rdi)
	movq	%rbp, %rdi
	call	memset@PLT
	movl	8(%rsp), %eax
	movl	12(%rsp), %ecx
	movl	%eax, %edx
	imull	%ecx, %edx
	testl	%edx, %edx
	jle	.L2
	xorl	%r14d, %r14d
	leaq	7(%rsp), %r12
	leaq	.LC1(%rip), %rbx
	.p2align 4,,10
	.p2align 3
.L5:
	movq	%r12, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	%r14d, %eax
	movl	12(%rsp), %ecx
	movzbl	7(%rsp), %esi
	cltd
	idivl	%ecx
	cmpb	$35, %sil
	je	.L3
	cltq
	movslq	%edx, %rdx
	addl	$1, %r14d
	imulq	$110, %rax, %rax
	addq	$12352, %rax
	addq	%rsp, %rax
	movb	%sil, -12112(%rdx,%rax)
	movl	8(%rsp), %eax
	movl	%eax, %edx
	imull	%ecx, %edx
	cmpl	%edx, %r14d
	jl	.L5
.L2:
	testl	%eax, %eax
	jle	.L6
	xorl	%r12d, %r12d
	.p2align 4,,10
	.p2align 3
.L7:
	testl	%ecx, %ecx
	jle	.L13
	movsbl	0(%r13,%r12), %r14d
	xorl	%ebx, %ebx
	xorl	%esi, %esi
	leaq	126(%rsp), %r15
	.p2align 4,,10
	.p2align 3
.L12:
	movsbl	(%r15,%rbx), %eax
	addl	%r14d, %eax
	cmpl	$2, %eax
	je	.L20
	addq	$1, %rbx
	cmpl	%ebx, %ecx
	jg	.L12
	testl	%esi, %esi
	jne	.L10
.L18:
	movl	8(%rsp), %eax
.L13:
	addq	$1, %r12
	addq	$110, %rbp
	cmpl	%r12d, %eax
	jle	.L6
	movl	12(%rsp), %ecx
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L20:
	movsbl	0(%rbp,%rbx), %edi
	movq	stdout(%rip), %rsi
	addq	$1, %rbx
	call	putc@PLT
	movl	12(%rsp), %ecx
	cmpl	%ebx, %ecx
	jle	.L10
	movl	$1, %esi
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L3:
	cltq
	movslq	%edx, %rdx
	addl	$1, %r14d
	movb	$1, 16(%rsp,%rax)
	imulq	$110, %rax, %rax
	movb	$1, 126(%rsp,%rdx)
	addq	$12352, %rax
	addq	%rsp, %rax
	movb	$35, -12112(%rdx,%rax)
	movl	8(%rsp), %eax
	movl	%ecx, %edx
	imull	%eax, %edx
	cmpl	%r14d, %edx
	jg	.L5
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L10:
	leaq	.LC2(%rip), %rdi
	call	puts@PLT
	jmp	.L18
	.p2align 4,,10
	.p2align 3
.L6:
	movq	12344(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L21
	addq	$12360, %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
.L21:
	.cfi_restore_state
	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:
```