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>
int d[100010][30],n;
int main(){
  char s[100010],t[100010];
  long long ans=0,a,l,i,b[30];
  scanf("%s %s",s,t);
  for(l=0;s[l];l++);
  for(i=0;i<30;i++)b[i]=-1;
  for(i=l;i--;)b[s[i]-'a']=i+l;
  for(a=l;a--;){
    for(i=0;i<30;i++)d[a][i]=b[i];
    b[s[a]-'a']=a;
  }
  ans=a=b[t[0]-'a'];//printf("%lld\n",ans);
  if(ans<0)goto END;
  for(i=1;t[i];i++){//printf("%d\n",d[a][t[i+1]+'a']);
    n=d[a][t[i]-'a'];//printf("%d\n",n);
    if(n<0)goto END;
    ans+=n-a;
    a=n%l;
  }
  printf("%lld\n",ans+1);
  return 0;
 END:;
  printf("-1\n");
  return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	d
	.bss
	.align 32
	.type	d, @object
	.size	d, 12001200
d:
	.zero	12001200
	.globl	n
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.section	.rodata
.LC0:
	.string	"%s %s"
.LC1:
	.string	"%lld\n"
.LC2:
	.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	-196608(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$3712, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movq	$0, -200320(%rbp)
	leaq	-100032(%rbp), %rdx
	leaq	-200048(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	$0, -200304(%rbp)
	jmp	.L2
.L3:
	addq	$1, -200304(%rbp)
.L2:
	leaq	-200048(%rbp), %rdx
	movq	-200304(%rbp), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	testb	%al, %al
	jne	.L3
	movq	$0, -200296(%rbp)
	jmp	.L4
.L5:
	movq	-200296(%rbp), %rax
	movq	$-1, -200288(%rbp,%rax,8)
	addq	$1, -200296(%rbp)
.L4:
	cmpq	$29, -200296(%rbp)
	jle	.L5
	movq	-200304(%rbp), %rax
	movq	%rax, -200296(%rbp)
	jmp	.L6
.L7:
	leaq	-200048(%rbp), %rdx
	movq	-200296(%rbp), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	movsbl	%al, %eax
	subl	$97, %eax
	movq	-200296(%rbp), %rcx
	movq	-200304(%rbp), %rdx
	addq	%rcx, %rdx
	cltq
	movq	%rdx, -200288(%rbp,%rax,8)
.L6:
	movq	-200296(%rbp), %rax
	leaq	-1(%rax), %rdx
	movq	%rdx, -200296(%rbp)
	testq	%rax, %rax
	jne	.L7
	movq	-200304(%rbp), %rax
	movq	%rax, -200312(%rbp)
	jmp	.L8
.L11:
	movq	$0, -200296(%rbp)
	jmp	.L9
.L10:
	movq	-200296(%rbp), %rax
	movq	-200288(%rbp,%rax,8), %rax
	movl	%eax, %ecx
	movq	-200312(%rbp), %rdx
	movq	%rdx, %rax
	salq	$4, %rax
	subq	%rdx, %rax
	addq	%rax, %rax
	movq	-200296(%rbp), %rdx
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	d(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	addq	$1, -200296(%rbp)
.L9:
	cmpq	$29, -200296(%rbp)
	jle	.L10
	leaq	-200048(%rbp), %rdx
	movq	-200312(%rbp), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	movsbl	%al, %eax
	subl	$97, %eax
	cltq
	movq	-200312(%rbp), %rdx
	movq	%rdx, -200288(%rbp,%rax,8)
.L8:
	movq	-200312(%rbp), %rax
	leaq	-1(%rax), %rdx
	movq	%rdx, -200312(%rbp)
	testq	%rax, %rax
	jne	.L11
	movzbl	-100032(%rbp), %eax
	movsbl	%al, %eax
	subl	$97, %eax
	cltq
	movq	-200288(%rbp,%rax,8), %rax
	movq	%rax, -200312(%rbp)
	movq	-200312(%rbp), %rax
	movq	%rax, -200320(%rbp)
	cmpq	$0, -200320(%rbp)
	js	.L20
	movq	$1, -200296(%rbp)
	jmp	.L14
.L16:
	leaq	-100032(%rbp), %rdx
	movq	-200296(%rbp), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	movsbl	%al, %eax
	subl	$97, %eax
	movslq	%eax, %rcx
	movq	-200312(%rbp), %rdx
	movq	%rdx, %rax
	salq	$4, %rax
	subq	%rdx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	d(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, n(%rip)
	movl	n(%rip), %eax
	testl	%eax, %eax
	js	.L21
	movl	n(%rip), %eax
	cltq
	subq	-200312(%rbp), %rax
	addq	%rax, -200320(%rbp)
	movl	n(%rip), %eax
	cltq
	cqto
	idivq	-200304(%rbp)
	movq	%rdx, -200312(%rbp)
	addq	$1, -200296(%rbp)
.L14:
	leaq	-100032(%rbp), %rdx
	movq	-200296(%rbp), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	testb	%al, %al
	jne	.L16
	movq	-200320(%rbp), %rax
	addq	$1, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	jmp	.L18
.L20:
	nop
	jmp	.L13
.L21:
	nop
.L13:
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
.L18:
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L19
	call	__stack_chk_fail@PLT
.L19:
	leave
	.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 %s"
.LC1:
	.string	"%lld\n"
.LC2:
	.string	"-1"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	leaq	-196608(%rsp), %r11
	.cfi_def_cfa 11, 196624
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$3680, %rsp
	.cfi_def_cfa_offset 200304
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 200280(%rsp)
	xorl	%eax, %eax
	leaq	240(%rsp), %rbx
	leaq	100256(%rsp), %rdx
	movq	%rbx, %rsi
	call	__isoc99_scanf@PLT
	cmpb	$0, 240(%rsp)
	je	.L2
	xorl	%esi, %esi
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%rsi, %rdx
	addq	$1, %rsi
	cmpb	$0, (%rbx,%rsi)
	jne	.L3
	pcmpeqd	%xmm0, %xmm0
	movq	%rbx, %rdi
	leaq	(%rsi,%rdx), %rcx
	movaps	%xmm0, (%rsp)
	subq	%rsi, %rdi
	movaps	%xmm0, 16(%rsp)
	movaps	%xmm0, 32(%rsp)
	movaps	%xmm0, 48(%rsp)
	movaps	%xmm0, 64(%rsp)
	movaps	%xmm0, 80(%rsp)
	movaps	%xmm0, 96(%rsp)
	movaps	%xmm0, 112(%rsp)
	movaps	%xmm0, 128(%rsp)
	movaps	%xmm0, 144(%rsp)
	movaps	%xmm0, 160(%rsp)
	movaps	%xmm0, 176(%rsp)
	movaps	%xmm0, 192(%rsp)
	movaps	%xmm0, 208(%rsp)
	movaps	%xmm0, 224(%rsp)
	.p2align 4,,10
	.p2align 3
.L6:
	movsbl	(%rdi,%rcx), %eax
	subl	$97, %eax
	cltq
	movq	%rcx, (%rsp,%rax,8)
	subq	$1, %rcx
	cmpq	%rdx, %rcx
	jne	.L6
	movq	%rdx, %rax
	leaq	d(%rip), %rdi
	salq	$4, %rax
	subq	%rdx, %rax
	leaq	(%rdi,%rax,8), %rax
	.p2align 4,,10
	.p2align 3
.L9:
	movdqa	(%rsp), %xmm0
	shufps	$136, 16(%rsp), %xmm0
	movups	%xmm0, (%rax)
	movd	232(%rsp), %xmm1
	movdqa	32(%rsp), %xmm0
	shufps	$136, 48(%rsp), %xmm0
	movups	%xmm0, 16(%rax)
	movdqa	64(%rsp), %xmm0
	shufps	$136, 80(%rsp), %xmm0
	movups	%xmm0, 32(%rax)
	movdqa	96(%rsp), %xmm0
	shufps	$136, 112(%rsp), %xmm0
	movups	%xmm0, 48(%rax)
	subq	$120, %rax
	movdqa	128(%rsp), %xmm0
	shufps	$136, 144(%rsp), %xmm0
	movups	%xmm0, 184(%rax)
	movdqa	160(%rsp), %xmm0
	shufps	$136, 176(%rsp), %xmm0
	movups	%xmm0, 200(%rax)
	movdqa	192(%rsp), %xmm0
	shufps	$136, 208(%rsp), %xmm0
	movups	%xmm0, 216(%rax)
	movd	224(%rsp), %xmm0
	punpckldq	%xmm1, %xmm0
	movq	%xmm0, 232(%rax)
	movsbl	(%rbx,%rdx), %ecx
	subl	$97, %ecx
	movslq	%ecx, %rcx
	movq	%rdx, (%rsp,%rcx,8)
	subq	$1, %rdx
	cmpq	$-1, %rdx
	jne	.L9
.L5:
	movsbl	100256(%rsp), %eax
	subl	$97, %eax
	cltq
	movq	(%rsp,%rax,8), %r9
	testq	%r9, %r9
	js	.L7
	movsbl	100257(%rsp), %eax
	testb	%al, %al
	je	.L10
	leaq	100258(%rsp), %r8
	movq	%r9, %rdx
	leaq	d(%rip), %rdi
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L27:
	movslq	%ecx, %rax
	addq	$1, %r8
	movq	%rax, %r10
	subq	%rdx, %r10
	cqto
	idivq	%rsi
	movsbl	-1(%r8), %eax
	addq	%r10, %r9
	testb	%al, %al
	je	.L26
.L12:
	movq	%rdx, %rcx
	subl	$97, %eax
	salq	$4, %rcx
	cltq
	subq	%rdx, %rcx
	leaq	(%rax,%rcx,2), %rax
	movl	(%rdi,%rax,4), %ecx
	testl	%ecx, %ecx
	jns	.L27
	movl	%ecx, n(%rip)
.L7:
	leaq	.LC2(%rip), %rdi
	call	puts@PLT
.L13:
	movq	200280(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L28
	addq	$200288, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 16
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 8
	ret
.L26:
	.cfi_restore_state
	movl	%ecx, n(%rip)
.L10:
	leaq	1(%r9), %rdx
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L13
.L2:
	movq	%rsp, %rdx
	movl	$240, %ecx
	movl	$-1, %eax
	xorl	%esi, %esi
	movq	%rdx, %rdi
	rep stosb
	jmp	.L5
.L28:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.globl	n
	.bss
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	d
	.align 32
	.type	d, @object
	.size	d, 12001200
d:
	.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
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%s %s"
.LC1:
	.string	"%lld\n"
.LC2:
	.string	"-1"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	leaq	-196608(%rsp), %r11
	.cfi_def_cfa 11, 196624
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	.cfi_def_cfa_register 7
	subq	$3680, %rsp
	.cfi_def_cfa_offset 200304
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 200280(%rsp)
	xorl	%eax, %eax
	leaq	240(%rsp), %rbx
	leaq	100256(%rsp), %rdx
	movq	%rbx, %rsi
	call	__isoc99_scanf@PLT
	cmpb	$0, 240(%rsp)
	je	.L2
	xorl	%esi, %esi
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%rsi, %rdx
	addq	$1, %rsi
	cmpb	$0, (%rbx,%rsi)
	jne	.L3
	pcmpeqd	%xmm0, %xmm0
	movq	%rbx, %rdi
	leaq	(%rsi,%rdx), %rcx
	movaps	%xmm0, (%rsp)
	subq	%rsi, %rdi
	movaps	%xmm0, 16(%rsp)
	movaps	%xmm0, 32(%rsp)
	movaps	%xmm0, 48(%rsp)
	movaps	%xmm0, 64(%rsp)
	movaps	%xmm0, 80(%rsp)
	movaps	%xmm0, 96(%rsp)
	movaps	%xmm0, 112(%rsp)
	movaps	%xmm0, 128(%rsp)
	movaps	%xmm0, 144(%rsp)
	movaps	%xmm0, 160(%rsp)
	movaps	%xmm0, 176(%rsp)
	movaps	%xmm0, 192(%rsp)
	movaps	%xmm0, 208(%rsp)
	movaps	%xmm0, 224(%rsp)
	.p2align 4,,10
	.p2align 3
.L6:
	movsbl	(%rdi,%rcx), %eax
	subl	$97, %eax
	cltq
	movq	%rcx, (%rsp,%rax,8)
	subq	$1, %rcx
	cmpq	%rdx, %rcx
	jne	.L6
	movq	%rdx, %rax
	leaq	d(%rip), %rdi
	salq	$4, %rax
	subq	%rdx, %rax
	leaq	(%rdi,%rax,8), %rax
	.p2align 4,,10
	.p2align 3
.L9:
	movdqa	(%rsp), %xmm0
	shufps	$136, 16(%rsp), %xmm0
	movups	%xmm0, (%rax)
	movd	232(%rsp), %xmm1
	movdqa	32(%rsp), %xmm0
	shufps	$136, 48(%rsp), %xmm0
	movups	%xmm0, 16(%rax)
	movdqa	64(%rsp), %xmm0
	shufps	$136, 80(%rsp), %xmm0
	movups	%xmm0, 32(%rax)
	movdqa	96(%rsp), %xmm0
	shufps	$136, 112(%rsp), %xmm0
	movups	%xmm0, 48(%rax)
	subq	$120, %rax
	movdqa	128(%rsp), %xmm0
	shufps	$136, 144(%rsp), %xmm0
	movups	%xmm0, 184(%rax)
	movdqa	160(%rsp), %xmm0
	shufps	$136, 176(%rsp), %xmm0
	movups	%xmm0, 200(%rax)
	movdqa	192(%rsp), %xmm0
	shufps	$136, 208(%rsp), %xmm0
	movups	%xmm0, 216(%rax)
	movd	224(%rsp), %xmm0
	punpckldq	%xmm1, %xmm0
	movq	%xmm0, 232(%rax)
	movsbl	(%rbx,%rdx), %ecx
	subl	$97, %ecx
	movslq	%ecx, %rcx
	movq	%rdx, (%rsp,%rcx,8)
	subq	$1, %rdx
	cmpq	$-1, %rdx
	jne	.L9
.L5:
	movsbl	100256(%rsp), %eax
	subl	$97, %eax
	cltq
	movq	(%rsp,%rax,8), %r9
	testq	%r9, %r9
	js	.L7
	movsbl	100257(%rsp), %eax
	testb	%al, %al
	je	.L10
	leaq	100258(%rsp), %r8
	movq	%r9, %rdx
	leaq	d(%rip), %rdi
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L27:
	movslq	%ecx, %rax
	addq	$1, %r8
	movq	%rax, %r10
	subq	%rdx, %r10
	cqto
	idivq	%rsi
	movsbl	-1(%r8), %eax
	addq	%r10, %r9
	testb	%al, %al
	je	.L26
.L12:
	movq	%rdx, %rcx
	subl	$97, %eax
	salq	$4, %rcx
	cltq
	subq	%rdx, %rcx
	leaq	(%rax,%rcx,2), %rax
	movl	(%rdi,%rax,4), %ecx
	testl	%ecx, %ecx
	jns	.L27
	movl	%ecx, n(%rip)
.L7:
	leaq	.LC2(%rip), %rdi
	call	puts@PLT
.L13:
	movq	200280(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L28
	addq	$200288, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 16
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 8
	ret
.L26:
	.cfi_restore_state
	movl	%ecx, n(%rip)
.L10:
	leaq	1(%r9), %rdx
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	jmp	.L13
.L2:
	movq	%rsp, %rdx
	movl	$240, %ecx
	movl	$-1, %eax
	xorl	%esi, %esi
	movq	%rdx, %rdi
	rep stosb
	jmp	.L5
.L28:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.globl	n
	.bss
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	d
	.align 32
	.type	d, @object
	.size	d, 12001200
d:
	.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>
int d[100010][30],n;
int main(){
  char s[100010],t[100010];
  long long ans=0,a,l,i,b[30];
  scanf("%s %s",s,t);
  for(l=0;s[l];l++);
  for(i=0;i<30;i++)b[i]=-1;
  for(i=l;i--;)b[s[i]-'a']=i+l;
  for(a=l;a--;){
    for(i=0;i<30;i++)d[a][i]=b[i];
    b[s[a]-'a']=a;
  }
  ans=a=b[t[0]-'a'];//printf("%lld\n",ans);
  if(ans<0)goto END;
  for(i=1;t[i];i++){//printf("%d\n",d[a][t[i+1]+'a']);
    n=d[a][t[i]-'a'];//printf("%d\n",n);
    if(n<0)goto END;
    ans+=n-a;
    a=n%l;
  }
  printf("%lld\n",ans+1);
  return 0;
 END:;
  printf("-1\n");
  return 0;
}

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>
int d[100010][30],n;
int main(){
  char s[100010],t[100010];
  long long ans=0,a,l,i,b[30];
  scanf("%s %s",s,t);
  for(l=0;s[l];l++);
  for(i=0;i<30;i++)b[i]=-1;
  for(i=l;i--;)b[s[i]-'a']=i+l;
  for(a=l;a--;){
    for(i=0;i<30;i++)d[a][i]=b[i];
    b[s[a]-'a']=a;
  }
  ans=a=b[t[0]-'a'];//printf("%lld\n",ans);
  if(ans<0)goto END;
  for(i=1;t[i];i++){//printf("%d\n",d[a][t[i+1]+'a']);
    n=d[a][t[i]-'a'];//printf("%d\n",n);
    if(n<0)goto END;
    ans+=n-a;
    a=n%l;
  }
  printf("%lld\n",ans+1);
  return 0;
 END:;
  printf("-1\n");
  return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	d
	.bss
	.align 32
	.type	d, @object
	.size	d, 12001200
d:
	.zero	12001200
	.globl	n
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.section	.rodata
.LC0:
	.string	"%s %s"
.LC1:
	.string	"%lld\n"
.LC2:
	.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	-196608(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$3712, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movq	$0, -200320(%rbp)
	leaq	-100032(%rbp), %rdx
	leaq	-200048(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	$0, -200304(%rbp)
	jmp	.L2
.L3:
	addq	$1, -200304(%rbp)
.L2:
	leaq	-200048(%rbp), %rdx
	movq	-200304(%rbp), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	testb	%al, %al
	jne	.L3
	movq	$0, -200296(%rbp)
	jmp	.L4
.L5:
	movq	-200296(%rbp), %rax
	movq	$-1, -200288(%rbp,%rax,8)
	addq	$1, -200296(%rbp)
.L4:
	cmpq	$29, -200296(%rbp)
	jle	.L5
	movq	-200304(%rbp), %rax
	movq	%rax, -200296(%rbp)
	jmp	.L6
.L7:
	leaq	-200048(%rbp), %rdx
	movq	-200296(%rbp), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	movsbl	%al, %eax
	subl	$97, %eax
	movq	-200296(%rbp), %rcx
	movq	-200304(%rbp), %rdx
	addq	%rcx, %rdx
	cltq
	movq	%rdx, -200288(%rbp,%rax,8)
.L6:
	movq	-200296(%rbp), %rax
	leaq	-1(%rax), %rdx
	movq	%rdx, -200296(%rbp)
	testq	%rax, %rax
	jne	.L7
	movq	-200304(%rbp), %rax
	movq	%rax, -200312(%rbp)
	jmp	.L8
.L11:
	movq	$0, -200296(%rbp)
	jmp	.L9
.L10:
	movq	-200296(%rbp), %rax
	movq	-200288(%rbp,%rax,8), %rax
	movl	%eax, %ecx
	movq	-200312(%rbp), %rdx
	movq	%rdx, %rax
	salq	$4, %rax
	subq	%rdx, %rax
	addq	%rax, %rax
	movq	-200296(%rbp), %rdx
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	d(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	addq	$1, -200296(%rbp)
.L9:
	cmpq	$29, -200296(%rbp)
	jle	.L10
	leaq	-200048(%rbp), %rdx
	movq	-200312(%rbp), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	movsbl	%al, %eax
	subl	$97, %eax
	cltq
	movq	-200312(%rbp), %rdx
	movq	%rdx, -200288(%rbp,%rax,8)
.L8:
	movq	-200312(%rbp), %rax
	leaq	-1(%rax), %rdx
	movq	%rdx, -200312(%rbp)
	testq	%rax, %rax
	jne	.L11
	movzbl	-100032(%rbp), %eax
	movsbl	%al, %eax
	subl	$97, %eax
	cltq
	movq	-200288(%rbp,%rax,8), %rax
	movq	%rax, -200312(%rbp)
	movq	-200312(%rbp), %rax
	movq	%rax, -200320(%rbp)
	cmpq	$0, -200320(%rbp)
	js	.L20
	movq	$1, -200296(%rbp)
	jmp	.L14
.L16:
	leaq	-100032(%rbp), %rdx
	movq	-200296(%rbp), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	movsbl	%al, %eax
	subl	$97, %eax
	movslq	%eax, %rcx
	movq	-200312(%rbp), %rdx
	movq	%rdx, %rax
	salq	$4, %rax
	subq	%rdx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	d(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, n(%rip)
	movl	n(%rip), %eax
	testl	%eax, %eax
	js	.L21
	movl	n(%rip), %eax
	cltq
	subq	-200312(%rbp), %rax
	addq	%rax, -200320(%rbp)
	movl	n(%rip), %eax
	cltq
	cqto
	idivq	-200304(%rbp)
	movq	%rdx, -200312(%rbp)
	addq	$1, -200296(%rbp)
.L14:
	leaq	-100032(%rbp), %rdx
	movq	-200296(%rbp), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	testb	%al, %al
	jne	.L16
	movq	-200320(%rbp), %rax
	addq	$1, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	jmp	.L18
.L20:
	nop
	jmp	.L13
.L21:
	nop
.L13:
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
.L18:
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L19
	call	__stack_chk_fail@PLT
.L19:
	leave
	.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	d
	.bss
	.align 32
	.type	d, @object
	.size	d, 12001200
d:
	.zero	12001200
	.globl	n
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.section	.rodata
.LC0:
	.string	"%s %s"
.LC1:
	.string	"%lld\n"
.LC2:
	.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	-196608(%rsp), %r11
.LPSRL0:
	subq	$4096, %rsp
	orq	$0, (%rsp)
	cmpq	%r11, %rsp
	jne	.LPSRL0
	subq	$3712, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movq	$0, -200320(%rbp)
	leaq	-100032(%rbp), %rdx
	leaq	-200048(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	$0, -200304(%rbp)
	jmp	.L2
.L3:
	addq	$1, -200304(%rbp)
.L2:
	leaq	-200048(%rbp), %rdx
	movq	-200304(%rbp), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	testb	%al, %al
	jne	.L3
	movq	$0, -200296(%rbp)
	jmp	.L4
.L5:
	movq	-200296(%rbp), %rax
	movq	$-1, -200288(%rbp,%rax,8)
	addq	$1, -200296(%rbp)
.L4:
	cmpq	$29, -200296(%rbp)
	jle	.L5
	movq	-200304(%rbp), %rax
	movq	%rax, -200296(%rbp)
	jmp	.L6
.L7:
	leaq	-200048(%rbp), %rdx
	movq	-200296(%rbp), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	movsbl	%al, %eax
	subl	$97, %eax
	movq	-200296(%rbp), %rcx
	movq	-200304(%rbp), %rdx
	addq	%rcx, %rdx
	cltq
	movq	%rdx, -200288(%rbp,%rax,8)
.L6:
	movq	-200296(%rbp), %rax
	leaq	-1(%rax), %rdx
	movq	%rdx, -200296(%rbp)
	testq	%rax, %rax
	jne	.L7
	movq	-200304(%rbp), %rax
	movq	%rax, -200312(%rbp)
	jmp	.L8
.L11:
	movq	$0, -200296(%rbp)
	jmp	.L9
.L10:
	movq	-200296(%rbp), %rax
	movq	-200288(%rbp,%rax,8), %rax
	movl	%eax, %ecx
	movq	-200312(%rbp), %rdx
	movq	%rdx, %rax
	salq	$4, %rax
	subq	%rdx, %rax
	addq	%rax, %rax
	movq	-200296(%rbp), %rdx
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	d(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	addq	$1, -200296(%rbp)
.L9:
	cmpq	$29, -200296(%rbp)
	jle	.L10
	leaq	-200048(%rbp), %rdx
	movq	-200312(%rbp), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	movsbl	%al, %eax
	subl	$97, %eax
	cltq
	movq	-200312(%rbp), %rdx
	movq	%rdx, -200288(%rbp,%rax,8)
.L8:
	movq	-200312(%rbp), %rax
	leaq	-1(%rax), %rdx
	movq	%rdx, -200312(%rbp)
	testq	%rax, %rax
	jne	.L11
	movzbl	-100032(%rbp), %eax
	movsbl	%al, %eax
	subl	$97, %eax
	cltq
	movq	-200288(%rbp,%rax,8), %rax
	movq	%rax, -200312(%rbp)
	movq	-200312(%rbp), %rax
	movq	%rax, -200320(%rbp)
	cmpq	$0, -200320(%rbp)
	js	.L20
	movq	$1, -200296(%rbp)
	jmp	.L14
.L16:
	leaq	-100032(%rbp), %rdx
	movq	-200296(%rbp), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	movsbl	%al, %eax
	subl	$97, %eax
	movslq	%eax, %rcx
	movq	-200312(%rbp), %rdx
	movq	%rdx, %rax
	salq	$4, %rax
	subq	%rdx, %rax
	addq	%rax, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	d(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	%eax, n(%rip)
	movl	n(%rip), %eax
	testl	%eax, %eax
	js	.L21
	movl	n(%rip), %eax
	cltq
	subq	-200312(%rbp), %rax
	addq	%rax, -200320(%rbp)
	movl	n(%rip), %eax
	cltq
	cqto
	idivq	-200304(%rbp)
	movq	%rdx, -200312(%rbp)
	addq	$1, -200296(%rbp)
.L14:
	leaq	-100032(%rbp), %rdx
	movq	-200296(%rbp), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	testb	%al, %al
	jne	.L16
	movq	-200320(%rbp), %rax
	addq	$1, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	jmp	.L18
.L20:
	nop
	jmp	.L13
.L21:
	nop
.L13:
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
.L18:
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L19
	call	__stack_chk_fail@PLT
.L19:
	leave
	.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:
