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

```c
j,w,l,p[5];main(i){for(;1-scanf("%d%d%d%d%d",p,p+1,p+2,p+3,p+4);)for(i=0;i<5;i++,puts(w?l?"3":"1":l?"2":"3"))for(j=w=l=0;j<5;j++)p[i]-p[j]?p[i]%3+1==p[j]?w++:l++:0;}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	j
	.bss
	.align 4
	.type	j, @object
	.size	j, 4
j:
	.zero	4
	.globl	w
	.align 4
	.type	w, @object
	.size	w, 4
w:
	.zero	4
	.globl	l
	.align 4
	.type	l, @object
	.size	l, 4
l:
	.zero	4
	.globl	p
	.align 16
	.type	p, @object
	.size	p, 20
p:
	.zero	20
	.section	.rodata
.LC0:
	.string	"3"
.LC1:
	.string	"1"
.LC2:
	.string	"2"
.LC3:
	.string	"%d%d%d%d%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
.L17:
	movl	$0, -4(%rbp)
	jmp	.L3
.L16:
	movl	$0, l(%rip)
	movl	l(%rip), %eax
	movl	%eax, w(%rip)
	movl	w(%rip), %eax
	movl	%eax, j(%rip)
	jmp	.L4
.L9:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	p(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	j(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	p(%rip), %rax
	movl	(%rcx,%rax), %eax
	cmpl	%eax, %edx
	je	.L8
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	p(%rip), %rax
	movl	(%rdx,%rax), %edx
	movslq	%edx, %rax
	imulq	$1431655766, %rax, %rax
	shrq	$32, %rax
	movl	%edx, %ecx
	sarl	$31, %ecx
	subl	%ecx, %eax
	movl	%eax, %ecx
	addl	%ecx, %ecx
	addl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	leal	1(%rax), %ecx
	movl	j(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	p(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, %ecx
	jne	.L6
	movl	w(%rip), %eax
	addl	$1, %eax
	movl	%eax, w(%rip)
	jmp	.L8
.L6:
	movl	l(%rip), %eax
	addl	$1, %eax
	movl	%eax, l(%rip)
.L8:
	movl	j(%rip), %eax
	addl	$1, %eax
	movl	%eax, j(%rip)
.L4:
	movl	j(%rip), %eax
	cmpl	$4, %eax
	jle	.L9
	addl	$1, -4(%rbp)
	movl	w(%rip), %eax
	testl	%eax, %eax
	je	.L10
	movl	l(%rip), %eax
	testl	%eax, %eax
	je	.L11
	leaq	.LC0(%rip), %rax
	jmp	.L13
.L11:
	leaq	.LC1(%rip), %rax
	jmp	.L13
.L10:
	movl	l(%rip), %eax
	testl	%eax, %eax
	je	.L14
	leaq	.LC2(%rip), %rax
	jmp	.L13
.L14:
	leaq	.LC0(%rip), %rax
.L13:
	movq	%rax, %rdi
	call	puts@PLT
.L3:
	cmpl	$4, -4(%rbp)
	jle	.L16
.L2:
	leaq	16+p(%rip), %rsi
	leaq	12+p(%rip), %rcx
	leaq	8+p(%rip), %rdx
	leaq	4+p(%rip), %rax
	movq	%rsi, %r9
	movq	%rcx, %r8
	movq	%rdx, %rcx
	movq	%rax, %rdx
	leaq	p(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	scanf@PLT
	cmpl	$1, %eax
	jne	.L17
	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	"1"
.LC1:
	.string	"3"
.LC2:
	.string	"2"
.LC3:
	.string	"%d%d%d%d%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	leaq	.LC0(%rip), %r13
	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	p(%rip), %rbx
	leaq	8(%rbx), %r15
	leaq	20(%rbx), %rbp
	subq	$8, %rsp
	.cfi_def_cfa_offset 64
	.p2align 4,,10
	.p2align 3
.L2:
	leaq	16+p(%rip), %r9
	xorl	%eax, %eax
	movq	%r15, %rcx
	movq	%rbx, %rsi
	leaq	-4(%r9), %r8
	leaq	-4(%r15), %rdx
	leaq	.LC3(%rip), %rdi
	call	scanf@PLT
	cmpl	$1, %eax
	je	.L41
	leaq	p(%rip), %r14
	leaq	.LC1(%rip), %r12
.L20:
	movl	$0, l(%rip)
	movslq	(%r14), %rax
	movl	$0, w(%rip)
	movq	%rax, %rdx
	imulq	$1431655766, %rax, %rax
	movl	%edx, %ecx
	sarl	$31, %ecx
	shrq	$32, %rax
	subl	%ecx, %eax
	leal	(%rax,%rax,2), %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	movl	(%rbx), %ecx
	addl	$1, %eax
	cmpl	%ecx, %edx
	je	.L23
	cmpl	%ecx, %eax
	setne	%cl
	sete	%sil
	setne	%dil
	sete	%r9b
	movzbl	%cl, %ecx
	movzbl	%sil, %esi
.L3:
	movl	4+p(%rip), %r8d
	cmpl	%r8d, %edx
	je	.L4
	cmpl	%r8d, %eax
	je	.L5
	addl	$1, %ecx
	movl	$1, %edi
.L4:
	movl	8+p(%rip), %r8d
	cmpl	%r8d, %edx
	je	.L6
	cmpl	%r8d, %eax
	je	.L7
	addl	$1, %ecx
	movl	$1, %edi
.L6:
	movl	12+p(%rip), %r8d
	cmpl	%r8d, %edx
	je	.L8
	cmpl	%r8d, %eax
	je	.L9
	movl	16+p(%rip), %r8d
	addl	$1, %ecx
	movl	$1, %edi
	cmpl	%r8d, %edx
	je	.L42
.L10:
	cmpl	%r8d, %eax
	je	.L43
	movl	$5, j(%rip)
	addl	$1, %ecx
.L16:
	movl	%ecx, l(%rip)
	leaq	.LC2(%rip), %rdi
	testb	%r9b, %r9b
	je	.L19
.L22:
	movl	%esi, w(%rip)
	testl	%esi, %esi
	je	.L18
	testl	%ecx, %ecx
	movq	%r13, %rdi
	cmovne	%r12, %rdi
.L19:
	call	puts@PLT
	addq	$4, %r14
	cmpq	%r14, %rbp
	jne	.L20
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L9:
	addl	$1, %esi
	movl	$1, %r9d
.L8:
	movl	16+p(%rip), %r8d
	cmpl	%r8d, %edx
	jne	.L10
	movl	$5, j(%rip)
	testb	%dil, %dil
	jne	.L26
	testb	%r9b, %r9b
	jne	.L15
.L17:
	movq	%r12, %rdi
	jmp	.L19
	.p2align 4,,10
	.p2align 3
.L23:
	xorl	%edi, %edi
	xorl	%ecx, %ecx
	xorl	%r9d, %r9d
	xorl	%esi, %esi
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L43:
	movl	$5, j(%rip)
	addl	$1, %esi
	testb	%dil, %dil
	jne	.L14
.L15:
	movl	%esi, w(%rip)
	movq	%r13, %rdi
	testl	%esi, %esi
	jne	.L19
	jmp	.L17
.L26:
	movl	%r9d, %edi
.L14:
	movl	%ecx, l(%rip)
	testb	%dil, %dil
	jne	.L22
.L18:
	leaq	.LC2(%rip), %rdi
	testl	%ecx, %ecx
	jne	.L19
	jmp	.L17
	.p2align 4,,10
	.p2align 3
.L7:
	addl	$1, %esi
	movl	$1, %r9d
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L5:
	addl	$1, %esi
	movl	$1, %r9d
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L42:
	movl	$5, j(%rip)
	jmp	.L16
.L41:
	addq	$8, %rsp
	.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
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.globl	p
	.bss
	.align 16
	.type	p, @object
	.size	p, 20
p:
	.zero	20
	.globl	l
	.align 4
	.type	l, @object
	.size	l, 4
l:
	.zero	4
	.globl	w
	.align 4
	.type	w, @object
	.size	w, 4
w:
	.zero	4
	.globl	j
	.align 4
	.type	j, @object
	.size	j, 4
j:
	.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	"1"
.LC1:
	.string	"3"
.LC2:
	.string	"2"
.LC3:
	.string	"%d%d%d%d%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	leaq	.LC0(%rip), %r13
	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	p(%rip), %rbx
	leaq	8(%rbx), %r15
	leaq	20(%rbx), %rbp
	subq	$8, %rsp
	.cfi_def_cfa_offset 64
	.p2align 4,,10
	.p2align 3
.L2:
	leaq	16+p(%rip), %r9
	xorl	%eax, %eax
	movq	%r15, %rcx
	movq	%rbx, %rsi
	leaq	-4(%r9), %r8
	leaq	-4(%r15), %rdx
	leaq	.LC3(%rip), %rdi
	call	scanf@PLT
	cmpl	$1, %eax
	je	.L41
	leaq	p(%rip), %r14
	leaq	.LC1(%rip), %r12
.L20:
	movl	$0, l(%rip)
	movslq	(%r14), %rax
	movl	$0, w(%rip)
	movq	%rax, %rdx
	imulq	$1431655766, %rax, %rax
	movl	%edx, %ecx
	sarl	$31, %ecx
	shrq	$32, %rax
	subl	%ecx, %eax
	leal	(%rax,%rax,2), %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	movl	(%rbx), %ecx
	addl	$1, %eax
	cmpl	%ecx, %edx
	je	.L23
	cmpl	%ecx, %eax
	setne	%cl
	sete	%sil
	setne	%dil
	sete	%r9b
	movzbl	%cl, %ecx
	movzbl	%sil, %esi
.L3:
	movl	4+p(%rip), %r8d
	cmpl	%r8d, %edx
	je	.L4
	cmpl	%r8d, %eax
	je	.L5
	addl	$1, %ecx
	movl	$1, %edi
.L4:
	movl	8+p(%rip), %r8d
	cmpl	%r8d, %edx
	je	.L6
	cmpl	%r8d, %eax
	je	.L7
	addl	$1, %ecx
	movl	$1, %edi
.L6:
	movl	12+p(%rip), %r8d
	cmpl	%r8d, %edx
	je	.L8
	cmpl	%r8d, %eax
	je	.L9
	movl	16+p(%rip), %r8d
	addl	$1, %ecx
	movl	$1, %edi
	cmpl	%r8d, %edx
	je	.L42
.L10:
	cmpl	%r8d, %eax
	je	.L43
	movl	$5, j(%rip)
	addl	$1, %ecx
.L16:
	movl	%ecx, l(%rip)
	leaq	.LC2(%rip), %rdi
	testb	%r9b, %r9b
	je	.L19
.L22:
	movl	%esi, w(%rip)
	testl	%esi, %esi
	je	.L18
	testl	%ecx, %ecx
	movq	%r13, %rdi
	cmovne	%r12, %rdi
.L19:
	call	puts@PLT
	addq	$4, %r14
	cmpq	%r14, %rbp
	jne	.L20
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L9:
	addl	$1, %esi
	movl	$1, %r9d
.L8:
	movl	16+p(%rip), %r8d
	cmpl	%r8d, %edx
	jne	.L10
	movl	$5, j(%rip)
	testb	%dil, %dil
	jne	.L26
	testb	%r9b, %r9b
	jne	.L15
.L17:
	movq	%r12, %rdi
	jmp	.L19
	.p2align 4,,10
	.p2align 3
.L23:
	xorl	%edi, %edi
	xorl	%ecx, %ecx
	xorl	%r9d, %r9d
	xorl	%esi, %esi
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L43:
	movl	$5, j(%rip)
	addl	$1, %esi
	testb	%dil, %dil
	jne	.L14
.L15:
	movl	%esi, w(%rip)
	movq	%r13, %rdi
	testl	%esi, %esi
	jne	.L19
	jmp	.L17
.L26:
	movl	%r9d, %edi
.L14:
	movl	%ecx, l(%rip)
	testb	%dil, %dil
	jne	.L22
.L18:
	leaq	.LC2(%rip), %rdi
	testl	%ecx, %ecx
	jne	.L19
	jmp	.L17
	.p2align 4,,10
	.p2align 3
.L7:
	addl	$1, %esi
	movl	$1, %r9d
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L5:
	addl	$1, %esi
	movl	$1, %r9d
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L42:
	movl	$5, j(%rip)
	jmp	.L16
.L41:
	addq	$8, %rsp
	.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
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.globl	p
	.bss
	.align 16
	.type	p, @object
	.size	p, 20
p:
	.zero	20
	.globl	l
	.align 4
	.type	l, @object
	.size	l, 4
l:
	.zero	4
	.globl	w
	.align 4
	.type	w, @object
	.size	w, 4
w:
	.zero	4
	.globl	j
	.align 4
	.type	j, @object
	.size	j, 4
j:
	.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:

j,w,l,p[5];main(i){for(;1-scanf("%d%d%d%d%d",p,p+1,p+2,p+3,p+4);)for(i=0;i<5;i++,puts(w?l?"3":"1":l?"2":"3"))for(j=w=l=0;j<5;j++)p[i]-p[j]?p[i]%3+1==p[j]?w++:l++:0;}
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
j,w,l,p[5];main(i){for(;1-scanf("%d%d%d%d%d",p,p+1,p+2,p+3,p+4);)for(i=0;i<5;i++,puts(w?l?"3":"1":l?"2":"3"))for(j=w=l=0;j<5;j++)p[i]-p[j]?p[i]%3+1==p[j]?w++:l++:0;}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	j
	.bss
	.align 4
	.type	j, @object
	.size	j, 4
j:
	.zero	4
	.globl	w
	.align 4
	.type	w, @object
	.size	w, 4
w:
	.zero	4
	.globl	l
	.align 4
	.type	l, @object
	.size	l, 4
l:
	.zero	4
	.globl	p
	.align 16
	.type	p, @object
	.size	p, 20
p:
	.zero	20
	.section	.rodata
.LC0:
	.string	"3"
.LC1:
	.string	"1"
.LC2:
	.string	"2"
.LC3:
	.string	"%d%d%d%d%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
.L17:
	movl	$0, -4(%rbp)
	jmp	.L3
.L16:
	movl	$0, l(%rip)
	movl	l(%rip), %eax
	movl	%eax, w(%rip)
	movl	w(%rip), %eax
	movl	%eax, j(%rip)
	jmp	.L4
.L9:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	p(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	j(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	p(%rip), %rax
	movl	(%rcx,%rax), %eax
	cmpl	%eax, %edx
	je	.L8
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	p(%rip), %rax
	movl	(%rdx,%rax), %edx
	movslq	%edx, %rax
	imulq	$1431655766, %rax, %rax
	shrq	$32, %rax
	movl	%edx, %ecx
	sarl	$31, %ecx
	subl	%ecx, %eax
	movl	%eax, %ecx
	addl	%ecx, %ecx
	addl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	leal	1(%rax), %ecx
	movl	j(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	p(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, %ecx
	jne	.L6
	movl	w(%rip), %eax
	addl	$1, %eax
	movl	%eax, w(%rip)
	jmp	.L8
.L6:
	movl	l(%rip), %eax
	addl	$1, %eax
	movl	%eax, l(%rip)
.L8:
	movl	j(%rip), %eax
	addl	$1, %eax
	movl	%eax, j(%rip)
.L4:
	movl	j(%rip), %eax
	cmpl	$4, %eax
	jle	.L9
	addl	$1, -4(%rbp)
	movl	w(%rip), %eax
	testl	%eax, %eax
	je	.L10
	movl	l(%rip), %eax
	testl	%eax, %eax
	je	.L11
	leaq	.LC0(%rip), %rax
	jmp	.L13
.L11:
	leaq	.LC1(%rip), %rax
	jmp	.L13
.L10:
	movl	l(%rip), %eax
	testl	%eax, %eax
	je	.L14
	leaq	.LC2(%rip), %rax
	jmp	.L13
.L14:
	leaq	.LC0(%rip), %rax
.L13:
	movq	%rax, %rdi
	call	puts@PLT
.L3:
	cmpl	$4, -4(%rbp)
	jle	.L16
.L2:
	leaq	16+p(%rip), %rsi
	leaq	12+p(%rip), %rcx
	leaq	8+p(%rip), %rdx
	leaq	4+p(%rip), %rax
	movq	%rsi, %r9
	movq	%rcx, %r8
	movq	%rdx, %rcx
	movq	%rax, %rdx
	leaq	p(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	scanf@PLT
	cmpl	$1, %eax
	jne	.L17
	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	j
	.bss
	.align 4
	.type	j, @object
	.size	j, 4
j:
	.zero	4
	.globl	w
	.align 4
	.type	w, @object
	.size	w, 4
w:
	.zero	4
	.globl	l
	.align 4
	.type	l, @object
	.size	l, 4
l:
	.zero	4
	.globl	p
	.align 16
	.type	p, @object
	.size	p, 20
p:
	.zero	20
	.section	.rodata
.LC0:
	.string	"3"
.LC1:
	.string	"1"
.LC2:
	.string	"2"
.LC3:
	.string	"%d%d%d%d%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
.L17:
	movl	$0, -4(%rbp)
	jmp	.L3
.L16:
	movl	$0, l(%rip)
	movl	l(%rip), %eax
	movl	%eax, w(%rip)
	movl	w(%rip), %eax
	movl	%eax, j(%rip)
	jmp	.L4
.L9:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	p(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	j(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	p(%rip), %rax
	movl	(%rcx,%rax), %eax
	cmpl	%eax, %edx
	je	.L8
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	p(%rip), %rax
	movl	(%rdx,%rax), %edx
	movslq	%edx, %rax
	imulq	$1431655766, %rax, %rax
	shrq	$32, %rax
	movl	%edx, %ecx
	sarl	$31, %ecx
	subl	%ecx, %eax
	movl	%eax, %ecx
	addl	%ecx, %ecx
	addl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	leal	1(%rax), %ecx
	movl	j(%rip), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	p(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, %ecx
	jne	.L6
	movl	w(%rip), %eax
	addl	$1, %eax
	movl	%eax, w(%rip)
	jmp	.L8
.L6:
	movl	l(%rip), %eax
	addl	$1, %eax
	movl	%eax, l(%rip)
.L8:
	movl	j(%rip), %eax
	addl	$1, %eax
	movl	%eax, j(%rip)
.L4:
	movl	j(%rip), %eax
	cmpl	$4, %eax
	jle	.L9
	addl	$1, -4(%rbp)
	movl	w(%rip), %eax
	testl	%eax, %eax
	je	.L10
	movl	l(%rip), %eax
	testl	%eax, %eax
	je	.L11
	leaq	.LC0(%rip), %rax
	jmp	.L13
.L11:
	leaq	.LC1(%rip), %rax
	jmp	.L13
.L10:
	movl	l(%rip), %eax
	testl	%eax, %eax
	je	.L14
	leaq	.LC2(%rip), %rax
	jmp	.L13
.L14:
	leaq	.LC0(%rip), %rax
.L13:
	movq	%rax, %rdi
	call	puts@PLT
.L3:
	cmpl	$4, -4(%rbp)
	jle	.L16
.L2:
	leaq	16+p(%rip), %rsi
	leaq	12+p(%rip), %rcx
	leaq	8+p(%rip), %rdx
	leaq	4+p(%rip), %rax
	movq	%rsi, %r9
	movq	%rcx, %r8
	movq	%rdx, %rcx
	movq	%rax, %rdx
	leaq	p(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	scanf@PLT
	cmpl	$1, %eax
	jne	.L17
	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:
