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>
int main(void){
    int i, j, n, m, k;
    char s[100000], c[100000], S[100000];
    scanf("%d", &n);
    while ( n ) {
    for ( i = 0; i < n; i++ ) {
        scanf(" %c %c", &s[i], &S[i]);
    }
    scanf("%d", &m);
    for ( i = 0; i < m; i++ ){
        scanf(" %c", &c[i]);
        for ( j = 0; j < strlen(s); j++ ) {
            if (c[i] == s[j]) {c[i] = S[j]; break;}
        }
    }
    for ( i = 0; i < m; i++ ) printf("%c", c[i]);
    printf("\n");
    scanf("%d", &n);
    }
    return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	" %c %c"
.LC2:
	.string	" %c"
	.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
	pushq	%rbx
	leaq	-299008(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$1032, %rsp
	.cfi_offset 3, -24
	movq	%fs:40, %rax
	movq	%rax, -24(%rbp)
	xorl	%eax, %eax
	leaq	-300048(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	jmp	.L2
.L13:
	movl	$0, -300040(%rbp)
	jmp	.L3
.L4:
	leaq	-100032(%rbp), %rdx
	movl	-300040(%rbp), %eax
	cltq
	addq	%rax, %rdx
	leaq	-300032(%rbp), %rcx
	movl	-300040(%rbp), %eax
	cltq
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -300040(%rbp)
.L3:
	movl	-300048(%rbp), %eax
	cmpl	%eax, -300040(%rbp)
	jl	.L4
	leaq	-300044(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -300040(%rbp)
	jmp	.L5
.L10:
	leaq	-200032(%rbp), %rdx
	movl	-300040(%rbp), %eax
	cltq
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -300036(%rbp)
	jmp	.L6
.L9:
	movl	-300040(%rbp), %eax
	cltq
	movzbl	-200032(%rbp,%rax), %edx
	movl	-300036(%rbp), %eax
	cltq
	movzbl	-300032(%rbp,%rax), %eax
	cmpb	%al, %dl
	jne	.L7
	movl	-300036(%rbp), %eax
	cltq
	movzbl	-100032(%rbp,%rax), %edx
	movl	-300040(%rbp), %eax
	cltq
	movb	%dl, -200032(%rbp,%rax)
	jmp	.L8
.L7:
	addl	$1, -300036(%rbp)
.L6:
	movl	-300036(%rbp), %eax
	movslq	%eax, %rbx
	leaq	-300032(%rbp), %rax
	movq	%rax, %rdi
	call	strlen@PLT
	cmpq	%rax, %rbx
	jb	.L9
.L8:
	addl	$1, -300040(%rbp)
.L5:
	movl	-300044(%rbp), %eax
	cmpl	%eax, -300040(%rbp)
	jl	.L10
	movl	$0, -300040(%rbp)
	jmp	.L11
.L12:
	movl	-300040(%rbp), %eax
	cltq
	movzbl	-200032(%rbp,%rax), %eax
	movsbl	%al, %eax
	movl	%eax, %edi
	call	putchar@PLT
	addl	$1, -300040(%rbp)
.L11:
	movl	-300044(%rbp), %eax
	cmpl	%eax, -300040(%rbp)
	jl	.L12
	movl	$10, %edi
	call	putchar@PLT
	leaq	-300048(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
.L2:
	movl	-300048(%rbp), %eax
	testl	%eax, %eax
	jne	.L13
	movl	$0, %eax
	movq	-24(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L15
	call	__stack_chk_fail@PLT
.L15:
	movq	-8(%rbp), %rbx
	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	" %c %c"
.LC2:
	.string	" %c"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB35:
	.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	-299008(%rsp), %r11
	.cfi_def_cfa 11, 299064
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$1064, %rsp
	.cfi_def_cfa_offset 300128
	leaq	.LC0(%rip), %rdi
	leaq	.LC1(%rip), %r13
	leaq	.LC2(%rip), %r12
	movq	%fs:40, %rax
	movq	%rax, 300056(%rsp)
	xorl	%eax, %eax
	leaq	40(%rsp), %rax
	leaq	44(%rsp), %rbx
	movq	%rax, 16(%rsp)
	movq	%rax, %rsi
	xorl	%eax, %eax
	leaq	47(%rsp), %r15
	call	__isoc99_scanf@PLT
	movl	40(%rsp), %eax
	movq	%rbx, 24(%rsp)
	testl	%eax, %eax
	je	.L3
	.p2align 4,,10
	.p2align 3
.L2:
	xorl	%r14d, %r14d
	leaq	200048(%rsp), %rbp
	leaq	48(%rsp), %rbx
	testl	%eax, %eax
	jle	.L12
	.p2align 4,,10
	.p2align 3
.L4:
	leaq	0(%rbp,%r14), %rdx
	leaq	(%rbx,%r14), %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	addq	$1, %r14
	cmpl	%r14d, 40(%rsp)
	jg	.L4
.L12:
	movq	24(%rsp), %rsi
	leaq	.LC0(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	44(%rsp), %eax
	testl	%eax, %eax
	jle	.L10
	leaq	100048(%rsp), %rax
	xorl	%r14d, %r14d
	leaq	48(%rsp), %rbx
	movq	%rax, 8(%rsp)
	movq	%rax, %rbp
	.p2align 4,,10
	.p2align 3
.L9:
	movq	%rbp, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movq	%rbx, %rdi
	call	strlen@PLT
	xorl	%edx, %edx
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L8:
	addq	$1, %rdx
	movzbl	(%r15,%rdx), %ecx
	cmpb	%cl, 0(%rbp)
	je	.L25
.L6:
	movslq	%edx, %rsi
	cmpq	%rdx, %rax
	jne	.L8
.L7:
	movl	44(%rsp), %eax
	addl	$1, %r14d
	addq	$1, %rbp
	cmpl	%r14d, %eax
	jg	.L9
	testl	%eax, %eax
	jle	.L10
	xorl	%ebx, %ebx
	.p2align 4,,10
	.p2align 3
.L11:
	movq	8(%rsp), %rax
	movsbl	(%rax,%rbx), %edi
	addq	$1, %rbx
	call	putchar@PLT
	cmpl	%ebx, 44(%rsp)
	jg	.L11
.L10:
	movl	$10, %edi
	call	putchar@PLT
	movq	16(%rsp), %rsi
	leaq	.LC0(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	40(%rsp), %eax
	testl	%eax, %eax
	jne	.L2
.L3:
	movq	300056(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L26
	addq	$300072, %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
	.p2align 4,,10
	.p2align 3
.L25:
	.cfi_restore_state
	movzbl	200048(%rsp,%rsi), %eax
	movb	%al, 0(%rbp)
	jmp	.L7
.L26:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE35:
	.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"
.LC1:
	.string	" %c %c"
.LC2:
	.string	" %c"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB35:
	.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	-299008(%rsp), %r11
	.cfi_def_cfa 11, 299064
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$1064, %rsp
	.cfi_def_cfa_offset 300128
	leaq	.LC0(%rip), %rdi
	leaq	.LC1(%rip), %r13
	leaq	.LC2(%rip), %r12
	movq	%fs:40, %rax
	movq	%rax, 300056(%rsp)
	xorl	%eax, %eax
	leaq	40(%rsp), %rax
	leaq	44(%rsp), %rbx
	movq	%rax, 16(%rsp)
	movq	%rax, %rsi
	xorl	%eax, %eax
	leaq	47(%rsp), %r15
	call	__isoc99_scanf@PLT
	movl	40(%rsp), %eax
	movq	%rbx, 24(%rsp)
	testl	%eax, %eax
	je	.L3
	.p2align 4,,10
	.p2align 3
.L2:
	xorl	%r14d, %r14d
	leaq	200048(%rsp), %rbp
	leaq	48(%rsp), %rbx
	testl	%eax, %eax
	jle	.L12
	.p2align 4,,10
	.p2align 3
.L4:
	leaq	0(%rbp,%r14), %rdx
	leaq	(%rbx,%r14), %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	addq	$1, %r14
	cmpl	%r14d, 40(%rsp)
	jg	.L4
.L12:
	movq	24(%rsp), %rsi
	leaq	.LC0(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	44(%rsp), %eax
	testl	%eax, %eax
	jle	.L10
	leaq	100048(%rsp), %rax
	xorl	%r14d, %r14d
	leaq	48(%rsp), %rbx
	movq	%rax, 8(%rsp)
	movq	%rax, %rbp
	.p2align 4,,10
	.p2align 3
.L9:
	movq	%rbp, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movq	%rbx, %rdi
	call	strlen@PLT
	xorl	%edx, %edx
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L8:
	addq	$1, %rdx
	movzbl	(%r15,%rdx), %ecx
	cmpb	%cl, 0(%rbp)
	je	.L25
.L6:
	movslq	%edx, %rsi
	cmpq	%rdx, %rax
	jne	.L8
.L7:
	movl	44(%rsp), %eax
	addl	$1, %r14d
	addq	$1, %rbp
	cmpl	%r14d, %eax
	jg	.L9
	testl	%eax, %eax
	jle	.L10
	xorl	%ebx, %ebx
	.p2align 4,,10
	.p2align 3
.L11:
	movq	8(%rsp), %rax
	movsbl	(%rax,%rbx), %edi
	addq	$1, %rbx
	call	putchar@PLT
	cmpl	%ebx, 44(%rsp)
	jg	.L11
.L10:
	movl	$10, %edi
	call	putchar@PLT
	movq	16(%rsp), %rsi
	leaq	.LC0(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	40(%rsp), %eax
	testl	%eax, %eax
	jne	.L2
.L3:
	movq	300056(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L26
	addq	$300072, %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
	.p2align 4,,10
	.p2align 3
.L25:
	.cfi_restore_state
	movzbl	200048(%rsp,%rsi), %eax
	movb	%al, 0(%rbp)
	jmp	.L7
.L26:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE35:
	.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>
#include<string.h>
int main(void){
    int i, j, n, m, k;
    char s[100000], c[100000], S[100000];
    scanf("%d", &n);
    while ( n ) {
    for ( i = 0; i < n; i++ ) {
        scanf(" %c %c", &s[i], &S[i]);
    }
    scanf("%d", &m);
    for ( i = 0; i < m; i++ ){
        scanf(" %c", &c[i]);
        for ( j = 0; j < strlen(s); j++ ) {
            if (c[i] == s[j]) {c[i] = S[j]; break;}
        }
    }
    for ( i = 0; i < m; i++ ) printf("%c", c[i]);
    printf("\n");
    scanf("%d", &n);
    }
    return 0;
}
3
A a
0 5
5 4
10
B
B
C
0
1
4
5
a
b
A
3
A a
0 5
5 4
10
A
B
C
0
1
4
5
a
b
A
0
 3
A a
0 0
5 4
10
B
B
C
0
1
4
5
a
b
A
3
A a
0 5
5 4
10
A
B
C
0
1
4
5
a
b
A
0
 3
A a
0 0
5 4
10
B
B
C
0
1
4
5
a
b
A
3
@ a
0 5
5 4
10
A
B
C
0
1
4
5
a
b
A
0
 3
A a
0 0
5 4
10
B
B
C
0
1
4
5
a
b
A
3
@ a
0 5
5 4
10
A
B
C
0
1
4
5
a
b
@
0
 3
A a
0 0
5 4
10
B
B
C
0
1
4
5
a
b
A
3
@ a
0 5
5 5
10
A
B
C
0
1
4
5
a
b
@
0
 3
A a
0 0
5 4
10
B
B
C
0
1
0
5
a
b
A
3
@ a
0 5
5 5
10
A
B
C
0
1
4
5
a
b
@
0
 3
A a
0 0
5 4
10
B
B
C
0
1
0
5
a
c
A
3
@ a
0 5
5 5
10
A
B
C
0
1
4
5
a
b
@
0
 3
A a
0 5
5 4
10
A
B
C
0
1
4
5
a
b
A
3
A a
0 5
5 4
10
@
B
C
0
1
4
5
a
b
A
0
 3
A a
0 5
5 4
10
B
B
C
0
1
4
5
a
b
A
3
A a
0 5
5 4
10
A
C
C
0
1
4
5
a
b
A
0
 3
A a
0 0
5 4
10
A
B
C
0
1
4
5
a
b
A
3
A a
0 5
5 4
10
A
B
C
0
1
4
5
a
b
A
0

BBC5144aba
aBC5144aba
 BBC0144aba
aBC5144aba
 BBC0144aba
ABC5144abA
 BBC0144aba
ABC5144aba
 BBC0144aba
ABC5145aba
 BBC0104aba
ABC5145aba
 BBC0104aca
ABC5145aba
 aBC5144aba
@BC5144aba
 BBC5144aba
aCC5144aba
 aBC0144aba
aBC5144aba

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>
int main(void){
    int i, j, n, m, k;
    char s[100000], c[100000], S[100000];
    scanf("%d", &n);
    while ( n ) {
    for ( i = 0; i < n; i++ ) {
        scanf(" %c %c", &s[i], &S[i]);
    }
    scanf("%d", &m);
    for ( i = 0; i < m; i++ ){
        scanf(" %c", &c[i]);
        for ( j = 0; j < strlen(s); j++ ) {
            if (c[i] == s[j]) {c[i] = S[j]; break;}
        }
    }
    for ( i = 0; i < m; i++ ) printf("%c", c[i]);
    printf("\n");
    scanf("%d", &n);
    }
    return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	" %c %c"
.LC2:
	.string	" %c"
	.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
	pushq	%rbx
	leaq	-299008(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$1032, %rsp
	.cfi_offset 3, -24
	movq	%fs:40, %rax
	movq	%rax, -24(%rbp)
	xorl	%eax, %eax
	leaq	-300048(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	jmp	.L2
.L13:
	movl	$0, -300040(%rbp)
	jmp	.L3
.L4:
	leaq	-100032(%rbp), %rdx
	movl	-300040(%rbp), %eax
	cltq
	addq	%rax, %rdx
	leaq	-300032(%rbp), %rcx
	movl	-300040(%rbp), %eax
	cltq
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -300040(%rbp)
.L3:
	movl	-300048(%rbp), %eax
	cmpl	%eax, -300040(%rbp)
	jl	.L4
	leaq	-300044(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -300040(%rbp)
	jmp	.L5
.L10:
	leaq	-200032(%rbp), %rdx
	movl	-300040(%rbp), %eax
	cltq
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -300036(%rbp)
	jmp	.L6
.L9:
	movl	-300040(%rbp), %eax
	cltq
	movzbl	-200032(%rbp,%rax), %edx
	movl	-300036(%rbp), %eax
	cltq
	movzbl	-300032(%rbp,%rax), %eax
	cmpb	%al, %dl
	jne	.L7
	movl	-300036(%rbp), %eax
	cltq
	movzbl	-100032(%rbp,%rax), %edx
	movl	-300040(%rbp), %eax
	cltq
	movb	%dl, -200032(%rbp,%rax)
	jmp	.L8
.L7:
	addl	$1, -300036(%rbp)
.L6:
	movl	-300036(%rbp), %eax
	movslq	%eax, %rbx
	leaq	-300032(%rbp), %rax
	movq	%rax, %rdi
	call	strlen@PLT
	cmpq	%rax, %rbx
	jb	.L9
.L8:
	addl	$1, -300040(%rbp)
.L5:
	movl	-300044(%rbp), %eax
	cmpl	%eax, -300040(%rbp)
	jl	.L10
	movl	$0, -300040(%rbp)
	jmp	.L11
.L12:
	movl	-300040(%rbp), %eax
	cltq
	movzbl	-200032(%rbp,%rax), %eax
	movsbl	%al, %eax
	movl	%eax, %edi
	call	putchar@PLT
	addl	$1, -300040(%rbp)
.L11:
	movl	-300044(%rbp), %eax
	cmpl	%eax, -300040(%rbp)
	jl	.L12
	movl	$10, %edi
	call	putchar@PLT
	leaq	-300048(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
.L2:
	movl	-300048(%rbp), %eax
	testl	%eax, %eax
	jne	.L13
	movl	$0, %eax
	movq	-24(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L15
	call	__stack_chk_fail@PLT
.L15:
	movq	-8(%rbp), %rbx
	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	" %c %c"
.LC2:
	.string	" %c"
	.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
	pushq	%rbx
	leaq	-299008(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$1032, %rsp
	.cfi_offset 3, -24
	movq	%fs:40, %rax
	movq	%rax, -24(%rbp)
	xorl	%eax, %eax
	leaq	-300048(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	jmp	.L2
.L13:
	movl	$0, -300040(%rbp)
	jmp	.L3
.L4:
	leaq	-100032(%rbp), %rdx
	movl	-300040(%rbp), %eax
	cltq
	addq	%rax, %rdx
	leaq	-300032(%rbp), %rcx
	movl	-300040(%rbp), %eax
	cltq
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -300040(%rbp)
.L3:
	movl	-300048(%rbp), %eax
	cmpl	%eax, -300040(%rbp)
	jl	.L4
	leaq	-300044(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -300040(%rbp)
	jmp	.L5
.L10:
	leaq	-200032(%rbp), %rdx
	movl	-300040(%rbp), %eax
	cltq
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -300036(%rbp)
	jmp	.L6
.L9:
	movl	-300040(%rbp), %eax
	cltq
	movzbl	-200032(%rbp,%rax), %edx
	movl	-300036(%rbp), %eax
	cltq
	movzbl	-300032(%rbp,%rax), %eax
	cmpb	%al, %dl
	jne	.L7
	movl	-300036(%rbp), %eax
	cltq
	movzbl	-100032(%rbp,%rax), %edx
	movl	-300040(%rbp), %eax
	cltq
	movb	%dl, -200032(%rbp,%rax)
	jmp	.L8
.L7:
	addl	$1, -300036(%rbp)
.L6:
	movl	-300036(%rbp), %eax
	movslq	%eax, %rbx
	leaq	-300032(%rbp), %rax
	movq	%rax, %rdi
	call	strlen@PLT
	cmpq	%rax, %rbx
	jb	.L9
.L8:
	addl	$1, -300040(%rbp)
.L5:
	movl	-300044(%rbp), %eax
	cmpl	%eax, -300040(%rbp)
	jl	.L10
	movl	$0, -300040(%rbp)
	jmp	.L11
.L12:
	movl	-300040(%rbp), %eax
	cltq
	movzbl	-200032(%rbp,%rax), %eax
	movsbl	%al, %eax
	movl	%eax, %edi
	call	putchar@PLT
	addl	$1, -300040(%rbp)
.L11:
	movl	-300044(%rbp), %eax
	cmpl	%eax, -300040(%rbp)
	jl	.L12
	movl	$10, %edi
	call	putchar@PLT
	leaq	-300048(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
.L2:
	movl	-300048(%rbp), %eax
	testl	%eax, %eax
	jne	.L13
	movl	$0, %eax
	movq	-24(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L15
	call	__stack_chk_fail@PLT
.L15:
	movq	-8(%rbp), %rbx
	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:
