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 <stdlib.h>
#include <string.h>
#include <math.h>
#define ll long long
#define rep(i,l,r)for(ll i=(l);i<(r);i++)
#define repp(i,l,r,k)for(ll i=(l);i<(r);i+=(k))
#define INF ((1LL<<62)-(1LL<<31))
#define max(p,q)((p)>(q)?(p):(q))
#define min(p,q)((p)<(q)?(p):(q))
#define bit(n,m)(((n)>>(m))&1)
int upll(const void*a, const void*b){return*(ll*)a<*(ll*)b?-1:*(ll*)a>*(ll*)b?1:0;}
int downll(const void*a, const void*b){return*(ll*)a<*(ll*)b?1:*(ll*)a>*(ll*)b?-1:0;}
void sortup(ll*a,int n){qsort(a,n,sizeof(ll),upll);}
void sortdown(ll*a,int n){qsort(a,n,sizeof(ll),downll);}
ll pom(ll a,ll n,int m){ll x=1;for(a%=m;n;n/=2)n&1?x=x*a%m:0,a=a*a%m;return x;}
//#define MOD 998244353
#define MOD 1000000007
#define invp(a,p)pom(a,p-2,p)

int id[100010][30];
char s[100010],t[100010];
int pre[30];
int main(){
	scanf("%s%s",s,t);
	ll n=strlen(s);
	rep(i,0,26)pre[i]=-1;
	rep(i,0,n)rep(j,0,26)id[i][j]=-1;
	
	rep(_,0,2)for(int i=n-1;i>=0;i--){
		rep(j,0,26)id[i][j]=pre[j];
		pre[s[i]-'a']=i;
	}
	ll cnt=-1,pos=n-1;
	ll m=strlen(t);
	rep(i,0,m){
		int nx=id[pos][t[i]-'a'];
		if(nx==-1){
			puts("-1");
			return 0;
		}
		if(nx<=pos)cnt++;
		pos=nx;
	}
	printf("%lld",cnt*n+pos+1);
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	upll
	.type	upll, @function
upll:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movq	-8(%rbp), %rax
	movq	(%rax), %rdx
	movq	-16(%rbp), %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	jl	.L2
	movq	-8(%rbp), %rax
	movq	(%rax), %rdx
	movq	-16(%rbp), %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	setg	%al
	movzbl	%al, %eax
	jmp	.L4
.L2:
	movl	$-1, %eax
.L4:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	upll, .-upll
	.globl	downll
	.type	downll, @function
downll:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movq	-8(%rbp), %rax
	movq	(%rax), %rdx
	movq	-16(%rbp), %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	jl	.L6
	movq	-8(%rbp), %rax
	movq	(%rax), %rdx
	movq	-16(%rbp), %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	jle	.L7
	movl	$-1, %eax
	jmp	.L10
.L7:
	movl	$0, %eax
	jmp	.L10
.L6:
	movl	$1, %eax
.L10:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	downll, .-downll
	.globl	sortup
	.type	sortup, @function
sortup:
.LFB8:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	movq	%rdi, -8(%rbp)
	movl	%esi, -12(%rbp)
	movl	-12(%rbp), %eax
	movslq	%eax, %rsi
	movq	-8(%rbp), %rax
	leaq	upll(%rip), %rdx
	movq	%rdx, %rcx
	movl	$8, %edx
	movq	%rax, %rdi
	call	qsort@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	sortup, .-sortup
	.globl	sortdown
	.type	sortdown, @function
sortdown:
.LFB9:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	movq	%rdi, -8(%rbp)
	movl	%esi, -12(%rbp)
	movl	-12(%rbp), %eax
	movslq	%eax, %rsi
	movq	-8(%rbp), %rax
	leaq	downll(%rip), %rdx
	movq	%rdx, %rcx
	movl	$8, %edx
	movq	%rax, %rdi
	call	qsort@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	sortdown, .-sortdown
	.globl	pom
	.type	pom, @function
pom:
.LFB10:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -24(%rbp)
	movq	%rsi, -32(%rbp)
	movl	%edx, -36(%rbp)
	movq	$1, -8(%rbp)
	movl	-36(%rbp), %eax
	movslq	%eax, %rcx
	movq	-24(%rbp), %rax
	cqto
	idivq	%rcx
	movq	%rdx, -24(%rbp)
	jmp	.L14
.L17:
	movq	-32(%rbp), %rax
	andl	$1, %eax
	testq	%rax, %rax
	je	.L16
	movq	-8(%rbp), %rax
	imulq	-24(%rbp), %rax
	movl	-36(%rbp), %edx
	movslq	%edx, %rcx
	cqto
	idivq	%rcx
	movq	%rdx, -8(%rbp)
.L16:
	movq	-24(%rbp), %rax
	imulq	%rax, %rax
	movl	-36(%rbp), %edx
	movslq	%edx, %rcx
	cqto
	idivq	%rcx
	movq	%rdx, -24(%rbp)
	movq	-32(%rbp), %rax
	movq	%rax, %rdx
	shrq	$63, %rdx
	addq	%rdx, %rax
	sarq	%rax
	movq	%rax, -32(%rbp)
.L14:
	cmpq	$0, -32(%rbp)
	jne	.L17
	movq	-8(%rbp), %rax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	pom, .-pom
	.globl	id
	.bss
	.align 32
	.type	id, @object
	.size	id, 12001200
id:
	.zero	12001200
	.globl	s
	.align 32
	.type	s, @object
	.size	s, 100010
s:
	.zero	100010
	.globl	t
	.align 32
	.type	t, @object
	.size	t, 100010
t:
	.zero	100010
	.globl	pre
	.align 32
	.type	pre, @object
	.size	pre, 120
pre:
	.zero	120
	.section	.rodata
.LC0:
	.string	"%s%s"
.LC1:
	.string	"-1"
.LC2:
	.string	"%lld"
	.text
	.globl	main
	.type	main, @function
main:
.LFB11:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$96, %rsp
	leaq	t(%rip), %rax
	movq	%rax, %rdx
	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
	movq	%rax, -16(%rbp)
	movq	$0, -80(%rbp)
	jmp	.L20
.L21:
	movq	-80(%rbp), %rax
	leaq	0(,%rax,4), %rdx
	leaq	pre(%rip), %rax
	movl	$-1, (%rdx,%rax)
	addq	$1, -80(%rbp)
.L20:
	cmpq	$25, -80(%rbp)
	jle	.L21
	movq	$0, -72(%rbp)
	jmp	.L22
.L25:
	movq	$0, -64(%rbp)
	jmp	.L23
.L24:
	movq	-72(%rbp), %rdx
	movq	%rdx, %rax
	salq	$4, %rax
	subq	%rdx, %rax
	addq	%rax, %rax
	movq	-64(%rbp), %rdx
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	id(%rip), %rax
	movl	$-1, (%rdx,%rax)
	addq	$1, -64(%rbp)
.L23:
	cmpq	$25, -64(%rbp)
	jle	.L24
	addq	$1, -72(%rbp)
.L22:
	movq	-72(%rbp), %rax
	cmpq	-16(%rbp), %rax
	jl	.L25
	movq	$0, -56(%rbp)
	jmp	.L26
.L31:
	movq	-16(%rbp), %rax
	subl	$1, %eax
	movl	%eax, -88(%rbp)
	jmp	.L27
.L30:
	movq	$0, -48(%rbp)
	jmp	.L28
.L29:
	movq	-48(%rbp), %rax
	leaq	0(,%rax,4), %rdx
	leaq	pre(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-88(%rbp), %eax
	movslq	%eax, %rcx
	movq	%rcx, %rax
	salq	$4, %rax
	subq	%rcx, %rax
	addq	%rax, %rax
	movq	-48(%rbp), %rcx
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rcx
	leaq	id(%rip), %rax
	movl	%edx, (%rcx,%rax)
	addq	$1, -48(%rbp)
.L28:
	cmpq	$25, -48(%rbp)
	jle	.L29
	movl	-88(%rbp), %eax
	cltq
	leaq	s(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	movsbl	%al, %eax
	subl	$97, %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	pre(%rip), %rdx
	movl	-88(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	subl	$1, -88(%rbp)
.L27:
	cmpl	$0, -88(%rbp)
	jns	.L30
	addq	$1, -56(%rbp)
.L26:
	cmpq	$1, -56(%rbp)
	jle	.L31
	movq	$-1, -40(%rbp)
	movq	-16(%rbp), %rax
	subq	$1, %rax
	movq	%rax, -32(%rbp)
	leaq	t(%rip), %rax
	movq	%rax, %rdi
	call	strlen@PLT
	movq	%rax, -8(%rbp)
	movq	$0, -24(%rbp)
	jmp	.L32
.L36:
	leaq	t(%rip), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	movsbl	%al, %eax
	subl	$97, %eax
	movslq	%eax, %rcx
	movq	-32(%rbp), %rdx
	movq	%rdx, %rax
	salq	$4, %rax
	subq	%rdx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	id(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -84(%rbp)
	cmpl	$-1, -84(%rbp)
	jne	.L33
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
	jmp	.L34
.L33:
	movl	-84(%rbp), %eax
	cltq
	cmpq	%rax, -32(%rbp)
	jl	.L35
	addq	$1, -40(%rbp)
.L35:
	movl	-84(%rbp), %eax
	cltq
	movq	%rax, -32(%rbp)
	addq	$1, -24(%rbp)
.L32:
	movq	-24(%rbp), %rax
	cmpq	-8(%rbp), %rax
	jl	.L36
	movq	-40(%rbp), %rax
	imulq	-16(%rbp), %rax
	movq	%rax, %rdx
	movq	-32(%rbp), %rax
	addq	%rdx, %rax
	addq	$1, %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
.L34:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.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
	.p2align 4
	.globl	upll
	.type	upll, @function
upll:
.LFB51:
	.cfi_startproc
	endbr64
	movq	(%rsi), %rax
	cmpq	%rax, (%rdi)
	movl	$-1, %edx
	setg	%al
	movzbl	%al, %eax
	cmovl	%edx, %eax
	ret
	.cfi_endproc
.LFE51:
	.size	upll, .-upll
	.p2align 4
	.globl	downll
	.type	downll, @function
downll:
.LFB52:
	.cfi_startproc
	endbr64
	movq	(%rsi), %rdx
	movl	$1, %eax
	cmpq	%rdx, (%rdi)
	jl	.L5
	setg	%al
	movzbl	%al, %eax
	negl	%eax
.L5:
	ret
	.cfi_endproc
.LFE52:
	.size	downll, .-downll
	.p2align 4
	.globl	sortup
	.type	sortup, @function
sortup:
.LFB53:
	.cfi_startproc
	endbr64
	movslq	%esi, %rsi
	leaq	upll(%rip), %rcx
	movl	$8, %edx
	jmp	qsort@PLT
	.cfi_endproc
.LFE53:
	.size	sortup, .-sortup
	.p2align 4
	.globl	sortdown
	.type	sortdown, @function
sortdown:
.LFB54:
	.cfi_startproc
	endbr64
	movslq	%esi, %rsi
	leaq	downll(%rip), %rcx
	movl	$8, %edx
	jmp	qsort@PLT
	.cfi_endproc
.LFE54:
	.size	sortdown, .-sortdown
	.p2align 4
	.globl	pom
	.type	pom, @function
pom:
.LFB55:
	.cfi_startproc
	endbr64
	movq	%rdi, %rax
	movslq	%edx, %r8
	movl	$1, %r9d
	cqto
	idivq	%r8
	movq	%rdx, %rcx
	testq	%rsi, %rsi
	je	.L10
	.p2align 4,,10
	.p2align 3
.L13:
	testb	$1, %sil
	je	.L12
	movq	%r9, %rax
	imulq	%rcx, %rax
	cqto
	idivq	%r8
	movq	%rdx, %r9
.L12:
	imulq	%rcx, %rcx
	movq	%rcx, %rax
	cqto
	idivq	%r8
	movq	%rsi, %rax
	shrq	$63, %rax
	addq	%rax, %rsi
	sarq	%rsi
	movq	%rdx, %rcx
	jne	.L13
.L10:
	movq	%r9, %rax
	ret
	.cfi_endproc
.LFE55:
	.size	pom, .-pom
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%s%s"
.LC1:
	.string	"-1"
.LC2:
	.string	"%lld"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB56:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	leaq	t(%rip), %r12
	leaq	.LC0(%rip), %rdi
	xorl	%eax, %eax
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	leaq	s(%rip), %rbp
	movq	%r12, %rdx
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	movq	%rbp, %rsi
	call	__isoc99_scanf@PLT
	movq	%rbp, %rdi
	call	strlen@PLT
	pcmpeqd	%xmm0, %xmm0
	movq	$-1, 96+pre(%rip)
	movq	%rax, %rbx
	movaps	%xmm0, pre(%rip)
	movaps	%xmm0, 16+pre(%rip)
	movaps	%xmm0, 32+pre(%rip)
	movaps	%xmm0, 48+pre(%rip)
	movaps	%xmm0, 64+pre(%rip)
	movaps	%xmm0, 80+pre(%rip)
	testq	%rax, %rax
	je	.L20
	movq	%rbx, %rdx
	leaq	id(%rip), %rax
	salq	$4, %rdx
	subq	%rbx, %rdx
	leaq	(%rax,%rdx,8), %rdx
	.p2align 4,,10
	.p2align 3
.L21:
	pcmpeqd	%xmm0, %xmm0
	movq	$-1, 96(%rax)
	addq	$120, %rax
	movups	%xmm0, -120(%rax)
	movups	%xmm0, -104(%rax)
	movups	%xmm0, -88(%rax)
	movups	%xmm0, -72(%rax)
	movups	%xmm0, -56(%rax)
	movups	%xmm0, -40(%rax)
	cmpq	%rax, %rdx
	jne	.L21
.L20:
	leal	-1(%rbx), %r8d
	movl	$2, %r9d
	leaq	id(%rip), %rdi
	leaq	pre(%rip), %rcx
.L24:
	cmpl	$-1, %r8d
	je	.L22
	movslq	%r8d, %rdx
	.p2align 4,,10
	.p2align 3
.L23:
	movq	%rdx, %rax
	movdqa	(%rcx), %xmm1
	salq	$4, %rax
	subq	%rdx, %rax
	leaq	(%rdi,%rax,8), %rax
	movups	%xmm1, (%rax)
	movdqa	16+pre(%rip), %xmm2
	movups	%xmm2, 16(%rax)
	movdqa	32+pre(%rip), %xmm3
	movups	%xmm3, 32(%rax)
	movdqa	48+pre(%rip), %xmm4
	movups	%xmm4, 48(%rax)
	movdqa	64+pre(%rip), %xmm5
	movups	%xmm5, 64(%rax)
	movdqa	80+pre(%rip), %xmm6
	movups	%xmm6, 80(%rax)
	movq	96+pre(%rip), %rsi
	movq	%rsi, 96(%rax)
	movsbl	0(%rbp,%rdx), %eax
	subl	$97, %eax
	cltq
	movl	%edx, (%rcx,%rax,4)
	subq	$1, %rdx
	cmpl	$-1, %edx
	jne	.L23
.L22:
	cmpq	$1, %r9
	jne	.L30
	movq	%r12, %rdi
	leaq	-1(%rbx), %rbp
	call	strlen@PLT
	testq	%rax, %rax
	je	.L31
	leaq	t(%rip), %rcx
	addq	%rax, %r12
	movq	$-1, %rsi
	leaq	id(%rip), %rdi
	jmp	.L29
	.p2align 4,,10
	.p2align 3
.L26:
	xorl	%edx, %edx
	cmpq	%rbp, %rax
	movq	%rax, %rbp
	setle	%dl
	addq	$1, %rcx
	addq	%rdx, %rsi
	cmpq	%r12, %rcx
	je	.L25
.L29:
	movsbl	(%rcx), %eax
	movq	%rbp, %rdx
	salq	$4, %rdx
	subl	$97, %eax
	subq	%rbp, %rdx
	cltq
	leaq	(%rax,%rdx,2), %rax
	movslq	(%rdi,%rax,4), %rax
	cmpl	$-1, %eax
	jne	.L26
	leaq	.LC1(%rip), %rdi
	call	puts@PLT
	jmp	.L27
.L30:
	movl	$1, %r9d
	jmp	.L24
.L31:
	orq	$-1, %rsi
.L25:
	imulq	%rbx, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	leaq	1(%rbp,%rsi), %rdx
	leaq	.LC2(%rip), %rsi
	call	__printf_chk@PLT
.L27:
	popq	%rbx
	.cfi_def_cfa_offset 24
	xorl	%eax, %eax
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE56:
	.size	main, .-main
	.globl	pre
	.bss
	.align 32
	.type	pre, @object
	.size	pre, 120
pre:
	.zero	120
	.globl	t
	.align 32
	.type	t, @object
	.size	t, 100010
t:
	.zero	100010
	.globl	s
	.align 32
	.type	s, @object
	.size	s, 100010
s:
	.zero	100010
	.globl	id
	.align 32
	.type	id, @object
	.size	id, 12001200
id:
	.zero	12001200
	.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
	.p2align 4
	.globl	upll
	.type	upll, @function
upll:
.LFB51:
	.cfi_startproc
	endbr64
	movq	(%rsi), %rax
	cmpq	%rax, (%rdi)
	movl	$-1, %edx
	setg	%al
	movzbl	%al, %eax
	cmovl	%edx, %eax
	ret
	.cfi_endproc
.LFE51:
	.size	upll, .-upll
	.p2align 4
	.globl	downll
	.type	downll, @function
downll:
.LFB52:
	.cfi_startproc
	endbr64
	movq	(%rsi), %rdx
	movl	$1, %eax
	cmpq	%rdx, (%rdi)
	jl	.L5
	setg	%al
	movzbl	%al, %eax
	negl	%eax
.L5:
	ret
	.cfi_endproc
.LFE52:
	.size	downll, .-downll
	.p2align 4
	.globl	sortup
	.type	sortup, @function
sortup:
.LFB53:
	.cfi_startproc
	endbr64
	movslq	%esi, %rsi
	leaq	upll(%rip), %rcx
	movl	$8, %edx
	jmp	qsort@PLT
	.cfi_endproc
.LFE53:
	.size	sortup, .-sortup
	.p2align 4
	.globl	sortdown
	.type	sortdown, @function
sortdown:
.LFB54:
	.cfi_startproc
	endbr64
	movslq	%esi, %rsi
	leaq	downll(%rip), %rcx
	movl	$8, %edx
	jmp	qsort@PLT
	.cfi_endproc
.LFE54:
	.size	sortdown, .-sortdown
	.p2align 4
	.globl	pom
	.type	pom, @function
pom:
.LFB55:
	.cfi_startproc
	endbr64
	movq	%rdi, %rax
	movslq	%edx, %r8
	movl	$1, %r9d
	cqto
	idivq	%r8
	movq	%rdx, %rcx
	testq	%rsi, %rsi
	je	.L10
	.p2align 4,,10
	.p2align 3
.L13:
	testb	$1, %sil
	je	.L12
	movq	%r9, %rax
	imulq	%rcx, %rax
	cqto
	idivq	%r8
	movq	%rdx, %r9
.L12:
	imulq	%rcx, %rcx
	movq	%rcx, %rax
	cqto
	idivq	%r8
	movq	%rsi, %rax
	shrq	$63, %rax
	addq	%rax, %rsi
	sarq	%rsi
	movq	%rdx, %rcx
	jne	.L13
.L10:
	movq	%r9, %rax
	ret
	.cfi_endproc
.LFE55:
	.size	pom, .-pom
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%s%s"
.LC1:
	.string	"-1"
.LC2:
	.string	"%lld"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB56:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	leaq	t(%rip), %r12
	leaq	.LC0(%rip), %rdi
	xorl	%eax, %eax
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	leaq	s(%rip), %rbp
	movq	%r12, %rdx
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	movq	%rbp, %rsi
	call	__isoc99_scanf@PLT
	movq	%rbp, %rdi
	call	strlen@PLT
	pcmpeqd	%xmm0, %xmm0
	movq	$-1, 96+pre(%rip)
	movq	%rax, %rbx
	movaps	%xmm0, pre(%rip)
	movaps	%xmm0, 16+pre(%rip)
	movaps	%xmm0, 32+pre(%rip)
	movaps	%xmm0, 48+pre(%rip)
	movaps	%xmm0, 64+pre(%rip)
	movaps	%xmm0, 80+pre(%rip)
	testq	%rax, %rax
	je	.L20
	movq	%rbx, %rdx
	leaq	id(%rip), %rax
	salq	$4, %rdx
	subq	%rbx, %rdx
	leaq	(%rax,%rdx,8), %rdx
	.p2align 4,,10
	.p2align 3
.L21:
	pcmpeqd	%xmm0, %xmm0
	movq	$-1, 96(%rax)
	addq	$120, %rax
	movups	%xmm0, -120(%rax)
	movups	%xmm0, -104(%rax)
	movups	%xmm0, -88(%rax)
	movups	%xmm0, -72(%rax)
	movups	%xmm0, -56(%rax)
	movups	%xmm0, -40(%rax)
	cmpq	%rax, %rdx
	jne	.L21
.L20:
	leal	-1(%rbx), %r8d
	movl	$2, %r9d
	leaq	id(%rip), %rdi
	leaq	pre(%rip), %rcx
.L24:
	cmpl	$-1, %r8d
	je	.L22
	movslq	%r8d, %rdx
	.p2align 4,,10
	.p2align 3
.L23:
	movq	%rdx, %rax
	movdqa	(%rcx), %xmm1
	salq	$4, %rax
	subq	%rdx, %rax
	leaq	(%rdi,%rax,8), %rax
	movups	%xmm1, (%rax)
	movdqa	16+pre(%rip), %xmm2
	movups	%xmm2, 16(%rax)
	movdqa	32+pre(%rip), %xmm3
	movups	%xmm3, 32(%rax)
	movdqa	48+pre(%rip), %xmm4
	movups	%xmm4, 48(%rax)
	movdqa	64+pre(%rip), %xmm5
	movups	%xmm5, 64(%rax)
	movdqa	80+pre(%rip), %xmm6
	movups	%xmm6, 80(%rax)
	movq	96+pre(%rip), %rsi
	movq	%rsi, 96(%rax)
	movsbl	0(%rbp,%rdx), %eax
	subl	$97, %eax
	cltq
	movl	%edx, (%rcx,%rax,4)
	subq	$1, %rdx
	cmpl	$-1, %edx
	jne	.L23
.L22:
	cmpq	$1, %r9
	jne	.L30
	movq	%r12, %rdi
	leaq	-1(%rbx), %rbp
	call	strlen@PLT
	testq	%rax, %rax
	je	.L31
	leaq	t(%rip), %rcx
	addq	%rax, %r12
	movq	$-1, %rsi
	leaq	id(%rip), %rdi
	jmp	.L29
	.p2align 4,,10
	.p2align 3
.L26:
	xorl	%edx, %edx
	cmpq	%rbp, %rax
	movq	%rax, %rbp
	setle	%dl
	addq	$1, %rcx
	addq	%rdx, %rsi
	cmpq	%r12, %rcx
	je	.L25
.L29:
	movsbl	(%rcx), %eax
	movq	%rbp, %rdx
	salq	$4, %rdx
	subl	$97, %eax
	subq	%rbp, %rdx
	cltq
	leaq	(%rax,%rdx,2), %rax
	movslq	(%rdi,%rax,4), %rax
	cmpl	$-1, %eax
	jne	.L26
	leaq	.LC1(%rip), %rdi
	call	puts@PLT
	jmp	.L27
.L30:
	movl	$1, %r9d
	jmp	.L24
.L31:
	orq	$-1, %rsi
.L25:
	imulq	%rbx, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	leaq	1(%rbp,%rsi), %rdx
	leaq	.LC2(%rip), %rsi
	call	__printf_chk@PLT
.L27:
	popq	%rbx
	.cfi_def_cfa_offset 24
	xorl	%eax, %eax
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE56:
	.size	main, .-main
	.globl	pre
	.bss
	.align 32
	.type	pre, @object
	.size	pre, 120
pre:
	.zero	120
	.globl	t
	.align 32
	.type	t, @object
	.size	t, 100010
t:
	.zero	100010
	.globl	s
	.align 32
	.type	s, @object
	.size	s, 100010
s:
	.zero	100010
	.globl	id
	.align 32
	.type	id, @object
	.size	id, 12001200
id:
	.zero	12001200
	.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 <stdlib.h>
#include <string.h>
#include <math.h>
#define ll long long
#define rep(i,l,r)for(ll i=(l);i<(r);i++)
#define repp(i,l,r,k)for(ll i=(l);i<(r);i+=(k))
#define INF ((1LL<<62)-(1LL<<31))
#define max(p,q)((p)>(q)?(p):(q))
#define min(p,q)((p)<(q)?(p):(q))
#define bit(n,m)(((n)>>(m))&1)
int upll(const void*a, const void*b){return*(ll*)a<*(ll*)b?-1:*(ll*)a>*(ll*)b?1:0;}
int downll(const void*a, const void*b){return*(ll*)a<*(ll*)b?1:*(ll*)a>*(ll*)b?-1:0;}
void sortup(ll*a,int n){qsort(a,n,sizeof(ll),upll);}
void sortdown(ll*a,int n){qsort(a,n,sizeof(ll),downll);}
ll pom(ll a,ll n,int m){ll x=1;for(a%=m;n;n/=2)n&1?x=x*a%m:0,a=a*a%m;return x;}
//#define MOD 998244353
#define MOD 1000000007
#define invp(a,p)pom(a,p-2,p)

int id[100010][30];
char s[100010],t[100010];
int pre[30];
int main(){
	scanf("%s%s",s,t);
	ll n=strlen(s);
	rep(i,0,26)pre[i]=-1;
	rep(i,0,n)rep(j,0,26)id[i][j]=-1;
	
	rep(_,0,2)for(int i=n-1;i>=0;i--){
		rep(j,0,26)id[i][j]=pre[j];
		pre[s[i]-'a']=i;
	}
	ll cnt=-1,pos=n-1;
	ll m=strlen(t);
	rep(i,0,m){
		int nx=id[pos][t[i]-'a'];
		if(nx==-1){
			puts("-1");
			return 0;
		}
		if(nx<=pos)cnt++;
		pos=nx;
	}
	printf("%lld",cnt*n+pos+1);
}
toncest
sentence
 csnteot
son
 contest
programmhng
 vtaletn
tnn
 ntelatv
tnn
 mlstvdc
msm
 toncest
sentemce
 csnoett
son
 eontcst
programmhng
 tsecnot
sentemce

33 10 -1
 14 15 8 -1
 10 -1
 -1

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 <stdlib.h>
#include <string.h>
#include <math.h>
#define ll long long
#define rep(i,l,r)for(ll i=(l);i<(r);i++)
#define repp(i,l,r,k)for(ll i=(l);i<(r);i+=(k))
#define INF ((1LL<<62)-(1LL<<31))
#define max(p,q)((p)>(q)?(p):(q))
#define min(p,q)((p)<(q)?(p):(q))
#define bit(n,m)(((n)>>(m))&1)
int upll(const void*a, const void*b){return*(ll*)a<*(ll*)b?-1:*(ll*)a>*(ll*)b?1:0;}
int downll(const void*a, const void*b){return*(ll*)a<*(ll*)b?1:*(ll*)a>*(ll*)b?-1:0;}
void sortup(ll*a,int n){qsort(a,n,sizeof(ll),upll);}
void sortdown(ll*a,int n){qsort(a,n,sizeof(ll),downll);}
ll pom(ll a,ll n,int m){ll x=1;for(a%=m;n;n/=2)n&1?x=x*a%m:0,a=a*a%m;return x;}
//#define MOD 998244353
#define MOD 1000000007
#define invp(a,p)pom(a,p-2,p)

int id[100010][30];
char s[100010],t[100010];
int pre[30];
int main(){
	scanf("%s%s",s,t);
	ll n=strlen(s);
	rep(i,0,26)pre[i]=-1;
	rep(i,0,n)rep(j,0,26)id[i][j]=-1;
	
	rep(_,0,2)for(int i=n-1;i>=0;i--){
		rep(j,0,26)id[i][j]=pre[j];
		pre[s[i]-'a']=i;
	}
	ll cnt=-1,pos=n-1;
	ll m=strlen(t);
	rep(i,0,m){
		int nx=id[pos][t[i]-'a'];
		if(nx==-1){
			puts("-1");
			return 0;
		}
		if(nx<=pos)cnt++;
		pos=nx;
	}
	printf("%lld",cnt*n+pos+1);
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	upll
	.type	upll, @function
upll:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movq	-8(%rbp), %rax
	movq	(%rax), %rdx
	movq	-16(%rbp), %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	jl	.L2
	movq	-8(%rbp), %rax
	movq	(%rax), %rdx
	movq	-16(%rbp), %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	setg	%al
	movzbl	%al, %eax
	jmp	.L4
.L2:
	movl	$-1, %eax
.L4:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	upll, .-upll
	.globl	downll
	.type	downll, @function
downll:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movq	-8(%rbp), %rax
	movq	(%rax), %rdx
	movq	-16(%rbp), %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	jl	.L6
	movq	-8(%rbp), %rax
	movq	(%rax), %rdx
	movq	-16(%rbp), %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	jle	.L7
	movl	$-1, %eax
	jmp	.L10
.L7:
	movl	$0, %eax
	jmp	.L10
.L6:
	movl	$1, %eax
.L10:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	downll, .-downll
	.globl	sortup
	.type	sortup, @function
sortup:
.LFB8:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	movq	%rdi, -8(%rbp)
	movl	%esi, -12(%rbp)
	movl	-12(%rbp), %eax
	movslq	%eax, %rsi
	movq	-8(%rbp), %rax
	leaq	upll(%rip), %rdx
	movq	%rdx, %rcx
	movl	$8, %edx
	movq	%rax, %rdi
	call	qsort@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	sortup, .-sortup
	.globl	sortdown
	.type	sortdown, @function
sortdown:
.LFB9:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	movq	%rdi, -8(%rbp)
	movl	%esi, -12(%rbp)
	movl	-12(%rbp), %eax
	movslq	%eax, %rsi
	movq	-8(%rbp), %rax
	leaq	downll(%rip), %rdx
	movq	%rdx, %rcx
	movl	$8, %edx
	movq	%rax, %rdi
	call	qsort@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	sortdown, .-sortdown
	.globl	pom
	.type	pom, @function
pom:
.LFB10:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -24(%rbp)
	movq	%rsi, -32(%rbp)
	movl	%edx, -36(%rbp)
	movq	$1, -8(%rbp)
	movl	-36(%rbp), %eax
	movslq	%eax, %rcx
	movq	-24(%rbp), %rax
	cqto
	idivq	%rcx
	movq	%rdx, -24(%rbp)
	jmp	.L14
.L17:
	movq	-32(%rbp), %rax
	andl	$1, %eax
	testq	%rax, %rax
	je	.L16
	movq	-8(%rbp), %rax
	imulq	-24(%rbp), %rax
	movl	-36(%rbp), %edx
	movslq	%edx, %rcx
	cqto
	idivq	%rcx
	movq	%rdx, -8(%rbp)
.L16:
	movq	-24(%rbp), %rax
	imulq	%rax, %rax
	movl	-36(%rbp), %edx
	movslq	%edx, %rcx
	cqto
	idivq	%rcx
	movq	%rdx, -24(%rbp)
	movq	-32(%rbp), %rax
	movq	%rax, %rdx
	shrq	$63, %rdx
	addq	%rdx, %rax
	sarq	%rax
	movq	%rax, -32(%rbp)
.L14:
	cmpq	$0, -32(%rbp)
	jne	.L17
	movq	-8(%rbp), %rax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	pom, .-pom
	.globl	id
	.bss
	.align 32
	.type	id, @object
	.size	id, 12001200
id:
	.zero	12001200
	.globl	s
	.align 32
	.type	s, @object
	.size	s, 100010
s:
	.zero	100010
	.globl	t
	.align 32
	.type	t, @object
	.size	t, 100010
t:
	.zero	100010
	.globl	pre
	.align 32
	.type	pre, @object
	.size	pre, 120
pre:
	.zero	120
	.section	.rodata
.LC0:
	.string	"%s%s"
.LC1:
	.string	"-1"
.LC2:
	.string	"%lld"
	.text
	.globl	main
	.type	main, @function
main:
.LFB11:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$96, %rsp
	leaq	t(%rip), %rax
	movq	%rax, %rdx
	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
	movq	%rax, -16(%rbp)
	movq	$0, -80(%rbp)
	jmp	.L20
.L21:
	movq	-80(%rbp), %rax
	leaq	0(,%rax,4), %rdx
	leaq	pre(%rip), %rax
	movl	$-1, (%rdx,%rax)
	addq	$1, -80(%rbp)
.L20:
	cmpq	$25, -80(%rbp)
	jle	.L21
	movq	$0, -72(%rbp)
	jmp	.L22
.L25:
	movq	$0, -64(%rbp)
	jmp	.L23
.L24:
	movq	-72(%rbp), %rdx
	movq	%rdx, %rax
	salq	$4, %rax
	subq	%rdx, %rax
	addq	%rax, %rax
	movq	-64(%rbp), %rdx
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	id(%rip), %rax
	movl	$-1, (%rdx,%rax)
	addq	$1, -64(%rbp)
.L23:
	cmpq	$25, -64(%rbp)
	jle	.L24
	addq	$1, -72(%rbp)
.L22:
	movq	-72(%rbp), %rax
	cmpq	-16(%rbp), %rax
	jl	.L25
	movq	$0, -56(%rbp)
	jmp	.L26
.L31:
	movq	-16(%rbp), %rax
	subl	$1, %eax
	movl	%eax, -88(%rbp)
	jmp	.L27
.L30:
	movq	$0, -48(%rbp)
	jmp	.L28
.L29:
	movq	-48(%rbp), %rax
	leaq	0(,%rax,4), %rdx
	leaq	pre(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-88(%rbp), %eax
	movslq	%eax, %rcx
	movq	%rcx, %rax
	salq	$4, %rax
	subq	%rcx, %rax
	addq	%rax, %rax
	movq	-48(%rbp), %rcx
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rcx
	leaq	id(%rip), %rax
	movl	%edx, (%rcx,%rax)
	addq	$1, -48(%rbp)
.L28:
	cmpq	$25, -48(%rbp)
	jle	.L29
	movl	-88(%rbp), %eax
	cltq
	leaq	s(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	movsbl	%al, %eax
	subl	$97, %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	pre(%rip), %rdx
	movl	-88(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	subl	$1, -88(%rbp)
.L27:
	cmpl	$0, -88(%rbp)
	jns	.L30
	addq	$1, -56(%rbp)
.L26:
	cmpq	$1, -56(%rbp)
	jle	.L31
	movq	$-1, -40(%rbp)
	movq	-16(%rbp), %rax
	subq	$1, %rax
	movq	%rax, -32(%rbp)
	leaq	t(%rip), %rax
	movq	%rax, %rdi
	call	strlen@PLT
	movq	%rax, -8(%rbp)
	movq	$0, -24(%rbp)
	jmp	.L32
.L36:
	leaq	t(%rip), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	movsbl	%al, %eax
	subl	$97, %eax
	movslq	%eax, %rcx
	movq	-32(%rbp), %rdx
	movq	%rdx, %rax
	salq	$4, %rax
	subq	%rdx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	id(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -84(%rbp)
	cmpl	$-1, -84(%rbp)
	jne	.L33
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
	jmp	.L34
.L33:
	movl	-84(%rbp), %eax
	cltq
	cmpq	%rax, -32(%rbp)
	jl	.L35
	addq	$1, -40(%rbp)
.L35:
	movl	-84(%rbp), %eax
	cltq
	movq	%rax, -32(%rbp)
	addq	$1, -24(%rbp)
.L32:
	movq	-24(%rbp), %rax
	cmpq	-8(%rbp), %rax
	jl	.L36
	movq	-40(%rbp), %rax
	imulq	-16(%rbp), %rax
	movq	%rax, %rdx
	movq	-32(%rbp), %rax
	addq	%rdx, %rax
	addq	$1, %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
.L34:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.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	upll
	.type	upll, @function
upll:
.LFB6:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movq	-8(%rbp), %rax
	movq	(%rax), %rdx
	movq	-16(%rbp), %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	jl	.L2
	movq	-8(%rbp), %rax
	movq	(%rax), %rdx
	movq	-16(%rbp), %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	setg	%al
	movzbl	%al, %eax
	jmp	.L4
.L2:
	movl	$-1, %eax
.L4:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	upll, .-upll
	.globl	downll
	.type	downll, @function
downll:
.LFB7:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movq	-8(%rbp), %rax
	movq	(%rax), %rdx
	movq	-16(%rbp), %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	jl	.L6
	movq	-8(%rbp), %rax
	movq	(%rax), %rdx
	movq	-16(%rbp), %rax
	movq	(%rax), %rax
	cmpq	%rax, %rdx
	jle	.L7
	movl	$-1, %eax
	jmp	.L10
.L7:
	movl	$0, %eax
	jmp	.L10
.L6:
	movl	$1, %eax
.L10:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	downll, .-downll
	.globl	sortup
	.type	sortup, @function
sortup:
.LFB8:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	movq	%rdi, -8(%rbp)
	movl	%esi, -12(%rbp)
	movl	-12(%rbp), %eax
	movslq	%eax, %rsi
	movq	-8(%rbp), %rax
	leaq	upll(%rip), %rdx
	movq	%rdx, %rcx
	movl	$8, %edx
	movq	%rax, %rdi
	call	qsort@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	sortup, .-sortup
	.globl	sortdown
	.type	sortdown, @function
sortdown:
.LFB9:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	movq	%rdi, -8(%rbp)
	movl	%esi, -12(%rbp)
	movl	-12(%rbp), %eax
	movslq	%eax, %rsi
	movq	-8(%rbp), %rax
	leaq	downll(%rip), %rdx
	movq	%rdx, %rcx
	movl	$8, %edx
	movq	%rax, %rdi
	call	qsort@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	sortdown, .-sortdown
	.globl	pom
	.type	pom, @function
pom:
.LFB10:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -24(%rbp)
	movq	%rsi, -32(%rbp)
	movl	%edx, -36(%rbp)
	movq	$1, -8(%rbp)
	movl	-36(%rbp), %eax
	movslq	%eax, %rcx
	movq	-24(%rbp), %rax
	cqto
	idivq	%rcx
	movq	%rdx, -24(%rbp)
	jmp	.L14
.L17:
	movq	-32(%rbp), %rax
	andl	$1, %eax
	testq	%rax, %rax
	je	.L16
	movq	-8(%rbp), %rax
	imulq	-24(%rbp), %rax
	movl	-36(%rbp), %edx
	movslq	%edx, %rcx
	cqto
	idivq	%rcx
	movq	%rdx, -8(%rbp)
.L16:
	movq	-24(%rbp), %rax
	imulq	%rax, %rax
	movl	-36(%rbp), %edx
	movslq	%edx, %rcx
	cqto
	idivq	%rcx
	movq	%rdx, -24(%rbp)
	movq	-32(%rbp), %rax
	movq	%rax, %rdx
	shrq	$63, %rdx
	addq	%rdx, %rax
	sarq	%rax
	movq	%rax, -32(%rbp)
.L14:
	cmpq	$0, -32(%rbp)
	jne	.L17
	movq	-8(%rbp), %rax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	pom, .-pom
	.globl	id
	.bss
	.align 32
	.type	id, @object
	.size	id, 12001200
id:
	.zero	12001200
	.globl	s
	.align 32
	.type	s, @object
	.size	s, 100010
s:
	.zero	100010
	.globl	t
	.align 32
	.type	t, @object
	.size	t, 100010
t:
	.zero	100010
	.globl	pre
	.align 32
	.type	pre, @object
	.size	pre, 120
pre:
	.zero	120
	.section	.rodata
.LC0:
	.string	"%s%s"
.LC1:
	.string	"-1"
.LC2:
	.string	"%lld"
	.text
	.globl	main
	.type	main, @function
main:
.LFB11:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$96, %rsp
	leaq	t(%rip), %rax
	movq	%rax, %rdx
	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
	movq	%rax, -16(%rbp)
	movq	$0, -80(%rbp)
	jmp	.L20
.L21:
	movq	-80(%rbp), %rax
	leaq	0(,%rax,4), %rdx
	leaq	pre(%rip), %rax
	movl	$-1, (%rdx,%rax)
	addq	$1, -80(%rbp)
.L20:
	cmpq	$25, -80(%rbp)
	jle	.L21
	movq	$0, -72(%rbp)
	jmp	.L22
.L25:
	movq	$0, -64(%rbp)
	jmp	.L23
.L24:
	movq	-72(%rbp), %rdx
	movq	%rdx, %rax
	salq	$4, %rax
	subq	%rdx, %rax
	addq	%rax, %rax
	movq	-64(%rbp), %rdx
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	id(%rip), %rax
	movl	$-1, (%rdx,%rax)
	addq	$1, -64(%rbp)
.L23:
	cmpq	$25, -64(%rbp)
	jle	.L24
	addq	$1, -72(%rbp)
.L22:
	movq	-72(%rbp), %rax
	cmpq	-16(%rbp), %rax
	jl	.L25
	movq	$0, -56(%rbp)
	jmp	.L26
.L31:
	movq	-16(%rbp), %rax
	subl	$1, %eax
	movl	%eax, -88(%rbp)
	jmp	.L27
.L30:
	movq	$0, -48(%rbp)
	jmp	.L28
.L29:
	movq	-48(%rbp), %rax
	leaq	0(,%rax,4), %rdx
	leaq	pre(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-88(%rbp), %eax
	movslq	%eax, %rcx
	movq	%rcx, %rax
	salq	$4, %rax
	subq	%rcx, %rax
	addq	%rax, %rax
	movq	-48(%rbp), %rcx
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rcx
	leaq	id(%rip), %rax
	movl	%edx, (%rcx,%rax)
	addq	$1, -48(%rbp)
.L28:
	cmpq	$25, -48(%rbp)
	jle	.L29
	movl	-88(%rbp), %eax
	cltq
	leaq	s(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	movsbl	%al, %eax
	subl	$97, %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	pre(%rip), %rdx
	movl	-88(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	subl	$1, -88(%rbp)
.L27:
	cmpl	$0, -88(%rbp)
	jns	.L30
	addq	$1, -56(%rbp)
.L26:
	cmpq	$1, -56(%rbp)
	jle	.L31
	movq	$-1, -40(%rbp)
	movq	-16(%rbp), %rax
	subq	$1, %rax
	movq	%rax, -32(%rbp)
	leaq	t(%rip), %rax
	movq	%rax, %rdi
	call	strlen@PLT
	movq	%rax, -8(%rbp)
	movq	$0, -24(%rbp)
	jmp	.L32
.L36:
	leaq	t(%rip), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	movsbl	%al, %eax
	subl	$97, %eax
	movslq	%eax, %rcx
	movq	-32(%rbp), %rdx
	movq	%rdx, %rax
	salq	$4, %rax
	subq	%rdx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	id(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, -84(%rbp)
	cmpl	$-1, -84(%rbp)
	jne	.L33
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
	jmp	.L34
.L33:
	movl	-84(%rbp), %eax
	cltq
	cmpq	%rax, -32(%rbp)
	jl	.L35
	addq	$1, -40(%rbp)
.L35:
	movl	-84(%rbp), %eax
	cltq
	movq	%rax, -32(%rbp)
	addq	$1, -24(%rbp)
.L32:
	movq	-24(%rbp), %rax
	cmpq	-8(%rbp), %rax
	jl	.L36
	movq	-40(%rbp), %rax
	imulq	-16(%rbp), %rax
	movq	%rax, %rdx
	movq	-32(%rbp), %rax
	addq	%rdx, %rax
	addq	$1, %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
.L34:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.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:
