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>
#include <stdlib.h>
#include <math.h>
#include <string.h>

int in(void){
	int i;scanf("%d",&i);
	return i;
}
long long llin(void){
	long long i;scanf("%lld",&i);
	return i;
}
void print(int a){
	printf("%d\n",a);
}
void llprint(long long a){
	printf("%lld\n",a);
}
void print2(int a,int b){
	printf("%d %d\n",a,b);
}
long long max(long long a,long long b){
	return a>b?a:b;
}
long long min(long long a,long long b){
	return a<b?a:b;
}

void solve(int h[],int w,int l){
	int i;
	for(i=0;i<5;i++){
		if(h[i]==w){
			puts("1");
		}
		else{
			puts("2");
		}
	}
}

int main(void){
	int h[5],f[4],i;
	while(1){
		memset(f,0,sizeof(f));
		for(i=0;i<5;i++){
			h[i]=in();
			if(h[i]==0){
				return 0;
			}
			f[h[i]]++;
		}
		if(f[1]&&f[2]&&f[3]||!f[1]&&!f[2]||!f[2]&&!f[3]||!f[3]&&!f[1]){
			printf("3\n3\n3\n3\n3\n");
		}
		else if(!f[1]){
			solve(h,2,3);
		}
		else if(!f[2]){
			solve(h,3,1);
		}
		else if(!f[3]){
			solve(h,1,2);
		}
	}
	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
	.text
	.globl	in
	.type	in, @function
in:
.LFB6:
	.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
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-12(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-12(%rbp), %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L3
	call	__stack_chk_fail@PLT
.L3:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	in, .-in
	.section	.rodata
.LC1:
	.string	"%lld"
	.text
	.globl	llin
	.type	llin, @function
llin:
.LFB7:
	.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
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-16(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	-16(%rbp), %rax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L6
	call	__stack_chk_fail@PLT
.L6:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	llin, .-llin
	.section	.rodata
.LC2:
	.string	"%d\n"
	.text
	.globl	print
	.type	print, @function
print:
.LFB8:
	.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)
	movl	-4(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	print, .-print
	.section	.rodata
.LC3:
	.string	"%lld\n"
	.text
	.globl	llprint
	.type	llprint, @function
llprint:
.LFB9:
	.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
	movq	%rdi, -8(%rbp)
	movq	-8(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	llprint, .-llprint
	.section	.rodata
.LC4:
	.string	"%d %d\n"
	.text
	.globl	print2
	.type	print2, @function
print2:
.LFB10:
	.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)
	movl	%esi, -8(%rbp)
	movl	-8(%rbp), %edx
	movl	-4(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC4(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	print2, .-print2
	.globl	max
	.type	max, @function
max:
.LFB11:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movq	-16(%rbp), %rdx
	movq	-8(%rbp), %rax
	cmpq	%rax, %rdx
	cmovge	%rdx, %rax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	max, .-max
	.globl	min
	.type	min, @function
min:
.LFB12:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movq	-16(%rbp), %rdx
	movq	-8(%rbp), %rax
	cmpq	%rax, %rdx
	cmovle	%rdx, %rax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.size	min, .-min
	.section	.rodata
.LC5:
	.string	"1"
.LC6:
	.string	"2"
	.text
	.globl	solve
	.type	solve, @function
solve:
.LFB13:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movq	%rdi, -24(%rbp)
	movl	%esi, -28(%rbp)
	movl	%edx, -32(%rbp)
	movl	$0, -4(%rbp)
	jmp	.L15
.L18:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	cmpl	%eax, -28(%rbp)
	jne	.L16
	leaq	.LC5(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L17
.L16:
	leaq	.LC6(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
.L17:
	addl	$1, -4(%rbp)
.L15:
	cmpl	$4, -4(%rbp)
	jle	.L18
	nop
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE13:
	.size	solve, .-solve
	.section	.rodata
.LC7:
	.string	"3\n3\n3\n3\n3"
	.text
	.globl	main
	.type	main, @function
main:
.LFB14:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$64, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
.L32:
	leaq	-48(%rbp), %rax
	movl	$16, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	movl	$0, -52(%rbp)
	jmp	.L20
.L23:
	call	in
	movl	-52(%rbp), %edx
	movslq	%edx, %rdx
	movl	%eax, -32(%rbp,%rdx,4)
	movl	-52(%rbp), %eax
	cltq
	movl	-32(%rbp,%rax,4), %eax
	testl	%eax, %eax
	jne	.L21
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L33
	jmp	.L34
.L21:
	movl	-52(%rbp), %eax
	cltq
	movl	-32(%rbp,%rax,4), %eax
	movslq	%eax, %rdx
	movl	-48(%rbp,%rdx,4), %edx
	addl	$1, %edx
	cltq
	movl	%edx, -48(%rbp,%rax,4)
	addl	$1, -52(%rbp)
.L20:
	cmpl	$4, -52(%rbp)
	jle	.L23
	movl	-44(%rbp), %eax
	testl	%eax, %eax
	je	.L24
	movl	-40(%rbp), %eax
	testl	%eax, %eax
	je	.L24
	movl	-36(%rbp), %eax
	testl	%eax, %eax
	jne	.L25
.L24:
	movl	-44(%rbp), %eax
	testl	%eax, %eax
	jne	.L26
	movl	-40(%rbp), %eax
	testl	%eax, %eax
	je	.L25
.L26:
	movl	-40(%rbp), %eax
	testl	%eax, %eax
	jne	.L27
	movl	-36(%rbp), %eax
	testl	%eax, %eax
	je	.L25
.L27:
	movl	-36(%rbp), %eax
	testl	%eax, %eax
	jne	.L28
	movl	-44(%rbp), %eax
	testl	%eax, %eax
	jne	.L28
.L25:
	leaq	.LC7(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L29
.L28:
	movl	-44(%rbp), %eax
	testl	%eax, %eax
	jne	.L30
	leaq	-32(%rbp), %rax
	movl	$3, %edx
	movl	$2, %esi
	movq	%rax, %rdi
	call	solve
	jmp	.L32
.L30:
	movl	-40(%rbp), %eax
	testl	%eax, %eax
	jne	.L31
	leaq	-32(%rbp), %rax
	movl	$1, %edx
	movl	$3, %esi
	movq	%rax, %rdi
	call	solve
	jmp	.L32
.L31:
	movl	-36(%rbp), %eax
	testl	%eax, %eax
	jne	.L32
	leaq	-32(%rbp), %rax
	movl	$2, %edx
	movl	$1, %esi
	movq	%rax, %rdi
	call	solve
.L29:
	jmp	.L32
.L34:
	call	__stack_chk_fail@PLT
.L33:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE14:
	.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"
	.text
	.p2align 4
	.globl	in
	.type	in, @function
in:
.LFB51:
	.cfi_startproc
	endbr64
	subq	$24, %rsp
	.cfi_def_cfa_offset 32
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %eax
	movq	8(%rsp), %rdx
	subq	%fs:40, %rdx
	jne	.L5
	addq	$24, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
.L5:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE51:
	.size	in, .-in
	.section	.rodata.str1.1
.LC1:
	.string	"%lld"
	.text
	.p2align 4
	.globl	llin
	.type	llin, @function
llin:
.LFB52:
	.cfi_startproc
	endbr64
	subq	$24, %rsp
	.cfi_def_cfa_offset 32
	leaq	.LC1(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %rsi
	call	__isoc99_scanf@PLT
	movq	(%rsp), %rax
	movq	8(%rsp), %rdx
	subq	%fs:40, %rdx
	jne	.L9
	addq	$24, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
.L9:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE52:
	.size	llin, .-llin
	.section	.rodata.str1.1
.LC2:
	.string	"%d\n"
	.text
	.p2align 4
	.globl	print
	.type	print, @function
print:
.LFB53:
	.cfi_startproc
	endbr64
	movl	%edi, %edx
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	jmp	__printf_chk@PLT
	.cfi_endproc
.LFE53:
	.size	print, .-print
	.section	.rodata.str1.1
.LC3:
	.string	"%lld\n"
	.text
	.p2align 4
	.globl	llprint
	.type	llprint, @function
llprint:
.LFB54:
	.cfi_startproc
	endbr64
	movq	%rdi, %rdx
	leaq	.LC3(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	jmp	__printf_chk@PLT
	.cfi_endproc
.LFE54:
	.size	llprint, .-llprint
	.section	.rodata.str1.1
.LC4:
	.string	"%d %d\n"
	.text
	.p2align 4
	.globl	print2
	.type	print2, @function
print2:
.LFB55:
	.cfi_startproc
	endbr64
	movl	%edi, %edx
	movl	%esi, %ecx
	movl	$1, %edi
	xorl	%eax, %eax
	leaq	.LC4(%rip), %rsi
	jmp	__printf_chk@PLT
	.cfi_endproc
.LFE55:
	.size	print2, .-print2
	.p2align 4
	.globl	max
	.type	max, @function
max:
.LFB56:
	.cfi_startproc
	endbr64
	cmpq	%rdi, %rsi
	movq	%rdi, %rax
	cmovge	%rsi, %rax
	ret
	.cfi_endproc
.LFE56:
	.size	max, .-max
	.p2align 4
	.globl	min
	.type	min, @function
min:
.LFB57:
	.cfi_startproc
	endbr64
	cmpq	%rdi, %rsi
	movq	%rdi, %rax
	cmovle	%rsi, %rax
	ret
	.cfi_endproc
.LFE57:
	.size	min, .-min
	.section	.rodata.str1.1
.LC5:
	.string	"1"
.LC6:
	.string	"2"
	.text
	.p2align 4
	.globl	solve
	.type	solve, @function
solve:
.LFB58:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	leaq	.LC5(%rip), %r14
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	leaq	.LC6(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	leaq	20(%rdi), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	movl	%esi, %ebp
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	movq	%rdi, %rbx
.L18:
	cmpl	%ebp, (%rbx)
	je	.L21
	movq	%r13, %rdi
	call	puts@PLT
.L17:
	addq	$4, %rbx
	cmpq	%r12, %rbx
	jne	.L18
	popq	%rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	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
	.p2align 4,,10
	.p2align 3
.L21:
	.cfi_restore_state
	movq	%r14, %rdi
	call	puts@PLT
	jmp	.L17
	.cfi_endproc
.LFE58:
	.size	solve, .-solve
	.section	.rodata.str1.1
.LC7:
	.string	"3\n3\n3\n3\n3"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB59:
	.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
	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	.LC0(%rip), %rbx
	subq	$72, %rsp
	.cfi_def_cfa_offset 128
	movq	%fs:40, %rax
	movq	%rax, 56(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %r14
	leaq	32(%rsp), %r13
	leaq	52(%rsp), %r12
	leaq	12(%rsp), %rbp
.L23:
	pxor	%xmm0, %xmm0
	movq	%r13, %r15
	movaps	%xmm0, (%r14)
.L25:
	movq	%rbp, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	12(%rsp), %rax
	movl	%eax, (%r15)
	testl	%eax, %eax
	je	.L44
	addq	$4, %r15
	addl	$1, 16(%rsp,%rax,4)
	cmpq	%r12, %r15
	jne	.L25
	movl	20(%rsp), %edx
	movl	24(%rsp), %eax
	testl	%edx, %edx
	jne	.L45
	testl	%eax, %eax
	je	.L28
	movl	28(%rsp), %eax
	testl	%eax, %eax
	jne	.L46
	.p2align 4,,10
	.p2align 3
.L28:
	leaq	.LC7(%rip), %rdi
	call	puts@PLT
	jmp	.L23
	.p2align 4,,10
	.p2align 3
.L45:
	movl	28(%rsp), %edx
	testl	%eax, %eax
	je	.L27
	testl	%edx, %edx
	jne	.L28
	movl	$2, %edx
	movl	$1, %esi
	movq	%r13, %rdi
	call	solve
	jmp	.L23
	.p2align 4,,10
	.p2align 3
.L27:
	testl	%edx, %edx
	je	.L28
	movl	$1, %edx
	movl	$3, %esi
	movq	%r13, %rdi
	call	solve
	jmp	.L23
	.p2align 4,,10
	.p2align 3
.L44:
	movq	56(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L47
	addq	$72, %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
.L46:
	.cfi_restore_state
	movl	$3, %edx
	movl	$2, %esi
	movq	%r13, %rdi
	call	solve
	jmp	.L23
.L47:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE59:
	.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"
	.text
	.p2align 4
	.globl	in
	.type	in, @function
in:
.LFB51:
	.cfi_startproc
	endbr64
	subq	$24, %rsp
	.cfi_def_cfa_offset 32
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %eax
	movq	8(%rsp), %rdx
	subq	%fs:40, %rdx
	jne	.L5
	addq	$24, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
.L5:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE51:
	.size	in, .-in
	.section	.rodata.str1.1
.LC1:
	.string	"%lld"
	.text
	.p2align 4
	.globl	llin
	.type	llin, @function
llin:
.LFB52:
	.cfi_startproc
	endbr64
	subq	$24, %rsp
	.cfi_def_cfa_offset 32
	leaq	.LC1(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %rsi
	call	__isoc99_scanf@PLT
	movq	(%rsp), %rax
	movq	8(%rsp), %rdx
	subq	%fs:40, %rdx
	jne	.L9
	addq	$24, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
.L9:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE52:
	.size	llin, .-llin
	.section	.rodata.str1.1
.LC2:
	.string	"%d\n"
	.text
	.p2align 4
	.globl	print
	.type	print, @function
print:
.LFB53:
	.cfi_startproc
	endbr64
	movl	%edi, %edx
	leaq	.LC2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	jmp	__printf_chk@PLT
	.cfi_endproc
.LFE53:
	.size	print, .-print
	.section	.rodata.str1.1
.LC3:
	.string	"%lld\n"
	.text
	.p2align 4
	.globl	llprint
	.type	llprint, @function
llprint:
.LFB54:
	.cfi_startproc
	endbr64
	movq	%rdi, %rdx
	leaq	.LC3(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	jmp	__printf_chk@PLT
	.cfi_endproc
.LFE54:
	.size	llprint, .-llprint
	.section	.rodata.str1.1
.LC4:
	.string	"%d %d\n"
	.text
	.p2align 4
	.globl	print2
	.type	print2, @function
print2:
.LFB55:
	.cfi_startproc
	endbr64
	movl	%edi, %edx
	movl	%esi, %ecx
	movl	$1, %edi
	xorl	%eax, %eax
	leaq	.LC4(%rip), %rsi
	jmp	__printf_chk@PLT
	.cfi_endproc
.LFE55:
	.size	print2, .-print2
	.p2align 4
	.globl	max
	.type	max, @function
max:
.LFB56:
	.cfi_startproc
	endbr64
	cmpq	%rdi, %rsi
	movq	%rdi, %rax
	cmovge	%rsi, %rax
	ret
	.cfi_endproc
.LFE56:
	.size	max, .-max
	.p2align 4
	.globl	min
	.type	min, @function
min:
.LFB57:
	.cfi_startproc
	endbr64
	cmpq	%rdi, %rsi
	movq	%rdi, %rax
	cmovle	%rsi, %rax
	ret
	.cfi_endproc
.LFE57:
	.size	min, .-min
	.section	.rodata.str1.1
.LC5:
	.string	"1"
.LC6:
	.string	"2"
	.text
	.p2align 4
	.globl	solve
	.type	solve, @function
solve:
.LFB58:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	leaq	.LC5(%rip), %r14
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	leaq	.LC6(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	leaq	20(%rdi), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	movl	%esi, %ebp
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	movq	%rdi, %rbx
.L18:
	cmpl	%ebp, (%rbx)
	je	.L21
	movq	%r13, %rdi
	call	puts@PLT
.L17:
	addq	$4, %rbx
	cmpq	%r12, %rbx
	jne	.L18
	popq	%rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	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
	.p2align 4,,10
	.p2align 3
.L21:
	.cfi_restore_state
	movq	%r14, %rdi
	call	puts@PLT
	jmp	.L17
	.cfi_endproc
.LFE58:
	.size	solve, .-solve
	.section	.rodata.str1.1
.LC7:
	.string	"3\n3\n3\n3\n3"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB59:
	.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
	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	.LC0(%rip), %rbx
	subq	$72, %rsp
	.cfi_def_cfa_offset 128
	movq	%fs:40, %rax
	movq	%rax, 56(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %r14
	leaq	32(%rsp), %r13
	leaq	52(%rsp), %r12
	leaq	12(%rsp), %rbp
.L23:
	pxor	%xmm0, %xmm0
	movq	%r13, %r15
	movaps	%xmm0, (%r14)
.L25:
	movq	%rbp, %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movslq	12(%rsp), %rax
	movl	%eax, (%r15)
	testl	%eax, %eax
	je	.L44
	addq	$4, %r15
	addl	$1, 16(%rsp,%rax,4)
	cmpq	%r12, %r15
	jne	.L25
	movl	20(%rsp), %edx
	movl	24(%rsp), %eax
	testl	%edx, %edx
	jne	.L45
	testl	%eax, %eax
	je	.L28
	movl	28(%rsp), %eax
	testl	%eax, %eax
	jne	.L46
	.p2align 4,,10
	.p2align 3
.L28:
	leaq	.LC7(%rip), %rdi
	call	puts@PLT
	jmp	.L23
	.p2align 4,,10
	.p2align 3
.L45:
	movl	28(%rsp), %edx
	testl	%eax, %eax
	je	.L27
	testl	%edx, %edx
	jne	.L28
	movl	$2, %edx
	movl	$1, %esi
	movq	%r13, %rdi
	call	solve
	jmp	.L23
	.p2align 4,,10
	.p2align 3
.L27:
	testl	%edx, %edx
	je	.L28
	movl	$1, %edx
	movl	$3, %esi
	movq	%r13, %rdi
	call	solve
	jmp	.L23
	.p2align 4,,10
	.p2align 3
.L44:
	movq	56(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L47
	addq	$72, %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
.L46:
	.cfi_restore_state
	movl	$3, %edx
	movl	$2, %esi
	movq	%r13, %rdi
	call	solve
	jmp	.L23
.L47:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE59:
	.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>
#include <stdlib.h>
#include <math.h>
#include <string.h>

int in(void){
	int i;scanf("%d",&i);
	return i;
}
long long llin(void){
	long long i;scanf("%lld",&i);
	return i;
}
void print(int a){
	printf("%d\n",a);
}
void llprint(long long a){
	printf("%lld\n",a);
}
void print2(int a,int b){
	printf("%d %d\n",a,b);
}
long long max(long long a,long long b){
	return a>b?a:b;
}
long long min(long long a,long long b){
	return a<b?a:b;
}

void solve(int h[],int w,int l){
	int i;
	for(i=0;i<5;i++){
		if(h[i]==w){
			puts("1");
		}
		else{
			puts("2");
		}
	}
}

int main(void){
	int h[5],f[4],i;
	while(1){
		memset(f,0,sizeof(f));
		for(i=0;i<5;i++){
			h[i]=in();
			if(h[i]==0){
				return 0;
			}
			f[h[i]]++;
		}
		if(f[1]&&f[2]&&f[3]||!f[1]&&!f[2]||!f[2]&&!f[3]||!f[3]&&!f[1]){
			printf("3\n3\n3\n3\n3\n");
		}
		else if(!f[1]){
			solve(h,2,3);
		}
		else if(!f[2]){
			solve(h,3,1);
		}
		else if(!f[3]){
			solve(h,1,2);
		}
	}
	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>
#include <stdlib.h>
#include <math.h>
#include <string.h>

int in(void){
	int i;scanf("%d",&i);
	return i;
}
long long llin(void){
	long long i;scanf("%lld",&i);
	return i;
}
void print(int a){
	printf("%d\n",a);
}
void llprint(long long a){
	printf("%lld\n",a);
}
void print2(int a,int b){
	printf("%d %d\n",a,b);
}
long long max(long long a,long long b){
	return a>b?a:b;
}
long long min(long long a,long long b){
	return a<b?a:b;
}

void solve(int h[],int w,int l){
	int i;
	for(i=0;i<5;i++){
		if(h[i]==w){
			puts("1");
		}
		else{
			puts("2");
		}
	}
}

int main(void){
	int h[5],f[4],i;
	while(1){
		memset(f,0,sizeof(f));
		for(i=0;i<5;i++){
			h[i]=in();
			if(h[i]==0){
				return 0;
			}
			f[h[i]]++;
		}
		if(f[1]&&f[2]&&f[3]||!f[1]&&!f[2]||!f[2]&&!f[3]||!f[3]&&!f[1]){
			printf("3\n3\n3\n3\n3\n");
		}
		else if(!f[1]){
			solve(h,2,3);
		}
		else if(!f[2]){
			solve(h,3,1);
		}
		else if(!f[3]){
			solve(h,1,2);
		}
	}
	return 0;
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
	.text
	.globl	in
	.type	in, @function
in:
.LFB6:
	.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
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-12(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-12(%rbp), %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L3
	call	__stack_chk_fail@PLT
.L3:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	in, .-in
	.section	.rodata
.LC1:
	.string	"%lld"
	.text
	.globl	llin
	.type	llin, @function
llin:
.LFB7:
	.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
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-16(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	-16(%rbp), %rax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L6
	call	__stack_chk_fail@PLT
.L6:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	llin, .-llin
	.section	.rodata
.LC2:
	.string	"%d\n"
	.text
	.globl	print
	.type	print, @function
print:
.LFB8:
	.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)
	movl	-4(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	print, .-print
	.section	.rodata
.LC3:
	.string	"%lld\n"
	.text
	.globl	llprint
	.type	llprint, @function
llprint:
.LFB9:
	.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
	movq	%rdi, -8(%rbp)
	movq	-8(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	llprint, .-llprint
	.section	.rodata
.LC4:
	.string	"%d %d\n"
	.text
	.globl	print2
	.type	print2, @function
print2:
.LFB10:
	.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)
	movl	%esi, -8(%rbp)
	movl	-8(%rbp), %edx
	movl	-4(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC4(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	print2, .-print2
	.globl	max
	.type	max, @function
max:
.LFB11:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movq	-16(%rbp), %rdx
	movq	-8(%rbp), %rax
	cmpq	%rax, %rdx
	cmovge	%rdx, %rax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	max, .-max
	.globl	min
	.type	min, @function
min:
.LFB12:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movq	-16(%rbp), %rdx
	movq	-8(%rbp), %rax
	cmpq	%rax, %rdx
	cmovle	%rdx, %rax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.size	min, .-min
	.section	.rodata
.LC5:
	.string	"1"
.LC6:
	.string	"2"
	.text
	.globl	solve
	.type	solve, @function
solve:
.LFB13:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movq	%rdi, -24(%rbp)
	movl	%esi, -28(%rbp)
	movl	%edx, -32(%rbp)
	movl	$0, -4(%rbp)
	jmp	.L15
.L18:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	cmpl	%eax, -28(%rbp)
	jne	.L16
	leaq	.LC5(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L17
.L16:
	leaq	.LC6(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
.L17:
	addl	$1, -4(%rbp)
.L15:
	cmpl	$4, -4(%rbp)
	jle	.L18
	nop
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE13:
	.size	solve, .-solve
	.section	.rodata
.LC7:
	.string	"3\n3\n3\n3\n3"
	.text
	.globl	main
	.type	main, @function
main:
.LFB14:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$64, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
.L32:
	leaq	-48(%rbp), %rax
	movl	$16, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	movl	$0, -52(%rbp)
	jmp	.L20
.L23:
	call	in
	movl	-52(%rbp), %edx
	movslq	%edx, %rdx
	movl	%eax, -32(%rbp,%rdx,4)
	movl	-52(%rbp), %eax
	cltq
	movl	-32(%rbp,%rax,4), %eax
	testl	%eax, %eax
	jne	.L21
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L33
	jmp	.L34
.L21:
	movl	-52(%rbp), %eax
	cltq
	movl	-32(%rbp,%rax,4), %eax
	movslq	%eax, %rdx
	movl	-48(%rbp,%rdx,4), %edx
	addl	$1, %edx
	cltq
	movl	%edx, -48(%rbp,%rax,4)
	addl	$1, -52(%rbp)
.L20:
	cmpl	$4, -52(%rbp)
	jle	.L23
	movl	-44(%rbp), %eax
	testl	%eax, %eax
	je	.L24
	movl	-40(%rbp), %eax
	testl	%eax, %eax
	je	.L24
	movl	-36(%rbp), %eax
	testl	%eax, %eax
	jne	.L25
.L24:
	movl	-44(%rbp), %eax
	testl	%eax, %eax
	jne	.L26
	movl	-40(%rbp), %eax
	testl	%eax, %eax
	je	.L25
.L26:
	movl	-40(%rbp), %eax
	testl	%eax, %eax
	jne	.L27
	movl	-36(%rbp), %eax
	testl	%eax, %eax
	je	.L25
.L27:
	movl	-36(%rbp), %eax
	testl	%eax, %eax
	jne	.L28
	movl	-44(%rbp), %eax
	testl	%eax, %eax
	jne	.L28
.L25:
	leaq	.LC7(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L29
.L28:
	movl	-44(%rbp), %eax
	testl	%eax, %eax
	jne	.L30
	leaq	-32(%rbp), %rax
	movl	$3, %edx
	movl	$2, %esi
	movq	%rax, %rdi
	call	solve
	jmp	.L32
.L30:
	movl	-40(%rbp), %eax
	testl	%eax, %eax
	jne	.L31
	leaq	-32(%rbp), %rax
	movl	$1, %edx
	movl	$3, %esi
	movq	%rax, %rdi
	call	solve
	jmp	.L32
.L31:
	movl	-36(%rbp), %eax
	testl	%eax, %eax
	jne	.L32
	leaq	-32(%rbp), %rax
	movl	$2, %edx
	movl	$1, %esi
	movq	%rax, %rdi
	call	solve
.L29:
	jmp	.L32
.L34:
	call	__stack_chk_fail@PLT
.L33:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE14:
	.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"
	.text
	.globl	in
	.type	in, @function
in:
.LFB6:
	.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
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-12(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	-12(%rbp), %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L3
	call	__stack_chk_fail@PLT
.L3:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	in, .-in
	.section	.rodata
.LC1:
	.string	"%lld"
	.text
	.globl	llin
	.type	llin, @function
llin:
.LFB7:
	.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
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-16(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	-16(%rbp), %rax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L6
	call	__stack_chk_fail@PLT
.L6:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	llin, .-llin
	.section	.rodata
.LC2:
	.string	"%d\n"
	.text
	.globl	print
	.type	print, @function
print:
.LFB8:
	.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)
	movl	-4(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	print, .-print
	.section	.rodata
.LC3:
	.string	"%lld\n"
	.text
	.globl	llprint
	.type	llprint, @function
llprint:
.LFB9:
	.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
	movq	%rdi, -8(%rbp)
	movq	-8(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	llprint, .-llprint
	.section	.rodata
.LC4:
	.string	"%d %d\n"
	.text
	.globl	print2
	.type	print2, @function
print2:
.LFB10:
	.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)
	movl	%esi, -8(%rbp)
	movl	-8(%rbp), %edx
	movl	-4(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC4(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	print2, .-print2
	.globl	max
	.type	max, @function
max:
.LFB11:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movq	-16(%rbp), %rdx
	movq	-8(%rbp), %rax
	cmpq	%rax, %rdx
	cmovge	%rdx, %rax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	max, .-max
	.globl	min
	.type	min, @function
min:
.LFB12:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movq	%rdi, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movq	-16(%rbp), %rdx
	movq	-8(%rbp), %rax
	cmpq	%rax, %rdx
	cmovle	%rdx, %rax
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.size	min, .-min
	.section	.rodata
.LC5:
	.string	"1"
.LC6:
	.string	"2"
	.text
	.globl	solve
	.type	solve, @function
solve:
.LFB13:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movq	%rdi, -24(%rbp)
	movl	%esi, -28(%rbp)
	movl	%edx, -32(%rbp)
	movl	$0, -4(%rbp)
	jmp	.L15
.L18:
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	movq	-24(%rbp), %rax
	addq	%rdx, %rax
	movl	(%rax), %eax
	cmpl	%eax, -28(%rbp)
	jne	.L16
	leaq	.LC5(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L17
.L16:
	leaq	.LC6(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
.L17:
	addl	$1, -4(%rbp)
.L15:
	cmpl	$4, -4(%rbp)
	jle	.L18
	nop
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE13:
	.size	solve, .-solve
	.section	.rodata
.LC7:
	.string	"3\n3\n3\n3\n3"
	.text
	.globl	main
	.type	main, @function
main:
.LFB14:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$64, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
.L32:
	leaq	-48(%rbp), %rax
	movl	$16, %edx
	movl	$0, %esi
	movq	%rax, %rdi
	call	memset@PLT
	movl	$0, -52(%rbp)
	jmp	.L20
.L23:
	call	in
	movl	-52(%rbp), %edx
	movslq	%edx, %rdx
	movl	%eax, -32(%rbp,%rdx,4)
	movl	-52(%rbp), %eax
	cltq
	movl	-32(%rbp,%rax,4), %eax
	testl	%eax, %eax
	jne	.L21
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L33
	jmp	.L34
.L21:
	movl	-52(%rbp), %eax
	cltq
	movl	-32(%rbp,%rax,4), %eax
	movslq	%eax, %rdx
	movl	-48(%rbp,%rdx,4), %edx
	addl	$1, %edx
	cltq
	movl	%edx, -48(%rbp,%rax,4)
	addl	$1, -52(%rbp)
.L20:
	cmpl	$4, -52(%rbp)
	jle	.L23
	movl	-44(%rbp), %eax
	testl	%eax, %eax
	je	.L24
	movl	-40(%rbp), %eax
	testl	%eax, %eax
	je	.L24
	movl	-36(%rbp), %eax
	testl	%eax, %eax
	jne	.L25
.L24:
	movl	-44(%rbp), %eax
	testl	%eax, %eax
	jne	.L26
	movl	-40(%rbp), %eax
	testl	%eax, %eax
	je	.L25
.L26:
	movl	-40(%rbp), %eax
	testl	%eax, %eax
	jne	.L27
	movl	-36(%rbp), %eax
	testl	%eax, %eax
	je	.L25
.L27:
	movl	-36(%rbp), %eax
	testl	%eax, %eax
	jne	.L28
	movl	-44(%rbp), %eax
	testl	%eax, %eax
	jne	.L28
.L25:
	leaq	.LC7(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L29
.L28:
	movl	-44(%rbp), %eax
	testl	%eax, %eax
	jne	.L30
	leaq	-32(%rbp), %rax
	movl	$3, %edx
	movl	$2, %esi
	movq	%rax, %rdi
	call	solve
	jmp	.L32
.L30:
	movl	-40(%rbp), %eax
	testl	%eax, %eax
	jne	.L31
	leaq	-32(%rbp), %rax
	movl	$1, %edx
	movl	$3, %esi
	movq	%rax, %rdi
	call	solve
	jmp	.L32
.L31:
	movl	-36(%rbp), %eax
	testl	%eax, %eax
	jne	.L32
	leaq	-32(%rbp), %rax
	movl	$2, %edx
	movl	$1, %esi
	movq	%rax, %rdi
	call	solve
.L29:
	jmp	.L32
.L34:
	call	__stack_chk_fail@PLT
.L33:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE14:
	.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:
