Given the following C code and 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,c=0,l,i,j,m;
  char s[101],k[101];
  scanf("%d %s",&n,s);
  while(n--){
    scanf("%s",k);
    l=strlen(k);
    for(i=0;i<l;i++){
      if(s[0]-k[i])continue;
      for(j=1;i+j<l;j++){
	if(s[1]-k[i+j])continue;
	for(m=0;i+j*m<l;m++){
	  if(s[m]==0)break;
	  if(s[m]-k[i+j*m])break;
	}
	if(s[m]==0){
	  c++;//printf("%d\n",n);
	  i=j=l;
	}
      }	
    }
  }
  printf("%d\n",c);
  return 0;
}
  ```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d %s"
.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	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	leaq	.LC0(%rip), %rdi
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	subq	$240, %rsp
	.cfi_def_cfa_offset 288
	movq	%fs:40, %rax
	movq	%rax, 232(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rdx
	leaq	12(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %r12d
	leal	-1(%r12), %eax
	movl	%eax, 12(%rsp)
	testl	%r12d, %r12d
	je	.L2
	xorl	%r12d, %r12d
	leaq	128(%rsp), %r13
	leaq	15(%rsp), %rbp
	leaq	.LC1(%rip), %rbx
	.p2align 4,,10
	.p2align 3
.L14:
	movq	%r13, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movq	%r13, %rdi
	call	strlen@PLT
	movl	%eax, %edi
	testq	%rax, %rax
	je	.L3
	movzbl	16(%rsp), %r10d
	movzbl	17(%rsp), %r8d
	xorl	%ecx, %ecx
	leal	-1(%rax), %r9d
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L16:
	movl	%eax, %ecx
	cmpl	%ecx, %edi
	jle	.L3
.L13:
	movslq	%ecx, %rdx
	leal	1(%rcx), %eax
	cmpb	128(%rsp,%rdx), %r10b
	jne	.L16
	cmpl	%eax, %edi
	jle	.L3
	movl	$1, %esi
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L5:
	addl	$1, %esi
	leal	(%rcx,%rsi), %eax
	cmpl	%edi, %eax
	jge	.L38
.L12:
	cltq
	cmpb	128(%rsp,%rax), %r8b
	jne	.L5
	cmpl	%ecx, %edi
	jle	.L17
	cmpl	$1, %esi
	jne	.L39
	movl	%r9d, %r14d
	movslq	%ecx, %r11
	movl	$1, %eax
	subl	%ecx, %r14d
	addq	%r13, %r11
	addq	$2, %r14
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L40:
	cmpb	%dl, -1(%r11,%rax)
	jne	.L5
	movslq	%eax, %rdx
	addq	$1, %rax
	cmpq	%rax, %r14
	je	.L10
.L11:
	movzbl	0(%rbp,%rax), %edx
	testb	%dl, %dl
	jne	.L40
	addl	$1, %r12d
	movl	%edi, %esi
	movl	%edi, %ecx
.L42:
	addl	$1, %esi
	leal	(%rcx,%rsi), %eax
	cmpl	%edi, %eax
	jl	.L12
	.p2align 4,,10
	.p2align 3
.L38:
	addl	$1, %ecx
	cmpl	%ecx, %edi
	jg	.L13
	.p2align 4,,10
	.p2align 3
.L3:
	movl	12(%rsp), %eax
	leal	-1(%rax), %edx
	movl	%edx, 12(%rsp)
	testl	%eax, %eax
	jne	.L14
.L2:
	xorl	%eax, %eax
	movl	%r12d, %edx
	movl	$1, %edi
	leaq	.LC2(%rip), %rsi
	call	__printf_chk@PLT
	movq	232(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L41
	addq	$240, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	xorl	%eax, %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
	.p2align 4,,10
	.p2align 3
.L10:
	.cfi_restore_state
	movzbl	16(%rsp,%rdx), %eax
.L6:
	testb	%al, %al
	jne	.L5
	addl	$1, %r12d
	movl	%edi, %esi
	movl	%edi, %ecx
	jmp	.L42
	.p2align 4,,10
	.p2align 3
.L39:
	movslq	%esi, %r14
	movslq	%ecx, %r11
	movl	$1, %eax
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L43:
	cmpb	0(%r13,%r11), %dl
	jne	.L5
	addq	%r14, %r11
	movslq	%eax, %rdx
	addq	$1, %rax
	cmpl	%r11d, %edi
	jle	.L10
.L9:
	movzbl	0(%rbp,%rax), %edx
	testb	%dl, %dl
	jne	.L43
	addl	$1, %r12d
	movl	%edi, %esi
	movl	%edi, %ecx
	jmp	.L42
.L17:
	movl	%r10d, %eax
	jmp	.L6
.L41:
	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:
```

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.
Optimized Assembly Code:

user
```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d %s"
.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	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	leaq	.LC0(%rip), %rdi
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	subq	$240, %rsp
	.cfi_def_cfa_offset 288
	movq	%fs:40, %rax
	movq	%rax, 232(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rdx
	leaq	12(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %r12d
	leal	-1(%r12), %eax
	movl	%eax, 12(%rsp)
	testl	%r12d, %r12d
	je	.L2
	xorl	%r12d, %r12d
	leaq	128(%rsp), %r13
	leaq	15(%rsp), %rbp
	leaq	.LC1(%rip), %rbx
	.p2align 4,,10
	.p2align 3
.L14:
	movq	%r13, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movq	%r13, %rdi
	call	strlen@PLT
	movl	%eax, %edi
	testq	%rax, %rax
	je	.L3
	movzbl	16(%rsp), %r10d
	movzbl	17(%rsp), %r8d
	xorl	%ecx, %ecx
	leal	-1(%rax), %r9d
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L16:
	movl	%eax, %ecx
	cmpl	%ecx, %edi
	jle	.L3
.L13:
	movslq	%ecx, %rdx
	leal	1(%rcx), %eax
	cmpb	128(%rsp,%rdx), %r10b
	jne	.L16
	cmpl	%eax, %edi
	jle	.L3
	movl	$1, %esi
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L5:
	addl	$1, %esi
	leal	(%rcx,%rsi), %eax
	cmpl	%edi, %eax
	jge	.L38
.L12:
	cltq
	cmpb	128(%rsp,%rax), %r8b
	jne	.L5
	cmpl	%ecx, %edi
	jle	.L17
	cmpl	$1, %esi
	jne	.L39
	movl	%r9d, %r14d
	movslq	%ecx, %r11
	movl	$1, %eax
	subl	%ecx, %r14d
	addq	%r13, %r11
	addq	$2, %r14
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L40:
	cmpb	%dl, -1(%r11,%rax)
	jne	.L5
	movslq	%eax, %rdx
	addq	$1, %rax
	cmpq	%rax, %r14
	je	.L10
.L11:
	movzbl	0(%rbp,%rax), %edx
	testb	%dl, %dl
	jne	.L40
	addl	$1, %r12d
	movl	%edi, %esi
	movl	%edi, %ecx
.L42:
	addl	$1, %esi
	leal	(%rcx,%rsi), %eax
	cmpl	%edi, %eax
	jl	.L12
	.p2align 4,,10
	.p2align 3
.L38:
	addl	$1, %ecx
	cmpl	%ecx, %edi
	jg	.L13
	.p2align 4,,10
	.p2align 3
.L3:
	movl	12(%rsp), %eax
	leal	-1(%rax), %edx
	movl	%edx, 12(%rsp)
	testl	%eax, %eax
	jne	.L14
.L2:
	xorl	%eax, %eax
	movl	%r12d, %edx
	movl	$1, %edi
	leaq	.LC2(%rip), %rsi
	call	__printf_chk@PLT
	movq	232(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L41
	addq	$240, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	xorl	%eax, %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
	.p2align 4,,10
	.p2align 3
.L10:
	.cfi_restore_state
	movzbl	16(%rsp,%rdx), %eax
.L6:
	testb	%al, %al
	jne	.L5
	addl	$1, %r12d
	movl	%edi, %esi
	movl	%edi, %ecx
	jmp	.L42
	.p2align 4,,10
	.p2align 3
.L39:
	movslq	%esi, %r14
	movslq	%ecx, %r11
	movl	$1, %eax
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L43:
	cmpb	0(%r13,%r11), %dl
	jne	.L5
	addq	%r14, %r11
	movslq	%eax, %rdx
	addq	$1, %rax
	cmpl	%r11d, %edi
	jle	.L10
.L9:
	movzbl	0(%rbp,%rax), %edx
	testb	%dl, %dl
	jne	.L43
	addl	$1, %r12d
	movl	%edi, %esi
	movl	%edi, %ecx
	jmp	.L42
.L17:
	movl	%r10d, %eax
	jmp	.L6
.L41:
	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
```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d %s"
.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	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	leaq	.LC0(%rip), %rdi
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	subq	$240, %rsp
	.cfi_def_cfa_offset 288
	movq	%fs:40, %rax
	movq	%rax, 232(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rdx
	leaq	12(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %r12d
	leal	-1(%r12), %eax
	movl	%eax, 12(%rsp)
	testl	%r12d, %r12d
	je	.L2
	xorl	%r12d, %r12d
	leaq	128(%rsp), %r13
	leaq	15(%rsp), %rbp
	leaq	.LC1(%rip), %rbx
	.p2align 4,,10
	.p2align 3
.L14:
	movq	%r13, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movq	%r13, %rdi
	call	strlen@PLT
	movl	%eax, %edi
	testq	%rax, %rax
	je	.L3
	movzbl	16(%rsp), %r10d
	movzbl	17(%rsp), %r8d
	xorl	%ecx, %ecx
	leal	-1(%rax), %r9d
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L16:
	movl	%eax, %ecx
	cmpl	%ecx, %edi
	jle	.L3
.L13:
	movslq	%ecx, %rdx
	leal	1(%rcx), %eax
	cmpb	128(%rsp,%rdx), %r10b
	jne	.L16
	cmpl	%eax, %edi
	jle	.L3
	movl	$1, %esi
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L5:
	addl	$1, %esi
	leal	(%rcx,%rsi), %eax
	cmpl	%edi, %eax
	jge	.L38
.L12:
	cltq
	cmpb	128(%rsp,%rax), %r8b
	jne	.L5
	cmpl	%ecx, %edi
	jle	.L17
	cmpl	$1, %esi
	jne	.L39
	movl	%r9d, %r14d
	movslq	%ecx, %r11
	movl	$1, %eax
	subl	%ecx, %r14d
	addq	%r13, %r11
	addq	$2, %r14
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L40:
	cmpb	%dl, -1(%r11,%rax)
	jne	.L5
	movslq	%eax, %rdx
	addq	$1, %rax
	cmpq	%rax, %r14
	je	.L10
.L11:
	movzbl	0(%rbp,%rax), %edx
	testb	%dl, %dl
	jne	.L40
	addl	$1, %r12d
	movl	%edi, %esi
	movl	%edi, %ecx
.L42:
	addl	$1, %esi
	leal	(%rcx,%rsi), %eax
	cmpl	%edi, %eax
	jl	.L12
	.p2align 4,,10
	.p2align 3
.L38:
	addl	$1, %ecx
	cmpl	%ecx, %edi
	jg	.L13
	.p2align 4,,10
	.p2align 3
.L3:
	movl	12(%rsp), %eax
	leal	-1(%rax), %edx
	movl	%edx, 12(%rsp)
	testl	%eax, %eax
	jne	.L14
.L2:
	xorl	%eax, %eax
	movl	%r12d, %edx
	movl	$1, %edi
	leaq	.LC2(%rip), %rsi
	call	__printf_chk@PLT
	movq	232(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L41
	addq	$240, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	xorl	%eax, %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
	.p2align 4,,10
	.p2align 3
.L10:
	.cfi_restore_state
	movzbl	16(%rsp,%rdx), %eax
.L6:
	testb	%al, %al
	jne	.L5
	addl	$1, %r12d
	movl	%edi, %esi
	movl	%edi, %ecx
	jmp	.L42
	.p2align 4,,10
	.p2align 3
.L39:
	movslq	%esi, %r14
	movslq	%ecx, %r11
	movl	$1, %eax
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L43:
	cmpb	0(%r13,%r11), %dl
	jne	.L5
	addq	%r14, %r11
	movslq	%eax, %rdx
	addq	$1, %rax
	cmpl	%r11d, %edi
	jle	.L10
.L9:
	movzbl	0(%rbp,%rax), %edx
	testb	%dl, %dl
	jne	.L43
	addl	$1, %r12d
	movl	%edi, %esi
	movl	%edi, %ecx
	jmp	.L42
.L17:
	movl	%r10d, %eax
	jmp	.L6
.L41:
	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:
```
```c
#include<stdio.h>
#include<string.h>
int main(){
  int n,c=0,l,i,j,m;
  char s[101],k[101];
  scanf("%d %s",&n,s);
  while(n--){
    scanf("%s",k);
    l=strlen(k);
    for(i=0;i<l;i++){
      if(s[0]-k[i])continue;
      for(j=1;i+j<l;j++){
	if(s[1]-k[i+j])continue;
	for(m=0;i+j*m<l;m++){
	  if(s[m]==0)break;
	  if(s[m]-k[i+j*m])break;
	}
	if(s[m]==0){
	  c++;//printf("%d\n",n);
	  i=j=l;
	}
      }	
    }
  }
  printf("%d\n",c);
  return 0;
}
  ```
Given the following C 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,c=0,l,i,j,m;
  char s[101],k[101];
  scanf("%d %s",&n,s);
  while(n--){
    scanf("%s",k);
    l=strlen(k);
    for(i=0;i<l;i++){
      if(s[0]-k[i])continue;
      for(j=1;i+j<l;j++){
	if(s[1]-k[i+j])continue;
	for(m=0;i+j*m<l;m++){
	  if(s[m]==0)break;
	  if(s[m]-k[i+j*m])break;
	}
	if(s[m]==0){
	  c++;//printf("%d\n",n);
	  i=j=l;
	}
      }	
    }
  }
  printf("%d\n",c);
  return 0;
}
  ```

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.
Optimized Assembly Code:

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 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,c=0,l,i,j,m;
  char s[101],k[101];
  scanf("%d %s",&n,s);
  while(n--){
    scanf("%s",k);
    l=strlen(k);
    for(i=0;i<l;i++){
      if(s[0]-k[i])continue;
      for(j=1;i+j<l;j++){
	if(s[1]-k[i+j])continue;
	for(m=0;i+j*m<l;m++){
	  if(s[m]==0)break;
	  if(s[m]-k[i+j*m])break;
	}
	if(s[m]==0){
	  c++;//printf("%d\n",n);
	  i=j=l;
	}
      }	
    }
  }
  printf("%d\n",c);
  return 0;
}
  ```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d %s"
.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	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	leaq	.LC0(%rip), %rdi
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	subq	$240, %rsp
	.cfi_def_cfa_offset 288
	movq	%fs:40, %rax
	movq	%rax, 232(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rdx
	leaq	12(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %r12d
	leal	-1(%r12), %eax
	movl	%eax, 12(%rsp)
	testl	%r12d, %r12d
	je	.L2
	xorl	%r12d, %r12d
	leaq	128(%rsp), %r13
	leaq	15(%rsp), %rbp
	leaq	.LC1(%rip), %rbx
	.p2align 4,,10
	.p2align 3
.L14:
	movq	%r13, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movq	%r13, %rdi
	call	strlen@PLT
	movl	%eax, %edi
	testq	%rax, %rax
	je	.L3
	movzbl	16(%rsp), %r10d
	movzbl	17(%rsp), %r8d
	xorl	%ecx, %ecx
	leal	-1(%rax), %r9d
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L16:
	movl	%eax, %ecx
	cmpl	%ecx, %edi
	jle	.L3
.L13:
	movslq	%ecx, %rdx
	leal	1(%rcx), %eax
	cmpb	128(%rsp,%rdx), %r10b
	jne	.L16
	cmpl	%eax, %edi
	jle	.L3
	movl	$1, %esi
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L5:
	addl	$1, %esi
	leal	(%rcx,%rsi), %eax
	cmpl	%edi, %eax
	jge	.L38
.L12:
	cltq
	cmpb	128(%rsp,%rax), %r8b
	jne	.L5
	cmpl	%ecx, %edi
	jle	.L17
	cmpl	$1, %esi
	jne	.L39
	movl	%r9d, %r14d
	movslq	%ecx, %r11
	movl	$1, %eax
	subl	%ecx, %r14d
	addq	%r13, %r11
	addq	$2, %r14
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L40:
	cmpb	%dl, -1(%r11,%rax)
	jne	.L5
	movslq	%eax, %rdx
	addq	$1, %rax
	cmpq	%rax, %r14
	je	.L10
.L11:
	movzbl	0(%rbp,%rax), %edx
	testb	%dl, %dl
	jne	.L40
	addl	$1, %r12d
	movl	%edi, %esi
	movl	%edi, %ecx
.L42:
	addl	$1, %esi
	leal	(%rcx,%rsi), %eax
	cmpl	%edi, %eax
	jl	.L12
	.p2align 4,,10
	.p2align 3
.L38:
	addl	$1, %ecx
	cmpl	%ecx, %edi
	jg	.L13
	.p2align 4,,10
	.p2align 3
.L3:
	movl	12(%rsp), %eax
	leal	-1(%rax), %edx
	movl	%edx, 12(%rsp)
	testl	%eax, %eax
	jne	.L14
.L2:
	xorl	%eax, %eax
	movl	%r12d, %edx
	movl	$1, %edi
	leaq	.LC2(%rip), %rsi
	call	__printf_chk@PLT
	movq	232(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L41
	addq	$240, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	xorl	%eax, %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
	.p2align 4,,10
	.p2align 3
.L10:
	.cfi_restore_state
	movzbl	16(%rsp,%rdx), %eax
.L6:
	testb	%al, %al
	jne	.L5
	addl	$1, %r12d
	movl	%edi, %esi
	movl	%edi, %ecx
	jmp	.L42
	.p2align 4,,10
	.p2align 3
.L39:
	movslq	%esi, %r14
	movslq	%ecx, %r11
	movl	$1, %eax
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L43:
	cmpb	0(%r13,%r11), %dl
	jne	.L5
	addq	%r14, %r11
	movslq	%eax, %rdx
	addq	$1, %rax
	cmpl	%r11d, %edi
	jle	.L10
.L9:
	movzbl	0(%rbp,%rax), %edx
	testb	%dl, %dl
	jne	.L43
	addl	$1, %r12d
	movl	%edi, %esi
	movl	%edi, %ecx
	jmp	.L42
.L17:
	movl	%r10d, %eax
	jmp	.L6
.L41:
	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:
```

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.
Optimized Assembly Code:

train
```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d %s"
.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	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	leaq	.LC0(%rip), %rdi
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	subq	$240, %rsp
	.cfi_def_cfa_offset 288
	movq	%fs:40, %rax
	movq	%rax, 232(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rdx
	leaq	12(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %r12d
	leal	-1(%r12), %eax
	movl	%eax, 12(%rsp)
	testl	%r12d, %r12d
	je	.L2
	xorl	%r12d, %r12d
	leaq	128(%rsp), %r13
	leaq	15(%rsp), %rbp
	leaq	.LC1(%rip), %rbx
	.p2align 4,,10
	.p2align 3
.L14:
	movq	%r13, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movq	%r13, %rdi
	call	strlen@PLT
	movl	%eax, %edi
	testq	%rax, %rax
	je	.L3
	movzbl	16(%rsp), %r10d
	movzbl	17(%rsp), %r8d
	xorl	%ecx, %ecx
	leal	-1(%rax), %r9d
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L16:
	movl	%eax, %ecx
	cmpl	%ecx, %edi
	jle	.L3
.L13:
	movslq	%ecx, %rdx
	leal	1(%rcx), %eax
	cmpb	128(%rsp,%rdx), %r10b
	jne	.L16
	cmpl	%eax, %edi
	jle	.L3
	movl	$1, %esi
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L5:
	addl	$1, %esi
	leal	(%rcx,%rsi), %eax
	cmpl	%edi, %eax
	jge	.L38
.L12:
	cltq
	cmpb	128(%rsp,%rax), %r8b
	jne	.L5
	cmpl	%ecx, %edi
	jle	.L17
	cmpl	$1, %esi
	jne	.L39
	movl	%r9d, %r14d
	movslq	%ecx, %r11
	movl	$1, %eax
	subl	%ecx, %r14d
	addq	%r13, %r11
	addq	$2, %r14
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L40:
	cmpb	%dl, -1(%r11,%rax)
	jne	.L5
	movslq	%eax, %rdx
	addq	$1, %rax
	cmpq	%rax, %r14
	je	.L10
.L11:
	movzbl	0(%rbp,%rax), %edx
	testb	%dl, %dl
	jne	.L40
	addl	$1, %r12d
	movl	%edi, %esi
	movl	%edi, %ecx
.L42:
	addl	$1, %esi
	leal	(%rcx,%rsi), %eax
	cmpl	%edi, %eax
	jl	.L12
	.p2align 4,,10
	.p2align 3
.L38:
	addl	$1, %ecx
	cmpl	%ecx, %edi
	jg	.L13
	.p2align 4,,10
	.p2align 3
.L3:
	movl	12(%rsp), %eax
	leal	-1(%rax), %edx
	movl	%edx, 12(%rsp)
	testl	%eax, %eax
	jne	.L14
.L2:
	xorl	%eax, %eax
	movl	%r12d, %edx
	movl	$1, %edi
	leaq	.LC2(%rip), %rsi
	call	__printf_chk@PLT
	movq	232(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L41
	addq	$240, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	xorl	%eax, %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
	.p2align 4,,10
	.p2align 3
.L10:
	.cfi_restore_state
	movzbl	16(%rsp,%rdx), %eax
.L6:
	testb	%al, %al
	jne	.L5
	addl	$1, %r12d
	movl	%edi, %esi
	movl	%edi, %ecx
	jmp	.L42
	.p2align 4,,10
	.p2align 3
.L39:
	movslq	%esi, %r14
	movslq	%ecx, %r11
	movl	$1, %eax
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L43:
	cmpb	0(%r13,%r11), %dl
	jne	.L5
	addq	%r14, %r11
	movslq	%eax, %rdx
	addq	$1, %rax
	cmpl	%r11d, %edi
	jle	.L10
.L9:
	movzbl	0(%rbp,%rax), %edx
	testb	%dl, %dl
	jne	.L43
	addl	$1, %r12d
	movl	%edi, %esi
	movl	%edi, %ecx
	jmp	.L42
.L17:
	movl	%r10d, %eax
	jmp	.L6
.L41:
	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:
```