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>

char a[11],b[11],c[21];

int main(){
	int i,j,k,N,L,sum=0,s1;
	scanf("%s",&b);
	L=strlen(b);
	scanf("%d",&N);
	for(i=0;i<N;i++){
		
		scanf("%s",&a);
		strcpy(c,a);
		strcat(c,a);
		for(j=0;j<10;j++){
			if(c[j]==b[0]){
				if(L==1){
					sum++;
					goto tugi;
				}
				for(k=1;k<L-1;k++){
					if(c[j+k]!=b[k]){
						break;
					}
				}
				if(k==L-1){
					sum++;
					goto tugi;
				}
			}
		}
		tugi:;
	}
	printf("%d\n",sum);
	return 0;
}
	```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%s"
.LC1:
	.string	"%d"
.LC2:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	b(%rip), %rsi
	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	$40, %rsp
	.cfi_def_cfa_offset 96
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	leaq	b(%rip), %rdi
	call	strlen@PLT
	leaq	20(%rsp), %rsi
	leaq	.LC1(%rip), %rdi
	movq	%rax, (%rsp)
	movq	%rax, %rbx
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	20(%rsp), %eax
	testl	%eax, %eax
	jle	.L12
	movl	$0, 12(%rsp)
	leaq	c(%rip), %r12
	leal	-1(%rbx), %ebp
	xorl	%r14d, %r14d
	leaq	a(%rip), %r13
	leaq	10(%r12), %rbx
	.p2align 4,,10
	.p2align 3
.L10:
	movq	%r13, %rsi
	leaq	.LC0(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movq	%r12, %rdi
	movq	%r13, %rsi
	call	strcpy@PLT
	movq	%r12, %rdi
	movq	%r13, %rsi
	leaq	c(%rip), %r12
	call	strcat@PLT
	movzbl	8+b(%rip), %r15d
	leaq	b(%rip), %rax
	movzbl	1+b(%rip), %ecx
	movzbl	(%rax), %edx
	movzbl	2+b(%rip), %esi
	movq	%r12, %rax
	movb	%r15b, 11(%rsp)
	movzbl	3+b(%rip), %edi
	movzbl	4+b(%rip), %r8d
	movzbl	5+b(%rip), %r9d
	movzbl	6+b(%rip), %r10d
	movzbl	7+b(%rip), %r11d
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L3:
	addq	$1, %rax
	cmpq	%rbx, %rax
	je	.L7
.L9:
	cmpb	%dl, (%rax)
	jne	.L3
	cmpq	$1, (%rsp)
	je	.L23
	movl	$1, %r15d
	cmpl	$1, %ebp
	jle	.L6
	cmpb	%cl, 1(%rax)
	jne	.L3
	cmpl	$2, %ebp
	je	.L13
	cmpb	%sil, 2(%rax)
	jne	.L3
	cmpl	$3, %ebp
	je	.L14
	cmpb	%dil, 3(%rax)
	jne	.L3
	cmpl	$4, %ebp
	je	.L15
	cmpb	%r8b, 4(%rax)
	jne	.L3
	cmpl	$5, %ebp
	je	.L16
	cmpb	%r9b, 5(%rax)
	jne	.L3
	cmpl	$6, %ebp
	je	.L17
	cmpb	%r10b, 6(%rax)
	jne	.L3
	cmpl	$7, %ebp
	je	.L18
	cmpb	%r11b, 7(%rax)
	jne	.L3
	cmpl	$9, %ebp
	jne	.L19
	movzbl	11(%rsp), %r15d
	cmpb	%r15b, 8(%rax)
	jne	.L3
	movl	$9, %r15d
.L6:
	cmpl	%r15d, %ebp
	jne	.L3
.L23:
	addl	$1, 12(%rsp)
	.p2align 4,,10
	.p2align 3
.L7:
	addl	$1, %r14d
	cmpl	%r14d, 20(%rsp)
	jg	.L10
.L2:
	movl	12(%rsp), %edx
	xorl	%eax, %eax
	movl	$1, %edi
	leaq	.LC2(%rip), %rsi
	call	__printf_chk@PLT
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L25
	addq	$40, %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
.L13:
	.cfi_restore_state
	movl	$2, %r15d
	jmp	.L6
.L14:
	movl	$3, %r15d
	jmp	.L6
.L15:
	movl	$4, %r15d
	jmp	.L6
.L16:
	movl	$5, %r15d
	jmp	.L6
.L17:
	movl	$6, %r15d
	jmp	.L6
.L18:
	movl	$7, %r15d
	jmp	.L6
.L19:
	movl	$8, %r15d
	jmp	.L6
.L12:
	movl	$0, 12(%rsp)
	jmp	.L2
.L25:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.globl	c
	.bss
	.align 16
	.type	c, @object
	.size	c, 21
c:
	.zero	21
	.globl	b
	.align 8
	.type	b, @object
	.size	b, 11
b:
	.zero	11
	.globl	a
	.align 8
	.type	a, @object
	.size	a, 11
a:
	.zero	11
	.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	"%s"
.LC1:
	.string	"%d"
.LC2:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	b(%rip), %rsi
	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	$40, %rsp
	.cfi_def_cfa_offset 96
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	leaq	b(%rip), %rdi
	call	strlen@PLT
	leaq	20(%rsp), %rsi
	leaq	.LC1(%rip), %rdi
	movq	%rax, (%rsp)
	movq	%rax, %rbx
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	20(%rsp), %eax
	testl	%eax, %eax
	jle	.L12
	movl	$0, 12(%rsp)
	leaq	c(%rip), %r12
	leal	-1(%rbx), %ebp
	xorl	%r14d, %r14d
	leaq	a(%rip), %r13
	leaq	10(%r12), %rbx
	.p2align 4,,10
	.p2align 3
.L10:
	movq	%r13, %rsi
	leaq	.LC0(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movq	%r12, %rdi
	movq	%r13, %rsi
	call	strcpy@PLT
	movq	%r12, %rdi
	movq	%r13, %rsi
	leaq	c(%rip), %r12
	call	strcat@PLT
	movzbl	8+b(%rip), %r15d
	leaq	b(%rip), %rax
	movzbl	1+b(%rip), %ecx
	movzbl	(%rax), %edx
	movzbl	2+b(%rip), %esi
	movq	%r12, %rax
	movb	%r15b, 11(%rsp)
	movzbl	3+b(%rip), %edi
	movzbl	4+b(%rip), %r8d
	movzbl	5+b(%rip), %r9d
	movzbl	6+b(%rip), %r10d
	movzbl	7+b(%rip), %r11d
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L3:
	addq	$1, %rax
	cmpq	%rbx, %rax
	je	.L7
.L9:
	cmpb	%dl, (%rax)
	jne	.L3
	cmpq	$1, (%rsp)
	je	.L23
	movl	$1, %r15d
	cmpl	$1, %ebp
	jle	.L6
	cmpb	%cl, 1(%rax)
	jne	.L3
	cmpl	$2, %ebp
	je	.L13
	cmpb	%sil, 2(%rax)
	jne	.L3
	cmpl	$3, %ebp
	je	.L14
	cmpb	%dil, 3(%rax)
	jne	.L3
	cmpl	$4, %ebp
	je	.L15
	cmpb	%r8b, 4(%rax)
	jne	.L3
	cmpl	$5, %ebp
	je	.L16
	cmpb	%r9b, 5(%rax)
	jne	.L3
	cmpl	$6, %ebp
	je	.L17
	cmpb	%r10b, 6(%rax)
	jne	.L3
	cmpl	$7, %ebp
	je	.L18
	cmpb	%r11b, 7(%rax)
	jne	.L3
	cmpl	$9, %ebp
	jne	.L19
	movzbl	11(%rsp), %r15d
	cmpb	%r15b, 8(%rax)
	jne	.L3
	movl	$9, %r15d
.L6:
	cmpl	%r15d, %ebp
	jne	.L3
.L23:
	addl	$1, 12(%rsp)
	.p2align 4,,10
	.p2align 3
.L7:
	addl	$1, %r14d
	cmpl	%r14d, 20(%rsp)
	jg	.L10
.L2:
	movl	12(%rsp), %edx
	xorl	%eax, %eax
	movl	$1, %edi
	leaq	.LC2(%rip), %rsi
	call	__printf_chk@PLT
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L25
	addq	$40, %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
.L13:
	.cfi_restore_state
	movl	$2, %r15d
	jmp	.L6
.L14:
	movl	$3, %r15d
	jmp	.L6
.L15:
	movl	$4, %r15d
	jmp	.L6
.L16:
	movl	$5, %r15d
	jmp	.L6
.L17:
	movl	$6, %r15d
	jmp	.L6
.L18:
	movl	$7, %r15d
	jmp	.L6
.L19:
	movl	$8, %r15d
	jmp	.L6
.L12:
	movl	$0, 12(%rsp)
	jmp	.L2
.L25:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.globl	c
	.bss
	.align 16
	.type	c, @object
	.size	c, 21
c:
	.zero	21
	.globl	b
	.align 8
	.type	b, @object
	.size	b, 11
b:
	.zero	11
	.globl	a
	.align 8
	.type	a, @object
	.size	a, 11
a:
	.zero	11
	.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	"%s"
.LC1:
	.string	"%d"
.LC2:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	b(%rip), %rsi
	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	$40, %rsp
	.cfi_def_cfa_offset 96
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	leaq	b(%rip), %rdi
	call	strlen@PLT
	leaq	20(%rsp), %rsi
	leaq	.LC1(%rip), %rdi
	movq	%rax, (%rsp)
	movq	%rax, %rbx
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	20(%rsp), %eax
	testl	%eax, %eax
	jle	.L12
	movl	$0, 12(%rsp)
	leaq	c(%rip), %r12
	leal	-1(%rbx), %ebp
	xorl	%r14d, %r14d
	leaq	a(%rip), %r13
	leaq	10(%r12), %rbx
	.p2align 4,,10
	.p2align 3
.L10:
	movq	%r13, %rsi
	leaq	.LC0(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movq	%r12, %rdi
	movq	%r13, %rsi
	call	strcpy@PLT
	movq	%r12, %rdi
	movq	%r13, %rsi
	leaq	c(%rip), %r12
	call	strcat@PLT
	movzbl	8+b(%rip), %r15d
	leaq	b(%rip), %rax
	movzbl	1+b(%rip), %ecx
	movzbl	(%rax), %edx
	movzbl	2+b(%rip), %esi
	movq	%r12, %rax
	movb	%r15b, 11(%rsp)
	movzbl	3+b(%rip), %edi
	movzbl	4+b(%rip), %r8d
	movzbl	5+b(%rip), %r9d
	movzbl	6+b(%rip), %r10d
	movzbl	7+b(%rip), %r11d
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L3:
	addq	$1, %rax
	cmpq	%rbx, %rax
	je	.L7
.L9:
	cmpb	%dl, (%rax)
	jne	.L3
	cmpq	$1, (%rsp)
	je	.L23
	movl	$1, %r15d
	cmpl	$1, %ebp
	jle	.L6
	cmpb	%cl, 1(%rax)
	jne	.L3
	cmpl	$2, %ebp
	je	.L13
	cmpb	%sil, 2(%rax)
	jne	.L3
	cmpl	$3, %ebp
	je	.L14
	cmpb	%dil, 3(%rax)
	jne	.L3
	cmpl	$4, %ebp
	je	.L15
	cmpb	%r8b, 4(%rax)
	jne	.L3
	cmpl	$5, %ebp
	je	.L16
	cmpb	%r9b, 5(%rax)
	jne	.L3
	cmpl	$6, %ebp
	je	.L17
	cmpb	%r10b, 6(%rax)
	jne	.L3
	cmpl	$7, %ebp
	je	.L18
	cmpb	%r11b, 7(%rax)
	jne	.L3
	cmpl	$9, %ebp
	jne	.L19
	movzbl	11(%rsp), %r15d
	cmpb	%r15b, 8(%rax)
	jne	.L3
	movl	$9, %r15d
.L6:
	cmpl	%r15d, %ebp
	jne	.L3
.L23:
	addl	$1, 12(%rsp)
	.p2align 4,,10
	.p2align 3
.L7:
	addl	$1, %r14d
	cmpl	%r14d, 20(%rsp)
	jg	.L10
.L2:
	movl	12(%rsp), %edx
	xorl	%eax, %eax
	movl	$1, %edi
	leaq	.LC2(%rip), %rsi
	call	__printf_chk@PLT
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L25
	addq	$40, %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
.L13:
	.cfi_restore_state
	movl	$2, %r15d
	jmp	.L6
.L14:
	movl	$3, %r15d
	jmp	.L6
.L15:
	movl	$4, %r15d
	jmp	.L6
.L16:
	movl	$5, %r15d
	jmp	.L6
.L17:
	movl	$6, %r15d
	jmp	.L6
.L18:
	movl	$7, %r15d
	jmp	.L6
.L19:
	movl	$8, %r15d
	jmp	.L6
.L12:
	movl	$0, 12(%rsp)
	jmp	.L2
.L25:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.globl	c
	.bss
	.align 16
	.type	c, @object
	.size	c, 21
c:
	.zero	21
	.globl	b
	.align 8
	.type	b, @object
	.size	b, 11
b:
	.zero	11
	.globl	a
	.align 8
	.type	a, @object
	.size	a, 11
a:
	.zero	11
	.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>

char a[11],b[11],c[21];

int main(){
	int i,j,k,N,L,sum=0,s1;
	scanf("%s",&b);
	L=strlen(b);
	scanf("%d",&N);
	for(i=0;i<N;i++){
		
		scanf("%s",&a);
		strcpy(c,a);
		strcat(c,a);
		for(j=0;j<10;j++){
			if(c[j]==b[0]){
				if(L==1){
					sum++;
					goto tugi;
				}
				for(k=1;k<L-1;k++){
					if(c[j+k]!=b[k]){
						break;
					}
				}
				if(k==L-1){
					sum++;
					goto tugi;
				}
			}
		}
		tugi:;
	}
	printf("%d\n",sum);
	return 0;
}
	```
Given the following C code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include <stdio.h>

char a[11],b[11],c[21];

int main(){
	int i,j,k,N,L,sum=0,s1;
	scanf("%s",&b);
	L=strlen(b);
	scanf("%d",&N);
	for(i=0;i<N;i++){
		
		scanf("%s",&a);
		strcpy(c,a);
		strcat(c,a);
		for(j=0;j<10;j++){
			if(c[j]==b[0]){
				if(L==1){
					sum++;
					goto tugi;
				}
				for(k=1;k<L-1;k++){
					if(c[j+k]!=b[k]){
						break;
					}
				}
				if(k==L-1){
					sum++;
					goto tugi;
				}
			}
		}
		tugi:;
	}
	printf("%d\n",sum);
	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:

ABCD
3
ABCDXXXXXX
YYYYABCDXX
DCBAZZZZZZ

2

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>

char a[11],b[11],c[21];

int main(){
	int i,j,k,N,L,sum=0,s1;
	scanf("%s",&b);
	L=strlen(b);
	scanf("%d",&N);
	for(i=0;i<N;i++){
		
		scanf("%s",&a);
		strcpy(c,a);
		strcat(c,a);
		for(j=0;j<10;j++){
			if(c[j]==b[0]){
				if(L==1){
					sum++;
					goto tugi;
				}
				for(k=1;k<L-1;k++){
					if(c[j+k]!=b[k]){
						break;
					}
				}
				if(k==L-1){
					sum++;
					goto tugi;
				}
			}
		}
		tugi:;
	}
	printf("%d\n",sum);
	return 0;
}
	```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%s"
.LC1:
	.string	"%d"
.LC2:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	b(%rip), %rsi
	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	$40, %rsp
	.cfi_def_cfa_offset 96
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	leaq	b(%rip), %rdi
	call	strlen@PLT
	leaq	20(%rsp), %rsi
	leaq	.LC1(%rip), %rdi
	movq	%rax, (%rsp)
	movq	%rax, %rbx
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	20(%rsp), %eax
	testl	%eax, %eax
	jle	.L12
	movl	$0, 12(%rsp)
	leaq	c(%rip), %r12
	leal	-1(%rbx), %ebp
	xorl	%r14d, %r14d
	leaq	a(%rip), %r13
	leaq	10(%r12), %rbx
	.p2align 4,,10
	.p2align 3
.L10:
	movq	%r13, %rsi
	leaq	.LC0(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movq	%r12, %rdi
	movq	%r13, %rsi
	call	strcpy@PLT
	movq	%r12, %rdi
	movq	%r13, %rsi
	leaq	c(%rip), %r12
	call	strcat@PLT
	movzbl	8+b(%rip), %r15d
	leaq	b(%rip), %rax
	movzbl	1+b(%rip), %ecx
	movzbl	(%rax), %edx
	movzbl	2+b(%rip), %esi
	movq	%r12, %rax
	movb	%r15b, 11(%rsp)
	movzbl	3+b(%rip), %edi
	movzbl	4+b(%rip), %r8d
	movzbl	5+b(%rip), %r9d
	movzbl	6+b(%rip), %r10d
	movzbl	7+b(%rip), %r11d
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L3:
	addq	$1, %rax
	cmpq	%rbx, %rax
	je	.L7
.L9:
	cmpb	%dl, (%rax)
	jne	.L3
	cmpq	$1, (%rsp)
	je	.L23
	movl	$1, %r15d
	cmpl	$1, %ebp
	jle	.L6
	cmpb	%cl, 1(%rax)
	jne	.L3
	cmpl	$2, %ebp
	je	.L13
	cmpb	%sil, 2(%rax)
	jne	.L3
	cmpl	$3, %ebp
	je	.L14
	cmpb	%dil, 3(%rax)
	jne	.L3
	cmpl	$4, %ebp
	je	.L15
	cmpb	%r8b, 4(%rax)
	jne	.L3
	cmpl	$5, %ebp
	je	.L16
	cmpb	%r9b, 5(%rax)
	jne	.L3
	cmpl	$6, %ebp
	je	.L17
	cmpb	%r10b, 6(%rax)
	jne	.L3
	cmpl	$7, %ebp
	je	.L18
	cmpb	%r11b, 7(%rax)
	jne	.L3
	cmpl	$9, %ebp
	jne	.L19
	movzbl	11(%rsp), %r15d
	cmpb	%r15b, 8(%rax)
	jne	.L3
	movl	$9, %r15d
.L6:
	cmpl	%r15d, %ebp
	jne	.L3
.L23:
	addl	$1, 12(%rsp)
	.p2align 4,,10
	.p2align 3
.L7:
	addl	$1, %r14d
	cmpl	%r14d, 20(%rsp)
	jg	.L10
.L2:
	movl	12(%rsp), %edx
	xorl	%eax, %eax
	movl	$1, %edi
	leaq	.LC2(%rip), %rsi
	call	__printf_chk@PLT
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L25
	addq	$40, %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
.L13:
	.cfi_restore_state
	movl	$2, %r15d
	jmp	.L6
.L14:
	movl	$3, %r15d
	jmp	.L6
.L15:
	movl	$4, %r15d
	jmp	.L6
.L16:
	movl	$5, %r15d
	jmp	.L6
.L17:
	movl	$6, %r15d
	jmp	.L6
.L18:
	movl	$7, %r15d
	jmp	.L6
.L19:
	movl	$8, %r15d
	jmp	.L6
.L12:
	movl	$0, 12(%rsp)
	jmp	.L2
.L25:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.globl	c
	.bss
	.align 16
	.type	c, @object
	.size	c, 21
c:
	.zero	21
	.globl	b
	.align 8
	.type	b, @object
	.size	b, 11
b:
	.zero	11
	.globl	a
	.align 8
	.type	a, @object
	.size	a, 11
a:
	.zero	11
	.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	"%s"
.LC1:
	.string	"%d"
.LC2:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	b(%rip), %rsi
	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	$40, %rsp
	.cfi_def_cfa_offset 96
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	leaq	b(%rip), %rdi
	call	strlen@PLT
	leaq	20(%rsp), %rsi
	leaq	.LC1(%rip), %rdi
	movq	%rax, (%rsp)
	movq	%rax, %rbx
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	20(%rsp), %eax
	testl	%eax, %eax
	jle	.L12
	movl	$0, 12(%rsp)
	leaq	c(%rip), %r12
	leal	-1(%rbx), %ebp
	xorl	%r14d, %r14d
	leaq	a(%rip), %r13
	leaq	10(%r12), %rbx
	.p2align 4,,10
	.p2align 3
.L10:
	movq	%r13, %rsi
	leaq	.LC0(%rip), %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movq	%r12, %rdi
	movq	%r13, %rsi
	call	strcpy@PLT
	movq	%r12, %rdi
	movq	%r13, %rsi
	leaq	c(%rip), %r12
	call	strcat@PLT
	movzbl	8+b(%rip), %r15d
	leaq	b(%rip), %rax
	movzbl	1+b(%rip), %ecx
	movzbl	(%rax), %edx
	movzbl	2+b(%rip), %esi
	movq	%r12, %rax
	movb	%r15b, 11(%rsp)
	movzbl	3+b(%rip), %edi
	movzbl	4+b(%rip), %r8d
	movzbl	5+b(%rip), %r9d
	movzbl	6+b(%rip), %r10d
	movzbl	7+b(%rip), %r11d
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L3:
	addq	$1, %rax
	cmpq	%rbx, %rax
	je	.L7
.L9:
	cmpb	%dl, (%rax)
	jne	.L3
	cmpq	$1, (%rsp)
	je	.L23
	movl	$1, %r15d
	cmpl	$1, %ebp
	jle	.L6
	cmpb	%cl, 1(%rax)
	jne	.L3
	cmpl	$2, %ebp
	je	.L13
	cmpb	%sil, 2(%rax)
	jne	.L3
	cmpl	$3, %ebp
	je	.L14
	cmpb	%dil, 3(%rax)
	jne	.L3
	cmpl	$4, %ebp
	je	.L15
	cmpb	%r8b, 4(%rax)
	jne	.L3
	cmpl	$5, %ebp
	je	.L16
	cmpb	%r9b, 5(%rax)
	jne	.L3
	cmpl	$6, %ebp
	je	.L17
	cmpb	%r10b, 6(%rax)
	jne	.L3
	cmpl	$7, %ebp
	je	.L18
	cmpb	%r11b, 7(%rax)
	jne	.L3
	cmpl	$9, %ebp
	jne	.L19
	movzbl	11(%rsp), %r15d
	cmpb	%r15b, 8(%rax)
	jne	.L3
	movl	$9, %r15d
.L6:
	cmpl	%r15d, %ebp
	jne	.L3
.L23:
	addl	$1, 12(%rsp)
	.p2align 4,,10
	.p2align 3
.L7:
	addl	$1, %r14d
	cmpl	%r14d, 20(%rsp)
	jg	.L10
.L2:
	movl	12(%rsp), %edx
	xorl	%eax, %eax
	movl	$1, %edi
	leaq	.LC2(%rip), %rsi
	call	__printf_chk@PLT
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L25
	addq	$40, %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
.L13:
	.cfi_restore_state
	movl	$2, %r15d
	jmp	.L6
.L14:
	movl	$3, %r15d
	jmp	.L6
.L15:
	movl	$4, %r15d
	jmp	.L6
.L16:
	movl	$5, %r15d
	jmp	.L6
.L17:
	movl	$6, %r15d
	jmp	.L6
.L18:
	movl	$7, %r15d
	jmp	.L6
.L19:
	movl	$8, %r15d
	jmp	.L6
.L12:
	movl	$0, 12(%rsp)
	jmp	.L2
.L25:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.globl	c
	.bss
	.align 16
	.type	c, @object
	.size	c, 21
c:
	.zero	21
	.globl	b
	.align 8
	.type	b, @object
	.size	b, 11
b:
	.zero	11
	.globl	a
	.align 8
	.type	a, @object
	.size	a, 11
a:
	.zero	11
	.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:
```