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>
#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);
}```

Assembly Code:

```assembly
	.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:
```

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"
.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
```assembly
	.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:
```
```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);
}```
Given the following C 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);
}```

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
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 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);
}```

Assembly Code:

```assembly
	.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:
```

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"
.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:
```