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 main(){
	int N;
	scanf("%d",&N);
	char target[25];
	scanf("%s",target);
	char kanban[N][100];
	int i,j,k,l;
	for(i=0;i<N;i++){
		scanf("%s",kanban[i]);
	}
	int tar=strlen(target);//目標の文字数
	int ans=0;
	int flag=0;
	int breakflag=0;
	for(i=0;i<N;i++){//i:何番目の看板かを指す
		flag=0;
		breakflag=0;
		int moji=strlen(kanban[i]);
		for(j=0;j<moji-2;j++){//j:元の看板の何文字目かを指す
			if(target[0]==kanban[i][j]){/*最初の文字を探す*/
				for(k=1;k<49;k++){//k:文字と文字の間隔を指す
					flag=1;
					for(l=1;l<tar;l++){
						if(j+(k*l)>99){
							flag=0;
							break;//過剰アクセス防止
						}
						if(target[l]!=kanban[i][j+(k*l)]){//その後もあっているかを調べる
							flag=0;
							break;
						}
					}
					if(flag==1){
						ans++;
						breakflag=1;
						break;
					}
				}
			}
			if(breakflag==1){
				break;
			}
		}
	}
	printf("%d\n",ans);
	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%s"
.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
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$120, %rsp
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	movq	%rsp, %rax
	movq	%rax, %rbx
	leaq	-152(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-96(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-152(%rbp), %ecx
	movslq	%ecx, %rax
	subq	$1, %rax
	movq	%rax, -112(%rbp)
	movslq	%ecx, %rax
	movq	%rax, %r14
	movl	$0, %r15d
	imulq	$800, %r15, %rdx
	imulq	$0, %r14, %rax
	leaq	(%rdx,%rax), %rsi
	movl	$800, %eax
	mulq	%r14
	addq	%rdx, %rsi
	movq	%rsi, %rdx
	movslq	%ecx, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	salq	$2, %rax
	movslq	%ecx, %rax
	movq	%rax, %r12
	movl	$0, %r13d
	imulq	$800, %r13, %rdx
	imulq	$0, %r12, %rax
	leaq	(%rdx,%rax), %rsi
	movl	$800, %eax
	mulq	%r12
	addq	%rdx, %rsi
	movq	%rsi, %rdx
	movslq	%ecx, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %edi
	movl	$0, %edx
	divq	%rdi
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L2:
	cmpq	%rdx, %rsp
	je	.L3
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L2
.L3:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L4
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L4:
	movq	%rsp, %rax
	addq	$0, %rax
	movq	%rax, -104(%rbp)
	movl	$0, -148(%rbp)
	jmp	.L5
.L6:
	movl	-148(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	salq	$2, %rax
	movq	-104(%rbp), %rdx
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -148(%rbp)
.L5:
	movl	-152(%rbp), %eax
	cmpl	%eax, -148(%rbp)
	jl	.L6
	leaq	-96(%rbp), %rax
	movq	%rax, %rdi
	call	strlen@PLT
	movl	%eax, -120(%rbp)
	movl	$0, -132(%rbp)
	movl	$0, -128(%rbp)
	movl	$0, -124(%rbp)
	movl	$0, -148(%rbp)
	jmp	.L7
.L21:
	movl	$0, -128(%rbp)
	movl	$0, -124(%rbp)
	movl	-148(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	salq	$2, %rax
	movq	-104(%rbp), %rdx
	addq	%rdx, %rax
	movq	%rax, %rdi
	call	strlen@PLT
	movl	%eax, -116(%rbp)
	movl	$0, -144(%rbp)
	jmp	.L8
.L20:
	movzbl	-96(%rbp), %ecx
	movq	-104(%rbp), %rdi
	movl	-144(%rbp), %eax
	movslq	%eax, %rsi
	movl	-148(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdi, %rax
	addq	%rsi, %rax
	movzbl	(%rax), %eax
	cmpb	%al, %cl
	jne	.L9
	movl	$1, -140(%rbp)
	jmp	.L10
.L17:
	movl	$1, -128(%rbp)
	movl	$1, -136(%rbp)
	jmp	.L11
.L15:
	movl	-140(%rbp), %eax
	imull	-136(%rbp), %eax
	movl	%eax, %edx
	movl	-144(%rbp), %eax
	addl	%edx, %eax
	cmpl	$99, %eax
	jle	.L12
	movl	$0, -128(%rbp)
	jmp	.L13
.L12:
	movl	-136(%rbp), %eax
	cltq
	movzbl	-96(%rbp,%rax), %ecx
	movl	-140(%rbp), %eax
	imull	-136(%rbp), %eax
	movl	%eax, %edx
	movl	-144(%rbp), %eax
	addl	%edx, %eax
	movq	-104(%rbp), %rdi
	movslq	%eax, %rsi
	movl	-148(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdi, %rax
	addq	%rsi, %rax
	movzbl	(%rax), %eax
	cmpb	%al, %cl
	je	.L14
	movl	$0, -128(%rbp)
	jmp	.L13
.L14:
	addl	$1, -136(%rbp)
.L11:
	movl	-136(%rbp), %eax
	cmpl	-120(%rbp), %eax
	jl	.L15
.L13:
	cmpl	$1, -128(%rbp)
	jne	.L16
	addl	$1, -132(%rbp)
	movl	$1, -124(%rbp)
	jmp	.L9
.L16:
	addl	$1, -140(%rbp)
.L10:
	cmpl	$48, -140(%rbp)
	jle	.L17
.L9:
	cmpl	$1, -124(%rbp)
	je	.L24
	addl	$1, -144(%rbp)
.L8:
	movl	-116(%rbp), %eax
	subl	$2, %eax
	cmpl	%eax, -144(%rbp)
	jl	.L20
	jmp	.L19
.L24:
	nop
.L19:
	addl	$1, -148(%rbp)
.L7:
	movl	-152(%rbp), %eax
	cmpl	%eax, -148(%rbp)
	jl	.L21
	movl	-132(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	%rbx, %rsp
	movq	-56(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L23
	call	__stack_chk_fail@PLT
.L23:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.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	"%d"
.LC1:
	.string	"%s"
.LC2:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB35:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	leaq	.LC0(%rip), %rdi
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r15
	pushq	%r14
	leaq	-100(%rbp), %rsi
	pushq	%r13
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	leaq	-96(%rbp), %r13
	pushq	%r12
	.cfi_offset 12, -48
	leaq	.LC1(%rip), %r12
	pushq	%rbx
	subq	$104, %rsp
	.cfi_offset 3, -56
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movq	%r13, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	-100(%rbp), %rax
	movq	%rsp, %rsi
	movq	%rax, %rcx
	leaq	(%rax,%rax,4), %rax
	leaq	(%rax,%rax,4), %rax
	leaq	15(,%rax,4), %rdx
	movq	%rdx, %rax
	andq	$-4096, %rdx
	subq	%rdx, %rsi
	andq	$-16, %rax
	cmpq	%rsi, %rsp
	je	.L3
.L38:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%rsi, %rsp
	jne	.L38
.L3:
	andl	$4095, %eax
	subq	%rax, %rsp
	testq	%rax, %rax
	jne	.L39
.L4:
	movq	%rsp, -144(%rbp)
	testl	%ecx, %ecx
	jle	.L5
	movq	%rsp, %rbx
	movq	%rsp, %r15
	xorl	%r14d, %r14d
.L6:
	movq	%r15, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	addl	$1, %r14d
	call	__isoc99_scanf@PLT
	movl	-100(%rbp), %eax
	addq	$100, %r15
	cmpl	%r14d, %eax
	jg	.L6
	movq	%r13, %rdi
	movl	%eax, -132(%rbp)
	movl	%eax, %r15d
	call	strlen@PLT
	movq	%rax, %r12
	testl	%r15d, %r15d
	jle	.L5
	leal	-2(%rax), %eax
	movzbl	-96(%rbp), %r13d
	xorl	%r14d, %r14d
	movl	$0, -136(%rbp)
	movq	%rax, -128(%rbp)
.L18:
	movq	%rbx, %rdi
	call	strlen@PLT
	cmpl	$2, %eax
	jle	.L7
	leal	-3(%rax), %r15d
	movslq	%r14d, %rax
	movq	-144(%rbp), %rdi
	movl	%r12d, %esi
	leaq	(%rax,%rax,4), %rax
	xorl	%r10d, %r10d
	leaq	(%rax,%rax,4), %rax
	leaq	(%rdi,%rax,4), %rdi
	jmp	.L17
	.p2align 4,,10
	.p2align 3
.L9:
	leaq	1(%r10), %rax
	addl	$1, %esi
	cmpq	%r15, %r10
	je	.L7
	movq	%rax, %r10
.L17:
	movl	%r10d, %r11d
	cmpb	(%rbx,%r10), %r13b
	jne	.L9
	leal	1(%r10), %r9d
	movl	$1, %r8d
	cmpq	$1, %r12
	jbe	.L12
	.p2align 4,,10
	.p2align 3
.L42:
	movslq	%r9d, %rax
	cmpl	$99, %r9d
	jg	.L10
	cmpq	$1, %r8
	jne	.L40
	movq	%r8, -120(%rbp)
	leal	2(%r11), %edx
	leaq	-95(%rbp), %rcx
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L41:
	cmpl	%esi, %edx
	je	.L12
	movslq	%edx, %rax
	addq	$1, %rcx
	addl	$1, %edx
	cmpl	$99, %eax
	jg	.L31
.L13:
	movzbl	(%rcx), %r8d
	cmpb	%r8b, (%rdi,%rax)
	je	.L41
.L31:
	movq	-120(%rbp), %r8
.L10:
	addq	$1, %r8
	addl	$1, %r9d
	cmpq	$49, %r8
	je	.L9
	cmpq	$1, %r12
	ja	.L42
	.p2align 4,,10
	.p2align 3
.L12:
	addl	$1, -136(%rbp)
.L7:
	addl	$1, %r14d
	addq	$100, %rbx
	cmpl	%r14d, -132(%rbp)
	jne	.L18
.L19:
	movl	-136(%rbp), %edx
	xorl	%eax, %eax
	movl	$1, %edi
	leaq	.LC2(%rip), %rsi
	call	__printf_chk@PLT
	movq	-56(%rbp), %rax
	subq	%fs:40, %rax
	jne	.L43
	leaq	-40(%rbp), %rsp
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
	.p2align 4,,10
	.p2align 3
.L40:
	.cfi_restore_state
	movq	-128(%rbp), %rcx
	leaq	-95(%rbp), %rax
	movl	%esi, -120(%rbp)
	leaq	(%r8,%r10), %rdx
	addq	%rax, %rcx
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L44:
	cmpq	%rcx, %rax
	je	.L12
	addq	%r8, %rdx
	addq	$1, %rax
	cmpl	$99, %edx
	jg	.L33
.L11:
	movzbl	(%rbx,%rdx), %esi
	cmpb	%sil, (%rax)
	je	.L44
.L33:
	movl	-120(%rbp), %esi
	jmp	.L10
.L39:
	orq	$0, -8(%rsp,%rax)
	jmp	.L4
.L5:
	movl	$0, -136(%rbp)
	jmp	.L19
.L43:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE35:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:

rule
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%s"
.LC2:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB35:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	leaq	.LC0(%rip), %rdi
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%r15
	pushq	%r14
	leaq	-100(%rbp), %rsi
	pushq	%r13
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	leaq	-96(%rbp), %r13
	pushq	%r12
	.cfi_offset 12, -48
	leaq	.LC1(%rip), %r12
	pushq	%rbx
	subq	$104, %rsp
	.cfi_offset 3, -56
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movq	%r13, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	-100(%rbp), %rax
	movq	%rsp, %rsi
	movq	%rax, %rcx
	leaq	(%rax,%rax,4), %rax
	leaq	(%rax,%rax,4), %rax
	leaq	15(,%rax,4), %rdx
	movq	%rdx, %rax
	andq	$-4096, %rdx
	subq	%rdx, %rsi
	andq	$-16, %rax
	cmpq	%rsi, %rsp
	je	.L3
.L38:
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	cmpq	%rsi, %rsp
	jne	.L38
.L3:
	andl	$4095, %eax
	subq	%rax, %rsp
	testq	%rax, %rax
	jne	.L39
.L4:
	movq	%rsp, -144(%rbp)
	testl	%ecx, %ecx
	jle	.L5
	movq	%rsp, %rbx
	movq	%rsp, %r15
	xorl	%r14d, %r14d
.L6:
	movq	%r15, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	addl	$1, %r14d
	call	__isoc99_scanf@PLT
	movl	-100(%rbp), %eax
	addq	$100, %r15
	cmpl	%r14d, %eax
	jg	.L6
	movq	%r13, %rdi
	movl	%eax, -132(%rbp)
	movl	%eax, %r15d
	call	strlen@PLT
	movq	%rax, %r12
	testl	%r15d, %r15d
	jle	.L5
	leal	-2(%rax), %eax
	movzbl	-96(%rbp), %r13d
	xorl	%r14d, %r14d
	movl	$0, -136(%rbp)
	movq	%rax, -128(%rbp)
.L18:
	movq	%rbx, %rdi
	call	strlen@PLT
	cmpl	$2, %eax
	jle	.L7
	leal	-3(%rax), %r15d
	movslq	%r14d, %rax
	movq	-144(%rbp), %rdi
	movl	%r12d, %esi
	leaq	(%rax,%rax,4), %rax
	xorl	%r10d, %r10d
	leaq	(%rax,%rax,4), %rax
	leaq	(%rdi,%rax,4), %rdi
	jmp	.L17
	.p2align 4,,10
	.p2align 3
.L9:
	leaq	1(%r10), %rax
	addl	$1, %esi
	cmpq	%r15, %r10
	je	.L7
	movq	%rax, %r10
.L17:
	movl	%r10d, %r11d
	cmpb	(%rbx,%r10), %r13b
	jne	.L9
	leal	1(%r10), %r9d
	movl	$1, %r8d
	cmpq	$1, %r12
	jbe	.L12
	.p2align 4,,10
	.p2align 3
.L42:
	movslq	%r9d, %rax
	cmpl	$99, %r9d
	jg	.L10
	cmpq	$1, %r8
	jne	.L40
	movq	%r8, -120(%rbp)
	leal	2(%r11), %edx
	leaq	-95(%rbp), %rcx
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L41:
	cmpl	%esi, %edx
	je	.L12
	movslq	%edx, %rax
	addq	$1, %rcx
	addl	$1, %edx
	cmpl	$99, %eax
	jg	.L31
.L13:
	movzbl	(%rcx), %r8d
	cmpb	%r8b, (%rdi,%rax)
	je	.L41
.L31:
	movq	-120(%rbp), %r8
.L10:
	addq	$1, %r8
	addl	$1, %r9d
	cmpq	$49, %r8
	je	.L9
	cmpq	$1, %r12
	ja	.L42
	.p2align 4,,10
	.p2align 3
.L12:
	addl	$1, -136(%rbp)
.L7:
	addl	$1, %r14d
	addq	$100, %rbx
	cmpl	%r14d, -132(%rbp)
	jne	.L18
.L19:
	movl	-136(%rbp), %edx
	xorl	%eax, %eax
	movl	$1, %edi
	leaq	.LC2(%rip), %rsi
	call	__printf_chk@PLT
	movq	-56(%rbp), %rax
	subq	%fs:40, %rax
	jne	.L43
	leaq	-40(%rbp), %rsp
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
	.p2align 4,,10
	.p2align 3
.L40:
	.cfi_restore_state
	movq	-128(%rbp), %rcx
	leaq	-95(%rbp), %rax
	movl	%esi, -120(%rbp)
	leaq	(%r8,%r10), %rdx
	addq	%rax, %rcx
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L44:
	cmpq	%rcx, %rax
	je	.L12
	addq	%r8, %rdx
	addq	$1, %rax
	cmpl	$99, %edx
	jg	.L33
.L11:
	movzbl	(%rbx,%rdx), %esi
	cmpb	%sil, (%rax)
	je	.L44
.L33:
	movl	-120(%rbp), %esi
	jmp	.L10
.L39:
	orq	$0, -8(%rsp,%rax)
	jmp	.L4
.L5:
	movl	$0, -136(%rbp)
	jmp	.L19
.L43:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE35:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:

#include <stdio.h>
#include <string.h>
int main(){
	int N;
	scanf("%d",&N);
	char target[25];
	scanf("%s",target);
	char kanban[N][100];
	int i,j,k,l;
	for(i=0;i<N;i++){
		scanf("%s",kanban[i]);
	}
	int tar=strlen(target);//目標の文字数
	int ans=0;
	int flag=0;
	int breakflag=0;
	for(i=0;i<N;i++){//i:何番目の看板かを指す
		flag=0;
		breakflag=0;
		int moji=strlen(kanban[i]);
		for(j=0;j<moji-2;j++){//j:元の看板の何文字目かを指す
			if(target[0]==kanban[i][j]){/*最初の文字を探す*/
				for(k=1;k<49;k++){//k:文字と文字の間隔を指す
					flag=1;
					for(l=1;l<tar;l++){
						if(j+(k*l)>99){
							flag=0;
							break;//過剰アクセス防止
						}
						if(target[l]!=kanban[i][j+(k*l)]){//その後もあっているかを調べる
							flag=0;
							break;
						}
					}
					if(flag==1){
						ans++;
						breakflag=1;
						break;
					}
				}
			}
			if(breakflag==1){
				break;
			}
		}
	}
	printf("%d\n",ans);
	return 0;
}
4
bar
abracadabra
bear
bar
bbraxbara
 4
rab
abracadabra
bear
bar
bbraxbara
 4
rab
abracadabra
bear
bar
arabxarbb
 4
qab
abracadabra
bear
bar
arabxarbb
 4
qab
abracadabra
bear
bra
arabxarbb
 4
qab
abrbcadaara
bear
bra
arabxarbb
 4
qab
abrbcadaara
bear
bra
arbbxarbb
 4
qab
abrbcadaara
raeb
bra
arbbxarbb
 4
qab
abrbcadaara
rafb
bra
arbbxarbb
 4
baq
abrbcadaara
rafb
bra
arbbxarbb

3
 1
 2
 0
 0
 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 main(){
	int N;
	scanf("%d",&N);
	char target[25];
	scanf("%s",target);
	char kanban[N][100];
	int i,j,k,l;
	for(i=0;i<N;i++){
		scanf("%s",kanban[i]);
	}
	int tar=strlen(target);//目標の文字数
	int ans=0;
	int flag=0;
	int breakflag=0;
	for(i=0;i<N;i++){//i:何番目の看板かを指す
		flag=0;
		breakflag=0;
		int moji=strlen(kanban[i]);
		for(j=0;j<moji-2;j++){//j:元の看板の何文字目かを指す
			if(target[0]==kanban[i][j]){/*最初の文字を探す*/
				for(k=1;k<49;k++){//k:文字と文字の間隔を指す
					flag=1;
					for(l=1;l<tar;l++){
						if(j+(k*l)>99){
							flag=0;
							break;//過剰アクセス防止
						}
						if(target[l]!=kanban[i][j+(k*l)]){//その後もあっているかを調べる
							flag=0;
							break;
						}
					}
					if(flag==1){
						ans++;
						breakflag=1;
						break;
					}
				}
			}
			if(breakflag==1){
				break;
			}
		}
	}
	printf("%d\n",ans);
	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%s"
.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
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$120, %rsp
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	movq	%rsp, %rax
	movq	%rax, %rbx
	leaq	-152(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-96(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-152(%rbp), %ecx
	movslq	%ecx, %rax
	subq	$1, %rax
	movq	%rax, -112(%rbp)
	movslq	%ecx, %rax
	movq	%rax, %r14
	movl	$0, %r15d
	imulq	$800, %r15, %rdx
	imulq	$0, %r14, %rax
	leaq	(%rdx,%rax), %rsi
	movl	$800, %eax
	mulq	%r14
	addq	%rdx, %rsi
	movq	%rsi, %rdx
	movslq	%ecx, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	salq	$2, %rax
	movslq	%ecx, %rax
	movq	%rax, %r12
	movl	$0, %r13d
	imulq	$800, %r13, %rdx
	imulq	$0, %r12, %rax
	leaq	(%rdx,%rax), %rsi
	movl	$800, %eax
	mulq	%r12
	addq	%rdx, %rsi
	movq	%rsi, %rdx
	movslq	%ecx, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %edi
	movl	$0, %edx
	divq	%rdi
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L2:
	cmpq	%rdx, %rsp
	je	.L3
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L2
.L3:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L4
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L4:
	movq	%rsp, %rax
	addq	$0, %rax
	movq	%rax, -104(%rbp)
	movl	$0, -148(%rbp)
	jmp	.L5
.L6:
	movl	-148(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	salq	$2, %rax
	movq	-104(%rbp), %rdx
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -148(%rbp)
.L5:
	movl	-152(%rbp), %eax
	cmpl	%eax, -148(%rbp)
	jl	.L6
	leaq	-96(%rbp), %rax
	movq	%rax, %rdi
	call	strlen@PLT
	movl	%eax, -120(%rbp)
	movl	$0, -132(%rbp)
	movl	$0, -128(%rbp)
	movl	$0, -124(%rbp)
	movl	$0, -148(%rbp)
	jmp	.L7
.L21:
	movl	$0, -128(%rbp)
	movl	$0, -124(%rbp)
	movl	-148(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	salq	$2, %rax
	movq	-104(%rbp), %rdx
	addq	%rdx, %rax
	movq	%rax, %rdi
	call	strlen@PLT
	movl	%eax, -116(%rbp)
	movl	$0, -144(%rbp)
	jmp	.L8
.L20:
	movzbl	-96(%rbp), %ecx
	movq	-104(%rbp), %rdi
	movl	-144(%rbp), %eax
	movslq	%eax, %rsi
	movl	-148(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdi, %rax
	addq	%rsi, %rax
	movzbl	(%rax), %eax
	cmpb	%al, %cl
	jne	.L9
	movl	$1, -140(%rbp)
	jmp	.L10
.L17:
	movl	$1, -128(%rbp)
	movl	$1, -136(%rbp)
	jmp	.L11
.L15:
	movl	-140(%rbp), %eax
	imull	-136(%rbp), %eax
	movl	%eax, %edx
	movl	-144(%rbp), %eax
	addl	%edx, %eax
	cmpl	$99, %eax
	jle	.L12
	movl	$0, -128(%rbp)
	jmp	.L13
.L12:
	movl	-136(%rbp), %eax
	cltq
	movzbl	-96(%rbp,%rax), %ecx
	movl	-140(%rbp), %eax
	imull	-136(%rbp), %eax
	movl	%eax, %edx
	movl	-144(%rbp), %eax
	addl	%edx, %eax
	movq	-104(%rbp), %rdi
	movslq	%eax, %rsi
	movl	-148(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdi, %rax
	addq	%rsi, %rax
	movzbl	(%rax), %eax
	cmpb	%al, %cl
	je	.L14
	movl	$0, -128(%rbp)
	jmp	.L13
.L14:
	addl	$1, -136(%rbp)
.L11:
	movl	-136(%rbp), %eax
	cmpl	-120(%rbp), %eax
	jl	.L15
.L13:
	cmpl	$1, -128(%rbp)
	jne	.L16
	addl	$1, -132(%rbp)
	movl	$1, -124(%rbp)
	jmp	.L9
.L16:
	addl	$1, -140(%rbp)
.L10:
	cmpl	$48, -140(%rbp)
	jle	.L17
.L9:
	cmpl	$1, -124(%rbp)
	je	.L24
	addl	$1, -144(%rbp)
.L8:
	movl	-116(%rbp), %eax
	subl	$2, %eax
	cmpl	%eax, -144(%rbp)
	jl	.L20
	jmp	.L19
.L24:
	nop
.L19:
	addl	$1, -148(%rbp)
.L7:
	movl	-152(%rbp), %eax
	cmpl	%eax, -148(%rbp)
	jl	.L21
	movl	-132(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	%rbx, %rsp
	movq	-56(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L23
	call	__stack_chk_fail@PLT
.L23:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.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	"%d"
.LC1:
	.string	"%s"
.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
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$120, %rsp
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	movq	%fs:40, %rax
	movq	%rax, -56(%rbp)
	xorl	%eax, %eax
	movq	%rsp, %rax
	movq	%rax, %rbx
	leaq	-152(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-96(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-152(%rbp), %ecx
	movslq	%ecx, %rax
	subq	$1, %rax
	movq	%rax, -112(%rbp)
	movslq	%ecx, %rax
	movq	%rax, %r14
	movl	$0, %r15d
	imulq	$800, %r15, %rdx
	imulq	$0, %r14, %rax
	leaq	(%rdx,%rax), %rsi
	movl	$800, %eax
	mulq	%r14
	addq	%rdx, %rsi
	movq	%rsi, %rdx
	movslq	%ecx, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	salq	$2, %rax
	movslq	%ecx, %rax
	movq	%rax, %r12
	movl	$0, %r13d
	imulq	$800, %r13, %rdx
	imulq	$0, %r12, %rax
	leaq	(%rdx,%rax), %rsi
	movl	$800, %eax
	mulq	%r12
	addq	%rdx, %rsi
	movq	%rsi, %rdx
	movslq	%ecx, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	movl	$16, %eax
	subq	$1, %rax
	addq	%rdx, %rax
	movl	$16, %edi
	movl	$0, %edx
	divq	%rdi
	imulq	$16, %rax, %rax
	movq	%rax, %rcx
	andq	$-4096, %rcx
	movq	%rsp, %rdx
	subq	%rcx, %rdx
.L2:
	cmpq	%rdx, %rsp
	je	.L3
	subq	$4096, %rsp
	orq	$0, 4088(%rsp)
	jmp	.L2
.L3:
	movq	%rax, %rdx
	andl	$4095, %edx
	subq	%rdx, %rsp
	movq	%rax, %rdx
	andl	$4095, %edx
	testq	%rdx, %rdx
	je	.L4
	andl	$4095, %eax
	subq	$8, %rax
	addq	%rsp, %rax
	orq	$0, (%rax)
.L4:
	movq	%rsp, %rax
	addq	$0, %rax
	movq	%rax, -104(%rbp)
	movl	$0, -148(%rbp)
	jmp	.L5
.L6:
	movl	-148(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	salq	$2, %rax
	movq	-104(%rbp), %rdx
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -148(%rbp)
.L5:
	movl	-152(%rbp), %eax
	cmpl	%eax, -148(%rbp)
	jl	.L6
	leaq	-96(%rbp), %rax
	movq	%rax, %rdi
	call	strlen@PLT
	movl	%eax, -120(%rbp)
	movl	$0, -132(%rbp)
	movl	$0, -128(%rbp)
	movl	$0, -124(%rbp)
	movl	$0, -148(%rbp)
	jmp	.L7
.L21:
	movl	$0, -128(%rbp)
	movl	$0, -124(%rbp)
	movl	-148(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	salq	$2, %rax
	movq	-104(%rbp), %rdx
	addq	%rdx, %rax
	movq	%rax, %rdi
	call	strlen@PLT
	movl	%eax, -116(%rbp)
	movl	$0, -144(%rbp)
	jmp	.L8
.L20:
	movzbl	-96(%rbp), %ecx
	movq	-104(%rbp), %rdi
	movl	-144(%rbp), %eax
	movslq	%eax, %rsi
	movl	-148(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdi, %rax
	addq	%rsi, %rax
	movzbl	(%rax), %eax
	cmpb	%al, %cl
	jne	.L9
	movl	$1, -140(%rbp)
	jmp	.L10
.L17:
	movl	$1, -128(%rbp)
	movl	$1, -136(%rbp)
	jmp	.L11
.L15:
	movl	-140(%rbp), %eax
	imull	-136(%rbp), %eax
	movl	%eax, %edx
	movl	-144(%rbp), %eax
	addl	%edx, %eax
	cmpl	$99, %eax
	jle	.L12
	movl	$0, -128(%rbp)
	jmp	.L13
.L12:
	movl	-136(%rbp), %eax
	cltq
	movzbl	-96(%rbp,%rax), %ecx
	movl	-140(%rbp), %eax
	imull	-136(%rbp), %eax
	movl	%eax, %edx
	movl	-144(%rbp), %eax
	addl	%edx, %eax
	movq	-104(%rbp), %rdi
	movslq	%eax, %rsi
	movl	-148(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$2, %rax
	addq	%rdx, %rax
	leaq	0(,%rax,4), %rdx
	addq	%rdx, %rax
	salq	$2, %rax
	addq	%rdi, %rax
	addq	%rsi, %rax
	movzbl	(%rax), %eax
	cmpb	%al, %cl
	je	.L14
	movl	$0, -128(%rbp)
	jmp	.L13
.L14:
	addl	$1, -136(%rbp)
.L11:
	movl	-136(%rbp), %eax
	cmpl	-120(%rbp), %eax
	jl	.L15
.L13:
	cmpl	$1, -128(%rbp)
	jne	.L16
	addl	$1, -132(%rbp)
	movl	$1, -124(%rbp)
	jmp	.L9
.L16:
	addl	$1, -140(%rbp)
.L10:
	cmpl	$48, -140(%rbp)
	jle	.L17
.L9:
	cmpl	$1, -124(%rbp)
	je	.L24
	addl	$1, -144(%rbp)
.L8:
	movl	-116(%rbp), %eax
	subl	$2, %eax
	cmpl	%eax, -144(%rbp)
	jl	.L20
	jmp	.L19
.L24:
	nop
.L19:
	addl	$1, -148(%rbp)
.L7:
	movl	-152(%rbp), %eax
	cmpl	%eax, -148(%rbp)
	jl	.L21
	movl	-132(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	%rbx, %rsp
	movq	-56(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L23
	call	__stack_chk_fail@PLT
.L23:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	.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:
