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 <string.h>
#include <ctype.h>

int main(void){
    int i,keyn,key[101];
    char code[101];
    char station[53]="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
    int kingpos;
    while(scanf("%d",&keyn)!=EOF && keyn!=0){
        for(i=0;i<=keyn;i++){
            scanf("%d ",&key[i]);
        }
        scanf("%s",code);
        for(i=0;i<=strlen(code)-1;i++){
            if(islower(code[i]))kingpos=code[i]-'a'-key[i%keyn];
            else kingpos=code[i]-'A'+26-key[i%keyn];
            if(kingpos<0)kingpos+=52;
            printf("%c",station[kingpos]);
        }
        printf("\n");
    }
    return 0;
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d "
.LC1:
	.string	"%s"
.LC2:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB37:
	.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
	leaq	.LC2(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	leaq	.LC0(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$616, %rsp
	.cfi_def_cfa_offset 672
	movdqa	.LC3(%rip), %xmm0
	movq	%fs:40, %rax
	movq	%rax, 600(%rsp)
	xorl	%eax, %eax
	movb	$0, 484(%rsp)
	leaq	12(%rsp), %r13
	leaq	496(%rsp), %rbx
	movaps	%xmm0, 432(%rsp)
	movdqa	.LC4(%rip), %xmm0
	movl	$1515804759, 480(%rsp)
	movaps	%xmm0, 448(%rsp)
	movdqa	.LC5(%rip), %xmm0
	movaps	%xmm0, 464(%rsp)
	.p2align 4,,10
	.p2align 3
.L2:
	xorl	%eax, %eax
	movq	%r13, %rsi
	movq	%r12, %rdi
	call	__isoc99_scanf@PLT
	cmpl	$-1, %eax
	je	.L8
	movl	12(%rsp), %eax
	testl	%eax, %eax
	je	.L8
	leaq	16(%rsp), %r14
	movl	$0, %r15d
	js	.L10
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%r14, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	addl	$1, %r15d
	call	__isoc99_scanf@PLT
	addq	$4, %r14
	cmpl	%r15d, 12(%rsp)
	jge	.L3
.L10:
	movq	%rbx, %rsi
	leaq	.LC1(%rip), %rdi
	xorl	%eax, %eax
	xorl	%r15d, %r15d
	call	__isoc99_scanf@PLT
	call	__ctype_b_loc@PLT
	movq	%rax, %r14
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L24:
	leal	-97(%rcx), %eax
	subl	%edx, %eax
.L5:
	testl	%eax, %eax
	leal	52(%rax), %edx
	cmovs	%edx, %eax
	addq	$1, %r15
	cltq
	movsbl	432(%rsp,%rax), %edi
	call	putchar@PLT
	movq	%rbx, %rdi
	call	strlen@PLT
	subq	$1, %rax
	cmpq	%r15, %rax
	jb	.L23
.L7:
	movl	%r15d, %eax
	movsbq	(%rbx,%r15), %rcx
	cltd
	idivl	12(%rsp)
	movq	(%r14), %rax
	movslq	%edx, %rdx
	movl	16(%rsp,%rdx,4), %edx
	testb	$2, 1(%rax,%rcx,2)
	jne	.L24
	leal	-39(%rcx), %eax
	subl	%edx, %eax
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L23:
	movl	$10, %edi
	call	putchar@PLT
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L8:
	movq	600(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L25
	addq	$616, %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
.L25:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE37:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC3:
	.quad	7523094288207667809
	.quad	8101815670912281193
	.align 16
.LC4:
	.quad	8680537053616894577
	.quad	5063528411713075833
	.align 16
.LC5:
	.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"
.LC2:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB37:
	.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
	leaq	.LC2(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	leaq	.LC0(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$616, %rsp
	.cfi_def_cfa_offset 672
	movdqa	.LC3(%rip), %xmm0
	movq	%fs:40, %rax
	movq	%rax, 600(%rsp)
	xorl	%eax, %eax
	movb	$0, 484(%rsp)
	leaq	12(%rsp), %r13
	leaq	496(%rsp), %rbx
	movaps	%xmm0, 432(%rsp)
	movdqa	.LC4(%rip), %xmm0
	movl	$1515804759, 480(%rsp)
	movaps	%xmm0, 448(%rsp)
	movdqa	.LC5(%rip), %xmm0
	movaps	%xmm0, 464(%rsp)
	.p2align 4,,10
	.p2align 3
.L2:
	xorl	%eax, %eax
	movq	%r13, %rsi
	movq	%r12, %rdi
	call	__isoc99_scanf@PLT
	cmpl	$-1, %eax
	je	.L8
	movl	12(%rsp), %eax
	testl	%eax, %eax
	je	.L8
	leaq	16(%rsp), %r14
	movl	$0, %r15d
	js	.L10
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%r14, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	addl	$1, %r15d
	call	__isoc99_scanf@PLT
	addq	$4, %r14
	cmpl	%r15d, 12(%rsp)
	jge	.L3
.L10:
	movq	%rbx, %rsi
	leaq	.LC1(%rip), %rdi
	xorl	%eax, %eax
	xorl	%r15d, %r15d
	call	__isoc99_scanf@PLT
	call	__ctype_b_loc@PLT
	movq	%rax, %r14
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L24:
	leal	-97(%rcx), %eax
	subl	%edx, %eax
.L5:
	testl	%eax, %eax
	leal	52(%rax), %edx
	cmovs	%edx, %eax
	addq	$1, %r15
	cltq
	movsbl	432(%rsp,%rax), %edi
	call	putchar@PLT
	movq	%rbx, %rdi
	call	strlen@PLT
	subq	$1, %rax
	cmpq	%r15, %rax
	jb	.L23
.L7:
	movl	%r15d, %eax
	movsbq	(%rbx,%r15), %rcx
	cltd
	idivl	12(%rsp)
	movq	(%r14), %rax
	movslq	%edx, %rdx
	movl	16(%rsp,%rdx,4), %edx
	testb	$2, 1(%rax,%rcx,2)
	jne	.L24
	leal	-39(%rcx), %eax
	subl	%edx, %eax
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L23:
	movl	$10, %edi
	call	putchar@PLT
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L8:
	movq	600(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L25
	addq	$616, %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
.L25:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE37:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC3:
	.quad	7523094288207667809
	.quad	8101815670912281193
	.align 16
.LC4:
	.quad	8680537053616894577
	.quad	5063528411713075833
	.align 16
.LC5:
	.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"
.LC2:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB37:
	.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
	leaq	.LC2(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	leaq	.LC0(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$616, %rsp
	.cfi_def_cfa_offset 672
	movdqa	.LC3(%rip), %xmm0
	movq	%fs:40, %rax
	movq	%rax, 600(%rsp)
	xorl	%eax, %eax
	movb	$0, 484(%rsp)
	leaq	12(%rsp), %r13
	leaq	496(%rsp), %rbx
	movaps	%xmm0, 432(%rsp)
	movdqa	.LC4(%rip), %xmm0
	movl	$1515804759, 480(%rsp)
	movaps	%xmm0, 448(%rsp)
	movdqa	.LC5(%rip), %xmm0
	movaps	%xmm0, 464(%rsp)
	.p2align 4,,10
	.p2align 3
.L2:
	xorl	%eax, %eax
	movq	%r13, %rsi
	movq	%r12, %rdi
	call	__isoc99_scanf@PLT
	cmpl	$-1, %eax
	je	.L8
	movl	12(%rsp), %eax
	testl	%eax, %eax
	je	.L8
	leaq	16(%rsp), %r14
	movl	$0, %r15d
	js	.L10
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%r14, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	addl	$1, %r15d
	call	__isoc99_scanf@PLT
	addq	$4, %r14
	cmpl	%r15d, 12(%rsp)
	jge	.L3
.L10:
	movq	%rbx, %rsi
	leaq	.LC1(%rip), %rdi
	xorl	%eax, %eax
	xorl	%r15d, %r15d
	call	__isoc99_scanf@PLT
	call	__ctype_b_loc@PLT
	movq	%rax, %r14
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L24:
	leal	-97(%rcx), %eax
	subl	%edx, %eax
.L5:
	testl	%eax, %eax
	leal	52(%rax), %edx
	cmovs	%edx, %eax
	addq	$1, %r15
	cltq
	movsbl	432(%rsp,%rax), %edi
	call	putchar@PLT
	movq	%rbx, %rdi
	call	strlen@PLT
	subq	$1, %rax
	cmpq	%r15, %rax
	jb	.L23
.L7:
	movl	%r15d, %eax
	movsbq	(%rbx,%r15), %rcx
	cltd
	idivl	12(%rsp)
	movq	(%r14), %rax
	movslq	%edx, %rdx
	movl	16(%rsp,%rdx,4), %edx
	testb	$2, 1(%rax,%rcx,2)
	jne	.L24
	leal	-39(%rcx), %eax
	subl	%edx, %eax
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L23:
	movl	$10, %edi
	call	putchar@PLT
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L8:
	movq	600(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L25
	addq	$616, %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
.L25:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE37:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC3:
	.quad	7523094288207667809
	.quad	8101815670912281193
	.align 16
.LC4:
	.quad	8680537053616894577
	.quad	5063528411713075833
	.align 16
.LC5:
	.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>
#include <string.h>
#include <ctype.h>

int main(void){
    int i,keyn,key[101];
    char code[101];
    char station[53]="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
    int kingpos;
    while(scanf("%d",&keyn)!=EOF && keyn!=0){
        for(i=0;i<=keyn;i++){
            scanf("%d ",&key[i]);
        }
        scanf("%s",code);
        for(i=0;i<=strlen(code)-1;i++){
            if(islower(code[i]))kingpos=code[i]-'a'-key[i%keyn];
            else kingpos=code[i]-'A'+26-key[i%keyn];
            if(kingpos<0)kingpos+=52;
            printf("%c",station[kingpos]);
        }
        printf("\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 <string.h>
#include <ctype.h>

int main(void){
    int i,keyn,key[101];
    char code[101];
    char station[53]="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
    int kingpos;
    while(scanf("%d",&keyn)!=EOF && keyn!=0){
        for(i=0;i<=keyn;i++){
            scanf("%d ",&key[i]);
        }
        scanf("%s",code);
        for(i=0;i<=strlen(code)-1;i++){
            if(islower(code[i]))kingpos=code[i]-'a'-key[i%keyn];
            else kingpos=code[i]-'A'+26-key[i%keyn];
            if(kingpos<0)kingpos+=52;
            printf("%c",station[kingpos]);
        }
        printf("\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 <string.h>
#include <ctype.h>

int main(void){
    int i,keyn,key[101];
    char code[101];
    char station[53]="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
    int kingpos;
    while(scanf("%d",&keyn)!=EOF && keyn!=0){
        for(i=0;i<=keyn;i++){
            scanf("%d ",&key[i]);
        }
        scanf("%s",code);
        for(i=0;i<=strlen(code)-1;i++){
            if(islower(code[i]))kingpos=code[i]-'a'-key[i%keyn];
            else kingpos=code[i]-'A'+26-key[i%keyn];
            if(kingpos<0)kingpos+=52;
            printf("%c",station[kingpos]);
        }
        printf("\n");
    }
    return 0;
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d "
.LC1:
	.string	"%s"
.LC2:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB37:
	.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
	leaq	.LC2(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	leaq	.LC0(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$616, %rsp
	.cfi_def_cfa_offset 672
	movdqa	.LC3(%rip), %xmm0
	movq	%fs:40, %rax
	movq	%rax, 600(%rsp)
	xorl	%eax, %eax
	movb	$0, 484(%rsp)
	leaq	12(%rsp), %r13
	leaq	496(%rsp), %rbx
	movaps	%xmm0, 432(%rsp)
	movdqa	.LC4(%rip), %xmm0
	movl	$1515804759, 480(%rsp)
	movaps	%xmm0, 448(%rsp)
	movdqa	.LC5(%rip), %xmm0
	movaps	%xmm0, 464(%rsp)
	.p2align 4,,10
	.p2align 3
.L2:
	xorl	%eax, %eax
	movq	%r13, %rsi
	movq	%r12, %rdi
	call	__isoc99_scanf@PLT
	cmpl	$-1, %eax
	je	.L8
	movl	12(%rsp), %eax
	testl	%eax, %eax
	je	.L8
	leaq	16(%rsp), %r14
	movl	$0, %r15d
	js	.L10
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%r14, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	addl	$1, %r15d
	call	__isoc99_scanf@PLT
	addq	$4, %r14
	cmpl	%r15d, 12(%rsp)
	jge	.L3
.L10:
	movq	%rbx, %rsi
	leaq	.LC1(%rip), %rdi
	xorl	%eax, %eax
	xorl	%r15d, %r15d
	call	__isoc99_scanf@PLT
	call	__ctype_b_loc@PLT
	movq	%rax, %r14
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L24:
	leal	-97(%rcx), %eax
	subl	%edx, %eax
.L5:
	testl	%eax, %eax
	leal	52(%rax), %edx
	cmovs	%edx, %eax
	addq	$1, %r15
	cltq
	movsbl	432(%rsp,%rax), %edi
	call	putchar@PLT
	movq	%rbx, %rdi
	call	strlen@PLT
	subq	$1, %rax
	cmpq	%r15, %rax
	jb	.L23
.L7:
	movl	%r15d, %eax
	movsbq	(%rbx,%r15), %rcx
	cltd
	idivl	12(%rsp)
	movq	(%r14), %rax
	movslq	%edx, %rdx
	movl	16(%rsp,%rdx,4), %edx
	testb	$2, 1(%rax,%rcx,2)
	jne	.L24
	leal	-39(%rcx), %eax
	subl	%edx, %eax
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L23:
	movl	$10, %edi
	call	putchar@PLT
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L8:
	movq	600(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L25
	addq	$616, %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
.L25:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE37:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC3:
	.quad	7523094288207667809
	.quad	8101815670912281193
	.align 16
.LC4:
	.quad	8680537053616894577
	.quad	5063528411713075833
	.align 16
.LC5:
	.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"
.LC2:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB37:
	.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
	leaq	.LC2(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	leaq	.LC0(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$616, %rsp
	.cfi_def_cfa_offset 672
	movdqa	.LC3(%rip), %xmm0
	movq	%fs:40, %rax
	movq	%rax, 600(%rsp)
	xorl	%eax, %eax
	movb	$0, 484(%rsp)
	leaq	12(%rsp), %r13
	leaq	496(%rsp), %rbx
	movaps	%xmm0, 432(%rsp)
	movdqa	.LC4(%rip), %xmm0
	movl	$1515804759, 480(%rsp)
	movaps	%xmm0, 448(%rsp)
	movdqa	.LC5(%rip), %xmm0
	movaps	%xmm0, 464(%rsp)
	.p2align 4,,10
	.p2align 3
.L2:
	xorl	%eax, %eax
	movq	%r13, %rsi
	movq	%r12, %rdi
	call	__isoc99_scanf@PLT
	cmpl	$-1, %eax
	je	.L8
	movl	12(%rsp), %eax
	testl	%eax, %eax
	je	.L8
	leaq	16(%rsp), %r14
	movl	$0, %r15d
	js	.L10
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%r14, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	addl	$1, %r15d
	call	__isoc99_scanf@PLT
	addq	$4, %r14
	cmpl	%r15d, 12(%rsp)
	jge	.L3
.L10:
	movq	%rbx, %rsi
	leaq	.LC1(%rip), %rdi
	xorl	%eax, %eax
	xorl	%r15d, %r15d
	call	__isoc99_scanf@PLT
	call	__ctype_b_loc@PLT
	movq	%rax, %r14
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L24:
	leal	-97(%rcx), %eax
	subl	%edx, %eax
.L5:
	testl	%eax, %eax
	leal	52(%rax), %edx
	cmovs	%edx, %eax
	addq	$1, %r15
	cltq
	movsbl	432(%rsp,%rax), %edi
	call	putchar@PLT
	movq	%rbx, %rdi
	call	strlen@PLT
	subq	$1, %rax
	cmpq	%r15, %rax
	jb	.L23
.L7:
	movl	%r15d, %eax
	movsbq	(%rbx,%r15), %rcx
	cltd
	idivl	12(%rsp)
	movq	(%r14), %rax
	movslq	%edx, %rdx
	movl	16(%rsp,%rdx,4), %edx
	testb	$2, 1(%rax,%rcx,2)
	jne	.L24
	leal	-39(%rcx), %eax
	subl	%edx, %eax
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L23:
	movl	$10, %edi
	call	putchar@PLT
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L8:
	movq	600(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L25
	addq	$616, %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
.L25:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE37:
	.size	main, .-main
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC3:
	.quad	7523094288207667809
	.quad	8101815670912281193
	.align 16
.LC4:
	.quad	8680537053616894577
	.quad	5063528411713075833
	.align 16
.LC5:
	.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:
```