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>

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

Assembly Code:

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

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%*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
```assembly
	.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:
```
```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;
}```
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>

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

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:

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

Assembly Code:

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

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%*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:
```