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){
  char s[500001];
  int len;
  scanf("%s",s );
  len=strlen(s);
  //printf("%d\n",len );

  int a[len+1],b[len+1],main[len+1];
  int count;
  long long sum;
//初期化
  for (int i = 0; i < len+1; i++) {
    a[i]=0;
    b[i]=0;
  }

  for (int i = 0; i < len; i++) {
    count=1;
    while (s[i]=='<') {
      a[i+1]=count;
      count++;
      //printf("%d",i );
      if (i>len) {
        break;
      }
      i++;
    }
  }
//puts("");

  for (int i = len; i >=0; i--) {
    count=1;
    while (s[i]=='>') {
      b[i]=count;
      count++;
      //printf("%d",i );
      if (i<=0) {
        break;
      }
      i--;
    }
  }
//puts("");



  for (int i = 0; i < len+1; i++) {
    if (a[i]>=b[i]) {
      main[i]=a[i];
    }else{
      main[i]=b[i];
    }
  }

  for (int i = 0; i < len+1; i++) {
    sum+=main[i];
  }
  //printf("%d",main[len+1] );
  //printf("\n");
  printf("%lld\n",sum );

  return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%s"
.LC1:
	.string	"%lld\n"
	.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	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	leaq	-499712(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$472, %rsp
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	movq	%rsp, %rax
	movq	%rax, %rbx
	leaq	-500064(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-500064(%rbp), %rax
	movq	%rax, %rdi
	call	strlen@PLT
	movl	%eax, -500124(%rbp)
	movl	-500124(%rbp), %eax
	leal	1(%rax), %edx
	movslq	%edx, %rax
	subq	$1, %rax
	movq	%rax, -500112(%rbp)
	movslq	%edx, %rax
	movq	%rax, -500176(%rbp)
	movq	$0, -500168(%rbp)
	movslq	%edx, %rax
	movq	%rax, -500192(%rbp)
	movq	$0, -500184(%rbp)
	movslq	%edx, %rax
	leaq	0(,%rax,4), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %esi
	movl	$0, %edx
	divq	%rsi
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L2:
	cmpq	%rdx, %rsp
	je	.L3
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L2
.L3:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L4
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L4:
	movq	%rsp, %rax
	addq	$3, %rax
	shrq	$2, %rax
	salq	$2, %rax
	movq	%rax, -500104(%rbp)
	movl	-500124(%rbp), %eax
	addl	$1, %eax
	movslq	%eax, %rdx
	subq	$1, %rdx
	movq	%rdx, -500096(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, -500208(%rbp)
	movq	$0, -500200(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, -500224(%rbp)
	movq	$0, -500216(%rbp)
	cltq
	leaq	0(,%rax,4), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %edi
	movl	$0, %edx
	divq	%rdi
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L5:
	cmpq	%rdx, %rsp
	je	.L6
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L5
.L6:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L7
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L7:
	movq	%rsp, %rax
	addq	$3, %rax
	shrq	$2, %rax
	salq	$2, %rax
	movq	%rax, -500088(%rbp)
	movl	-500124(%rbp), %eax
	addl	$1, %eax
	movslq	%eax, %rdx
	subq	$1, %rdx
	movq	%rdx, -500080(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, %r14
	movl	$0, %r15d
	movslq	%eax, %rdx
	movq	%rdx, %r12
	movl	$0, %r13d
	cltq
	leaq	0(,%rax,4), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %esi
	movl	$0, %edx
	divq	%rsi
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L8:
	cmpq	%rdx, %rsp
	je	.L9
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L8
.L9:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L10
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L10:
	movq	%rsp, %rax
	addq	$3, %rax
	shrq	$2, %rax
	salq	$2, %rax
	movq	%rax, -500072(%rbp)
	movl	$0, -500144(%rbp)
	jmp	.L11
.L12:
	movq	-500104(%rbp), %rax
	movl	-500144(%rbp), %edx
	movslq	%edx, %rdx
	movl	$0, (%rax,%rdx,4)
	movq	-500088(%rbp), %rax
	movl	-500144(%rbp), %edx
	movslq	%edx, %rdx
	movl	$0, (%rax,%rdx,4)
	addl	$1, -500144(%rbp)
.L11:
	movl	-500124(%rbp), %eax
	cmpl	-500144(%rbp), %eax
	jge	.L12
	movl	$0, -500140(%rbp)
	jmp	.L13
.L18:
	movl	$1, -500148(%rbp)
	jmp	.L14
.L17:
	movl	-500140(%rbp), %eax
	leal	1(%rax), %edx
	movq	-500104(%rbp), %rax
	movslq	%edx, %rdx
	movl	-500148(%rbp), %ecx
	movl	%ecx, (%rax,%rdx,4)
	addl	$1, -500148(%rbp)
	movl	-500140(%rbp), %eax
	cmpl	-500124(%rbp), %eax
	jg	.L33
	addl	$1, -500140(%rbp)
.L14:
	movl	-500140(%rbp), %eax
	cltq
	movzbl	-500064(%rbp,%rax), %eax
	cmpb	$60, %al
	je	.L17
	jmp	.L16
.L33:
	nop
.L16:
	addl	$1, -500140(%rbp)
.L13:
	movl	-500140(%rbp), %eax
	cmpl	-500124(%rbp), %eax
	jl	.L18
	movl	-500124(%rbp), %eax
	movl	%eax, -500136(%rbp)
	jmp	.L19
.L24:
	movl	$1, -500148(%rbp)
	jmp	.L20
.L23:
	movq	-500088(%rbp), %rax
	movl	-500136(%rbp), %edx
	movslq	%edx, %rdx
	movl	-500148(%rbp), %ecx
	movl	%ecx, (%rax,%rdx,4)
	addl	$1, -500148(%rbp)
	cmpl	$0, -500136(%rbp)
	jle	.L34
	subl	$1, -500136(%rbp)
.L20:
	movl	-500136(%rbp), %eax
	cltq
	movzbl	-500064(%rbp,%rax), %eax
	cmpb	$62, %al
	je	.L23
	jmp	.L22
.L34:
	nop
.L22:
	subl	$1, -500136(%rbp)
.L19:
	cmpl	$0, -500136(%rbp)
	jns	.L24
	movl	$0, -500132(%rbp)
	jmp	.L25
.L28:
	movq	-500104(%rbp), %rax
	movl	-500132(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %ecx
	movq	-500088(%rbp), %rax
	movl	-500132(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %eax
	cmpl	%eax, %ecx
	jl	.L26
	movq	-500104(%rbp), %rax
	movl	-500132(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %ecx
	movq	-500072(%rbp), %rax
	movl	-500132(%rbp), %edx
	movslq	%edx, %rdx
	movl	%ecx, (%rax,%rdx,4)
	jmp	.L27
.L26:
	movq	-500088(%rbp), %rax
	movl	-500132(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %ecx
	movq	-500072(%rbp), %rax
	movl	-500132(%rbp), %edx
	movslq	%edx, %rdx
	movl	%ecx, (%rax,%rdx,4)
.L27:
	addl	$1, -500132(%rbp)
.L25:
	movl	-500124(%rbp), %eax
	cmpl	-500132(%rbp), %eax
	jge	.L28
	movl	$0, -500128(%rbp)
	jmp	.L29
.L30:
	movq	-500072(%rbp), %rax
	movl	-500128(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %eax
	cltq
	addq	%rax, -500120(%rbp)
	addl	$1, -500128(%rbp)
.L29:
	movl	-500124(%rbp), %eax
	cmpl	-500128(%rbp), %eax
	jge	.L30
	movq	-500120(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	%rbx, %rsp
	movq	-56(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L32
	call	__stack_chk_fail@PLT
.L32:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.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	"%s"
.LC1:
	.string	"%lld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB35:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	leaq	-499712(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$360, %rsp
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	leaq	-500064(%rbp), %rbx
	movq	%rbx, %rsi
	call	__isoc99_scanf@PLT
	movq	%rbx, %rdi
	call	strlen@PLT
	movq	%rsp, %rsi
	leal	1(%rax), %r9d
	movq	%rax, %rcx
	movl	%eax, %r13d
	movslq	%r9d, %rax
	leaq	15(,%rax,4), %rax
	movq	%rax, %rdi
	movq	%rax, %rdx
	andq	$-4096, %rdi
	andq	$-16, %rdx
	subq	%rdi, %rsi
	cmpq	%rsi, %rsp
	je	.L3
.L64:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%rsi, %rsp
	jne	.L64
.L3:
	andl	$4095, %edx
	subq	%rdx, %rsp
	testq	%rdx, %rdx
	jne	.L65
.L4:
	movq	%rax, %rdi
	movq	%rax, %rdx
	movq	%rsp, %rsi
	movq	%rsp, %r12
	andq	$-4096, %rdi
	andq	$-16, %rdx
	subq	%rdi, %rsi
.L5:
	cmpq	%rsi, %rsp
	je	.L6
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L5
.L65:
	orq	$0, -8(%rsp,%rdx)
	jmp	.L4
.L6:
	andl	$4095, %edx
	subq	%rdx, %rsp
	testq	%rdx, %rdx
	jne	.L66
.L7:
	movq	%rax, %rdx
	movq	%rsp, %rsi
	andq	$-4096, %rax
	movq	%rsp, %r14
	andq	$-16, %rdx
	subq	%rax, %rsi
.L8:
	cmpq	%rsi, %rsp
	je	.L9
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L8
.L66:
	orq	$0, -8(%rsp,%rdx)
	jmp	.L7
.L9:
	movq	%rdx, %rax
	andl	$4095, %eax
	subq	%rax, %rsp
	testq	%rax, %rax
	je	.L10
	orq	$0, -8(%rsp,%rax)
.L10:
	leaq	3(%rsp), %r8
	leaq	4(,%rcx,4), %rdx
	movq	%r12, %rdi
	movl	%r9d, -500108(%rbp)
	movq	%r8, %rax
	andq	$-4, %r8
	movq	%rcx, -500088(%rbp)
	shrq	$2, %rax
	testl	%ecx, %ecx
	movq	%r8, -500104(%rbp)
	movq	%rax, -500072(%rbp)
	movl	$4, %eax
	cmovs	%rax, %rdx
	xorl	%esi, %esi
	movq	%r8, -500096(%rbp)
	movq	%rdx, -500080(%rbp)
	call	memset@PLT
	movq	-500080(%rbp), %rdx
	xorl	%esi, %esi
	movq	%r14, %rdi
	call	memset@PLT
	movq	-500088(%rbp), %rcx
	xorl	%esi, %esi
	movq	-500096(%rbp), %r10
	movq	-500104(%rbp), %r8
	movl	-500108(%rbp), %r9d
	movl	$1, %r11d
	testq	%rcx, %rcx
	je	.L12
	.p2align 4,,10
	.p2align 3
.L11:
	movl	%r11d, %edi
	movslq	%esi, %rax
	subl	%esi, %edi
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L14:
	movl	%edx, 4(%r12,%rax,4)
	addq	$1, %rax
	leal	-1(%rax), %edx
	cmpl	%edx, %r13d
	jl	.L15
.L13:
	cmpb	$60, (%rbx,%rax)
	leal	(%rdi,%rax), %edx
	leal	1(%rax), %esi
	je	.L14
.L15:
	cmpl	%esi, %r13d
	jg	.L11
.L12:
	movl	%ecx, %r11d
	.p2align 4,,10
	.p2align 3
.L16:
	movslq	%r11d, %rsi
	cmpb	$62, -500064(%rbp,%rsi)
	jne	.L62
	movl	$1, (%r14,%rsi,4)
	testl	%r11d, %r11d
	je	.L18
	leal	-1(%r11), %edx
	subq	$2, %rsi
	leal	1(%r11), %edi
	movslq	%edx, %rax
	movl	%edx, %edx
	subq	%rdx, %rsi
	jmp	.L17
	.p2align 4,,10
	.p2align 3
.L19:
	movl	%edx, (%r14,%rax,4)
	subq	$1, %rax
	cmpq	%rsi, %rax
	je	.L18
.L17:
	movl	%edi, %edx
	movl	%eax, %r11d
	subl	%eax, %edx
	cmpb	$62, (%rbx,%rax)
	je	.L19
.L62:
	subl	$1, %r11d
	jnb	.L16
	.p2align 4,,10
	.p2align 3
.L18:
	testl	%ecx, %ecx
	movl	$1, %esi
	cmovns	%r9d, %esi
	cmpl	$2, %ecx
	jbe	.L37
	movl	%esi, %edx
	xorl	%eax, %eax
	shrl	$2, %edx
	salq	$4, %rdx
	.p2align 4,,10
	.p2align 3
.L25:
	movdqu	(%r12,%rax), %xmm1
	movdqu	(%r14,%rax), %xmm5
	movdqa	%xmm1, %xmm0
	pcmpgtd	%xmm5, %xmm0
	pand	%xmm0, %xmm1
	pandn	%xmm5, %xmm0
	por	%xmm1, %xmm0
	movups	%xmm0, (%r8,%rax)
	addq	$16, %rax
	cmpq	%rax, %rdx
	jne	.L25
	movl	%esi, %edx
	andl	$-4, %edx
	testb	$3, %sil
	je	.L26
.L24:
	movslq	%edx, %rax
	salq	$2, %rax
	addq	%rax, %r12
	addq	%rax, %r14
	addq	%r8, %rax
	movl	(%r12), %edi
	movl	(%r14), %r9d
	cmpl	%r9d, %edi
	cmovl	%r9d, %edi
	movl	%edi, (%rax)
	leal	1(%rdx), %edi
	cmpl	%edi, %ecx
	jl	.L27
	movl	4(%r12), %edi
	movl	4(%r14), %r9d
	cmpl	%r9d, %edi
	cmovl	%r9d, %edi
	addl	$2, %edx
	movl	%edi, 4(%rax)
	cmpl	%edx, %ecx
	jl	.L28
	movl	8(%r12), %edx
	movl	8(%r14), %edi
	cmpl	%edi, %edx
	cmovl	%edi, %edx
	movl	%edx, 8(%rax)
.L28:
	cmpl	$2, %ecx
	jbe	.L67
.L26:
	movl	%esi, %edx
	pxor	%xmm1, %xmm1
	pxor	%xmm4, %xmm4
	movq	%r8, %rax
	shrl	$2, %edx
	subl	$1, %edx
	salq	$4, %rdx
	leaq	16(%r8,%rdx), %rdx
	.p2align 4,,10
	.p2align 3
.L30:
	movdqu	(%rax), %xmm0
	movdqa	%xmm4, %xmm2
	addq	$16, %rax
	pcmpgtd	%xmm0, %xmm2
	movdqa	%xmm0, %xmm3
	punpckldq	%xmm2, %xmm3
	punpckhdq	%xmm2, %xmm0
	paddq	%xmm3, %xmm1
	paddq	%xmm0, %xmm1
	cmpq	%rdx, %rax
	jne	.L30
	movdqa	%xmm1, %xmm0
	movl	%esi, %eax
	psrldq	$8, %xmm0
	andl	$-4, %eax
	andl	$3, %esi
	paddq	%xmm0, %xmm1
	movq	%xmm1, %r15
	je	.L31
.L29:
	movslq	%eax, %rdx
	addl	$1, %eax
	leaq	(%r8,%rdx,4), %r10
	movslq	(%r10), %rdx
	addq	%rdx, %r15
	cmpl	%eax, %ecx
	jl	.L31
.L32:
	movslq	4(%r10), %rdx
	addq	%rdx, %r15
	cmpl	%eax, %ecx
	jle	.L31
	movslq	8(%r10), %rax
	addq	%rax, %r15
.L31:
	xorl	%eax, %eax
	movq	%r15, %rdx
	movl	$1, %edi
	leaq	.LC1(%rip), %rsi
	call	__printf_chk@PLT
	movq	-56(%rbp), %rax
	subq	%fs:40, %rax
	jne	.L68
	leaq	-40(%rbp), %rsp
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
.L27:
	.cfi_restore_state
	cmpl	$2, %ecx
	ja	.L26
	xorl	%eax, %eax
	jmp	.L29
.L37:
	xorl	%edx, %edx
	jmp	.L24
.L67:
	movq	-500072(%rbp), %rax
	movslq	0(,%rax,4), %r15
	movl	$1, %eax
	jmp	.L32
.L68:
	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	"%s"
.LC1:
	.string	"%lld\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB35:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	leaq	-499712(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$360, %rsp
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	leaq	-500064(%rbp), %rbx
	movq	%rbx, %rsi
	call	__isoc99_scanf@PLT
	movq	%rbx, %rdi
	call	strlen@PLT
	movq	%rsp, %rsi
	leal	1(%rax), %r9d
	movq	%rax, %rcx
	movl	%eax, %r13d
	movslq	%r9d, %rax
	leaq	15(,%rax,4), %rax
	movq	%rax, %rdi
	movq	%rax, %rdx
	andq	$-4096, %rdi
	andq	$-16, %rdx
	subq	%rdi, %rsi
	cmpq	%rsi, %rsp
	je	.L3
.L64:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%rsi, %rsp
	jne	.L64
.L3:
	andl	$4095, %edx
	subq	%rdx, %rsp
	testq	%rdx, %rdx
	jne	.L65
.L4:
	movq	%rax, %rdi
	movq	%rax, %rdx
	movq	%rsp, %rsi
	movq	%rsp, %r12
	andq	$-4096, %rdi
	andq	$-16, %rdx
	subq	%rdi, %rsi
.L5:
	cmpq	%rsi, %rsp
	je	.L6
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L5
.L65:
	orq	$0, -8(%rsp,%rdx)
	jmp	.L4
.L6:
	andl	$4095, %edx
	subq	%rdx, %rsp
	testq	%rdx, %rdx
	jne	.L66
.L7:
	movq	%rax, %rdx
	movq	%rsp, %rsi
	andq	$-4096, %rax
	movq	%rsp, %r14
	andq	$-16, %rdx
	subq	%rax, %rsi
.L8:
	cmpq	%rsi, %rsp
	je	.L9
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L8
.L66:
	orq	$0, -8(%rsp,%rdx)
	jmp	.L7
.L9:
	movq	%rdx, %rax
	andl	$4095, %eax
	subq	%rax, %rsp
	testq	%rax, %rax
	je	.L10
	orq	$0, -8(%rsp,%rax)
.L10:
	leaq	3(%rsp), %r8
	leaq	4(,%rcx,4), %rdx
	movq	%r12, %rdi
	movl	%r9d, -500108(%rbp)
	movq	%r8, %rax
	andq	$-4, %r8
	movq	%rcx, -500088(%rbp)
	shrq	$2, %rax
	testl	%ecx, %ecx
	movq	%r8, -500104(%rbp)
	movq	%rax, -500072(%rbp)
	movl	$4, %eax
	cmovs	%rax, %rdx
	xorl	%esi, %esi
	movq	%r8, -500096(%rbp)
	movq	%rdx, -500080(%rbp)
	call	memset@PLT
	movq	-500080(%rbp), %rdx
	xorl	%esi, %esi
	movq	%r14, %rdi
	call	memset@PLT
	movq	-500088(%rbp), %rcx
	xorl	%esi, %esi
	movq	-500096(%rbp), %r10
	movq	-500104(%rbp), %r8
	movl	-500108(%rbp), %r9d
	movl	$1, %r11d
	testq	%rcx, %rcx
	je	.L12
	.p2align 4,,10
	.p2align 3
.L11:
	movl	%r11d, %edi
	movslq	%esi, %rax
	subl	%esi, %edi
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L14:
	movl	%edx, 4(%r12,%rax,4)
	addq	$1, %rax
	leal	-1(%rax), %edx
	cmpl	%edx, %r13d
	jl	.L15
.L13:
	cmpb	$60, (%rbx,%rax)
	leal	(%rdi,%rax), %edx
	leal	1(%rax), %esi
	je	.L14
.L15:
	cmpl	%esi, %r13d
	jg	.L11
.L12:
	movl	%ecx, %r11d
	.p2align 4,,10
	.p2align 3
.L16:
	movslq	%r11d, %rsi
	cmpb	$62, -500064(%rbp,%rsi)
	jne	.L62
	movl	$1, (%r14,%rsi,4)
	testl	%r11d, %r11d
	je	.L18
	leal	-1(%r11), %edx
	subq	$2, %rsi
	leal	1(%r11), %edi
	movslq	%edx, %rax
	movl	%edx, %edx
	subq	%rdx, %rsi
	jmp	.L17
	.p2align 4,,10
	.p2align 3
.L19:
	movl	%edx, (%r14,%rax,4)
	subq	$1, %rax
	cmpq	%rsi, %rax
	je	.L18
.L17:
	movl	%edi, %edx
	movl	%eax, %r11d
	subl	%eax, %edx
	cmpb	$62, (%rbx,%rax)
	je	.L19
.L62:
	subl	$1, %r11d
	jnb	.L16
	.p2align 4,,10
	.p2align 3
.L18:
	testl	%ecx, %ecx
	movl	$1, %esi
	cmovns	%r9d, %esi
	cmpl	$2, %ecx
	jbe	.L37
	movl	%esi, %edx
	xorl	%eax, %eax
	shrl	$2, %edx
	salq	$4, %rdx
	.p2align 4,,10
	.p2align 3
.L25:
	movdqu	(%r12,%rax), %xmm1
	movdqu	(%r14,%rax), %xmm5
	movdqa	%xmm1, %xmm0
	pcmpgtd	%xmm5, %xmm0
	pand	%xmm0, %xmm1
	pandn	%xmm5, %xmm0
	por	%xmm1, %xmm0
	movups	%xmm0, (%r8,%rax)
	addq	$16, %rax
	cmpq	%rax, %rdx
	jne	.L25
	movl	%esi, %edx
	andl	$-4, %edx
	testb	$3, %sil
	je	.L26
.L24:
	movslq	%edx, %rax
	salq	$2, %rax
	addq	%rax, %r12
	addq	%rax, %r14
	addq	%r8, %rax
	movl	(%r12), %edi
	movl	(%r14), %r9d
	cmpl	%r9d, %edi
	cmovl	%r9d, %edi
	movl	%edi, (%rax)
	leal	1(%rdx), %edi
	cmpl	%edi, %ecx
	jl	.L27
	movl	4(%r12), %edi
	movl	4(%r14), %r9d
	cmpl	%r9d, %edi
	cmovl	%r9d, %edi
	addl	$2, %edx
	movl	%edi, 4(%rax)
	cmpl	%edx, %ecx
	jl	.L28
	movl	8(%r12), %edx
	movl	8(%r14), %edi
	cmpl	%edi, %edx
	cmovl	%edi, %edx
	movl	%edx, 8(%rax)
.L28:
	cmpl	$2, %ecx
	jbe	.L67
.L26:
	movl	%esi, %edx
	pxor	%xmm1, %xmm1
	pxor	%xmm4, %xmm4
	movq	%r8, %rax
	shrl	$2, %edx
	subl	$1, %edx
	salq	$4, %rdx
	leaq	16(%r8,%rdx), %rdx
	.p2align 4,,10
	.p2align 3
.L30:
	movdqu	(%rax), %xmm0
	movdqa	%xmm4, %xmm2
	addq	$16, %rax
	pcmpgtd	%xmm0, %xmm2
	movdqa	%xmm0, %xmm3
	punpckldq	%xmm2, %xmm3
	punpckhdq	%xmm2, %xmm0
	paddq	%xmm3, %xmm1
	paddq	%xmm0, %xmm1
	cmpq	%rdx, %rax
	jne	.L30
	movdqa	%xmm1, %xmm0
	movl	%esi, %eax
	psrldq	$8, %xmm0
	andl	$-4, %eax
	andl	$3, %esi
	paddq	%xmm0, %xmm1
	movq	%xmm1, %r15
	je	.L31
.L29:
	movslq	%eax, %rdx
	addl	$1, %eax
	leaq	(%r8,%rdx,4), %r10
	movslq	(%r10), %rdx
	addq	%rdx, %r15
	cmpl	%eax, %ecx
	jl	.L31
.L32:
	movslq	4(%r10), %rdx
	addq	%rdx, %r15
	cmpl	%eax, %ecx
	jle	.L31
	movslq	8(%r10), %rax
	addq	%rax, %r15
.L31:
	xorl	%eax, %eax
	movq	%r15, %rdx
	movl	$1, %edi
	leaq	.LC1(%rip), %rsi
	call	__printf_chk@PLT
	movq	-56(%rbp), %rax
	subq	%fs:40, %rax
	jne	.L68
	leaq	-40(%rbp), %rsp
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
.L27:
	.cfi_restore_state
	cmpl	$2, %ecx
	ja	.L26
	xorl	%eax, %eax
	jmp	.L29
.L37:
	xorl	%edx, %edx
	jmp	.L24
.L67:
	movq	-500072(%rbp), %rax
	movslq	0(,%rax,4), %r15
	movl	$1, %eax
	jmp	.L32
.L68:
	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){
  char s[500001];
  int len;
  scanf("%s",s );
  len=strlen(s);
  //printf("%d\n",len );

  int a[len+1],b[len+1],main[len+1];
  int count;
  long long sum;
//初期化
  for (int i = 0; i < len+1; i++) {
    a[i]=0;
    b[i]=0;
  }

  for (int i = 0; i < len; i++) {
    count=1;
    while (s[i]=='<') {
      a[i+1]=count;
      count++;
      //printf("%d",i );
      if (i>len) {
        break;
      }
      i++;
    }
  }
//puts("");

  for (int i = len; i >=0; i--) {
    count=1;
    while (s[i]=='>') {
      b[i]=count;
      count++;
      //printf("%d",i );
      if (i<=0) {
        break;
      }
      i--;
    }
  }
//puts("");



  for (int i = 0; i < len+1; i++) {
    if (a[i]>=b[i]) {
      main[i]=a[i];
    }else{
      main[i]=b[i];
    }
  }

  for (int i = 0; i < len+1; i++) {
    sum+=main[i];
  }
  //printf("%d",main[len+1] );
  //printf("\n");
  printf("%lld\n",sum );

  return 0;
}

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

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 <stdio.h>
#include <string.h>


int main(void){
  char s[500001];
  int len;
  scanf("%s",s );
  len=strlen(s);
  //printf("%d\n",len );

  int a[len+1],b[len+1],main[len+1];
  int count;
  long long sum;
//初期化
  for (int i = 0; i < len+1; i++) {
    a[i]=0;
    b[i]=0;
  }

  for (int i = 0; i < len; i++) {
    count=1;
    while (s[i]=='<') {
      a[i+1]=count;
      count++;
      //printf("%d",i );
      if (i>len) {
        break;
      }
      i++;
    }
  }
//puts("");

  for (int i = len; i >=0; i--) {
    count=1;
    while (s[i]=='>') {
      b[i]=count;
      count++;
      //printf("%d",i );
      if (i<=0) {
        break;
      }
      i--;
    }
  }
//puts("");



  for (int i = 0; i < len+1; i++) {
    if (a[i]>=b[i]) {
      main[i]=a[i];
    }else{
      main[i]=b[i];
    }
  }

  for (int i = 0; i < len+1; i++) {
    sum+=main[i];
  }
  //printf("%d",main[len+1] );
  //printf("\n");
  printf("%lld\n",sum );

  return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%s"
.LC1:
	.string	"%lld\n"
	.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	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	leaq	-499712(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$472, %rsp
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	movq	%rsp, %rax
	movq	%rax, %rbx
	leaq	-500064(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-500064(%rbp), %rax
	movq	%rax, %rdi
	call	strlen@PLT
	movl	%eax, -500124(%rbp)
	movl	-500124(%rbp), %eax
	leal	1(%rax), %edx
	movslq	%edx, %rax
	subq	$1, %rax
	movq	%rax, -500112(%rbp)
	movslq	%edx, %rax
	movq	%rax, -500176(%rbp)
	movq	$0, -500168(%rbp)
	movslq	%edx, %rax
	movq	%rax, -500192(%rbp)
	movq	$0, -500184(%rbp)
	movslq	%edx, %rax
	leaq	0(,%rax,4), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %esi
	movl	$0, %edx
	divq	%rsi
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L2:
	cmpq	%rdx, %rsp
	je	.L3
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L2
.L3:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L4
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L4:
	movq	%rsp, %rax
	addq	$3, %rax
	shrq	$2, %rax
	salq	$2, %rax
	movq	%rax, -500104(%rbp)
	movl	-500124(%rbp), %eax
	addl	$1, %eax
	movslq	%eax, %rdx
	subq	$1, %rdx
	movq	%rdx, -500096(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, -500208(%rbp)
	movq	$0, -500200(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, -500224(%rbp)
	movq	$0, -500216(%rbp)
	cltq
	leaq	0(,%rax,4), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %edi
	movl	$0, %edx
	divq	%rdi
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L5:
	cmpq	%rdx, %rsp
	je	.L6
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L5
.L6:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L7
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L7:
	movq	%rsp, %rax
	addq	$3, %rax
	shrq	$2, %rax
	salq	$2, %rax
	movq	%rax, -500088(%rbp)
	movl	-500124(%rbp), %eax
	addl	$1, %eax
	movslq	%eax, %rdx
	subq	$1, %rdx
	movq	%rdx, -500080(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, %r14
	movl	$0, %r15d
	movslq	%eax, %rdx
	movq	%rdx, %r12
	movl	$0, %r13d
	cltq
	leaq	0(,%rax,4), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %esi
	movl	$0, %edx
	divq	%rsi
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L8:
	cmpq	%rdx, %rsp
	je	.L9
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L8
.L9:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L10
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L10:
	movq	%rsp, %rax
	addq	$3, %rax
	shrq	$2, %rax
	salq	$2, %rax
	movq	%rax, -500072(%rbp)
	movl	$0, -500144(%rbp)
	jmp	.L11
.L12:
	movq	-500104(%rbp), %rax
	movl	-500144(%rbp), %edx
	movslq	%edx, %rdx
	movl	$0, (%rax,%rdx,4)
	movq	-500088(%rbp), %rax
	movl	-500144(%rbp), %edx
	movslq	%edx, %rdx
	movl	$0, (%rax,%rdx,4)
	addl	$1, -500144(%rbp)
.L11:
	movl	-500124(%rbp), %eax
	cmpl	-500144(%rbp), %eax
	jge	.L12
	movl	$0, -500140(%rbp)
	jmp	.L13
.L18:
	movl	$1, -500148(%rbp)
	jmp	.L14
.L17:
	movl	-500140(%rbp), %eax
	leal	1(%rax), %edx
	movq	-500104(%rbp), %rax
	movslq	%edx, %rdx
	movl	-500148(%rbp), %ecx
	movl	%ecx, (%rax,%rdx,4)
	addl	$1, -500148(%rbp)
	movl	-500140(%rbp), %eax
	cmpl	-500124(%rbp), %eax
	jg	.L33
	addl	$1, -500140(%rbp)
.L14:
	movl	-500140(%rbp), %eax
	cltq
	movzbl	-500064(%rbp,%rax), %eax
	cmpb	$60, %al
	je	.L17
	jmp	.L16
.L33:
	nop
.L16:
	addl	$1, -500140(%rbp)
.L13:
	movl	-500140(%rbp), %eax
	cmpl	-500124(%rbp), %eax
	jl	.L18
	movl	-500124(%rbp), %eax
	movl	%eax, -500136(%rbp)
	jmp	.L19
.L24:
	movl	$1, -500148(%rbp)
	jmp	.L20
.L23:
	movq	-500088(%rbp), %rax
	movl	-500136(%rbp), %edx
	movslq	%edx, %rdx
	movl	-500148(%rbp), %ecx
	movl	%ecx, (%rax,%rdx,4)
	addl	$1, -500148(%rbp)
	cmpl	$0, -500136(%rbp)
	jle	.L34
	subl	$1, -500136(%rbp)
.L20:
	movl	-500136(%rbp), %eax
	cltq
	movzbl	-500064(%rbp,%rax), %eax
	cmpb	$62, %al
	je	.L23
	jmp	.L22
.L34:
	nop
.L22:
	subl	$1, -500136(%rbp)
.L19:
	cmpl	$0, -500136(%rbp)
	jns	.L24
	movl	$0, -500132(%rbp)
	jmp	.L25
.L28:
	movq	-500104(%rbp), %rax
	movl	-500132(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %ecx
	movq	-500088(%rbp), %rax
	movl	-500132(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %eax
	cmpl	%eax, %ecx
	jl	.L26
	movq	-500104(%rbp), %rax
	movl	-500132(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %ecx
	movq	-500072(%rbp), %rax
	movl	-500132(%rbp), %edx
	movslq	%edx, %rdx
	movl	%ecx, (%rax,%rdx,4)
	jmp	.L27
.L26:
	movq	-500088(%rbp), %rax
	movl	-500132(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %ecx
	movq	-500072(%rbp), %rax
	movl	-500132(%rbp), %edx
	movslq	%edx, %rdx
	movl	%ecx, (%rax,%rdx,4)
.L27:
	addl	$1, -500132(%rbp)
.L25:
	movl	-500124(%rbp), %eax
	cmpl	-500132(%rbp), %eax
	jge	.L28
	movl	$0, -500128(%rbp)
	jmp	.L29
.L30:
	movq	-500072(%rbp), %rax
	movl	-500128(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %eax
	cltq
	addq	%rax, -500120(%rbp)
	addl	$1, -500128(%rbp)
.L29:
	movl	-500124(%rbp), %eax
	cmpl	-500128(%rbp), %eax
	jge	.L30
	movq	-500120(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	%rbx, %rsp
	movq	-56(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L32
	call	__stack_chk_fail@PLT
.L32:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.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.
val
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%s"
.LC1:
	.string	"%lld\n"
	.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	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	leaq	-499712(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$472, %rsp
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	movq	%rsp, %rax
	movq	%rax, %rbx
	leaq	-500064(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-500064(%rbp), %rax
	movq	%rax, %rdi
	call	strlen@PLT
	movl	%eax, -500124(%rbp)
	movl	-500124(%rbp), %eax
	leal	1(%rax), %edx
	movslq	%edx, %rax
	subq	$1, %rax
	movq	%rax, -500112(%rbp)
	movslq	%edx, %rax
	movq	%rax, -500176(%rbp)
	movq	$0, -500168(%rbp)
	movslq	%edx, %rax
	movq	%rax, -500192(%rbp)
	movq	$0, -500184(%rbp)
	movslq	%edx, %rax
	leaq	0(,%rax,4), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %esi
	movl	$0, %edx
	divq	%rsi
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L2:
	cmpq	%rdx, %rsp
	je	.L3
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L2
.L3:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L4
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L4:
	movq	%rsp, %rax
	addq	$3, %rax
	shrq	$2, %rax
	salq	$2, %rax
	movq	%rax, -500104(%rbp)
	movl	-500124(%rbp), %eax
	addl	$1, %eax
	movslq	%eax, %rdx
	subq	$1, %rdx
	movq	%rdx, -500096(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, -500208(%rbp)
	movq	$0, -500200(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, -500224(%rbp)
	movq	$0, -500216(%rbp)
	cltq
	leaq	0(,%rax,4), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %edi
	movl	$0, %edx
	divq	%rdi
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L5:
	cmpq	%rdx, %rsp
	je	.L6
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L5
.L6:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L7
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L7:
	movq	%rsp, %rax
	addq	$3, %rax
	shrq	$2, %rax
	salq	$2, %rax
	movq	%rax, -500088(%rbp)
	movl	-500124(%rbp), %eax
	addl	$1, %eax
	movslq	%eax, %rdx
	subq	$1, %rdx
	movq	%rdx, -500080(%rbp)
	movslq	%eax, %rdx
	movq	%rdx, %r14
	movl	$0, %r15d
	movslq	%eax, %rdx
	movq	%rdx, %r12
	movl	$0, %r13d
	cltq
	leaq	0(,%rax,4), %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %esi
	movl	$0, %edx
	divq	%rsi
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L8:
	cmpq	%rdx, %rsp
	je	.L9
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L8
.L9:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L10
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L10:
	movq	%rsp, %rax
	addq	$3, %rax
	shrq	$2, %rax
	salq	$2, %rax
	movq	%rax, -500072(%rbp)
	movl	$0, -500144(%rbp)
	jmp	.L11
.L12:
	movq	-500104(%rbp), %rax
	movl	-500144(%rbp), %edx
	movslq	%edx, %rdx
	movl	$0, (%rax,%rdx,4)
	movq	-500088(%rbp), %rax
	movl	-500144(%rbp), %edx
	movslq	%edx, %rdx
	movl	$0, (%rax,%rdx,4)
	addl	$1, -500144(%rbp)
.L11:
	movl	-500124(%rbp), %eax
	cmpl	-500144(%rbp), %eax
	jge	.L12
	movl	$0, -500140(%rbp)
	jmp	.L13
.L18:
	movl	$1, -500148(%rbp)
	jmp	.L14
.L17:
	movl	-500140(%rbp), %eax
	leal	1(%rax), %edx
	movq	-500104(%rbp), %rax
	movslq	%edx, %rdx
	movl	-500148(%rbp), %ecx
	movl	%ecx, (%rax,%rdx,4)
	addl	$1, -500148(%rbp)
	movl	-500140(%rbp), %eax
	cmpl	-500124(%rbp), %eax
	jg	.L33
	addl	$1, -500140(%rbp)
.L14:
	movl	-500140(%rbp), %eax
	cltq
	movzbl	-500064(%rbp,%rax), %eax
	cmpb	$60, %al
	je	.L17
	jmp	.L16
.L33:
	nop
.L16:
	addl	$1, -500140(%rbp)
.L13:
	movl	-500140(%rbp), %eax
	cmpl	-500124(%rbp), %eax
	jl	.L18
	movl	-500124(%rbp), %eax
	movl	%eax, -500136(%rbp)
	jmp	.L19
.L24:
	movl	$1, -500148(%rbp)
	jmp	.L20
.L23:
	movq	-500088(%rbp), %rax
	movl	-500136(%rbp), %edx
	movslq	%edx, %rdx
	movl	-500148(%rbp), %ecx
	movl	%ecx, (%rax,%rdx,4)
	addl	$1, -500148(%rbp)
	cmpl	$0, -500136(%rbp)
	jle	.L34
	subl	$1, -500136(%rbp)
.L20:
	movl	-500136(%rbp), %eax
	cltq
	movzbl	-500064(%rbp,%rax), %eax
	cmpb	$62, %al
	je	.L23
	jmp	.L22
.L34:
	nop
.L22:
	subl	$1, -500136(%rbp)
.L19:
	cmpl	$0, -500136(%rbp)
	jns	.L24
	movl	$0, -500132(%rbp)
	jmp	.L25
.L28:
	movq	-500104(%rbp), %rax
	movl	-500132(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %ecx
	movq	-500088(%rbp), %rax
	movl	-500132(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %eax
	cmpl	%eax, %ecx
	jl	.L26
	movq	-500104(%rbp), %rax
	movl	-500132(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %ecx
	movq	-500072(%rbp), %rax
	movl	-500132(%rbp), %edx
	movslq	%edx, %rdx
	movl	%ecx, (%rax,%rdx,4)
	jmp	.L27
.L26:
	movq	-500088(%rbp), %rax
	movl	-500132(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %ecx
	movq	-500072(%rbp), %rax
	movl	-500132(%rbp), %edx
	movslq	%edx, %rdx
	movl	%ecx, (%rax,%rdx,4)
.L27:
	addl	$1, -500132(%rbp)
.L25:
	movl	-500124(%rbp), %eax
	cmpl	-500132(%rbp), %eax
	jge	.L28
	movl	$0, -500128(%rbp)
	jmp	.L29
.L30:
	movq	-500072(%rbp), %rax
	movl	-500128(%rbp), %edx
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %eax
	cltq
	addq	%rax, -500120(%rbp)
	addl	$1, -500128(%rbp)
.L29:
	movl	-500124(%rbp), %eax
	cmpl	-500128(%rbp), %eax
	jge	.L30
	movq	-500120(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	%rbx, %rsp
	movq	-56(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L32
	call	__stack_chk_fail@PLT
.L32:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.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:
