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

```c
#include <stdio.h>
#include <string.h>

#define swap(type, a, b) do{type tmp = a; a = b; b = tmp;}while(0);

int main(void)
{
	int n;
	char word[201], ans[2][201];
	int i, j, r0, r1, h;


	while(scanf("%s", word)!=EOF && strcmp(word, "-")!=0){
		r0 = 1;
		r1 = 0;
		strcpy(ans[r0], word);
		scanf("%d", &n);

		for(i=0;i<n;i++){
			swap(int, r0, r1);
//printf("%d %d\n", r0, r1);
			scanf("%d", &h);

			for(j=h;j<strlen(word);j++)
				ans[r0][j-h] = ans[r1][j];
			ans[r0][j-h] = '\0';
			strncat(ans[r0], ans[r1], h);
//printf("%s %s %s\n", word, ans[r0], ans[r1]);

		}

		printf("%s\n", ans[r0]);
	}

	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%s"
.LC2:
	.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
	pushq	%rbx
	subq	$680, %rsp
	.cfi_offset 3, -24
	movq	%fs:40, %rax
	movq	%rax, -24(%rbp)
	xorl	%eax, %eax
	jmp	.L2
.L8:
	movl	$1, -668(%rbp)
	movl	$0, -664(%rbp)
	leaq	-656(%rbp), %rcx
	movl	-668(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rsi
	addq	%rsi, %rax
	salq	$3, %rax
	addq	%rdx, %rax
	leaq	(%rcx,%rax), %rdx
	leaq	-240(%rbp), %rax
	movq	%rax, %rsi
	movq	%rdx, %rdi
	call	strcpy@PLT
	leaq	-684(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -676(%rbp)
	jmp	.L3
.L6:
	movl	-668(%rbp), %eax
	movl	%eax, -660(%rbp)
	movl	-664(%rbp), %eax
	movl	%eax, -668(%rbp)
	movl	-660(%rbp), %eax
	movl	%eax, -664(%rbp)
	leaq	-680(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-680(%rbp), %eax
	movl	%eax, -672(%rbp)
	jmp	.L4
.L5:
	movl	-680(%rbp), %edx
	movl	-672(%rbp), %eax
	subl	%edx, %eax
	movl	%eax, %esi
	movl	-672(%rbp), %eax
	movslq	%eax, %rcx
	movl	-664(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdi
	addq	%rdi, %rax
	salq	$3, %rax
	addq	%rdx, %rax
	leaq	-16(%rax), %rax
	addq	%rbp, %rax
	addq	%rcx, %rax
	subq	$640, %rax
	movzbl	(%rax), %ecx
	movslq	%esi, %rsi
	movl	-668(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdi
	addq	%rdi, %rax
	salq	$3, %rax
	addq	%rdx, %rax
	leaq	-16(%rax), %rax
	addq	%rbp, %rax
	addq	%rsi, %rax
	subq	$640, %rax
	movb	%cl, (%rax)
	addl	$1, -672(%rbp)
.L4:
	movl	-672(%rbp), %eax
	movslq	%eax, %rbx
	leaq	-240(%rbp), %rax
	movq	%rax, %rdi
	call	strlen@PLT
	cmpq	%rax, %rbx
	jb	.L5
	movl	-680(%rbp), %edx
	movl	-672(%rbp), %eax
	subl	%edx, %eax
	movslq	%eax, %rcx
	movl	-668(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rsi
	addq	%rsi, %rax
	salq	$3, %rax
	addq	%rdx, %rax
	leaq	-16(%rax), %rax
	addq	%rbp, %rax
	addq	%rcx, %rax
	subq	$640, %rax
	movb	$0, (%rax)
	movl	-680(%rbp), %eax
	movslq	%eax, %rcx
	leaq	-656(%rbp), %rsi
	movl	-664(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdi
	addq	%rdi, %rax
	salq	$3, %rax
	addq	%rdx, %rax
	addq	%rax, %rsi
	leaq	-656(%rbp), %rdi
	movl	-668(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %r8
	addq	%r8, %rax
	salq	$3, %rax
	addq	%rdx, %rax
	addq	%rdi, %rax
	movq	%rcx, %rdx
	movq	%rax, %rdi
	call	strncat@PLT
	addl	$1, -676(%rbp)
.L3:
	movl	-684(%rbp), %eax
	cmpl	%eax, -676(%rbp)
	jl	.L6
	leaq	-656(%rbp), %rcx
	movl	-668(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rsi
	addq	%rsi, %rax
	salq	$3, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	movq	%rax, %rdi
	call	puts@PLT
.L2:
	leaq	-240(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	cmpl	$-1, %eax
	je	.L7
	leaq	-240(%rbp), %rax
	leaq	.LC2(%rip), %rdx
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	strcmp@PLT
	testl	%eax, %eax
	jne	.L8
.L7:
	movl	$0, %eax
	movq	-24(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L10
	call	__stack_chk_fail@PLT
.L10:
	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	"%s"
.LC2:
	.string	"-"
	.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
	subq	$712, %rsp
	.cfi_def_cfa_offset 768
	movq	%fs:40, %rax
	movq	%rax, 696(%rsp)
	xorl	%eax, %eax
	leaq	480(%rsp), %r15
	.p2align 4,,10
	.p2align 3
.L2:
	xorl	%eax, %eax
	movq	%r15, %rsi
	leaq	.LC1(%rip), %rdi
	call	__isoc99_scanf@PLT
	cmpl	$-1, %eax
	je	.L7
	cmpw	$45, (%r15)
	je	.L7
	leaq	265(%rsp), %rbx
	movl	$201, %edx
	movq	%r15, %rsi
	movq	%rbx, %rdi
	call	__strcpy_chk@PLT
	leaq	56(%rsp), %rsi
	leaq	.LC0(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	56(%rsp), %eax
	testl	%eax, %eax
	jle	.L20
	leaq	60(%rsp), %rax
	movl	$0, 8(%rsp)
	movq	%rax, 40(%rsp)
	leaq	64(%rsp), %rax
	movl	$1, 12(%rsp)
	movl	$0, 4(%rsp)
	movq	%rax, 16(%rsp)
	.p2align 4,,10
	.p2align 3
.L6:
	movq	40(%rsp), %rsi
	leaq	.LC0(%rip), %rdi
	xorl	%eax, %eax
	xorl	%r14d, %r14d
	call	__isoc99_scanf@PLT
	movslq	12(%rsp), %rax
	movslq	60(%rsp), %rsi
	movslq	8(%rsp), %r12
	movq	16(%rsp), %rdi
	leaq	(%rax,%rax,4), %rdx
	movq	%rsi, %rbx
	movq	%rsi, 24(%rsp)
	leaq	-1(%rsi), %rbp
	leaq	(%rdx,%rdx,4), %rdx
	leaq	(%rax,%rdx,8), %rax
	addq	%rax, %rbx
	movq	%rax, 32(%rsp)
	leaq	(%r12,%r12,4), %rax
	leaq	(%rax,%rax,4), %rax
	addq	%rdi, %rbx
	leaq	(%r12,%rax,8), %r13
	addq	%rdi, %r13
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L5:
	movzbl	-1(%rbx,%r14), %eax
	movb	%al, -1(%r13,%r14)
.L4:
	movq	%r15, %rdi
	call	strlen@PLT
	movslq	%r14d, %rcx
	addq	$1, %r14
	movq	%rax, %r8
	leaq	0(%rbp,%r14), %rax
	cmpq	%rax, %r8
	ja	.L5
	leaq	(%r12,%r12,4), %rax
	movq	24(%rsp), %rdx
	movq	32(%rsp), %rsi
	movq	%r13, %rdi
	leaq	(%rax,%rax,4), %rax
	addq	16(%rsp), %rsi
	leaq	(%r12,%rax,8), %rax
	addq	$704, %rax
	addq	%rsp, %rax
	movb	$0, -640(%rcx,%rax)
	call	strncat@PLT
	movl	12(%rsp), %ecx
	addl	$1, 4(%rsp)
	movl	8(%rsp), %eax
	movl	4(%rsp), %edx
	movl	%ecx, 8(%rsp)
	cmpl	%edx, 56(%rsp)
	jle	.L3
	movl	%eax, 12(%rsp)
	jmp	.L6
.L20:
	movq	%rbx, %r13
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%r13, %rdi
	call	puts@PLT
	jmp	.L2
.L7:
	movq	696(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L21
	addq	$712, %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
.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	"%s"
.LC2:
	.string	"-"
	.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
	subq	$712, %rsp
	.cfi_def_cfa_offset 768
	movq	%fs:40, %rax
	movq	%rax, 696(%rsp)
	xorl	%eax, %eax
	leaq	480(%rsp), %r15
	.p2align 4,,10
	.p2align 3
.L2:
	xorl	%eax, %eax
	movq	%r15, %rsi
	leaq	.LC1(%rip), %rdi
	call	__isoc99_scanf@PLT
	cmpl	$-1, %eax
	je	.L7
	cmpw	$45, (%r15)
	je	.L7
	leaq	265(%rsp), %rbx
	movl	$201, %edx
	movq	%r15, %rsi
	movq	%rbx, %rdi
	call	__strcpy_chk@PLT
	leaq	56(%rsp), %rsi
	leaq	.LC0(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	56(%rsp), %eax
	testl	%eax, %eax
	jle	.L20
	leaq	60(%rsp), %rax
	movl	$0, 8(%rsp)
	movq	%rax, 40(%rsp)
	leaq	64(%rsp), %rax
	movl	$1, 12(%rsp)
	movl	$0, 4(%rsp)
	movq	%rax, 16(%rsp)
	.p2align 4,,10
	.p2align 3
.L6:
	movq	40(%rsp), %rsi
	leaq	.LC0(%rip), %rdi
	xorl	%eax, %eax
	xorl	%r14d, %r14d
	call	__isoc99_scanf@PLT
	movslq	12(%rsp), %rax
	movslq	60(%rsp), %rsi
	movslq	8(%rsp), %r12
	movq	16(%rsp), %rdi
	leaq	(%rax,%rax,4), %rdx
	movq	%rsi, %rbx
	movq	%rsi, 24(%rsp)
	leaq	-1(%rsi), %rbp
	leaq	(%rdx,%rdx,4), %rdx
	leaq	(%rax,%rdx,8), %rax
	addq	%rax, %rbx
	movq	%rax, 32(%rsp)
	leaq	(%r12,%r12,4), %rax
	leaq	(%rax,%rax,4), %rax
	addq	%rdi, %rbx
	leaq	(%r12,%rax,8), %r13
	addq	%rdi, %r13
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L5:
	movzbl	-1(%rbx,%r14), %eax
	movb	%al, -1(%r13,%r14)
.L4:
	movq	%r15, %rdi
	call	strlen@PLT
	movslq	%r14d, %rcx
	addq	$1, %r14
	movq	%rax, %r8
	leaq	0(%rbp,%r14), %rax
	cmpq	%rax, %r8
	ja	.L5
	leaq	(%r12,%r12,4), %rax
	movq	24(%rsp), %rdx
	movq	32(%rsp), %rsi
	movq	%r13, %rdi
	leaq	(%rax,%rax,4), %rax
	addq	16(%rsp), %rsi
	leaq	(%r12,%rax,8), %rax
	addq	$704, %rax
	addq	%rsp, %rax
	movb	$0, -640(%rcx,%rax)
	call	strncat@PLT
	movl	12(%rsp), %ecx
	addl	$1, 4(%rsp)
	movl	8(%rsp), %eax
	movl	4(%rsp), %edx
	movl	%ecx, 8(%rsp)
	cmpl	%edx, 56(%rsp)
	jle	.L3
	movl	%eax, 12(%rsp)
	jmp	.L6
.L20:
	movq	%rbx, %r13
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%r13, %rdi
	call	puts@PLT
	jmp	.L2
.L7:
	movq	696(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L21
	addq	$712, %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
.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>

#define swap(type, a, b) do{type tmp = a; a = b; b = tmp;}while(0);

int main(void)
{
	int n;
	char word[201], ans[2][201];
	int i, j, r0, r1, h;


	while(scanf("%s", word)!=EOF && strcmp(word, "-")!=0){
		r0 = 1;
		r1 = 0;
		strcpy(ans[r0], word);
		scanf("%d", &n);

		for(i=0;i<n;i++){
			swap(int, r0, r1);
//printf("%d %d\n", r0, r1);
			scanf("%d", &h);

			for(j=h;j<strlen(word);j++)
				ans[r0][j-h] = ans[r1][j];
			ans[r0][j-h] = '\0';
			strncat(ans[r0], ans[r1], h);
//printf("%s %s %s\n", word, ans[r0], ans[r1]);

		}

		printf("%s\n", ans[r0]);
	}

	return 0;
}
aaac
3
1
2
1
vwxyz
2
3
4
-
 caaa
3
1
2
1
vwxyz
2
3
4
-
 caaa
3
1
2
2
vxxyz
2
3
4
-
 ca`a
3
1
2
2
vwxyz
2
3
4
-
 caaa
3
1
0
2
vwxyz
2
3
4
-
 caaa
3
1
-1
2
vwxyz
2
3
4
-
 aaac
3
1
2
1
vwxyz
2
2
4
-
 ca`a
3
1
2
1
vwxyz
2
3
4
-
 ca`a
3
1
2
2
vwxyz
2
2
4
-
 caaa
3
1
0
2
vwxyz
2
3
2
-

aaac
xyzvw
 caaa
xyzvw
 aaac
xyzvx
 a`ac
xyzvw
 acaa
xyzvw
 acaa
xyzvw
 aaac
wxyzv
 ca`a
xyzvw
 a`ac
wxyzv
 acaa
vwxyz

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

```c
#include <stdio.h>
#include <string.h>

#define swap(type, a, b) do{type tmp = a; a = b; b = tmp;}while(0);

int main(void)
{
	int n;
	char word[201], ans[2][201];
	int i, j, r0, r1, h;


	while(scanf("%s", word)!=EOF && strcmp(word, "-")!=0){
		r0 = 1;
		r1 = 0;
		strcpy(ans[r0], word);
		scanf("%d", &n);

		for(i=0;i<n;i++){
			swap(int, r0, r1);
//printf("%d %d\n", r0, r1);
			scanf("%d", &h);

			for(j=h;j<strlen(word);j++)
				ans[r0][j-h] = ans[r1][j];
			ans[r0][j-h] = '\0';
			strncat(ans[r0], ans[r1], h);
//printf("%s %s %s\n", word, ans[r0], ans[r1]);

		}

		printf("%s\n", ans[r0]);
	}

	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%s"
.LC2:
	.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
	pushq	%rbx
	subq	$680, %rsp
	.cfi_offset 3, -24
	movq	%fs:40, %rax
	movq	%rax, -24(%rbp)
	xorl	%eax, %eax
	jmp	.L2
.L8:
	movl	$1, -668(%rbp)
	movl	$0, -664(%rbp)
	leaq	-656(%rbp), %rcx
	movl	-668(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rsi
	addq	%rsi, %rax
	salq	$3, %rax
	addq	%rdx, %rax
	leaq	(%rcx,%rax), %rdx
	leaq	-240(%rbp), %rax
	movq	%rax, %rsi
	movq	%rdx, %rdi
	call	strcpy@PLT
	leaq	-684(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -676(%rbp)
	jmp	.L3
.L6:
	movl	-668(%rbp), %eax
	movl	%eax, -660(%rbp)
	movl	-664(%rbp), %eax
	movl	%eax, -668(%rbp)
	movl	-660(%rbp), %eax
	movl	%eax, -664(%rbp)
	leaq	-680(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-680(%rbp), %eax
	movl	%eax, -672(%rbp)
	jmp	.L4
.L5:
	movl	-680(%rbp), %edx
	movl	-672(%rbp), %eax
	subl	%edx, %eax
	movl	%eax, %esi
	movl	-672(%rbp), %eax
	movslq	%eax, %rcx
	movl	-664(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdi
	addq	%rdi, %rax
	salq	$3, %rax
	addq	%rdx, %rax
	leaq	-16(%rax), %rax
	addq	%rbp, %rax
	addq	%rcx, %rax
	subq	$640, %rax
	movzbl	(%rax), %ecx
	movslq	%esi, %rsi
	movl	-668(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdi
	addq	%rdi, %rax
	salq	$3, %rax
	addq	%rdx, %rax
	leaq	-16(%rax), %rax
	addq	%rbp, %rax
	addq	%rsi, %rax
	subq	$640, %rax
	movb	%cl, (%rax)
	addl	$1, -672(%rbp)
.L4:
	movl	-672(%rbp), %eax
	movslq	%eax, %rbx
	leaq	-240(%rbp), %rax
	movq	%rax, %rdi
	call	strlen@PLT
	cmpq	%rax, %rbx
	jb	.L5
	movl	-680(%rbp), %edx
	movl	-672(%rbp), %eax
	subl	%edx, %eax
	movslq	%eax, %rcx
	movl	-668(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rsi
	addq	%rsi, %rax
	salq	$3, %rax
	addq	%rdx, %rax
	leaq	-16(%rax), %rax
	addq	%rbp, %rax
	addq	%rcx, %rax
	subq	$640, %rax
	movb	$0, (%rax)
	movl	-680(%rbp), %eax
	movslq	%eax, %rcx
	leaq	-656(%rbp), %rsi
	movl	-664(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdi
	addq	%rdi, %rax
	salq	$3, %rax
	addq	%rdx, %rax
	addq	%rax, %rsi
	leaq	-656(%rbp), %rdi
	movl	-668(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %r8
	addq	%r8, %rax
	salq	$3, %rax
	addq	%rdx, %rax
	addq	%rdi, %rax
	movq	%rcx, %rdx
	movq	%rax, %rdi
	call	strncat@PLT
	addl	$1, -676(%rbp)
.L3:
	movl	-684(%rbp), %eax
	cmpl	%eax, -676(%rbp)
	jl	.L6
	leaq	-656(%rbp), %rcx
	movl	-668(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rsi
	addq	%rsi, %rax
	salq	$3, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	movq	%rax, %rdi
	call	puts@PLT
.L2:
	leaq	-240(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	cmpl	$-1, %eax
	je	.L7
	leaq	-240(%rbp), %rax
	leaq	.LC2(%rip), %rdx
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	strcmp@PLT
	testl	%eax, %eax
	jne	.L8
.L7:
	movl	$0, %eax
	movq	-24(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L10
	call	__stack_chk_fail@PLT
.L10:
	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	"%s"
.LC2:
	.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
	pushq	%rbx
	subq	$680, %rsp
	.cfi_offset 3, -24
	movq	%fs:40, %rax
	movq	%rax, -24(%rbp)
	xorl	%eax, %eax
	jmp	.L2
.L8:
	movl	$1, -668(%rbp)
	movl	$0, -664(%rbp)
	leaq	-656(%rbp), %rcx
	movl	-668(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rsi
	addq	%rsi, %rax
	salq	$3, %rax
	addq	%rdx, %rax
	leaq	(%rcx,%rax), %rdx
	leaq	-240(%rbp), %rax
	movq	%rax, %rsi
	movq	%rdx, %rdi
	call	strcpy@PLT
	leaq	-684(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -676(%rbp)
	jmp	.L3
.L6:
	movl	-668(%rbp), %eax
	movl	%eax, -660(%rbp)
	movl	-664(%rbp), %eax
	movl	%eax, -668(%rbp)
	movl	-660(%rbp), %eax
	movl	%eax, -664(%rbp)
	leaq	-680(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-680(%rbp), %eax
	movl	%eax, -672(%rbp)
	jmp	.L4
.L5:
	movl	-680(%rbp), %edx
	movl	-672(%rbp), %eax
	subl	%edx, %eax
	movl	%eax, %esi
	movl	-672(%rbp), %eax
	movslq	%eax, %rcx
	movl	-664(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdi
	addq	%rdi, %rax
	salq	$3, %rax
	addq	%rdx, %rax
	leaq	-16(%rax), %rax
	addq	%rbp, %rax
	addq	%rcx, %rax
	subq	$640, %rax
	movzbl	(%rax), %ecx
	movslq	%esi, %rsi
	movl	-668(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdi
	addq	%rdi, %rax
	salq	$3, %rax
	addq	%rdx, %rax
	leaq	-16(%rax), %rax
	addq	%rbp, %rax
	addq	%rsi, %rax
	subq	$640, %rax
	movb	%cl, (%rax)
	addl	$1, -672(%rbp)
.L4:
	movl	-672(%rbp), %eax
	movslq	%eax, %rbx
	leaq	-240(%rbp), %rax
	movq	%rax, %rdi
	call	strlen@PLT
	cmpq	%rax, %rbx
	jb	.L5
	movl	-680(%rbp), %edx
	movl	-672(%rbp), %eax
	subl	%edx, %eax
	movslq	%eax, %rcx
	movl	-668(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rsi
	addq	%rsi, %rax
	salq	$3, %rax
	addq	%rdx, %rax
	leaq	-16(%rax), %rax
	addq	%rbp, %rax
	addq	%rcx, %rax
	subq	$640, %rax
	movb	$0, (%rax)
	movl	-680(%rbp), %eax
	movslq	%eax, %rcx
	leaq	-656(%rbp), %rsi
	movl	-664(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdi
	addq	%rdi, %rax
	salq	$3, %rax
	addq	%rdx, %rax
	addq	%rax, %rsi
	leaq	-656(%rbp), %rdi
	movl	-668(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %r8
	addq	%r8, %rax
	salq	$3, %rax
	addq	%rdx, %rax
	addq	%rdi, %rax
	movq	%rcx, %rdx
	movq	%rax, %rdi
	call	strncat@PLT
	addl	$1, -676(%rbp)
.L3:
	movl	-684(%rbp), %eax
	cmpl	%eax, -676(%rbp)
	jl	.L6
	leaq	-656(%rbp), %rcx
	movl	-668(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rsi
	addq	%rsi, %rax
	salq	$3, %rax
	addq	%rdx, %rax
	addq	%rcx, %rax
	movq	%rax, %rdi
	call	puts@PLT
.L2:
	leaq	-240(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	cmpl	$-1, %eax
	je	.L7
	leaq	-240(%rbp), %rax
	leaq	.LC2(%rip), %rdx
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	strcmp@PLT
	testl	%eax, %eax
	jne	.L8
.L7:
	movl	$0, %eax
	movq	-24(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L10
	call	__stack_chk_fail@PLT
.L10:
	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:
