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

```c
// Aizu Vol-1 0130: Train
// 2017.8.3

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>

char *gets(char *);
char buf[1100], *p;
char ans[100], *a, *t;

int main()
{
	int i, n;

	gets(buf);
	n = atoi(buf);
	for (i = 0; i < n; i++) {
		gets(p = buf);
		memset(ans, 0, sizeof(ans));
		t = a = ans + 50;
		while (*p) {
			if (isspace(*p)) p++;
			if (!*p) break;
			if (isalpha(*p)) {
				if (!*a) *a = *p;
				else if (*a != *p) while (1);
			}
			else if (*p == '<') {
				if (*++p != '-') while (1);
				a--;
				if (a < t) t = a;
			}
			else if (*p == '-') {
				if (*++p != '>') while (1);
				a++;
			}
			p++;
		}
		puts(t);
	}
	return 0;
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB53:
	.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	buf(%rip), %rbx
	movq	%rbx, %rdi
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	call	gets@PLT
	movl	$10, %edx
	xorl	%esi, %esi
	movq	%rbx, %rdi
	call	strtol@PLT
	movl	%eax, 12(%rsp)
	testl	%eax, %eax
	jle	.L29
	xorl	%ebp, %ebp
	leaq	50+ans(%rip), %r12
	xorl	%r14d, %r14d
.L2:
	movq	%rbx, %rdi
	movq	%rbx, p(%rip)
	call	gets@PLT
	movl	$12, %ecx
	movq	%r14, %rax
	leaq	ans(%rip), %rdi
	rep stosq
	movq	p(%rip), %r15
	movq	%r12, a(%rip)
	movq	%r12, t(%rip)
	movl	$0, (%rdi)
	movzbl	(%r15), %r13d
	testb	%r13b, %r13b
	je	.L6
	call	__ctype_b_loc@PLT
	movq	%rax, %rdi
	jmp	.L16
	.p2align 4,,10
	.p2align 3
.L32:
	movq	a(%rip), %rsi
	movzbl	(%rsi), %eax
	testb	%al, %al
	jne	.L8
	movb	%r13b, (%rsi)
	movq	p(%rip), %rax
.L9:
	leaq	1(%rax), %r15
	movq	%r15, p(%rip)
	movzbl	1(%rax), %r13d
	testb	%r13b, %r13b
	je	.L6
.L16:
	movq	(%rdi), %rsi
	movsbq	%r13b, %rax
	testb	$32, 1(%rsi,%rax,2)
	je	.L5
	leaq	1(%r15), %rax
	movq	%rax, p(%rip)
	movzbl	1(%r15), %r13d
	testb	%r13b, %r13b
	je	.L6
	movq	%rax, %r15
	movsbq	%r13b, %rax
.L5:
	testb	$4, 1(%rsi,%rax,2)
	jne	.L32
	leaq	1(%r15), %rax
	cmpb	$60, %r13b
	je	.L33
	cmpb	$45, %r13b
	je	.L34
.L19:
	movq	%r15, %rax
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L8:
	cmpb	%r13b, %al
	je	.L19
.L10:
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L33:
	movq	%rax, p(%rip)
	cmpb	$45, 1(%r15)
	jne	.L13
	movq	a(%rip), %rcx
	leaq	-1(%rcx), %rdx
	cmpq	t(%rip), %rdx
	movq	%rdx, a(%rip)
	jnb	.L9
	movq	%rdx, t(%rip)
	jmp	.L9
.L13:
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L34:
	movq	%rax, p(%rip)
	cmpb	$62, 1(%r15)
	jne	.L15
	addq	$1, a(%rip)
	jmp	.L9
.L15:
	jmp	.L15
	.p2align 4,,10
	.p2align 3
.L6:
	movq	t(%rip), %rdi
	addl	$1, %ebp
	call	puts@PLT
	cmpl	12(%rsp), %ebp
	jne	.L2
.L29:
	addq	$24, %rsp
	.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
	.cfi_endproc
.LFE53:
	.size	main, .-main
	.globl	t
	.bss
	.align 8
	.type	t, @object
	.size	t, 8
t:
	.zero	8
	.globl	a
	.align 8
	.type	a, @object
	.size	a, 8
a:
	.zero	8
	.globl	ans
	.align 32
	.type	ans, @object
	.size	ans, 100
ans:
	.zero	100
	.globl	p
	.align 8
	.type	p, @object
	.size	p, 8
p:
	.zero	8
	.globl	buf
	.align 32
	.type	buf, @object
	.size	buf, 1100
buf:
	.zero	1100
	.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	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB53:
	.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	buf(%rip), %rbx
	movq	%rbx, %rdi
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	call	gets@PLT
	movl	$10, %edx
	xorl	%esi, %esi
	movq	%rbx, %rdi
	call	strtol@PLT
	movl	%eax, 12(%rsp)
	testl	%eax, %eax
	jle	.L29
	xorl	%ebp, %ebp
	leaq	50+ans(%rip), %r12
	xorl	%r14d, %r14d
.L2:
	movq	%rbx, %rdi
	movq	%rbx, p(%rip)
	call	gets@PLT
	movl	$12, %ecx
	movq	%r14, %rax
	leaq	ans(%rip), %rdi
	rep stosq
	movq	p(%rip), %r15
	movq	%r12, a(%rip)
	movq	%r12, t(%rip)
	movl	$0, (%rdi)
	movzbl	(%r15), %r13d
	testb	%r13b, %r13b
	je	.L6
	call	__ctype_b_loc@PLT
	movq	%rax, %rdi
	jmp	.L16
	.p2align 4,,10
	.p2align 3
.L32:
	movq	a(%rip), %rsi
	movzbl	(%rsi), %eax
	testb	%al, %al
	jne	.L8
	movb	%r13b, (%rsi)
	movq	p(%rip), %rax
.L9:
	leaq	1(%rax), %r15
	movq	%r15, p(%rip)
	movzbl	1(%rax), %r13d
	testb	%r13b, %r13b
	je	.L6
.L16:
	movq	(%rdi), %rsi
	movsbq	%r13b, %rax
	testb	$32, 1(%rsi,%rax,2)
	je	.L5
	leaq	1(%r15), %rax
	movq	%rax, p(%rip)
	movzbl	1(%r15), %r13d
	testb	%r13b, %r13b
	je	.L6
	movq	%rax, %r15
	movsbq	%r13b, %rax
.L5:
	testb	$4, 1(%rsi,%rax,2)
	jne	.L32
	leaq	1(%r15), %rax
	cmpb	$60, %r13b
	je	.L33
	cmpb	$45, %r13b
	je	.L34
.L19:
	movq	%r15, %rax
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L8:
	cmpb	%r13b, %al
	je	.L19
.L10:
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L33:
	movq	%rax, p(%rip)
	cmpb	$45, 1(%r15)
	jne	.L13
	movq	a(%rip), %rcx
	leaq	-1(%rcx), %rdx
	cmpq	t(%rip), %rdx
	movq	%rdx, a(%rip)
	jnb	.L9
	movq	%rdx, t(%rip)
	jmp	.L9
.L13:
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L34:
	movq	%rax, p(%rip)
	cmpb	$62, 1(%r15)
	jne	.L15
	addq	$1, a(%rip)
	jmp	.L9
.L15:
	jmp	.L15
	.p2align 4,,10
	.p2align 3
.L6:
	movq	t(%rip), %rdi
	addl	$1, %ebp
	call	puts@PLT
	cmpl	12(%rsp), %ebp
	jne	.L2
.L29:
	addq	$24, %rsp
	.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
	.cfi_endproc
.LFE53:
	.size	main, .-main
	.globl	t
	.bss
	.align 8
	.type	t, @object
	.size	t, 8
t:
	.zero	8
	.globl	a
	.align 8
	.type	a, @object
	.size	a, 8
a:
	.zero	8
	.globl	ans
	.align 32
	.type	ans, @object
	.size	ans, 100
ans:
	.zero	100
	.globl	p
	.align 8
	.type	p, @object
	.size	p, 8
p:
	.zero	8
	.globl	buf
	.align 32
	.type	buf, @object
	.size	buf, 1100
buf:
	.zero	1100
	.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	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB53:
	.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	buf(%rip), %rbx
	movq	%rbx, %rdi
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	call	gets@PLT
	movl	$10, %edx
	xorl	%esi, %esi
	movq	%rbx, %rdi
	call	strtol@PLT
	movl	%eax, 12(%rsp)
	testl	%eax, %eax
	jle	.L29
	xorl	%ebp, %ebp
	leaq	50+ans(%rip), %r12
	xorl	%r14d, %r14d
.L2:
	movq	%rbx, %rdi
	movq	%rbx, p(%rip)
	call	gets@PLT
	movl	$12, %ecx
	movq	%r14, %rax
	leaq	ans(%rip), %rdi
	rep stosq
	movq	p(%rip), %r15
	movq	%r12, a(%rip)
	movq	%r12, t(%rip)
	movl	$0, (%rdi)
	movzbl	(%r15), %r13d
	testb	%r13b, %r13b
	je	.L6
	call	__ctype_b_loc@PLT
	movq	%rax, %rdi
	jmp	.L16
	.p2align 4,,10
	.p2align 3
.L32:
	movq	a(%rip), %rsi
	movzbl	(%rsi), %eax
	testb	%al, %al
	jne	.L8
	movb	%r13b, (%rsi)
	movq	p(%rip), %rax
.L9:
	leaq	1(%rax), %r15
	movq	%r15, p(%rip)
	movzbl	1(%rax), %r13d
	testb	%r13b, %r13b
	je	.L6
.L16:
	movq	(%rdi), %rsi
	movsbq	%r13b, %rax
	testb	$32, 1(%rsi,%rax,2)
	je	.L5
	leaq	1(%r15), %rax
	movq	%rax, p(%rip)
	movzbl	1(%r15), %r13d
	testb	%r13b, %r13b
	je	.L6
	movq	%rax, %r15
	movsbq	%r13b, %rax
.L5:
	testb	$4, 1(%rsi,%rax,2)
	jne	.L32
	leaq	1(%r15), %rax
	cmpb	$60, %r13b
	je	.L33
	cmpb	$45, %r13b
	je	.L34
.L19:
	movq	%r15, %rax
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L8:
	cmpb	%r13b, %al
	je	.L19
.L10:
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L33:
	movq	%rax, p(%rip)
	cmpb	$45, 1(%r15)
	jne	.L13
	movq	a(%rip), %rcx
	leaq	-1(%rcx), %rdx
	cmpq	t(%rip), %rdx
	movq	%rdx, a(%rip)
	jnb	.L9
	movq	%rdx, t(%rip)
	jmp	.L9
.L13:
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L34:
	movq	%rax, p(%rip)
	cmpb	$62, 1(%r15)
	jne	.L15
	addq	$1, a(%rip)
	jmp	.L9
.L15:
	jmp	.L15
	.p2align 4,,10
	.p2align 3
.L6:
	movq	t(%rip), %rdi
	addl	$1, %ebp
	call	puts@PLT
	cmpl	12(%rsp), %ebp
	jne	.L2
.L29:
	addq	$24, %rsp
	.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
	.cfi_endproc
.LFE53:
	.size	main, .-main
	.globl	t
	.bss
	.align 8
	.type	t, @object
	.size	t, 8
t:
	.zero	8
	.globl	a
	.align 8
	.type	a, @object
	.size	a, 8
a:
	.zero	8
	.globl	ans
	.align 32
	.type	ans, @object
	.size	ans, 100
ans:
	.zero	100
	.globl	p
	.align 8
	.type	p, @object
	.size	p, 8
p:
	.zero	8
	.globl	buf
	.align 32
	.type	buf, @object
	.size	buf, 1100
buf:
	.zero	1100
	.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
// Aizu Vol-1 0130: Train
// 2017.8.3

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>

char *gets(char *);
char buf[1100], *p;
char ans[100], *a, *t;

int main()
{
	int i, n;

	gets(buf);
	n = atoi(buf);
	for (i = 0; i < n; i++) {
		gets(p = buf);
		memset(ans, 0, sizeof(ans));
		t = a = ans + 50;
		while (*p) {
			if (isspace(*p)) p++;
			if (!*p) break;
			if (isalpha(*p)) {
				if (!*a) *a = *p;
				else if (*a != *p) while (1);
			}
			else if (*p == '<') {
				if (*++p != '-') while (1);
				a--;
				if (a < t) t = a;
			}
			else if (*p == '-') {
				if (*++p != '>') while (1);
				a++;
			}
			p++;
		}
		puts(t);
	}
	return 0;
}```
Given the following C code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
// Aizu Vol-1 0130: Train
// 2017.8.3

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>

