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(void){
  int h[5]={};
  int rock,scissors,paper;

  while(1){
    rock=0; scissors=0; paper=0;
    for(int i=0;i<5;i++){
      scanf("%d",&h[i]);
      if(h[0]==0) break;//

      switch(h[i]){
        case 1:
          rock++;
          break;
        case 2:
          scissors++;
          break;
        case 3:
          paper++;
          break;
        default:
          break;
      }
    }
    if(h[0]==0) break;//

    if(rock!=0 && scissors!=0 && paper==0){
      for(int i=0;i<5;i++){
        if(h[i]==1) printf("1\n");
        else printf("2\n");
      }
    }
    else if(rock==0 && scissors!=0 && paper!=0){
      for(int i=0;i<5;i++){
        if(h[i]==2) printf("1\n");
        else printf("2\n");
      }
    }
    else if(rock!=0 && scissors==0 && paper!=0){
      for(int i=0;i<5;i++){
        if(h[i]==3) printf("1\n");
        else printf("2\n");
      }
    }
    else{
      for(int i=0;i<5;i++){
        printf("3\n");
      }
    }

  }
  return 0;
}

```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"1"
.LC2:
	.string	"2"
.LC3:
	.string	"3"
	.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	$64, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movq	$0, -32(%rbp)
	movq	$0, -24(%rbp)
	movl	$0, -16(%rbp)
.L31:
	movl	$0, -64(%rbp)
	movl	$0, -60(%rbp)
	movl	$0, -56(%rbp)
	movl	$0, -52(%rbp)
	jmp	.L2
.L10:
	leaq	-32(%rbp), %rdx
	movl	-52(%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	-32(%rbp), %eax
	testl	%eax, %eax
	je	.L35
	movl	-52(%rbp), %eax
	cltq
	movl	-32(%rbp,%rax,4), %eax
	cmpl	$3, %eax
	je	.L5
	cmpl	$3, %eax
	jg	.L36
	cmpl	$1, %eax
	je	.L7
	cmpl	$2, %eax
	je	.L8
	jmp	.L36
.L7:
	addl	$1, -64(%rbp)
	jmp	.L9
.L8:
	addl	$1, -60(%rbp)
	jmp	.L9
.L5:
	addl	$1, -56(%rbp)
	jmp	.L9
.L36:
	nop
.L9:
	addl	$1, -52(%rbp)
.L2:
	cmpl	$4, -52(%rbp)
	jle	.L10
	jmp	.L4
.L35:
	nop
.L4:
	movl	-32(%rbp), %eax
	testl	%eax, %eax
	je	.L37
	cmpl	$0, -64(%rbp)
	je	.L13
	cmpl	$0, -60(%rbp)
	je	.L13
	cmpl	$0, -56(%rbp)
	jne	.L13
	movl	$0, -48(%rbp)
	jmp	.L14
.L17:
	movl	-48(%rbp), %eax
	cltq
	movl	-32(%rbp,%rax,4), %eax
	cmpl	$1, %eax
	jne	.L15
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L16
.L15:
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
.L16:
	addl	$1, -48(%rbp)
.L14:
	cmpl	$4, -48(%rbp)
	jle	.L17
	jmp	.L18
.L13:
	cmpl	$0, -64(%rbp)
	jne	.L19
	cmpl	$0, -60(%rbp)
	je	.L19
	cmpl	$0, -56(%rbp)
	je	.L19
	movl	$0, -44(%rbp)
	jmp	.L20
.L23:
	movl	-44(%rbp), %eax
	cltq
	movl	-32(%rbp,%rax,4), %eax
	cmpl	$2, %eax
	jne	.L21
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L22
.L21:
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
.L22:
	addl	$1, -44(%rbp)
.L20:
	cmpl	$4, -44(%rbp)
	jle	.L23
	jmp	.L18
.L19:
	cmpl	$0, -64(%rbp)
	je	.L24
	cmpl	$0, -60(%rbp)
	jne	.L24
	cmpl	$0, -56(%rbp)
	je	.L24
	movl	$0, -40(%rbp)
	jmp	.L25
.L28:
	movl	-40(%rbp), %eax
	cltq
	movl	-32(%rbp,%rax,4), %eax
	cmpl	$3, %eax
	jne	.L26
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L27
.L26:
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
.L27:
	addl	$1, -40(%rbp)
.L25:
	cmpl	$4, -40(%rbp)
	jle	.L28
	jmp	.L18
.L24:
	movl	$0, -36(%rbp)
	jmp	.L29
.L30:
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	addl	$1, -36(%rbp)
.L29:
	cmpl	$4, -36(%rbp)
	jle	.L30
.L18:
	jmp	.L31
.L37:
	nop
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L33
	call	__stack_chk_fail@PLT
.L33:
	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	"1"
.LC2:
	.string	"2"
.LC3:
	.string	"3"
	.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
	pxor	%xmm0, %xmm0
	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
	leaq	.LC0(%rip), %r12
	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
	movl	$0, 32(%rsp)
	leaq	36(%rsp), %rbp
	movq	%rax, 8(%rsp)
	movaps	%xmm0, 16(%rsp)
	.p2align 4,,10
	.p2align 3
.L2:
	movq	8(%rsp), %r15
	movl	$0, 4(%rsp)
	xorl	%r13d, %r13d
	xorl	%r14d, %r14d
	movq	%r15, %rbx
.L7:
	movq	%r15, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	16(%rsp), %esi
	testl	%esi, %esi
	je	.L3
	movl	(%r15), %eax
	cmpl	$2, %eax
	je	.L4
	cmpl	$3, %eax
	je	.L5
	cmpl	$1, %eax
	sete	%al
	movzbl	%al, %eax
	addl	%eax, %r14d
.L6:
	addq	$4, %r15
	cmpq	%rbp, %r15
	jne	.L7
	testl	%r14d, %r14d
	setne	%al
	testl	%r13d, %r13d
	setne	%dl
	testb	%al, %al
	je	.L24
	testb	%dl, %dl
	je	.L24
	movl	4(%rsp), %ecx
	movl	$5, %r13d
	testl	%ecx, %ecx
	je	.L57
	.p2align 4,,10
	.p2align 3
.L21:
	leaq	.LC3(%rip), %rdi
	call	puts@PLT
	subl	$1, %r13d
	jne	.L21
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L57:
	cmpl	$1, (%rbx)
	je	.L58
.L10:
	leaq	.LC2(%rip), %rdi
	call	puts@PLT
.L11:
	addq	$4, %rbx
	cmpq	%rbp, %rbx
	je	.L2
	cmpl	$1, (%rbx)
	jne	.L10
.L58:
	leaq	.LC1(%rip), %rdi
	call	puts@PLT
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L5:
	addl	$1, 4(%rsp)
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L4:
	addl	$1, %r13d
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L24:
	testl	%r14d, %r14d
	jne	.L14
	testb	%dl, %dl
	je	.L14
	movl	4(%rsp), %edx
	movl	$5, %r13d
	testl	%edx, %edx
	je	.L21
	cmpl	$2, (%rbx)
	je	.L59
.L15:
	leaq	.LC2(%rip), %rdi
	call	puts@PLT
.L16:
	addq	$4, %rbx
	cmpq	%rbx, %rbp
	je	.L2
	cmpl	$2, (%rbx)
	jne	.L15
.L59:
	leaq	.LC1(%rip), %rdi
	call	puts@PLT
	jmp	.L16
	.p2align 4,,10
	.p2align 3
.L14:
	testl	%r13d, %r13d
	sete	%dl
	testb	%al, %dl
	je	.L28
	movl	4(%rsp), %eax
	testl	%eax, %eax
	je	.L28
	cmpl	$3, (%rbx)
	je	.L60
.L18:
	leaq	.LC2(%rip), %rdi
	call	puts@PLT
.L19:
	addq	$4, %rbx
	cmpq	%rbp, %rbx
	je	.L2
	cmpl	$3, (%rbx)
	jne	.L18
.L60:
	leaq	.LC1(%rip), %rdi
	call	puts@PLT
	jmp	.L19
	.p2align 4,,10
	.p2align 3
.L3:
	movq	40(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L61
	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
.L28:
	.cfi_restore_state
	movl	$5, %r13d
	jmp	.L21
.L61:
	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	"1"
.LC2:
	.string	"2"
.LC3:
	.string	"3"
	.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
	pxor	%xmm0, %xmm0
	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
	leaq	.LC0(%rip), %r12
	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
	movl	$0, 32(%rsp)
	leaq	36(%rsp), %rbp
	movq	%rax, 8(%rsp)
	movaps	%xmm0, 16(%rsp)
	.p2align 4,,10
	.p2align 3
.L2:
	movq	8(%rsp), %r15
	movl	$0, 4(%rsp)
	xorl	%r13d, %r13d
	xorl	%r14d, %r14d
	movq	%r15, %rbx
.L7:
	movq	%r15, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	16(%rsp), %esi
	testl	%esi, %esi
	je	.L3
	movl	(%r15), %eax
	cmpl	$2, %eax
	je	.L4
	cmpl	$3, %eax
	je	.L5
	cmpl	$1, %eax
	sete	%al
	movzbl	%al, %eax
	addl	%eax, %r14d
.L6:
	addq	$4, %r15
	cmpq	%rbp, %r15
	jne	.L7
	testl	%r14d, %r14d
	setne	%al
	testl	%r13d, %r13d
	setne	%dl
	testb	%al, %al
	je	.L24
	testb	%dl, %dl
	je	.L24
	movl	4(%rsp), %ecx
	movl	$5, %r13d
	testl	%ecx, %ecx
	je	.L57
	.p2align 4,,10
	.p2align 3
.L21:
	leaq	.LC3(%rip), %rdi
	call	puts@PLT
	subl	$1, %r13d
	jne	.L21
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L57:
	cmpl	$1, (%rbx)
	je	.L58
.L10:
	leaq	.LC2(%rip), %rdi
	call	puts@PLT
.L11:
	addq	$4, %rbx
	cmpq	%rbp, %rbx
	je	.L2
	cmpl	$1, (%rbx)
	jne	.L10
.L58:
	leaq	.LC1(%rip), %rdi
	call	puts@PLT
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L5:
	addl	$1, 4(%rsp)
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L4:
	addl	$1, %r13d
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L24:
	testl	%r14d, %r14d
	jne	.L14
	testb	%dl, %dl
	je	.L14
	movl	4(%rsp), %edx
	movl	$5, %r13d
	testl	%edx, %edx
	je	.L21
	cmpl	$2, (%rbx)
	je	.L59
.L15:
	leaq	.LC2(%rip), %rdi
	call	puts@PLT
.L16:
	addq	$4, %rbx
	cmpq	%rbx, %rbp
	je	.L2
	cmpl	$2, (%rbx)
	jne	.L15
.L59:
	leaq	.LC1(%rip), %rdi
	call	puts@PLT
	jmp	.L16
	.p2align 4,,10
	.p2align 3
.L14:
	testl	%r13d, %r13d
	sete	%dl
	testb	%al, %dl
	je	.L28
	movl	4(%rsp), %eax
	testl	%eax, %eax
	je	.L28
	cmpl	$3, (%rbx)
	je	.L60
.L18:
	leaq	.LC2(%rip), %rdi
	call	puts@PLT
.L19:
	addq	$4, %rbx
	cmpq	%rbp, %rbx
	je	.L2
	cmpl	$3, (%rbx)
	jne	.L18
.L60:
	leaq	.LC1(%rip), %rdi
	call	puts@PLT
	jmp	.L19
	.p2align 4,,10
	.p2align 3
.L3:
	movq	40(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L61
	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
.L28:
	.cfi_restore_state
	movl	$5, %r13d
	jmp	.L21
.L61:
	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(void){
  int h[5]={};
  int rock,scissors,paper;

  while(1){
    rock=0; scissors=0; paper=0;
    for(int i=0;i<5;i++){
      scanf("%d",&h[i]);
      if(h[0]==0) break;//

      switch(h[i]){
        case 1:
          rock++;
          break;
        case 2:
          scissors++;
          break;
        case 3:
          paper++;
          break;
        default:
          break;
      }
    }
    if(h[0]==0) break;//

    if(rock!=0 && scissors!=0 && paper==0){
      for(int i=0;i<5;i++){
        if(h[i]==1) printf("1\n");
        else printf("2\n");
      }
    }
    else if(rock==0 && scissors!=0 && paper!=0){
      for(int i=0;i<5;i++){
        if(h[i]==2) printf("1\n");
        else printf("2\n");
      }
    }
    else if(rock!=0 && scissors==0 && paper!=0){
      for(int i=0;i<5;i++){
        if(h[i]==3) printf("1\n");
        else printf("2\n");
      }
    }
    else{
      for(int i=0;i<5;i++){
        printf("3\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(void){
  int h[5]={};
  int rock,scissors,paper;

  while(1){
    rock=0; scissors=0; paper=0;
    for(int i=0;i<5;i++){
      scanf("%d",&h[i]);
      if(h[0]==0) break;//

      switch(h[i]){
        case 1:
          rock++;
          break;
        case 2:
          scissors++;
          break;
        case 3:
          paper++;
          break;
        default:
          break;
      }
    }
    if(h[0]==0) break;//

    if(rock!=0 && scissors!=0 && paper==0){
      for(int i=0;i<5;i++){
        if(h[i]==1) printf("1\n");
        else printf("2\n");
      }
    }
    else if(rock==0 && scissors!=0 && paper!=0){
      for(int i=0;i<5;i++){
        if(h[i]==2) printf("1\n");
        else printf("2\n");
      }
    }
    else if(rock!=0 && scissors==0 && paper!=0){
      for(int i=0;i<5;i++){
        if(h[i]==3) printf("1\n");
        else printf("2\n");
      }
    }
    else{
      for(int i=0;i<5;i++){
        printf("3\n");
      }
    }

  }
  return 0;
}

```

Unoptimized Assembly Code:

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