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

int main(){
    int n,i,j,k,tmp,f;
    char input[257],ans[257];

    scanf("%d%*c",&n);
    while(n--){
        fgets(input,260,stdin);
f=0;
        for(k=1;;k+=2){
if(k%13==0)continue;
            for(j=0;j<26;j++){
                for(i=0;input[i]!='\n';i++){
                    if(input[i]==' '){
                        ans[i]=' ';
                        continue;
                    }
                    ans[i]=((input[i]-'a')*k+j)%26+'a';
                }
ans[i]=0;
                for(i=0;ans[i+3]!='\0';i++){
                    if(ans[i]=='t'&&
                            ans[i+1]=='h'&&
                            (ans[i+2]=='a'&&ans[i+3]=='t'||
                             ans[i+2]=='i'&&ans[i+3]=='s')){
                        printf("%s\n",ans);
f=1;
                        break;
                        break;
                    }
                }
            }
if(f)break;
        }
    }
    return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d%*c"
	.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
	subq	$576, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-564(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	jmp	.L2
.L18:
	movq	stdin(%rip), %rdx
	leaq	-544(%rbp), %rax
	movl	$260, %esi
	movq	%rax, %rdi
	call	fgets@PLT
	movl	$0, -548(%rbp)
	movl	$1, -552(%rbp)
.L17:
	movl	-552(%rbp), %ecx
	movslq	%ecx, %rax
	imulq	$1321528399, %rax, %rax
	shrq	$32, %rax
	sarl	$2, %eax
	movl	%ecx, %esi
	sarl	$31, %esi
	subl	%esi, %eax
	movl	%eax, %edx
	movl	%edx, %eax
	addl	%eax, %eax
	addl	%edx, %eax
	sall	$2, %eax
	addl	%edx, %eax
	subl	%eax, %ecx
	movl	%ecx, %edx
	testl	%edx, %edx
	je	.L21
	movl	$0, -556(%rbp)
	jmp	.L5
.L16:
	movl	$0, -560(%rbp)
	jmp	.L6
.L9:
	movl	-560(%rbp), %eax
	cltq
	movzbl	-544(%rbp,%rax), %eax
	cmpb	$32, %al
	jne	.L7
	movl	-560(%rbp), %eax
	cltq
	movb	$32, -272(%rbp,%rax)
	jmp	.L8
.L7:
	movl	-560(%rbp), %eax
	cltq
	movzbl	-544(%rbp,%rax), %eax
	movsbl	%al, %eax
	subl	$97, %eax
	imull	-552(%rbp), %eax
	movl	%eax, %edx
	movl	-556(%rbp), %eax
	addl	%edx, %eax
	movslq	%eax, %rdx
	imulq	$1321528399, %rdx, %rdx
	shrq	$32, %rdx
	sarl	$3, %edx
	movl	%eax, %ecx
	sarl	$31, %ecx
	subl	%ecx, %edx
	imull	$26, %edx, %ecx
	subl	%ecx, %eax
	movl	%eax, %edx
	movl	%edx, %eax
	addl	$97, %eax
	movl	%eax, %edx
	movl	-560(%rbp), %eax
	cltq
	movb	%dl, -272(%rbp,%rax)
.L8:
	addl	$1, -560(%rbp)
.L6:
	movl	-560(%rbp), %eax
	cltq
	movzbl	-544(%rbp,%rax), %eax
	cmpb	$10, %al
	jne	.L9
	movl	-560(%rbp), %eax
	cltq
	movb	$0, -272(%rbp,%rax)
	movl	$0, -560(%rbp)
	jmp	.L10
.L15:
	movl	-560(%rbp), %eax
	cltq
	movzbl	-272(%rbp,%rax), %eax
	cmpb	$116, %al
	jne	.L11
	movl	-560(%rbp), %eax
	addl	$1, %eax
	cltq
	movzbl	-272(%rbp,%rax), %eax
	cmpb	$104, %al
	jne	.L11
	movl	-560(%rbp), %eax
	addl	$2, %eax
	cltq
	movzbl	-272(%rbp,%rax), %eax
	cmpb	$97, %al
	jne	.L12
	movl	-560(%rbp), %eax
	addl	$3, %eax
	cltq
	movzbl	-272(%rbp,%rax), %eax
	cmpb	$116, %al
	je	.L13
.L12:
	movl	-560(%rbp), %eax
	addl	$2, %eax
	cltq
	movzbl	-272(%rbp,%rax), %eax
	cmpb	$105, %al
	jne	.L11
	movl	-560(%rbp), %eax
	addl	$3, %eax
	cltq
	movzbl	-272(%rbp,%rax), %eax
	cmpb	$115, %al
	jne	.L11
.L13:
	leaq	-272(%rbp), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$1, -548(%rbp)
	jmp	.L14
.L11:
	addl	$1, -560(%rbp)
.L10:
	movl	-560(%rbp), %eax
	addl	$3, %eax
	cltq
	movzbl	-272(%rbp,%rax), %eax
	testb	%al, %al
	jne	.L15
.L14:
	addl	$1, -556(%rbp)
.L5:
	cmpl	$25, -556(%rbp)
	jle	.L16
	cmpl	$0, -548(%rbp)
	je	.L4
	jmp	.L2
.L21:
	nop
.L4:
	addl	$2, -552(%rbp)
	jmp	.L17
.L2:
	movl	-564(%rbp), %eax
	leal	-1(%rax), %edx
	movl	%edx, -564(%rbp)
	testl	%eax, %eax
	jne	.L18
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L20
	call	__stack_chk_fail@PLT
.L20:
	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	"%d%*c"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB35:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	leaq	.LC0(%rip), %rdi
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	subq	$560, %rsp
	.cfi_def_cfa_offset 608
	movq	%fs:40, %rax
	movq	%rax, 552(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	leaq	16(%rsp), %rbx
	leaq	287(%rsp), %r12
	leaq	15(%rsp), %rbp
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	leal	-1(%rax), %edx
	movl	%edx, 12(%rsp)
	testl	%eax, %eax
	je	.L18
.L2:
	movq	stdin(%rip), %rcx
	movl	$257, %esi
	movl	$260, %edx
	movq	%rbx, %rdi
	movl	$1, %r13d
	call	__fgets_chk@PLT
	movzbl	16(%rsp), %esi
.L17:
	imull	$-991146299, %r13d, %eax
	cmpl	$330382099, %eax
	jbe	.L3
	movl	$1, %r14d
	xorl	%edi, %edi
	.p2align 4,,10
	.p2align 3
.L4:
	leal	-1(%r14), %r8d
	movsbl	%sil, %eax
	movl	$1, %ecx
	xorl	%edx, %edx
	cmpb	$10, %sil
	jne	.L8
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L49:
	subl	$97, %eax
	imull	%r13d, %eax
	addl	%r8d, %eax
	movslq	%eax, %rdx
	movl	%eax, %r9d
	imulq	$1321528399, %rdx, %rdx
	sarl	$31, %r9d
	sarq	$35, %rdx
	subl	%r9d, %edx
	imull	$26, %edx, %edx
	subl	%edx, %eax
	movslq	%ecx, %rdx
	addl	$97, %eax
	movb	%al, (%r12,%rcx)
	addq	$1, %rcx
	movsbl	0(%rbp,%rcx), %eax
	cmpb	$10, %al
	je	.L7
.L8:
	cmpb	$32, %al
	jne	.L49
	movb	$32, (%r12,%rcx)
	movslq	%ecx, %rdx
	addq	$1, %rcx
	movsbl	0(%rbp,%rcx), %eax
	cmpb	$10, %al
	jne	.L8
	.p2align 4,,10
	.p2align 3
.L7:
	movb	$0, 288(%rsp,%rdx)
	movzbl	291(%rsp), %edx
	testb	%dl, %dl
	je	.L9
	leaq	288(%rsp), %r8
	movq	%r8, %rax
	jmp	.L15
	.p2align 4,,10
	.p2align 3
.L10:
	movzbl	4(%rax), %edx
	addq	$1, %rax
	testb	%dl, %dl
	je	.L9
.L15:
	cmpb	$116, (%rax)
	jne	.L10
	cmpb	$104, 1(%rax)
	jne	.L10
	movzbl	2(%rax), %ecx
	cmpb	$97, %cl
	je	.L50
	cmpb	$115, %dl
	jne	.L10
	cmpb	$105, %cl
	jne	.L10
.L12:
	movq	%r8, %rdi
	call	puts@PLT
	cmpl	$26, %r14d
	je	.L13
	movzbl	16(%rsp), %esi
	movl	$1, %edi
	.p2align 4,,10
	.p2align 3
.L14:
	addl	$1, %r14d
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L50:
	cmpb	$116, %dl
	je	.L12
	movzbl	4(%rax), %edx
	addq	$1, %rax
	testb	%dl, %dl
	jne	.L15
	.p2align 4,,10
	.p2align 3
.L9:
	cmpl	$26, %r14d
	jne	.L14
	testl	%edi, %edi
	jne	.L13
.L3:
	addl	$2, %r13d
	jmp	.L17
.L13:
	movl	12(%rsp), %eax
	leal	-1(%rax), %edx
	movl	%edx, 12(%rsp)
	testl	%eax, %eax
	jne	.L2
.L18:
	movq	552(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L51
	addq	$560, %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
.L51:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE35:
	.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
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d%*c"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB35:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	leaq	.LC0(%rip), %rdi
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	subq	$560, %rsp
	.cfi_def_cfa_offset 608
	movq	%fs:40, %rax
	movq	%rax, 552(%rsp)
	xorl	%eax, %eax
	leaq	12(%rsp), %rsi
	leaq	16(%rsp), %rbx
	leaq	287(%rsp), %r12
	leaq	15(%rsp), %rbp
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	leal	-1(%rax), %edx
	movl	%edx, 12(%rsp)
	testl	%eax, %eax
	je	.L18
.L2:
	movq	stdin(%rip), %rcx
	movl	$257, %esi
	movl	$260, %edx
	movq	%rbx, %rdi
	movl	$1, %r13d
	call	__fgets_chk@PLT
	movzbl	16(%rsp), %esi
.L17:
	imull	$-991146299, %r13d, %eax
	cmpl	$330382099, %eax
	jbe	.L3
	movl	$1, %r14d
	xorl	%edi, %edi
	.p2align 4,,10
	.p2align 3
.L4:
	leal	-1(%r14), %r8d
	movsbl	%sil, %eax
	movl	$1, %ecx
	xorl	%edx, %edx
	cmpb	$10, %sil
	jne	.L8
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L49:
	subl	$97, %eax
	imull	%r13d, %eax
	addl	%r8d, %eax
	movslq	%eax, %rdx
	movl	%eax, %r9d
	imulq	$1321528399, %rdx, %rdx
	sarl	$31, %r9d
	sarq	$35, %rdx
	subl	%r9d, %edx
	imull	$26, %edx, %edx
	subl	%edx, %eax
	movslq	%ecx, %rdx
	addl	$97, %eax
	movb	%al, (%r12,%rcx)
	addq	$1, %rcx
	movsbl	0(%rbp,%rcx), %eax
	cmpb	$10, %al
	je	.L7
.L8:
	cmpb	$32, %al
	jne	.L49
	movb	$32, (%r12,%rcx)
	movslq	%ecx, %rdx
	addq	$1, %rcx
	movsbl	0(%rbp,%rcx), %eax
	cmpb	$10, %al
	jne	.L8
	.p2align 4,,10
	.p2align 3
.L7:
	movb	$0, 288(%rsp,%rdx)
	movzbl	291(%rsp), %edx
	testb	%dl, %dl
	je	.L9
	leaq	288(%rsp), %r8
	movq	%r8, %rax
	jmp	.L15
	.p2align 4,,10
	.p2align 3
.L10:
	movzbl	4(%rax), %edx
	addq	$1, %rax
	testb	%dl, %dl
	je	.L9
.L15:
	cmpb	$116, (%rax)
	jne	.L10
	cmpb	$104, 1(%rax)
	jne	.L10
	movzbl	2(%rax), %ecx
	cmpb	$97, %cl
	je	.L50
	cmpb	$115, %dl
	jne	.L10
	cmpb	$105, %cl
	jne	.L10
.L12:
	movq	%r8, %rdi
	call	puts@PLT
	cmpl	$26, %r14d
	je	.L13
	movzbl	16(%rsp), %esi
	movl	$1, %edi
	.p2align 4,,10
	.p2align 3
.L14:
	addl	$1, %r14d
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L50:
	cmpb	$116, %dl
	je	.L12
	movzbl	4(%rax), %edx
	addq	$1, %rax
	testb	%dl, %dl
	jne	.L15
	.p2align 4,,10
	.p2align 3
.L9:
	cmpl	$26, %r14d
	jne	.L14
	testl	%edi, %edi
	jne	.L13
.L3:
	addl	$2, %r13d
	jmp	.L17
.L13:
	movl	12(%rsp), %eax
	leal	-1(%rax), %edx
	movl	%edx, 12(%rsp)
	testl	%eax, %eax
	jne	.L2
.L18:
	movq	552(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L51
	addq	$560, %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
.L51:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE35:
	.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<string.h>

int main(){
    int n,i,j,k,tmp,f;
    char input[257],ans[257];

    scanf("%d%*c",&n);
    while(n--){
        fgets(input,260,stdin);
f=0;
        for(k=1;;k+=2){
if(k%13==0)continue;
            for(j=0;j<26;j++){
                for(i=0;input[i]!='\n';i++){
                    if(input[i]==' '){
                        ans[i]=' ';
                        continue;
                    }
                    ans[i]=((input[i]-'a')*k+j)%26+'a';
                }
ans[i]=0;
                for(i=0;ans[i+3]!='\0';i++){
                    if(ans[i]=='t'&&
                            ans[i+1]=='h'&&
                            (ans[i+2]=='a'&&ans[i+3]=='t'||
                             ans[i+2]=='i'&&ans[i+3]=='s')){
                        printf("%s\n",ans);
f=1;
                        break;
                        break;
                    }
                }
            }
if(f)break;
        }
    }
    return 0;
}
1
x eazqyp pnop pngtg ye obmpngt xmybp mr lygw
 1
x pyqzae pnop pngtg ye obmpngt xmybp mr lygw
 1
x pyqzae pnop pngtg ye onmpbgt xmybp mr lygw
 1
x pyqzae pnop pngtg ye pnmobgt xmybp mr lygw
 1
x pyqzae pnop pngtg ye pnmobgt xmybp rm lygw
 1
x pyqzae pnop pngtg yd pnmobgt xmybp rm lygw
 1
x pyqzae pnop pngth yd pnmobgt xmybp rm lygw
 1
x pyqzae pnop pngth yd pnmobgt xmybp rm wgyl
 1
x pyqzae pnop pngth yd pnmobgt xmybp rm wgzl
 1
x eazqyp pnop pngth yd pnmobgt xmybp rm wgzl

p submit that there is another point of view
 p timbus that there is another point of view
 p timbus that there is ahotner point of view
 p timbus that there is thoaner point of view
 p timbus that there is thoaner point fo view
 p timbus that there iz thoaner point fo view
 p timbus that therx iz thoaner point fo view
 p timbus that therx iz thoaner point fo weiv
 p timbus that therx iz thoaner point fo webv
 p submit that therx iz thoaner point fo webv

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

int main(){
    int n,i,j,k,tmp,f;
    char input[257],ans[257];

    scanf("%d%*c",&n);
    while(n--){
        fgets(input,260,stdin);
f=0;
        for(k=1;;k+=2){
if(k%13==0)continue;
            for(j=0;j<26;j++){
                for(i=0;input[i]!='\n';i++){
                    if(input[i]==' '){
                        ans[i]=' ';
                        continue;
                    }
                    ans[i]=((input[i]-'a')*k+j)%26+'a';
                }
ans[i]=0;
                for(i=0;ans[i+3]!='\0';i++){
                    if(ans[i]=='t'&&
                            ans[i+1]=='h'&&
                            (ans[i+2]=='a'&&ans[i+3]=='t'||
                             ans[i+2]=='i'&&ans[i+3]=='s')){
                        printf("%s\n",ans);
f=1;
                        break;
                        break;
                    }
                }
            }
if(f)break;
        }
    }
    return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d%*c"
	.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
	subq	$576, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-564(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	jmp	.L2
.L18:
	movq	stdin(%rip), %rdx
	leaq	-544(%rbp), %rax
	movl	$260, %esi
	movq	%rax, %rdi
	call	fgets@PLT
	movl	$0, -548(%rbp)
	movl	$1, -552(%rbp)
.L17:
	movl	-552(%rbp), %ecx
	movslq	%ecx, %rax
	imulq	$1321528399, %rax, %rax
	shrq	$32, %rax
	sarl	$2, %eax
	movl	%ecx, %esi
	sarl	$31, %esi
	subl	%esi, %eax
	movl	%eax, %edx
	movl	%edx, %eax
	addl	%eax, %eax
	addl	%edx, %eax
	sall	$2, %eax
	addl	%edx, %eax
	subl	%eax, %ecx
	movl	%ecx, %edx
	testl	%edx, %edx
	je	.L21
	movl	$0, -556(%rbp)
	jmp	.L5
.L16:
	movl	$0, -560(%rbp)
	jmp	.L6
.L9:
	movl	-560(%rbp), %eax
	cltq
	movzbl	-544(%rbp,%rax), %eax
	cmpb	$32, %al
	jne	.L7
	movl	-560(%rbp), %eax
	cltq
	movb	$32, -272(%rbp,%rax)
	jmp	.L8
.L7:
	movl	-560(%rbp), %eax
	cltq
	movzbl	-544(%rbp,%rax), %eax
	movsbl	%al, %eax
	subl	$97, %eax
	imull	-552(%rbp), %eax
	movl	%eax, %edx
	movl	-556(%rbp), %eax
	addl	%edx, %eax
	movslq	%eax, %rdx
	imulq	$1321528399, %rdx, %rdx
	shrq	$32, %rdx
	sarl	$3, %edx
	movl	%eax, %ecx
	sarl	$31, %ecx
	subl	%ecx, %edx
	imull	$26, %edx, %ecx
	subl	%ecx, %eax
	movl	%eax, %edx
	movl	%edx, %eax
	addl	$97, %eax
	movl	%eax, %edx
	movl	-560(%rbp), %eax
	cltq
	movb	%dl, -272(%rbp,%rax)
.L8:
	addl	$1, -560(%rbp)
.L6:
	movl	-560(%rbp), %eax
	cltq
	movzbl	-544(%rbp,%rax), %eax
	cmpb	$10, %al
	jne	.L9
	movl	-560(%rbp), %eax
	cltq
	movb	$0, -272(%rbp,%rax)
	movl	$0, -560(%rbp)
	jmp	.L10
.L15:
	movl	-560(%rbp), %eax
	cltq
	movzbl	-272(%rbp,%rax), %eax
	cmpb	$116, %al
	jne	.L11
	movl	-560(%rbp), %eax
	addl	$1, %eax
	cltq
	movzbl	-272(%rbp,%rax), %eax
	cmpb	$104, %al
	jne	.L11
	movl	-560(%rbp), %eax
	addl	$2, %eax
	cltq
	movzbl	-272(%rbp,%rax), %eax
	cmpb	$97, %al
	jne	.L12
	movl	-560(%rbp), %eax
	addl	$3, %eax
	cltq
	movzbl	-272(%rbp,%rax), %eax
	cmpb	$116, %al
	je	.L13
.L12:
	movl	-560(%rbp), %eax
	addl	$2, %eax
	cltq
	movzbl	-272(%rbp,%rax), %eax
	cmpb	$105, %al
	jne	.L11
	movl	-560(%rbp), %eax
	addl	$3, %eax
	cltq
	movzbl	-272(%rbp,%rax), %eax
	cmpb	$115, %al
	jne	.L11
.L13:
	leaq	-272(%rbp), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$1, -548(%rbp)
	jmp	.L14
.L11:
	addl	$1, -560(%rbp)
.L10:
	movl	-560(%rbp), %eax
	addl	$3, %eax
	cltq
	movzbl	-272(%rbp,%rax), %eax
	testb	%al, %al
	jne	.L15
.L14:
	addl	$1, -556(%rbp)
.L5:
	cmpl	$25, -556(%rbp)
	jle	.L16
	cmpl	$0, -548(%rbp)
	je	.L4
	jmp	.L2
.L21:
	nop
.L4:
	addl	$2, -552(%rbp)
	jmp	.L17
.L2:
	movl	-564(%rbp), %eax
	leal	-1(%rax), %edx
	movl	%edx, -564(%rbp)
	testl	%eax, %eax
	jne	.L18
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L20
	call	__stack_chk_fail@PLT
.L20:
	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
	.section	.rodata
.LC0:
	.string	"%d%*c"
	.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
	subq	$576, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-564(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	jmp	.L2
.L18:
	movq	stdin(%rip), %rdx
	leaq	-544(%rbp), %rax
	movl	$260, %esi
	movq	%rax, %rdi
	call	fgets@PLT
	movl	$0, -548(%rbp)
	movl	$1, -552(%rbp)
.L17:
	movl	-552(%rbp), %ecx
	movslq	%ecx, %rax
	imulq	$1321528399, %rax, %rax
	shrq	$32, %rax
	sarl	$2, %eax
	movl	%ecx, %esi
	sarl	$31, %esi
	subl	%esi, %eax
	movl	%eax, %edx
	movl	%edx, %eax
	addl	%eax, %eax
	addl	%edx, %eax
	sall	$2, %eax
	addl	%edx, %eax
	subl	%eax, %ecx
	movl	%ecx, %edx
	testl	%edx, %edx
	je	.L21
	movl	$0, -556(%rbp)
	jmp	.L5
.L16:
	movl	$0, -560(%rbp)
	jmp	.L6
.L9:
	movl	-560(%rbp), %eax
	cltq
	movzbl	-544(%rbp,%rax), %eax
	cmpb	$32, %al
	jne	.L7
	movl	-560(%rbp), %eax
	cltq
	movb	$32, -272(%rbp,%rax)
	jmp	.L8
.L7:
	movl	-560(%rbp), %eax
	cltq
	movzbl	-544(%rbp,%rax), %eax
	movsbl	%al, %eax
	subl	$97, %eax
	imull	-552(%rbp), %eax
	movl	%eax, %edx
	movl	-556(%rbp), %eax
	addl	%edx, %eax
	movslq	%eax, %rdx
	imulq	$1321528399, %rdx, %rdx
	shrq	$32, %rdx
	sarl	$3, %edx
	movl	%eax, %ecx
	sarl	$31, %ecx
	subl	%ecx, %edx
	imull	$26, %edx, %ecx
	subl	%ecx, %eax
	movl	%eax, %edx
	movl	%edx, %eax
	addl	$97, %eax
	movl	%eax, %edx
	movl	-560(%rbp), %eax
	cltq
	movb	%dl, -272(%rbp,%rax)
.L8:
	addl	$1, -560(%rbp)
.L6:
	movl	-560(%rbp), %eax
	cltq
	movzbl	-544(%rbp,%rax), %eax
	cmpb	$10, %al
	jne	.L9
	movl	-560(%rbp), %eax
	cltq
	movb	$0, -272(%rbp,%rax)
	movl	$0, -560(%rbp)
	jmp	.L10
.L15:
	movl	-560(%rbp), %eax
	cltq
	movzbl	-272(%rbp,%rax), %eax
	cmpb	$116, %al
	jne	.L11
	movl	-560(%rbp), %eax
	addl	$1, %eax
	cltq
	movzbl	-272(%rbp,%rax), %eax
	cmpb	$104, %al
	jne	.L11
	movl	-560(%rbp), %eax
	addl	$2, %eax
	cltq
	movzbl	-272(%rbp,%rax), %eax
	cmpb	$97, %al
	jne	.L12
	movl	-560(%rbp), %eax
	addl	$3, %eax
	cltq
	movzbl	-272(%rbp,%rax), %eax
	cmpb	$116, %al
	je	.L13
.L12:
	movl	-560(%rbp), %eax
	addl	$2, %eax
	cltq
	movzbl	-272(%rbp,%rax), %eax
	cmpb	$105, %al
	jne	.L11
	movl	-560(%rbp), %eax
	addl	$3, %eax
	cltq
	movzbl	-272(%rbp,%rax), %eax
	cmpb	$115, %al
	jne	.L11
.L13:
	leaq	-272(%rbp), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$1, -548(%rbp)
	jmp	.L14
.L11:
	addl	$1, -560(%rbp)
.L10:
	movl	-560(%rbp), %eax
	addl	$3, %eax
	cltq
	movzbl	-272(%rbp,%rax), %eax
	testb	%al, %al
	jne	.L15
.L14:
	addl	$1, -556(%rbp)
.L5:
	cmpl	$25, -556(%rbp)
	jle	.L16
	cmpl	$0, -548(%rbp)
	je	.L4
	jmp	.L2
.L21:
	nop
.L4:
	addl	$2, -552(%rbp)
	jmp	.L17
.L2:
	movl	-564(%rbp), %eax
	leal	-1(%rax), %edx
	movl	%edx, -564(%rbp)
	testl	%eax, %eax
	jne	.L18
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L20
	call	__stack_chk_fail@PLT
.L20:
	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:
