Given the following C code and unoptimized 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];}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	s
	.bss
	.align 4
	.type	s, @object
	.size	s, 4
s:
	.zero	4
	.globl	i
	.align 4
	.type	i, @object
	.size	i, 4
i:
	.zero	4
	.globl	j
	.align 4
	.type	j, @object
	.size	j, 4
j:
	.zero	4
	.globl	f
	.align 4
	.type	f, @object
	.size	f, 4
f:
	.zero	4
	.globl	t
	.align 4
	.type	t, @object
	.size	t, 4
t:
	.zero	4
	.globl	p
	.align 16
	.type	p, @object
	.size	p, 20
p:
	.zero	20
	.section	.rodata
.LC0:
	.string	"3"
.LC1:
	.string	"%d"
	.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	$16, %rsp
	movl	%edi, -4(%rbp)
	jmp	.L2
.L14:
	movl	$0, i(%rip)
	jmp	.L3
.L11:
	movl	$0, j(%rip)
	jmp	.L4
.L8:
	movl	j(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	p(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	i(%rip), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	p(%rip), %rdx
	movl	(%rcx,%rdx), %edx
	subl	%edx, %eax
	movl	%eax, -4(%rbp)
	movl	i(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	p(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	j(%rip), %eax
	leal	1(%rax), %edx
	movl	%edx, j(%rip)
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	p(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, %ecx
	je	.L4
	cmpl	$1, -4(%rbp)
	je	.L6
	cmpl	$-2, -4(%rbp)
	je	.L6
	movl	$50, %eax
	jmp	.L7
.L6:
	movl	$49, %eax
.L7:
	movl	%eax, s(%rip)
.L4:
	movl	j(%rip), %eax
	cmpl	$4, %eax
	jle	.L8
	movl	i(%rip), %eax
	addl	$1, %eax
	movl	%eax, i(%rip)
	movl	f(%rip), %eax
	cmpl	$14, %eax
	je	.L9
	movl	t(%rip), %edx
	movslq	%edx, %rax
	imulq	$1717986919, %rax, %rax
	shrq	$32, %rax
	sarl	%eax
	movl	%edx, %ecx
	sarl	$31, %ecx
	subl	%ecx, %eax
	movl	%eax, %ecx
	sall	$2, %ecx
	addl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	testl	%eax, %eax
	je	.L9
	leaq	s(%rip), %rax
	jmp	.L10
.L9:
	leaq	.LC0(%rip), %rax
.L10:
	movq	%rax, %rdi
	call	puts@PLT
.L3:
	movl	i(%rip), %eax
	cmpl	$4, %eax
	jle	.L11
.L2:
	movl	$0, f(%rip)
	movl	f(%rip), %eax
	movl	%eax, t(%rip)
	movl	t(%rip), %eax
	movl	%eax, i(%rip)
	jmp	.L12
.L13:
	movl	i(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	p(%rip), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	scanf@PLT
	movl	i(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	p(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	t(%rip), %eax
	addl	%edx, %eax
	movl	%eax, t(%rip)
	movl	i(%rip), %eax
	leal	1(%rax), %edx
	movl	%edx, i(%rip)
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	p(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	$1, %edx
	movl	%eax, %ecx
	sall	%cl, %edx
	movl	f(%rip), %eax
	orl	%edx, %eax
	movl	%eax, f(%rip)
.L12:
	movl	i(%rip), %eax
	cmpl	$4, %eax
	jle	.L13
	movl	p(%rip), %eax
	testl	%eax, %eax
	jne	.L14
	movl	$0, %eax
	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	"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
	.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:

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];}
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 unoptimized 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];}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	s
	.bss
	.align 4
	.type	s, @object
	.size	s, 4
s:
	.zero	4
	.globl	i
	.align 4
	.type	i, @object
	.size	i, 4
i:
	.zero	4
	.globl	j
	.align 4
	.type	j, @object
	.size	j, 4
j:
	.zero	4
	.globl	f
	.align 4
	.type	f, @object
	.size	f, 4
f:
	.zero	4
	.globl	t
	.align 4
	.type	t, @object
	.size	t, 4
t:
	.zero	4
	.globl	p
	.align 16
	.type	p, @object
	.size	p, 20
p:
	.zero	20
	.section	.rodata
.LC0:
	.string	"3"
.LC1:
	.string	"%d"
	.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	$16, %rsp
	movl	%edi, -4(%rbp)
	jmp	.L2
.L14:
	movl	$0, i(%rip)
	jmp	.L3
.L11:
	movl	$0, j(%rip)
	jmp	.L4
.L8:
	movl	j(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	p(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	i(%rip), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	p(%rip), %rdx
	movl	(%rcx,%rdx), %edx
	subl	%edx, %eax
	movl	%eax, -4(%rbp)
	movl	i(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	p(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	j(%rip), %eax
	leal	1(%rax), %edx
	movl	%edx, j(%rip)
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	p(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, %ecx
	je	.L4
	cmpl	$1, -4(%rbp)
	je	.L6
	cmpl	$-2, -4(%rbp)
	je	.L6
	movl	$50, %eax
	jmp	.L7
.L6:
	movl	$49, %eax
.L7:
	movl	%eax, s(%rip)
.L4:
	movl	j(%rip), %eax
	cmpl	$4, %eax
	jle	.L8
	movl	i(%rip), %eax
	addl	$1, %eax
	movl	%eax, i(%rip)
	movl	f(%rip), %eax
	cmpl	$14, %eax
	je	.L9
	movl	t(%rip), %edx
	movslq	%edx, %rax
	imulq	$1717986919, %rax, %rax
	shrq	$32, %rax
	sarl	%eax
	movl	%edx, %ecx
	sarl	$31, %ecx
	subl	%ecx, %eax
	movl	%eax, %ecx
	sall	$2, %ecx
	addl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	testl	%eax, %eax
	je	.L9
	leaq	s(%rip), %rax
	jmp	.L10
.L9:
	leaq	.LC0(%rip), %rax
.L10:
	movq	%rax, %rdi
	call	puts@PLT
.L3:
	movl	i(%rip), %eax
	cmpl	$4, %eax
	jle	.L11
.L2:
	movl	$0, f(%rip)
	movl	f(%rip), %eax
	movl	%eax, t(%rip)
	movl	t(%rip), %eax
	movl	%eax, i(%rip)
	jmp	.L12
.L13:
	movl	i(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	p(%rip), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	scanf@PLT
	movl	i(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	p(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	t(%rip), %eax
	addl	%edx, %eax
	movl	%eax, t(%rip)
	movl	i(%rip), %eax
	leal	1(%rax), %edx
	movl	%edx, i(%rip)
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	p(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	$1, %edx
	movl	%eax, %ecx
	sall	%cl, %edx
	movl	f(%rip), %eax
	orl	%edx, %eax
	movl	%eax, f(%rip)
.L12:
	movl	i(%rip), %eax
	cmpl	$4, %eax
	jle	.L13
	movl	p(%rip), %eax
	testl	%eax, %eax
	jne	.L14
	movl	$0, %eax
	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
	.globl	s
	.bss
	.align 4
	.type	s, @object
	.size	s, 4
s:
	.zero	4
	.globl	i
	.align 4
	.type	i, @object
	.size	i, 4
i:
	.zero	4
	.globl	j
	.align 4
	.type	j, @object
	.size	j, 4
j:
	.zero	4
	.globl	f
	.align 4
	.type	f, @object
	.size	f, 4
f:
	.zero	4
	.globl	t
	.align 4
	.type	t, @object
	.size	t, 4
t:
	.zero	4
	.globl	p
	.align 16
	.type	p, @object
	.size	p, 20
p:
	.zero	20
	.section	.rodata
.LC0:
	.string	"3"
.LC1:
	.string	"%d"
	.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	$16, %rsp
	movl	%edi, -4(%rbp)
	jmp	.L2
.L14:
	movl	$0, i(%rip)
	jmp	.L3
.L11:
	movl	$0, j(%rip)
	jmp	.L4
.L8:
	movl	j(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	p(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	i(%rip), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	p(%rip), %rdx
	movl	(%rcx,%rdx), %edx
	subl	%edx, %eax
	movl	%eax, -4(%rbp)
	movl	i(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	p(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	j(%rip), %eax
	leal	1(%rax), %edx
	movl	%edx, j(%rip)
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	p(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, %ecx
	je	.L4
	cmpl	$1, -4(%rbp)
	je	.L6
	cmpl	$-2, -4(%rbp)
	je	.L6
	movl	$50, %eax
	jmp	.L7
.L6:
	movl	$49, %eax
.L7:
	movl	%eax, s(%rip)
.L4:
	movl	j(%rip), %eax
	cmpl	$4, %eax
	jle	.L8
	movl	i(%rip), %eax
	addl	$1, %eax
	movl	%eax, i(%rip)
	movl	f(%rip), %eax
	cmpl	$14, %eax
	je	.L9
	movl	t(%rip), %edx
	movslq	%edx, %rax
	imulq	$1717986919, %rax, %rax
	shrq	$32, %rax
	sarl	%eax
	movl	%edx, %ecx
	sarl	$31, %ecx
	subl	%ecx, %eax
	movl	%eax, %ecx
	sall	$2, %ecx
	addl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	testl	%eax, %eax
	je	.L9
	leaq	s(%rip), %rax
	jmp	.L10
.L9:
	leaq	.LC0(%rip), %rax
.L10:
	movq	%rax, %rdi
	call	puts@PLT
.L3:
	movl	i(%rip), %eax
	cmpl	$4, %eax
	jle	.L11
.L2:
	movl	$0, f(%rip)
	movl	f(%rip), %eax
	movl	%eax, t(%rip)
	movl	t(%rip), %eax
	movl	%eax, i(%rip)
	jmp	.L12
.L13:
	movl	i(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	p(%rip), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	scanf@PLT
	movl	i(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	p(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	t(%rip), %eax
	addl	%edx, %eax
	movl	%eax, t(%rip)
	movl	i(%rip), %eax
	leal	1(%rax), %edx
	movl	%edx, i(%rip)
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	p(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	$1, %edx
	movl	%eax, %ecx
	sall	%cl, %edx
	movl	f(%rip), %eax
	orl	%edx, %eax
	movl	%eax, f(%rip)
.L12:
	movl	i(%rip), %eax
	cmpl	$4, %eax
	jle	.L13
	movl	p(%rip), %eax
	testl	%eax, %eax
	jne	.L14
	movl	$0, %eax
	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:
