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>

int main(void){
  char s[101],p[101];
  int i,j,sn=0,pn=0,t;

  scanf("%s %s",s,p);

  while(s[sn] != '\0') sn++;
  while(p[pn] != '\0') pn++;

  for(i=0;i<sn;i++){
    t=1;
    for(j=0;j<pn;j++)
      if(s[(i+j)%sn] != p[j]) t=0;
    if(t) break;
  }
  if( t )
    printf("Yes\n");
  else
    printf("No\n");

  return 0;
}
  
      

```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%s %s"
.LC1:
	.string	"Yes"
.LC2:
	.string	"No"
	.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	$256, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -236(%rbp)
	movl	$0, -232(%rbp)
	leaq	-112(%rbp), %rdx
	leaq	-224(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	jmp	.L2
.L3:
	addl	$1, -236(%rbp)
.L2:
	movl	-236(%rbp), %eax
	cltq
	movzbl	-224(%rbp,%rax), %eax
	testb	%al, %al
	jne	.L3
	jmp	.L4
.L5:
	addl	$1, -232(%rbp)
.L4:
	movl	-232(%rbp), %eax
	cltq
	movzbl	-112(%rbp,%rax), %eax
	testb	%al, %al
	jne	.L5
	movl	$0, -244(%rbp)
	jmp	.L6
.L12:
	movl	$1, -228(%rbp)
	movl	$0, -240(%rbp)
	jmp	.L7
.L9:
	movl	-244(%rbp), %edx
	movl	-240(%rbp), %eax
	addl	%edx, %eax
	cltd
	idivl	-236(%rbp)
	movl	%edx, %eax
	cltq
	movzbl	-224(%rbp,%rax), %edx
	movl	-240(%rbp), %eax
	cltq
	movzbl	-112(%rbp,%rax), %eax
	cmpb	%al, %dl
	je	.L8
	movl	$0, -228(%rbp)
.L8:
	addl	$1, -240(%rbp)
.L7:
	movl	-240(%rbp), %eax
	cmpl	-232(%rbp), %eax
	jl	.L9
	cmpl	$0, -228(%rbp)
	jne	.L17
	addl	$1, -244(%rbp)
.L6:
	movl	-244(%rbp), %eax
	cmpl	-236(%rbp), %eax
	jl	.L12
	jmp	.L11
.L17:
	nop
.L11:
	cmpl	$0, -228(%rbp)
	je	.L13
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L14
.L13:
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
.L14:
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L16
	call	__stack_chk_fail@PLT
.L16:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
```

Only output the optimized assembly code. Do not include any other text. Do not write any comments in the assembly code. Wrap the assembly code in ```assembly``` tags.
user
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%s %s"
.LC1:
	.string	"Yes"
.LC2:
	.string	"No"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	leaq	.LC0(%rip), %rdi
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	subq	$232, %rsp
	.cfi_def_cfa_offset 256
	movq	%fs:40, %rax
	movq	%rax, 216(%rsp)
	xorl	%eax, %eax
	leaq	112(%rsp), %rbx
	movq	%rsp, %rsi
	movq	%rbx, %rdx
	call	__isoc99_scanf@PLT
	cmpb	$0, (%rsp)
	je	.L2
	movl	$1, %eax
	leaq	-1(%rsp), %rdx
	.p2align 4,,10
	.p2align 3
.L3:
	movl	%eax, %esi
	addq	$1, %rax
	cmpb	$0, (%rdx,%rax)
	jne	.L3
	cmpb	$0, 112(%rsp)
	je	.L17
.L5:
	movl	$1, %eax
	leaq	111(%rsp), %rdx
	.p2align 4,,10
	.p2align 3
.L8:
	movl	%eax, %r11d
	addq	$1, %rax
	cmpb	$0, (%rdx,%rax)
	jne	.L8
	testl	%esi, %esi
	je	.L6
.L7:
	movl	%ebx, %r8d
	leal	-1(%r11), %eax
	xorl	%ebp, %ebp
	xorl	%r9d, %r9d
	negl	%r8d
	leaq	1(%rbx,%rax), %r10
	.p2align 4,,10
	.p2align 3
.L12:
	testl	%r11d, %r11d
	je	.L11
	movq	%rbx, %rcx
	movl	$1, %edi
	.p2align 4,,10
	.p2align 3
.L10:
	leal	(%r8,%rcx), %eax
	cltd
	idivl	%esi
	movslq	%edx, %rdx
	movzbl	(%rsp,%rdx), %eax
	cmpb	%al, (%rcx)
	cmovne	%r9d, %edi
	addq	$1, %rcx
	cmpq	%r10, %rcx
	jne	.L10
	testl	%edi, %edi
	jne	.L11
	addl	$1, %ebp
	addl	$1, %r8d
	cmpl	%ebp, %esi
	jg	.L12
.L6:
	leaq	.LC2(%rip), %rdi
	call	puts@PLT
.L14:
	movq	216(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L26
	addq	$232, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
.L11:
	.cfi_restore_state
	leaq	.LC1(%rip), %rdi
	call	puts@PLT
	jmp	.L14
.L2:
	xorl	%esi, %esi
	cmpb	$0, 112(%rsp)
	jne	.L5
	jmp	.L6
.L17:
	xorl	%r11d, %r11d
	jmp	.L7
.L26:
	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	"%s %s"
.LC1:
	.string	"Yes"
.LC2:
	.string	"No"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	leaq	.LC0(%rip), %rdi
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	subq	$232, %rsp
	.cfi_def_cfa_offset 256
	movq	%fs:40, %rax
	movq	%rax, 216(%rsp)
	xorl	%eax, %eax
	leaq	112(%rsp), %rbx
	movq	%rsp, %rsi
	movq	%rbx, %rdx
	call	__isoc99_scanf@PLT
	cmpb	$0, (%rsp)
	je	.L2
	movl	$1, %eax
	leaq	-1(%rsp), %rdx
	.p2align 4,,10
	.p2align 3
.L3:
	movl	%eax, %esi
	addq	$1, %rax
	cmpb	$0, (%rdx,%rax)
	jne	.L3
	cmpb	$0, 112(%rsp)
	je	.L17
.L5:
	movl	$1, %eax
	leaq	111(%rsp), %rdx
	.p2align 4,,10
	.p2align 3
.L8:
	movl	%eax, %r11d
	addq	$1, %rax
	cmpb	$0, (%rdx,%rax)
	jne	.L8
	testl	%esi, %esi
	je	.L6
.L7:
	movl	%ebx, %r8d
	leal	-1(%r11), %eax
	xorl	%ebp, %ebp
	xorl	%r9d, %r9d
	negl	%r8d
	leaq	1(%rbx,%rax), %r10
	.p2align 4,,10
	.p2align 3
.L12:
	testl	%r11d, %r11d
	je	.L11
	movq	%rbx, %rcx
	movl	$1, %edi
	.p2align 4,,10
	.p2align 3
.L10:
	leal	(%r8,%rcx), %eax
	cltd
	idivl	%esi
	movslq	%edx, %rdx
	movzbl	(%rsp,%rdx), %eax
	cmpb	%al, (%rcx)
	cmovne	%r9d, %edi
	addq	$1, %rcx
	cmpq	%r10, %rcx
	jne	.L10
	testl	%edi, %edi
	jne	.L11
	addl	$1, %ebp
	addl	$1, %r8d
	cmpl	%ebp, %esi
	jg	.L12
.L6:
	leaq	.LC2(%rip), %rdi
	call	puts@PLT
.L14:
	movq	216(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L26
	addq	$232, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
.L11:
	.cfi_restore_state
	leaq	.LC1(%rip), %rdi
	call	puts@PLT
	jmp	.L14
.L2:
	xorl	%esi, %esi
	cmpb	$0, 112(%rsp)
	jne	.L5
	jmp	.L6
.L17:
	xorl	%r11d, %r11d
	jmp	.L7
.L26:
	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>

int main(void){
  char s[101],p[101];
  int i,j,sn=0,pn=0,t;

  scanf("%s %s",s,p);

  while(s[sn] != '\0') sn++;
  while(p[pn] != '\0') pn++;

  for(i=0;i<sn;i++){
    t=1;
    for(j=0;j<pn;j++)
      if(s[(i+j)%sn] != p[j]) t=0;
    if(t) break;
  }
  if( t )
    printf("Yes\n");
  else
    printf("No\n");

  return 0;
}
  
      


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>

int main(void){
  char s[101],p[101];
  int i,j,sn=0,pn=0,t;

  scanf("%s %s",s,p);

  while(s[sn] != '\0') sn++;
  while(p[pn] != '\0') pn++;

  for(i=0;i<sn;i++){
    t=1;
    for(j=0;j<pn;j++)
      if(s[(i+j)%sn] != p[j]) t=0;
    if(t) break;
  }
  if( t )
    printf("Yes\n");
  else
    printf("No\n");

  return 0;
}
  
      

```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%s %s"
.LC1:
	.string	"Yes"
.LC2:
	.string	"No"
	.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	$256, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -236(%rbp)
	movl	$0, -232(%rbp)
	leaq	-112(%rbp), %rdx
	leaq	-224(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	jmp	.L2
.L3:
	addl	$1, -236(%rbp)
.L2:
	movl	-236(%rbp), %eax
	cltq
	movzbl	-224(%rbp,%rax), %eax
	testb	%al, %al
	jne	.L3
	jmp	.L4
.L5:
	addl	$1, -232(%rbp)
.L4:
	movl	-232(%rbp), %eax
	cltq
	movzbl	-112(%rbp,%rax), %eax
	testb	%al, %al
	jne	.L5
	movl	$0, -244(%rbp)
	jmp	.L6
.L12:
	movl	$1, -228(%rbp)
	movl	$0, -240(%rbp)
	jmp	.L7
.L9:
	movl	-244(%rbp), %edx
	movl	-240(%rbp), %eax
	addl	%edx, %eax
	cltd
	idivl	-236(%rbp)
	movl	%edx, %eax
	cltq
	movzbl	-224(%rbp,%rax), %edx
	movl	-240(%rbp), %eax
	cltq
	movzbl	-112(%rbp,%rax), %eax
	cmpb	%al, %dl
	je	.L8
	movl	$0, -228(%rbp)
.L8:
	addl	$1, -240(%rbp)
.L7:
	movl	-240(%rbp), %eax
	cmpl	-232(%rbp), %eax
	jl	.L9
	cmpl	$0, -228(%rbp)
	jne	.L17
	addl	$1, -244(%rbp)
.L6:
	movl	-244(%rbp), %eax
	cmpl	-236(%rbp), %eax
	jl	.L12
	jmp	.L11
.L17:
	nop
.L11:
	cmpl	$0, -228(%rbp)
	je	.L13
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L14
.L13:
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
.L14:
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L16
	call	__stack_chk_fail@PLT
.L16:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
```

Only output the optimized assembly code. Do not include any other text. Do not write any comments in the assembly code. Wrap the assembly code in ```assembly``` tags.
train
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%s %s"
.LC1:
	.string	"Yes"
.LC2:
	.string	"No"
	.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	$256, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -236(%rbp)
	movl	$0, -232(%rbp)
	leaq	-112(%rbp), %rdx
	leaq	-224(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	jmp	.L2
.L3:
	addl	$1, -236(%rbp)
.L2:
	movl	-236(%rbp), %eax
	cltq
	movzbl	-224(%rbp,%rax), %eax
	testb	%al, %al
	jne	.L3
	jmp	.L4
.L5:
	addl	$1, -232(%rbp)
.L4:
	movl	-232(%rbp), %eax
	cltq
	movzbl	-112(%rbp,%rax), %eax
	testb	%al, %al
	jne	.L5
	movl	$0, -244(%rbp)
	jmp	.L6
.L12:
	movl	$1, -228(%rbp)
	movl	$0, -240(%rbp)
	jmp	.L7
.L9:
	movl	-244(%rbp), %edx
	movl	-240(%rbp), %eax
	addl	%edx, %eax
	cltd
	idivl	-236(%rbp)
	movl	%edx, %eax
	cltq
	movzbl	-224(%rbp,%rax), %edx
	movl	-240(%rbp), %eax
	cltq
	movzbl	-112(%rbp,%rax), %eax
	cmpb	%al, %dl
	je	.L8
	movl	$0, -228(%rbp)
.L8:
	addl	$1, -240(%rbp)
.L7:
	movl	-240(%rbp), %eax
	cmpl	-232(%rbp), %eax
	jl	.L9
	cmpl	$0, -228(%rbp)
	jne	.L17
	addl	$1, -244(%rbp)
.L6:
	movl	-244(%rbp), %eax
	cmpl	-236(%rbp), %eax
	jl	.L12
	jmp	.L11
.L17:
	nop
.L11:
	cmpl	$0, -228(%rbp)
	je	.L13
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L14
.L13:
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
.L14:
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L16
	call	__stack_chk_fail@PLT
.L16:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
