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;
    int isused[26];
    char ans[36];
    char buf, arrow[3];
    char ctos[36];
    int n;
    
    scanf("%d", &n);
    getchar();
    while (n--){
        memset(ans, '\0', sizeof(ans));
        memset(isused, 0, sizeof(isused));
        scanf("%c", &buf);
        isused[buf - 'a'] = 1;
        
        ans[0] = buf;
        while (buf != '\n'){
            
            scanf("%[<>'-]", arrow);
            scanf("%c", &buf);
            
            if (buf != '\n' && isused[buf - 'a'] == 0){
                if (strcmp(arrow, "->") == 0){
                    ans[strlen(ans)] = buf;
                    ans[strlen(ans)] = '\0';
                }
                else if (strcmp(arrow, "<-") == 0){
                    for (i = strlen(ans); i > 0; i--){
                        ans[i] = ans[i - 1];
                    }
                    ans[0] = buf;
                }
                isused[buf - 'a'] = 1;
            }
        }
        printf("%s\n", ans);
    }
    
    return (0);
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%c"
.LC2:
	.string	"%[<>'-]"
.LC3:
	.string	"->"
.LC4:
	.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	$176, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-168(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	call	getchar@PLT
	jmp	.L2
.L9:
	leaq	-48(%rbp), %rax
	movl	$36, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	leaq	-160(%rbp), %rax
	movl	$104, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	leaq	-169(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movzbl	-169(%rbp), %eax
	movsbl	%al, %eax
	subl	$97, %eax
	cltq
	movl	$1, -160(%rbp,%rax,4)
	movzbl	-169(%rbp), %eax
	movb	%al, -48(%rbp)
	jmp	.L3
.L8:
	leaq	-51(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-169(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movzbl	-169(%rbp), %eax
	cmpb	$10, %al
	je	.L3
	movzbl	-169(%rbp), %eax
	movsbl	%al, %eax
	subl	$97, %eax
	cltq
	movl	-160(%rbp,%rax,4), %eax
	testl	%eax, %eax
	jne	.L3
	leaq	-51(%rbp), %rax
	leaq	.LC3(%rip), %rdx
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	strcmp@PLT
	testl	%eax, %eax
	jne	.L4
	leaq	-48(%rbp), %rax
	movq	%rax, %rdi
	call	strlen@PLT
	movzbl	-169(%rbp), %edx
	movb	%dl, -48(%rbp,%rax)
	leaq	-48(%rbp), %rax
	movq	%rax, %rdi
	call	strlen@PLT
	movb	$0, -48(%rbp,%rax)
	jmp	.L5
.L4:
	leaq	-51(%rbp), %rax
	leaq	.LC4(%rip), %rdx
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	strcmp@PLT
	testl	%eax, %eax
	jne	.L5
	leaq	-48(%rbp), %rax
	movq	%rax, %rdi
	call	strlen@PLT
	movl	%eax, -164(%rbp)
	jmp	.L6
.L7:
	movl	-164(%rbp), %eax
	subl	$1, %eax
	cltq
	movzbl	-48(%rbp,%rax), %edx
	movl	-164(%rbp), %eax
	cltq
	movb	%dl, -48(%rbp,%rax)
	subl	$1, -164(%rbp)
.L6:
	cmpl	$0, -164(%rbp)
	jg	.L7
	movzbl	-169(%rbp), %eax
	movb	%al, -48(%rbp)
.L5:
	movzbl	-169(%rbp), %eax
	movsbl	%al, %eax
	subl	$97, %eax
	cltq
	movl	$1, -160(%rbp,%rax,4)
.L3:
	movzbl	-169(%rbp), %eax
	cmpb	$10, %al
	jne	.L8
	leaq	-48(%rbp), %rax
	movq	%rax, %rdi
	call	puts@PLT
.L2:
	movl	-168(%rbp), %eax
	leal	-1(%rax), %edx
	movl	%edx, -168(%rbp)
	testl	%eax, %eax
	jne	.L9
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L11
	call	__stack_chk_fail@PLT
.L11:
	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"
.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
	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	$216, %rsp
	.cfi_def_cfa_offset 272
	movq	%fs:40, %rax
	movq	%rax, 200(%rsp)
	xorl	%eax, %eax
	leaq	44(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movq	stdin(%rip), %rdi
	call	getc@PLT
	movl	44(%rsp), %eax
	leal	-1(%rax), %edx
	movl	%edx, 44(%rsp)
	testl	%eax, %eax
	je	.L2
	leaq	48(%rsp), %rax
	leaq	160(%rsp), %rbx
	movq	%rax, 16(%rsp)
	leaq	161(%rsp), %rax
	leaq	43(%rsp), %r12
	movq	%rax, 24(%rsp)
	leaq	.LC1(%rip), %rbp
	leaq	.LC2(%rip), %r13
	.p2align 4,,10
	.p2align 3
.L10:
	movq	16(%rsp), %rdi
	xorl	%eax, %eax
	movl	$13, %ecx
	pxor	%xmm0, %xmm0
	movq	%r12, %rsi
	movl	$0, 32(%rbx)
	rep stosq
	movq	%rbp, %rdi
	movaps	%xmm0, (%rbx)
	movaps	%xmm0, 16(%rbx)
	call	__isoc99_scanf@PLT
	movsbl	43(%rsp), %eax
	movl	%eax, %edx
	subl	$97, %eax
	cltq
	movb	%dl, 160(%rsp)
	movl	$1, 48(%rsp,%rax,4)
	cmpb	$10, %dl
	je	.L3
	leaq	157(%rsp), %r14
	.p2align 4,,10
	.p2align 3
.L11:
	movq	%r14, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movq	%r12, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movzbl	43(%rsp), %r8d
	cmpb	$10, %r8b
	je	.L3
	movsbl	%r8b, %ecx
	subl	$97, %ecx
	movslq	%ecx, %r15
	movl	48(%rsp,%r15,4), %eax
	testl	%eax, %eax
	jne	.L11
	cmpb	$45, (%r14)
	jne	.L6
	cmpb	$62, 1(%r14)
	jne	.L6
	cmpb	$0, 2(%r14)
	jne	.L6
	movq	%rbx, %rdi
	movb	%r8b, 15(%rsp)
	call	strlen@PLT
	movzbl	15(%rsp), %r8d
	movq	%rbx, %rdi
	movb	%r8b, 160(%rsp,%rax)
	call	strlen@PLT
	movb	$0, 160(%rsp,%rax)
.L7:
	movl	$1, 48(%rsp,%r15,4)
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%rbx, %rdi
	call	puts@PLT
	movl	44(%rsp), %eax
	leal	-1(%rax), %edx
	movl	%edx, 44(%rsp)
	testl	%eax, %eax
	jne	.L10
.L2:
	movq	200(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L28
	addq	$216, %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
.L6:
	.cfi_restore_state
	cmpb	$60, (%r14)
	movb	%r8b, 15(%rsp)
	jne	.L7
	cmpb	$45, 1(%r14)
	jne	.L7
	cmpb	$0, 2(%r14)
	jne	.L7
	movq	%rbx, %rdi
	call	strlen@PLT
	movzbl	15(%rsp), %r8d
	testq	%rax, %rax
	je	.L9
	movslq	%eax, %rdx
	subl	$1, %eax
	movq	24(%rsp), %rdi
	leaq	-1(%rdx), %rsi
	cltq
	subq	%rax, %rsi
	addq	%rbx, %rsi
	call	memmove@PLT
	movzbl	15(%rsp), %r8d
.L9:
	movb	%r8b, 160(%rsp)
	jmp	.L7
.L28:
	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"
.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
	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	$216, %rsp
	.cfi_def_cfa_offset 272
	movq	%fs:40, %rax
	movq	%rax, 200(%rsp)
	xorl	%eax, %eax
	leaq	44(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movq	stdin(%rip), %rdi
	call	getc@PLT
	movl	44(%rsp), %eax
	leal	-1(%rax), %edx
	movl	%edx, 44(%rsp)
	testl	%eax, %eax
	je	.L2
	leaq	48(%rsp), %rax
	leaq	160(%rsp), %rbx
	movq	%rax, 16(%rsp)
	leaq	161(%rsp), %rax
	leaq	43(%rsp), %r12
	movq	%rax, 24(%rsp)
	leaq	.LC1(%rip), %rbp
	leaq	.LC2(%rip), %r13
	.p2align 4,,10
	.p2align 3
.L10:
	movq	16(%rsp), %rdi
	xorl	%eax, %eax
	movl	$13, %ecx
	pxor	%xmm0, %xmm0
	movq	%r12, %rsi
	movl	$0, 32(%rbx)
	rep stosq
	movq	%rbp, %rdi
	movaps	%xmm0, (%rbx)
	movaps	%xmm0, 16(%rbx)
	call	__isoc99_scanf@PLT
	movsbl	43(%rsp), %eax
	movl	%eax, %edx
	subl	$97, %eax
	cltq
	movb	%dl, 160(%rsp)
	movl	$1, 48(%rsp,%rax,4)
	cmpb	$10, %dl
	je	.L3
	leaq	157(%rsp), %r14
	.p2align 4,,10
	.p2align 3
.L11:
	movq	%r14, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movq	%r12, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movzbl	43(%rsp), %r8d
	cmpb	$10, %r8b
	je	.L3
	movsbl	%r8b, %ecx
	subl	$97, %ecx
	movslq	%ecx, %r15
	movl	48(%rsp,%r15,4), %eax
	testl	%eax, %eax
	jne	.L11
	cmpb	$45, (%r14)
	jne	.L6
	cmpb	$62, 1(%r14)
	jne	.L6
	cmpb	$0, 2(%r14)
	jne	.L6
	movq	%rbx, %rdi
	movb	%r8b, 15(%rsp)
	call	strlen@PLT
	movzbl	15(%rsp), %r8d
	movq	%rbx, %rdi
	movb	%r8b, 160(%rsp,%rax)
	call	strlen@PLT
	movb	$0, 160(%rsp,%rax)
.L7:
	movl	$1, 48(%rsp,%r15,4)
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%rbx, %rdi
	call	puts@PLT
	movl	44(%rsp), %eax
	leal	-1(%rax), %edx
	movl	%edx, 44(%rsp)
	testl	%eax, %eax
	jne	.L10
.L2:
	movq	200(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L28
	addq	$216, %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
.L6:
	.cfi_restore_state
	cmpb	$60, (%r14)
	movb	%r8b, 15(%rsp)
	jne	.L7
	cmpb	$45, 1(%r14)
	jne	.L7
	cmpb	$0, 2(%r14)
	jne	.L7
	movq	%rbx, %rdi
	call	strlen@PLT
	movzbl	15(%rsp), %r8d
	testq	%rax, %rax
	je	.L9
	movslq	%eax, %rdx
	subl	$1, %eax
	movq	24(%rsp), %rdi
	leaq	-1(%rdx), %rsi
	cltq
	subq	%rax, %rsi
	addq	%rbx, %rsi
	call	memmove@PLT
	movzbl	15(%rsp), %r8d
.L9:
	movb	%r8b, 160(%rsp)
	jmp	.L7
.L28:
	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;
    int isused[26];
    char ans[36];
    char buf, arrow[3];
    char ctos[36];
    int n;
    
    scanf("%d", &n);
    getchar();
    while (n--){
        memset(ans, '\0', sizeof(ans));
        memset(isused, 0, sizeof(isused));
        scanf("%c", &buf);
        isused[buf - 'a'] = 1;
        
        ans[0] = buf;
        while (buf != '\n'){
            
            scanf("%[<>'-]", arrow);
            scanf("%c", &buf);
            
            if (buf != '\n' && isused[buf - 'a'] == 0){
                if (strcmp(arrow, "->") == 0){
                    ans[strlen(ans)] = buf;
                    ans[strlen(ans)] = '\0';
                }
                else if (strcmp(arrow, "<-") == 0){
                    for (i = strlen(ans); i > 0; i--){
                        ans[i] = ans[i - 1];
                    }
                    ans[0] = buf;
                }
                isused[buf - 'a'] = 1;
            }
        }
        printf("%s\n", ans);
    }
    
    return (0);
}
4
a->f->c->b->d
b
 4
a->e->c->b->d
a
 4
a->f->c->b->d
a
 4
a->f->c->b->d
`
 4
a->e->c->b->d
c
 4
a->f->c->b->d
c
 4
`->f->c->b->d
c
 4
`->f->c->b->d
d
 4
a->e->c->b->d
d
 4
a->e->c->b->d
`

afcbd
b




 aecbd
a




 afcbd
a




 afcbd
`




 aecbd
c




 afcbd
c




 `fcbd
c




 `fcbd
d




 aecbd
d




 aecbd
`





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;
    int isused[26];
    char ans[36];
    char buf, arrow[3];
    char ctos[36];
    int n;
    
    scanf("%d", &n);
    getchar();
    while (n--){
        memset(ans, '\0', sizeof(ans));
        memset(isused, 0, sizeof(isused));
        scanf("%c", &buf);
        isused[buf - 'a'] = 1;
        
        ans[0] = buf;
        while (buf != '\n'){
            
            scanf("%[<>'-]", arrow);
            scanf("%c", &buf);
            
            if (buf != '\n' && isused[buf - 'a'] == 0){
                if (strcmp(arrow, "->") == 0){
                    ans[strlen(ans)] = buf;
                    ans[strlen(ans)] = '\0';
                }
                else if (strcmp(arrow, "<-") == 0){
                    for (i = strlen(ans); i > 0; i--){
                        ans[i] = ans[i - 1];
                    }
                    ans[0] = buf;
                }
                isused[buf - 'a'] = 1;
            }
        }
        printf("%s\n", ans);
    }
    
    return (0);
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%c"
.LC2:
	.string	"%[<>'-]"
.LC3:
	.string	"->"
.LC4:
	.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	$176, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-168(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	call	getchar@PLT
	jmp	.L2
.L9:
	leaq	-48(%rbp), %rax
	movl	$36, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	leaq	-160(%rbp), %rax
	movl	$104, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	leaq	-169(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movzbl	-169(%rbp), %eax
	movsbl	%al, %eax
	subl	$97, %eax
	cltq
	movl	$1, -160(%rbp,%rax,4)
	movzbl	-169(%rbp), %eax
	movb	%al, -48(%rbp)
	jmp	.L3
.L8:
	leaq	-51(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-169(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movzbl	-169(%rbp), %eax
	cmpb	$10, %al
	je	.L3
	movzbl	-169(%rbp), %eax
	movsbl	%al, %eax
	subl	$97, %eax
	cltq
	movl	-160(%rbp,%rax,4), %eax
	testl	%eax, %eax
	jne	.L3
	leaq	-51(%rbp), %rax
	leaq	.LC3(%rip), %rdx
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	strcmp@PLT
	testl	%eax, %eax
	jne	.L4
	leaq	-48(%rbp), %rax
	movq	%rax, %rdi
	call	strlen@PLT
	movzbl	-169(%rbp), %edx
	movb	%dl, -48(%rbp,%rax)
	leaq	-48(%rbp), %rax
	movq	%rax, %rdi
	call	strlen@PLT
	movb	$0, -48(%rbp,%rax)
	jmp	.L5
.L4:
	leaq	-51(%rbp), %rax
	leaq	.LC4(%rip), %rdx
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	strcmp@PLT
	testl	%eax, %eax
	jne	.L5
	leaq	-48(%rbp), %rax
	movq	%rax, %rdi
	call	strlen@PLT
	movl	%eax, -164(%rbp)
	jmp	.L6
.L7:
	movl	-164(%rbp), %eax
	subl	$1, %eax
	cltq
	movzbl	-48(%rbp,%rax), %edx
	movl	-164(%rbp), %eax
	cltq
	movb	%dl, -48(%rbp,%rax)
	subl	$1, -164(%rbp)
.L6:
	cmpl	$0, -164(%rbp)
	jg	.L7
	movzbl	-169(%rbp), %eax
	movb	%al, -48(%rbp)
.L5:
	movzbl	-169(%rbp), %eax
	movsbl	%al, %eax
	subl	$97, %eax
	cltq
	movl	$1, -160(%rbp,%rax,4)
.L3:
	movzbl	-169(%rbp), %eax
	cmpb	$10, %al
	jne	.L8
	leaq	-48(%rbp), %rax
	movq	%rax, %rdi
	call	puts@PLT
.L2:
	movl	-168(%rbp), %eax
	leal	-1(%rax), %edx
	movl	%edx, -168(%rbp)
	testl	%eax, %eax
	jne	.L9
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L11
	call	__stack_chk_fail@PLT
.L11:
	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"
.LC2:
	.string	"%[<>'-]"
.LC3:
	.string	"->"
.LC4:
	.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	$176, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-168(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	call	getchar@PLT
	jmp	.L2
.L9:
	leaq	-48(%rbp), %rax
	movl	$36, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	leaq	-160(%rbp), %rax
	movl	$104, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	leaq	-169(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movzbl	-169(%rbp), %eax
	movsbl	%al, %eax
	subl	$97, %eax
	cltq
	movl	$1, -160(%rbp,%rax,4)
	movzbl	-169(%rbp), %eax
	movb	%al, -48(%rbp)
	jmp	.L3
.L8:
	leaq	-51(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-169(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movzbl	-169(%rbp), %eax
	cmpb	$10, %al
	je	.L3
	movzbl	-169(%rbp), %eax
	movsbl	%al, %eax
	subl	$97, %eax
	cltq
	movl	-160(%rbp,%rax,4), %eax
	testl	%eax, %eax
	jne	.L3
	leaq	-51(%rbp), %rax
	leaq	.LC3(%rip), %rdx
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	strcmp@PLT
	testl	%eax, %eax
	jne	.L4
	leaq	-48(%rbp), %rax
	movq	%rax, %rdi
	call	strlen@PLT
	movzbl	-169(%rbp), %edx
	movb	%dl, -48(%rbp,%rax)
	leaq	-48(%rbp), %rax
	movq	%rax, %rdi
	call	strlen@PLT
	movb	$0, -48(%rbp,%rax)
	jmp	.L5
.L4:
	leaq	-51(%rbp), %rax
	leaq	.LC4(%rip), %rdx
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	strcmp@PLT
	testl	%eax, %eax
	jne	.L5
	leaq	-48(%rbp), %rax
	movq	%rax, %rdi
	call	strlen@PLT
	movl	%eax, -164(%rbp)
	jmp	.L6
.L7:
	movl	-164(%rbp), %eax
	subl	$1, %eax
	cltq
	movzbl	-48(%rbp,%rax), %edx
	movl	-164(%rbp), %eax
	cltq
	movb	%dl, -48(%rbp,%rax)
	subl	$1, -164(%rbp)
.L6:
	cmpl	$0, -164(%rbp)
	jg	.L7
	movzbl	-169(%rbp), %eax
	movb	%al, -48(%rbp)
.L5:
	movzbl	-169(%rbp), %eax
	movsbl	%al, %eax
	subl	$97, %eax
	cltq
	movl	$1, -160(%rbp,%rax,4)
.L3:
	movzbl	-169(%rbp), %eax
	cmpb	$10, %al
	jne	.L8
	leaq	-48(%rbp), %rax
	movq	%rax, %rdi
	call	puts@PLT
.L2:
	movl	-168(%rbp), %eax
	leal	-1(%rax), %edx
	movl	%edx, -168(%rbp)
	testl	%eax, %eax
	jne	.L9
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L11
	call	__stack_chk_fail@PLT
.L11:
	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:
