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>
char name[50];
int name_len;
char t[200];
int t_len;
int n,ans=0;
 
int check(int a,int b){
  int i;
  for(i=0;i<name_len;i++){
    if(a+b*i>=t_len || t[a+b*i]!=name[i]){
      return 0;
    }
  }
  return 1;
}
 
int solve(){
  scanf("%s",t);
  t_len=strlen(t);
  int i,j;
  for(i=0;i<t_len;i++){
    for(j=1;j<t_len;j++){
      if(check(i,j)==1){
        return 1;
      }
    }
  }
  return 0;
}
 
int main(){
  int i;
  scanf("%d",&n);
  scanf("%s",&name);
  name_len=strlen(name);
  for(i=0;i<n;i++){
    ans+=solve();
  }
  printf("%d\n",ans);
  return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	name
	.bss
	.align 32
	.type	name, @object
	.size	name, 50
name:
	.zero	50
	.globl	name_len
	.align 4
	.type	name_len, @object
	.size	name_len, 4
name_len:
	.zero	4
	.globl	t
	.align 32
	.type	t, @object
	.size	t, 200
t:
	.zero	200
	.globl	t_len
	.align 4
	.type	t_len, @object
	.size	t_len, 4
t_len:
	.zero	4
	.globl	n
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	ans
	.align 4
	.type	ans, @object
	.size	ans, 4
ans:
	.zero	4
	.text
	.globl	check
	.type	check, @function
check:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -20(%rbp)
	movl	%esi, -24(%rbp)
	movl	$0, -4(%rbp)
	jmp	.L2
.L6:
	movl	-24(%rbp), %eax
	imull	-4(%rbp), %eax
	movl	%eax, %edx
	movl	-20(%rbp), %eax
	addl	%eax, %edx
	movl	t_len(%rip), %eax
	cmpl	%eax, %edx
	jge	.L3
	movl	-24(%rbp), %eax
	imull	-4(%rbp), %eax
	movl	%eax, %edx
	movl	-20(%rbp), %eax
	addl	%edx, %eax
	cltq
	leaq	t(%rip), %rdx
	movzbl	(%rax,%rdx), %edx
	movl	-4(%rbp), %eax
	cltq
	leaq	name(%rip), %rcx
	movzbl	(%rax,%rcx), %eax
	cmpb	%al, %dl
	je	.L4
.L3:
	movl	$0, %eax
	jmp	.L5
.L4:
	addl	$1, -4(%rbp)
.L2:
	movl	name_len(%rip), %eax
	cmpl	%eax, -4(%rbp)
	jl	.L6
	movl	$1, %eax
.L5:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	check, .-check
	.section	.rodata
.LC0:
	.string	"%s"
	.text
	.globl	solve
	.type	solve, @function
solve:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	leaq	t(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	t(%rip), %rax
	movq	%rax, %rdi
	call	strlen@PLT
	movl	%eax, t_len(%rip)
	movl	$0, -8(%rbp)
	jmp	.L8
.L13:
	movl	$1, -4(%rbp)
	jmp	.L9
.L12:
	movl	-4(%rbp), %edx
	movl	-8(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	check
	cmpl	$1, %eax
	jne	.L10
	movl	$1, %eax
	jmp	.L11
.L10:
	addl	$1, -4(%rbp)
.L9:
	movl	t_len(%rip), %eax
	cmpl	%eax, -4(%rbp)
	jl	.L12
	addl	$1, -8(%rbp)
.L8:
	movl	t_len(%rip), %eax
	cmpl	%eax, -8(%rbp)
	jl	.L13
	movl	$0, %eax
.L11:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	solve, .-solve
	.section	.rodata
.LC1:
	.string	"%d"
.LC2:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB2:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	leaq	n(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	name(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	name(%rip), %rax
	movq	%rax, %rdi
	call	strlen@PLT
	movl	%eax, name_len(%rip)
	movl	$0, -4(%rbp)
	jmp	.L15
.L16:
	movl	$0, %eax
	call	solve
	movl	ans(%rip), %edx
	addl	%edx, %eax
	movl	%eax, ans(%rip)
	addl	$1, -4(%rbp)
.L15:
	movl	n(%rip), %eax
	cmpl	%eax, -4(%rbp)
	jl	.L16
	movl	ans(%rip), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.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
	.p2align 4
	.globl	check
	.type	check, @function
check:
.LFB35:
	.cfi_startproc
	endbr64
	movl	name_len(%rip), %r10d
	movl	%esi, %edx
	testl	%r10d, %r10d
	jle	.L6
	leaq	t(%rip), %r8
	movslq	%edi, %rcx
	movslq	%r10d, %r9
	xorl	%eax, %eax
	addq	%r8, %rcx
	movl	t_len(%rip), %esi
	leaq	name(%rip), %r8
	cmpl	$1, %edx
	je	.L5
	jmp	.L16
	.p2align 4,,10
	.p2align 3
.L17:
	movzbl	(%r8,%rax), %edx
	cmpb	%dl, (%rcx,%rax)
	jne	.L10
	addq	$1, %rax
	cmpq	%r9, %rax
	je	.L6
.L5:
	leal	(%rdi,%rax), %edx
	cmpl	%edx, %esi
	jg	.L17
.L10:
	xorl	%eax, %eax
	ret
	.p2align 4,,10
	.p2align 3
.L6:
	movl	$1, %eax
	ret
	.p2align 4,,10
	.p2align 3
.L16:
	leaq	t(%rip), %rax
	movslq	%edi, %rcx
	movslq	%edx, %r9
	addq	%rax, %rcx
	movq	%r8, %rax
	leal	-1(%r10), %r8d
	leaq	1(%rax), %r10
	addq	%r10, %r8
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L18:
	movzbl	(%rax), %r11d
	cmpb	%r11b, (%rcx)
	jne	.L10
	addq	$1, %rax
	addl	%edx, %edi
	addq	%r9, %rcx
	cmpq	%r8, %rax
	je	.L6
.L4:
	cmpl	%edi, %esi
	jg	.L18
	jmp	.L10
	.cfi_endproc
.LFE35:
	.size	check, .-check
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%s"
	.text
	.p2align 4
	.globl	solve
	.type	solve, @function
solve:
.LFB36:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	.LC0(%rip), %rdi
	xorl	%eax, %eax
	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
	leaq	t(%rip), %rbx
	movq	%rbx, %rsi
	subq	$8, %rsp
	.cfi_def_cfa_offset 64
	call	__isoc99_scanf@PLT
	movq	%rbx, %rdi
	call	strlen@PLT
	movl	%eax, t_len(%rip)
	testq	%rax, %rax
	je	.L34
	movl	name_len(%rip), %r12d
	leal	-2(%rax), %ebp
	movl	%eax, %r10d
	movq	%rbx, %rcx
	leal	-1(%rax), %r13d
	xorl	%r11d, %r11d
	addq	$2, %rbp
	leal	-1(%r12), %edi
	leaq	name(%rip), %rsi
.L21:
	movl	$1, %r9d
	movl	%r13d, %r8d
	cmpl	$1, %r10d
	je	.L29
	.p2align 4,,10
	.p2align 3
.L30:
	testl	%r12d, %r12d
	jle	.L33
	cmpl	%r11d, %r10d
	jle	.L22
	xorl	%eax, %eax
	cmpq	$1, %r9
	je	.L24
	jmp	.L39
	.p2align 4,,10
	.p2align 3
.L40:
	cmpq	%rdi, %rax
	je	.L33
	leaq	1(%rax), %rdx
	cmpq	%r8, %rax
	je	.L22
	movq	%rdx, %rax
.L24:
	movzbl	(%rcx,%rax), %edx
	cmpb	%dl, (%rsi,%rax)
	je	.L40
.L22:
	addq	$1, %r9
	cmpq	%rbp, %r9
	jne	.L30
.L29:
	addl	$1, %r11d
	addq	$1, %rcx
	subl	$1, %r13d
	cmpl	%r11d, %r10d
	jne	.L21
.L34:
	addq	$8, %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
.L33:
	.cfi_restore_state
	addq	$8, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	movl	$1, %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
.L39:
	.cfi_restore_state
	movq	%rcx, %rdx
	leaq	name(%rip), %rax
	subq	%rbx, %rdx
	leaq	(%rax,%rdi), %r14
	jmp	.L23
	.p2align 4,,10
	.p2align 3
.L41:
	cmpq	%r14, %rax
	je	.L33
	addq	%r9, %rdx
	addq	$1, %rax
	cmpl	%edx, %r10d
	jle	.L22
.L23:
	movzbl	(%rax), %r15d
	cmpb	%r15b, (%rbx,%rdx)
	je	.L41
	addq	$1, %r9
	cmpq	%rbp, %r9
	jne	.L30
	jmp	.L29
	.cfi_endproc
.LFE36:
	.size	solve, .-solve
	.section	.rodata.str1.1
.LC1:
	.string	"%d"
.LC2:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB37:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	n(%rip), %rsi
	leaq	.LC1(%rip), %rdi
	xorl	%eax, %eax
	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
	leaq	name(%rip), %rbx
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	call	__isoc99_scanf@PLT
	movq	%rbx, %rsi
	leaq	.LC0(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movq	%rbx, %rdi
	call	strlen@PLT
	movl	%eax, name_len(%rip)
	movl	n(%rip), %eax
	testl	%eax, %eax
	jle	.L43
	xorl	%r12d, %r12d
	leaq	t(%rip), %rbp
.L54:
	movq	%rbp, %rsi
	leaq	.LC0(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movq	%rbp, %rdi
	call	strlen@PLT
	movl	%eax, t_len(%rip)
	movl	%eax, %r9d
	testq	%rax, %rax
	je	.L60
	movl	name_len(%rip), %r14d
	leal	-2(%rax), %r13d
	leal	-1(%rax), %r15d
	xorl	%r11d, %r11d
	leaq	t(%rip), %rcx
	addq	$2, %r13
	leal	-1(%r14), %esi
	leaq	(%rsi,%rbx), %r10
.L45:
	movl	$1, %r8d
	movl	%r15d, %edi
	cmpl	$1, %r9d
	je	.L53
	.p2align 4,,10
	.p2align 3
.L56:
	testl	%r14d, %r14d
	jle	.L59
	cmpl	%r11d, %r9d
	jle	.L46
	xorl	%eax, %eax
	cmpq	$1, %r8
	je	.L48
	jmp	.L70
	.p2align 4,,10
	.p2align 3
.L71:
	cmpq	%rsi, %rax
	je	.L59
	leaq	1(%rax), %rdx
	cmpq	%rdi, %rax
	je	.L46
	movq	%rdx, %rax
.L48:
	movzbl	(%rbx,%rax), %edx
	cmpb	%dl, (%rcx,%rax)
	je	.L71
.L46:
	addq	$1, %r8
	cmpq	%r13, %r8
	jne	.L56
.L53:
	addl	$1, %r11d
	addq	$1, %rcx
	subl	$1, %r15d
	cmpl	%r11d, %r9d
	jne	.L45
.L60:
	xorl	%eax, %eax
	.p2align 4,,10
	.p2align 3
.L44:
	addl	ans(%rip), %eax
	addl	$1, %r12d
	cmpl	%r12d, n(%rip)
	movl	%eax, ans(%rip)
	jg	.L54
	movl	%eax, %edx
.L55:
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	addq	$24, %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
.L59:
	.cfi_restore_state
	movl	$1, %eax
	jmp	.L44
	.p2align 4,,10
	.p2align 3
.L70:
	movq	%rcx, %rdx
	movq	%rcx, 8(%rsp)
	leaq	name(%rip), %rax
	subq	%rbp, %rdx
	jmp	.L47
	.p2align 4,,10
	.p2align 3
.L72:
	cmpq	%r10, %rax
	je	.L59
	addq	%r8, %rdx
	addq	$1, %rax
	cmpl	%edx, %r9d
	jle	.L67
.L47:
	movzbl	(%rax), %ecx
	cmpb	%cl, 0(%rbp,%rdx)
	je	.L72
.L67:
	addq	$1, %r8
	movq	8(%rsp), %rcx
	cmpq	%r13, %r8
	jne	.L56
	jmp	.L53
.L43:
	movl	ans(%rip), %edx
	jmp	.L55
	.cfi_endproc
.LFE37:
	.size	main, .-main
	.globl	ans
	.bss
	.align 4
	.type	ans, @object
	.size	ans, 4
ans:
	.zero	4
	.globl	n
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	t_len
	.align 4
	.type	t_len, @object
	.size	t_len, 4
t_len:
	.zero	4
	.globl	t
	.align 32
	.type	t, @object
	.size	t, 200
t:
	.zero	200
	.globl	name_len
	.align 4
	.type	name_len, @object
	.size	name_len, 4
name_len:
	.zero	4
	.globl	name
	.align 32
	.type	name, @object
	.size	name, 50
name:
	.zero	50
	.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
	.p2align 4
	.globl	check
	.type	check, @function
check:
.LFB35:
	.cfi_startproc
	endbr64
	movl	name_len(%rip), %r10d
	movl	%esi, %edx
	testl	%r10d, %r10d
	jle	.L6
	leaq	t(%rip), %r8
	movslq	%edi, %rcx
	movslq	%r10d, %r9
	xorl	%eax, %eax
	addq	%r8, %rcx
	movl	t_len(%rip), %esi
	leaq	name(%rip), %r8
	cmpl	$1, %edx
	je	.L5
	jmp	.L16
	.p2align 4,,10
	.p2align 3
.L17:
	movzbl	(%r8,%rax), %edx
	cmpb	%dl, (%rcx,%rax)
	jne	.L10
	addq	$1, %rax
	cmpq	%r9, %rax
	je	.L6
.L5:
	leal	(%rdi,%rax), %edx
	cmpl	%edx, %esi
	jg	.L17
.L10:
	xorl	%eax, %eax
	ret
	.p2align 4,,10
	.p2align 3
.L6:
	movl	$1, %eax
	ret
	.p2align 4,,10
	.p2align 3
.L16:
	leaq	t(%rip), %rax
	movslq	%edi, %rcx
	movslq	%edx, %r9
	addq	%rax, %rcx
	movq	%r8, %rax
	leal	-1(%r10), %r8d
	leaq	1(%rax), %r10
	addq	%r10, %r8
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L18:
	movzbl	(%rax), %r11d
	cmpb	%r11b, (%rcx)
	jne	.L10
	addq	$1, %rax
	addl	%edx, %edi
	addq	%r9, %rcx
	cmpq	%r8, %rax
	je	.L6
.L4:
	cmpl	%edi, %esi
	jg	.L18
	jmp	.L10
	.cfi_endproc
.LFE35:
	.size	check, .-check
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%s"
	.text
	.p2align 4
	.globl	solve
	.type	solve, @function
solve:
.LFB36:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	.LC0(%rip), %rdi
	xorl	%eax, %eax
	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
	leaq	t(%rip), %rbx
	movq	%rbx, %rsi
	subq	$8, %rsp
	.cfi_def_cfa_offset 64
	call	__isoc99_scanf@PLT
	movq	%rbx, %rdi
	call	strlen@PLT
	movl	%eax, t_len(%rip)
	testq	%rax, %rax
	je	.L34
	movl	name_len(%rip), %r12d
	leal	-2(%rax), %ebp
	movl	%eax, %r10d
	movq	%rbx, %rcx
	leal	-1(%rax), %r13d
	xorl	%r11d, %r11d
	addq	$2, %rbp
	leal	-1(%r12), %edi
	leaq	name(%rip), %rsi
.L21:
	movl	$1, %r9d
	movl	%r13d, %r8d
	cmpl	$1, %r10d
	je	.L29
	.p2align 4,,10
	.p2align 3
.L30:
	testl	%r12d, %r12d
	jle	.L33
	cmpl	%r11d, %r10d
	jle	.L22
	xorl	%eax, %eax
	cmpq	$1, %r9
	je	.L24
	jmp	.L39
	.p2align 4,,10
	.p2align 3
.L40:
	cmpq	%rdi, %rax
	je	.L33
	leaq	1(%rax), %rdx
	cmpq	%r8, %rax
	je	.L22
	movq	%rdx, %rax
.L24:
	movzbl	(%rcx,%rax), %edx
	cmpb	%dl, (%rsi,%rax)
	je	.L40
.L22:
	addq	$1, %r9
	cmpq	%rbp, %r9
	jne	.L30
.L29:
	addl	$1, %r11d
	addq	$1, %rcx
	subl	$1, %r13d
	cmpl	%r11d, %r10d
	jne	.L21
.L34:
	addq	$8, %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
.L33:
	.cfi_restore_state
	addq	$8, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	movl	$1, %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
.L39:
	.cfi_restore_state
	movq	%rcx, %rdx
	leaq	name(%rip), %rax
	subq	%rbx, %rdx
	leaq	(%rax,%rdi), %r14
	jmp	.L23
	.p2align 4,,10
	.p2align 3
.L41:
	cmpq	%r14, %rax
	je	.L33
	addq	%r9, %rdx
	addq	$1, %rax
	cmpl	%edx, %r10d
	jle	.L22
.L23:
	movzbl	(%rax), %r15d
	cmpb	%r15b, (%rbx,%rdx)
	je	.L41
	addq	$1, %r9
	cmpq	%rbp, %r9
	jne	.L30
	jmp	.L29
	.cfi_endproc
.LFE36:
	.size	solve, .-solve
	.section	.rodata.str1.1
.LC1:
	.string	"%d"
.LC2:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB37:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	n(%rip), %rsi
	leaq	.LC1(%rip), %rdi
	xorl	%eax, %eax
	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
	leaq	name(%rip), %rbx
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	call	__isoc99_scanf@PLT
	movq	%rbx, %rsi
	leaq	.LC0(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movq	%rbx, %rdi
	call	strlen@PLT
	movl	%eax, name_len(%rip)
	movl	n(%rip), %eax
	testl	%eax, %eax
	jle	.L43
	xorl	%r12d, %r12d
	leaq	t(%rip), %rbp
.L54:
	movq	%rbp, %rsi
	leaq	.LC0(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movq	%rbp, %rdi
	call	strlen@PLT
	movl	%eax, t_len(%rip)
	movl	%eax, %r9d
	testq	%rax, %rax
	je	.L60
	movl	name_len(%rip), %r14d
	leal	-2(%rax), %r13d
	leal	-1(%rax), %r15d
	xorl	%r11d, %r11d
	leaq	t(%rip), %rcx
	addq	$2, %r13
	leal	-1(%r14), %esi
	leaq	(%rsi,%rbx), %r10
.L45:
	movl	$1, %r8d
	movl	%r15d, %edi
	cmpl	$1, %r9d
	je	.L53
	.p2align 4,,10
	.p2align 3
.L56:
	testl	%r14d, %r14d
	jle	.L59
	cmpl	%r11d, %r9d
	jle	.L46
	xorl	%eax, %eax
	cmpq	$1, %r8
	je	.L48
	jmp	.L70
	.p2align 4,,10
	.p2align 3
.L71:
	cmpq	%rsi, %rax
	je	.L59
	leaq	1(%rax), %rdx
	cmpq	%rdi, %rax
	je	.L46
	movq	%rdx, %rax
.L48:
	movzbl	(%rbx,%rax), %edx
	cmpb	%dl, (%rcx,%rax)
	je	.L71
.L46:
	addq	$1, %r8
	cmpq	%r13, %r8
	jne	.L56
.L53:
	addl	$1, %r11d
	addq	$1, %rcx
	subl	$1, %r15d
	cmpl	%r11d, %r9d
	jne	.L45
.L60:
	xorl	%eax, %eax
	.p2align 4,,10
	.p2align 3
.L44:
	addl	ans(%rip), %eax
	addl	$1, %r12d
	cmpl	%r12d, n(%rip)
	movl	%eax, ans(%rip)
	jg	.L54
	movl	%eax, %edx
.L55:
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	addq	$24, %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
.L59:
	.cfi_restore_state
	movl	$1, %eax
	jmp	.L44
	.p2align 4,,10
	.p2align 3
.L70:
	movq	%rcx, %rdx
	movq	%rcx, 8(%rsp)
	leaq	name(%rip), %rax
	subq	%rbp, %rdx
	jmp	.L47
	.p2align 4,,10
	.p2align 3
.L72:
	cmpq	%r10, %rax
	je	.L59
	addq	%r8, %rdx
	addq	$1, %rax
	cmpl	%edx, %r9d
	jle	.L67
.L47:
	movzbl	(%rax), %ecx
	cmpb	%cl, 0(%rbp,%rdx)
	je	.L72
.L67:
	addq	$1, %r8
	movq	8(%rsp), %rcx
	cmpq	%r13, %r8
	jne	.L56
	jmp	.L53
.L43:
	movl	ans(%rip), %edx
	jmp	.L55
	.cfi_endproc
.LFE37:
	.size	main, .-main
	.globl	ans
	.bss
	.align 4
	.type	ans, @object
	.size	ans, 4
ans:
	.zero	4
	.globl	n
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	t_len
	.align 4
	.type	t_len, @object
	.size	t_len, 4
t_len:
	.zero	4
	.globl	t
	.align 32
	.type	t, @object
	.size	t, 200
t:
	.zero	200
	.globl	name_len
	.align 4
	.type	name_len, @object
	.size	name_len, 4
name_len:
	.zero	4
	.globl	name
	.align 32
	.type	name, @object
	.size	name, 50
name:
	.zero	50
	.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>
char name[50];
int name_len;
char t[200];
int t_len;
int n,ans=0;
 
int check(int a,int b){
  int i;
  for(i=0;i<name_len;i++){
    if(a+b*i>=t_len || t[a+b*i]!=name[i]){
      return 0;
    }
  }
  return 1;
}
 
int solve(){
  scanf("%s",t);
  t_len=strlen(t);
  int i,j;
  for(i=0;i<t_len;i++){
    for(j=1;j<t_len;j++){
      if(check(i,j)==1){
        return 1;
      }
    }
  }
  return 0;
}
 
int main(){
  int i;
  scanf("%d",&n);
  scanf("%s",&name);
  name_len=strlen(name);
  for(i=0;i<n;i++){
    ans+=solve();
  }
  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>
char name[50];
int name_len;
char t[200];
int t_len;
int n,ans=0;
 
int check(int a,int b){
  int i;
  for(i=0;i<name_len;i++){
    if(a+b*i>=t_len || t[a+b*i]!=name[i]){
      return 0;
    }
  }
  return 1;
}
 
int solve(){
  scanf("%s",t);
  t_len=strlen(t);
  int i,j;
  for(i=0;i<t_len;i++){
    for(j=1;j<t_len;j++){
      if(check(i,j)==1){
        return 1;
      }
    }
  }
  return 0;
}
 
int main(){
  int i;
  scanf("%d",&n);
  scanf("%s",&name);
  name_len=strlen(name);
  for(i=0;i<n;i++){
    ans+=solve();
  }
  printf("%d\n",ans);
  return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	name
	.bss
	.align 32
	.type	name, @object
	.size	name, 50
name:
	.zero	50
	.globl	name_len
	.align 4
	.type	name_len, @object
	.size	name_len, 4
name_len:
	.zero	4
	.globl	t
	.align 32
	.type	t, @object
	.size	t, 200
t:
	.zero	200
	.globl	t_len
	.align 4
	.type	t_len, @object
	.size	t_len, 4
t_len:
	.zero	4
	.globl	n
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	ans
	.align 4
	.type	ans, @object
	.size	ans, 4
ans:
	.zero	4
	.text
	.globl	check
	.type	check, @function
check:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -20(%rbp)
	movl	%esi, -24(%rbp)
	movl	$0, -4(%rbp)
	jmp	.L2
.L6:
	movl	-24(%rbp), %eax
	imull	-4(%rbp), %eax
	movl	%eax, %edx
	movl	-20(%rbp), %eax
	addl	%eax, %edx
	movl	t_len(%rip), %eax
	cmpl	%eax, %edx
	jge	.L3
	movl	-24(%rbp), %eax
	imull	-4(%rbp), %eax
	movl	%eax, %edx
	movl	-20(%rbp), %eax
	addl	%edx, %eax
	cltq
	leaq	t(%rip), %rdx
	movzbl	(%rax,%rdx), %edx
	movl	-4(%rbp), %eax
	cltq
	leaq	name(%rip), %rcx
	movzbl	(%rax,%rcx), %eax
	cmpb	%al, %dl
	je	.L4
.L3:
	movl	$0, %eax
	jmp	.L5
.L4:
	addl	$1, -4(%rbp)
.L2:
	movl	name_len(%rip), %eax
	cmpl	%eax, -4(%rbp)
	jl	.L6
	movl	$1, %eax
.L5:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	check, .-check
	.section	.rodata
.LC0:
	.string	"%s"
	.text
	.globl	solve
	.type	solve, @function
solve:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	leaq	t(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	t(%rip), %rax
	movq	%rax, %rdi
	call	strlen@PLT
	movl	%eax, t_len(%rip)
	movl	$0, -8(%rbp)
	jmp	.L8
.L13:
	movl	$1, -4(%rbp)
	jmp	.L9
.L12:
	movl	-4(%rbp), %edx
	movl	-8(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	check
	cmpl	$1, %eax
	jne	.L10
	movl	$1, %eax
	jmp	.L11
.L10:
	addl	$1, -4(%rbp)
.L9:
	movl	t_len(%rip), %eax
	cmpl	%eax, -4(%rbp)
	jl	.L12
	addl	$1, -8(%rbp)
.L8:
	movl	t_len(%rip), %eax
	cmpl	%eax, -8(%rbp)
	jl	.L13
	movl	$0, %eax
.L11:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	solve, .-solve
	.section	.rodata
.LC1:
	.string	"%d"
.LC2:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB2:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	leaq	n(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	name(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	name(%rip), %rax
	movq	%rax, %rdi
	call	strlen@PLT
	movl	%eax, name_len(%rip)
	movl	$0, -4(%rbp)
	jmp	.L15
.L16:
	movl	$0, %eax
	call	solve
	movl	ans(%rip), %edx
	addl	%edx, %eax
	movl	%eax, ans(%rip)
	addl	$1, -4(%rbp)
.L15:
	movl	n(%rip), %eax
	cmpl	%eax, -4(%rbp)
	jl	.L16
	movl	ans(%rip), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.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
	.globl	name
	.bss
	.align 32
	.type	name, @object
	.size	name, 50
name:
	.zero	50
	.globl	name_len
	.align 4
	.type	name_len, @object
	.size	name_len, 4
name_len:
	.zero	4
	.globl	t
	.align 32
	.type	t, @object
	.size	t, 200
t:
	.zero	200
	.globl	t_len
	.align 4
	.type	t_len, @object
	.size	t_len, 4
t_len:
	.zero	4
	.globl	n
	.align 4
	.type	n, @object
	.size	n, 4
n:
	.zero	4
	.globl	ans
	.align 4
	.type	ans, @object
	.size	ans, 4
ans:
	.zero	4
	.text
	.globl	check
	.type	check, @function
check:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -20(%rbp)
	movl	%esi, -24(%rbp)
	movl	$0, -4(%rbp)
	jmp	.L2
.L6:
	movl	-24(%rbp), %eax
	imull	-4(%rbp), %eax
	movl	%eax, %edx
	movl	-20(%rbp), %eax
	addl	%eax, %edx
	movl	t_len(%rip), %eax
	cmpl	%eax, %edx
	jge	.L3
	movl	-24(%rbp), %eax
	imull	-4(%rbp), %eax
	movl	%eax, %edx
	movl	-20(%rbp), %eax
	addl	%edx, %eax
	cltq
	leaq	t(%rip), %rdx
	movzbl	(%rax,%rdx), %edx
	movl	-4(%rbp), %eax
	cltq
	leaq	name(%rip), %rcx
	movzbl	(%rax,%rcx), %eax
	cmpb	%al, %dl
	je	.L4
.L3:
	movl	$0, %eax
	jmp	.L5
.L4:
	addl	$1, -4(%rbp)
.L2:
	movl	name_len(%rip), %eax
	cmpl	%eax, -4(%rbp)
	jl	.L6
	movl	$1, %eax
.L5:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	check, .-check
	.section	.rodata
.LC0:
	.string	"%s"
	.text
	.globl	solve
	.type	solve, @function
solve:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	leaq	t(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	t(%rip), %rax
	movq	%rax, %rdi
	call	strlen@PLT
	movl	%eax, t_len(%rip)
	movl	$0, -8(%rbp)
	jmp	.L8
.L13:
	movl	$1, -4(%rbp)
	jmp	.L9
.L12:
	movl	-4(%rbp), %edx
	movl	-8(%rbp), %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	check
	cmpl	$1, %eax
	jne	.L10
	movl	$1, %eax
	jmp	.L11
.L10:
	addl	$1, -4(%rbp)
.L9:
	movl	t_len(%rip), %eax
	cmpl	%eax, -4(%rbp)
	jl	.L12
	addl	$1, -8(%rbp)
.L8:
	movl	t_len(%rip), %eax
	cmpl	%eax, -8(%rbp)
	jl	.L13
	movl	$0, %eax
.L11:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	solve, .-solve
	.section	.rodata
.LC1:
	.string	"%d"
.LC2:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB2:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	leaq	n(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	name(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	leaq	name(%rip), %rax
	movq	%rax, %rdi
	call	strlen@PLT
	movl	%eax, name_len(%rip)
	movl	$0, -4(%rbp)
	jmp	.L15
.L16:
	movl	$0, %eax
	call	solve
	movl	ans(%rip), %edx
	addl	%edx, %eax
	movl	%eax, ans(%rip)
	addl	$1, -4(%rbp)
.L15:
	movl	n(%rip), %eax
	cmpl	%eax, -4(%rbp)
	jl	.L16
	movl	ans(%rip), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.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:
