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

```c
#include <stdio.h>


int main()
{
    int dice[6],dice2[6],box,flg=0,cnt=0,cnt2=0;
    for(int i=0;i<6;i++)    scanf("%d",&dice[i]);
    for(int i=0;i<6;i++)    scanf("%d",&dice2[i]);
    while(1)
    {
        if(dice[1]==dice2[1]||4 < cnt){
            cnt = 0;
            cnt2 += 1;
            box = dice[5];
            dice[5] = dice[2];
            dice[2] = dice[0];
            dice[0] = dice[3];
            dice[3] = box;
            if(dice[0]==dice2[0]&&dice[1]==dice2[1]&&dice[2]==dice2[2]&&dice[3]==dice2[3]&&dice[4]==dice2[4]&&dice[5]==dice2[5]){
                printf("Yes\n");
                break;
            }else if(4 < cnt2){
                printf("No\n");
                break;
            }
        }else {
            cnt += 1;
            box = dice[5];
            dice[5] = dice[1];
            dice[1] = dice[0];
            dice[0] = dice[4];
            dice[4] = box;
        }
    }
    return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"Yes"
.LC2:
	.string	"No"
	.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	$96, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -72(%rbp)
	movl	$0, -88(%rbp)
	movl	$0, -84(%rbp)
	movl	$0, -80(%rbp)
	jmp	.L2
.L3:
	leaq	-64(%rbp), %rdx
	movl	-80(%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, -80(%rbp)
.L2:
	cmpl	$5, -80(%rbp)
	jle	.L3
	movl	$0, -76(%rbp)
	jmp	.L4
.L5:
	leaq	-32(%rbp), %rdx
	movl	-76(%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, -76(%rbp)
.L4:
	cmpl	$5, -76(%rbp)
	jle	.L5
.L12:
	movl	-60(%rbp), %edx
	movl	-28(%rbp), %eax
	cmpl	%eax, %edx
	je	.L6
	cmpl	$4, -88(%rbp)
	jle	.L7
.L6:
	movl	$0, -88(%rbp)
	addl	$1, -84(%rbp)
	movl	-44(%rbp), %eax
	movl	%eax, -68(%rbp)
	movl	-56(%rbp), %eax
	movl	%eax, -44(%rbp)
	movl	-64(%rbp), %eax
	movl	%eax, -56(%rbp)
	movl	-52(%rbp), %eax
	movl	%eax, -64(%rbp)
	movl	-68(%rbp), %eax
	movl	%eax, -52(%rbp)
	movl	-64(%rbp), %edx
	movl	-32(%rbp), %eax
	cmpl	%eax, %edx
	jne	.L8
	movl	-60(%rbp), %edx
	movl	-28(%rbp), %eax
	cmpl	%eax, %edx
	jne	.L8
	movl	-56(%rbp), %edx
	movl	-24(%rbp), %eax
	cmpl	%eax, %edx
	jne	.L8
	movl	-52(%rbp), %edx
	movl	-20(%rbp), %eax
	cmpl	%eax, %edx
	jne	.L8
	movl	-48(%rbp), %edx
	movl	-16(%rbp), %eax
	cmpl	%eax, %edx
	jne	.L8
	movl	-44(%rbp), %edx
	movl	-12(%rbp), %eax
	cmpl	%eax, %edx
	jne	.L8
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L9
.L8:
	cmpl	$4, -84(%rbp)
	jle	.L15
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L9
.L7:
	addl	$1, -88(%rbp)
	movl	-44(%rbp), %eax
	movl	%eax, -68(%rbp)
	movl	-60(%rbp), %eax
	movl	%eax, -44(%rbp)
	movl	-64(%rbp), %eax
	movl	%eax, -60(%rbp)
	movl	-48(%rbp), %eax
	movl	%eax, -64(%rbp)
	movl	-68(%rbp), %eax
	movl	%eax, -48(%rbp)
	jmp	.L12
.L15:
	nop
	jmp	.L12
.L9:
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L14
	call	__stack_chk_fail@PLT
.L14:
	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	"Yes"
.LC2:
	.string	"No"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	leaq	.LC0(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$72, %rsp
	.cfi_def_cfa_offset 128
	movq	%fs:40, %rax
	movq	%rax, 56(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %rbx
	leaq	24(%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	32(%rsp), %rbx
	leaq	56(%rsp), %r12
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%rbx, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	addq	$4, %rbx
	call	__isoc99_scanf@PLT
	cmpq	%rbx, %r12
	jne	.L3
	movl	4(%rsp), %eax
	movl	36(%rsp), %r11d
	xorl	%ebx, %ebx
	xorl	%edx, %edx
	movl	8(%rsp), %r9d
	movl	20(%rsp), %edi
	xorl	%r10d, %r10d
	movl	12(%rsp), %esi
	movl	(%rsp), %r8d
	movl	32(%rsp), %ebp
	movl	40(%rsp), %r12d
	movl	44(%rsp), %r14d
	movl	16(%rsp), %ecx
	movl	48(%rsp), %r15d
	movl	52(%rsp), %r13d
	jmp	.L19
	.p2align 4,,10
	.p2align 3
.L45:
	cmpl	$5, %r10d
	jne	.L44
	cmpl	%eax, %r11d
	je	.L6
	addl	$1, %edx
	cmpl	$4, %edx
	jg	.L8
	movl	$1, %r10d
.L5:
	movl	%r9d, %ebx
	movl	%r8d, %r9d
	movl	%ecx, %r8d
	movl	%ebx, %ecx
	movl	%edi, %ebx
	movl	%eax, %edi
	movl	%esi, %eax
	movl	%ebx, %esi
	movl	$1, %ebx
.L19:
	cmpl	%eax, %r11d
	jne	.L45
.L6:
	leal	1(%rdx), %r10d
	cmpl	%ecx, %r15d
	je	.L9
	cmpl	$4, %r10d
	jg	.L8
	cmpl	$3, %edx
	je	.L24
	leal	3(%rdx), %r10d
	cmpl	$2, %edx
	je	.L26
	cmpl	$3, %r10d
	jne	.L28
	.p2align 4,,10
	.p2align 3
.L8:
	testb	%bl, %bl
	je	.L18
	movl	%eax, 4(%rsp)
	movl	%ecx, 16(%rsp)
.L18:
	movl	%edi, 12(%rsp)
	leaq	.LC2(%rip), %rdi
	movl	%esi, (%rsp)
	movl	%r8d, 8(%rsp)
	movl	%r9d, 20(%rsp)
	call	puts@PLT
.L17:
	movq	56(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L46
	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
	.p2align 4,,10
	.p2align 3
.L44:
	.cfi_restore_state
	movl	%r9d, %ebx
	addl	$1, %r10d
	movl	%edi, %r9d
	movl	%esi, %edi
	movl	%r8d, %esi
	movl	%ebx, %r8d
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L9:
	cmpl	%esi, %ebp
	je	.L47
.L11:
	cmpl	$4, %r10d
	jg	.L8
	leal	2(%rdx), %r10d
	cmpl	%edi, %ebp
	je	.L48
.L13:
	cmpl	$5, %r10d
	je	.L24
	addl	$3, %edx
	cmpl	%r9d, %ebp
	je	.L49
.L14:
	cmpl	$5, %edx
	je	.L26
	cmpl	%r8d, %ebp
	je	.L50
.L15:
	cmpl	$3, %edx
	jne	.L28
	cmpl	%esi, %ebp
	jne	.L8
	cmpl	%r8d, %r12d
	jne	.L8
	cmpl	%edi, %r14d
	jne	.L8
	cmpl	%r9d, %r13d
	jne	.L8
.L12:
	testb	%bl, %bl
	je	.L16
	movl	%eax, 4(%rsp)
	movl	%ecx, 16(%rsp)
.L16:
	movl	%edi, 12(%rsp)
	leaq	.LC1(%rip), %rdi
	movl	%esi, (%rsp)
	movl	%r8d, 8(%rsp)
	movl	%r9d, 20(%rsp)
	call	puts@PLT
	jmp	.L17
.L48:
	cmpl	%esi, %r12d
	jne	.L13
	cmpl	%r9d, %r14d
	jne	.L13
	cmpl	%r8d, %r13d
	jne	.L13
	movl	%r9d, %edi
	movl	%r8d, %r9d
	movl	%esi, %r8d
	movl	%ebp, %esi
	jmp	.L12
.L47:
	cmpl	%r8d, %r12d
	jne	.L11
	cmpl	%edi, %r14d
	jne	.L11
	cmpl	%r9d, %r13d
	jne	.L11
	jmp	.L12
.L24:
	movl	%edi, %edx
	movl	%r9d, %edi
	movl	%r8d, %r9d
	movl	%esi, %r8d
	movl	%edx, %esi
	jmp	.L8
.L26:
	xchgl	%esi, %r9d
	xchgl	%r8d, %edi
	jmp	.L8
.L49:
	cmpl	%edi, %r12d
	jne	.L14
	cmpl	%r8d, %r14d
	jne	.L14
	cmpl	%esi, %r13d
	jne	.L14
	movl	%esi, %r9d
	movl	%r8d, %edi
	movl	%ebp, %esi
	movl	%r12d, %r8d
	jmp	.L12
.L50:
	cmpl	%r9d, %r12d
	jne	.L15
	cmpl	%esi, %r14d
	jne	.L15
	cmpl	%edi, %r13d
	jne	.L15
	movl	%esi, %edi
	movl	%r8d, %esi
	movl	%r9d, %r8d
	movl	%r13d, %r9d
	jmp	.L12
.L28:
	movl	%edi, %edx
	movl	%esi, %edi
	movl	%r8d, %esi
	movl	%r9d, %r8d
	movl	%edx, %r9d
	jmp	.L8
.L46:
	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	"Yes"
.LC2:
	.string	"No"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	leaq	.LC0(%rip), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$72, %rsp
	.cfi_def_cfa_offset 128
	movq	%fs:40, %rax
	movq	%rax, 56(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %rbx
	leaq	24(%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	32(%rsp), %rbx
	leaq	56(%rsp), %r12
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%rbx, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	addq	$4, %rbx
	call	__isoc99_scanf@PLT
	cmpq	%rbx, %r12
	jne	.L3
	movl	4(%rsp), %eax
	movl	36(%rsp), %r11d
	xorl	%ebx, %ebx
	xorl	%edx, %edx
	movl	8(%rsp), %r9d
	movl	20(%rsp), %edi
	xorl	%r10d, %r10d
	movl	12(%rsp), %esi
	movl	(%rsp), %r8d
	movl	32(%rsp), %ebp
	movl	40(%rsp), %r12d
	movl	44(%rsp), %r14d
	movl	16(%rsp), %ecx
	movl	48(%rsp), %r15d
	movl	52(%rsp), %r13d
	jmp	.L19
	.p2align 4,,10
	.p2align 3
.L45:
	cmpl	$5, %r10d
	jne	.L44
	cmpl	%eax, %r11d
	je	.L6
	addl	$1, %edx
	cmpl	$4, %edx
	jg	.L8
	movl	$1, %r10d
.L5:
	movl	%r9d, %ebx
	movl	%r8d, %r9d
	movl	%ecx, %r8d
	movl	%ebx, %ecx
	movl	%edi, %ebx
	movl	%eax, %edi
	movl	%esi, %eax
	movl	%ebx, %esi
	movl	$1, %ebx
.L19:
	cmpl	%eax, %r11d
	jne	.L45
.L6:
	leal	1(%rdx), %r10d
	cmpl	%ecx, %r15d
	je	.L9
	cmpl	$4, %r10d
	jg	.L8
	cmpl	$3, %edx
	je	.L24
	leal	3(%rdx), %r10d
	cmpl	$2, %edx
	je	.L26
	cmpl	$3, %r10d
	jne	.L28
	.p2align 4,,10
	.p2align 3
.L8:
	testb	%bl, %bl
	je	.L18
	movl	%eax, 4(%rsp)
	movl	%ecx, 16(%rsp)
.L18:
	movl	%edi, 12(%rsp)
	leaq	.LC2(%rip), %rdi
	movl	%esi, (%rsp)
	movl	%r8d, 8(%rsp)
	movl	%r9d, 20(%rsp)
	call	puts@PLT
.L17:
	movq	56(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L46
	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
	.p2align 4,,10
	.p2align 3
.L44:
	.cfi_restore_state
	movl	%r9d, %ebx
	addl	$1, %r10d
	movl	%edi, %r9d
	movl	%esi, %edi
	movl	%r8d, %esi
	movl	%ebx, %r8d
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L9:
	cmpl	%esi, %ebp
	je	.L47
.L11:
	cmpl	$4, %r10d
	jg	.L8
	leal	2(%rdx), %r10d
	cmpl	%edi, %ebp
	je	.L48
.L13:
	cmpl	$5, %r10d
	je	.L24
	addl	$3, %edx
	cmpl	%r9d, %ebp
	je	.L49
.L14:
	cmpl	$5, %edx
	je	.L26
	cmpl	%r8d, %ebp
	je	.L50
.L15:
	cmpl	$3, %edx
	jne	.L28
	cmpl	%esi, %ebp
	jne	.L8
	cmpl	%r8d, %r12d
	jne	.L8
	cmpl	%edi, %r14d
	jne	.L8
	cmpl	%r9d, %r13d
	jne	.L8
.L12:
	testb	%bl, %bl
	je	.L16
	movl	%eax, 4(%rsp)
	movl	%ecx, 16(%rsp)
.L16:
	movl	%edi, 12(%rsp)
	leaq	.LC1(%rip), %rdi
	movl	%esi, (%rsp)
	movl	%r8d, 8(%rsp)
	movl	%r9d, 20(%rsp)
	call	puts@PLT
	jmp	.L17
.L48:
	cmpl	%esi, %r12d
	jne	.L13
	cmpl	%r9d, %r14d
	jne	.L13
	cmpl	%r8d, %r13d
	jne	.L13
	movl	%r9d, %edi
	movl	%r8d, %r9d
	movl	%esi, %r8d
	movl	%ebp, %esi
	jmp	.L12
.L47:
	cmpl	%r8d, %r12d
	jne	.L11
	cmpl	%edi, %r14d
	jne	.L11
	cmpl	%r9d, %r13d
	jne	.L11
	jmp	.L12
.L24:
	movl	%edi, %edx
	movl	%r9d, %edi
	movl	%r8d, %r9d
	movl	%esi, %r8d
	movl	%edx, %esi
	jmp	.L8
.L26:
	xchgl	%esi, %r9d
	xchgl	%r8d, %edi
	jmp	.L8
.L49:
	cmpl	%edi, %r12d
	jne	.L14
	cmpl	%r8d, %r14d
	jne	.L14
	cmpl	%esi, %r13d
	jne	.L14
	movl	%esi, %r9d
	movl	%r8d, %edi
	movl	%ebp, %esi
	movl	%r12d, %r8d
	jmp	.L12
.L50:
	cmpl	%r9d, %r12d
	jne	.L15
	cmpl	%esi, %r14d
	jne	.L15
	cmpl	%edi, %r13d
	jne	.L15
	movl	%esi, %edi
	movl	%r8d, %esi
	movl	%r9d, %r8d
	movl	%r13d, %r9d
	jmp	.L12
.L28:
	movl	%edi, %edx
	movl	%esi, %edi
	movl	%r8d, %esi
	movl	%r9d, %r8d
	movl	%edx, %r9d
	jmp	.L8
.L46:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:

#include <stdio.h>


int main()
{
    int dice[6],dice2[6],box,flg=0,cnt=0,cnt2=0;
    for(int i=0;i<6;i++)    scanf("%d",&dice[i]);
    for(int i=0;i<6;i++)    scanf("%d",&dice2[i]);
    while(1)
    {
        if(dice[1]==dice2[1]||4 < cnt){
            cnt = 0;
            cnt2 += 1;
            box = dice[5];
            dice[5] = dice[2];
            dice[2] = dice[0];
            dice[0] = dice[3];
            dice[3] = box;
            if(dice[0]==dice2[0]&&dice[1]==dice2[1]&&dice[2]==dice2[2]&&dice[3]==dice2[3]&&dice[4]==dice2[4]&&dice[5]==dice2[5]){
                printf("Yes\n");
                break;
            }else if(4 < cnt2){
                printf("No\n");
                break;
            }
        }else {
            cnt += 1;
            box = dice[5];
            dice[5] = dice[1];
            dice[1] = dice[0];
            dice[0] = dice[4];
            dice[4] = box;
        }
    }
    return 0;
}

1 2 3 2 5 6
6 5 4 3 2 1
 1 2 3 2 5 6
6 1 4 3 2 1
 1 2 3 2 5 6
6 0 4 3 2 1
 1 2 3 2 5 6
6 0 4 3 4 1
 1 2 3 2 7 6
6 0 4 3 4 1
 1 2 3 2 7 3
6 0 4 3 4 1
 1 2 2 2 7 6
6 0 4 3 4 1
 1 2 2 2 7 9
6 0 4 3 4 1
 1 2 2 2 7 9
6 0 4 5 4 1
 1 0 2 2 7 9
6 0 4 5 4 1

No
 No
 No
 No
 No
 No
 No
 No
 No
 No

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

```c
#include <stdio.h>


int main()
{
    int dice[6],dice2[6],box,flg=0,cnt=0,cnt2=0;
    for(int i=0;i<6;i++)    scanf("%d",&dice[i]);
    for(int i=0;i<6;i++)    scanf("%d",&dice2[i]);
    while(1)
    {
        if(dice[1]==dice2[1]||4 < cnt){
            cnt = 0;
            cnt2 += 1;
            box = dice[5];
            dice[5] = dice[2];
            dice[2] = dice[0];
            dice[0] = dice[3];
            dice[3] = box;
            if(dice[0]==dice2[0]&&dice[1]==dice2[1]&&dice[2]==dice2[2]&&dice[3]==dice2[3]&&dice[4]==dice2[4]&&dice[5]==dice2[5]){
                printf("Yes\n");
                break;
            }else if(4 < cnt2){
                printf("No\n");
                break;
            }
        }else {
            cnt += 1;
            box = dice[5];
            dice[5] = dice[1];
            dice[1] = dice[0];
            dice[0] = dice[4];
            dice[4] = box;
        }
    }
    return 0;
}
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"Yes"
.LC2:
	.string	"No"
	.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	$96, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -72(%rbp)
	movl	$0, -88(%rbp)
	movl	$0, -84(%rbp)
	movl	$0, -80(%rbp)
	jmp	.L2
.L3:
	leaq	-64(%rbp), %rdx
	movl	-80(%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, -80(%rbp)
.L2:
	cmpl	$5, -80(%rbp)
	jle	.L3
	movl	$0, -76(%rbp)
	jmp	.L4
.L5:
	leaq	-32(%rbp), %rdx
	movl	-76(%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, -76(%rbp)
.L4:
	cmpl	$5, -76(%rbp)
	jle	.L5
.L12:
	movl	-60(%rbp), %edx
	movl	-28(%rbp), %eax
	cmpl	%eax, %edx
	je	.L6
	cmpl	$4, -88(%rbp)
	jle	.L7
.L6:
	movl	$0, -88(%rbp)
	addl	$1, -84(%rbp)
	movl	-44(%rbp), %eax
	movl	%eax, -68(%rbp)
	movl	-56(%rbp), %eax
	movl	%eax, -44(%rbp)
	movl	-64(%rbp), %eax
	movl	%eax, -56(%rbp)
	movl	-52(%rbp), %eax
	movl	%eax, -64(%rbp)
	movl	-68(%rbp), %eax
	movl	%eax, -52(%rbp)
	movl	-64(%rbp), %edx
	movl	-32(%rbp), %eax
	cmpl	%eax, %edx
	jne	.L8
	movl	-60(%rbp), %edx
	movl	-28(%rbp), %eax
	cmpl	%eax, %edx
	jne	.L8
	movl	-56(%rbp), %edx
	movl	-24(%rbp), %eax
	cmpl	%eax, %edx
	jne	.L8
	movl	-52(%rbp), %edx
	movl	-20(%rbp), %eax
	cmpl	%eax, %edx
	jne	.L8
	movl	-48(%rbp), %edx
	movl	-16(%rbp), %eax
	cmpl	%eax, %edx
	jne	.L8
	movl	-44(%rbp), %edx
	movl	-12(%rbp), %eax
	cmpl	%eax, %edx
	jne	.L8
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L9
.L8:
	cmpl	$4, -84(%rbp)
	jle	.L15
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L9
.L7:
	addl	$1, -88(%rbp)
	movl	-44(%rbp), %eax
	movl	%eax, -68(%rbp)
	movl	-60(%rbp), %eax
	movl	%eax, -44(%rbp)
	movl	-64(%rbp), %eax
	movl	%eax, -60(%rbp)
	movl	-48(%rbp), %eax
	movl	%eax, -64(%rbp)
	movl	-68(%rbp), %eax
	movl	%eax, -48(%rbp)
	jmp	.L12
.L15:
	nop
	jmp	.L12
.L9:
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L14
	call	__stack_chk_fail@PLT
.L14:
	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	"Yes"
.LC2:
	.string	"No"
	.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	$96, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -72(%rbp)
	movl	$0, -88(%rbp)
	movl	$0, -84(%rbp)
	movl	$0, -80(%rbp)
	jmp	.L2
.L3:
	leaq	-64(%rbp), %rdx
	movl	-80(%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, -80(%rbp)
.L2:
	cmpl	$5, -80(%rbp)
	jle	.L3
	movl	$0, -76(%rbp)
	jmp	.L4
.L5:
	leaq	-32(%rbp), %rdx
	movl	-76(%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, -76(%rbp)
.L4:
	cmpl	$5, -76(%rbp)
	jle	.L5
.L12:
	movl	-60(%rbp), %edx
	movl	-28(%rbp), %eax
	cmpl	%eax, %edx
	je	.L6
	cmpl	$4, -88(%rbp)
	jle	.L7
.L6:
	movl	$0, -88(%rbp)
	addl	$1, -84(%rbp)
	movl	-44(%rbp), %eax
	movl	%eax, -68(%rbp)
	movl	-56(%rbp), %eax
	movl	%eax, -44(%rbp)
	movl	-64(%rbp), %eax
	movl	%eax, -56(%rbp)
	movl	-52(%rbp), %eax
	movl	%eax, -64(%rbp)
	movl	-68(%rbp), %eax
	movl	%eax, -52(%rbp)
	movl	-64(%rbp), %edx
	movl	-32(%rbp), %eax
	cmpl	%eax, %edx
	jne	.L8
	movl	-60(%rbp), %edx
	movl	-28(%rbp), %eax
	cmpl	%eax, %edx
	jne	.L8
	movl	-56(%rbp), %edx
	movl	-24(%rbp), %eax
	cmpl	%eax, %edx
	jne	.L8
	movl	-52(%rbp), %edx
	movl	-20(%rbp), %eax
	cmpl	%eax, %edx
	jne	.L8
	movl	-48(%rbp), %edx
	movl	-16(%rbp), %eax
	cmpl	%eax, %edx
	jne	.L8
	movl	-44(%rbp), %edx
	movl	-12(%rbp), %eax
	cmpl	%eax, %edx
	jne	.L8
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L9
.L8:
	cmpl	$4, -84(%rbp)
	jle	.L15
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L9
.L7:
	addl	$1, -88(%rbp)
	movl	-44(%rbp), %eax
	movl	%eax, -68(%rbp)
	movl	-60(%rbp), %eax
	movl	%eax, -44(%rbp)
	movl	-64(%rbp), %eax
	movl	%eax, -60(%rbp)
	movl	-48(%rbp), %eax
	movl	%eax, -64(%rbp)
	movl	-68(%rbp), %eax
	movl	%eax, -48(%rbp)
	jmp	.L12
.L15:
	nop
	jmp	.L12
.L9:
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L14
	call	__stack_chk_fail@PLT
.L14:
	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:
