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>
char *tolowerstr(char *s) {
    int i=0;
    while(s[i]!='\0'){
         s[i]=tolower(s[i]);
         i++;
    }
    return s;
}
int main(void) {
	char w[10],n[100];
	int cnt=0;
	scanf("%s",w);
	tolowerstr(w);
	while(scanf("%s",n)!=EOF && strcmp(n,"END_OF_TEXT")){
		tolowerstr(n);
		if(!strcmp(n,w)){
			cnt++;
		}
	}
	printf("%d\n",cnt);
	return 0;
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.p2align 4
	.globl	tolowerstr
	.type	tolowerstr, @function
tolowerstr:
.LFB37:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	movq	%rdi, %r12
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	subq	$8, %rsp
	.cfi_def_cfa_offset 32
	movsbq	(%rdi), %rbx
	testb	%bl, %bl
	je	.L2
	call	__ctype_tolower_loc@PLT
	movq	%r12, %rdx
	.p2align 4,,10
	.p2align 3
.L3:
	movq	(%rax), %rcx
	addq	$1, %rdx
	movl	(%rcx,%rbx,4), %ecx
	movb	%cl, -1(%rdx)
	movsbq	(%rdx), %rbx
	testb	%bl, %bl
	jne	.L3
.L2:
	addq	$8, %rsp
	.cfi_def_cfa_offset 24
	movq	%r12, %rax
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE37:
	.size	tolowerstr, .-tolowerstr
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%s"
.LC1:
	.string	"END_OF_TEXT"
.LC2:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB38:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movabsq	$6079655328688131653, %r15
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	leaq	.LC0(%rip), %r14
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	movq	%r14, %rdi
	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
	subq	$136, %rsp
	.cfi_def_cfa_offset 192
	movq	%fs:40, %rax
	movq	%rax, 120(%rsp)
	xorl	%eax, %eax
	leaq	6(%rsp), %r13
	leaq	16(%rsp), %rbp
	movq	%r13, %rsi
	call	__isoc99_scanf@PLT
	movq	%r13, %rdi
	call	tolowerstr
	.p2align 4,,10
	.p2align 3
.L11:
	xorl	%eax, %eax
	movq	%rbp, %rsi
	movq	%r14, %rdi
	call	__isoc99_scanf@PLT
	cmpl	$-1, %eax
	je	.L14
	cmpq	%r15, 0(%rbp)
	je	.L26
.L15:
	movsbq	16(%rsp), %rbx
	testb	%bl, %bl
	je	.L18
	call	__ctype_tolower_loc@PLT
	movq	(%rax), %rcx
	movq	%rbp, %rax
	.p2align 4,,10
	.p2align 3
.L12:
	movl	(%rcx,%rbx,4), %edx
	addq	$1, %rax
	movb	%dl, -1(%rax)
	movsbq	(%rax), %rbx
	testb	%bl, %bl
	jne	.L12
.L18:
	movq	%r13, %rsi
	movq	%rbp, %rdi
	call	strcmp@PLT
	cmpl	$1, %eax
	adcl	$0, %r12d
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L26:
	cmpl	$5527621, 8(%rbp)
	jne	.L15
.L14:
	xorl	%eax, %eax
	movl	%r12d, %edx
	movl	$1, %edi
	leaq	.LC2(%rip), %rsi
	call	__printf_chk@PLT
	movq	120(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L27
	addq	$136, %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
.L27:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE38:
	.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	tolowerstr
	.type	tolowerstr, @function
tolowerstr:
.LFB37:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	movq	%rdi, %r12
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	subq	$8, %rsp
	.cfi_def_cfa_offset 32
	movsbq	(%rdi), %rbx
	testb	%bl, %bl
	je	.L2
	call	__ctype_tolower_loc@PLT
	movq	%r12, %rdx
	.p2align 4,,10
	.p2align 3
.L3:
	movq	(%rax), %rcx
	addq	$1, %rdx
	movl	(%rcx,%rbx,4), %ecx
	movb	%cl, -1(%rdx)
	movsbq	(%rdx), %rbx
	testb	%bl, %bl
	jne	.L3
.L2:
	addq	$8, %rsp
	.cfi_def_cfa_offset 24
	movq	%r12, %rax
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE37:
	.size	tolowerstr, .-tolowerstr
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%s"
.LC1:
	.string	"END_OF_TEXT"
.LC2:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB38:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movabsq	$6079655328688131653, %r15
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	leaq	.LC0(%rip), %r14
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	movq	%r14, %rdi
	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
	subq	$136, %rsp
	.cfi_def_cfa_offset 192
	movq	%fs:40, %rax
	movq	%rax, 120(%rsp)
	xorl	%eax, %eax
	leaq	6(%rsp), %r13
	leaq	16(%rsp), %rbp
	movq	%r13, %rsi
	call	__isoc99_scanf@PLT
	movq	%r13, %rdi
	call	tolowerstr
	.p2align 4,,10
	.p2align 3
.L11:
	xorl	%eax, %eax
	movq	%rbp, %rsi
	movq	%r14, %rdi
	call	__isoc99_scanf@PLT
	cmpl	$-1, %eax
	je	.L14
	cmpq	%r15, 0(%rbp)
	je	.L26
.L15:
	movsbq	16(%rsp), %rbx
	testb	%bl, %bl
	je	.L18
	call	__ctype_tolower_loc@PLT
	movq	(%rax), %rcx
	movq	%rbp, %rax
	.p2align 4,,10
	.p2align 3
.L12:
	movl	(%rcx,%rbx,4), %edx
	addq	$1, %rax
	movb	%dl, -1(%rax)
	movsbq	(%rax), %rbx
	testb	%bl, %bl
	jne	.L12
.L18:
	movq	%r13, %rsi
	movq	%rbp, %rdi
	call	strcmp@PLT
	cmpl	$1, %eax
	adcl	$0, %r12d
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L26:
	cmpl	$5527621, 8(%rbp)
	jne	.L15
.L14:
	xorl	%eax, %eax
	movl	%r12d, %edx
	movl	$1, %edi
	leaq	.LC2(%rip), %rsi
	call	__printf_chk@PLT
	movq	120(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L27
	addq	$136, %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
.L27:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE38:
	.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	tolowerstr
	.type	tolowerstr, @function
tolowerstr:
.LFB37:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	movq	%rdi, %r12
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	subq	$8, %rsp
	.cfi_def_cfa_offset 32
	movsbq	(%rdi), %rbx
	testb	%bl, %bl
	je	.L2
	call	__ctype_tolower_loc@PLT
	movq	%r12, %rdx
	.p2align 4,,10
	.p2align 3
.L3:
	movq	(%rax), %rcx
	addq	$1, %rdx
	movl	(%rcx,%rbx,4), %ecx
	movb	%cl, -1(%rdx)
	movsbq	(%rdx), %rbx
	testb	%bl, %bl
	jne	.L3
.L2:
	addq	$8, %rsp
	.cfi_def_cfa_offset 24
	movq	%r12, %rax
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE37:
	.size	tolowerstr, .-tolowerstr
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%s"
.LC1:
	.string	"END_OF_TEXT"
.LC2:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB38:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movabsq	$6079655328688131653, %r15
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	leaq	.LC0(%rip), %r14
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	movq	%r14, %rdi
	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
	subq	$136, %rsp
	.cfi_def_cfa_offset 192
	movq	%fs:40, %rax
	movq	%rax, 120(%rsp)
	xorl	%eax, %eax
	leaq	6(%rsp), %r13
	leaq	16(%rsp), %rbp
	movq	%r13, %rsi
	call	__isoc99_scanf@PLT
	movq	%r13, %rdi
	call	tolowerstr
	.p2align 4,,10
	.p2align 3
.L11:
	xorl	%eax, %eax
	movq	%rbp, %rsi
	movq	%r14, %rdi
	call	__isoc99_scanf@PLT
	cmpl	$-1, %eax
	je	.L14
	cmpq	%r15, 0(%rbp)
	je	.L26
.L15:
	movsbq	16(%rsp), %rbx
	testb	%bl, %bl
	je	.L18
	call	__ctype_tolower_loc@PLT
	movq	(%rax), %rcx
	movq	%rbp, %rax
	.p2align 4,,10
	.p2align 3
.L12:
	movl	(%rcx,%rbx,4), %edx
	addq	$1, %rax
	movb	%dl, -1(%rax)
	movsbq	(%rax), %rbx
	testb	%bl, %bl
	jne	.L12
.L18:
	movq	%r13, %rsi
	movq	%rbp, %rdi
	call	strcmp@PLT
	cmpl	$1, %eax
	adcl	$0, %r12d
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L26:
	cmpl	$5527621, 8(%rbp)
	jne	.L15
.L14:
	xorl	%eax, %eax
	movl	%r12d, %edx
	movl	$1, %edi
	leaq	.LC2(%rip), %rsi
	call	__printf_chk@PLT
	movq	120(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L27
	addq	$136, %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
.L27:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE38:
	.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>
#include <ctype.h>
char *tolowerstr(char *s) {
    int i=0;
    while(s[i]!='\0'){
         s[i]=tolower(s[i]);
         i++;
    }
    return s;
}
int main(void) {
	char w[10],n[100];
	int cnt=0;
	scanf("%s",w);
	tolowerstr(w);
	while(scanf("%s",n)!=EOF && strcmp(n,"END_OF_TEXT")){
		tolowerstr(n);
		if(!strcmp(n,w)){
			cnt++;
		}
	}
	printf("%d\n",cnt);
	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>
char *tolowerstr(char *s) {
    int i=0;
    while(s[i]!='\0'){
         s[i]=tolower(s[i]);
         i++;
    }
    return s;
}
int main(void) {
	char w[10],n[100];
	int cnt=0;
	scanf("%s",w);
	tolowerstr(w);
	while(scanf("%s",n)!=EOF && strcmp(n,"END_OF_TEXT")){
		tolowerstr(n);
		if(!strcmp(n,w)){
			cnt++;
		}
	}
	printf("%d\n",cnt);
	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:

computer
Nurtures computer scientists and highly-skilled computer engineers
who will create and exploit "knowledge" for the enw era.
Provides an outstanding computer environment.
END_OF_TEXT
 comquter
Nurtures computer scientists and highly-skilled computer engineers
who will create and tiolpxe "knowledge" for the enw era.
Provides an outstanding computer environment.
END_OF_TEXT
 computer
Nurtures computer scientists and highly-skilled computes engineers
who will create and exploit "knowledge" for the enw era.
Provides an outstanding computer environment.
END_OF_TEXT
 comquter
Nurtures computer stsitneics and highly-skilked computer engineers
who wilk create and tiolpxe "knowledge" for the enw era.
Provides an sutotanding comquter environment.
END_OF_TEXT
 computer
Nurtures computer scientists and highly-skilled computer engineers
who will create and tiolpxe "knowledge" for the enw era.
Provides an outstanding computer environment.
END_OF_TEXT
 comquter
Nurtures computer scientists and highly-skilled computer engineers
who will create and tiolpxe "knowledge" for the enw era.
Provides an sutotanding computer environment.
END_OF_TEXT
 comquter
Nurtures computer scientists and highlx-skilled computer engineers
who will create and tiolpxe "knowledge" for the enw era.
Provides an sutotanding computer environment.
END_OF_TEXT
 comquter
Nurtures computer scientists and highlx-skilled computer engineers
who will create and tiolpxe "knowledge" for the enw era.
Provides an sutotanding ctmpuoer environment.
END_OF_TEXT
 comquter
serutruN computer scientists and highlx-skilled computer engineers
who will create and tiolpxe "knowledge" for the enw era.
Provides an sutotanding ctmpuoer environment.
END_OF_TEXT
 comquter
serutruN computer scientists aod highlx-skilled computer engineers
who will create and tiolpxe "knowledge" for the enw era.
Provides an sutotanding ctmpuoer environment.
END_OF_TEXT

3
 0
 2
 1
 3
 0
 0
 0
 0
 0

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>
char *tolowerstr(char *s) {
    int i=0;
    while(s[i]!='\0'){
         s[i]=tolower(s[i]);
         i++;
    }
    return s;
}
int main(void) {
	char w[10],n[100];
	int cnt=0;
	scanf("%s",w);
	tolowerstr(w);
	while(scanf("%s",n)!=EOF && strcmp(n,"END_OF_TEXT")){
		tolowerstr(n);
		if(!strcmp(n,w)){
			cnt++;
		}
	}
	printf("%d\n",cnt);
	return 0;
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.p2align 4
	.globl	tolowerstr
	.type	tolowerstr, @function
tolowerstr:
.LFB37:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	movq	%rdi, %r12
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	subq	$8, %rsp
	.cfi_def_cfa_offset 32
	movsbq	(%rdi), %rbx
	testb	%bl, %bl
	je	.L2
	call	__ctype_tolower_loc@PLT
	movq	%r12, %rdx
	.p2align 4,,10
	.p2align 3
.L3:
	movq	(%rax), %rcx
	addq	$1, %rdx
	movl	(%rcx,%rbx,4), %ecx
	movb	%cl, -1(%rdx)
	movsbq	(%rdx), %rbx
	testb	%bl, %bl
	jne	.L3
.L2:
	addq	$8, %rsp
	.cfi_def_cfa_offset 24
	movq	%r12, %rax
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE37:
	.size	tolowerstr, .-tolowerstr
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%s"
.LC1:
	.string	"END_OF_TEXT"
.LC2:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB38:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movabsq	$6079655328688131653, %r15
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	leaq	.LC0(%rip), %r14
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	movq	%r14, %rdi
	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
	subq	$136, %rsp
	.cfi_def_cfa_offset 192
	movq	%fs:40, %rax
	movq	%rax, 120(%rsp)
	xorl	%eax, %eax
	leaq	6(%rsp), %r13
	leaq	16(%rsp), %rbp
	movq	%r13, %rsi
	call	__isoc99_scanf@PLT
	movq	%r13, %rdi
	call	tolowerstr
	.p2align 4,,10
	.p2align 3
.L11:
	xorl	%eax, %eax
	movq	%rbp, %rsi
	movq	%r14, %rdi
	call	__isoc99_scanf@PLT
	cmpl	$-1, %eax
	je	.L14
	cmpq	%r15, 0(%rbp)
	je	.L26
.L15:
	movsbq	16(%rsp), %rbx
	testb	%bl, %bl
	je	.L18
	call	__ctype_tolower_loc@PLT
	movq	(%rax), %rcx
	movq	%rbp, %rax
	.p2align 4,,10
	.p2align 3
.L12:
	movl	(%rcx,%rbx,4), %edx
	addq	$1, %rax
	movb	%dl, -1(%rax)
	movsbq	(%rax), %rbx
	testb	%bl, %bl
	jne	.L12
.L18:
	movq	%r13, %rsi
	movq	%rbp, %rdi
	call	strcmp@PLT
	cmpl	$1, %eax
	adcl	$0, %r12d
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L26:
	cmpl	$5527621, 8(%rbp)
	jne	.L15
.L14:
	xorl	%eax, %eax
	movl	%r12d, %edx
	movl	$1, %edi
	leaq	.LC2(%rip), %rsi
	call	__printf_chk@PLT
	movq	120(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L27
	addq	$136, %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
.L27:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE38:
	.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	tolowerstr
	.type	tolowerstr, @function
tolowerstr:
.LFB37:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	movq	%rdi, %r12
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	subq	$8, %rsp
	.cfi_def_cfa_offset 32
	movsbq	(%rdi), %rbx
	testb	%bl, %bl
	je	.L2
	call	__ctype_tolower_loc@PLT
	movq	%r12, %rdx
	.p2align 4,,10
	.p2align 3
.L3:
	movq	(%rax), %rcx
	addq	$1, %rdx
	movl	(%rcx,%rbx,4), %ecx
	movb	%cl, -1(%rdx)
	movsbq	(%rdx), %rbx
	testb	%bl, %bl
	jne	.L3
.L2:
	addq	$8, %rsp
	.cfi_def_cfa_offset 24
	movq	%r12, %rax
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE37:
	.size	tolowerstr, .-tolowerstr
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%s"
.LC1:
	.string	"END_OF_TEXT"
.LC2:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB38:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movabsq	$6079655328688131653, %r15
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	leaq	.LC0(%rip), %r14
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	movq	%r14, %rdi
	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
	subq	$136, %rsp
	.cfi_def_cfa_offset 192
	movq	%fs:40, %rax
	movq	%rax, 120(%rsp)
	xorl	%eax, %eax
	leaq	6(%rsp), %r13
	leaq	16(%rsp), %rbp
	movq	%r13, %rsi
	call	__isoc99_scanf@PLT
	movq	%r13, %rdi
	call	tolowerstr
	.p2align 4,,10
	.p2align 3
.L11:
	xorl	%eax, %eax
	movq	%rbp, %rsi
	movq	%r14, %rdi
	call	__isoc99_scanf@PLT
	cmpl	$-1, %eax
	je	.L14
	cmpq	%r15, 0(%rbp)
	je	.L26
.L15:
	movsbq	16(%rsp), %rbx
	testb	%bl, %bl
	je	.L18
	call	__ctype_tolower_loc@PLT
	movq	(%rax), %rcx
	movq	%rbp, %rax
	.p2align 4,,10
	.p2align 3
.L12:
	movl	(%rcx,%rbx,4), %edx
	addq	$1, %rax
	movb	%dl, -1(%rax)
	movsbq	(%rax), %rbx
	testb	%bl, %bl
	jne	.L12
.L18:
	movq	%r13, %rsi
	movq	%rbp, %rdi
	call	strcmp@PLT
	cmpl	$1, %eax
	adcl	$0, %r12d
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L26:
	cmpl	$5527621, 8(%rbp)
	jne	.L15
.L14:
	xorl	%eax, %eax
	movl	%r12d, %edx
	movl	$1, %edi
	leaq	.LC2(%rip), %rsi
	call	__printf_chk@PLT
	movq	120(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L27
	addq	$136, %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
.L27:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE38:
	.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:
```