Given the following C code and 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;
}```

Assembly Code:

```assembly
	.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:
```

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.
Optimized Assembly Code:

user
```assembly
	.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
```assembly
	.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:
```
```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;
}```
Given the following C 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;
}```

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.
Optimized Assembly Code:

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 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;
}```

Assembly Code:

```assembly
	.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:
```

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.
Optimized Assembly Code:

train
```assembly
	.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:
```