char *gets(char *);
char buf[1100], *p;
char ans[100], *a, *t;

int main()
{
	int i, n;

	gets(buf);
	n = atoi(buf);
	for (i = 0; i < n; i++) {
		gets(p = buf);
		memset(ans, 0, sizeof(ans));
		t = a = ans + 50;
		while (*p) {
			if (isspace(*p)) p++;
			if (!*p) break;
			if (isalpha(*p)) {
				if (!*a) *a = *p;
				else if (*a != *p) while (1);
			}
			else if (*p == '<') {
				if (*++p != '-') while (1);
				a--;
				if (a < t) t = a;
			}
			else if (*p == '-') {
				if (*++p != '>') while (1);
				a++;
			}
			p++;
		}
		puts(t);
	}
	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
b
b
 aecbd
a
a
a
 afcbd
a
a
a
 afcbd



 aecbd
c
c
c
 afcbd
c
c
c
 
c
c
c
 
d
d
d
 aecbd
d
d
d
 aecbd




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

```c
// Aizu Vol-1 0130: Train
// 2017.8.3

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>

char *gets(char *);
char buf[1100], *p;
char ans[100], *a, *t;

int main()
{
	int i, n;

	gets(buf);
	n = atoi(buf);
	for (i = 0; i < n; i++) {
		gets(p = buf);
		memset(ans, 0, sizeof(ans));
		t = a = ans + 50;
		while (*p) {
			if (isspace(*p)) p++;
			if (!*p) break;
			if (isalpha(*p)) {
				if (!*a) *a = *p;
				else if (*a != *p) while (1);
			}
			else if (*p == '<') {
				if (*++p != '-') while (1);
				a--;
				if (a < t) t = a;
			}
			else if (*p == '-') {
				if (*++p != '>') while (1);
				a++;
			}
			p++;
		}
		puts(t);
	}
	return 0;
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB53:
	.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	buf(%rip), %rbx
	movq	%rbx, %rdi
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	call	gets@PLT
	movl	$10, %edx
	xorl	%esi, %esi
	movq	%rbx, %rdi
	call	strtol@PLT
	movl	%eax, 12(%rsp)
	testl	%eax, %eax
	jle	.L29
	xorl	%ebp, %ebp
	leaq	50+ans(%rip), %r12
	xorl	%r14d, %r14d
.L2:
	movq	%rbx, %rdi
	movq	%rbx, p(%rip)
	call	gets@PLT
	movl	$12, %ecx
	movq	%r14, %rax
	leaq	ans(%rip), %rdi
	rep stosq
	movq	p(%rip), %r15
	movq	%r12, a(%rip)
	movq	%r12, t(%rip)
	movl	$0, (%rdi)
	movzbl	(%r15), %r13d
	testb	%r13b, %r13b
	je	.L6
	call	__ctype_b_loc@PLT
	movq	%rax, %rdi
	jmp	.L16
	.p2align 4,,10
	.p2align 3
.L32:
	movq	a(%rip), %rsi
	movzbl	(%rsi), %eax
	testb	%al, %al
	jne	.L8
	movb	%r13b, (%rsi)
	movq	p(%rip), %rax
.L9:
	leaq	1(%rax), %r15
	movq	%r15, p(%rip)
	movzbl	1(%rax), %r13d
	testb	%r13b, %r13b
	je	.L6
.L16:
	movq	(%rdi), %rsi
	movsbq	%r13b, %rax
	testb	$32, 1(%rsi,%rax,2)
	je	.L5
	leaq	1(%r15), %rax
	movq	%rax, p(%rip)
	movzbl	1(%r15), %r13d
	testb	%r13b, %r13b
	je	.L6
	movq	%rax, %r15
	movsbq	%r13b, %rax
.L5:
	testb	$4, 1(%rsi,%rax,2)
	jne	.L32
	leaq	1(%r15), %rax
	cmpb	$60, %r13b
	je	.L33
	cmpb	$45, %r13b
	je	.L34
.L19:
	movq	%r15, %rax
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L8:
	cmpb	%r13b, %al
	je	.L19
.L10:
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L33:
	movq	%rax, p(%rip)
	cmpb	$45, 1(%r15)
	jne	.L13
	movq	a(%rip), %rcx
	leaq	-1(%rcx), %rdx
	cmpq	t(%rip), %rdx
	movq	%rdx, a(%rip)
	jnb	.L9
	movq	%rdx, t(%rip)
	jmp	.L9
.L13:
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L34:
	movq	%rax, p(%rip)
	cmpb	$62, 1(%r15)
	jne	.L15
	addq	$1, a(%rip)
	jmp	.L9
.L15:
	jmp	.L15
	.p2align 4,,10
	.p2align 3
.L6:
	movq	t(%rip), %rdi
	addl	$1, %ebp
	call	puts@PLT
	cmpl	12(%rsp), %ebp
	jne	.L2
.L29:
	addq	$24, %rsp
	.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
	.cfi_endproc
.LFE53:
	.size	main, .-main
	.globl	t
	.bss
	.align 8
	.type	t, @object
	.size	t, 8
t:
	.zero	8
	.globl	a
	.align 8
	.type	a, @object
	.size	a, 8
a:
	.zero	8
	.globl	ans
	.align 32
	.type	ans, @object
	.size	ans, 100
ans:
	.zero	100
	.globl	p
	.align 8
	.type	p, @object
	.size	p, 8
p:
	.zero	8
	.globl	buf
	.align 32
	.type	buf, @object
	.size	buf, 1100
buf:
	.zero	1100
	.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	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB53:
	.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	buf(%rip), %rbx
	movq	%rbx, %rdi
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	call	gets@PLT
	movl	$10, %edx
	xorl	%esi, %esi
	movq	%rbx, %rdi
	call	strtol@PLT
	movl	%eax, 12(%rsp)
	testl	%eax, %eax
	jle	.L29
	xorl	%ebp, %ebp
	leaq	50+ans(%rip), %r12
	xorl	%r14d, %r14d
.L2:
	movq	%rbx, %rdi
	movq	%rbx, p(%rip)
	call	gets@PLT
	movl	$12, %ecx
	movq	%r14, %rax
	leaq	ans(%rip), %rdi
	rep stosq
	movq	p(%rip), %r15
	movq	%r12, a(%rip)
	movq	%r12, t(%rip)
	movl	$0, (%rdi)
	movzbl	(%r15), %r13d
	testb	%r13b, %r13b
	je	.L6
	call	__ctype_b_loc@PLT
	movq	%rax, %rdi
	jmp	.L16
	.p2align 4,,10
	.p2align 3
.L32:
	movq	a(%rip), %rsi
	movzbl	(%rsi), %eax
	testb	%al, %al
	jne	.L8
	movb	%r13b, (%rsi)
	movq	p(%rip), %rax
.L9:
	leaq	1(%rax), %r15
	movq	%r15, p(%rip)
	movzbl	1(%rax), %r13d
	testb	%r13b, %r13b
	je	.L6
.L16:
	movq	(%rdi), %rsi
	movsbq	%r13b, %rax
	testb	$32, 1(%rsi,%rax,2)
	je	.L5
	leaq	1(%r15), %rax
	movq	%rax, p(%rip)
	movzbl	1(%r15), %r13d
	testb	%r13b, %r13b
	je	.L6
	movq	%rax, %r15
	movsbq	%r13b, %rax
.L5:
	testb	$4, 1(%rsi,%rax,2)
	jne	.L32
	leaq	1(%r15), %rax
	cmpb	$60, %r13b
	je	.L33
	cmpb	$45, %r13b
	je	.L34
.L19:
	movq	%r15, %rax
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L8:
	cmpb	%r13b, %al
	je	.L19
.L10:
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L33:
	movq	%rax, p(%rip)
	cmpb	$45, 1(%r15)
	jne	.L13
	movq	a(%rip), %rcx
	leaq	-1(%rcx), %rdx
	cmpq	t(%rip), %rdx
	movq	%rdx, a(%rip)
	jnb	.L9
	movq	%rdx, t(%rip)
	jmp	.L9
.L13:
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L34:
	movq	%rax, p(%rip)
	cmpb	$62, 1(%r15)
	jne	.L15
	addq	$1, a(%rip)
	jmp	.L9
.L15:
	jmp	.L15
	.p2align 4,,10
	.p2align 3
.L6:
	movq	t(%rip), %rdi
	addl	$1, %ebp
	call	puts@PLT
	cmpl	12(%rsp), %ebp
	jne	.L2
.L29:
	addq	$24, %rsp
	.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
	.cfi_endproc
.LFE53:
	.size	main, .-main
	.globl	t
	.bss
	.align 8
	.type	t, @object
	.size	t, 8
t:
	.zero	8
	.globl	a
	.align 8
	.type	a, @object
	.size	a, 8
a:
	.zero	8
	.globl	ans
	.align 32
	.type	ans, @object
	.size	ans, 100
ans:
	.zero	100
	.globl	p
	.align 8
	.type	p, @object
	.size	p, 8
p:
	.zero	8
	.globl	buf
	.align 32
	.type	buf, @object
	.size	buf, 1100
buf:
	.zero	1100
	.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:
```