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(void)
{
    int n,i,j,k,ii,cnt,len,flg,f2,lenn;
    char nama[26];
    char ban[101];
     
    cnt=0;
    scanf("%d",&n);
    scanf("%s",nama);
    lenn=strlen(nama);
    for(i=0;i<n;i++) {
        scanf("%s",ban);
        len=strlen(ban);
        flg=0;
        for(j=0;j<len;j++)   {
			for(k=1;k+j<len;k++) {
				f2=1;
				for(ii=0;ii<lenn;ii++)   {
					if(j+k*ii>=len)    {
						f2=0;
						break;
					}
					if(nama[ii]!=ban[j+k*ii]) {
						f2=0;
						break;
					}
				}
				if(f2==1)   {
					flg=1;
					k=len; j=len;
				}
			}
        }
        if(flg==1)  {
            cnt++;
        }
    }
    printf("%d\n",cnt);
    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
	subq	$192, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -164(%rbp)
	leaq	-184(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-144(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-144(%rbp), %rax
	movq	%rax, %rdi
	call	strlen@PLT
	movl	%eax, -152(%rbp)
	movl	$0, -180(%rbp)
	jmp	.L2
.L14:
	leaq	-112(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-112(%rbp), %rax
	movq	%rax, %rdi
	call	strlen@PLT
	movl	%eax, -148(%rbp)
	movl	$0, -160(%rbp)
	movl	$0, -176(%rbp)
	jmp	.L3
.L12:
	movl	$1, -172(%rbp)
	jmp	.L4
.L11:
	movl	$1, -156(%rbp)
	movl	$0, -168(%rbp)
	jmp	.L5
.L9:
	movl	-172(%rbp), %eax
	imull	-168(%rbp), %eax
	movl	%eax, %edx
	movl	-176(%rbp), %eax
	addl	%edx, %eax
	cmpl	%eax, -148(%rbp)
	jg	.L6
	movl	$0, -156(%rbp)
	jmp	.L7
.L6:
	movl	-168(%rbp), %eax
	cltq
	movzbl	-144(%rbp,%rax), %edx
	movl	-172(%rbp), %eax
	imull	-168(%rbp), %eax
	movl	%eax, %ecx
	movl	-176(%rbp), %eax
	addl	%ecx, %eax
	cltq
	movzbl	-112(%rbp,%rax), %eax
	cmpb	%al, %dl
	je	.L8
	movl	$0, -156(%rbp)
	jmp	.L7
.L8:
	addl	$1, -168(%rbp)
.L5:
	movl	-168(%rbp), %eax
	cmpl	-152(%rbp), %eax
	jl	.L9
.L7:
	cmpl	$1, -156(%rbp)
	jne	.L10
	movl	$1, -160(%rbp)
	movl	-148(%rbp), %eax
	movl	%eax, -172(%rbp)
	movl	-148(%rbp), %eax
	movl	%eax, -176(%rbp)
.L10:
	addl	$1, -172(%rbp)
.L4:
	movl	-172(%rbp), %edx
	movl	-176(%rbp), %eax
	addl	%edx, %eax
	cmpl	%eax, -148(%rbp)
	jg	.L11
	addl	$1, -176(%rbp)
.L3:
	movl	-176(%rbp), %eax
	cmpl	-148(%rbp), %eax
	jl	.L12
	cmpl	$1, -160(%rbp)
	jne	.L13
	addl	$1, -164(%rbp)
.L13:
	addl	$1, -180(%rbp)
.L2:
	movl	-184(%rbp), %eax
	cmpl	%eax, -180(%rbp)
	jl	.L14
	movl	-164(%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	.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	"%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	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	.LC0(%rip), %rdi
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	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
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$184, %rsp
	.cfi_def_cfa_offset 240
	movq	%fs:40, %rax
	movq	%rax, 168(%rsp)
	xorl	%eax, %eax
	leaq	28(%rsp), %rsi
	leaq	32(%rsp), %r12
	call	__isoc99_scanf@PLT
	movq	%r12, %rsi
	leaq	.LC1(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movq	%r12, %rdi
	call	strlen@PLT
	movl	28(%rsp), %edx
	testl	%edx, %edx
	jle	.L16
	movq	%rax, %rbp
	leal	-1(%rax), %eax
	xorl	%r13d, %r13d
	xorl	%r14d, %r14d
	movl	%eax, 12(%rsp)
	leaq	64(%rsp), %rbx
.L14:
	movq	%rbx, %rsi
	leaq	.LC1(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movq	%rbx, %rdi
	call	strlen@PLT
	movl	12(%rsp), %r9d
	xorl	%r10d, %r10d
	xorl	%edi, %edi
	movl	%eax, %edx
	leaq	(%r9,%r12), %r8
	testq	%rax, %rax
	je	.L4
	.p2align 4,,10
	.p2align 3
.L3:
	leal	1(%rdi), %eax
	cmpl	%eax, %edx
	jle	.L12
	movl	$1, %esi
	.p2align 4,,10
	.p2align 3
.L13:
	testq	%rbp, %rbp
	je	.L19
	cmpl	%edi, %edx
	jle	.L5
	cmpl	$1, %esi
	jne	.L29
	movslq	%edi, %rax
	movq	%r12, %r11
	leaq	(%r9,%rax), %rcx
	subq	%rax, %r11
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L30:
	cmpq	%rcx, %rax
	je	.L18
	addq	$1, %rax
	cmpl	%eax, %edx
	jle	.L5
.L7:
	movzbl	(%r11,%rax), %r15d
	cmpb	%r15b, (%rbx,%rax)
	je	.L30
.L5:
	addl	$1, %esi
	leal	(%rdi,%rsi), %eax
	cmpl	%edx, %eax
	jl	.L13
.L32:
	addl	$1, %edi
	cmpl	%edx, %edi
	jl	.L3
.L12:
	addl	%r10d, %r13d
.L4:
	addl	$1, %r14d
	cmpl	%r14d, 28(%rsp)
	jg	.L14
.L2:
	xorl	%eax, %eax
	movl	%r13d, %edx
	movl	$1, %edi
	leaq	.LC2(%rip), %rsi
	call	__printf_chk@PLT
	movq	168(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L31
	addq	$184, %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
	.p2align 4,,10
	.p2align 3
.L18:
	.cfi_restore_state
	movl	%edx, %esi
	movl	%edx, %edi
	movl	$1, %r10d
	addl	$1, %esi
	leal	(%rdi,%rsi), %eax
	cmpl	%edx, %eax
	jl	.L13
	jmp	.L32
	.p2align 4,,10
	.p2align 3
.L29:
	movslq	%esi, %r11
	movslq	%edi, %rcx
	movq	%r12, %rax
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L33:
	cmpq	%r8, %rax
	je	.L19
	addq	%r11, %rcx
	addq	$1, %rax
	cmpl	%ecx, %edx
	jle	.L5
.L6:
	movzbl	(%rbx,%rcx), %r15d
	cmpb	%r15b, (%rax)
	je	.L33
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L19:
	movl	%edx, %esi
	movl	%edx, %edi
	movl	$1, %r10d
	addl	$1, %esi
	leal	(%rdi,%rsi), %eax
	cmpl	%edx, %eax
	jl	.L13
	jmp	.L32
.L16:
	xorl	%r13d, %r13d
	jmp	.L2
.L31:
	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	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	.LC0(%rip), %rdi
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	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
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$184, %rsp
	.cfi_def_cfa_offset 240
	movq	%fs:40, %rax
	movq	%rax, 168(%rsp)
	xorl	%eax, %eax
	leaq	28(%rsp), %rsi
	leaq	32(%rsp), %r12
	call	__isoc99_scanf@PLT
	movq	%r12, %rsi
	leaq	.LC1(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movq	%r12, %rdi
	call	strlen@PLT
	movl	28(%rsp), %edx
	testl	%edx, %edx
	jle	.L16
	movq	%rax, %rbp
	leal	-1(%rax), %eax
	xorl	%r13d, %r13d
	xorl	%r14d, %r14d
	movl	%eax, 12(%rsp)
	leaq	64(%rsp), %rbx
.L14:
	movq	%rbx, %rsi
	leaq	.LC1(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movq	%rbx, %rdi
	call	strlen@PLT
	movl	12(%rsp), %r9d
	xorl	%r10d, %r10d
	xorl	%edi, %edi
	movl	%eax, %edx
	leaq	(%r9,%r12), %r8
	testq	%rax, %rax
	je	.L4
	.p2align 4,,10
	.p2align 3
.L3:
	leal	1(%rdi), %eax
	cmpl	%eax, %edx
	jle	.L12
	movl	$1, %esi
	.p2align 4,,10
	.p2align 3
.L13:
	testq	%rbp, %rbp
	je	.L19
	cmpl	%edi, %edx
	jle	.L5
	cmpl	$1, %esi
	jne	.L29
	movslq	%edi, %rax
	movq	%r12, %r11
	leaq	(%r9,%rax), %rcx
	subq	%rax, %r11
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L30:
	cmpq	%rcx, %rax
	je	.L18
	addq	$1, %rax
	cmpl	%eax, %edx
	jle	.L5
.L7:
	movzbl	(%r11,%rax), %r15d
	cmpb	%r15b, (%rbx,%rax)
	je	.L30
.L5:
	addl	$1, %esi
	leal	(%rdi,%rsi), %eax
	cmpl	%edx, %eax
	jl	.L13
.L32:
	addl	$1, %edi
	cmpl	%edx, %edi
	jl	.L3
.L12:
	addl	%r10d, %r13d
.L4:
	addl	$1, %r14d
	cmpl	%r14d, 28(%rsp)
	jg	.L14
.L2:
	xorl	%eax, %eax
	movl	%r13d, %edx
	movl	$1, %edi
	leaq	.LC2(%rip), %rsi
	call	__printf_chk@PLT
	movq	168(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L31
	addq	$184, %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
	.p2align 4,,10
	.p2align 3
.L18:
	.cfi_restore_state
	movl	%edx, %esi
	movl	%edx, %edi
	movl	$1, %r10d
	addl	$1, %esi
	leal	(%rdi,%rsi), %eax
	cmpl	%edx, %eax
	jl	.L13
	jmp	.L32
	.p2align 4,,10
	.p2align 3
.L29:
	movslq	%esi, %r11
	movslq	%edi, %rcx
	movq	%r12, %rax
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L33:
	cmpq	%r8, %rax
	je	.L19
	addq	%r11, %rcx
	addq	$1, %rax
	cmpl	%ecx, %edx
	jle	.L5
.L6:
	movzbl	(%rbx,%rcx), %r15d
	cmpb	%r15b, (%rax)
	je	.L33
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L19:
	movl	%edx, %esi
	movl	%edx, %edi
	movl	$1, %r10d
	addl	$1, %esi
	leal	(%rdi,%rsi), %eax
	cmpl	%edx, %eax
	jl	.L13
	jmp	.L32
.L16:
	xorl	%r13d, %r13d
	jmp	.L2
.L31:
	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(void)
{
    int n,i,j,k,ii,cnt,len,flg,f2,lenn;
    char nama[26];
    char ban[101];
     
    cnt=0;
    scanf("%d",&n);
    scanf("%s",nama);
    lenn=strlen(nama);
    for(i=0;i<n;i++) {
        scanf("%s",ban);
        len=strlen(ban);
        flg=0;
        for(j=0;j<len;j++)   {
			for(k=1;k+j<len;k++) {
				f2=1;
				for(ii=0;ii<lenn;ii++)   {
					if(j+k*ii>=len)    {
						f2=0;
						break;
					}
					if(nama[ii]!=ban[j+k*ii]) {
						f2=0;
						break;
					}
				}
				if(f2==1)   {
					flg=1;
					k=len; j=len;
				}
			}
        }
        if(flg==1)  {
            cnt++;
        }
    }
    printf("%d\n",cnt);
    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(void)
{
    int n,i,j,k,ii,cnt,len,flg,f2,lenn;
    char nama[26];
    char ban[101];
     
    cnt=0;
    scanf("%d",&n);
    scanf("%s",nama);
    lenn=strlen(nama);
    for(i=0;i<n;i++) {
        scanf("%s",ban);
        len=strlen(ban);
        flg=0;
        for(j=0;j<len;j++)   {
			for(k=1;k+j<len;k++) {
				f2=1;
				for(ii=0;ii<lenn;ii++)   {
					if(j+k*ii>=len)    {
						f2=0;
						break;
					}
					if(nama[ii]!=ban[j+k*ii]) {
						f2=0;
						break;
					}
				}
				if(f2==1)   {
					flg=1;
					k=len; j=len;
				}
			}
        }
        if(flg==1)  {
            cnt++;
        }
    }
    printf("%d\n",cnt);
    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
	subq	$192, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -164(%rbp)
	leaq	-184(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-144(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-144(%rbp), %rax
	movq	%rax, %rdi
	call	strlen@PLT
	movl	%eax, -152(%rbp)
	movl	$0, -180(%rbp)
	jmp	.L2
.L14:
	leaq	-112(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-112(%rbp), %rax
	movq	%rax, %rdi
	call	strlen@PLT
	movl	%eax, -148(%rbp)
	movl	$0, -160(%rbp)
	movl	$0, -176(%rbp)
	jmp	.L3
.L12:
	movl	$1, -172(%rbp)
	jmp	.L4
.L11:
	movl	$1, -156(%rbp)
	movl	$0, -168(%rbp)
	jmp	.L5
.L9:
	movl	-172(%rbp), %eax
	imull	-168(%rbp), %eax
	movl	%eax, %edx
	movl	-176(%rbp), %eax
	addl	%edx, %eax
	cmpl	%eax, -148(%rbp)
	jg	.L6
	movl	$0, -156(%rbp)
	jmp	.L7
.L6:
	movl	-168(%rbp), %eax
	cltq
	movzbl	-144(%rbp,%rax), %edx
	movl	-172(%rbp), %eax
	imull	-168(%rbp), %eax
	movl	%eax, %ecx
	movl	-176(%rbp), %eax
	addl	%ecx, %eax
	cltq
	movzbl	-112(%rbp,%rax), %eax
	cmpb	%al, %dl
	je	.L8
	movl	$0, -156(%rbp)
	jmp	.L7
.L8:
	addl	$1, -168(%rbp)
.L5:
	movl	-168(%rbp), %eax
	cmpl	-152(%rbp), %eax
	jl	.L9
.L7:
	cmpl	$1, -156(%rbp)
	jne	.L10
	movl	$1, -160(%rbp)
	movl	-148(%rbp), %eax
	movl	%eax, -172(%rbp)
	movl	-148(%rbp), %eax
	movl	%eax, -176(%rbp)
.L10:
	addl	$1, -172(%rbp)
.L4:
	movl	-172(%rbp), %edx
	movl	-176(%rbp), %eax
	addl	%edx, %eax
	cmpl	%eax, -148(%rbp)
	jg	.L11
	addl	$1, -176(%rbp)
.L3:
	movl	-176(%rbp), %eax
	cmpl	-148(%rbp), %eax
	jl	.L12
	cmpl	$1, -160(%rbp)
	jne	.L13
	addl	$1, -164(%rbp)
.L13:
	addl	$1, -180(%rbp)
.L2:
	movl	-184(%rbp), %eax
	cmpl	%eax, -180(%rbp)
	jl	.L14
	movl	-164(%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	.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	"%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
	subq	$192, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -164(%rbp)
	leaq	-184(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-144(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-144(%rbp), %rax
	movq	%rax, %rdi
	call	strlen@PLT
	movl	%eax, -152(%rbp)
	movl	$0, -180(%rbp)
	jmp	.L2
.L14:
	leaq	-112(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	-112(%rbp), %rax
	movq	%rax, %rdi
	call	strlen@PLT
	movl	%eax, -148(%rbp)
	movl	$0, -160(%rbp)
	movl	$0, -176(%rbp)
	jmp	.L3
.L12:
	movl	$1, -172(%rbp)
	jmp	.L4
.L11:
	movl	$1, -156(%rbp)
	movl	$0, -168(%rbp)
	jmp	.L5
.L9:
	movl	-172(%rbp), %eax
	imull	-168(%rbp), %eax
	movl	%eax, %edx
	movl	-176(%rbp), %eax
	addl	%edx, %eax
	cmpl	%eax, -148(%rbp)
	jg	.L6
	movl	$0, -156(%rbp)
	jmp	.L7
.L6:
	movl	-168(%rbp), %eax
	cltq
	movzbl	-144(%rbp,%rax), %edx
	movl	-172(%rbp), %eax
	imull	-168(%rbp), %eax
	movl	%eax, %ecx
	movl	-176(%rbp), %eax
	addl	%ecx, %eax
	cltq
	movzbl	-112(%rbp,%rax), %eax
	cmpb	%al, %dl
	je	.L8
	movl	$0, -156(%rbp)
	jmp	.L7
.L8:
	addl	$1, -168(%rbp)
.L5:
	movl	-168(%rbp), %eax
	cmpl	-152(%rbp), %eax
	jl	.L9
.L7:
	cmpl	$1, -156(%rbp)
	jne	.L10
	movl	$1, -160(%rbp)
	movl	-148(%rbp), %eax
	movl	%eax, -172(%rbp)
	movl	-148(%rbp), %eax
	movl	%eax, -176(%rbp)
.L10:
	addl	$1, -172(%rbp)
.L4:
	movl	-172(%rbp), %edx
	movl	-176(%rbp), %eax
	addl	%edx, %eax
	cmpl	%eax, -148(%rbp)
	jg	.L11
	addl	$1, -176(%rbp)
.L3:
	movl	-176(%rbp), %eax
	cmpl	-148(%rbp), %eax
	jl	.L12
	cmpl	$1, -160(%rbp)
	jne	.L13
	addl	$1, -164(%rbp)
.L13:
	addl	$1, -180(%rbp)
.L2:
	movl	-184(%rbp), %eax
	cmpl	%eax, -180(%rbp)
	jl	.L14
	movl	-164(%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	.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:
