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

```c
#include<stdio.h>
	int main(){
		int a[5],g,c,p,i;
		while(scanf("%d",&a[0]),a[0]){
			g=0;
			c=0;
			p=0;
			if(a[0]==1)
				g++;
			else if(a[0]==2)
				c++;
			else if(a[0]==3)
				p++;
			for(i=1;i<5;i++){
				scanf("%d",&a[i]);
				if(a[i]==1)
				g++;
			else if(a[i]==2)
				c++;
			else if(a[i]==3)
				p++;
			}
			if(g>0&&c>0&&p>0)
				for(i=0;i<5;i++)
				printf("3\n");
			else if(g==5||c==5||p==5)
				for(i=0;i<5;i++)
				printf("3\n");
			else if(g>0&&c>0)
				for(i=0;i<5;i++){
					if(a[i]==1)
						printf("1\n");
					else printf("2\n");
			}
			else if(g>0&&p>0)
				for(i=0;i<5;i++){
					if(a[i]==1)
						printf("2\n");
					else printf("1\n");
			}
			else for(i=0;i<5;i++){
				if(a[i]==2)
					printf("1\n");
				else printf("2\n");
			}
		}
		return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"3"
.LC2:
	.string	"1"
.LC3:
	.string	"2"
	.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	$48, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	jmp	.L2
.L32:
	movl	$0, -48(%rbp)
	movl	$0, -44(%rbp)
	movl	$0, -40(%rbp)
	movl	-32(%rbp), %eax
	cmpl	$1, %eax
	jne	.L3
	addl	$1, -48(%rbp)
	jmp	.L4
.L3:
	movl	-32(%rbp), %eax
	cmpl	$2, %eax
	jne	.L5
	addl	$1, -44(%rbp)
	jmp	.L4
.L5:
	movl	-32(%rbp), %eax
	cmpl	$3, %eax
	jne	.L4
	addl	$1, -40(%rbp)
.L4:
	movl	$1, -36(%rbp)
	jmp	.L6
.L10:
	leaq	-32(%rbp), %rdx
	movl	-36(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-36(%rbp), %eax
	cltq
	movl	-32(%rbp,%rax,4), %eax
	cmpl	$1, %eax
	jne	.L7
	addl	$1, -48(%rbp)
	jmp	.L8
.L7:
	movl	-36(%rbp), %eax
	cltq
	movl	-32(%rbp,%rax,4), %eax
	cmpl	$2, %eax
	jne	.L9
	addl	$1, -44(%rbp)
	jmp	.L8
.L9:
	movl	-36(%rbp), %eax
	cltq
	movl	-32(%rbp,%rax,4), %eax
	cmpl	$3, %eax
	jne	.L8
	addl	$1, -40(%rbp)
.L8:
	addl	$1, -36(%rbp)
.L6:
	cmpl	$4, -36(%rbp)
	jle	.L10
	cmpl	$0, -48(%rbp)
	jle	.L11
	cmpl	$0, -44(%rbp)
	jle	.L11
	cmpl	$0, -40(%rbp)
	jle	.L11
	movl	$0, -36(%rbp)
	jmp	.L12
.L13:
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	addl	$1, -36(%rbp)
.L12:
	cmpl	$4, -36(%rbp)
	jle	.L13
	jmp	.L2
.L11:
	cmpl	$5, -48(%rbp)
	je	.L14
	cmpl	$5, -44(%rbp)
	je	.L14
	cmpl	$5, -40(%rbp)
	jne	.L15
.L14:
	movl	$0, -36(%rbp)
	jmp	.L16
.L17:
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	addl	$1, -36(%rbp)
.L16:
	cmpl	$4, -36(%rbp)
	jle	.L17
	jmp	.L2
.L15:
	cmpl	$0, -48(%rbp)
	jle	.L18
	cmpl	$0, -44(%rbp)
	jle	.L18
	movl	$0, -36(%rbp)
	jmp	.L19
.L22:
	movl	-36(%rbp), %eax
	cltq
	movl	-32(%rbp,%rax,4), %eax
	cmpl	$1, %eax
	jne	.L20
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L21
.L20:
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
.L21:
	addl	$1, -36(%rbp)
.L19:
	cmpl	$4, -36(%rbp)
	jle	.L22
	jmp	.L2
.L18:
	cmpl	$0, -48(%rbp)
	jle	.L23
	cmpl	$0, -40(%rbp)
	jle	.L23
	movl	$0, -36(%rbp)
	jmp	.L24
.L27:
	movl	-36(%rbp), %eax
	cltq
	movl	-32(%rbp,%rax,4), %eax
	cmpl	$1, %eax
	jne	.L25
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L26
.L25:
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
.L26:
	addl	$1, -36(%rbp)
.L24:
	cmpl	$4, -36(%rbp)
	jle	.L27
	jmp	.L2
.L23:
	movl	$0, -36(%rbp)
	jmp	.L28
.L31:
	movl	-36(%rbp), %eax
	cltq
	movl	-32(%rbp,%rax,4), %eax
	cmpl	$2, %eax
	jne	.L29
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L30
.L29:
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
.L30:
	addl	$1, -36(%rbp)
.L28:
	cmpl	$4, -36(%rbp)
	jle	.L31
.L2:
	leaq	-32(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-32(%rbp), %eax
	testl	%eax, %eax
	jne	.L32
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L34
	call	__stack_chk_fail@PLT
.L34:
	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	"%d"
.LC1:
	.string	"3"
.LC2:
	.string	"1"
.LC3:
	.string	"2"
	.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
	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
	subq	$56, %rsp
	.cfi_def_cfa_offset 112
	movq	%fs:40, %rax
	movq	%rax, 40(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rax
	movq	%rax, 8(%rsp)
	.p2align 4,,10
	.p2align 3
.L2:
	movq	8(%rsp), %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	16(%rsp), %r14d
	testl	%r14d, %r14d
	je	.L51
	cmpl	$1, %r14d
	je	.L26
	cmpl	$2, %r14d
	je	.L27
	movl	$0, 4(%rsp)
	xorl	%r12d, %r12d
	cmpl	$3, %r14d
	sete	%r12b
	xorl	%r14d, %r14d
.L3:
	movq	8(%rsp), %rbx
	leaq	20(%rsp), %r15
	leaq	36(%rsp), %rbp
.L7:
	movq	%r15, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	(%r15), %eax
	cmpl	$1, %eax
	je	.L52
	cmpl	$2, %eax
	je	.L53
	cmpl	$3, %eax
	sete	%al
	movzbl	%al, %eax
	addl	%eax, %r12d
.L5:
	addq	$4, %r15
	cmpq	%r15, %rbp
	jne	.L7
	movl	4(%rsp), %eax
	testl	%r14d, %r14d
	setg	%sil
	testl	%eax, %eax
	setg	%al
	andl	%esi, %eax
	testl	%r12d, %r12d
	je	.L8
	testb	%al, %al
	jne	.L54
.L8:
	cmpl	$5, %r14d
	sete	%dl
	cmpl	$5, 4(%rsp)
	sete	%cl
	orb	%cl, %dl
	jne	.L28
	cmpl	$5, %r12d
	je	.L28
	testb	%al, %al
	jne	.L55
	testl	%r12d, %r12d
	jle	.L35
	testb	%sil, %sil
	je	.L35
	cmpl	$1, (%rbx)
	je	.L56
.L19:
	leaq	.LC2(%rip), %rdi
	call	puts@PLT
.L20:
	addq	$4, %rbx
	cmpq	%rbp, %rbx
	je	.L2
	cmpl	$1, (%rbx)
	jne	.L19
.L56:
	leaq	.LC3(%rip), %rdi
	call	puts@PLT
	jmp	.L20
	.p2align 4,,10
	.p2align 3
.L35:
	cmpl	$2, (%rbx)
	je	.L57
.L22:
	leaq	.LC3(%rip), %rdi
	call	puts@PLT
.L23:
	addq	$4, %rbx
	cmpq	%rbp, %rbx
	je	.L2
	cmpl	$2, (%rbx)
	jne	.L22
.L57:
	leaq	.LC2(%rip), %rdi
	call	puts@PLT
	jmp	.L23
	.p2align 4,,10
	.p2align 3
.L55:
	cmpl	$1, (%rbx)
	je	.L58
.L15:
	leaq	.LC3(%rip), %rdi
	call	puts@PLT
.L16:
	addq	$4, %rbx
	cmpq	%rbp, %rbx
	je	.L2
	cmpl	$1, (%rbx)
	jne	.L15
.L58:
	leaq	.LC2(%rip), %rdi
	call	puts@PLT
	jmp	.L16
	.p2align 4,,10
	.p2align 3
.L52:
	addl	$1, %r14d
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L53:
	addl	$1, 4(%rsp)
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L26:
	movl	$0, 4(%rsp)
	xorl	%r12d, %r12d
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L28:
	movl	$5, %ebx
.L13:
	leaq	.LC1(%rip), %rdi
	call	puts@PLT
	subl	$1, %ebx
	jne	.L13
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L27:
	movl	$1, 4(%rsp)
	xorl	%r12d, %r12d
	xorl	%r14d, %r14d
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L54:
	movl	$5, %ebx
.L9:
	leaq	.LC1(%rip), %rdi
	call	puts@PLT
	subl	$1, %ebx
	jne	.L9
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L51:
	movq	40(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L59
	addq	$56, %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
.L59:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.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
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"3"
.LC2:
	.string	"1"
.LC3:
	.string	"2"
	.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
	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
	subq	$56, %rsp
	.cfi_def_cfa_offset 112
	movq	%fs:40, %rax
	movq	%rax, 40(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rax
	movq	%rax, 8(%rsp)
	.p2align 4,,10
	.p2align 3
.L2:
	movq	8(%rsp), %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	16(%rsp), %r14d
	testl	%r14d, %r14d
	je	.L51
	cmpl	$1, %r14d
	je	.L26
	cmpl	$2, %r14d
	je	.L27
	movl	$0, 4(%rsp)
	xorl	%r12d, %r12d
	cmpl	$3, %r14d
	sete	%r12b
	xorl	%r14d, %r14d
.L3:
	movq	8(%rsp), %rbx
	leaq	20(%rsp), %r15
	leaq	36(%rsp), %rbp
.L7:
	movq	%r15, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	(%r15), %eax
	cmpl	$1, %eax
	je	.L52
	cmpl	$2, %eax
	je	.L53
	cmpl	$3, %eax
	sete	%al
	movzbl	%al, %eax
	addl	%eax, %r12d
.L5:
	addq	$4, %r15
	cmpq	%r15, %rbp
	jne	.L7
	movl	4(%rsp), %eax
	testl	%r14d, %r14d
	setg	%sil
	testl	%eax, %eax
	setg	%al
	andl	%esi, %eax
	testl	%r12d, %r12d
	je	.L8
	testb	%al, %al
	jne	.L54
.L8:
	cmpl	$5, %r14d
	sete	%dl
	cmpl	$5, 4(%rsp)
	sete	%cl
	orb	%cl, %dl
	jne	.L28
	cmpl	$5, %r12d
	je	.L28
	testb	%al, %al
	jne	.L55
	testl	%r12d, %r12d
	jle	.L35
	testb	%sil, %sil
	je	.L35
	cmpl	$1, (%rbx)
	je	.L56
.L19:
	leaq	.LC2(%rip), %rdi
	call	puts@PLT
.L20:
	addq	$4, %rbx
	cmpq	%rbp, %rbx
	je	.L2
	cmpl	$1, (%rbx)
	jne	.L19
.L56:
	leaq	.LC3(%rip), %rdi
	call	puts@PLT
	jmp	.L20
	.p2align 4,,10
	.p2align 3
.L35:
	cmpl	$2, (%rbx)
	je	.L57
.L22:
	leaq	.LC3(%rip), %rdi
	call	puts@PLT
.L23:
	addq	$4, %rbx
	cmpq	%rbp, %rbx
	je	.L2
	cmpl	$2, (%rbx)
	jne	.L22
.L57:
	leaq	.LC2(%rip), %rdi
	call	puts@PLT
	jmp	.L23
	.p2align 4,,10
	.p2align 3
.L55:
	cmpl	$1, (%rbx)
	je	.L58
.L15:
	leaq	.LC3(%rip), %rdi
	call	puts@PLT
.L16:
	addq	$4, %rbx
	cmpq	%rbp, %rbx
	je	.L2
	cmpl	$1, (%rbx)
	jne	.L15
.L58:
	leaq	.LC2(%rip), %rdi
	call	puts@PLT
	jmp	.L16
	.p2align 4,,10
	.p2align 3
.L52:
	addl	$1, %r14d
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L53:
	addl	$1, 4(%rsp)
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L26:
	movl	$0, 4(%rsp)
	xorl	%r12d, %r12d
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L28:
	movl	$5, %ebx
.L13:
	leaq	.LC1(%rip), %rdi
	call	puts@PLT
	subl	$1, %ebx
	jne	.L13
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L27:
	movl	$1, 4(%rsp)
	xorl	%r12d, %r12d
	xorl	%r14d, %r14d
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L54:
	movl	$5, %ebx
.L9:
	leaq	.LC1(%rip), %rdi
	call	puts@PLT
	subl	$1, %ebx
	jne	.L9
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L51:
	movq	40(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L59
	addq	$56, %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
.L59:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.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:

#include<stdio.h>
	int main(){
		int a[5],g,c,p,i;
		while(scanf("%d",&a[0]),a[0]){
			g=0;
			c=0;
			p=0;
			if(a[0]==1)
				g++;
			else if(a[0]==2)
				c++;
			else if(a[0]==3)
				p++;
			for(i=1;i<5;i++){
				scanf("%d",&a[i]);
				if(a[i]==1)
				g++;
			else if(a[i]==2)
				c++;
			else if(a[i]==3)
				p++;
			}
			if(g>0&&c>0&&p>0)
				for(i=0;i<5;i++)
				printf("3\n");
			else if(g==5||c==5||p==5)
				for(i=0;i<5;i++)
				printf("3\n");
			else if(g>0&&c>0)
				for(i=0;i<5;i++){
					if(a[i]==1)
						printf("1\n");
					else printf("2\n");
			}
			else if(g>0&&p>0)
				for(i=0;i<5;i++){
					if(a[i]==1)
						printf("2\n");
					else printf("1\n");
			}
			else for(i=0;i<5;i++){
				if(a[i]==2)
					printf("1\n");
				else printf("2\n");
			}
		}
		return 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
#include<stdio.h>
	int main(){
		int a[5],g,c,p,i;
		while(scanf("%d",&a[0]),a[0]){
			g=0;
			c=0;
			p=0;
			if(a[0]==1)
				g++;
			else if(a[0]==2)
				c++;
			else if(a[0]==3)
				p++;
			for(i=1;i<5;i++){
				scanf("%d",&a[i]);
				if(a[i]==1)
				g++;
			else if(a[i]==2)
				c++;
			else if(a[i]==3)
				p++;
			}
			if(g>0&&c>0&&p>0)
				for(i=0;i<5;i++)
				printf("3\n");
			else if(g==5||c==5||p==5)
				for(i=0;i<5;i++)
				printf("3\n");
			else if(g>0&&c>0)
				for(i=0;i<5;i++){
					if(a[i]==1)
						printf("1\n");
					else printf("2\n");
			}
			else if(g>0&&p>0)
				for(i=0;i<5;i++){
					if(a[i]==1)
						printf("2\n");
					else printf("1\n");
			}
			else for(i=0;i<5;i++){
				if(a[i]==2)
					printf("1\n");
				else printf("2\n");
			}
		}
		return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"3"
.LC2:
	.string	"1"
.LC3:
	.string	"2"
	.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	$48, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	jmp	.L2
.L32:
	movl	$0, -48(%rbp)
	movl	$0, -44(%rbp)
	movl	$0, -40(%rbp)
	movl	-32(%rbp), %eax
	cmpl	$1, %eax
	jne	.L3
	addl	$1, -48(%rbp)
	jmp	.L4
.L3:
	movl	-32(%rbp), %eax
	cmpl	$2, %eax
	jne	.L5
	addl	$1, -44(%rbp)
	jmp	.L4
.L5:
	movl	-32(%rbp), %eax
	cmpl	$3, %eax
	jne	.L4
	addl	$1, -40(%rbp)
.L4:
	movl	$1, -36(%rbp)
	jmp	.L6
.L10:
	leaq	-32(%rbp), %rdx
	movl	-36(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-36(%rbp), %eax
	cltq
	movl	-32(%rbp,%rax,4), %eax
	cmpl	$1, %eax
	jne	.L7
	addl	$1, -48(%rbp)
	jmp	.L8
.L7:
	movl	-36(%rbp), %eax
	cltq
	movl	-32(%rbp,%rax,4), %eax
	cmpl	$2, %eax
	jne	.L9
	addl	$1, -44(%rbp)
	jmp	.L8
.L9:
	movl	-36(%rbp), %eax
	cltq
	movl	-32(%rbp,%rax,4), %eax
	cmpl	$3, %eax
	jne	.L8
	addl	$1, -40(%rbp)
.L8:
	addl	$1, -36(%rbp)
.L6:
	cmpl	$4, -36(%rbp)
	jle	.L10
	cmpl	$0, -48(%rbp)
	jle	.L11
	cmpl	$0, -44(%rbp)
	jle	.L11
	cmpl	$0, -40(%rbp)
	jle	.L11
	movl	$0, -36(%rbp)
	jmp	.L12
.L13:
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	addl	$1, -36(%rbp)
.L12:
	cmpl	$4, -36(%rbp)
	jle	.L13
	jmp	.L2
.L11:
	cmpl	$5, -48(%rbp)
	je	.L14
	cmpl	$5, -44(%rbp)
	je	.L14
	cmpl	$5, -40(%rbp)
	jne	.L15
.L14:
	movl	$0, -36(%rbp)
	jmp	.L16
.L17:
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	addl	$1, -36(%rbp)
.L16:
	cmpl	$4, -36(%rbp)
	jle	.L17
	jmp	.L2
.L15:
	cmpl	$0, -48(%rbp)
	jle	.L18
	cmpl	$0, -44(%rbp)
	jle	.L18
	movl	$0, -36(%rbp)
	jmp	.L19
.L22:
	movl	-36(%rbp), %eax
	cltq
	movl	-32(%rbp,%rax,4), %eax
	cmpl	$1, %eax
	jne	.L20
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L21
.L20:
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
.L21:
	addl	$1, -36(%rbp)
.L19:
	cmpl	$4, -36(%rbp)
	jle	.L22
	jmp	.L2
.L18:
	cmpl	$0, -48(%rbp)
	jle	.L23
	cmpl	$0, -40(%rbp)
	jle	.L23
	movl	$0, -36(%rbp)
	jmp	.L24
.L27:
	movl	-36(%rbp), %eax
	cltq
	movl	-32(%rbp,%rax,4), %eax
	cmpl	$1, %eax
	jne	.L25
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L26
.L25:
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
.L26:
	addl	$1, -36(%rbp)
.L24:
	cmpl	$4, -36(%rbp)
	jle	.L27
	jmp	.L2
.L23:
	movl	$0, -36(%rbp)
	jmp	.L28
.L31:
	movl	-36(%rbp), %eax
	cltq
	movl	-32(%rbp,%rax,4), %eax
	cmpl	$2, %eax
	jne	.L29
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L30
.L29:
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
.L30:
	addl	$1, -36(%rbp)
.L28:
	cmpl	$4, -36(%rbp)
	jle	.L31
.L2:
	leaq	-32(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-32(%rbp), %eax
	testl	%eax, %eax
	jne	.L32
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L34
	call	__stack_chk_fail@PLT
.L34:
	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
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"3"
.LC2:
	.string	"1"
.LC3:
	.string	"2"
	.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	$48, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	jmp	.L2
.L32:
	movl	$0, -48(%rbp)
	movl	$0, -44(%rbp)
	movl	$0, -40(%rbp)
	movl	-32(%rbp), %eax
	cmpl	$1, %eax
	jne	.L3
	addl	$1, -48(%rbp)
	jmp	.L4
.L3:
	movl	-32(%rbp), %eax
	cmpl	$2, %eax
	jne	.L5
	addl	$1, -44(%rbp)
	jmp	.L4
.L5:
	movl	-32(%rbp), %eax
	cmpl	$3, %eax
	jne	.L4
	addl	$1, -40(%rbp)
.L4:
	movl	$1, -36(%rbp)
	jmp	.L6
.L10:
	leaq	-32(%rbp), %rdx
	movl	-36(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-36(%rbp), %eax
	cltq
	movl	-32(%rbp,%rax,4), %eax
	cmpl	$1, %eax
	jne	.L7
	addl	$1, -48(%rbp)
	jmp	.L8
.L7:
	movl	-36(%rbp), %eax
	cltq
	movl	-32(%rbp,%rax,4), %eax
	cmpl	$2, %eax
	jne	.L9
	addl	$1, -44(%rbp)
	jmp	.L8
.L9:
	movl	-36(%rbp), %eax
	cltq
	movl	-32(%rbp,%rax,4), %eax
	cmpl	$3, %eax
	jne	.L8
	addl	$1, -40(%rbp)
.L8:
	addl	$1, -36(%rbp)
.L6:
	cmpl	$4, -36(%rbp)
	jle	.L10
	cmpl	$0, -48(%rbp)
	jle	.L11
	cmpl	$0, -44(%rbp)
	jle	.L11
	cmpl	$0, -40(%rbp)
	jle	.L11
	movl	$0, -36(%rbp)
	jmp	.L12
.L13:
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	addl	$1, -36(%rbp)
.L12:
	cmpl	$4, -36(%rbp)
	jle	.L13
	jmp	.L2
.L11:
	cmpl	$5, -48(%rbp)
	je	.L14
	cmpl	$5, -44(%rbp)
	je	.L14
	cmpl	$5, -40(%rbp)
	jne	.L15
.L14:
	movl	$0, -36(%rbp)
	jmp	.L16
.L17:
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	addl	$1, -36(%rbp)
.L16:
	cmpl	$4, -36(%rbp)
	jle	.L17
	jmp	.L2
.L15:
	cmpl	$0, -48(%rbp)
	jle	.L18
	cmpl	$0, -44(%rbp)
	jle	.L18
	movl	$0, -36(%rbp)
	jmp	.L19
.L22:
	movl	-36(%rbp), %eax
	cltq
	movl	-32(%rbp,%rax,4), %eax
	cmpl	$1, %eax
	jne	.L20
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L21
.L20:
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
.L21:
	addl	$1, -36(%rbp)
.L19:
	cmpl	$4, -36(%rbp)
	jle	.L22
	jmp	.L2
.L18:
	cmpl	$0, -48(%rbp)
	jle	.L23
	cmpl	$0, -40(%rbp)
	jle	.L23
	movl	$0, -36(%rbp)
	jmp	.L24
.L27:
	movl	-36(%rbp), %eax
	cltq
	movl	-32(%rbp,%rax,4), %eax
	cmpl	$1, %eax
	jne	.L25
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L26
.L25:
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
.L26:
	addl	$1, -36(%rbp)
.L24:
	cmpl	$4, -36(%rbp)
	jle	.L27
	jmp	.L2
.L23:
	movl	$0, -36(%rbp)
	jmp	.L28
.L31:
	movl	-36(%rbp), %eax
	cltq
	movl	-32(%rbp,%rax,4), %eax
	cmpl	$2, %eax
	jne	.L29
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L30
.L29:
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
.L30:
	addl	$1, -36(%rbp)
.L28:
	cmpl	$4, -36(%rbp)
	jle	.L31
.L2:
	leaq	-32(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-32(%rbp), %eax
	testl	%eax, %eax
	jne	.L32
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L34
	call	__stack_chk_fail@PLT
.L34:
	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:
