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>

int main(void)
{
    int n, k[100];
    char s[101];
    int i;
    char table[] = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
    int c;
    
    while (1){
        scanf("%d", &n);
        if (n == 0){
            break;
        }
        for (i = 0; i < n; i++){
            scanf("%d", &k[i]);
        }
        scanf("%s", s);
        
        i = 0;
        while (s[i] != '\0'){
            c = s[i];
            if ('a' <= c && c <= 'z'){
                c = c - 'a';
            }
            else {
                c = c - 'A' + 26;
            }
            
            c = c - k[i % n] + 52;
            c %= 52;
            
            s[i] = table[c];
            i++;
        }
        
        printf("%s\n", s);
    }
    
    return (0);
}

```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.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:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	leaq	.LC1(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	leaq	.LC0(%rip), %rbx
	subq	$592, %rsp
	.cfi_def_cfa_offset 640
	movdqa	.LC2(%rip), %xmm0
	movq	%fs:40, %rax
	movq	%rax, 584(%rsp)
	xorl	%eax, %eax
	movb	$0, 468(%rsp)
	leaq	12(%rsp), %rbp
	movaps	%xmm0, 416(%rsp)
	movdqa	.LC3(%rip), %xmm0
	movl	$1515804759, 464(%rsp)
	movaps	%xmm0, 432(%rsp)
	movdqa	.LC4(%rip), %xmm0
	movaps	%xmm0, 448(%rsp)
	.p2align 4,,10
	.p2align 3
.L9:
	movq	%rbp, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	testl	%eax, %eax
	je	.L2
	jle	.L3
	leaq	16(%rsp), %r14
	xorl	%r13d, %r13d
	.p2align 4,,10
	.p2align 3
.L4:
	movq	%r14, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	addl	$1, %r13d
	call	__isoc99_scanf@PLT
	addq	$4, %r14
	cmpl	%r13d, 12(%rsp)
	jg	.L4
.L3:
	leaq	480(%rsp), %r13
	movq	%r12, %rdi
	xorl	%eax, %eax
	movq	%r13, %rsi
	call	__isoc99_scanf@PLT
	movsbl	480(%rsp), %eax
	testb	%al, %al
	je	.L5
	movl	12(%rsp), %r8d
	movq	%r13, %rdi
	xorl	%esi, %esi
	.p2align 4,,10
	.p2align 3
.L8:
	leal	-97(%rax), %edx
	subl	$39, %eax
	movl	%edx, %ecx
	cmpl	$25, %edx
	cmova	%eax, %ecx
	movl	%esi, %eax
	addq	$1, %rdi
	addl	$1, %esi
	cltd
	idivl	%r8d
	movslq	%edx, %rdx
	subl	16(%rsp,%rdx,4), %ecx
	leal	52(%rcx), %eax
	movslq	%eax, %rdx
	movl	%eax, %ecx
	imulq	$1321528399, %rdx, %rdx
	sarl	$31, %ecx
	sarq	$36, %rdx
	subl	%ecx, %edx
	imull	$52, %edx, %edx
	subl	%edx, %eax
	cltq
	movzbl	416(%rsp,%rax), %eax
	movb	%al, -1(%rdi)
	movsbl	(%rdi), %eax
	testb	%al, %al
	jne	.L8
.L5:
	movq	%r13, %rdi
	call	puts@PLT
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L2:
	movq	584(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L18
	addq	$592, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
.L18:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC2:
	.quad	7523094288207667809
	.quad	8101815670912281193
	.align 16
.LC3:
	.quad	8680537053616894577
	.quad	5063528411713075833
	.align 16
.LC4:
	.quad	5642249794417674311
	.quad	6220971177122287695
	.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
	.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:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	leaq	.LC1(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	leaq	.LC0(%rip), %rbx
	subq	$592, %rsp
	.cfi_def_cfa_offset 640
	movdqa	.LC2(%rip), %xmm0
	movq	%fs:40, %rax
	movq	%rax, 584(%rsp)
	xorl	%eax, %eax
	movb	$0, 468(%rsp)
	leaq	12(%rsp), %rbp
	movaps	%xmm0, 416(%rsp)
	movdqa	.LC3(%rip), %xmm0
	movl	$1515804759, 464(%rsp)
	movaps	%xmm0, 432(%rsp)
	movdqa	.LC4(%rip), %xmm0
	movaps	%xmm0, 448(%rsp)
	.p2align 4,,10
	.p2align 3
.L9:
	movq	%rbp, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	testl	%eax, %eax
	je	.L2
	jle	.L3
	leaq	16(%rsp), %r14
	xorl	%r13d, %r13d
	.p2align 4,,10
	.p2align 3
.L4:
	movq	%r14, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	addl	$1, %r13d
	call	__isoc99_scanf@PLT
	addq	$4, %r14
	cmpl	%r13d, 12(%rsp)
	jg	.L4
.L3:
	leaq	480(%rsp), %r13
	movq	%r12, %rdi
	xorl	%eax, %eax
	movq	%r13, %rsi
	call	__isoc99_scanf@PLT
	movsbl	480(%rsp), %eax
	testb	%al, %al
	je	.L5
	movl	12(%rsp), %r8d
	movq	%r13, %rdi
	xorl	%esi, %esi
	.p2align 4,,10
	.p2align 3
.L8:
	leal	-97(%rax), %edx
	subl	$39, %eax
	movl	%edx, %ecx
	cmpl	$25, %edx
	cmova	%eax, %ecx
	movl	%esi, %eax
	addq	$1, %rdi
	addl	$1, %esi
	cltd
	idivl	%r8d
	movslq	%edx, %rdx
	subl	16(%rsp,%rdx,4), %ecx
	leal	52(%rcx), %eax
	movslq	%eax, %rdx
	movl	%eax, %ecx
	imulq	$1321528399, %rdx, %rdx
	sarl	$31, %ecx
	sarq	$36, %rdx
	subl	%ecx, %edx
	imull	$52, %edx, %edx
	subl	%edx, %eax
	cltq
	movzbl	416(%rsp,%rax), %eax
	movb	%al, -1(%rdi)
	movsbl	(%rdi), %eax
	testb	%al, %al
	jne	.L8
.L5:
	movq	%r13, %rdi
	call	puts@PLT
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L2:
	movq	584(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L18
	addq	$592, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
.L18:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC2:
	.quad	7523094288207667809
	.quad	8101815670912281193
	.align 16
.LC3:
	.quad	8680537053616894577
	.quad	5063528411713075833
	.align 16
.LC4:
	.quad	5642249794417674311
	.quad	6220971177122287695
	.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
	.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:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	leaq	.LC1(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	leaq	.LC0(%rip), %rbx
	subq	$592, %rsp
	.cfi_def_cfa_offset 640
	movdqa	.LC2(%rip), %xmm0
	movq	%fs:40, %rax
	movq	%rax, 584(%rsp)
	xorl	%eax, %eax
	movb	$0, 468(%rsp)
	leaq	12(%rsp), %rbp
	movaps	%xmm0, 416(%rsp)
	movdqa	.LC3(%rip), %xmm0
	movl	$1515804759, 464(%rsp)
	movaps	%xmm0, 432(%rsp)
	movdqa	.LC4(%rip), %xmm0
	movaps	%xmm0, 448(%rsp)
	.p2align 4,,10
	.p2align 3
.L9:
	movq	%rbp, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	testl	%eax, %eax
	je	.L2
	jle	.L3
	leaq	16(%rsp), %r14
	xorl	%r13d, %r13d
	.p2align 4,,10
	.p2align 3
.L4:
	movq	%r14, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	addl	$1, %r13d
	call	__isoc99_scanf@PLT
	addq	$4, %r14
	cmpl	%r13d, 12(%rsp)
	jg	.L4
.L3:
	leaq	480(%rsp), %r13
	movq	%r12, %rdi
	xorl	%eax, %eax
	movq	%r13, %rsi
	call	__isoc99_scanf@PLT
	movsbl	480(%rsp), %eax
	testb	%al, %al
	je	.L5
	movl	12(%rsp), %r8d
	movq	%r13, %rdi
	xorl	%esi, %esi
	.p2align 4,,10
	.p2align 3
.L8:
	leal	-97(%rax), %edx
	subl	$39, %eax
	movl	%edx, %ecx
	cmpl	$25, %edx
	cmova	%eax, %ecx
	movl	%esi, %eax
	addq	$1, %rdi
	addl	$1, %esi
	cltd
	idivl	%r8d
	movslq	%edx, %rdx
	subl	16(%rsp,%rdx,4), %ecx
	leal	52(%rcx), %eax
	movslq	%eax, %rdx
	movl	%eax, %ecx
	imulq	$1321528399, %rdx, %rdx
	sarl	$31, %ecx
	sarq	$36, %rdx
	subl	%ecx, %edx
	imull	$52, %edx, %edx
	subl	%edx, %eax
	cltq
	movzbl	416(%rsp,%rax), %eax
	movb	%al, -1(%rdi)
	movsbl	(%rdi), %eax
	testb	%al, %al
	jne	.L8
.L5:
	movq	%r13, %rdi
	call	puts@PLT
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L2:
	movq	584(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L18
	addq	$592, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
.L18:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC2:
	.quad	7523094288207667809
	.quad	8101815670912281193
	.align 16
.LC3:
	.quad	8680537053616894577
	.quad	5063528411713075833
	.align 16
.LC4:
	.quad	5642249794417674311
	.quad	6220971177122287695
	.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>

int main(void)
{
    int n, k[100];
    char s[101];
    int i;
    char table[] = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
    int c;
    
    while (1){
        scanf("%d", &n);
        if (n == 0){
            break;
        }
        for (i = 0; i < n; i++){
            scanf("%d", &k[i]);
        }
        scanf("%s", s);
        
        i = 0;
        while (s[i] != '\0'){
            c = s[i];
            if ('a' <= c && c <= 'z'){
                c = c - 'a';
            }
            else {
                c = c - 'A' + 26;
            }
            
            c = c - k[i % n] + 52;
            c %= 52;
            
            s[i] = table[c];
            i++;
        }
        
        printf("%s\n", s);
    }
    
    return (0);
}

```
Given the following C code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include <stdio.h>

int main(void)
{
    int n, k[100];
    char s[101];
    int i;
    char table[] = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
    int c;
    
    while (1){
        scanf("%d", &n);
        if (n == 0){
            break;
        }
        for (i = 0; i < n; i++){
            scanf("%d", &k[i]);
        }
        scanf("%s", s);
        
        i = 0;
        while (s[i] != '\0'){
            c = s[i];
            if ('a' <= c && c <= 'z'){
                c = c - 'a';
            }
            else {
                c = c - 'A' + 26;
            }
            
            c = c - k[i % n] + 52;
            c %= 52;
            
            s[i] = table[c];
            i++;
        }
        
        printf("%s\n", s);
    }
    
    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>

int main(void)
{
    int n, k[100];
    char s[101];
    int i;
    char table[] = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
    int c;
    
    while (1){
        scanf("%d", &n);
        if (n == 0){
            break;
        }
        for (i = 0; i < n; i++){
            scanf("%d", &k[i]);
        }
        scanf("%s", s);
        
        i = 0;
        while (s[i] != '\0'){
            c = s[i];
            if ('a' <= c && c <= 'z'){
                c = c - 'a';
            }
            else {
                c = c - 'A' + 26;
            }
            
            c = c - k[i % n] + 52;
            c %= 52;
            
            s[i] = table[c];
            i++;
        }
        
        printf("%s\n", s);
    }
    
    return (0);
}

```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.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:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	leaq	.LC1(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	leaq	.LC0(%rip), %rbx
	subq	$592, %rsp
	.cfi_def_cfa_offset 640
	movdqa	.LC2(%rip), %xmm0
	movq	%fs:40, %rax
	movq	%rax, 584(%rsp)
	xorl	%eax, %eax
	movb	$0, 468(%rsp)
	leaq	12(%rsp), %rbp
	movaps	%xmm0, 416(%rsp)
	movdqa	.LC3(%rip), %xmm0
	movl	$1515804759, 464(%rsp)
	movaps	%xmm0, 432(%rsp)
	movdqa	.LC4(%rip), %xmm0
	movaps	%xmm0, 448(%rsp)
	.p2align 4,,10
	.p2align 3
.L9:
	movq	%rbp, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	testl	%eax, %eax
	je	.L2
	jle	.L3
	leaq	16(%rsp), %r14
	xorl	%r13d, %r13d
	.p2align 4,,10
	.p2align 3
.L4:
	movq	%r14, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	addl	$1, %r13d
	call	__isoc99_scanf@PLT
	addq	$4, %r14
	cmpl	%r13d, 12(%rsp)
	jg	.L4
.L3:
	leaq	480(%rsp), %r13
	movq	%r12, %rdi
	xorl	%eax, %eax
	movq	%r13, %rsi
	call	__isoc99_scanf@PLT
	movsbl	480(%rsp), %eax
	testb	%al, %al
	je	.L5
	movl	12(%rsp), %r8d
	movq	%r13, %rdi
	xorl	%esi, %esi
	.p2align 4,,10
	.p2align 3
.L8:
	leal	-97(%rax), %edx
	subl	$39, %eax
	movl	%edx, %ecx
	cmpl	$25, %edx
	cmova	%eax, %ecx
	movl	%esi, %eax
	addq	$1, %rdi
	addl	$1, %esi
	cltd
	idivl	%r8d
	movslq	%edx, %rdx
	subl	16(%rsp,%rdx,4), %ecx
	leal	52(%rcx), %eax
	movslq	%eax, %rdx
	movl	%eax, %ecx
	imulq	$1321528399, %rdx, %rdx
	sarl	$31, %ecx
	sarq	$36, %rdx
	subl	%ecx, %edx
	imull	$52, %edx, %edx
	subl	%edx, %eax
	cltq
	movzbl	416(%rsp,%rax), %eax
	movb	%al, -1(%rdi)
	movsbl	(%rdi), %eax
	testb	%al, %al
	jne	.L8
.L5:
	movq	%r13, %rdi
	call	puts@PLT
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L2:
	movq	584(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L18
	addq	$592, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
.L18:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC2:
	.quad	7523094288207667809
	.quad	8101815670912281193
	.align 16
.LC3:
	.quad	8680537053616894577
	.quad	5063528411713075833
	.align 16
.LC4:
	.quad	5642249794417674311
	.quad	6220971177122287695
	.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
	.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:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	leaq	.LC1(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	leaq	.LC0(%rip), %rbx
	subq	$592, %rsp
	.cfi_def_cfa_offset 640
	movdqa	.LC2(%rip), %xmm0
	movq	%fs:40, %rax
	movq	%rax, 584(%rsp)
	xorl	%eax, %eax
	movb	$0, 468(%rsp)
	leaq	12(%rsp), %rbp
	movaps	%xmm0, 416(%rsp)
	movdqa	.LC3(%rip), %xmm0
	movl	$1515804759, 464(%rsp)
	movaps	%xmm0, 432(%rsp)
	movdqa	.LC4(%rip), %xmm0
	movaps	%xmm0, 448(%rsp)
	.p2align 4,,10
	.p2align 3
.L9:
	movq	%rbp, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	testl	%eax, %eax
	je	.L2
	jle	.L3
	leaq	16(%rsp), %r14
	xorl	%r13d, %r13d
	.p2align 4,,10
	.p2align 3
.L4:
	movq	%r14, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	addl	$1, %r13d
	call	__isoc99_scanf@PLT
	addq	$4, %r14
	cmpl	%r13d, 12(%rsp)
	jg	.L4
.L3:
	leaq	480(%rsp), %r13
	movq	%r12, %rdi
	xorl	%eax, %eax
	movq	%r13, %rsi
	call	__isoc99_scanf@PLT
	movsbl	480(%rsp), %eax
	testb	%al, %al
	je	.L5
	movl	12(%rsp), %r8d
	movq	%r13, %rdi
	xorl	%esi, %esi
	.p2align 4,,10
	.p2align 3
.L8:
	leal	-97(%rax), %edx
	subl	$39, %eax
	movl	%edx, %ecx
	cmpl	$25, %edx
	cmova	%eax, %ecx
	movl	%esi, %eax
	addq	$1, %rdi
	addl	$1, %esi
	cltd
	idivl	%r8d
	movslq	%edx, %rdx
	subl	16(%rsp,%rdx,4), %ecx
	leal	52(%rcx), %eax
	movslq	%eax, %rdx
	movl	%eax, %ecx
	imulq	$1321528399, %rdx, %rdx
	sarl	$31, %ecx
	sarq	$36, %rdx
	subl	%ecx, %edx
	imull	$52, %edx, %edx
	subl	%edx, %eax
	cltq
	movzbl	416(%rsp,%rax), %eax
	movb	%al, -1(%rdi)
	movsbl	(%rdi), %eax
	testb	%al, %al
	jne	.L8
.L5:
	movq	%r13, %rdi
	call	puts@PLT
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L2:
	movq	584(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L18
	addq	$592, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
.L18:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC2:
	.quad	7523094288207667809
	.quad	8101815670912281193
	.align 16
.LC3:
	.quad	8680537053616894577
	.quad	5063528411713075833
	.align 16
.LC4:
	.quad	5642249794417674311
	.quad	6220971177122287695
	.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:
```