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

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

int main(void){
	char s[500001];
	int a[500000], b[500000];
	scanf("%s", s);
	int n=strnlen(s, 500000)+1, i;
	a[0]=0;
	for(i=0; i<=n-2; i++){
		if(s[i]=='<'){
			a[i+1] = a[i]+1;
		}else{
			a[i+1] = 0;
		}
	}
	b[n-1]=0;
	for(i=n-2; i>=0; i--){
		if(s[i]=='>'){
			b[i] = b[i+1]+1;
		}else{
			b[i] = 0;
		}
	}
	long sum=0;
	for(i=0; i<n; i++){
		sum+=a[i]<b[i]?b[i]:a[i];
	}
	printf("%ld\n", sum);
}

```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%s"
.LC1:
	.string	"%ld\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	leaq	-4497408(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$2624, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-500016(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-500016(%rbp), %rax
	movl	$500000, %esi
	movq	%rax, %rdi
	call	strnlen@PLT
	addl	$1, %eax
	movl	%eax, -4500028(%rbp)
	movl	$0, -4500016(%rbp)
	movl	$0, -4500032(%rbp)
	jmp	.L2
.L5:
	movl	-4500032(%rbp), %eax
	cltq
	movzbl	-500016(%rbp,%rax), %eax
	cmpb	$60, %al
	jne	.L3
	movl	-4500032(%rbp), %eax
	cltq
	movl	-4500016(%rbp,%rax,4), %eax
	movl	-4500032(%rbp), %edx
	leal	1(%rdx), %ecx
	leal	1(%rax), %edx
	movslq	%ecx, %rax
	movl	%edx, -4500016(%rbp,%rax,4)
	jmp	.L4
.L3:
	movl	-4500032(%rbp), %eax
	addl	$1, %eax
	cltq
	movl	$0, -4500016(%rbp,%rax,4)
.L4:
	addl	$1, -4500032(%rbp)
.L2:
	movl	-4500028(%rbp), %eax
	subl	$1, %eax
	cmpl	%eax, -4500032(%rbp)
	jl	.L5
	movl	-4500028(%rbp), %eax
	subl	$1, %eax
	cltq
	movl	$0, -2500016(%rbp,%rax,4)
	movl	-4500028(%rbp), %eax
	subl	$2, %eax
	movl	%eax, -4500032(%rbp)
	jmp	.L6
.L9:
	movl	-4500032(%rbp), %eax
	cltq
	movzbl	-500016(%rbp,%rax), %eax
	cmpb	$62, %al
	jne	.L7
	movl	-4500032(%rbp), %eax
	addl	$1, %eax
	cltq
	movl	-2500016(%rbp,%rax,4), %eax
	leal	1(%rax), %edx
	movl	-4500032(%rbp), %eax
	cltq
	movl	%edx, -2500016(%rbp,%rax,4)
	jmp	.L8
.L7:
	movl	-4500032(%rbp), %eax
	cltq
	movl	$0, -2500016(%rbp,%rax,4)
.L8:
	subl	$1, -4500032(%rbp)
.L6:
	cmpl	$0, -4500032(%rbp)
	jns	.L9
	movq	$0, -4500024(%rbp)
	movl	$0, -4500032(%rbp)
	jmp	.L10
.L11:
	movl	-4500032(%rbp), %eax
	cltq
	movl	-4500016(%rbp,%rax,4), %edx
	movl	-4500032(%rbp), %eax
	cltq
	movl	-2500016(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	cmovge	%edx, %eax
	cltq
	addq	%rax, -4500024(%rbp)
	addl	$1, -4500032(%rbp)
.L10:
	movl	-4500032(%rbp), %eax
	cmpl	-4500028(%rbp), %eax
	jl	.L11
	movq	-4500024(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L13
	call	__stack_chk_fail@PLT
.L13:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.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	"%s"
.LC1:
	.string	"%ld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB51:
	.cfi_startproc
	endbr64
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	leaq	-4497408(%rsp), %r11
	.cfi_def_cfa 11, 4497424
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$2608, %rsp
	.cfi_def_cfa_offset 4500032
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 4500008(%rsp)
	xorl	%eax, %eax
	leaq	4000000(%rsp), %rbx
	movq	%rbx, %rsi
	call	__isoc99_scanf@PLT
	movq	%rbx, %rdi
	movl	$500000, %esi
	call	strnlen@PLT
	movl	$0, (%rsp)
	movq	%rax, %r8
	leal	1(%rax), %edi
	testq	%rax, %rax
	je	.L24
	leal	-1(%r8), %r9d
	movq	%rbx, %rax
	leaq	4(%rsp), %rdx
	movl	%r9d, %ecx
	leaq	4000001(%rsp,%rcx), %rsi
	.p2align 4,,10
	.p2align 3
.L8:
	cmpb	$60, (%rax)
	je	.L25
	addq	$1, %rax
	movl	$0, (%rdx)
	addq	$4, %rdx
	cmpq	%rsi, %rax
	jne	.L8
.L7:
	movslq	%r8d, %rax
	leaq	2000000(%rsp), %rdx
	movl	$0, 2000000(%rsp,%rax,4)
	movslq	%r9d, %rax
	cmpl	$-1, %r9d
	je	.L4
	.p2align 4,,10
	.p2align 3
.L11:
	cmpb	$62, (%rbx,%rax)
	je	.L26
	movl	$0, (%rdx,%rax,4)
	subq	$1, %rax
	testl	%eax, %eax
	jns	.L11
.L4:
	cmpq	$2, %r8
	jbe	.L27
	movl	%edi, %ecx
	xorl	%eax, %eax
	pxor	%xmm2, %xmm2
	movq	%rsp, %rsi
	shrl	$2, %ecx
	leaq	2000000(%rsp), %rdx
	pxor	%xmm4, %xmm4
	salq	$4, %rcx
	.p2align 4,,10
	.p2align 3
.L12:
	movdqa	(%rsi,%rax), %xmm1
	movdqa	%xmm1, %xmm0
	pcmpgtd	(%rdx,%rax), %xmm0
	pand	%xmm0, %xmm1
	pandn	(%rdx,%rax), %xmm0
	addq	$16, %rax
	por	%xmm1, %xmm0
	movdqa	%xmm4, %xmm1
	pcmpgtd	%xmm0, %xmm1
	movdqa	%xmm0, %xmm3
	punpckldq	%xmm1, %xmm3
	punpckhdq	%xmm1, %xmm0
	paddq	%xmm3, %xmm2
	paddq	%xmm0, %xmm2
	cmpq	%rax, %rcx
	jne	.L12
	movdqa	%xmm2, %xmm0
	movl	%edi, %eax
	psrldq	$8, %xmm0
	andl	$-4, %eax
	paddq	%xmm0, %xmm2
	movq	%xmm2, %rdx
	testb	$3, %dil
	je	.L13
.L14:
	movslq	%eax, %rsi
	movslq	2000000(%rsp,%rsi,4), %rcx
	movslq	(%rsp,%rsi,4), %rsi
	cmpl	%esi, %ecx
	cmovl	%rsi, %rcx
	addq	%rcx, %rdx
	leal	1(%rax), %ecx
	cmpl	%ecx, %edi
	jle	.L13
	movslq	%ecx, %rsi
	movslq	2000000(%rsp,%rsi,4), %rcx
	movslq	(%rsp,%rsi,4), %rsi
	cmpl	%esi, %ecx
	cmovl	%rsi, %rcx
	addl	$2, %eax
	addq	%rcx, %rdx
	cmpl	%edi, %eax
	jge	.L13
	cltq
	movslq	2000000(%rsp,%rax,4), %rcx
	movslq	(%rsp,%rax,4), %rax
	cmpl	%eax, %ecx
	cmovl	%rax, %rcx
	addq	%rcx, %rdx
.L13:
	xorl	%eax, %eax
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	4500008(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L28
	addq	$4500016, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 16
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L25:
	.cfi_restore_state
	movl	-4(%rdx), %ecx
	addq	$1, %rax
	addq	$4, %rdx
	addl	$1, %ecx
	movl	%ecx, -4(%rdx)
	cmpq	%rsi, %rax
	jne	.L8
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L26:
	leal	1(%rax), %ecx
	movslq	%ecx, %rcx
	movl	2000000(%rsp,%rcx,4), %ecx
	addl	$1, %ecx
	movl	%ecx, (%rdx,%rax,4)
	subq	$1, %rax
	testl	%eax, %eax
	jns	.L11
	jmp	.L4
.L24:
	orl	$-1, %r9d
	jmp	.L7
.L27:
	xorl	%edx, %edx
	xorl	%eax, %eax
	jmp	.L14
.L28:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE51:
	.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	"%s"
.LC1:
	.string	"%ld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB51:
	.cfi_startproc
	endbr64
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	leaq	-4497408(%rsp), %r11
	.cfi_def_cfa 11, 4497424
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$2608, %rsp
	.cfi_def_cfa_offset 4500032
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 4500008(%rsp)
	xorl	%eax, %eax
	leaq	4000000(%rsp), %rbx
	movq	%rbx, %rsi
	call	__isoc99_scanf@PLT
	movq	%rbx, %rdi
	movl	$500000, %esi
	call	strnlen@PLT
	movl	$0, (%rsp)
	movq	%rax, %r8
	leal	1(%rax), %edi
	testq	%rax, %rax
	je	.L24
	leal	-1(%r8), %r9d
	movq	%rbx, %rax
	leaq	4(%rsp), %rdx
	movl	%r9d, %ecx
	leaq	4000001(%rsp,%rcx), %rsi
	.p2align 4,,10
	.p2align 3
.L8:
	cmpb	$60, (%rax)
	je	.L25
	addq	$1, %rax
	movl	$0, (%rdx)
	addq	$4, %rdx
	cmpq	%rsi, %rax
	jne	.L8
.L7:
	movslq	%r8d, %rax
	leaq	2000000(%rsp), %rdx
	movl	$0, 2000000(%rsp,%rax,4)
	movslq	%r9d, %rax
	cmpl	$-1, %r9d
	je	.L4
	.p2align 4,,10
	.p2align 3
.L11:
	cmpb	$62, (%rbx,%rax)
	je	.L26
	movl	$0, (%rdx,%rax,4)
	subq	$1, %rax
	testl	%eax, %eax
	jns	.L11
.L4:
	cmpq	$2, %r8
	jbe	.L27
	movl	%edi, %ecx
	xorl	%eax, %eax
	pxor	%xmm2, %xmm2
	movq	%rsp, %rsi
	shrl	$2, %ecx
	leaq	2000000(%rsp), %rdx
	pxor	%xmm4, %xmm4
	salq	$4, %rcx
	.p2align 4,,10
	.p2align 3
.L12:
	movdqa	(%rsi,%rax), %xmm1
	movdqa	%xmm1, %xmm0
	pcmpgtd	(%rdx,%rax), %xmm0
	pand	%xmm0, %xmm1
	pandn	(%rdx,%rax), %xmm0
	addq	$16, %rax
	por	%xmm1, %xmm0
	movdqa	%xmm4, %xmm1
	pcmpgtd	%xmm0, %xmm1
	movdqa	%xmm0, %xmm3
	punpckldq	%xmm1, %xmm3
	punpckhdq	%xmm1, %xmm0
	paddq	%xmm3, %xmm2
	paddq	%xmm0, %xmm2
	cmpq	%rax, %rcx
	jne	.L12
	movdqa	%xmm2, %xmm0
	movl	%edi, %eax
	psrldq	$8, %xmm0
	andl	$-4, %eax
	paddq	%xmm0, %xmm2
	movq	%xmm2, %rdx
	testb	$3, %dil
	je	.L13
.L14:
	movslq	%eax, %rsi
	movslq	2000000(%rsp,%rsi,4), %rcx
	movslq	(%rsp,%rsi,4), %rsi
	cmpl	%esi, %ecx
	cmovl	%rsi, %rcx
	addq	%rcx, %rdx
	leal	1(%rax), %ecx
	cmpl	%ecx, %edi
	jle	.L13
	movslq	%ecx, %rsi
	movslq	2000000(%rsp,%rsi,4), %rcx
	movslq	(%rsp,%rsi,4), %rsi
	cmpl	%esi, %ecx
	cmovl	%rsi, %rcx
	addl	$2, %eax
	addq	%rcx, %rdx
	cmpl	%edi, %eax
	jge	.L13
	cltq
	movslq	2000000(%rsp,%rax,4), %rcx
	movslq	(%rsp,%rax,4), %rax
	cmpl	%eax, %ecx
	cmovl	%rax, %rcx
	addq	%rcx, %rdx
.L13:
	xorl	%eax, %eax
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	4500008(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L28
	addq	$4500016, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 16
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L25:
	.cfi_restore_state
	movl	-4(%rdx), %ecx
	addq	$1, %rax
	addq	$4, %rdx
	addl	$1, %ecx
	movl	%ecx, -4(%rdx)
	cmpq	%rsi, %rax
	jne	.L8
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L26:
	leal	1(%rax), %ecx
	movslq	%ecx, %rcx
	movl	2000000(%rsp,%rcx,4), %ecx
	addl	$1, %ecx
	movl	%ecx, (%rdx,%rax,4)
	subq	$1, %rax
	testl	%eax, %eax
	jns	.L11
	jmp	.L4
.L24:
	orl	$-1, %r9d
	jmp	.L7
.L27:
	xorl	%edx, %edx
	xorl	%eax, %eax
	jmp	.L14
.L28:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE51:
	.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 <limits.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

int main(void){
	char s[500001];
	int a[500000], b[500000];
	scanf("%s", s);
	int n=strnlen(s, 500000)+1, i;
	a[0]=0;
	for(i=0; i<=n-2; i++){
		if(s[i]=='<'){
			a[i+1] = a[i]+1;
		}else{
			a[i+1] = 0;
		}
	}
	b[n-1]=0;
	for(i=n-2; i>=0; i--){
		if(s[i]=='>'){
			b[i] = b[i+1]+1;
		}else{
			b[i] = 0;
		}
	}
	long sum=0;
	for(i=0; i<n; i++){
		sum+=a[i]<b[i]?b[i]:a[i];
	}
	printf("%ld\n", sum);
}


>><
 <>>><<<<<><<>>><
 ><>
 <>>>><<<<><<<>><
 <>><<<><<<<>>>><
 <<>><<><<<<>>>><
 <>>>><<<<><<>><<
 <>>>>><<<><<<><<
 <>>><>><<><<<><<
 <<><<<><<>><>>><

4
 29
 2
 28
 26
 24
 27
 30
 21
 20

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

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

int main(void){
	char s[500001];
	int a[500000], b[500000];
	scanf("%s", s);
	int n=strnlen(s, 500000)+1, i;
	a[0]=0;
	for(i=0; i<=n-2; i++){
		if(s[i]=='<'){
			a[i+1] = a[i]+1;
		}else{
			a[i+1] = 0;
		}
	}
	b[n-1]=0;
	for(i=n-2; i>=0; i--){
		if(s[i]=='>'){
			b[i] = b[i+1]+1;
		}else{
			b[i] = 0;
		}
	}
	long sum=0;
	for(i=0; i<n; i++){
		sum+=a[i]<b[i]?b[i]:a[i];
	}
	printf("%ld\n", sum);
}

```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%s"
.LC1:
	.string	"%ld\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	leaq	-4497408(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$2624, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-500016(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-500016(%rbp), %rax
	movl	$500000, %esi
	movq	%rax, %rdi
	call	strnlen@PLT
	addl	$1, %eax
	movl	%eax, -4500028(%rbp)
	movl	$0, -4500016(%rbp)
	movl	$0, -4500032(%rbp)
	jmp	.L2
.L5:
	movl	-4500032(%rbp), %eax
	cltq
	movzbl	-500016(%rbp,%rax), %eax
	cmpb	$60, %al
	jne	.L3
	movl	-4500032(%rbp), %eax
	cltq
	movl	-4500016(%rbp,%rax,4), %eax
	movl	-4500032(%rbp), %edx
	leal	1(%rdx), %ecx
	leal	1(%rax), %edx
	movslq	%ecx, %rax
	movl	%edx, -4500016(%rbp,%rax,4)
	jmp	.L4
.L3:
	movl	-4500032(%rbp), %eax
	addl	$1, %eax
	cltq
	movl	$0, -4500016(%rbp,%rax,4)
.L4:
	addl	$1, -4500032(%rbp)
.L2:
	movl	-4500028(%rbp), %eax
	subl	$1, %eax
	cmpl	%eax, -4500032(%rbp)
	jl	.L5
	movl	-4500028(%rbp), %eax
	subl	$1, %eax
	cltq
	movl	$0, -2500016(%rbp,%rax,4)
	movl	-4500028(%rbp), %eax
	subl	$2, %eax
	movl	%eax, -4500032(%rbp)
	jmp	.L6
.L9:
	movl	-4500032(%rbp), %eax
	cltq
	movzbl	-500016(%rbp,%rax), %eax
	cmpb	$62, %al
	jne	.L7
	movl	-4500032(%rbp), %eax
	addl	$1, %eax
	cltq
	movl	-2500016(%rbp,%rax,4), %eax
	leal	1(%rax), %edx
	movl	-4500032(%rbp), %eax
	cltq
	movl	%edx, -2500016(%rbp,%rax,4)
	jmp	.L8
.L7:
	movl	-4500032(%rbp), %eax
	cltq
	movl	$0, -2500016(%rbp,%rax,4)
.L8:
	subl	$1, -4500032(%rbp)
.L6:
	cmpl	$0, -4500032(%rbp)
	jns	.L9
	movq	$0, -4500024(%rbp)
	movl	$0, -4500032(%rbp)
	jmp	.L10
.L11:
	movl	-4500032(%rbp), %eax
	cltq
	movl	-4500016(%rbp,%rax,4), %edx
	movl	-4500032(%rbp), %eax
	cltq
	movl	-2500016(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	cmovge	%edx, %eax
	cltq
	addq	%rax, -4500024(%rbp)
	addl	$1, -4500032(%rbp)
.L10:
	movl	-4500032(%rbp), %eax
	cmpl	-4500028(%rbp), %eax
	jl	.L11
	movq	-4500024(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L13
	call	__stack_chk_fail@PLT
.L13:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.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	"%s"
.LC1:
	.string	"%ld\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	leaq	-4497408(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$2624, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-500016(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-500016(%rbp), %rax
	movl	$500000, %esi
	movq	%rax, %rdi
	call	strnlen@PLT
	addl	$1, %eax
	movl	%eax, -4500028(%rbp)
	movl	$0, -4500016(%rbp)
	movl	$0, -4500032(%rbp)
	jmp	.L2
.L5:
	movl	-4500032(%rbp), %eax
	cltq
	movzbl	-500016(%rbp,%rax), %eax
	cmpb	$60, %al
	jne	.L3
	movl	-4500032(%rbp), %eax
	cltq
	movl	-4500016(%rbp,%rax,4), %eax
	movl	-4500032(%rbp), %edx
	leal	1(%rdx), %ecx
	leal	1(%rax), %edx
	movslq	%ecx, %rax
	movl	%edx, -4500016(%rbp,%rax,4)
	jmp	.L4
.L3:
	movl	-4500032(%rbp), %eax
	addl	$1, %eax
	cltq
	movl	$0, -4500016(%rbp,%rax,4)
.L4:
	addl	$1, -4500032(%rbp)
.L2:
	movl	-4500028(%rbp), %eax
	subl	$1, %eax
	cmpl	%eax, -4500032(%rbp)
	jl	.L5
	movl	-4500028(%rbp), %eax
	subl	$1, %eax
	cltq
	movl	$0, -2500016(%rbp,%rax,4)
	movl	-4500028(%rbp), %eax
	subl	$2, %eax
	movl	%eax, -4500032(%rbp)
	jmp	.L6
.L9:
	movl	-4500032(%rbp), %eax
	cltq
	movzbl	-500016(%rbp,%rax), %eax
	cmpb	$62, %al
	jne	.L7
	movl	-4500032(%rbp), %eax
	addl	$1, %eax
	cltq
	movl	-2500016(%rbp,%rax,4), %eax
	leal	1(%rax), %edx
	movl	-4500032(%rbp), %eax
	cltq
	movl	%edx, -2500016(%rbp,%rax,4)
	jmp	.L8
.L7:
	movl	-4500032(%rbp), %eax
	cltq
	movl	$0, -2500016(%rbp,%rax,4)
.L8:
	subl	$1, -4500032(%rbp)
.L6:
	cmpl	$0, -4500032(%rbp)
	jns	.L9
	movq	$0, -4500024(%rbp)
	movl	$0, -4500032(%rbp)
	jmp	.L10
.L11:
	movl	-4500032(%rbp), %eax
	cltq
	movl	-4500016(%rbp,%rax,4), %edx
	movl	-4500032(%rbp), %eax
	cltq
	movl	-2500016(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	cmovge	%edx, %eax
	cltq
	addq	%rax, -4500024(%rbp)
	addl	$1, -4500032(%rbp)
.L10:
	movl	-4500032(%rbp), %eax
	cmpl	-4500028(%rbp), %eax
	jl	.L11
	movq	-4500024(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L13
	call	__stack_chk_fail@PLT
.L13:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.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:
