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 search (char* word,char* sentence); //関数予告 お楽しみに！
 
int main () {
    char W[11],T[1001];
    int count = 0;
    //wordは1回読めばいい
    scanf ("%s",&W);
    /*sentenceは単語単位に分けます
    while文をbreak条件まで回す
    scanfは空白も理解*/
    while (1) {
        scanf ("%s",&T); //文字列はs!
        if (strcmp (T,"END_OF_TEXT") == 0) { 
            //strcmp 一致してたら0を返す
            break;
        }
        /*それでは、searchパイセンよろしくお願いしまーす!
        (サマーウォーズ風)*/
        if (search (W,T) == 0) {
            count ++;
            //何単語あるか調べるんだよね
        }
         
    }
    printf ("%d\n",count);
     
    return 0;
}
 
int search (char* word,char* sentence) {
//pointerの*です　そんな怖くないよ…ね？
//あ、注意　sentenceだけどsentenceの1単語やからな
 
    //さてさて、まず長さが等しくないと話にならないっしょ
    int word_length = 0,sent_length = 0;
    int i;
    for (i = 0;word[i] != '\0';i ++) {
        // '\0' はcharによる
        word_length ++;
    }
    for (i = 0;sentence[i] != '\0';i ++) {
        sent_length ++;
    }
    if (word_length != sent_length) {
        return -1;
    }
     
    /*次、長さ同じなら文字が一つずつ同じか
    ただし、大文字、小文字は区別しない*/
    for (i = 0;word[i] != '\0';i ++) {
        if (word[i] - sentence[i] != 0
            && word[i] - sentence[i] != 32
            && word[i] - sentence[i] != -32) {
            /*ascii code
            a -> 97   A -> 65*/
                return -1;
            }
    }
    return 0;
    //ほう、よくこれほどの条件をくぐり抜けてきたな
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%s"
.LC1:
	.string	"END_OF_TEXT"
.LC2:
	.string	"%d\n"
	.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	$1040, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -1040(%rbp)
	leaq	-1035(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
.L5:
	leaq	-1024(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-1024(%rbp), %rax
	leaq	.LC1(%rip), %rdx
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	strcmp@PLT
	testl	%eax, %eax
	je	.L9
	leaq	-1024(%rbp), %rdx
	leaq	-1035(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	search
	testl	%eax, %eax
	jne	.L5
	addl	$1, -1040(%rbp)
	jmp	.L5
.L9:
	nop
	movl	-1040(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L7
	call	__stack_chk_fail@PLT
.L7:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.globl	search
	.type	search, @function
search:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -24(%rbp)
	movq	%rsi, -32(%rbp)
	movl	$0, -12(%rbp)
	movl	$0, -8(%rbp)
	movl	$0, -4(%rbp)
	jmp	.L11
.L12:
	addl	$1, -12(%rbp)
	addl	$1, -4(%rbp)
.L11:
	movl	-4(%rbp), %eax
	movslq	%eax, %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	testb	%al, %al
	jne	.L12
	movl	$0, -4(%rbp)
	jmp	.L13
.L14:
	addl	$1, -8(%rbp)
	addl	$1, -4(%rbp)
.L13:
	movl	-4(%rbp), %eax
	movslq	%eax, %rdx
	movq	-32(%rbp), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	testb	%al, %al
	jne	.L14
	movl	-12(%rbp), %eax
	cmpl	-8(%rbp), %eax
	je	.L15
	movl	$-1, %eax
	jmp	.L16
.L15:
	movl	$0, -4(%rbp)
	jmp	.L17
.L19:
	movl	-4(%rbp), %eax
	movslq	%eax, %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %edx
	movl	-4(%rbp), %eax
	movslq	%eax, %rcx
	movq	-32(%rbp), %rax
	addq	%rcx, %rax
	movzbl	(%rax), %eax
	cmpb	%al, %dl
	je	.L18
	movl	-4(%rbp), %eax
	movslq	%eax, %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	movsbl	%al, %eax
	movl	-4(%rbp), %edx
	movslq	%edx, %rcx
	movq	-32(%rbp), %rdx
	addq	%rcx, %rdx
	movzbl	(%rdx), %edx
	movsbl	%dl, %edx
	subl	%edx, %eax
	cmpl	$32, %eax
	je	.L18
	movl	-4(%rbp), %eax
	movslq	%eax, %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	movsbl	%al, %eax
	movl	-4(%rbp), %edx
	movslq	%edx, %rcx
	movq	-32(%rbp), %rdx
	addq	%rcx, %rdx
	movzbl	(%rdx), %edx
	movsbl	%dl, %edx
	subl	%edx, %eax
	cmpl	$-32, %eax
	je	.L18
	movl	$-1, %eax
	jmp	.L16
.L18:
	addl	$1, -4(%rbp)
.L17:
	movl	-4(%rbp), %eax
	movslq	%eax, %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	testb	%al, %al
	jne	.L19
	movl	$0, %eax
.L16:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	search, .-search
	.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	"%s"
.LC1:
	.string	"END_OF_TEXT"
.LC2:
	.string	"%d\n"
	.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
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	xorl	%r12d, %r12d
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	movabsq	$6079655328688131653, %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	leaq	.LC0(%rip), %rbx
	movq	%rbx, %rdi
	subq	$1040, %rsp
	.cfi_def_cfa_offset 1088
	movq	%fs:40, %rax
	movq	%rax, 1032(%rsp)
	xorl	%eax, %eax
	leaq	5(%rsp), %r13
	leaq	16(%rsp), %r14
	movq	%r13, %rsi
	call	__isoc99_scanf@PLT
	.p2align 4,,10
	.p2align 3
.L2:
	xorl	%eax, %eax
	movq	%r14, %rsi
	movq	%rbx, %rdi
	call	__isoc99_scanf@PLT
	cmpq	%rbp, (%r14)
	je	.L27
.L3:
	movsbl	5(%rsp), %eax
	movzbl	16(%rsp), %edi
	testb	%al, %al
	je	.L6
	movl	$1, %edx
	leaq	4(%rsp), %rsi
	.p2align 4,,10
	.p2align 3
.L7:
	movl	%edx, %ecx
	addq	$1, %rdx
	cmpb	$0, (%rsi,%rdx)
	jne	.L7
	testb	%dil, %dil
	je	.L2
.L14:
	movl	$1, %edx
	leaq	15(%rsp), %rdi
	.p2align 4,,10
	.p2align 3
.L9:
	movl	%edx, %esi
	addq	$1, %rdx
	cmpb	$0, (%rdi,%rdx)
	jne	.L9
	cmpl	%ecx, %esi
	jne	.L2
	testb	%al, %al
	je	.L11
	xorl	%edx, %edx
	.p2align 4,,10
	.p2align 3
.L13:
	movsbl	(%r14,%rdx), %ecx
	cmpb	%al, %cl
	je	.L12
	subl	%ecx, %eax
	addl	$32, %eax
	andl	$-65, %eax
	jne	.L2
.L12:
	addq	$1, %rdx
	movsbl	0(%r13,%rdx), %eax
	testb	%al, %al
	jne	.L13
.L11:
	addl	$1, %r12d
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L27:
	cmpl	$5527621, 8(%r14)
	jne	.L3
	xorl	%eax, %eax
	movl	%r12d, %edx
	movl	$1, %edi
	leaq	.LC2(%rip), %rsi
	call	__printf_chk@PLT
	movq	1032(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L28
	addq	$1040, %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
.L6:
	.cfi_restore_state
	testb	%dil, %dil
	je	.L11
	xorl	%ecx, %ecx
	jmp	.L14
.L28:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE35:
	.size	main, .-main
	.text
	.p2align 4
	.globl	search
	.type	search, @function
search:
.LFB36:
	.cfi_startproc
	endbr64
	movsbl	(%rdi), %eax
	movzbl	(%rsi), %r8d
	testb	%al, %al
	je	.L30
	movl	$1, %edx
	.p2align 4,,10
	.p2align 3
.L31:
	movl	%edx, %ecx
	addq	$1, %rdx
	cmpb	$0, -1(%rdi,%rdx)
	jne	.L31
	testb	%r8b, %r8b
	je	.L46
.L37:
	movl	$1, %edx
	.p2align 4,,10
	.p2align 3
.L33:
	movl	%edx, %r8d
	addq	$1, %rdx
	cmpb	$0, -1(%rsi,%rdx)
	jne	.L33
	cmpl	%ecx, %r8d
	jne	.L46
	testb	%al, %al
	je	.L47
	xorl	%edx, %edx
	.p2align 4,,10
	.p2align 3
.L36:
	movsbl	(%rsi,%rdx), %ecx
	cmpb	%al, %cl
	je	.L35
	subl	%ecx, %eax
	addl	$32, %eax
	andl	$-65, %eax
	jne	.L46
.L35:
	addq	$1, %rdx
	movsbl	(%rdi,%rdx), %eax
	testb	%al, %al
	jne	.L36
.L47:
	xorl	%eax, %eax
	ret
	.p2align 4,,10
	.p2align 3
.L46:
	movl	$-1, %eax
	ret
.L30:
	testb	%r8b, %r8b
	je	.L47
	xorl	%ecx, %ecx
	jmp	.L37
	.cfi_endproc
.LFE36:
	.size	search, .-search
	.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	"%s"
.LC1:
	.string	"END_OF_TEXT"
.LC2:
	.string	"%d\n"
	.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
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	xorl	%r12d, %r12d
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	movabsq	$6079655328688131653, %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	leaq	.LC0(%rip), %rbx
	movq	%rbx, %rdi
	subq	$1040, %rsp
	.cfi_def_cfa_offset 1088
	movq	%fs:40, %rax
	movq	%rax, 1032(%rsp)
	xorl	%eax, %eax
	leaq	5(%rsp), %r13
	leaq	16(%rsp), %r14
	movq	%r13, %rsi
	call	__isoc99_scanf@PLT
	.p2align 4,,10
	.p2align 3
.L2:
	xorl	%eax, %eax
	movq	%r14, %rsi
	movq	%rbx, %rdi
	call	__isoc99_scanf@PLT
	cmpq	%rbp, (%r14)
	je	.L27
.L3:
	movsbl	5(%rsp), %eax
	movzbl	16(%rsp), %edi
	testb	%al, %al
	je	.L6
	movl	$1, %edx
	leaq	4(%rsp), %rsi
	.p2align 4,,10
	.p2align 3
.L7:
	movl	%edx, %ecx
	addq	$1, %rdx
	cmpb	$0, (%rsi,%rdx)
	jne	.L7
	testb	%dil, %dil
	je	.L2
.L14:
	movl	$1, %edx
	leaq	15(%rsp), %rdi
	.p2align 4,,10
	.p2align 3
.L9:
	movl	%edx, %esi
	addq	$1, %rdx
	cmpb	$0, (%rdi,%rdx)
	jne	.L9
	cmpl	%ecx, %esi
	jne	.L2
	testb	%al, %al
	je	.L11
	xorl	%edx, %edx
	.p2align 4,,10
	.p2align 3
.L13:
	movsbl	(%r14,%rdx), %ecx
	cmpb	%al, %cl
	je	.L12
	subl	%ecx, %eax
	addl	$32, %eax
	andl	$-65, %eax
	jne	.L2
.L12:
	addq	$1, %rdx
	movsbl	0(%r13,%rdx), %eax
	testb	%al, %al
	jne	.L13
.L11:
	addl	$1, %r12d
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L27:
	cmpl	$5527621, 8(%r14)
	jne	.L3
	xorl	%eax, %eax
	movl	%r12d, %edx
	movl	$1, %edi
	leaq	.LC2(%rip), %rsi
	call	__printf_chk@PLT
	movq	1032(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L28
	addq	$1040, %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
.L6:
	.cfi_restore_state
	testb	%dil, %dil
	je	.L11
	xorl	%ecx, %ecx
	jmp	.L14
.L28:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE35:
	.size	main, .-main
	.text
	.p2align 4
	.globl	search
	.type	search, @function
search:
.LFB36:
	.cfi_startproc
	endbr64
	movsbl	(%rdi), %eax
	movzbl	(%rsi), %r8d
	testb	%al, %al
	je	.L30
	movl	$1, %edx
	.p2align 4,,10
	.p2align 3
.L31:
	movl	%edx, %ecx
	addq	$1, %rdx
	cmpb	$0, -1(%rdi,%rdx)
	jne	.L31
	testb	%r8b, %r8b
	je	.L46
.L37:
	movl	$1, %edx
	.p2align 4,,10
	.p2align 3
.L33:
	movl	%edx, %r8d
	addq	$1, %rdx
	cmpb	$0, -1(%rsi,%rdx)
	jne	.L33
	cmpl	%ecx, %r8d
	jne	.L46
	testb	%al, %al
	je	.L47
	xorl	%edx, %edx
	.p2align 4,,10
	.p2align 3
.L36:
	movsbl	(%rsi,%rdx), %ecx
	cmpb	%al, %cl
	je	.L35
	subl	%ecx, %eax
	addl	$32, %eax
	andl	$-65, %eax
	jne	.L46
.L35:
	addq	$1, %rdx
	movsbl	(%rdi,%rdx), %eax
	testb	%al, %al
	jne	.L36
.L47:
	xorl	%eax, %eax
	ret
	.p2align 4,,10
	.p2align 3
.L46:
	movl	$-1, %eax
	ret
.L30:
	testb	%r8b, %r8b
	je	.L47
	xorl	%ecx, %ecx
	jmp	.L37
	.cfi_endproc
.LFE36:
	.size	search, .-search
	.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 search (char* word,char* sentence); //関数予告 お楽しみに！
 
int main () {
    char W[11],T[1001];
    int count = 0;
    //wordは1回読めばいい
    scanf ("%s",&W);
    /*sentenceは単語単位に分けます
    while文をbreak条件まで回す
    scanfは空白も理解*/
    while (1) {
        scanf ("%s",&T); //文字列はs!
        if (strcmp (T,"END_OF_TEXT") == 0) { 
            //strcmp 一致してたら0を返す
            break;
        }
        /*それでは、searchパイセンよろしくお願いしまーす!
        (サマーウォーズ風)*/
        if (search (W,T) == 0) {
            count ++;
            //何単語あるか調べるんだよね
        }
         
    }
    printf ("%d\n",count);
     
    return 0;
}
 
int search (char* word,char* sentence) {
//pointerの*です　そんな怖くないよ…ね？
//あ、注意　sentenceだけどsentenceの1単語やからな
 
    //さてさて、まず長さが等しくないと話にならないっしょ
    int word_length = 0,sent_length = 0;
    int i;
    for (i = 0;word[i] != '\0';i ++) {
        // '\0' はcharによる
        word_length ++;
    }
    for (i = 0;sentence[i] != '\0';i ++) {
        sent_length ++;
    }
    if (word_length != sent_length) {
        return -1;
    }
     
    /*次、長さ同じなら文字が一つずつ同じか
    ただし、大文字、小文字は区別しない*/
    for (i = 0;word[i] != '\0';i ++) {
        if (word[i] - sentence[i] != 0
            && word[i] - sentence[i] != 32
            && word[i] - sentence[i] != -32) {
            /*ascii code
            a -> 97   A -> 65*/
                return -1;
            }
    }
    return 0;
    //ほう、よくこれほどの条件をくぐり抜けてきたな
}

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 unoptimized assembly code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include <stdio.h>
#include <string.h>
 
int search (char* word,char* sentence); //関数予告 お楽しみに！
 
int main () {
    char W[11],T[1001];
    int count = 0;
    //wordは1回読めばいい
    scanf ("%s",&W);
    /*sentenceは単語単位に分けます
    while文をbreak条件まで回す
    scanfは空白も理解*/
    while (1) {
        scanf ("%s",&T); //文字列はs!
        if (strcmp (T,"END_OF_TEXT") == 0) { 
            //strcmp 一致してたら0を返す
            break;
        }
        /*それでは、searchパイセンよろしくお願いしまーす!
        (サマーウォーズ風)*/
        if (search (W,T) == 0) {
            count ++;
            //何単語あるか調べるんだよね
        }
         
    }
    printf ("%d\n",count);
     
    return 0;
}
 
int search (char* word,char* sentence) {
//pointerの*です　そんな怖くないよ…ね？
//あ、注意　sentenceだけどsentenceの1単語やからな
 
    //さてさて、まず長さが等しくないと話にならないっしょ
    int word_length = 0,sent_length = 0;
    int i;
    for (i = 0;word[i] != '\0';i ++) {
        // '\0' はcharによる
        word_length ++;
    }
    for (i = 0;sentence[i] != '\0';i ++) {
        sent_length ++;
    }
    if (word_length != sent_length) {
        return -1;
    }
     
    /*次、長さ同じなら文字が一つずつ同じか
    ただし、大文字、小文字は区別しない*/
    for (i = 0;word[i] != '\0';i ++) {
        if (word[i] - sentence[i] != 0
            && word[i] - sentence[i] != 32
            && word[i] - sentence[i] != -32) {
            /*ascii code
            a -> 97   A -> 65*/
                return -1;
            }
    }
    return 0;
    //ほう、よくこれほどの条件をくぐり抜けてきたな
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%s"
.LC1:
	.string	"END_OF_TEXT"
.LC2:
	.string	"%d\n"
	.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	$1040, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -1040(%rbp)
	leaq	-1035(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
.L5:
	leaq	-1024(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-1024(%rbp), %rax
	leaq	.LC1(%rip), %rdx
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	strcmp@PLT
	testl	%eax, %eax
	je	.L9
	leaq	-1024(%rbp), %rdx
	leaq	-1035(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	search
	testl	%eax, %eax
	jne	.L5
	addl	$1, -1040(%rbp)
	jmp	.L5
.L9:
	nop
	movl	-1040(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L7
	call	__stack_chk_fail@PLT
.L7:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.globl	search
	.type	search, @function
search:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -24(%rbp)
	movq	%rsi, -32(%rbp)
	movl	$0, -12(%rbp)
	movl	$0, -8(%rbp)
	movl	$0, -4(%rbp)
	jmp	.L11
.L12:
	addl	$1, -12(%rbp)
	addl	$1, -4(%rbp)
.L11:
	movl	-4(%rbp), %eax
	movslq	%eax, %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	testb	%al, %al
	jne	.L12
	movl	$0, -4(%rbp)
	jmp	.L13
.L14:
	addl	$1, -8(%rbp)
	addl	$1, -4(%rbp)
.L13:
	movl	-4(%rbp), %eax
	movslq	%eax, %rdx
	movq	-32(%rbp), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	testb	%al, %al
	jne	.L14
	movl	-12(%rbp), %eax
	cmpl	-8(%rbp), %eax
	je	.L15
	movl	$-1, %eax
	jmp	.L16
.L15:
	movl	$0, -4(%rbp)
	jmp	.L17
.L19:
	movl	-4(%rbp), %eax
	movslq	%eax, %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %edx
	movl	-4(%rbp), %eax
	movslq	%eax, %rcx
	movq	-32(%rbp), %rax
	addq	%rcx, %rax
	movzbl	(%rax), %eax
	cmpb	%al, %dl
	je	.L18
	movl	-4(%rbp), %eax
	movslq	%eax, %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	movsbl	%al, %eax
	movl	-4(%rbp), %edx
	movslq	%edx, %rcx
	movq	-32(%rbp), %rdx
	addq	%rcx, %rdx
	movzbl	(%rdx), %edx
	movsbl	%dl, %edx
	subl	%edx, %eax
	cmpl	$32, %eax
	je	.L18
	movl	-4(%rbp), %eax
	movslq	%eax, %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	movsbl	%al, %eax
	movl	-4(%rbp), %edx
	movslq	%edx, %rcx
	movq	-32(%rbp), %rdx
	addq	%rcx, %rdx
	movzbl	(%rdx), %edx
	movsbl	%dl, %edx
	subl	%edx, %eax
	cmpl	$-32, %eax
	je	.L18
	movl	$-1, %eax
	jmp	.L16
.L18:
	addl	$1, -4(%rbp)
.L17:
	movl	-4(%rbp), %eax
	movslq	%eax, %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	testb	%al, %al
	jne	.L19
	movl	$0, %eax
.L16:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	search, .-search
	.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	"%s"
.LC1:
	.string	"END_OF_TEXT"
.LC2:
	.string	"%d\n"
	.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	$1040, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -1040(%rbp)
	leaq	-1035(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
.L5:
	leaq	-1024(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-1024(%rbp), %rax
	leaq	.LC1(%rip), %rdx
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	strcmp@PLT
	testl	%eax, %eax
	je	.L9
	leaq	-1024(%rbp), %rdx
	leaq	-1035(%rbp), %rax
	movq	%rdx, %rsi
	movq	%rax, %rdi
	call	search
	testl	%eax, %eax
	jne	.L5
	addl	$1, -1040(%rbp)
	jmp	.L5
.L9:
	nop
	movl	-1040(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L7
	call	__stack_chk_fail@PLT
.L7:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.globl	search
	.type	search, @function
search:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -24(%rbp)
	movq	%rsi, -32(%rbp)
	movl	$0, -12(%rbp)
	movl	$0, -8(%rbp)
	movl	$0, -4(%rbp)
	jmp	.L11
.L12:
	addl	$1, -12(%rbp)
	addl	$1, -4(%rbp)
.L11:
	movl	-4(%rbp), %eax
	movslq	%eax, %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	testb	%al, %al
	jne	.L12
	movl	$0, -4(%rbp)
	jmp	.L13
.L14:
	addl	$1, -8(%rbp)
	addl	$1, -4(%rbp)
.L13:
	movl	-4(%rbp), %eax
	movslq	%eax, %rdx
	movq	-32(%rbp), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	testb	%al, %al
	jne	.L14
	movl	-12(%rbp), %eax
	cmpl	-8(%rbp), %eax
	je	.L15
	movl	$-1, %eax
	jmp	.L16
.L15:
	movl	$0, -4(%rbp)
	jmp	.L17
.L19:
	movl	-4(%rbp), %eax
	movslq	%eax, %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %edx
	movl	-4(%rbp), %eax
	movslq	%eax, %rcx
	movq	-32(%rbp), %rax
	addq	%rcx, %rax
	movzbl	(%rax), %eax
	cmpb	%al, %dl
	je	.L18
	movl	-4(%rbp), %eax
	movslq	%eax, %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	movsbl	%al, %eax
	movl	-4(%rbp), %edx
	movslq	%edx, %rcx
	movq	-32(%rbp), %rdx
	addq	%rcx, %rdx
	movzbl	(%rdx), %edx
	movsbl	%dl, %edx
	subl	%edx, %eax
	cmpl	$32, %eax
	je	.L18
	movl	-4(%rbp), %eax
	movslq	%eax, %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	movsbl	%al, %eax
	movl	-4(%rbp), %edx
	movslq	%edx, %rcx
	movq	-32(%rbp), %rdx
	addq	%rcx, %rdx
	movzbl	(%rdx), %edx
	movsbl	%dl, %edx
	subl	%edx, %eax
	cmpl	$-32, %eax
	je	.L18
	movl	$-1, %eax
	jmp	.L16
.L18:
	addl	$1, -4(%rbp)
.L17:
	movl	-4(%rbp), %eax
	movslq	%eax, %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	testb	%al, %al
	jne	.L19
	movl	$0, %eax
.L16:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	search, .-search
	.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:
