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>
void dicemove(char com,int *A);
int main(void)
{
  int i,j,A[6],a,b,q;
  char com[101];
  for(i=0;i<6;i++)
    {
      scanf("%d",&A[i]);
    }
  scanf("%d",&q);
  for(i=0;i<q;i++){
  scanf("%d %d",&a,&b);
  /*??????????????????*/
  for(j=0;j<4;j++){
    if(A[0] == a){break;}
    dicemove('N',A);
  }
  if(A[0]!=a)
    {
   for(j=0;j<4;j++)
     {
    if(A[0] ==a) {break;}
    dicemove('E',A);
     }
    }
  /*??????????????????*/
   for(j=0;j<4;j++)
     {
    if(A[1] ==b) {break;}
    dicemove('M',A);
     }
   printf("%d\n",A[2]);
  }
  /*????????§?????????
    scanf("%s",&com);
    for(i=0;com[i];i++)
      {
	dicemove(com[i],A); 
      }
    ??????*/
 return 0;
}
void dicemove(char comi,int *A){	
  int temp;
  switch(comi){
	case 'E':
	  temp=A[0]; A[0]=A[3]; A[3]=A[5];A[5]=A[2]; A[2]=temp;
	  break;
	case 'N':
	  temp=A[0]; A[0]=A[1]; A[1]=A[5]; A[5]=A[4]; A[4]=temp;
	  break;
	case 'S':
	  temp=A[0]; A[0]=A[4]; A[4]=A[5]; A[5]=A[1]; A[1]=temp;
	  break;
	case 'W':
	  temp=A[0]; A[0]=A[2]; A[2]=A[5]; A[5]=A[3]; A[3]=temp;
	  break;
        case 'M':
          temp=A[1]; A[1]=A[3]; A[3]=A[4]; A[4]=A[2]; A[2]=temp;
	  break;
	}
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d %d"
.LC2:
	.string	"%d\n"
	.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	$176, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -152(%rbp)
	jmp	.L2
.L3:
	leaq	-144(%rbp), %rdx
	movl	-152(%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
	addl	$1, -152(%rbp)
.L2:
	cmpl	$5, -152(%rbp)
	jle	.L3
	leaq	-156(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -152(%rbp)
	jmp	.L4
.L17:
	leaq	-160(%rbp), %rdx
	leaq	-164(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -148(%rbp)
	jmp	.L5
.L8:
	movl	-144(%rbp), %edx
	movl	-164(%rbp), %eax
	cmpl	%eax, %edx
	je	.L20
	leaq	-144(%rbp), %rax
	movq	%rax, %rsi
	movl	$78, %edi
	call	dicemove
	addl	$1, -148(%rbp)
.L5:
	cmpl	$3, -148(%rbp)
	jle	.L8
	jmp	.L7
.L20:
	nop
.L7:
	movl	-144(%rbp), %edx
	movl	-164(%rbp), %eax
	cmpl	%eax, %edx
	je	.L9
	movl	$0, -148(%rbp)
	jmp	.L10
.L12:
	movl	-144(%rbp), %edx
	movl	-164(%rbp), %eax
	cmpl	%eax, %edx
	je	.L21
	leaq	-144(%rbp), %rax
	movq	%rax, %rsi
	movl	$69, %edi
	call	dicemove
	addl	$1, -148(%rbp)
.L10:
	cmpl	$3, -148(%rbp)
	jle	.L12
	jmp	.L9
.L21:
	nop
.L9:
	movl	$0, -148(%rbp)
	jmp	.L13
.L16:
	movl	-140(%rbp), %edx
	movl	-160(%rbp), %eax
	cmpl	%eax, %edx
	je	.L22
	leaq	-144(%rbp), %rax
	movq	%rax, %rsi
	movl	$77, %edi
	call	dicemove
	addl	$1, -148(%rbp)
.L13:
	cmpl	$3, -148(%rbp)
	jle	.L16
	jmp	.L15
.L22:
	nop
.L15:
	movl	-136(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -152(%rbp)
.L4:
	movl	-156(%rbp), %eax
	cmpl	%eax, -152(%rbp)
	jl	.L17
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L19
	call	__stack_chk_fail@PLT
.L19:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.globl	dicemove
	.type	dicemove, @function
dicemove:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, %eax
	movq	%rsi, -32(%rbp)
	movb	%al, -20(%rbp)
	movsbl	-20(%rbp), %eax
	subl	$69, %eax
	cmpl	$18, %eax
	ja	.L31
	movl	%eax, %eax
	leaq	0(,%rax,4), %rdx
	leaq	.L26(%rip), %rax
	movl	(%rdx,%rax), %eax
	cltq
	leaq	.L26(%rip), %rdx
	addq	%rdx, %rax
	notrack jmp	*%rax
	.section	.rodata
	.align 4
	.align 4
.L26:
	.long	.L30-.L26
	.long	.L31-.L26
	.long	.L31-.L26
	.long	.L31-.L26
	.long	.L31-.L26
	.long	.L31-.L26
	.long	.L31-.L26
	.long	.L31-.L26
	.long	.L29-.L26
	.long	.L28-.L26
	.long	.L31-.L26
	.long	.L31-.L26
	.long	.L31-.L26
	.long	.L31-.L26
	.long	.L27-.L26
	.long	.L31-.L26
	.long	.L31-.L26
	.long	.L31-.L26
	.long	.L25-.L26
	.text
.L30:
	movq	-32(%rbp), %rax
	movl	(%rax), %eax
	movl	%eax, -4(%rbp)
	movq	-32(%rbp), %rax
	movl	12(%rax), %edx
	movq	-32(%rbp), %rax
	movl	%edx, (%rax)
	movq	-32(%rbp), %rax
	leaq	12(%rax), %rdx
	movq	-32(%rbp), %rax
	movl	20(%rax), %eax
	movl	%eax, (%rdx)
	movq	-32(%rbp), %rax
	leaq	20(%rax), %rdx
	movq	-32(%rbp), %rax
	movl	8(%rax), %eax
	movl	%eax, (%rdx)
	movq	-32(%rbp), %rax
	leaq	8(%rax), %rdx
	movl	-4(%rbp), %eax
	movl	%eax, (%rdx)
	jmp	.L24
.L28:
	movq	-32(%rbp), %rax
	movl	(%rax), %eax
	movl	%eax, -4(%rbp)
	movq	-32(%rbp), %rax
	movl	4(%rax), %edx
	movq	-32(%rbp), %rax
	movl	%edx, (%rax)
	movq	-32(%rbp), %rax
	leaq	4(%rax), %rdx
	movq	-32(%rbp), %rax
	movl	20(%rax), %eax
	movl	%eax, (%rdx)
	movq	-32(%rbp), %rax
	leaq	20(%rax), %rdx
	movq	-32(%rbp), %rax
	movl	16(%rax), %eax
	movl	%eax, (%rdx)
	movq	-32(%rbp), %rax
	leaq	16(%rax), %rdx
	movl	-4(%rbp), %eax
	movl	%eax, (%rdx)
	jmp	.L24
.L27:
	movq	-32(%rbp), %rax
	movl	(%rax), %eax
	movl	%eax, -4(%rbp)
	movq	-32(%rbp), %rax
	movl	16(%rax), %edx
	movq	-32(%rbp), %rax
	movl	%edx, (%rax)
	movq	-32(%rbp), %rax
	leaq	16(%rax), %rdx
	movq	-32(%rbp), %rax
	movl	20(%rax), %eax
	movl	%eax, (%rdx)
	movq	-32(%rbp), %rax
	leaq	20(%rax), %rdx
	movq	-32(%rbp), %rax
	movl	4(%rax), %eax
	movl	%eax, (%rdx)
	movq	-32(%rbp), %rax
	leaq	4(%rax), %rdx
	movl	-4(%rbp), %eax
	movl	%eax, (%rdx)
	jmp	.L24
.L25:
	movq	-32(%rbp), %rax
	movl	(%rax), %eax
	movl	%eax, -4(%rbp)
	movq	-32(%rbp), %rax
	movl	8(%rax), %edx
	movq	-32(%rbp), %rax
	movl	%edx, (%rax)
	movq	-32(%rbp), %rax
	leaq	8(%rax), %rdx
	movq	-32(%rbp), %rax
	movl	20(%rax), %eax
	movl	%eax, (%rdx)
	movq	-32(%rbp), %rax
	leaq	20(%rax), %rdx
	movq	-32(%rbp), %rax
	movl	12(%rax), %eax
	movl	%eax, (%rdx)
	movq	-32(%rbp), %rax
	leaq	12(%rax), %rdx
	movl	-4(%rbp), %eax
	movl	%eax, (%rdx)
	jmp	.L24
.L29:
	movq	-32(%rbp), %rax
	movl	4(%rax), %eax
	movl	%eax, -4(%rbp)
	movq	-32(%rbp), %rax
	leaq	4(%rax), %rdx
	movq	-32(%rbp), %rax
	movl	12(%rax), %eax
	movl	%eax, (%rdx)
	movq	-32(%rbp), %rax
	leaq	12(%rax), %rdx
	movq	-32(%rbp), %rax
	movl	16(%rax), %eax
	movl	%eax, (%rdx)
	movq	-32(%rbp), %rax
	leaq	16(%rax), %rdx
	movq	-32(%rbp), %rax
	movl	8(%rax), %eax
	movl	%eax, (%rdx)
	movq	-32(%rbp), %rax
	leaq	8(%rax), %rdx
	movl	-4(%rbp), %eax
	movl	%eax, (%rdx)
	nop
.L24:
.L31:
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	dicemove, .-dicemove
	.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	"%d %d"
.LC2:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	leaq	.LC0(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	subq	$48, %rsp
	.cfi_def_cfa_offset 96
	movq	%fs:40, %rax
	movq	%rax, 40(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rbx
	leaq	40(%rsp), %r12
	.p2align 4,,10
	.p2align 3
.L2:
	movq	%rbx, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	addq	$4, %rbx
	call	__isoc99_scanf@PLT
	cmpq	%rbx, %r12
	jne	.L2
	leaq	12(%rsp), %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	testl	%eax, %eax
	jle	.L7
	xorl	%ebx, %ebx
	leaq	8(%rsp), %r14
	leaq	4(%rsp), %r13
	leaq	.LC1(%rip), %r12
	leaq	.LC2(%rip), %rbp
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%r12, %rdi
	movq	%r14, %rdx
	movq	%r13, %rsi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movd	16(%rsp), %xmm1
	movl	4(%rsp), %eax
	movl	24(%rsp), %ecx
	movd	%xmm1, %edi
	cmpl	%eax, %edi
	je	.L4
	movd	20(%rsp), %xmm0
	movd	36(%rsp), %xmm2
	movdqa	%xmm1, %xmm4
	movl	24(%rsp), %edx
	movdqa	%xmm0, %xmm3
	movdqa	%xmm0, %xmm5
	movdqa	%xmm2, %xmm9
	punpckldq	%xmm2, %xmm3
	movdqa	%xmm2, %xmm7
	movdqa	%xmm2, %xmm6
	movl	%edx, %ecx
	movq	%xmm3, 16(%rsp)
	movd	32(%rsp), %xmm3
	movd	%xmm0, %edi
	punpckldq	%xmm1, %xmm5
	punpckldq	%xmm1, %xmm9
	punpckldq	%xmm0, %xmm7
	movdqa	%xmm3, %xmm8
	punpckldq	%xmm3, %xmm4
	punpckldq	%xmm3, %xmm6
	punpckldq	%xmm1, %xmm8
	movq	%xmm4, 32(%rsp)
	cmpl	%edi, %eax
	je	.L4
	movd	%xmm2, %esi
	movq	%xmm6, 16(%rsp)
	movq	%xmm5, 32(%rsp)
	cmpl	%esi, %eax
	je	.L4
	movd	%xmm3, %esi
	movq	%xmm8, 16(%rsp)
	movq	%xmm7, 32(%rsp)
	cmpl	%esi, %eax
	je	.L4
	movl	28(%rsp), %ecx
	movd	%xmm3, 32(%rsp)
	movd	%edx, %xmm3
	movl	%edx, 36(%rsp)
	movd	%ecx, %xmm6
	movl	%ecx, 16(%rsp)
	movd	%xmm0, 20(%rsp)
	punpckldq	%xmm6, %xmm3
	movd	%xmm2, 28(%rsp)
	movd	%xmm1, 24(%rsp)
	cmpl	%eax, %ecx
	je	.L10
	movl	%edx, 16(%rsp)
	movl	%ecx, 36(%rsp)
	movq	%xmm9, 24(%rsp)
	cmpl	%eax, %edx
	je	.L11
	movd	%xmm1, 16(%rsp)
	movd	%xmm2, 36(%rsp)
	movq	%xmm3, 24(%rsp)
.L5:
	movl	8(%rsp), %eax
	movd	%xmm0, %esi
	cmpl	%eax, %esi
	je	.L6
	movd	28(%rsp), %xmm1
	movd	%edx, %xmm7
	movdqa	%xmm0, %xmm6
	movd	%edx, %xmm5
	movd	32(%rsp), %xmm2
	punpckldq	%xmm7, %xmm6
	movdqa	%xmm1, %xmm3
	movd	%xmm1, %ecx
	punpckldq	%xmm2, %xmm3
	punpckldq	%xmm2, %xmm5
	movdqa	%xmm2, %xmm4
	punpcklqdq	%xmm3, %xmm6
	movdqa	%xmm0, %xmm3
	punpckldq	%xmm1, %xmm4
	punpckldq	%xmm1, %xmm3
	movdqa	%xmm2, %xmm7
	punpcklqdq	%xmm3, %xmm5
	movd	%edx, %xmm3
	punpckldq	%xmm0, %xmm3
	punpcklqdq	%xmm3, %xmm4
	movd	%edx, %xmm3
	punpckldq	%xmm3, %xmm7
	movdqa	%xmm1, %xmm3
	punpckldq	%xmm0, %xmm3
	punpcklqdq	%xmm7, %xmm3
	movups	%xmm3, 20(%rsp)
	cmpl	%eax, %ecx
	je	.L12
	movd	%xmm2, %edi
	movups	%xmm4, 20(%rsp)
	cmpl	%eax, %edi
	je	.L13
	movups	%xmm5, 20(%rsp)
	cmpl	%edx, %eax
	je	.L14
	movups	%xmm6, 20(%rsp)
.L6:
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__printf_chk@PLT
	cmpl	%ebx, 12(%rsp)
	jg	.L3
.L7:
	movq	40(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L22
	addq	$48, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	xorl	%eax, %eax
	popq	%rbx
	.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
.L4:
	.cfi_restore_state
	movd	20(%rsp), %xmm0
	movl	%ecx, %edx
	jmp	.L5
.L12:
	movd	%xmm0, %edx
	jmp	.L6
.L13:
	movd	%xmm1, %edx
	jmp	.L6
.L14:
	movd	%xmm2, %edx
	jmp	.L6
.L10:
	movd	%xmm1, %edx
	jmp	.L5
.L11:
	movd	%xmm2, %edx
	jmp	.L5
.L22:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.text
	.p2align 4
	.globl	dicemove
	.type	dicemove, @function
dicemove:
.LFB24:
	.cfi_startproc
	endbr64
	subl	$69, %edi
	cmpb	$18, %dil
	ja	.L23
	leaq	.L26(%rip), %rcx
	movzbl	%dil, %edi
	movslq	(%rcx,%rdi,4), %rdx
	addq	%rcx, %rdx
	notrack jmp	*%rdx
	.section	.rodata
	.align 4
	.align 4
.L26:
	.long	.L30-.L26
	.long	.L23-.L26
	.long	.L23-.L26
	.long	.L23-.L26
	.long	.L23-.L26
	.long	.L23-.L26
	.long	.L23-.L26
	.long	.L23-.L26
	.long	.L29-.L26
	.long	.L28-.L26
	.long	.L23-.L26
	.long	.L23-.L26
	.long	.L23-.L26
	.long	.L23-.L26
	.long	.L27-.L26
	.long	.L23-.L26
	.long	.L23-.L26
	.long	.L23-.L26
	.long	.L25-.L26
	.text
	.p2align 4,,10
	.p2align 3
.L29:
	movdqu	4(%rsi), %xmm5
	pshufd	$114, %xmm5, %xmm0
	movups	%xmm0, 4(%rsi)
.L23:
	ret
	.p2align 4,,10
	.p2align 3
.L25:
	movl	(%rsi), %edx
	movd	20(%rsi), %xmm0
	movl	8(%rsi), %ecx
	movd	%edx, %xmm4
	movl	12(%rsi), %edx
	punpckldq	%xmm4, %xmm0
	movl	%ecx, (%rsi)
	movl	%edx, 20(%rsi)
	movq	%xmm0, 8(%rsi)
	ret
	.p2align 4,,10
	.p2align 3
.L30:
	movl	12(%rsi), %edx
	movd	(%rsi), %xmm0
	movd	20(%rsi), %xmm3
	movl	%edx, (%rsi)
	movl	8(%rsi), %edx
	punpckldq	%xmm3, %xmm0
	movl	%edx, 20(%rsi)
	movq	%xmm0, 8(%rsi)
	ret
	.p2align 4,,10
	.p2align 3
.L28:
	movq	(%rsi), %xmm0
	movq	16(%rsi), %xmm1
	movdqa	%xmm0, %xmm2
	punpckldq	%xmm1, %xmm0
	punpckldq	%xmm1, %xmm2
	movq	%xmm0, 16(%rsi)
	pshufd	$14, %xmm2, %xmm2
	movq	%xmm2, (%rsi)
	ret
	.p2align 4,,10
	.p2align 3
.L27:
	movq	16(%rsi), %xmm0
	movq	(%rsi), %xmm1
	movdqa	%xmm0, %xmm2
	punpckldq	%xmm1, %xmm0
	punpckldq	%xmm1, %xmm2
	movq	%xmm0, (%rsi)
	pshufd	$14, %xmm2, %xmm2
	movq	%xmm2, 16(%rsi)
	ret
	.cfi_endproc
.LFE24:
	.size	dicemove, .-dicemove
	.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	"%d %d"
.LC2:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	leaq	.LC0(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	subq	$48, %rsp
	.cfi_def_cfa_offset 96
	movq	%fs:40, %rax
	movq	%rax, 40(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rbx
	leaq	40(%rsp), %r12
	.p2align 4,,10
	.p2align 3
.L2:
	movq	%rbx, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	addq	$4, %rbx
	call	__isoc99_scanf@PLT
	cmpq	%rbx, %r12
	jne	.L2
	leaq	12(%rsp), %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movl	12(%rsp), %eax
	testl	%eax, %eax
	jle	.L7
	xorl	%ebx, %ebx
	leaq	8(%rsp), %r14
	leaq	4(%rsp), %r13
	leaq	.LC1(%rip), %r12
	leaq	.LC2(%rip), %rbp
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%r12, %rdi
	movq	%r14, %rdx
	movq	%r13, %rsi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movd	16(%rsp), %xmm1
	movl	4(%rsp), %eax
	movl	24(%rsp), %ecx
	movd	%xmm1, %edi
	cmpl	%eax, %edi
	je	.L4
	movd	20(%rsp), %xmm0
	movd	36(%rsp), %xmm2
	movdqa	%xmm1, %xmm4
	movl	24(%rsp), %edx
	movdqa	%xmm0, %xmm3
	movdqa	%xmm0, %xmm5
	movdqa	%xmm2, %xmm9
	punpckldq	%xmm2, %xmm3
	movdqa	%xmm2, %xmm7
	movdqa	%xmm2, %xmm6
	movl	%edx, %ecx
	movq	%xmm3, 16(%rsp)
	movd	32(%rsp), %xmm3
	movd	%xmm0, %edi
	punpckldq	%xmm1, %xmm5
	punpckldq	%xmm1, %xmm9
	punpckldq	%xmm0, %xmm7
	movdqa	%xmm3, %xmm8
	punpckldq	%xmm3, %xmm4
	punpckldq	%xmm3, %xmm6
	punpckldq	%xmm1, %xmm8
	movq	%xmm4, 32(%rsp)
	cmpl	%edi, %eax
	je	.L4
	movd	%xmm2, %esi
	movq	%xmm6, 16(%rsp)
	movq	%xmm5, 32(%rsp)
	cmpl	%esi, %eax
	je	.L4
	movd	%xmm3, %esi
	movq	%xmm8, 16(%rsp)
	movq	%xmm7, 32(%rsp)
	cmpl	%esi, %eax
	je	.L4
	movl	28(%rsp), %ecx
	movd	%xmm3, 32(%rsp)
	movd	%edx, %xmm3
	movl	%edx, 36(%rsp)
	movd	%ecx, %xmm6
	movl	%ecx, 16(%rsp)
	movd	%xmm0, 20(%rsp)
	punpckldq	%xmm6, %xmm3
	movd	%xmm2, 28(%rsp)
	movd	%xmm1, 24(%rsp)
	cmpl	%eax, %ecx
	je	.L10
	movl	%edx, 16(%rsp)
	movl	%ecx, 36(%rsp)
	movq	%xmm9, 24(%rsp)
	cmpl	%eax, %edx
	je	.L11
	movd	%xmm1, 16(%rsp)
	movd	%xmm2, 36(%rsp)
	movq	%xmm3, 24(%rsp)
.L5:
	movl	8(%rsp), %eax
	movd	%xmm0, %esi
	cmpl	%eax, %esi
	je	.L6
	movd	28(%rsp), %xmm1
	movd	%edx, %xmm7
	movdqa	%xmm0, %xmm6
	movd	%edx, %xmm5
	movd	32(%rsp), %xmm2
	punpckldq	%xmm7, %xmm6
	movdqa	%xmm1, %xmm3
	movd	%xmm1, %ecx
	punpckldq	%xmm2, %xmm3
	punpckldq	%xmm2, %xmm5
	movdqa	%xmm2, %xmm4
	punpcklqdq	%xmm3, %xmm6
	movdqa	%xmm0, %xmm3
	punpckldq	%xmm1, %xmm4
	punpckldq	%xmm1, %xmm3
	movdqa	%xmm2, %xmm7
	punpcklqdq	%xmm3, %xmm5
	movd	%edx, %xmm3
	punpckldq	%xmm0, %xmm3
	punpcklqdq	%xmm3, %xmm4
	movd	%edx, %xmm3
	punpckldq	%xmm3, %xmm7
	movdqa	%xmm1, %xmm3
	punpckldq	%xmm0, %xmm3
	punpcklqdq	%xmm7, %xmm3
	movups	%xmm3, 20(%rsp)
	cmpl	%eax, %ecx
	je	.L12
	movd	%xmm2, %edi
	movups	%xmm4, 20(%rsp)
	cmpl	%eax, %edi
	je	.L13
	movups	%xmm5, 20(%rsp)
	cmpl	%edx, %eax
	je	.L14
	movups	%xmm6, 20(%rsp)
.L6:
	movq	%rbp, %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	addl	$1, %ebx
	call	__printf_chk@PLT
	cmpl	%ebx, 12(%rsp)
	jg	.L3
.L7:
	movq	40(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L22
	addq	$48, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	xorl	%eax, %eax
	popq	%rbx
	.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
.L4:
	.cfi_restore_state
	movd	20(%rsp), %xmm0
	movl	%ecx, %edx
	jmp	.L5
.L12:
	movd	%xmm0, %edx
	jmp	.L6
.L13:
	movd	%xmm1, %edx
	jmp	.L6
.L14:
	movd	%xmm2, %edx
	jmp	.L6
.L10:
	movd	%xmm1, %edx
	jmp	.L5
.L11:
	movd	%xmm2, %edx
	jmp	.L5
.L22:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.text
	.p2align 4
	.globl	dicemove
	.type	dicemove, @function
dicemove:
.LFB24:
	.cfi_startproc
	endbr64
	subl	$69, %edi
	cmpb	$18, %dil
	ja	.L23
	leaq	.L26(%rip), %rcx
	movzbl	%dil, %edi
	movslq	(%rcx,%rdi,4), %rdx
	addq	%rcx, %rdx
	notrack jmp	*%rdx
	.section	.rodata
	.align 4
	.align 4
.L26:
	.long	.L30-.L26
	.long	.L23-.L26
	.long	.L23-.L26
	.long	.L23-.L26
	.long	.L23-.L26
	.long	.L23-.L26
	.long	.L23-.L26
	.long	.L23-.L26
	.long	.L29-.L26
	.long	.L28-.L26
	.long	.L23-.L26
	.long	.L23-.L26
	.long	.L23-.L26
	.long	.L23-.L26
	.long	.L27-.L26
	.long	.L23-.L26
	.long	.L23-.L26
	.long	.L23-.L26
	.long	.L25-.L26
	.text
	.p2align 4,,10
	.p2align 3
.L29:
	movdqu	4(%rsi), %xmm5
	pshufd	$114, %xmm5, %xmm0
	movups	%xmm0, 4(%rsi)
.L23:
	ret
	.p2align 4,,10
	.p2align 3
.L25:
	movl	(%rsi), %edx
	movd	20(%rsi), %xmm0
	movl	8(%rsi), %ecx
	movd	%edx, %xmm4
	movl	12(%rsi), %edx
	punpckldq	%xmm4, %xmm0
	movl	%ecx, (%rsi)
	movl	%edx, 20(%rsi)
	movq	%xmm0, 8(%rsi)
	ret
	.p2align 4,,10
	.p2align 3
.L30:
	movl	12(%rsi), %edx
	movd	(%rsi), %xmm0
	movd	20(%rsi), %xmm3
	movl	%edx, (%rsi)
	movl	8(%rsi), %edx
	punpckldq	%xmm3, %xmm0
	movl	%edx, 20(%rsi)
	movq	%xmm0, 8(%rsi)
	ret
	.p2align 4,,10
	.p2align 3
.L28:
	movq	(%rsi), %xmm0
	movq	16(%rsi), %xmm1
	movdqa	%xmm0, %xmm2
	punpckldq	%xmm1, %xmm0
	punpckldq	%xmm1, %xmm2
	movq	%xmm0, 16(%rsi)
	pshufd	$14, %xmm2, %xmm2
	movq	%xmm2, (%rsi)
	ret
	.p2align 4,,10
	.p2align 3
.L27:
	movq	16(%rsi), %xmm0
	movq	(%rsi), %xmm1
	movdqa	%xmm0, %xmm2
	punpckldq	%xmm1, %xmm0
	punpckldq	%xmm1, %xmm2
	movq	%xmm0, (%rsi)
	pshufd	$14, %xmm2, %xmm2
	movq	%xmm2, 16(%rsi)
	ret
	.cfi_endproc
.LFE24:
	.size	dicemove, .-dicemove
	.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>
void dicemove(char com,int *A);
int main(void)
{
  int i,j,A[6],a,b,q;
  char com[101];
  for(i=0;i<6;i++)
    {
      scanf("%d",&A[i]);
    }
  scanf("%d",&q);
  for(i=0;i<q;i++){
  scanf("%d %d",&a,&b);
  /*??????????????????*/
  for(j=0;j<4;j++){
    if(A[0] == a){break;}
    dicemove('N',A);
  }
  if(A[0]!=a)
    {
   for(j=0;j<4;j++)
     {
    if(A[0] ==a) {break;}
    dicemove('E',A);
     }
    }
  /*??????????????????*/
   for(j=0;j<4;j++)
     {
    if(A[1] ==b) {break;}
    dicemove('M',A);
     }
   printf("%d\n",A[2]);
  }
  /*????????§?????????
    scanf("%s",&com);
    for(i=0;com[i];i++)
      {
	dicemove(com[i],A); 
      }
    ??????*/
 return 0;
}
void dicemove(char comi,int *A){	
  int temp;
  switch(comi){
	case 'E':
	  temp=A[0]; A[0]=A[3]; A[3]=A[5];A[5]=A[2]; A[2]=temp;
	  break;
	case 'N':
	  temp=A[0]; A[0]=A[1]; A[1]=A[5]; A[5]=A[4]; A[4]=temp;
	  break;
	case 'S':
	  temp=A[0]; A[0]=A[4]; A[4]=A[5]; A[5]=A[1]; A[1]=temp;
	  break;
	case 'W':
	  temp=A[0]; A[0]=A[2]; A[2]=A[5]; A[5]=A[3]; A[3]=temp;
	  break;
        case 'M':
          temp=A[1]; A[1]=A[3]; A[3]=A[4]; A[4]=A[2]; A[2]=temp;
	  break;
	}
}
1 2 3 4 5 6
3
4 5
1 3
3 2
 1 2 3 4 5 6
3
4 5
1 3
6 2
 1 2 3 4 5 6
3
4 5
2 3
6 2
 1 2 3 4 5 6
3
6 5
2 3
6 2
 1 2 3 4 5 6
3
6 3
1 3
3 2
 1 2 3 4 5 6
3
4 2
1 3
3 2
 1 2 3 4 5 6
3
4 5
2 3
4 2
 1 2 3 4 5 6
3
6 5
2 6
6 2
 1 2 3 4 5 6
3
6 4
1 3
3 2
 1 2 3 4 5 6
3
4 5
1 4
6 2

6
5
6
 6
5
4
 6
1
4
 3
1
4
 2
5
6
 1
5
6
 6
1
1
 3
3
4
 5
5
6
 6
2
4

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>
void dicemove(char com,int *A);
int main(void)
{
  int i,j,A[6],a,b,q;
  char com[101];
  for(i=0;i<6;i++)
    {
      scanf("%d",&A[i]);
    }
  scanf("%d",&q);
  for(i=0;i<q;i++){
  scanf("%d %d",&a,&b);
  /*??????????????????*/
  for(j=0;j<4;j++){
    if(A[0] == a){break;}
    dicemove('N',A);
  }
  if(A[0]!=a)
    {
   for(j=0;j<4;j++)
     {
    if(A[0] ==a) {break;}
    dicemove('E',A);
     }
    }
  /*??????????????????*/
   for(j=0;j<4;j++)
     {
    if(A[1] ==b) {break;}
    dicemove('M',A);
     }
   printf("%d\n",A[2]);
  }
  /*????????§?????????
    scanf("%s",&com);
    for(i=0;com[i];i++)
      {
	dicemove(com[i],A); 
      }
    ??????*/
 return 0;
}
void dicemove(char comi,int *A){	
  int temp;
  switch(comi){
	case 'E':
	  temp=A[0]; A[0]=A[3]; A[3]=A[5];A[5]=A[2]; A[2]=temp;
	  break;
	case 'N':
	  temp=A[0]; A[0]=A[1]; A[1]=A[5]; A[5]=A[4]; A[4]=temp;
	  break;
	case 'S':
	  temp=A[0]; A[0]=A[4]; A[4]=A[5]; A[5]=A[1]; A[1]=temp;
	  break;
	case 'W':
	  temp=A[0]; A[0]=A[2]; A[2]=A[5]; A[5]=A[3]; A[3]=temp;
	  break;
        case 'M':
          temp=A[1]; A[1]=A[3]; A[3]=A[4]; A[4]=A[2]; A[2]=temp;
	  break;
	}
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"%d %d"
.LC2:
	.string	"%d\n"
	.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	$176, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -152(%rbp)
	jmp	.L2
.L3:
	leaq	-144(%rbp), %rdx
	movl	-152(%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
	addl	$1, -152(%rbp)
.L2:
	cmpl	$5, -152(%rbp)
	jle	.L3
	leaq	-156(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -152(%rbp)
	jmp	.L4
.L17:
	leaq	-160(%rbp), %rdx
	leaq	-164(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -148(%rbp)
	jmp	.L5
.L8:
	movl	-144(%rbp), %edx
	movl	-164(%rbp), %eax
	cmpl	%eax, %edx
	je	.L20
	leaq	-144(%rbp), %rax
	movq	%rax, %rsi
	movl	$78, %edi
	call	dicemove
	addl	$1, -148(%rbp)
.L5:
	cmpl	$3, -148(%rbp)
	jle	.L8
	jmp	.L7
.L20:
	nop
.L7:
	movl	-144(%rbp), %edx
	movl	-164(%rbp), %eax
	cmpl	%eax, %edx
	je	.L9
	movl	$0, -148(%rbp)
	jmp	.L10
.L12:
	movl	-144(%rbp), %edx
	movl	-164(%rbp), %eax
	cmpl	%eax, %edx
	je	.L21
	leaq	-144(%rbp), %rax
	movq	%rax, %rsi
	movl	$69, %edi
	call	dicemove
	addl	$1, -148(%rbp)
.L10:
	cmpl	$3, -148(%rbp)
	jle	.L12
	jmp	.L9
.L21:
	nop
.L9:
	movl	$0, -148(%rbp)
	jmp	.L13
.L16:
	movl	-140(%rbp), %edx
	movl	-160(%rbp), %eax
	cmpl	%eax, %edx
	je	.L22
	leaq	-144(%rbp), %rax
	movq	%rax, %rsi
	movl	$77, %edi
	call	dicemove
	addl	$1, -148(%rbp)
.L13:
	cmpl	$3, -148(%rbp)
	jle	.L16
	jmp	.L15
.L22:
	nop
.L15:
	movl	-136(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -152(%rbp)
.L4:
	movl	-156(%rbp), %eax
	cmpl	%eax, -152(%rbp)
	jl	.L17
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L19
	call	__stack_chk_fail@PLT
.L19:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.globl	dicemove
	.type	dicemove, @function
dicemove:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, %eax
	movq	%rsi, -32(%rbp)
	movb	%al, -20(%rbp)
	movsbl	-20(%rbp), %eax
	subl	$69, %eax
	cmpl	$18, %eax
	ja	.L31
	movl	%eax, %eax
	leaq	0(,%rax,4), %rdx
	leaq	.L26(%rip), %rax
	movl	(%rdx,%rax), %eax
	cltq
	leaq	.L26(%rip), %rdx
	addq	%rdx, %rax
	notrack jmp	*%rax
	.section	.rodata
	.align 4
	.align 4
.L26:
	.long	.L30-.L26
	.long	.L31-.L26
	.long	.L31-.L26
	.long	.L31-.L26
	.long	.L31-.L26
	.long	.L31-.L26
	.long	.L31-.L26
	.long	.L31-.L26
	.long	.L29-.L26
	.long	.L28-.L26
	.long	.L31-.L26
	.long	.L31-.L26
	.long	.L31-.L26
	.long	.L31-.L26
	.long	.L27-.L26
	.long	.L31-.L26
	.long	.L31-.L26
	.long	.L31-.L26
	.long	.L25-.L26
	.text
.L30:
	movq	-32(%rbp), %rax
	movl	(%rax), %eax
	movl	%eax, -4(%rbp)
	movq	-32(%rbp), %rax
	movl	12(%rax), %edx
	movq	-32(%rbp), %rax
	movl	%edx, (%rax)
	movq	-32(%rbp), %rax
	leaq	12(%rax), %rdx
	movq	-32(%rbp), %rax
	movl	20(%rax), %eax
	movl	%eax, (%rdx)
	movq	-32(%rbp), %rax
	leaq	20(%rax), %rdx
	movq	-32(%rbp), %rax
	movl	8(%rax), %eax
	movl	%eax, (%rdx)
	movq	-32(%rbp), %rax
	leaq	8(%rax), %rdx
	movl	-4(%rbp), %eax
	movl	%eax, (%rdx)
	jmp	.L24
.L28:
	movq	-32(%rbp), %rax
	movl	(%rax), %eax
	movl	%eax, -4(%rbp)
	movq	-32(%rbp), %rax
	movl	4(%rax), %edx
	movq	-32(%rbp), %rax
	movl	%edx, (%rax)
	movq	-32(%rbp), %rax
	leaq	4(%rax), %rdx
	movq	-32(%rbp), %rax
	movl	20(%rax), %eax
	movl	%eax, (%rdx)
	movq	-32(%rbp), %rax
	leaq	20(%rax), %rdx
	movq	-32(%rbp), %rax
	movl	16(%rax), %eax
	movl	%eax, (%rdx)
	movq	-32(%rbp), %rax
	leaq	16(%rax), %rdx
	movl	-4(%rbp), %eax
	movl	%eax, (%rdx)
	jmp	.L24
.L27:
	movq	-32(%rbp), %rax
	movl	(%rax), %eax
	movl	%eax, -4(%rbp)
	movq	-32(%rbp), %rax
	movl	16(%rax), %edx
	movq	-32(%rbp), %rax
	movl	%edx, (%rax)
	movq	-32(%rbp), %rax
	leaq	16(%rax), %rdx
	movq	-32(%rbp), %rax
	movl	20(%rax), %eax
	movl	%eax, (%rdx)
	movq	-32(%rbp), %rax
	leaq	20(%rax), %rdx
	movq	-32(%rbp), %rax
	movl	4(%rax), %eax
	movl	%eax, (%rdx)
	movq	-32(%rbp), %rax
	leaq	4(%rax), %rdx
	movl	-4(%rbp), %eax
	movl	%eax, (%rdx)
	jmp	.L24
.L25:
	movq	-32(%rbp), %rax
	movl	(%rax), %eax
	movl	%eax, -4(%rbp)
	movq	-32(%rbp), %rax
	movl	8(%rax), %edx
	movq	-32(%rbp), %rax
	movl	%edx, (%rax)
	movq	-32(%rbp), %rax
	leaq	8(%rax), %rdx
	movq	-32(%rbp), %rax
	movl	20(%rax), %eax
	movl	%eax, (%rdx)
	movq	-32(%rbp), %rax
	leaq	20(%rax), %rdx
	movq	-32(%rbp), %rax
	movl	12(%rax), %eax
	movl	%eax, (%rdx)
	movq	-32(%rbp), %rax
	leaq	12(%rax), %rdx
	movl	-4(%rbp), %eax
	movl	%eax, (%rdx)
	jmp	.L24
.L29:
	movq	-32(%rbp), %rax
	movl	4(%rax), %eax
	movl	%eax, -4(%rbp)
	movq	-32(%rbp), %rax
	leaq	4(%rax), %rdx
	movq	-32(%rbp), %rax
	movl	12(%rax), %eax
	movl	%eax, (%rdx)
	movq	-32(%rbp), %rax
	leaq	12(%rax), %rdx
	movq	-32(%rbp), %rax
	movl	16(%rax), %eax
	movl	%eax, (%rdx)
	movq	-32(%rbp), %rax
	leaq	16(%rax), %rdx
	movq	-32(%rbp), %rax
	movl	8(%rax), %eax
	movl	%eax, (%rdx)
	movq	-32(%rbp), %rax
	leaq	8(%rax), %rdx
	movl	-4(%rbp), %eax
	movl	%eax, (%rdx)
	nop
.L24:
.L31:
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	dicemove, .-dicemove
	.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	"%d %d"
.LC2:
	.string	"%d\n"
	.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	$176, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -152(%rbp)
	jmp	.L2
.L3:
	leaq	-144(%rbp), %rdx
	movl	-152(%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
	addl	$1, -152(%rbp)
.L2:
	cmpl	$5, -152(%rbp)
	jle	.L3
	leaq	-156(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -152(%rbp)
	jmp	.L4
.L17:
	leaq	-160(%rbp), %rdx
	leaq	-164(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movl	$0, -148(%rbp)
	jmp	.L5
.L8:
	movl	-144(%rbp), %edx
	movl	-164(%rbp), %eax
	cmpl	%eax, %edx
	je	.L20
	leaq	-144(%rbp), %rax
	movq	%rax, %rsi
	movl	$78, %edi
	call	dicemove
	addl	$1, -148(%rbp)
.L5:
	cmpl	$3, -148(%rbp)
	jle	.L8
	jmp	.L7
.L20:
	nop
.L7:
	movl	-144(%rbp), %edx
	movl	-164(%rbp), %eax
	cmpl	%eax, %edx
	je	.L9
	movl	$0, -148(%rbp)
	jmp	.L10
.L12:
	movl	-144(%rbp), %edx
	movl	-164(%rbp), %eax
	cmpl	%eax, %edx
	je	.L21
	leaq	-144(%rbp), %rax
	movq	%rax, %rsi
	movl	$69, %edi
	call	dicemove
	addl	$1, -148(%rbp)
.L10:
	cmpl	$3, -148(%rbp)
	jle	.L12
	jmp	.L9
.L21:
	nop
.L9:
	movl	$0, -148(%rbp)
	jmp	.L13
.L16:
	movl	-140(%rbp), %edx
	movl	-160(%rbp), %eax
	cmpl	%eax, %edx
	je	.L22
	leaq	-144(%rbp), %rax
	movq	%rax, %rsi
	movl	$77, %edi
	call	dicemove
	addl	$1, -148(%rbp)
.L13:
	cmpl	$3, -148(%rbp)
	jle	.L16
	jmp	.L15
.L22:
	nop
.L15:
	movl	-136(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -152(%rbp)
.L4:
	movl	-156(%rbp), %eax
	cmpl	%eax, -152(%rbp)
	jl	.L17
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L19
	call	__stack_chk_fail@PLT
.L19:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.globl	dicemove
	.type	dicemove, @function
dicemove:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, %eax
	movq	%rsi, -32(%rbp)
	movb	%al, -20(%rbp)
	movsbl	-20(%rbp), %eax
	subl	$69, %eax
	cmpl	$18, %eax
	ja	.L31
	movl	%eax, %eax
	leaq	0(,%rax,4), %rdx
	leaq	.L26(%rip), %rax
	movl	(%rdx,%rax), %eax
	cltq
	leaq	.L26(%rip), %rdx
	addq	%rdx, %rax
	notrack jmp	*%rax
	.section	.rodata
	.align 4
	.align 4
.L26:
	.long	.L30-.L26
	.long	.L31-.L26
	.long	.L31-.L26
	.long	.L31-.L26
	.long	.L31-.L26
	.long	.L31-.L26
	.long	.L31-.L26
	.long	.L31-.L26
	.long	.L29-.L26
	.long	.L28-.L26
	.long	.L31-.L26
	.long	.L31-.L26
	.long	.L31-.L26
	.long	.L31-.L26
	.long	.L27-.L26
	.long	.L31-.L26
	.long	.L31-.L26
	.long	.L31-.L26
	.long	.L25-.L26
	.text
.L30:
	movq	-32(%rbp), %rax
	movl	(%rax), %eax
	movl	%eax, -4(%rbp)
	movq	-32(%rbp), %rax
	movl	12(%rax), %edx
	movq	-32(%rbp), %rax
	movl	%edx, (%rax)
	movq	-32(%rbp), %rax
	leaq	12(%rax), %rdx
	movq	-32(%rbp), %rax
	movl	20(%rax), %eax
	movl	%eax, (%rdx)
	movq	-32(%rbp), %rax
	leaq	20(%rax), %rdx
	movq	-32(%rbp), %rax
	movl	8(%rax), %eax
	movl	%eax, (%rdx)
	movq	-32(%rbp), %rax
	leaq	8(%rax), %rdx
	movl	-4(%rbp), %eax
	movl	%eax, (%rdx)
	jmp	.L24
.L28:
	movq	-32(%rbp), %rax
	movl	(%rax), %eax
	movl	%eax, -4(%rbp)
	movq	-32(%rbp), %rax
	movl	4(%rax), %edx
	movq	-32(%rbp), %rax
	movl	%edx, (%rax)
	movq	-32(%rbp), %rax
	leaq	4(%rax), %rdx
	movq	-32(%rbp), %rax
	movl	20(%rax), %eax
	movl	%eax, (%rdx)
	movq	-32(%rbp), %rax
	leaq	20(%rax), %rdx
	movq	-32(%rbp), %rax
	movl	16(%rax), %eax
	movl	%eax, (%rdx)
	movq	-32(%rbp), %rax
	leaq	16(%rax), %rdx
	movl	-4(%rbp), %eax
	movl	%eax, (%rdx)
	jmp	.L24
.L27:
	movq	-32(%rbp), %rax
	movl	(%rax), %eax
	movl	%eax, -4(%rbp)
	movq	-32(%rbp), %rax
	movl	16(%rax), %edx
	movq	-32(%rbp), %rax
	movl	%edx, (%rax)
	movq	-32(%rbp), %rax
	leaq	16(%rax), %rdx
	movq	-32(%rbp), %rax
	movl	20(%rax), %eax
	movl	%eax, (%rdx)
	movq	-32(%rbp), %rax
	leaq	20(%rax), %rdx
	movq	-32(%rbp), %rax
	movl	4(%rax), %eax
	movl	%eax, (%rdx)
	movq	-32(%rbp), %rax
	leaq	4(%rax), %rdx
	movl	-4(%rbp), %eax
	movl	%eax, (%rdx)
	jmp	.L24
.L25:
	movq	-32(%rbp), %rax
	movl	(%rax), %eax
	movl	%eax, -4(%rbp)
	movq	-32(%rbp), %rax
	movl	8(%rax), %edx
	movq	-32(%rbp), %rax
	movl	%edx, (%rax)
	movq	-32(%rbp), %rax
	leaq	8(%rax), %rdx
	movq	-32(%rbp), %rax
	movl	20(%rax), %eax
	movl	%eax, (%rdx)
	movq	-32(%rbp), %rax
	leaq	20(%rax), %rdx
	movq	-32(%rbp), %rax
	movl	12(%rax), %eax
	movl	%eax, (%rdx)
	movq	-32(%rbp), %rax
	leaq	12(%rax), %rdx
	movl	-4(%rbp), %eax
	movl	%eax, (%rdx)
	jmp	.L24
.L29:
	movq	-32(%rbp), %rax
	movl	4(%rax), %eax
	movl	%eax, -4(%rbp)
	movq	-32(%rbp), %rax
	leaq	4(%rax), %rdx
	movq	-32(%rbp), %rax
	movl	12(%rax), %eax
	movl	%eax, (%rdx)
	movq	-32(%rbp), %rax
	leaq	12(%rax), %rdx
	movq	-32(%rbp), %rax
	movl	16(%rax), %eax
	movl	%eax, (%rdx)
	movq	-32(%rbp), %rax
	leaq	16(%rax), %rdx
	movq	-32(%rbp), %rax
	movl	8(%rax), %eax
	movl	%eax, (%rdx)
	movq	-32(%rbp), %rax
	leaq	8(%rax), %rdx
	movl	-4(%rbp), %eax
	movl	%eax, (%rdx)
	nop
.L24:
.L31:
	nop
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	dicemove, .-dicemove
	.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:
