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

```

Assembly Code:

```assembly
	.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:
```

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.
Optimized Assembly Code:

user
```assembly
	.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
```assembly
	.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:
```
```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;
}

```
Given the following C 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;
}

```

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.
Optimized Assembly Code:

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 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;
}

```

Assembly Code:

```assembly
	.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:
```

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.
Optimized Assembly Code:

train
```assembly
	.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:
```