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>
char s[30];
int i,j,len,vv,k,v[100];
int main()
{
    scanf("%s",s);
    len=strlen(s);
    if (len<26)
    {
        for (i=0;i<=30;i++)
            v[i]=0;
        for (i=0;i<=len-1;i++)
            v[s[i]-'a']=1;
        for (i=0;i<=25;i++)
        if (v[i]==0)
        break;
        printf("%s",s);
        printf("%c",i+'a');
    } else
    {
        vv=0;
        for (j=0;j<=len-2;j++)
        if (s[j]-s[j+1]!=1) {vv=1; break;}
        if (vv==0) {printf("-1");return(0);}
        i=0;
        for (j=0;j<=25;j++)
            v[j]=0;
        while (i<=len-1)
        {
         for (j=i+1;j<=len-1;j++)
            {
                vv=0;
             for (k=j+1;k<=len-1;k++)
             {
              if (s[k]>s[j])
                {
                 vv=1;
                 break;
                }
              }
              if (vv==1) break;
            }
            if (vv) {printf("%c",s[i]);v[s[i]-'a']=1;} else
            {
                for (j=0;j<=25;j++)
                if (v[j]==0&&j+'a'>s[i])
                {
                    printf("%c",j+'a');
                    break;
                }
                break;
            }
            i++;
        }
    }
    return(0);
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	s
	.bss
	.align 16
	.type	s, @object
	.size	s, 30
s:
	.zero	30
	.globl	i
	.align 4
	.type	i, @object
	.size	i, 4
i:
	.zero	4
	.globl	j
	.align 4
	.type	j, @object
	.size	j, 4
j:
	.zero	4
	.globl	len
	.align 4
	.type	len, @object
	.size	len, 4
len:
	.zero	4
	.globl	vv
	.align 4
	.type	vv, @object
	.size	vv, 4
vv:
	.zero	4
	.globl	k
	.align 4
	.type	k, @object
	.size	k, 4
k:
	.zero	4
	.globl	v
	.align 32
	.type	v, @object
	.size	v, 400
v:
	.zero	400
	.section	.rodata
.LC0:
	.string	"%s"
.LC1:
	.string	"-1"
	.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
	leaq	s(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	s(%rip), %rax
	movq	%rax, %rdi
	call	strlen@PLT
	movl	%eax, len(%rip)
	movl	len(%rip), %eax
	cmpl	$25, %eax
	jg	.L2
	movl	$0, i(%rip)
	jmp	.L3
.L4:
	movl	i(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	v(%rip), %rax
	movl	$0, (%rdx,%rax)
	movl	i(%rip), %eax
	addl	$1, %eax
	movl	%eax, i(%rip)
.L3:
	movl	i(%rip), %eax
	cmpl	$30, %eax
	jle	.L4
	movl	$0, i(%rip)
	jmp	.L5
.L6:
	movl	i(%rip), %eax
	cltq
	leaq	s(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	movsbl	%al, %eax
	subl	$97, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	v(%rip), %rax
	movl	$1, (%rdx,%rax)
	movl	i(%rip), %eax
	addl	$1, %eax
	movl	%eax, i(%rip)
.L5:
	movl	len(%rip), %edx
	movl	i(%rip), %eax
	cmpl	%eax, %edx
	jg	.L6
	movl	$0, i(%rip)
	jmp	.L7
.L10:
	movl	i(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	v(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	je	.L37
	movl	i(%rip), %eax
	addl	$1, %eax
	movl	%eax, i(%rip)
.L7:
	movl	i(%rip), %eax
	cmpl	$25, %eax
	jle	.L10
	jmp	.L9
.L37:
	nop
.L9:
	leaq	s(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	i(%rip), %eax
	addl	$97, %eax
	movl	%eax, %edi
	call	putchar@PLT
	jmp	.L11
.L2:
	movl	$0, vv(%rip)
	movl	$0, j(%rip)
	jmp	.L12
.L15:
	movl	j(%rip), %eax
	cltq
	leaq	s(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	movsbl	%al, %edx
	movl	j(%rip), %eax
	addl	$1, %eax
	cltq
	leaq	s(%rip), %rcx
	movzbl	(%rax,%rcx), %eax
	movsbl	%al, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	cmpl	$1, %eax
	je	.L13
	movl	$1, vv(%rip)
	jmp	.L14
.L13:
	movl	j(%rip), %eax
	addl	$1, %eax
	movl	%eax, j(%rip)
.L12:
	movl	len(%rip), %eax
	leal	-1(%rax), %edx
	movl	j(%rip), %eax
	cmpl	%eax, %edx
	jg	.L15
.L14:
	movl	vv(%rip), %eax
	testl	%eax, %eax
	jne	.L16
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	jmp	.L17
.L16:
	movl	$0, i(%rip)
	movl	$0, j(%rip)
	jmp	.L18
.L19:
	movl	j(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	v(%rip), %rax
	movl	$0, (%rdx,%rax)
	movl	j(%rip), %eax
	addl	$1, %eax
	movl	%eax, j(%rip)
.L18:
	movl	j(%rip), %eax
	cmpl	$25, %eax
	jle	.L19
	jmp	.L20
.L35:
	movl	i(%rip), %eax
	addl	$1, %eax
	movl	%eax, j(%rip)
	jmp	.L21
.L28:
	movl	$0, vv(%rip)
	movl	j(%rip), %eax
	addl	$1, %eax
	movl	%eax, k(%rip)
	jmp	.L22
.L25:
	movl	k(%rip), %eax
	cltq
	leaq	s(%rip), %rdx
	movzbl	(%rax,%rdx), %edx
	movl	j(%rip), %eax
	cltq
	leaq	s(%rip), %rcx
	movzbl	(%rax,%rcx), %eax
	cmpb	%al, %dl
	jle	.L23
	movl	$1, vv(%rip)
	jmp	.L24
.L23:
	movl	k(%rip), %eax
	addl	$1, %eax
	movl	%eax, k(%rip)
.L22:
	movl	len(%rip), %edx
	movl	k(%rip), %eax
	cmpl	%eax, %edx
	jg	.L25
.L24:
	movl	vv(%rip), %eax
	cmpl	$1, %eax
	je	.L38
	movl	j(%rip), %eax
	addl	$1, %eax
	movl	%eax, j(%rip)
.L21:
	movl	len(%rip), %edx
	movl	j(%rip), %eax
	cmpl	%eax, %edx
	jg	.L28
	jmp	.L27
.L38:
	nop
.L27:
	movl	vv(%rip), %eax
	testl	%eax, %eax
	je	.L29
	movl	i(%rip), %eax
	cltq
	leaq	s(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	movsbl	%al, %eax
	movl	%eax, %edi
	call	putchar@PLT
	movl	i(%rip), %eax
	cltq
	leaq	s(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	movsbl	%al, %eax
	subl	$97, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	v(%rip), %rax
	movl	$1, (%rdx,%rax)
	jmp	.L36
.L29:
	movl	$0, j(%rip)
	jmp	.L31
.L34:
	movl	j(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	v(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	jne	.L32
	movl	j(%rip), %eax
	leal	96(%rax), %ecx
	movl	i(%rip), %eax
	cltq
	leaq	s(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	movsbl	%al, %eax
	cmpl	%eax, %ecx
	jl	.L32
	movl	j(%rip), %eax
	addl	$97, %eax
	movl	%eax, %edi
	call	putchar@PLT
	nop
	jmp	.L11
.L32:
	movl	j(%rip), %eax
	addl	$1, %eax
	movl	%eax, j(%rip)
.L31:
	movl	j(%rip), %eax
	cmpl	$25, %eax
	jle	.L34
	jmp	.L11
.L36:
	movl	i(%rip), %eax
	addl	$1, %eax
	movl	%eax, i(%rip)
.L20:
	movl	len(%rip), %edx
	movl	i(%rip), %eax
	cmpl	%eax, %edx
	jg	.L35
.L11:
	movl	$0, %eax
.L17:
	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	"-1"
	.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
	xorl	%eax, %eax
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	leaq	.LC0(%rip), %r14
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	movq	%r14, %rdi
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	leaq	s(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	movq	%r12, %rsi
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$8, %rsp
	.cfi_def_cfa_offset 64
	call	__isoc99_scanf@PLT
	movq	%r12, %rdi
	call	strlen@PLT
	movl	%eax, len(%rip)
	movq	%rax, %rsi
	cmpq	$25, %rax
	ja	.L2
	leaq	v(%rip), %r13
	movl	$31, %ecx
	xorl	%eax, %eax
	movq	%r13, %rdi
	rep stosl
	testq	%rsi, %rsi
	je	.L3
	leal	-1(%rsi), %ecx
	leaq	1(%r12), %rax
	movq	%r12, %rdx
	addq	%rax, %rcx
	.p2align 4,,10
	.p2align 3
.L4:
	movsbl	(%rdx), %eax
	addq	$1, %rdx
	subl	$97, %eax
	cltq
	movl	$1, 0(%r13,%rax,4)
	cmpq	%rcx, %rdx
	jne	.L4
.L3:
	movl	$1, %eax
	xorl	%edx, %edx
	leaq	-4+v(%rip), %rcx
	movl	$0, i(%rip)
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L5:
	movl	%eax, %r15d
	addq	$1, %rax
	movl	$1, %edx
	cmpq	$27, %rax
	je	.L53
.L7:
	movl	(%rcx,%rax,4), %r8d
	testl	%r8d, %r8d
	jne	.L5
	testb	%dl, %dl
	je	.L6
.L53:
	movl	%r15d, i(%rip)
.L6:
	movl	$1, %edi
	movq	%r12, %rdx
	movq	%r14, %rsi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movl	i(%rip), %eax
	leal	97(%rax), %edi
	call	putchar@PLT
.L49:
	addq	$8, %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
.L2:
	.cfi_restore_state
	movl	%eax, %edx
	leal	-1(%rax), %r9d
	movl	$0, vv(%rip)
	movsbl	s(%rip), %edi
	movl	$1, %eax
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L9:
	addq	$1, %rax
	leal	-1(%rax), %ecx
	cmpl	%ecx, %r9d
	jle	.L56
.L12:
	movl	%edi, %ecx
	movsbl	(%r12,%rax), %edi
	movl	%eax, %r8d
	subl	%edi, %ecx
	cmpl	$1, %ecx
	je	.L9
	leaq	v(%rip), %r13
	xorl	%eax, %eax
	xorl	%r10d, %r10d
	movl	$26, %ecx
	movq	%r13, %rdi
	movl	$1, vv(%rip)
	leaq	-1+s(%rip), %r14
	rep stosl
	movl	$0, i(%rip)
	movl	$26, j(%rip)
	testq	%rsi, %rsi
	je	.L49
	leal	1(%r10), %eax
	movl	%eax, j(%rip)
	cmpl	%edx, %eax
	jge	.L57
	.p2align 4,,10
	.p2align 3
.L14:
	leal	-2(%rdx), %eax
	leal	2(%r10), %edi
	movslq	%r10d, %r15
	xorl	%r8d, %r8d
	subl	%r10d, %eax
	movslq	%edi, %rdi
	leaq	3(%rax,%r15), %r11
	.p2align 4,,10
	.p2align 3
.L24:
	movl	%ebp, %r9d
	movl	%edi, %ebp
	cmpl	%edi, %edx
	jle	.L27
	movzbl	(%rdi,%r14), %ecx
	movslq	%edi, %rax
	jmp	.L20
	.p2align 4,,10
	.p2align 3
.L18:
	leal	1(%rax), %esi
	addq	$1, %rax
	cmpl	%eax, %edx
	jle	.L17
.L20:
	cmpb	%cl, (%r12,%rax)
	jle	.L18
	movl	%eax, k(%rip)
	testb	%r8b, %r8b
	je	.L19
	movl	%r9d, j(%rip)
.L19:
	movl	$1, vv(%rip)
.L15:
	movsbl	(%r12,%r15), %edi
	call	putchar@PLT
	movslq	i(%rip), %rax
	movl	len(%rip), %edx
	movq	%rax, %r10
	movsbl	(%r12,%rax), %eax
	addl	$1, %r10d
	subl	$97, %eax
	movl	%r10d, i(%rip)
	cltq
	movl	$1, 0(%r13,%rax,4)
	cmpl	%edx, %r10d
	jge	.L49
	leal	1(%r10), %eax
	movl	%eax, j(%rip)
	cmpl	%edx, %eax
	jl	.L14
.L57:
	cmpl	$0, vv(%rip)
	je	.L16
	movslq	%r10d, %r15
	jmp	.L15
.L27:
	movl	%edi, %esi
	.p2align 4,,10
	.p2align 3
.L17:
	addq	$1, %rdi
	movl	$1, %r8d
	cmpq	%r11, %rdi
	jne	.L24
	movl	$0, vv(%rip)
	movl	%esi, k(%rip)
.L16:
	movl	$0, j(%rip)
	xorl	%eax, %eax
	xorl	%esi, %esi
	movslq	%r10d, %r10
.L23:
	movl	0(%r13,%rax,4), %edi
	movl	%eax, %edx
	movl	%eax, %ecx
	testl	%edi, %edi
	jne	.L21
	movsbl	(%r12,%r10), %edi
	leal	96(%rax), %r8d
	cmpl	%edi, %r8d
	jge	.L58
.L21:
	addq	$1, %rax
	leal	1(%rdx), %ebx
	movl	$1, %esi
	cmpq	$26, %rax
	jne	.L23
	movl	%ebx, j(%rip)
	jmp	.L49
.L56:
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	movl	%r8d, j(%rip)
	call	__printf_chk@PLT
	jmp	.L49
.L58:
	testb	%sil, %sil
	je	.L22
	movl	%ebx, j(%rip)
.L22:
	leal	97(%rcx), %edi
	call	putchar@PLT
	jmp	.L49
	.cfi_endproc
.LFE35:
	.size	main, .-main
	.globl	v
	.bss
	.align 32
	.type	v, @object
	.size	v, 400
v:
	.zero	400
	.globl	k
	.align 4
	.type	k, @object
	.size	k, 4
k:
	.zero	4
	.globl	vv
	.align 4
	.type	vv, @object
	.size	vv, 4
vv:
	.zero	4
	.globl	len
	.align 4
	.type	len, @object
	.size	len, 4
len:
	.zero	4
	.globl	j
	.align 4
	.type	j, @object
	.size	j, 4
j:
	.zero	4
	.globl	i
	.align 4
	.type	i, @object
	.size	i, 4
i:
	.zero	4
	.globl	s
	.align 16
	.type	s, @object
	.size	s, 30
s:
	.zero	30
	.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	"-1"
	.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
	xorl	%eax, %eax
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	leaq	.LC0(%rip), %r14
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	movq	%r14, %rdi
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	leaq	s(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	movq	%r12, %rsi
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$8, %rsp
	.cfi_def_cfa_offset 64
	call	__isoc99_scanf@PLT
	movq	%r12, %rdi
	call	strlen@PLT
	movl	%eax, len(%rip)
	movq	%rax, %rsi
	cmpq	$25, %rax
	ja	.L2
	leaq	v(%rip), %r13
	movl	$31, %ecx
	xorl	%eax, %eax
	movq	%r13, %rdi
	rep stosl
	testq	%rsi, %rsi
	je	.L3
	leal	-1(%rsi), %ecx
	leaq	1(%r12), %rax
	movq	%r12, %rdx
	addq	%rax, %rcx
	.p2align 4,,10
	.p2align 3
.L4:
	movsbl	(%rdx), %eax
	addq	$1, %rdx
	subl	$97, %eax
	cltq
	movl	$1, 0(%r13,%rax,4)
	cmpq	%rcx, %rdx
	jne	.L4
.L3:
	movl	$1, %eax
	xorl	%edx, %edx
	leaq	-4+v(%rip), %rcx
	movl	$0, i(%rip)
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L5:
	movl	%eax, %r15d
	addq	$1, %rax
	movl	$1, %edx
	cmpq	$27, %rax
	je	.L53
.L7:
	movl	(%rcx,%rax,4), %r8d
	testl	%r8d, %r8d
	jne	.L5
	testb	%dl, %dl
	je	.L6
.L53:
	movl	%r15d, i(%rip)
.L6:
	movl	$1, %edi
	movq	%r12, %rdx
	movq	%r14, %rsi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movl	i(%rip), %eax
	leal	97(%rax), %edi
	call	putchar@PLT
.L49:
	addq	$8, %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
.L2:
	.cfi_restore_state
	movl	%eax, %edx
	leal	-1(%rax), %r9d
	movl	$0, vv(%rip)
	movsbl	s(%rip), %edi
	movl	$1, %eax
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L9:
	addq	$1, %rax
	leal	-1(%rax), %ecx
	cmpl	%ecx, %r9d
	jle	.L56
.L12:
	movl	%edi, %ecx
	movsbl	(%r12,%rax), %edi
	movl	%eax, %r8d
	subl	%edi, %ecx
	cmpl	$1, %ecx
	je	.L9
	leaq	v(%rip), %r13
	xorl	%eax, %eax
	xorl	%r10d, %r10d
	movl	$26, %ecx
	movq	%r13, %rdi
	movl	$1, vv(%rip)
	leaq	-1+s(%rip), %r14
	rep stosl
	movl	$0, i(%rip)
	movl	$26, j(%rip)
	testq	%rsi, %rsi
	je	.L49
	leal	1(%r10), %eax
	movl	%eax, j(%rip)
	cmpl	%edx, %eax
	jge	.L57
	.p2align 4,,10
	.p2align 3
.L14:
	leal	-2(%rdx), %eax
	leal	2(%r10), %edi
	movslq	%r10d, %r15
	xorl	%r8d, %r8d
	subl	%r10d, %eax
	movslq	%edi, %rdi
	leaq	3(%rax,%r15), %r11
	.p2align 4,,10
	.p2align 3
.L24:
	movl	%ebp, %r9d
	movl	%edi, %ebp
	cmpl	%edi, %edx
	jle	.L27
	movzbl	(%rdi,%r14), %ecx
	movslq	%edi, %rax
	jmp	.L20
	.p2align 4,,10
	.p2align 3
.L18:
	leal	1(%rax), %esi
	addq	$1, %rax
	cmpl	%eax, %edx
	jle	.L17
.L20:
	cmpb	%cl, (%r12,%rax)
	jle	.L18
	movl	%eax, k(%rip)
	testb	%r8b, %r8b
	je	.L19
	movl	%r9d, j(%rip)
.L19:
	movl	$1, vv(%rip)
.L15:
	movsbl	(%r12,%r15), %edi
	call	putchar@PLT
	movslq	i(%rip), %rax
	movl	len(%rip), %edx
	movq	%rax, %r10
	movsbl	(%r12,%rax), %eax
	addl	$1, %r10d
	subl	$97, %eax
	movl	%r10d, i(%rip)
	cltq
	movl	$1, 0(%r13,%rax,4)
	cmpl	%edx, %r10d
	jge	.L49
	leal	1(%r10), %eax
	movl	%eax, j(%rip)
	cmpl	%edx, %eax
	jl	.L14
.L57:
	cmpl	$0, vv(%rip)
	je	.L16
	movslq	%r10d, %r15
	jmp	.L15
.L27:
	movl	%edi, %esi
	.p2align 4,,10
	.p2align 3
.L17:
	addq	$1, %rdi
	movl	$1, %r8d
	cmpq	%r11, %rdi
	jne	.L24
	movl	$0, vv(%rip)
	movl	%esi, k(%rip)
.L16:
	movl	$0, j(%rip)
	xorl	%eax, %eax
	xorl	%esi, %esi
	movslq	%r10d, %r10
.L23:
	movl	0(%r13,%rax,4), %edi
	movl	%eax, %edx
	movl	%eax, %ecx
	testl	%edi, %edi
	jne	.L21
	movsbl	(%r12,%r10), %edi
	leal	96(%rax), %r8d
	cmpl	%edi, %r8d
	jge	.L58
.L21:
	addq	$1, %rax
	leal	1(%rdx), %ebx
	movl	$1, %esi
	cmpq	$26, %rax
	jne	.L23
	movl	%ebx, j(%rip)
	jmp	.L49
.L56:
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	movl	%r8d, j(%rip)
	call	__printf_chk@PLT
	jmp	.L49
.L58:
	testb	%sil, %sil
	je	.L22
	movl	%ebx, j(%rip)
.L22:
	leal	97(%rcx), %edi
	call	putchar@PLT
	jmp	.L49
	.cfi_endproc
.LFE35:
	.size	main, .-main
	.globl	v
	.bss
	.align 32
	.type	v, @object
	.size	v, 400
v:
	.zero	400
	.globl	k
	.align 4
	.type	k, @object
	.size	k, 4
k:
	.zero	4
	.globl	vv
	.align 4
	.type	vv, @object
	.size	vv, 4
vv:
	.zero	4
	.globl	len
	.align 4
	.type	len, @object
	.size	len, 4
len:
	.zero	4
	.globl	j
	.align 4
	.type	j, @object
	.size	j, 4
j:
	.zero	4
	.globl	i
	.align 4
	.type	i, @object
	.size	i, 4
i:
	.zero	4
	.globl	s
	.align 16
	.type	s, @object
	.size	s, 30
s:
	.zero	30
	.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>
char s[30];
int i,j,len,vv,k,v[100];
int main()
{
    scanf("%s",s);
    len=strlen(s);
    if (len<26)
    {
        for (i=0;i<=30;i++)
            v[i]=0;
        for (i=0;i<=len-1;i++)
            v[s[i]-'a']=1;
        for (i=0;i<=25;i++)
        if (v[i]==0)
        break;
        printf("%s",s);
        printf("%c",i+'a');
    } else
    {
        vv=0;
        for (j=0;j<=len-2;j++)
        if (s[j]-s[j+1]!=1) {vv=1; break;}
        if (vv==0) {printf("-1");return(0);}
        i=0;
        for (j=0;j<=25;j++)
            v[j]=0;
        while (i<=len-1)
        {
         for (j=i+1;j<=len-1;j++)
            {
                vv=0;
             for (k=j+1;k<=len-1;k++)
             {
              if (s[k]>s[j])
                {
                 vv=1;
                 break;
                }
              }
              if (vv==1) break;
            }
            if (vv) {printf("%c",s[i]);v[s[i]-'a']=1;} else
            {
                for (j=0;j<=25;j++)
                if (v[j]==0&&j+'a'>s[i])
                {
                    printf("%c",j+'a');
                    break;
                }
                break;
            }
            i++;
        }
    }
    return(0);
}

redocta
 azcdefghijklmnopqrstuvwbyx
 cba
 redoctb
 bca
 bac
 abd
 atcodes
 abcdefghijklmnopqrytuvwzsx
 btcoder

redoctab azcdefghijklmnopqrstuvwx cbad redoctba bcad bacd abdc atcodesb abcdefghijklmnopqrytuvwzx btcodera
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>
char s[30];
int i,j,len,vv,k,v[100];
int main()
{
    scanf("%s",s);
    len=strlen(s);
    if (len<26)
    {
        for (i=0;i<=30;i++)
            v[i]=0;
        for (i=0;i<=len-1;i++)
            v[s[i]-'a']=1;
        for (i=0;i<=25;i++)
        if (v[i]==0)
        break;
        printf("%s",s);
        printf("%c",i+'a');
    } else
    {
        vv=0;
        for (j=0;j<=len-2;j++)
        if (s[j]-s[j+1]!=1) {vv=1; break;}
        if (vv==0) {printf("-1");return(0);}
        i=0;
        for (j=0;j<=25;j++)
            v[j]=0;
        while (i<=len-1)
        {
         for (j=i+1;j<=len-1;j++)
            {
                vv=0;
             for (k=j+1;k<=len-1;k++)
             {
              if (s[k]>s[j])
                {
                 vv=1;
                 break;
                }
              }
              if (vv==1) break;
            }
            if (vv) {printf("%c",s[i]);v[s[i]-'a']=1;} else
            {
                for (j=0;j<=25;j++)
                if (v[j]==0&&j+'a'>s[i])
                {
                    printf("%c",j+'a');
                    break;
                }
                break;
            }
            i++;
        }
    }
    return(0);
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	s
	.bss
	.align 16
	.type	s, @object
	.size	s, 30
s:
	.zero	30
	.globl	i
	.align 4
	.type	i, @object
	.size	i, 4
i:
	.zero	4
	.globl	j
	.align 4
	.type	j, @object
	.size	j, 4
j:
	.zero	4
	.globl	len
	.align 4
	.type	len, @object
	.size	len, 4
len:
	.zero	4
	.globl	vv
	.align 4
	.type	vv, @object
	.size	vv, 4
vv:
	.zero	4
	.globl	k
	.align 4
	.type	k, @object
	.size	k, 4
k:
	.zero	4
	.globl	v
	.align 32
	.type	v, @object
	.size	v, 400
v:
	.zero	400
	.section	.rodata
.LC0:
	.string	"%s"
.LC1:
	.string	"-1"
	.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
	leaq	s(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	s(%rip), %rax
	movq	%rax, %rdi
	call	strlen@PLT
	movl	%eax, len(%rip)
	movl	len(%rip), %eax
	cmpl	$25, %eax
	jg	.L2
	movl	$0, i(%rip)
	jmp	.L3
.L4:
	movl	i(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	v(%rip), %rax
	movl	$0, (%rdx,%rax)
	movl	i(%rip), %eax
	addl	$1, %eax
	movl	%eax, i(%rip)
.L3:
	movl	i(%rip), %eax
	cmpl	$30, %eax
	jle	.L4
	movl	$0, i(%rip)
	jmp	.L5
.L6:
	movl	i(%rip), %eax
	cltq
	leaq	s(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	movsbl	%al, %eax
	subl	$97, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	v(%rip), %rax
	movl	$1, (%rdx,%rax)
	movl	i(%rip), %eax
	addl	$1, %eax
	movl	%eax, i(%rip)
.L5:
	movl	len(%rip), %edx
	movl	i(%rip), %eax
	cmpl	%eax, %edx
	jg	.L6
	movl	$0, i(%rip)
	jmp	.L7
.L10:
	movl	i(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	v(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	je	.L37
	movl	i(%rip), %eax
	addl	$1, %eax
	movl	%eax, i(%rip)
.L7:
	movl	i(%rip), %eax
	cmpl	$25, %eax
	jle	.L10
	jmp	.L9
.L37:
	nop
.L9:
	leaq	s(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	i(%rip), %eax
	addl	$97, %eax
	movl	%eax, %edi
	call	putchar@PLT
	jmp	.L11
.L2:
	movl	$0, vv(%rip)
	movl	$0, j(%rip)
	jmp	.L12
.L15:
	movl	j(%rip), %eax
	cltq
	leaq	s(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	movsbl	%al, %edx
	movl	j(%rip), %eax
	addl	$1, %eax
	cltq
	leaq	s(%rip), %rcx
	movzbl	(%rax,%rcx), %eax
	movsbl	%al, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	cmpl	$1, %eax
	je	.L13
	movl	$1, vv(%rip)
	jmp	.L14
.L13:
	movl	j(%rip), %eax
	addl	$1, %eax
	movl	%eax, j(%rip)
.L12:
	movl	len(%rip), %eax
	leal	-1(%rax), %edx
	movl	j(%rip), %eax
	cmpl	%eax, %edx
	jg	.L15
.L14:
	movl	vv(%rip), %eax
	testl	%eax, %eax
	jne	.L16
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	jmp	.L17
.L16:
	movl	$0, i(%rip)
	movl	$0, j(%rip)
	jmp	.L18
.L19:
	movl	j(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	v(%rip), %rax
	movl	$0, (%rdx,%rax)
	movl	j(%rip), %eax
	addl	$1, %eax
	movl	%eax, j(%rip)
.L18:
	movl	j(%rip), %eax
	cmpl	$25, %eax
	jle	.L19
	jmp	.L20
.L35:
	movl	i(%rip), %eax
	addl	$1, %eax
	movl	%eax, j(%rip)
	jmp	.L21
.L28:
	movl	$0, vv(%rip)
	movl	j(%rip), %eax
	addl	$1, %eax
	movl	%eax, k(%rip)
	jmp	.L22
.L25:
	movl	k(%rip), %eax
	cltq
	leaq	s(%rip), %rdx
	movzbl	(%rax,%rdx), %edx
	movl	j(%rip), %eax
	cltq
	leaq	s(%rip), %rcx
	movzbl	(%rax,%rcx), %eax
	cmpb	%al, %dl
	jle	.L23
	movl	$1, vv(%rip)
	jmp	.L24
.L23:
	movl	k(%rip), %eax
	addl	$1, %eax
	movl	%eax, k(%rip)
.L22:
	movl	len(%rip), %edx
	movl	k(%rip), %eax
	cmpl	%eax, %edx
	jg	.L25
.L24:
	movl	vv(%rip), %eax
	cmpl	$1, %eax
	je	.L38
	movl	j(%rip), %eax
	addl	$1, %eax
	movl	%eax, j(%rip)
.L21:
	movl	len(%rip), %edx
	movl	j(%rip), %eax
	cmpl	%eax, %edx
	jg	.L28
	jmp	.L27
.L38:
	nop
.L27:
	movl	vv(%rip), %eax
	testl	%eax, %eax
	je	.L29
	movl	i(%rip), %eax
	cltq
	leaq	s(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	movsbl	%al, %eax
	movl	%eax, %edi
	call	putchar@PLT
	movl	i(%rip), %eax
	cltq
	leaq	s(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	movsbl	%al, %eax
	subl	$97, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	v(%rip), %rax
	movl	$1, (%rdx,%rax)
	jmp	.L36
.L29:
	movl	$0, j(%rip)
	jmp	.L31
.L34:
	movl	j(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	v(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	jne	.L32
	movl	j(%rip), %eax
	leal	96(%rax), %ecx
	movl	i(%rip), %eax
	cltq
	leaq	s(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	movsbl	%al, %eax
	cmpl	%eax, %ecx
	jl	.L32
	movl	j(%rip), %eax
	addl	$97, %eax
	movl	%eax, %edi
	call	putchar@PLT
	nop
	jmp	.L11
.L32:
	movl	j(%rip), %eax
	addl	$1, %eax
	movl	%eax, j(%rip)
.L31:
	movl	j(%rip), %eax
	cmpl	$25, %eax
	jle	.L34
	jmp	.L11
.L36:
	movl	i(%rip), %eax
	addl	$1, %eax
	movl	%eax, i(%rip)
.L20:
	movl	len(%rip), %edx
	movl	i(%rip), %eax
	cmpl	%eax, %edx
	jg	.L35
.L11:
	movl	$0, %eax
.L17:
	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.
train
	.file	"temp.c"
	.text
	.globl	s
	.bss
	.align 16
	.type	s, @object
	.size	s, 30
s:
	.zero	30
	.globl	i
	.align 4
	.type	i, @object
	.size	i, 4
i:
	.zero	4
	.globl	j
	.align 4
	.type	j, @object
	.size	j, 4
j:
	.zero	4
	.globl	len
	.align 4
	.type	len, @object
	.size	len, 4
len:
	.zero	4
	.globl	vv
	.align 4
	.type	vv, @object
	.size	vv, 4
vv:
	.zero	4
	.globl	k
	.align 4
	.type	k, @object
	.size	k, 4
k:
	.zero	4
	.globl	v
	.align 32
	.type	v, @object
	.size	v, 400
v:
	.zero	400
	.section	.rodata
.LC0:
	.string	"%s"
.LC1:
	.string	"-1"
	.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
	leaq	s(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	s(%rip), %rax
	movq	%rax, %rdi
	call	strlen@PLT
	movl	%eax, len(%rip)
	movl	len(%rip), %eax
	cmpl	$25, %eax
	jg	.L2
	movl	$0, i(%rip)
	jmp	.L3
.L4:
	movl	i(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	v(%rip), %rax
	movl	$0, (%rdx,%rax)
	movl	i(%rip), %eax
	addl	$1, %eax
	movl	%eax, i(%rip)
.L3:
	movl	i(%rip), %eax
	cmpl	$30, %eax
	jle	.L4
	movl	$0, i(%rip)
	jmp	.L5
.L6:
	movl	i(%rip), %eax
	cltq
	leaq	s(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	movsbl	%al, %eax
	subl	$97, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	v(%rip), %rax
	movl	$1, (%rdx,%rax)
	movl	i(%rip), %eax
	addl	$1, %eax
	movl	%eax, i(%rip)
.L5:
	movl	len(%rip), %edx
	movl	i(%rip), %eax
	cmpl	%eax, %edx
	jg	.L6
	movl	$0, i(%rip)
	jmp	.L7
.L10:
	movl	i(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	v(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	je	.L37
	movl	i(%rip), %eax
	addl	$1, %eax
	movl	%eax, i(%rip)
.L7:
	movl	i(%rip), %eax
	cmpl	$25, %eax
	jle	.L10
	jmp	.L9
.L37:
	nop
.L9:
	leaq	s(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	i(%rip), %eax
	addl	$97, %eax
	movl	%eax, %edi
	call	putchar@PLT
	jmp	.L11
.L2:
	movl	$0, vv(%rip)
	movl	$0, j(%rip)
	jmp	.L12
.L15:
	movl	j(%rip), %eax
	cltq
	leaq	s(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	movsbl	%al, %edx
	movl	j(%rip), %eax
	addl	$1, %eax
	cltq
	leaq	s(%rip), %rcx
	movzbl	(%rax,%rcx), %eax
	movsbl	%al, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	cmpl	$1, %eax
	je	.L13
	movl	$1, vv(%rip)
	jmp	.L14
.L13:
	movl	j(%rip), %eax
	addl	$1, %eax
	movl	%eax, j(%rip)
.L12:
	movl	len(%rip), %eax
	leal	-1(%rax), %edx
	movl	j(%rip), %eax
	cmpl	%eax, %edx
	jg	.L15
.L14:
	movl	vv(%rip), %eax
	testl	%eax, %eax
	jne	.L16
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	jmp	.L17
.L16:
	movl	$0, i(%rip)
	movl	$0, j(%rip)
	jmp	.L18
.L19:
	movl	j(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	v(%rip), %rax
	movl	$0, (%rdx,%rax)
	movl	j(%rip), %eax
	addl	$1, %eax
	movl	%eax, j(%rip)
.L18:
	movl	j(%rip), %eax
	cmpl	$25, %eax
	jle	.L19
	jmp	.L20
.L35:
	movl	i(%rip), %eax
	addl	$1, %eax
	movl	%eax, j(%rip)
	jmp	.L21
.L28:
	movl	$0, vv(%rip)
	movl	j(%rip), %eax
	addl	$1, %eax
	movl	%eax, k(%rip)
	jmp	.L22
.L25:
	movl	k(%rip), %eax
	cltq
	leaq	s(%rip), %rdx
	movzbl	(%rax,%rdx), %edx
	movl	j(%rip), %eax
	cltq
	leaq	s(%rip), %rcx
	movzbl	(%rax,%rcx), %eax
	cmpb	%al, %dl
	jle	.L23
	movl	$1, vv(%rip)
	jmp	.L24
.L23:
	movl	k(%rip), %eax
	addl	$1, %eax
	movl	%eax, k(%rip)
.L22:
	movl	len(%rip), %edx
	movl	k(%rip), %eax
	cmpl	%eax, %edx
	jg	.L25
.L24:
	movl	vv(%rip), %eax
	cmpl	$1, %eax
	je	.L38
	movl	j(%rip), %eax
	addl	$1, %eax
	movl	%eax, j(%rip)
.L21:
	movl	len(%rip), %edx
	movl	j(%rip), %eax
	cmpl	%eax, %edx
	jg	.L28
	jmp	.L27
.L38:
	nop
.L27:
	movl	vv(%rip), %eax
	testl	%eax, %eax
	je	.L29
	movl	i(%rip), %eax
	cltq
	leaq	s(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	movsbl	%al, %eax
	movl	%eax, %edi
	call	putchar@PLT
	movl	i(%rip), %eax
	cltq
	leaq	s(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	movsbl	%al, %eax
	subl	$97, %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	v(%rip), %rax
	movl	$1, (%rdx,%rax)
	jmp	.L36
.L29:
	movl	$0, j(%rip)
	jmp	.L31
.L34:
	movl	j(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	v(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	jne	.L32
	movl	j(%rip), %eax
	leal	96(%rax), %ecx
	movl	i(%rip), %eax
	cltq
	leaq	s(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	movsbl	%al, %eax
	cmpl	%eax, %ecx
	jl	.L32
	movl	j(%rip), %eax
	addl	$97, %eax
	movl	%eax, %edi
	call	putchar@PLT
	nop
	jmp	.L11
.L32:
	movl	j(%rip), %eax
	addl	$1, %eax
	movl	%eax, j(%rip)
.L31:
	movl	j(%rip), %eax
	cmpl	$25, %eax
	jle	.L34
	jmp	.L11
.L36:
	movl	i(%rip), %eax
	addl	$1, %eax
	movl	%eax, i(%rip)
.L20:
	movl	len(%rip), %edx
	movl	i(%rip), %eax
	cmpl	%eax, %edx
	jg	.L35
.L11:
	movl	$0, %eax
.L17:
	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:
