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 <ctype.h>

int a2i(char a) {
	if(islower(a))return a-'a';
	if(isupper(a))return a-'A'+26;
	return 0;
}

char i2a(int i) {
	if(i<26)return i+'a';
	else return i-26+'A';
}

int main(void) {
	int n,i;
	int key[100];
	char s[200];
	while(scanf("%d",&n)==1 && n>0) {
		for(i=0;i<n;i++)scanf("%d",&key[i]);
		scanf("%s",s);
		for(i=0;s[i];i++) {
			putchar(i2a((a2i(s[i])-key[i%n]+52)%52));
		}
		putchar('\n');
	}
	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	a2i
	.type	a2i, @function
a2i:
.LFB0:
	.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
	movl	%edi, %eax
	movb	%al, -4(%rbp)
	call	__ctype_b_loc@PLT
	movq	(%rax), %rdx
	movsbq	-4(%rbp), %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	movzwl	(%rax), %eax
	movzwl	%ax, %eax
	andl	$512, %eax
	testl	%eax, %eax
	je	.L2
	movsbl	-4(%rbp), %eax
	subl	$97, %eax
	jmp	.L3
.L2:
	call	__ctype_b_loc@PLT
	movq	(%rax), %rdx
	movsbq	-4(%rbp), %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	movzwl	(%rax), %eax
	movzwl	%ax, %eax
	andl	$256, %eax
	testl	%eax, %eax
	je	.L4
	movsbl	-4(%rbp), %eax
	subl	$39, %eax
	jmp	.L3
.L4:
	movl	$0, %eax
.L3:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	a2i, .-a2i
	.globl	i2a
	.type	i2a, @function
i2a:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -4(%rbp)
	cmpl	$25, -4(%rbp)
	jg	.L6
	movl	-4(%rbp), %eax
	addl	$97, %eax
	jmp	.L7
.L6:
	movl	-4(%rbp), %eax
	addl	$39, %eax
.L7:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	i2a, .-i2a
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%s"
	.text
	.globl	main
	.type	main, @function
main:
.LFB2:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$624, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	jmp	.L9
.L15:
	movl	$0, -612(%rbp)
	jmp	.L10
.L11:
	leaq	-608(%rbp), %rdx
	movl	-612(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -612(%rbp)
.L10:
	movl	-616(%rbp), %eax
	cmpl	%eax, -612(%rbp)
	jl	.L11
	leaq	-208(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -612(%rbp)
	jmp	.L12
.L13:
	movl	-612(%rbp), %eax
	cltq
	movzbl	-208(%rbp,%rax), %eax
	movsbl	%al, %eax
	movl	%eax, %edi
	call	a2i
	movl	%eax, %ecx
	movl	-616(%rbp), %esi
	movl	-612(%rbp), %eax
	cltd
	idivl	%esi
	movl	%edx, %eax
	cltq
	movl	-608(%rbp,%rax,4), %edx
	movl	%ecx, %eax
	subl	%edx, %eax
	leal	52(%rax), %edx
	movslq	%edx, %rax
	imulq	$1321528399, %rax, %rax
	shrq	$32, %rax
	sarl	$4, %eax
	movl	%edx, %ecx
	sarl	$31, %ecx
	subl	%ecx, %eax
	imull	$52, %eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	movl	%eax, %edi
	call	i2a
	movsbl	%al, %eax
	movl	%eax, %edi
	call	putchar@PLT
	addl	$1, -612(%rbp)
.L12:
	movl	-612(%rbp), %eax
	cltq
	movzbl	-208(%rbp,%rax), %eax
	testb	%al, %al
	jne	.L13
	movl	$10, %edi
	call	putchar@PLT
.L9:
	leaq	-616(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	cmpl	$1, %eax
	jne	.L14
	movl	-616(%rbp), %eax
	testl	%eax, %eax
	jg	.L15
.L14:
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L17
	call	__stack_chk_fail@PLT
.L17:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.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	a2i
	.type	a2i, @function
a2i:
.LFB25:
	.cfi_startproc
	endbr64
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	movl	%edi, %ebx
	call	__ctype_b_loc@PLT
	movsbq	%bl, %rdx
	movq	(%rax), %rax
	movzwl	(%rax,%rdx,2), %edx
	movsbl	%bl, %eax
	testb	$2, %dh
	jne	.L7
	subl	$39, %eax
	andb	$1, %dh
	movl	$0, %edx
	popq	%rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	cmove	%edx, %eax
	ret
	.p2align 4,,10
	.p2align 3
.L7:
	.cfi_restore_state
	subl	$97, %eax
	popq	%rbx
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE25:
	.size	a2i, .-a2i
	.p2align 4
	.globl	i2a
	.type	i2a, @function
i2a:
.LFB26:
	.cfi_startproc
	endbr64
	leal	97(%rdi), %edx
	leal	39(%rdi), %eax
	cmpl	$25, %edi
	cmovle	%edx, %eax
	ret
	.cfi_endproc
.LFE26:
	.size	i2a, .-i2a
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%s"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB27:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	xorl	%r12d, %r12d
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	.LC0(%rip), %rbx
	subq	$648, %rsp
	.cfi_def_cfa_offset 704
	movq	%fs:40, %rax
	movq	%rax, 632(%rsp)
	xorl	%eax, %eax
	leaq	28(%rsp), %r13
	leaq	432(%rsp), %rbp
	.p2align 4,,10
	.p2align 3
.L12:
	xorl	%eax, %eax
	movq	%r13, %rsi
	movq	%rbx, %rdi
	call	__isoc99_scanf@PLT
	cmpl	$1, %eax
	jne	.L21
	movl	28(%rsp), %eax
	testl	%eax, %eax
	jle	.L21
	leaq	32(%rsp), %r14
	xorl	%r15d, %r15d
	.p2align 4,,10
	.p2align 3
.L13:
	movq	%r14, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	addl	$1, %r15d
	call	__isoc99_scanf@PLT
	addq	$4, %r14
	cmpl	%r15d, 28(%rsp)
	jg	.L13
	movq	%rbp, %rsi
	leaq	.LC1(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movzbl	432(%rsp), %edx
	testb	%dl, %dl
	je	.L19
	movb	%dl, 15(%rsp)
	xorl	%r15d, %r15d
	call	__ctype_b_loc@PLT
	movsbq	15(%rsp), %rdx
	movq	%rax, %r14
	jmp	.L20
	.p2align 4,,10
	.p2align 3
.L33:
	addl	$97, %edi
.L31:
	movq	stdout(%rip), %rsi
	movzbl	%dil, %edi
	addq	$1, %r15
	call	putc@PLT
	movsbq	0(%rbp,%r15), %rdx
	testb	%dl, %dl
	je	.L19
.L20:
	movq	(%r14), %rdi
	movsbl	%dl, %esi
	movl	%r15d, %eax
	movzwl	(%rdi,%rdx,2), %edx
	testb	$2, %dh
	jne	.L32
	subl	$39, %esi
	andb	$1, %dh
	cmove	%r12d, %esi
.L16:
	cltd
	idivl	28(%rsp)
	movl	%esi, %eax
	movslq	%edx, %rdx
	subl	32(%rsp,%rdx,4), %eax
	addl	$52, %eax
	movslq	%eax, %rdi
	cltd
	imulq	$1321528399, %rdi, %rdi
	sarq	$36, %rdi
	subl	%edx, %edi
	imull	$52, %edi, %edx
	subl	%edx, %eax
	movl	%eax, %edi
	cmpl	$25, %eax
	jle	.L33
	addl	$39, %edi
	jmp	.L31
	.p2align 4,,10
	.p2align 3
.L32:
	subl	$97, %esi
	jmp	.L16
	.p2align 4,,10
	.p2align 3
.L19:
	movq	stdout(%rip), %rsi
	movl	$10, %edi
	call	putc@PLT
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L21:
	movq	632(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L34
	addq	$648, %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
.L34:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE27:
	.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
	.p2align 4
	.globl	a2i
	.type	a2i, @function
a2i:
.LFB25:
	.cfi_startproc
	endbr64
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	movl	%edi, %ebx
	call	__ctype_b_loc@PLT
	movsbq	%bl, %rdx
	movq	(%rax), %rax
	movzwl	(%rax,%rdx,2), %edx
	movsbl	%bl, %eax
	testb	$2, %dh
	jne	.L7
	subl	$39, %eax
	andb	$1, %dh
	movl	$0, %edx
	popq	%rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	cmove	%edx, %eax
	ret
	.p2align 4,,10
	.p2align 3
.L7:
	.cfi_restore_state
	subl	$97, %eax
	popq	%rbx
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE25:
	.size	a2i, .-a2i
	.p2align 4
	.globl	i2a
	.type	i2a, @function
i2a:
.LFB26:
	.cfi_startproc
	endbr64
	leal	97(%rdi), %edx
	leal	39(%rdi), %eax
	cmpl	$25, %edi
	cmovle	%edx, %eax
	ret
	.cfi_endproc
.LFE26:
	.size	i2a, .-i2a
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%s"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB27:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	xorl	%r12d, %r12d
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	leaq	.LC0(%rip), %rbx
	subq	$648, %rsp
	.cfi_def_cfa_offset 704
	movq	%fs:40, %rax
	movq	%rax, 632(%rsp)
	xorl	%eax, %eax
	leaq	28(%rsp), %r13
	leaq	432(%rsp), %rbp
	.p2align 4,,10
	.p2align 3
.L12:
	xorl	%eax, %eax
	movq	%r13, %rsi
	movq	%rbx, %rdi
	call	__isoc99_scanf@PLT
	cmpl	$1, %eax
	jne	.L21
	movl	28(%rsp), %eax
	testl	%eax, %eax
	jle	.L21
	leaq	32(%rsp), %r14
	xorl	%r15d, %r15d
	.p2align 4,,10
	.p2align 3
.L13:
	movq	%r14, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	addl	$1, %r15d
	call	__isoc99_scanf@PLT
	addq	$4, %r14
	cmpl	%r15d, 28(%rsp)
	jg	.L13
	movq	%rbp, %rsi
	leaq	.LC1(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movzbl	432(%rsp), %edx
	testb	%dl, %dl
	je	.L19
	movb	%dl, 15(%rsp)
	xorl	%r15d, %r15d
	call	__ctype_b_loc@PLT
	movsbq	15(%rsp), %rdx
	movq	%rax, %r14
	jmp	.L20
	.p2align 4,,10
	.p2align 3
.L33:
	addl	$97, %edi
.L31:
	movq	stdout(%rip), %rsi
	movzbl	%dil, %edi
	addq	$1, %r15
	call	putc@PLT
	movsbq	0(%rbp,%r15), %rdx
	testb	%dl, %dl
	je	.L19
.L20:
	movq	(%r14), %rdi
	movsbl	%dl, %esi
	movl	%r15d, %eax
	movzwl	(%rdi,%rdx,2), %edx
	testb	$2, %dh
	jne	.L32
	subl	$39, %esi
	andb	$1, %dh
	cmove	%r12d, %esi
.L16:
	cltd
	idivl	28(%rsp)
	movl	%esi, %eax
	movslq	%edx, %rdx
	subl	32(%rsp,%rdx,4), %eax
	addl	$52, %eax
	movslq	%eax, %rdi
	cltd
	imulq	$1321528399, %rdi, %rdi
	sarq	$36, %rdi
	subl	%edx, %edi
	imull	$52, %edi, %edx
	subl	%edx, %eax
	movl	%eax, %edi
	cmpl	$25, %eax
	jle	.L33
	addl	$39, %edi
	jmp	.L31
	.p2align 4,,10
	.p2align 3
.L32:
	subl	$97, %esi
	jmp	.L16
	.p2align 4,,10
	.p2align 3
.L19:
	movq	stdout(%rip), %rsi
	movl	$10, %edi
	call	putc@PLT
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L21:
	movq	632(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L34
	addq	$648, %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
.L34:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE27:
	.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 <ctype.h>

int a2i(char a) {
	if(islower(a))return a-'a';
	if(isupper(a))return a-'A'+26;
	return 0;
}

char i2a(int i) {
	if(i<26)return i+'a';
	else return i-26+'A';
}

int main(void) {
	int n,i;
	int key[100];
	char s[200];
	while(scanf("%d",&n)==1 && n>0) {
		for(i=0;i<n;i++)scanf("%d",&key[i]);
		scanf("%s",s);
		for(i=0;s[i];i++) {
			putchar(i2a((a2i(s[i])-key[i%n]+52)%52));
		}
		putchar('\n');
	}
	return 0;
}
2
1 2
bdd
3
3 2 1
DDDA
5
3 1 4 5 2
dcdkIlkP
0
 2
1 2
bdd
3
3 2 2
DDDA
5
3 1 4 5 2
dcdkIlkP
0
 2
1 2
bdd
3
5 2 2
DDDA
5
3 1 4 5 2
dcdkIlkP
0
 2
1 2
ddb
3
3 2 1
DDDA
5
3 1 4 5 3
dcdkIlkP
0
 2
1 2
bcd
3
3 2 1
DDDA
5
3 1 4 5 2
dcdkIlkP
0
 2
1 2
add
3
3 2 2
DDDA
5
3 1 4 5 2
dcdkIlkP
0
 2
1 2
ddb
3
3 2 1
DDDA
5
3 0 4 5 3
dcdkIlkP
0
 2
1 2
add
3
3 2 2
DDDA
5
3 1 4 5 1
dcdkIlkP
0
 2
1 2
ddb
3
3 2 1
CDDA
5
3 0 4 5 3
dcdkIlkP
0
 2
1 2
ddb
3
3 2 1
CDDA
5
3 0 4 4 3
dcdkIlkP
0

abc
ABCx
abZfGijL
 abc
ABBx
abZfGijL
 abc
yBBv
abZfGijL
 cba
ABCx
abZfFijL
 aac
ABCx
abZfGijL
 Zbc
ABBx
abZfGijL
 cba
ABCx
acZfFikL
 Zbc
ABBx
abZfHijL
 cba
zBCx
acZfFikL
 cba
zBCx
acZgFikL

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 <ctype.h>

int a2i(char a) {
	if(islower(a))return a-'a';
	if(isupper(a))return a-'A'+26;
	return 0;
}

char i2a(int i) {
	if(i<26)return i+'a';
	else return i-26+'A';
}

int main(void) {
	int n,i;
	int key[100];
	char s[200];
	while(scanf("%d",&n)==1 && n>0) {
		for(i=0;i<n;i++)scanf("%d",&key[i]);
		scanf("%s",s);
		for(i=0;s[i];i++) {
			putchar(i2a((a2i(s[i])-key[i%n]+52)%52));
		}
		putchar('\n');
	}
	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	a2i
	.type	a2i, @function
a2i:
.LFB0:
	.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
	movl	%edi, %eax
	movb	%al, -4(%rbp)
	call	__ctype_b_loc@PLT
	movq	(%rax), %rdx
	movsbq	-4(%rbp), %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	movzwl	(%rax), %eax
	movzwl	%ax, %eax
	andl	$512, %eax
	testl	%eax, %eax
	je	.L2
	movsbl	-4(%rbp), %eax
	subl	$97, %eax
	jmp	.L3
.L2:
	call	__ctype_b_loc@PLT
	movq	(%rax), %rdx
	movsbq	-4(%rbp), %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	movzwl	(%rax), %eax
	movzwl	%ax, %eax
	andl	$256, %eax
	testl	%eax, %eax
	je	.L4
	movsbl	-4(%rbp), %eax
	subl	$39, %eax
	jmp	.L3
.L4:
	movl	$0, %eax
.L3:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	a2i, .-a2i
	.globl	i2a
	.type	i2a, @function
i2a:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -4(%rbp)
	cmpl	$25, -4(%rbp)
	jg	.L6
	movl	-4(%rbp), %eax
	addl	$97, %eax
	jmp	.L7
.L6:
	movl	-4(%rbp), %eax
	addl	$39, %eax
.L7:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	i2a, .-i2a
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%s"
	.text
	.globl	main
	.type	main, @function
main:
.LFB2:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$624, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	jmp	.L9
.L15:
	movl	$0, -612(%rbp)
	jmp	.L10
.L11:
	leaq	-608(%rbp), %rdx
	movl	-612(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -612(%rbp)
.L10:
	movl	-616(%rbp), %eax
	cmpl	%eax, -612(%rbp)
	jl	.L11
	leaq	-208(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -612(%rbp)
	jmp	.L12
.L13:
	movl	-612(%rbp), %eax
	cltq
	movzbl	-208(%rbp,%rax), %eax
	movsbl	%al, %eax
	movl	%eax, %edi
	call	a2i
	movl	%eax, %ecx
	movl	-616(%rbp), %esi
	movl	-612(%rbp), %eax
	cltd
	idivl	%esi
	movl	%edx, %eax
	cltq
	movl	-608(%rbp,%rax,4), %edx
	movl	%ecx, %eax
	subl	%edx, %eax
	leal	52(%rax), %edx
	movslq	%edx, %rax
	imulq	$1321528399, %rax, %rax
	shrq	$32, %rax
	sarl	$4, %eax
	movl	%edx, %ecx
	sarl	$31, %ecx
	subl	%ecx, %eax
	imull	$52, %eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	movl	%eax, %edi
	call	i2a
	movsbl	%al, %eax
	movl	%eax, %edi
	call	putchar@PLT
	addl	$1, -612(%rbp)
.L12:
	movl	-612(%rbp), %eax
	cltq
	movzbl	-208(%rbp,%rax), %eax
	testb	%al, %al
	jne	.L13
	movl	$10, %edi
	call	putchar@PLT
.L9:
	leaq	-616(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	cmpl	$1, %eax
	jne	.L14
	movl	-616(%rbp), %eax
	testl	%eax, %eax
	jg	.L15
.L14:
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L17
	call	__stack_chk_fail@PLT
.L17:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.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	a2i
	.type	a2i, @function
a2i:
.LFB0:
	.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
	movl	%edi, %eax
	movb	%al, -4(%rbp)
	call	__ctype_b_loc@PLT
	movq	(%rax), %rdx
	movsbq	-4(%rbp), %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	movzwl	(%rax), %eax
	movzwl	%ax, %eax
	andl	$512, %eax
	testl	%eax, %eax
	je	.L2
	movsbl	-4(%rbp), %eax
	subl	$97, %eax
	jmp	.L3
.L2:
	call	__ctype_b_loc@PLT
	movq	(%rax), %rdx
	movsbq	-4(%rbp), %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	movzwl	(%rax), %eax
	movzwl	%ax, %eax
	andl	$256, %eax
	testl	%eax, %eax
	je	.L4
	movsbl	-4(%rbp), %eax
	subl	$39, %eax
	jmp	.L3
.L4:
	movl	$0, %eax
.L3:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	a2i, .-a2i
	.globl	i2a
	.type	i2a, @function
i2a:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -4(%rbp)
	cmpl	$25, -4(%rbp)
	jg	.L6
	movl	-4(%rbp), %eax
	addl	$97, %eax
	jmp	.L7
.L6:
	movl	-4(%rbp), %eax
	addl	$39, %eax
.L7:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	i2a, .-i2a
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%s"
	.text
	.globl	main
	.type	main, @function
main:
.LFB2:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$624, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	jmp	.L9
.L15:
	movl	$0, -612(%rbp)
	jmp	.L10
.L11:
	leaq	-608(%rbp), %rdx
	movl	-612(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -612(%rbp)
.L10:
	movl	-616(%rbp), %eax
	cmpl	%eax, -612(%rbp)
	jl	.L11
	leaq	-208(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -612(%rbp)
	jmp	.L12
.L13:
	movl	-612(%rbp), %eax
	cltq
	movzbl	-208(%rbp,%rax), %eax
	movsbl	%al, %eax
	movl	%eax, %edi
	call	a2i
	movl	%eax, %ecx
	movl	-616(%rbp), %esi
	movl	-612(%rbp), %eax
	cltd
	idivl	%esi
	movl	%edx, %eax
	cltq
	movl	-608(%rbp,%rax,4), %edx
	movl	%ecx, %eax
	subl	%edx, %eax
	leal	52(%rax), %edx
	movslq	%edx, %rax
	imulq	$1321528399, %rax, %rax
	shrq	$32, %rax
	sarl	$4, %eax
	movl	%edx, %ecx
	sarl	$31, %ecx
	subl	%ecx, %eax
	imull	$52, %eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	movl	%eax, %edi
	call	i2a
	movsbl	%al, %eax
	movl	%eax, %edi
	call	putchar@PLT
	addl	$1, -612(%rbp)
.L12:
	movl	-612(%rbp), %eax
	cltq
	movzbl	-208(%rbp,%rax), %eax
	testb	%al, %al
	jne	.L13
	movl	$10, %edi
	call	putchar@PLT
.L9:
	leaq	-616(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	cmpl	$1, %eax
	jne	.L14
	movl	-616(%rbp), %eax
	testl	%eax, %eax
	jg	.L15
.L14:
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L17
	call	__stack_chk_fail@PLT
.L17:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.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:
