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>

#define STRING_MAX 101

#define TEICE 2

#define FRG_OFF 0

#define FRG_ON 1

#define ARRAY_RESET 0

#define LOOP_RESET 0

#define COUNT_RESET 0

#define RETURN 0

unsigned short s_scan_sentence(unsigned char * str, unsigned short length_max);

unsigned short s_sarch_text(unsigned char * ring, unsigned short r_length, unsigned char * look, unsigned short l_length);

int main(){

        unsigned char ubW_D_ring_text[STRING_MAX];        /* 検索元文字列の配列 */

        unsigned char ubW_D_look_text[STRING_MAX];        /* 検索文字列の配列 */

        unsigned short usW_D_ring_length;                 /* 検索元文字列の長さ */

        unsigned short usW_D_look_length;                 /* 検索文字列の長さ */

        unsigned short usW_F_frg_main = FRG_OFF;          /* 一致フラグ */

        unsigned short usW_C_i;                           /* ループ変数 */

        

        /* 配列の初期化 */

        for(usW_C_i = LOOP_RESET;usW_C_i < STRING_MAX;usW_C_i++){

                ubW_D_ring_text[usW_C_i] = ARRAY_RESET;

                ubW_D_look_text[usW_C_i] = ARRAY_RESET;

        }

        

        /* 検索元文字列の入力 */

        usW_D_ring_length = s_scan_sentence(ubW_D_ring_text, STRING_MAX);

        /* 検索文字列の入力 */

        usW_D_look_length = s_scan_sentence(ubW_D_look_text, STRING_MAX);

        

        /* 文字列の検索 */

        usW_F_frg_main = s_sarch_text(ubW_D_ring_text, usW_D_ring_length, ubW_D_look_text, usW_D_look_length);

        

        /* フラグが0の場合Noを、1の場合Yesを出力 */

        if(usW_F_frg_main == FRG_OFF){

                printf("No\n");

        }

        else if(usW_F_frg_main == FRG_ON){

                printf("Yes\n");

        }

        

        return RETURN;

}

/* 関数名：文字列入力 */

/* 概要：文字列を入力する。その長さを返す */

/* 引数：文字列を格納する配列の先頭アドレス、その配列の大きさ */

/* 戻り値：入力された文字列の長さ */

unsigned short s_scan_sentence(unsigned char * str, unsigned short length_max)

{

        unsigned short usW_C_count_text = COUNT_RESET;          /* 文字列長カウンタ */

        unsigned short usW_C_i;                                 /* ループ変数 */

        /* 文字列の入力 */

        for(usW_C_i = LOOP_RESET;usW_C_i < length_max;usW_C_i++){

                scanf("%c", str + usW_C_i);

                /* 入力終了の処理 */

                if(*(str + usW_C_i) == '\n'){

                        break;

                }

                /* 文字数をカウント */

                usW_C_count_text++;

        }

        /* 文字列長を返す */

        return usW_C_count_text;

}

/* 関数名：文字列走査 */

/* 概要：文字列を二つ受け取り一つ目の文字列に二つ目の文字列が含まれいるか調べる */

/* 引数：調べられる文字列、その長さ、調べる文字列、その文字列 */

/* 戻り値：調べた結果の一致、不一致を表すフラグ */

unsigned short s_sarch_text(unsigned char * ring, unsigned short r_length, unsigned char * look, unsigned short l_length)

{

        unsigned char twi_ring[STRING_MAX * TEICE];         /* 円状の文字列を再現する配列 */

        unsigned short usW_F_frg_match = FRG_OFF;           /* 一致フラグ */

        unsigned short usW_C_i, usW_C_j;                    /* ループ変数 */

        

        /* 配列を初期化 */

        for(usW_C_i = LOOP_RESET;usW_C_i < (STRING_MAX * TEICE);usW_C_i++){

                twi_ring[usW_C_i] = ARRAY_RESET;

        }

        

        /* 円状の文字列を再現 */

        /* 円状の文字列に検索元文字列を代入 */

        for(usW_C_i = LOOP_RESET;usW_C_i < r_length;usW_C_i++){

                twi_ring[usW_C_i] = *(ring + usW_C_i);

        }

        /* 円状の文字列の続きに検索元文字列を代入 */

        for(usW_C_i = LOOP_RESET;usW_C_i < r_length;usW_C_i++){

                twi_ring[r_length + usW_C_i] = *(ring + usW_C_i);

        }

        /* 円状の文字列を再現 ここまで */

        

        /* 文字列の検索 */

        /* 円状の文字列の始点をずらしながら検索 */

        for(usW_C_i = LOOP_RESET;usW_C_i <= r_length;usW_C_i++){

                /* 文字列の合致を一文字ずつ照合 */

                for(usW_C_j = LOOP_RESET;usW_C_j <= l_length;usW_C_j++){

                        /* 検索する文字列が終端であればフラグを1に */

                        if(*(look + usW_C_j) == '\n'){

                                usW_F_frg_match = FRG_ON;

                        }

                        /* 二つの文字列の対象の文字が一致していなければループを抜ける */

                        if(twi_ring[usW_C_i + usW_C_j] != *(look + usW_C_j)){

                                break;

                        }

                }

        }

        /* 文字列の検索 ここまで */

        

        /* フラグの値を返す */

        return usW_F_frg_match;

}

```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"No"
.LC1:
	.string	"Yes"
	.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	$240, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movw	$0, -230(%rbp)
	movw	$0, -232(%rbp)
	jmp	.L2
.L3:
	movzwl	-232(%rbp), %eax
	cltq
	movb	$0, -224(%rbp,%rax)
	movzwl	-232(%rbp), %eax
	cltq
	movb	$0, -112(%rbp,%rax)
	movzwl	-232(%rbp), %eax
	addl	$1, %eax
	movw	%ax, -232(%rbp)
.L2:
	cmpw	$100, -232(%rbp)
	jbe	.L3
	leaq	-224(%rbp), %rax
	movl	$101, %esi
	movq	%rax, %rdi
	call	s_scan_sentence
	movw	%ax, -228(%rbp)
	leaq	-112(%rbp), %rax
	movl	$101, %esi
	movq	%rax, %rdi
	call	s_scan_sentence
	movw	%ax, -226(%rbp)
	movzwl	-226(%rbp), %ecx
	movzwl	-228(%rbp), %esi
	leaq	-112(%rbp), %rdx
	leaq	-224(%rbp), %rax
	movq	%rax, %rdi
	call	s_sarch_text
	movw	%ax, -230(%rbp)
	cmpw	$0, -230(%rbp)
	jne	.L4
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L5
.L4:
	cmpw	$1, -230(%rbp)
	jne	.L5
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
.L5:
	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
	.section	.rodata
.LC2:
	.string	"%c"
	.text
	.globl	s_scan_sentence
	.type	s_scan_sentence, @function
s_scan_sentence:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movq	%rdi, -24(%rbp)
	movl	%esi, %eax
	movw	%ax, -28(%rbp)
	movw	$0, -4(%rbp)
	movw	$0, -2(%rbp)
	jmp	.L9
.L12:
	movzwl	-2(%rbp), %edx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movzwl	-2(%rbp), %edx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	cmpb	$10, %al
	je	.L14
	movzwl	-4(%rbp), %eax
	addl	$1, %eax
	movw	%ax, -4(%rbp)
	movzwl	-2(%rbp), %eax
	addl	$1, %eax
	movw	%ax, -2(%rbp)
.L9:
	movzwl	-2(%rbp), %eax
	cmpw	-28(%rbp), %ax
	jb	.L12
	jmp	.L11
.L14:
	nop
.L11:
	movzwl	-4(%rbp), %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	s_scan_sentence, .-s_scan_sentence
	.globl	s_sarch_text
	.type	s_sarch_text, @function
s_sarch_text:
.LFB2:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$272, %rsp
	movq	%rdi, -248(%rbp)
	movq	%rdx, -264(%rbp)
	movl	%ecx, %eax
	movl	%esi, %edx
	movw	%dx, -252(%rbp)
	movw	%ax, -256(%rbp)
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movw	$0, -230(%rbp)
	movw	$0, -228(%rbp)
	jmp	.L16
.L17:
	movzwl	-228(%rbp), %eax
	cltq
	movb	$0, -224(%rbp,%rax)
	movzwl	-228(%rbp), %eax
	addl	$1, %eax
	movw	%ax, -228(%rbp)
.L16:
	cmpw	$201, -228(%rbp)
	jbe	.L17
	movw	$0, -228(%rbp)
	jmp	.L18
.L19:
	movzwl	-228(%rbp), %edx
	movq	-248(%rbp), %rax
	addq	%rax, %rdx
	movzwl	-228(%rbp), %eax
	movzbl	(%rdx), %edx
	cltq
	movb	%dl, -224(%rbp,%rax)
	movzwl	-228(%rbp), %eax
	addl	$1, %eax
	movw	%ax, -228(%rbp)
.L18:
	movzwl	-228(%rbp), %eax
	cmpw	-252(%rbp), %ax
	jb	.L19
	movw	$0, -228(%rbp)
	jmp	.L20
.L21:
	movzwl	-228(%rbp), %edx
	movq	-248(%rbp), %rax
	addq	%rdx, %rax
	movzwl	-252(%rbp), %ecx
	movzwl	-228(%rbp), %edx
	addl	%edx, %ecx
	movzbl	(%rax), %edx
	movslq	%ecx, %rax
	movb	%dl, -224(%rbp,%rax)
	movzwl	-228(%rbp), %eax
	addl	$1, %eax
	movw	%ax, -228(%rbp)
.L20:
	movzwl	-228(%rbp), %eax
	cmpw	-252(%rbp), %ax
	jb	.L21
	movw	$0, -228(%rbp)
	jmp	.L22
.L28:
	movw	$0, -226(%rbp)
	jmp	.L23
.L27:
	movzwl	-226(%rbp), %edx
	movq	-264(%rbp), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	cmpb	$10, %al
	jne	.L24
	movw	$1, -230(%rbp)
.L24:
	movzwl	-228(%rbp), %edx
	movzwl	-226(%rbp), %eax
	addl	%edx, %eax
	cltq
	movzbl	-224(%rbp,%rax), %edx
	movzwl	-226(%rbp), %ecx
	movq	-264(%rbp), %rax
	addq	%rcx, %rax
	movzbl	(%rax), %eax
	cmpb	%al, %dl
	jne	.L31
	movzwl	-226(%rbp), %eax
	addl	$1, %eax
	movw	%ax, -226(%rbp)
.L23:
	movzwl	-226(%rbp), %eax
	cmpw	-256(%rbp), %ax
	jbe	.L27
	jmp	.L26
.L31:
	nop
.L26:
	movzwl	-228(%rbp), %eax
	addl	$1, %eax
	movw	%ax, -228(%rbp)
.L22:
	movzwl	-228(%rbp), %eax
	cmpw	-252(%rbp), %ax
	jbe	.L28
	movzwl	-230(%rbp), %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L30
	call	__stack_chk_fail@PLT
.L30:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	s_sarch_text, .-s_sarch_text
	.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	"%c"
	.text
	.p2align 4
	.globl	s_scan_sentence
	.type	s_scan_sentence, @function
s_scan_sentence:
.LFB24:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	movl	%esi, %r12d
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	subq	$8, %rsp
	.cfi_def_cfa_offset 48
	testw	%si, %si
	je	.L2
	movq	%rdi, %rbx
	xorl	%ebp, %ebp
	leaq	.LC0(%rip), %r13
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L8:
	addl	$1, %ebp
	addq	$1, %rbx
	cmpw	%bp, %r12w
	je	.L2
.L3:
	xorl	%eax, %eax
	movq	%rbx, %rsi
	movq	%r13, %rdi
	call	__isoc99_scanf@PLT
	cmpb	$10, (%rbx)
	jne	.L8
	movl	%ebp, %r12d
.L2:
	addq	$8, %rsp
	.cfi_def_cfa_offset 40
	movl	%r12d, %eax
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE24:
	.size	s_scan_sentence, .-s_scan_sentence
	.p2align 4
	.globl	s_sarch_text
	.type	s_sarch_text, @function
s_sarch_text:
.LFB25:
	.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
	movq	%rdi, %r13
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	movl	%esi, %r12d
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	movl	%ecx, %ebp
	movl	$25, %ecx
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	movq	%rdx, %rbx
	subq	$224, %rsp
	.cfi_def_cfa_offset 272
	movq	%fs:40, %rax
	movq	%rax, 216(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %r8
	movq	%r8, %rdi
	rep stosq
	xorl	%eax, %eax
	movw	%ax, (%rdi)
	testw	%si, %si
	je	.L12
	movzwl	%si, %r14d
	movq	%r8, %rdi
	movq	%r13, %rsi
	movq	%r14, %rdx
	call	memcpy@PLT
	movq	%r14, %rdx
	movq	%r13, %rsi
	leaq	(%rax,%r14), %rdi
	call	memcpy@PLT
.L12:
	movzwl	%r12w, %r9d
	xorl	%esi, %esi
	xorl	%r8d, %r8d
	movl	$1, %edi
	.p2align 4,,10
	.p2align 3
.L11:
	xorl	%edx, %edx
	.p2align 4,,10
	.p2align 3
.L15:
	movzwl	%dx, %eax
	movzbl	(%rbx,%rax), %ecx
	movzwl	%dx, %eax
	cmpb	$10, %cl
	cmove	%edi, %r8d
	addl	%esi, %eax
	cltq
	cmpb	(%rsp,%rax), %cl
	jne	.L14
	addl	$1, %edx
	cmpw	%dx, %bp
	jnb	.L15
.L14:
	leal	1(%rsi), %eax
	cmpl	%esi, %r9d
	je	.L9
	movl	%eax, %esi
	jmp	.L11
.L9:
	movq	216(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L20
	addq	$224, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	movl	%r8d, %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
.L20:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE25:
	.size	s_sarch_text, .-s_sarch_text
	.section	.rodata.str1.1
.LC1:
	.string	"No"
.LC2:
	.string	"Yes"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movl	$12, %ecx
	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
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	xorl	%ebp, %ebp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$232, %rsp
	.cfi_def_cfa_offset 288
	movq	%fs:40, %rax
	movq	%rax, 216(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %r12
	leaq	112(%rsp), %r13
	movq	%r12, %rdi
	movq	%r12, %rbx
	rep stosq
	movl	$12, %ecx
	movl	$0, (%rdi)
	movb	$0, 4(%rdi)
	movq	%r13, %rdi
	rep stosq
	movl	$0, (%rdi)
	movb	$0, 4(%rdi)
	.p2align 4,,10
	.p2align 3
.L23:
	xorl	%eax, %eax
	movq	%rbx, %rsi
	movq	%r14, %rdi
	call	__isoc99_scanf@PLT
	cmpb	$10, (%rbx)
	je	.L22
	addl	$1, %ebp
	addq	$1, %rbx
	cmpw	$101, %bp
	jne	.L23
.L22:
	movq	%r13, %rbx
	xorl	%r15d, %r15d
	.p2align 4,,10
	.p2align 3
.L25:
	xorl	%eax, %eax
	movq	%rbx, %rsi
	movq	%r14, %rdi
	call	__isoc99_scanf@PLT
	cmpb	$10, (%rbx)
	je	.L24
	addl	$1, %r15d
	addq	$1, %rbx
	cmpw	$101, %r15w
	jne	.L25
.L24:
	movzwl	%r15w, %ecx
	movzwl	%bp, %esi
	movq	%r13, %rdx
	movq	%r12, %rdi
	call	s_sarch_text
	testw	%ax, %ax
	je	.L32
	cmpw	$1, %ax
	je	.L33
.L27:
	movq	216(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L34
	addq	$232, %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
.L32:
	.cfi_restore_state
	leaq	.LC1(%rip), %rdi
	call	puts@PLT
	jmp	.L27
.L33:
	leaq	.LC2(%rip), %rdi
	call	puts@PLT
	jmp	.L27
.L34:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.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	"%c"
	.text
	.p2align 4
	.globl	s_scan_sentence
	.type	s_scan_sentence, @function
s_scan_sentence:
.LFB24:
	.cfi_startproc
	endbr64
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	movl	%esi, %r12d
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	subq	$8, %rsp
	.cfi_def_cfa_offset 48
	testw	%si, %si
	je	.L2
	movq	%rdi, %rbx
	xorl	%ebp, %ebp
	leaq	.LC0(%rip), %r13
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L8:
	addl	$1, %ebp
	addq	$1, %rbx
	cmpw	%bp, %r12w
	je	.L2
.L3:
	xorl	%eax, %eax
	movq	%rbx, %rsi
	movq	%r13, %rdi
	call	__isoc99_scanf@PLT
	cmpb	$10, (%rbx)
	jne	.L8
	movl	%ebp, %r12d
.L2:
	addq	$8, %rsp
	.cfi_def_cfa_offset 40
	movl	%r12d, %eax
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE24:
	.size	s_scan_sentence, .-s_scan_sentence
	.p2align 4
	.globl	s_sarch_text
	.type	s_sarch_text, @function
s_sarch_text:
.LFB25:
	.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
	movq	%rdi, %r13
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	movl	%esi, %r12d
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	movl	%ecx, %ebp
	movl	$25, %ecx
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	movq	%rdx, %rbx
	subq	$224, %rsp
	.cfi_def_cfa_offset 272
	movq	%fs:40, %rax
	movq	%rax, 216(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %r8
	movq	%r8, %rdi
	rep stosq
	xorl	%eax, %eax
	movw	%ax, (%rdi)
	testw	%si, %si
	je	.L12
	movzwl	%si, %r14d
	movq	%r8, %rdi
	movq	%r13, %rsi
	movq	%r14, %rdx
	call	memcpy@PLT
	movq	%r14, %rdx
	movq	%r13, %rsi
	leaq	(%rax,%r14), %rdi
	call	memcpy@PLT
.L12:
	movzwl	%r12w, %r9d
	xorl	%esi, %esi
	xorl	%r8d, %r8d
	movl	$1, %edi
	.p2align 4,,10
	.p2align 3
.L11:
	xorl	%edx, %edx
	.p2align 4,,10
	.p2align 3
.L15:
	movzwl	%dx, %eax
	movzbl	(%rbx,%rax), %ecx
	movzwl	%dx, %eax
	cmpb	$10, %cl
	cmove	%edi, %r8d
	addl	%esi, %eax
	cltq
	cmpb	(%rsp,%rax), %cl
	jne	.L14
	addl	$1, %edx
	cmpw	%dx, %bp
	jnb	.L15
.L14:
	leal	1(%rsi), %eax
	cmpl	%esi, %r9d
	je	.L9
	movl	%eax, %esi
	jmp	.L11
.L9:
	movq	216(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L20
	addq	$224, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	movl	%r8d, %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
.L20:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE25:
	.size	s_sarch_text, .-s_sarch_text
	.section	.rodata.str1.1
.LC1:
	.string	"No"
.LC2:
	.string	"Yes"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movl	$12, %ecx
	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
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	xorl	%ebp, %ebp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$232, %rsp
	.cfi_def_cfa_offset 288
	movq	%fs:40, %rax
	movq	%rax, 216(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %r12
	leaq	112(%rsp), %r13
	movq	%r12, %rdi
	movq	%r12, %rbx
	rep stosq
	movl	$12, %ecx
	movl	$0, (%rdi)
	movb	$0, 4(%rdi)
	movq	%r13, %rdi
	rep stosq
	movl	$0, (%rdi)
	movb	$0, 4(%rdi)
	.p2align 4,,10
	.p2align 3
.L23:
	xorl	%eax, %eax
	movq	%rbx, %rsi
	movq	%r14, %rdi
	call	__isoc99_scanf@PLT
	cmpb	$10, (%rbx)
	je	.L22
	addl	$1, %ebp
	addq	$1, %rbx
	cmpw	$101, %bp
	jne	.L23
.L22:
	movq	%r13, %rbx
	xorl	%r15d, %r15d
	.p2align 4,,10
	.p2align 3
.L25:
	xorl	%eax, %eax
	movq	%rbx, %rsi
	movq	%r14, %rdi
	call	__isoc99_scanf@PLT
	cmpb	$10, (%rbx)
	je	.L24
	addl	$1, %r15d
	addq	$1, %rbx
	cmpw	$101, %r15w
	jne	.L25
.L24:
	movzwl	%r15w, %ecx
	movzwl	%bp, %esi
	movq	%r13, %rdx
	movq	%r12, %rdi
	call	s_sarch_text
	testw	%ax, %ax
	je	.L32
	cmpw	$1, %ax
	je	.L33
.L27:
	movq	216(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L34
	addq	$232, %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
.L32:
	.cfi_restore_state
	leaq	.LC1(%rip), %rdi
	call	puts@PLT
	jmp	.L27
.L33:
	leaq	.LC2(%rip), %rdi
	call	puts@PLT
	jmp	.L27
.L34:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.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>

#define STRING_MAX 101

#define TEICE 2

#define FRG_OFF 0

#define FRG_ON 1

#define ARRAY_RESET 0

#define LOOP_RESET 0

#define COUNT_RESET 0

#define RETURN 0

unsigned short s_scan_sentence(unsigned char * str, unsigned short length_max);

unsigned short s_sarch_text(unsigned char * ring, unsigned short r_length, unsigned char * look, unsigned short l_length);

int main(){

        unsigned char ubW_D_ring_text[STRING_MAX];        /* 検索元文字列の配列 */

        unsigned char ubW_D_look_text[STRING_MAX];        /* 検索文字列の配列 */

        unsigned short usW_D_ring_length;                 /* 検索元文字列の長さ */

        unsigned short usW_D_look_length;                 /* 検索文字列の長さ */

        unsigned short usW_F_frg_main = FRG_OFF;          /* 一致フラグ */

        unsigned short usW_C_i;                           /* ループ変数 */

        

        /* 配列の初期化 */

        for(usW_C_i = LOOP_RESET;usW_C_i < STRING_MAX;usW_C_i++){

                ubW_D_ring_text[usW_C_i] = ARRAY_RESET;

                ubW_D_look_text[usW_C_i] = ARRAY_RESET;

        }

        

        /* 検索元文字列の入力 */

        usW_D_ring_length = s_scan_sentence(ubW_D_ring_text, STRING_MAX);

        /* 検索文字列の入力 */

        usW_D_look_length = s_scan_sentence(ubW_D_look_text, STRING_MAX);

        

        /* 文字列の検索 */

        usW_F_frg_main = s_sarch_text(ubW_D_ring_text, usW_D_ring_length, ubW_D_look_text, usW_D_look_length);

        

        /* フラグが0の場合Noを、1の場合Yesを出力 */

        if(usW_F_frg_main == FRG_OFF){

                printf("No\n");

        }

        else if(usW_F_frg_main == FRG_ON){

                printf("Yes\n");

        }

        

        return RETURN;

}

/* 関数名：文字列入力 */

/* 概要：文字列を入力する。その長さを返す */

/* 引数：文字列を格納する配列の先頭アドレス、その配列の大きさ */

/* 戻り値：入力された文字列の長さ */

unsigned short s_scan_sentence(unsigned char * str, unsigned short length_max)

{

        unsigned short usW_C_count_text = COUNT_RESET;          /* 文字列長カウンタ */

        unsigned short usW_C_i;                                 /* ループ変数 */

        /* 文字列の入力 */

        for(usW_C_i = LOOP_RESET;usW_C_i < length_max;usW_C_i++){

                scanf("%c", str + usW_C_i);

                /* 入力終了の処理 */

                if(*(str + usW_C_i) == '\n'){

                        break;

                }

                /* 文字数をカウント */

                usW_C_count_text++;

        }

        /* 文字列長を返す */

        return usW_C_count_text;

}

/* 関数名：文字列走査 */

/* 概要：文字列を二つ受け取り一つ目の文字列に二つ目の文字列が含まれいるか調べる */

/* 引数：調べられる文字列、その長さ、調べる文字列、その文字列 */

/* 戻り値：調べた結果の一致、不一致を表すフラグ */

unsigned short s_sarch_text(unsigned char * ring, unsigned short r_length, unsigned char * look, unsigned short l_length)

{

        unsigned char twi_ring[STRING_MAX * TEICE];         /* 円状の文字列を再現する配列 */

        unsigned short usW_F_frg_match = FRG_OFF;           /* 一致フラグ */

        unsigned short usW_C_i, usW_C_j;                    /* ループ変数 */

        

        /* 配列を初期化 */

        for(usW_C_i = LOOP_RESET;usW_C_i < (STRING_MAX * TEICE);usW_C_i++){

                twi_ring[usW_C_i] = ARRAY_RESET;

        }

        

        /* 円状の文字列を再現 */

        /* 円状の文字列に検索元文字列を代入 */

        for(usW_C_i = LOOP_RESET;usW_C_i < r_length;usW_C_i++){

                twi_ring[usW_C_i] = *(ring + usW_C_i);

        }

        /* 円状の文字列の続きに検索元文字列を代入 */

        for(usW_C_i = LOOP_RESET;usW_C_i < r_length;usW_C_i++){

                twi_ring[r_length + usW_C_i] = *(ring + usW_C_i);

        }

        /* 円状の文字列を再現 ここまで */

        

        /* 文字列の検索 */

        /* 円状の文字列の始点をずらしながら検索 */

        for(usW_C_i = LOOP_RESET;usW_C_i <= r_length;usW_C_i++){

                /* 文字列の合致を一文字ずつ照合 */

                for(usW_C_j = LOOP_RESET;usW_C_j <= l_length;usW_C_j++){

                        /* 検索する文字列が終端であればフラグを1に */

                        if(*(look + usW_C_j) == '\n'){

                                usW_F_frg_match = FRG_ON;

                        }

                        /* 二つの文字列の対象の文字が一致していなければループを抜ける */

                        if(twi_ring[usW_C_i + usW_C_j] != *(look + usW_C_j)){

                                break;

                        }

                }

        }

        /* 文字列の検索 ここまで */

        

        /* フラグの値を返す */

        return usW_F_frg_match;

}


vanceknowledgetoad
edvanca
 vanceknowledgetoad
bdvanced
 vanceknowledgetoad
edvamca
 vanceknowledgetoad
cdvanced
 daotegdelwonkecnav
edvamca
 vanceknowmedgetoad
cdvanced
 daotegdelwonkecnav
advamce
 vbnceknowmedgetoad
cdvanced
 daovegdelwonkecnat
advamce
 vbnceknowledgetoad
cdvanced

No
 No
 No
 No
 No
 No
 No
 No
 No
 No

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>

#define STRING_MAX 101

#define TEICE 2

#define FRG_OFF 0

#define FRG_ON 1

#define ARRAY_RESET 0

#define LOOP_RESET 0

#define COUNT_RESET 0

#define RETURN 0

unsigned short s_scan_sentence(unsigned char * str, unsigned short length_max);

unsigned short s_sarch_text(unsigned char * ring, unsigned short r_length, unsigned char * look, unsigned short l_length);

int main(){

        unsigned char ubW_D_ring_text[STRING_MAX];        /* 検索元文字列の配列 */

        unsigned char ubW_D_look_text[STRING_MAX];        /* 検索文字列の配列 */

        unsigned short usW_D_ring_length;                 /* 検索元文字列の長さ */

        unsigned short usW_D_look_length;                 /* 検索文字列の長さ */

        unsigned short usW_F_frg_main = FRG_OFF;          /* 一致フラグ */

        unsigned short usW_C_i;                           /* ループ変数 */

        

        /* 配列の初期化 */

        for(usW_C_i = LOOP_RESET;usW_C_i < STRING_MAX;usW_C_i++){

                ubW_D_ring_text[usW_C_i] = ARRAY_RESET;

                ubW_D_look_text[usW_C_i] = ARRAY_RESET;

        }

        

        /* 検索元文字列の入力 */

        usW_D_ring_length = s_scan_sentence(ubW_D_ring_text, STRING_MAX);

        /* 検索文字列の入力 */

        usW_D_look_length = s_scan_sentence(ubW_D_look_text, STRING_MAX);

        

        /* 文字列の検索 */

        usW_F_frg_main = s_sarch_text(ubW_D_ring_text, usW_D_ring_length, ubW_D_look_text, usW_D_look_length);

        

        /* フラグが0の場合Noを、1の場合Yesを出力 */

        if(usW_F_frg_main == FRG_OFF){

                printf("No\n");

        }

        else if(usW_F_frg_main == FRG_ON){

                printf("Yes\n");

        }

        

        return RETURN;

}

/* 関数名：文字列入力 */

/* 概要：文字列を入力する。その長さを返す */

/* 引数：文字列を格納する配列の先頭アドレス、その配列の大きさ */

/* 戻り値：入力された文字列の長さ */

unsigned short s_scan_sentence(unsigned char * str, unsigned short length_max)

{

        unsigned short usW_C_count_text = COUNT_RESET;          /* 文字列長カウンタ */

        unsigned short usW_C_i;                                 /* ループ変数 */

        /* 文字列の入力 */

        for(usW_C_i = LOOP_RESET;usW_C_i < length_max;usW_C_i++){

                scanf("%c", str + usW_C_i);

                /* 入力終了の処理 */

                if(*(str + usW_C_i) == '\n'){

                        break;

                }

                /* 文字数をカウント */

                usW_C_count_text++;

        }

        /* 文字列長を返す */

        return usW_C_count_text;

}

/* 関数名：文字列走査 */

/* 概要：文字列を二つ受け取り一つ目の文字列に二つ目の文字列が含まれいるか調べる */

/* 引数：調べられる文字列、その長さ、調べる文字列、その文字列 */

/* 戻り値：調べた結果の一致、不一致を表すフラグ */

unsigned short s_sarch_text(unsigned char * ring, unsigned short r_length, unsigned char * look, unsigned short l_length)

{

        unsigned char twi_ring[STRING_MAX * TEICE];         /* 円状の文字列を再現する配列 */

        unsigned short usW_F_frg_match = FRG_OFF;           /* 一致フラグ */

        unsigned short usW_C_i, usW_C_j;                    /* ループ変数 */

        

        /* 配列を初期化 */

        for(usW_C_i = LOOP_RESET;usW_C_i < (STRING_MAX * TEICE);usW_C_i++){

                twi_ring[usW_C_i] = ARRAY_RESET;

        }

        

        /* 円状の文字列を再現 */

        /* 円状の文字列に検索元文字列を代入 */

        for(usW_C_i = LOOP_RESET;usW_C_i < r_length;usW_C_i++){

                twi_ring[usW_C_i] = *(ring + usW_C_i);

        }

        /* 円状の文字列の続きに検索元文字列を代入 */

        for(usW_C_i = LOOP_RESET;usW_C_i < r_length;usW_C_i++){

                twi_ring[r_length + usW_C_i] = *(ring + usW_C_i);

        }

        /* 円状の文字列を再現 ここまで */

        

        /* 文字列の検索 */

        /* 円状の文字列の始点をずらしながら検索 */

        for(usW_C_i = LOOP_RESET;usW_C_i <= r_length;usW_C_i++){

                /* 文字列の合致を一文字ずつ照合 */

                for(usW_C_j = LOOP_RESET;usW_C_j <= l_length;usW_C_j++){

                        /* 検索する文字列が終端であればフラグを1に */

                        if(*(look + usW_C_j) == '\n'){

                                usW_F_frg_match = FRG_ON;

                        }

                        /* 二つの文字列の対象の文字が一致していなければループを抜ける */

                        if(twi_ring[usW_C_i + usW_C_j] != *(look + usW_C_j)){

                                break;

                        }

                }

        }

        /* 文字列の検索 ここまで */

        

        /* フラグの値を返す */

        return usW_F_frg_match;

}

```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"No"
.LC1:
	.string	"Yes"
	.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	$240, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movw	$0, -230(%rbp)
	movw	$0, -232(%rbp)
	jmp	.L2
.L3:
	movzwl	-232(%rbp), %eax
	cltq
	movb	$0, -224(%rbp,%rax)
	movzwl	-232(%rbp), %eax
	cltq
	movb	$0, -112(%rbp,%rax)
	movzwl	-232(%rbp), %eax
	addl	$1, %eax
	movw	%ax, -232(%rbp)
.L2:
	cmpw	$100, -232(%rbp)
	jbe	.L3
	leaq	-224(%rbp), %rax
	movl	$101, %esi
	movq	%rax, %rdi
	call	s_scan_sentence
	movw	%ax, -228(%rbp)
	leaq	-112(%rbp), %rax
	movl	$101, %esi
	movq	%rax, %rdi
	call	s_scan_sentence
	movw	%ax, -226(%rbp)
	movzwl	-226(%rbp), %ecx
	movzwl	-228(%rbp), %esi
	leaq	-112(%rbp), %rdx
	leaq	-224(%rbp), %rax
	movq	%rax, %rdi
	call	s_sarch_text
	movw	%ax, -230(%rbp)
	cmpw	$0, -230(%rbp)
	jne	.L4
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L5
.L4:
	cmpw	$1, -230(%rbp)
	jne	.L5
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
.L5:
	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
	.section	.rodata
.LC2:
	.string	"%c"
	.text
	.globl	s_scan_sentence
	.type	s_scan_sentence, @function
s_scan_sentence:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movq	%rdi, -24(%rbp)
	movl	%esi, %eax
	movw	%ax, -28(%rbp)
	movw	$0, -4(%rbp)
	movw	$0, -2(%rbp)
	jmp	.L9
.L12:
	movzwl	-2(%rbp), %edx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movzwl	-2(%rbp), %edx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	cmpb	$10, %al
	je	.L14
	movzwl	-4(%rbp), %eax
	addl	$1, %eax
	movw	%ax, -4(%rbp)
	movzwl	-2(%rbp), %eax
	addl	$1, %eax
	movw	%ax, -2(%rbp)
.L9:
	movzwl	-2(%rbp), %eax
	cmpw	-28(%rbp), %ax
	jb	.L12
	jmp	.L11
.L14:
	nop
.L11:
	movzwl	-4(%rbp), %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	s_scan_sentence, .-s_scan_sentence
	.globl	s_sarch_text
	.type	s_sarch_text, @function
s_sarch_text:
.LFB2:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$272, %rsp
	movq	%rdi, -248(%rbp)
	movq	%rdx, -264(%rbp)
	movl	%ecx, %eax
	movl	%esi, %edx
	movw	%dx, -252(%rbp)
	movw	%ax, -256(%rbp)
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movw	$0, -230(%rbp)
	movw	$0, -228(%rbp)
	jmp	.L16
.L17:
	movzwl	-228(%rbp), %eax
	cltq
	movb	$0, -224(%rbp,%rax)
	movzwl	-228(%rbp), %eax
	addl	$1, %eax
	movw	%ax, -228(%rbp)
.L16:
	cmpw	$201, -228(%rbp)
	jbe	.L17
	movw	$0, -228(%rbp)
	jmp	.L18
.L19:
	movzwl	-228(%rbp), %edx
	movq	-248(%rbp), %rax
	addq	%rax, %rdx
	movzwl	-228(%rbp), %eax
	movzbl	(%rdx), %edx
	cltq
	movb	%dl, -224(%rbp,%rax)
	movzwl	-228(%rbp), %eax
	addl	$1, %eax
	movw	%ax, -228(%rbp)
.L18:
	movzwl	-228(%rbp), %eax
	cmpw	-252(%rbp), %ax
	jb	.L19
	movw	$0, -228(%rbp)
	jmp	.L20
.L21:
	movzwl	-228(%rbp), %edx
	movq	-248(%rbp), %rax
	addq	%rdx, %rax
	movzwl	-252(%rbp), %ecx
	movzwl	-228(%rbp), %edx
	addl	%edx, %ecx
	movzbl	(%rax), %edx
	movslq	%ecx, %rax
	movb	%dl, -224(%rbp,%rax)
	movzwl	-228(%rbp), %eax
	addl	$1, %eax
	movw	%ax, -228(%rbp)
.L20:
	movzwl	-228(%rbp), %eax
	cmpw	-252(%rbp), %ax
	jb	.L21
	movw	$0, -228(%rbp)
	jmp	.L22
.L28:
	movw	$0, -226(%rbp)
	jmp	.L23
.L27:
	movzwl	-226(%rbp), %edx
	movq	-264(%rbp), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	cmpb	$10, %al
	jne	.L24
	movw	$1, -230(%rbp)
.L24:
	movzwl	-228(%rbp), %edx
	movzwl	-226(%rbp), %eax
	addl	%edx, %eax
	cltq
	movzbl	-224(%rbp,%rax), %edx
	movzwl	-226(%rbp), %ecx
	movq	-264(%rbp), %rax
	addq	%rcx, %rax
	movzbl	(%rax), %eax
	cmpb	%al, %dl
	jne	.L31
	movzwl	-226(%rbp), %eax
	addl	$1, %eax
	movw	%ax, -226(%rbp)
.L23:
	movzwl	-226(%rbp), %eax
	cmpw	-256(%rbp), %ax
	jbe	.L27
	jmp	.L26
.L31:
	nop
.L26:
	movzwl	-228(%rbp), %eax
	addl	$1, %eax
	movw	%ax, -228(%rbp)
.L22:
	movzwl	-228(%rbp), %eax
	cmpw	-252(%rbp), %ax
	jbe	.L28
	movzwl	-230(%rbp), %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L30
	call	__stack_chk_fail@PLT
.L30:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	s_sarch_text, .-s_sarch_text
	.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	"No"
.LC1:
	.string	"Yes"
	.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	$240, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movw	$0, -230(%rbp)
	movw	$0, -232(%rbp)
	jmp	.L2
.L3:
	movzwl	-232(%rbp), %eax
	cltq
	movb	$0, -224(%rbp,%rax)
	movzwl	-232(%rbp), %eax
	cltq
	movb	$0, -112(%rbp,%rax)
	movzwl	-232(%rbp), %eax
	addl	$1, %eax
	movw	%ax, -232(%rbp)
.L2:
	cmpw	$100, -232(%rbp)
	jbe	.L3
	leaq	-224(%rbp), %rax
	movl	$101, %esi
	movq	%rax, %rdi
	call	s_scan_sentence
	movw	%ax, -228(%rbp)
	leaq	-112(%rbp), %rax
	movl	$101, %esi
	movq	%rax, %rdi
	call	s_scan_sentence
	movw	%ax, -226(%rbp)
	movzwl	-226(%rbp), %ecx
	movzwl	-228(%rbp), %esi
	leaq	-112(%rbp), %rdx
	leaq	-224(%rbp), %rax
	movq	%rax, %rdi
	call	s_sarch_text
	movw	%ax, -230(%rbp)
	cmpw	$0, -230(%rbp)
	jne	.L4
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L5
.L4:
	cmpw	$1, -230(%rbp)
	jne	.L5
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
.L5:
	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
	.section	.rodata
.LC2:
	.string	"%c"
	.text
	.globl	s_scan_sentence
	.type	s_scan_sentence, @function
s_scan_sentence:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movq	%rdi, -24(%rbp)
	movl	%esi, %eax
	movw	%ax, -28(%rbp)
	movw	$0, -4(%rbp)
	movw	$0, -2(%rbp)
	jmp	.L9
.L12:
	movzwl	-2(%rbp), %edx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movzwl	-2(%rbp), %edx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	cmpb	$10, %al
	je	.L14
	movzwl	-4(%rbp), %eax
	addl	$1, %eax
	movw	%ax, -4(%rbp)
	movzwl	-2(%rbp), %eax
	addl	$1, %eax
	movw	%ax, -2(%rbp)
.L9:
	movzwl	-2(%rbp), %eax
	cmpw	-28(%rbp), %ax
	jb	.L12
	jmp	.L11
.L14:
	nop
.L11:
	movzwl	-4(%rbp), %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	s_scan_sentence, .-s_scan_sentence
	.globl	s_sarch_text
	.type	s_sarch_text, @function
s_sarch_text:
.LFB2:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$272, %rsp
	movq	%rdi, -248(%rbp)
	movq	%rdx, -264(%rbp)
	movl	%ecx, %eax
	movl	%esi, %edx
	movw	%dx, -252(%rbp)
	movw	%ax, -256(%rbp)
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movw	$0, -230(%rbp)
	movw	$0, -228(%rbp)
	jmp	.L16
.L17:
	movzwl	-228(%rbp), %eax
	cltq
	movb	$0, -224(%rbp,%rax)
	movzwl	-228(%rbp), %eax
	addl	$1, %eax
	movw	%ax, -228(%rbp)
.L16:
	cmpw	$201, -228(%rbp)
	jbe	.L17
	movw	$0, -228(%rbp)
	jmp	.L18
.L19:
	movzwl	-228(%rbp), %edx
	movq	-248(%rbp), %rax
	addq	%rax, %rdx
	movzwl	-228(%rbp), %eax
	movzbl	(%rdx), %edx
	cltq
	movb	%dl, -224(%rbp,%rax)
	movzwl	-228(%rbp), %eax
	addl	$1, %eax
	movw	%ax, -228(%rbp)
.L18:
	movzwl	-228(%rbp), %eax
	cmpw	-252(%rbp), %ax
	jb	.L19
	movw	$0, -228(%rbp)
	jmp	.L20
.L21:
	movzwl	-228(%rbp), %edx
	movq	-248(%rbp), %rax
	addq	%rdx, %rax
	movzwl	-252(%rbp), %ecx
	movzwl	-228(%rbp), %edx
	addl	%edx, %ecx
	movzbl	(%rax), %edx
	movslq	%ecx, %rax
	movb	%dl, -224(%rbp,%rax)
	movzwl	-228(%rbp), %eax
	addl	$1, %eax
	movw	%ax, -228(%rbp)
.L20:
	movzwl	-228(%rbp), %eax
	cmpw	-252(%rbp), %ax
	jb	.L21
	movw	$0, -228(%rbp)
	jmp	.L22
.L28:
	movw	$0, -226(%rbp)
	jmp	.L23
.L27:
	movzwl	-226(%rbp), %edx
	movq	-264(%rbp), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	cmpb	$10, %al
	jne	.L24
	movw	$1, -230(%rbp)
.L24:
	movzwl	-228(%rbp), %edx
	movzwl	-226(%rbp), %eax
	addl	%edx, %eax
	cltq
	movzbl	-224(%rbp,%rax), %edx
	movzwl	-226(%rbp), %ecx
	movq	-264(%rbp), %rax
	addq	%rcx, %rax
	movzbl	(%rax), %eax
	cmpb	%al, %dl
	jne	.L31
	movzwl	-226(%rbp), %eax
	addl	$1, %eax
	movw	%ax, -226(%rbp)
.L23:
	movzwl	-226(%rbp), %eax
	cmpw	-256(%rbp), %ax
	jbe	.L27
	jmp	.L26
.L31:
	nop
.L26:
	movzwl	-228(%rbp), %eax
	addl	$1, %eax
	movw	%ax, -228(%rbp)
.L22:
	movzwl	-228(%rbp), %eax
	cmpw	-252(%rbp), %ax
	jbe	.L28
	movzwl	-230(%rbp), %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L30
	call	__stack_chk_fail@PLT
.L30:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	s_sarch_text, .-s_sarch_text
	.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:
