Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
s,i,j,f,t,p[5];main(n){for(;({for(i=t=f=0;i<5;f|=1<<p[i++])scanf("%d",p+i),t+=p[i];}),*p;)for(i=0;i<5;i++,puts(14^f&&t%5?&s:"3"))for(j=0;j<5;p[i]-p[j++]?s=n-1&&n+2?50:49:0)n=p[j]-p[i];}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"3"
.LC1:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	leaq	p(%rip), %r14
	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
	leaq	.LC1(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	leaq	.LC0(%rip), %rbx
.L2:
	movl	$0, f(%rip)
	xorl	%eax, %eax
	movl	$1, %r12d
	movl	$0, t(%rip)
	movl	$0, i(%rip)
	.p2align 4,,10
	.p2align 3
.L11:
	cltq
	movq	%rbp, %rdi
	leaq	(%r14,%rax,4), %rsi
	xorl	%eax, %eax
	call	scanf@PLT
	movslq	i(%rip), %rdx
	movl	%r12d, %edi
	movl	(%r14,%rdx,4), %ecx
	movq	%rdx, %rax
	addl	%ecx, t(%rip)
	addl	$1, %eax
	sall	%cl, %edi
	orl	f(%rip), %edi
	movl	%eax, i(%rip)
	movl	%edi, f(%rip)
	cmpl	$4, %eax
	jle	.L11
	movl	(%r14), %eax
	testl	%eax, %eax
	je	.L42
	xorl	%r8d, %r8d
	leaq	s(%rip), %r12
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L43:
	cmpl	$5, %esi
	je	.L40
	movslq	%esi, %rsi
	movl	(%r14,%rsi,4), %eax
	leal	2(%rdx), %esi
	cmpl	%ecx, %eax
	jne	.L16
	cmpl	$5, %esi
	je	.L40
	movslq	%esi, %rsi
	movl	(%r14,%rsi,4), %eax
	leal	3(%rdx), %esi
	cmpl	%eax, %ecx
	jne	.L16
	cmpl	$5, %esi
	je	.L40
	movslq	%esi, %rsi
	addl	$4, %edx
	movl	(%r14,%rsi,4), %eax
	cmpl	%eax, %ecx
	jne	.L5
	cmpl	$4, %edx
	jne	.L40
	movl	16+p(%rip), %eax
	cmpl	%eax, %ecx
	jne	.L7
.L40:
	testb	%r9b, %r9b
	je	.L13
.L12:
	movl	%r13d, s(%rip)
.L13:
	movl	$5, j(%rip)
	addl	$1, %r8d
	movl	%r8d, i(%rip)
	movq	%rbx, %r8
	cmpl	$14, %edi
	je	.L9
	imull	$-858993459, t(%rip), %eax
	movq	%r12, %r8
	addl	$429496729, %eax
	cmpl	$858993459, %eax
	cmovb	%rbx, %r8
.L9:
	movq	%r8, %rdi
	call	puts@PLT
	movl	i(%rip), %r8d
	cmpl	$4, %r8d
	jg	.L2
	movl	f(%rip), %edi
.L10:
	xorl	%r9d, %r9d
	xorl	%edx, %edx
	movslq	%r8d, %r10
.L3:
	movslq	%edx, %rax
	movl	(%r14,%r10,4), %ecx
	leal	1(%rdx), %esi
	movl	(%r14,%rax,4), %eax
	cmpl	%ecx, %eax
	je	.L43
.L16:
	movl	%esi, %edx
.L5:
	subl	%ecx, %eax
	movl	$1, %r9d
	cmpl	$1, %eax
	setne	%cl
	xorl	%r13d, %r13d
	cmpl	$-2, %eax
	setne	%r13b
	andl	%ecx, %r13d
	addl	$49, %r13d
	cmpl	$5, %edx
	jne	.L3
	jmp	.L12
.L7:
	subl	%ecx, %eax
	cmpl	$1, %eax
	setne	%dl
	xorl	%r13d, %r13d
	cmpl	$-2, %eax
	setne	%r13b
	andl	%edx, %r13d
	addl	$49, %r13d
	jmp	.L12
.L42:
	popq	%rbx
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	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
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.globl	p
	.bss
	.align 16
	.type	p, @object
	.size	p, 20
p:
	.zero	20
	.globl	t
	.align 4
	.type	t, @object
	.size	t, 4
t:
	.zero	4
	.globl	f
	.align 4
	.type	f, @object
	.size	f, 4
f:
	.zero	4
	.globl	j
	.align 4
	.type	j, @object
	.size	j, 4
j:
	.zero	4
	.globl	i
	.align 4
	.type	i, @object
	.size	i, 4
i:
	.zero	4
	.globl	s
	.align 4
	.type	s, @object
	.size	s, 4
s:
	.zero	4
	.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	"3"
.LC1:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	leaq	p(%rip), %r14
	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
	leaq	.LC1(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	leaq	.LC0(%rip), %rbx
.L2:
	movl	$0, f(%rip)
	xorl	%eax, %eax
	movl	$1, %r12d
	movl	$0, t(%rip)
	movl	$0, i(%rip)
	.p2align 4,,10
	.p2align 3
.L11:
	cltq
	movq	%rbp, %rdi
	leaq	(%r14,%rax,4), %rsi
	xorl	%eax, %eax
	call	scanf@PLT
	movslq	i(%rip), %rdx
	movl	%r12d, %edi
	movl	(%r14,%rdx,4), %ecx
	movq	%rdx, %rax
	addl	%ecx, t(%rip)
	addl	$1, %eax
	sall	%cl, %edi
	orl	f(%rip), %edi
	movl	%eax, i(%rip)
	movl	%edi, f(%rip)
	cmpl	$4, %eax
	jle	.L11
	movl	(%r14), %eax
	testl	%eax, %eax
	je	.L42
	xorl	%r8d, %r8d
	leaq	s(%rip), %r12
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L43:
	cmpl	$5, %esi
	je	.L40
	movslq	%esi, %rsi
	movl	(%r14,%rsi,4), %eax
	leal	2(%rdx), %esi
	cmpl	%ecx, %eax
	jne	.L16
	cmpl	$5, %esi
	je	.L40
	movslq	%esi, %rsi
	movl	(%r14,%rsi,4), %eax
	leal	3(%rdx), %esi
	cmpl	%eax, %ecx
	jne	.L16
	cmpl	$5, %esi
	je	.L40
	movslq	%esi, %rsi
	addl	$4, %edx
	movl	(%r14,%rsi,4), %eax
	cmpl	%eax, %ecx
	jne	.L5
	cmpl	$4, %edx
	jne	.L40
	movl	16+p(%rip), %eax
	cmpl	%eax, %ecx
	jne	.L7
.L40:
	testb	%r9b, %r9b
	je	.L13
.L12:
	movl	%r13d, s(%rip)
.L13:
	movl	$5, j(%rip)
	addl	$1, %r8d
	movl	%r8d, i(%rip)
	movq	%rbx, %r8
	cmpl	$14, %edi
	je	.L9
	imull	$-858993459, t(%rip), %eax
	movq	%r12, %r8
	addl	$429496729, %eax
	cmpl	$858993459, %eax
	cmovb	%rbx, %r8
.L9:
	movq	%r8, %rdi
	call	puts@PLT
	movl	i(%rip), %r8d
	cmpl	$4, %r8d
	jg	.L2
	movl	f(%rip), %edi
.L10:
	xorl	%r9d, %r9d
	xorl	%edx, %edx
	movslq	%r8d, %r10
.L3:
	movslq	%edx, %rax
	movl	(%r14,%r10,4), %ecx
	leal	1(%rdx), %esi
	movl	(%r14,%rax,4), %eax
	cmpl	%ecx, %eax
	je	.L43
.L16:
	movl	%esi, %edx
.L5:
	subl	%ecx, %eax
	movl	$1, %r9d
	cmpl	$1, %eax
	setne	%cl
	xorl	%r13d, %r13d
	cmpl	$-2, %eax
	setne	%r13b
	andl	%ecx, %r13d
	addl	$49, %r13d
	cmpl	$5, %edx
	jne	.L3
	jmp	.L12
.L7:
	subl	%ecx, %eax
	cmpl	$1, %eax
	setne	%dl
	xorl	%r13d, %r13d
	cmpl	$-2, %eax
	setne	%r13b
	andl	%edx, %r13d
	addl	$49, %r13d
	jmp	.L12
.L42:
	popq	%rbx
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	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
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.globl	p
	.bss
	.align 16
	.type	p, @object
	.size	p, 20
p:
	.zero	20
	.globl	t
	.align 4
	.type	t, @object
	.size	t, 4
t:
	.zero	4
	.globl	f
	.align 4
	.type	f, @object
	.size	f, 4
f:
	.zero	4
	.globl	j
	.align 4
	.type	j, @object
	.size	j, 4
j:
	.zero	4
	.globl	i
	.align 4
	.type	i, @object
	.size	i, 4
i:
	.zero	4
	.globl	s
	.align 4
	.type	s, @object
	.size	s, 4
s:
	.zero	4
	.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	"3"
.LC1:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	leaq	p(%rip), %r14
	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
	leaq	.LC1(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	leaq	.LC0(%rip), %rbx
.L2:
	movl	$0, f(%rip)
	xorl	%eax, %eax
	movl	$1, %r12d
	movl	$0, t(%rip)
	movl	$0, i(%rip)
	.p2align 4,,10
	.p2align 3
.L11:
	cltq
	movq	%rbp, %rdi
	leaq	(%r14,%rax,4), %rsi
	xorl	%eax, %eax
	call	scanf@PLT
	movslq	i(%rip), %rdx
	movl	%r12d, %edi
	movl	(%r14,%rdx,4), %ecx
	movq	%rdx, %rax
	addl	%ecx, t(%rip)
	addl	$1, %eax
	sall	%cl, %edi
	orl	f(%rip), %edi
	movl	%eax, i(%rip)
	movl	%edi, f(%rip)
	cmpl	$4, %eax
	jle	.L11
	movl	(%r14), %eax
	testl	%eax, %eax
	je	.L42
	xorl	%r8d, %r8d
	leaq	s(%rip), %r12
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L43:
	cmpl	$5, %esi
	je	.L40
	movslq	%esi, %rsi
	movl	(%r14,%rsi,4), %eax
	leal	2(%rdx), %esi
	cmpl	%ecx, %eax
	jne	.L16
	cmpl	$5, %esi
	je	.L40
	movslq	%esi, %rsi
	movl	(%r14,%rsi,4), %eax
	leal	3(%rdx), %esi
	cmpl	%eax, %ecx
	jne	.L16
	cmpl	$5, %esi
	je	.L40
	movslq	%esi, %rsi
	addl	$4, %edx
	movl	(%r14,%rsi,4), %eax
	cmpl	%eax, %ecx
	jne	.L5
	cmpl	$4, %edx
	jne	.L40
	movl	16+p(%rip), %eax
	cmpl	%eax, %ecx
	jne	.L7
.L40:
	testb	%r9b, %r9b
	je	.L13
.L12:
	movl	%r13d, s(%rip)
.L13:
	movl	$5, j(%rip)
	addl	$1, %r8d
	movl	%r8d, i(%rip)
	movq	%rbx, %r8
	cmpl	$14, %edi
	je	.L9
	imull	$-858993459, t(%rip), %eax
	movq	%r12, %r8
	addl	$429496729, %eax
	cmpl	$858993459, %eax
	cmovb	%rbx, %r8
.L9:
	movq	%r8, %rdi
	call	puts@PLT
	movl	i(%rip), %r8d
	cmpl	$4, %r8d
	jg	.L2
	movl	f(%rip), %edi
.L10:
	xorl	%r9d, %r9d
	xorl	%edx, %edx
	movslq	%r8d, %r10
.L3:
	movslq	%edx, %rax
	movl	(%r14,%r10,4), %ecx
	leal	1(%rdx), %esi
	movl	(%r14,%rax,4), %eax
	cmpl	%ecx, %eax
	je	.L43
.L16:
	movl	%esi, %edx
.L5:
	subl	%ecx, %eax
	movl	$1, %r9d
	cmpl	$1, %eax
	setne	%cl
	xorl	%r13d, %r13d
	cmpl	$-2, %eax
	setne	%r13b
	andl	%ecx, %r13d
	addl	$49, %r13d
	cmpl	$5, %edx
	jne	.L3
	jmp	.L12
.L7:
	subl	%ecx, %eax
	cmpl	$1, %eax
	setne	%dl
	xorl	%r13d, %r13d
	cmpl	$-2, %eax
	setne	%r13b
	andl	%edx, %r13d
	addl	$49, %r13d
	jmp	.L12
.L42:
	popq	%rbx
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	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
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.globl	p
	.bss
	.align 16
	.type	p, @object
	.size	p, 20
p:
	.zero	20
	.globl	t
	.align 4
	.type	t, @object
	.size	t, 4
t:
	.zero	4
	.globl	f
	.align 4
	.type	f, @object
	.size	f, 4
f:
	.zero	4
	.globl	j
	.align 4
	.type	j, @object
	.size	j, 4
j:
	.zero	4
	.globl	i
	.align 4
	.type	i, @object
	.size	i, 4
i:
	.zero	4
	.globl	s
	.align 4
	.type	s, @object
	.size	s, 4
s:
	.zero	4
	.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
s,i,j,f,t,p[5];main(n){for(;({for(i=t=f=0;i<5;f|=1<<p[i++])scanf("%d",p+i),t+=p[i];}),*p;)for(i=0;i<5;i++,puts(14^f&&t%5?&s:"3"))for(j=0;j<5;p[i]-p[j++]?s=n-1&&n+2?50:49:0)n=p[j]-p[i];}```
Given the following C code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
s,i,j,f,t,p[5];main(n){for(;({for(i=t=f=0;i<5;f|=1<<p[i++])scanf("%d",p+i),t+=p[i];}),*p;)for(i=0;i<5;i++,puts(14^f&&t%5?&s:"3"))for(j=0;j<5;p[i]-p[j++]?s=n-1&&n+2?50:49:0)n=p[j]-p[i];}```

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:

1
3
3
2
1
1
2
2
2
1
0
 1
1
1
2
1
1
2
2
2
1
0
 1
2
3
2
1
1
1
2
2
1
0
 1
2
2
2
1
1
1
2
2
1
0
 1
2
3
2
1
1
2
2
2
2
0
 1
3
1
2
1
1
2
1
2
1
0
 1
2
3
2
1
1
2
3
2
2
0
 1
2
2
2
1
1
2
3
2
2
0
 1
1
2
2
1
1
2
3
2
2
0
 1
3
3
1
1
1
2
3
2
2
0

3
3
3
3
3
1
2
2
2
1
 1
1
1
2
1
1
2
2
2
1
 3
3
3
3
3
1
1
2
2
1
 1
2
2
2
1
1
1
2
2
1
 3
3
3
3
3
1
2
2
2
2
 3
3
3
3
3
1
2
1
2
1
 3
3
3
3
3
3
3
3
3
3
 1
2
2
2
1
3
3
3
3
3
 1
1
2
2
1
3
3
3
3
3
 2
1
1
2
2
3
3
3
3
3

Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
s,i,j,f,t,p[5];main(n){for(;({for(i=t=f=0;i<5;f|=1<<p[i++])scanf("%d",p+i),t+=p[i];}),*p;)for(i=0;i<5;i++,puts(14^f&&t%5?&s:"3"))for(j=0;j<5;p[i]-p[j++]?s=n-1&&n+2?50:49:0)n=p[j]-p[i];}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"3"
.LC1:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	leaq	p(%rip), %r14
	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
	leaq	.LC1(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	leaq	.LC0(%rip), %rbx
.L2:
	movl	$0, f(%rip)
	xorl	%eax, %eax
	movl	$1, %r12d
	movl	$0, t(%rip)
	movl	$0, i(%rip)
	.p2align 4,,10
	.p2align 3
.L11:
	cltq
	movq	%rbp, %rdi
	leaq	(%r14,%rax,4), %rsi
	xorl	%eax, %eax
	call	scanf@PLT
	movslq	i(%rip), %rdx
	movl	%r12d, %edi
	movl	(%r14,%rdx,4), %ecx
	movq	%rdx, %rax
	addl	%ecx, t(%rip)
	addl	$1, %eax
	sall	%cl, %edi
	orl	f(%rip), %edi
	movl	%eax, i(%rip)
	movl	%edi, f(%rip)
	cmpl	$4, %eax
	jle	.L11
	movl	(%r14), %eax
	testl	%eax, %eax
	je	.L42
	xorl	%r8d, %r8d
	leaq	s(%rip), %r12
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L43:
	cmpl	$5, %esi
	je	.L40
	movslq	%esi, %rsi
	movl	(%r14,%rsi,4), %eax
	leal	2(%rdx), %esi
	cmpl	%ecx, %eax
	jne	.L16
	cmpl	$5, %esi
	je	.L40
	movslq	%esi, %rsi
	movl	(%r14,%rsi,4), %eax
	leal	3(%rdx), %esi
	cmpl	%eax, %ecx
	jne	.L16
	cmpl	$5, %esi
	je	.L40
	movslq	%esi, %rsi
	addl	$4, %edx
	movl	(%r14,%rsi,4), %eax
	cmpl	%eax, %ecx
	jne	.L5
	cmpl	$4, %edx
	jne	.L40
	movl	16+p(%rip), %eax
	cmpl	%eax, %ecx
	jne	.L7
.L40:
	testb	%r9b, %r9b
	je	.L13
.L12:
	movl	%r13d, s(%rip)
.L13:
	movl	$5, j(%rip)
	addl	$1, %r8d
	movl	%r8d, i(%rip)
	movq	%rbx, %r8
	cmpl	$14, %edi
	je	.L9
	imull	$-858993459, t(%rip), %eax
	movq	%r12, %r8
	addl	$429496729, %eax
	cmpl	$858993459, %eax
	cmovb	%rbx, %r8
.L9:
	movq	%r8, %rdi
	call	puts@PLT
	movl	i(%rip), %r8d
	cmpl	$4, %r8d
	jg	.L2
	movl	f(%rip), %edi
.L10:
	xorl	%r9d, %r9d
	xorl	%edx, %edx
	movslq	%r8d, %r10
.L3:
	movslq	%edx, %rax
	movl	(%r14,%r10,4), %ecx
	leal	1(%rdx), %esi
	movl	(%r14,%rax,4), %eax
	cmpl	%ecx, %eax
	je	.L43
.L16:
	movl	%esi, %edx
.L5:
	subl	%ecx, %eax
	movl	$1, %r9d
	cmpl	$1, %eax
	setne	%cl
	xorl	%r13d, %r13d
	cmpl	$-2, %eax
	setne	%r13b
	andl	%ecx, %r13d
	addl	$49, %r13d
	cmpl	$5, %edx
	jne	.L3
	jmp	.L12
.L7:
	subl	%ecx, %eax
	cmpl	$1, %eax
	setne	%dl
	xorl	%r13d, %r13d
	cmpl	$-2, %eax
	setne	%r13b
	andl	%edx, %r13d
	addl	$49, %r13d
	jmp	.L12
.L42:
	popq	%rbx
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	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
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.globl	p
	.bss
	.align 16
	.type	p, @object
	.size	p, 20
p:
	.zero	20
	.globl	t
	.align 4
	.type	t, @object
	.size	t, 4
t:
	.zero	4
	.globl	f
	.align 4
	.type	f, @object
	.size	f, 4
f:
	.zero	4
	.globl	j
	.align 4
	.type	j, @object
	.size	j, 4
j:
	.zero	4
	.globl	i
	.align 4
	.type	i, @object
	.size	i, 4
i:
	.zero	4
	.globl	s
	.align 4
	.type	s, @object
	.size	s, 4
s:
	.zero	4
	.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	"3"
.LC1:
	.string	"%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	leaq	p(%rip), %r14
	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
	leaq	.LC1(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	leaq	.LC0(%rip), %rbx
.L2:
	movl	$0, f(%rip)
	xorl	%eax, %eax
	movl	$1, %r12d
	movl	$0, t(%rip)
	movl	$0, i(%rip)
	.p2align 4,,10
	.p2align 3
.L11:
	cltq
	movq	%rbp, %rdi
	leaq	(%r14,%rax,4), %rsi
	xorl	%eax, %eax
	call	scanf@PLT
	movslq	i(%rip), %rdx
	movl	%r12d, %edi
	movl	(%r14,%rdx,4), %ecx
	movq	%rdx, %rax
	addl	%ecx, t(%rip)
	addl	$1, %eax
	sall	%cl, %edi
	orl	f(%rip), %edi
	movl	%eax, i(%rip)
	movl	%edi, f(%rip)
	cmpl	$4, %eax
	jle	.L11
	movl	(%r14), %eax
	testl	%eax, %eax
	je	.L42
	xorl	%r8d, %r8d
	leaq	s(%rip), %r12
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L43:
	cmpl	$5, %esi
	je	.L40
	movslq	%esi, %rsi
	movl	(%r14,%rsi,4), %eax
	leal	2(%rdx), %esi
	cmpl	%ecx, %eax
	jne	.L16
	cmpl	$5, %esi
	je	.L40
	movslq	%esi, %rsi
	movl	(%r14,%rsi,4), %eax
	leal	3(%rdx), %esi
	cmpl	%eax, %ecx
	jne	.L16
	cmpl	$5, %esi
	je	.L40
	movslq	%esi, %rsi
	addl	$4, %edx
	movl	(%r14,%rsi,4), %eax
	cmpl	%eax, %ecx
	jne	.L5
	cmpl	$4, %edx
	jne	.L40
	movl	16+p(%rip), %eax
	cmpl	%eax, %ecx
	jne	.L7
.L40:
	testb	%r9b, %r9b
	je	.L13
.L12:
	movl	%r13d, s(%rip)
.L13:
	movl	$5, j(%rip)
	addl	$1, %r8d
	movl	%r8d, i(%rip)
	movq	%rbx, %r8
	cmpl	$14, %edi
	je	.L9
	imull	$-858993459, t(%rip), %eax
	movq	%r12, %r8
	addl	$429496729, %eax
	cmpl	$858993459, %eax
	cmovb	%rbx, %r8
.L9:
	movq	%r8, %rdi
	call	puts@PLT
	movl	i(%rip), %r8d
	cmpl	$4, %r8d
	jg	.L2
	movl	f(%rip), %edi
.L10:
	xorl	%r9d, %r9d
	xorl	%edx, %edx
	movslq	%r8d, %r10
.L3:
	movslq	%edx, %rax
	movl	(%r14,%r10,4), %ecx
	leal	1(%rdx), %esi
	movl	(%r14,%rax,4), %eax
	cmpl	%ecx, %eax
	je	.L43
.L16:
	movl	%esi, %edx
.L5:
	subl	%ecx, %eax
	movl	$1, %r9d
	cmpl	$1, %eax
	setne	%cl
	xorl	%r13d, %r13d
	cmpl	$-2, %eax
	setne	%r13b
	andl	%ecx, %r13d
	addl	$49, %r13d
	cmpl	$5, %edx
	jne	.L3
	jmp	.L12
.L7:
	subl	%ecx, %eax
	cmpl	$1, %eax
	setne	%dl
	xorl	%r13d, %r13d
	cmpl	$-2, %eax
	setne	%r13b
	andl	%edx, %r13d
	addl	$49, %r13d
	jmp	.L12
.L42:
	popq	%rbx
	.cfi_def_cfa_offset 40
	xorl	%eax, %eax
	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
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.globl	p
	.bss
	.align 16
	.type	p, @object
	.size	p, 20
p:
	.zero	20
	.globl	t
	.align 4
	.type	t, @object
	.size	t, 4
t:
	.zero	4
	.globl	f
	.align 4
	.type	f, @object
	.size	f, 4
f:
	.zero	4
	.globl	j
	.align 4
	.type	j, @object
	.size	j, 4
j:
	.zero	4
	.globl	i
	.align 4
	.type	i, @object
	.size	i, 4
i:
	.zero	4
	.globl	s
	.align 4
	.type	s, @object
	.size	s, 4
s:
	.zero	4
	.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:
```