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

```c
#include <stdio.h>
#include <string.h>


int main(void)
{
    int i,j,top,dice[10],dice2[10];

    for(i=0;i<6;i++){
        scanf("%d",&dice[i]);
    }
    for(i=0;i<6;i++){
        scanf("%d",&dice2[i]);
    }
    
    for(i=0;i<8;i++){
        if(memcmp(dice,dice2,sizeof(dice))==0)break;
        if(dice[0]==dice2[0]){
            for(j=0;j<4;j++){
                top=dice2[1];
                dice2[1]=dice2[2];
                dice2[2]=dice2[4];
                dice2[4]=dice2[3];
                dice2[3]=top;
                if(memcmp(dice,dice2,sizeof(dice))==0) goto OUT;
            }
        }
        if(i<4){
                top=dice2[0];
                dice2[0]=dice2[1];
                dice2[1]=dice2[5];
                dice2[5]=dice2[4];
                dice2[4]=top;
        }else{
                top=dice2[0];
                dice2[0]=dice2[2];
                dice2[2]=dice2[5];
                dice2[5]=dice2[3];
                dice2[3]=top;
        }
    }
    OUT:

    if(memcmp(dice,dice2,sizeof(dice))==0){
        printf("Yes\n");
    }else{
        printf("No\n");
    }
    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	$112, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -108(%rbp)
	jmp	.L2
.L3:
	leaq	-96(%rbp), %rdx
	movl	-108(%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, -108(%rbp)
.L2:
	cmpl	$5, -108(%rbp)
	jle	.L3
	movl	$0, -108(%rbp)
	jmp	.L4
.L5:
	leaq	-48(%rbp), %rdx
	movl	-108(%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, -108(%rbp)
.L4:
	cmpl	$5, -108(%rbp)
	jle	.L5
	movl	$0, -108(%rbp)
	jmp	.L6
.L15:
	leaq	-48(%rbp), %rcx
	leaq	-96(%rbp), %rax
	movl	$40, %edx
	movq	%rcx, %rsi
	movq	%rax, %rdi
	call	memcmp@PLT
	testl	%eax, %eax
	je	.L20
	movl	-96(%rbp), %edx
	movl	-48(%rbp), %eax
	cmpl	%eax, %edx
	jne	.L9
	movl	$0, -104(%rbp)
	jmp	.L10
.L12:
	movl	-44(%rbp), %eax
	movl	%eax, -100(%rbp)
	movl	-40(%rbp), %eax
	movl	%eax, -44(%rbp)
	movl	-32(%rbp), %eax
	movl	%eax, -40(%rbp)
	movl	-36(%rbp), %eax
	movl	%eax, -32(%rbp)
	movl	-100(%rbp), %eax
	movl	%eax, -36(%rbp)
	leaq	-48(%rbp), %rcx
	leaq	-96(%rbp), %rax
	movl	$40, %edx
	movq	%rcx, %rsi
	movq	%rax, %rdi
	call	memcmp@PLT
	testl	%eax, %eax
	je	.L21
	addl	$1, -104(%rbp)
.L10:
	cmpl	$3, -104(%rbp)
	jle	.L12
.L9:
	cmpl	$3, -108(%rbp)
	jg	.L13
	movl	-48(%rbp), %eax
	movl	%eax, -100(%rbp)
	movl	-44(%rbp), %eax
	movl	%eax, -48(%rbp)
	movl	-28(%rbp), %eax
	movl	%eax, -44(%rbp)
	movl	-32(%rbp), %eax
	movl	%eax, -28(%rbp)
	movl	-100(%rbp), %eax
	movl	%eax, -32(%rbp)
	jmp	.L14
.L13:
	movl	-48(%rbp), %eax
	movl	%eax, -100(%rbp)
	movl	-40(%rbp), %eax
	movl	%eax, -48(%rbp)
	movl	-28(%rbp), %eax
	movl	%eax, -40(%rbp)
	movl	-36(%rbp), %eax
	movl	%eax, -28(%rbp)
	movl	-100(%rbp), %eax
	movl	%eax, -36(%rbp)
.L14:
	addl	$1, -108(%rbp)
.L6:
	cmpl	$7, -108(%rbp)
	jle	.L15
	jmp	.L8
.L20:
	nop
	jmp	.L8
.L21:
	nop
.L8:
	leaq	-48(%rbp), %rcx
	leaq	-96(%rbp), %rax
	movl	$40, %edx
	movq	%rcx, %rsi
	movq	%rax, %rdi
	call	memcmp@PLT
	testl	%eax, %eax
	jne	.L16
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L17
.L16:
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
.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
	.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	"No"
.LC2:
	.string	"Yes"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB35:
	.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
	leaq	.LC0(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	subq	$96, %rsp
	.cfi_def_cfa_offset 144
	movq	%fs:40, %rax
	movq	%rax, 88(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %rbp
	leaq	24(%rsp), %r12
	movq	%rbp, %rbx
	.p2align 4,,10
	.p2align 3
.L2:
	movq	%rbx, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addq	$4, %rbx
	call	__isoc99_scanf@PLT
	cmpq	%r12, %rbx
	jne	.L2
	leaq	48(%rsp), %r12
	leaq	72(%rsp), %r14
	movq	%r12, %rbx
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%rbx, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addq	$4, %rbx
	call	__isoc99_scanf@PLT
	cmpq	%r14, %rbx
	jne	.L3
	movl	(%rsp), %esi
	xorl	%ecx, %ecx
	.p2align 4,,10
	.p2align 3
.L21:
	movq	0(%rbp), %rdx
	movq	8(%rbp), %rax
	xorq	(%r12), %rdx
	xorq	8(%r12), %rax
	orq	%rdx, %rax
	jne	.L4
	movq	16(%rbp), %rdx
	movq	24(%rbp), %rax
	xorq	16(%r12), %rdx
	xorq	24(%r12), %rax
	orq	%rdx, %rax
	jne	.L4
	movq	32(%r12), %rax
	cmpq	%rax, 32(%rbp)
	je	.L22
	.p2align 4,,10
	.p2align 3
.L4:
	movl	48(%rsp), %eax
	cmpl	%eax, %esi
	je	.L7
.L18:
	movd	68(%rsp), %xmm0
	movd	%eax, %xmm4
	leal	1(%rcx), %edx
	movdqa	%xmm0, %xmm1
	punpckldq	%xmm4, %xmm1
	cmpl	$3, %ecx
	ja	.L39
	movd	52(%rsp), %xmm1
	movd	64(%rsp), %xmm5
	punpckldq	%xmm0, %xmm1
	movd	%eax, %xmm0
	punpckldq	%xmm5, %xmm0
	movq	%xmm1, 48(%rsp)
	movq	%xmm0, 64(%rsp)
.L19:
	movl	%edx, %ecx
	jmp	.L21
	.p2align 4,,10
	.p2align 3
.L39:
	movl	56(%rsp), %eax
	movl	60(%rsp), %ecx
	movq	%xmm1, 56(%rsp)
	movl	%ecx, 68(%rsp)
	movl	%eax, 48(%rsp)
	cmpl	$8, %edx
	jne	.L19
.L20:
	movl	$40, %edx
	movq	%r12, %rsi
	movq	%rbp, %rdi
	call	memcmp@PLT
	testl	%eax, %eax
	je	.L22
	leaq	.LC1(%rip), %rdi
	call	puts@PLT
.L23:
	movq	88(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L40
	addq	$96, %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
.L7:
	.cfi_restore_state
	movdqu	52(%rsp), %xmm0
	movq	0(%rbp), %rdi
	movq	8(%rbp), %rdx
	pshufd	$141, %xmm0, %xmm1
	pshufd	$27, %xmm0, %xmm2
	pshufd	$114, %xmm0, %xmm3
	movups	%xmm1, 52(%rsp)
	xorq	8(%r12), %rdx
	xorq	(%r12), %rdi
	orq	%rdi, %rdx
	jne	.L10
	movq	16(%rbp), %rdi
	movq	24(%rbp), %rdx
	xorq	16(%r12), %rdi
	xorq	24(%r12), %rdx
	orq	%rdi, %rdx
	jne	.L10
	movq	32(%r12), %rdi
	cmpq	%rdi, 32(%rbp)
	je	.L22
	.p2align 4,,10
	.p2align 3
.L10:
	movups	%xmm2, 52(%rsp)
	movq	0(%rbp), %rdi
	movq	8(%rbp), %rdx
	xorq	(%r12), %rdi
	xorq	8(%r12), %rdx
	orq	%rdi, %rdx
	je	.L41
.L12:
	movups	%xmm3, 52(%rsp)
	movq	0(%rbp), %rdi
	movq	8(%rbp), %rdx
	xorq	(%r12), %rdi
	xorq	8(%r12), %rdx
	orq	%rdi, %rdx
	je	.L42
.L14:
	movups	%xmm0, 52(%rsp)
	movq	0(%rbp), %rdi
	movq	8(%rbp), %rdx
	xorq	(%r12), %rdi
	xorq	8(%r12), %rdx
	orq	%rdi, %rdx
	jne	.L18
	movq	16(%rbp), %rdi
	movq	24(%rbp), %rdx
	xorq	16(%r12), %rdi
	xorq	24(%r12), %rdx
	orq	%rdi, %rdx
	jne	.L18
	movq	32(%r12), %rdi
	cmpq	%rdi, 32(%rbp)
	jne	.L18
.L22:
	leaq	.LC2(%rip), %rdi
	call	puts@PLT
	jmp	.L23
.L41:
	movq	16(%rbp), %rdi
	movq	24(%rbp), %rdx
	xorq	16(%r12), %rdi
	xorq	24(%r12), %rdx
	orq	%rdi, %rdx
	jne	.L12
	movq	32(%r12), %rdi
	cmpq	%rdi, 32(%rbp)
	jne	.L12
	jmp	.L22
.L42:
	movq	16(%rbp), %rdi
	movq	24(%rbp), %rdx
	xorq	16(%r12), %rdi
	xorq	24(%r12), %rdx
	orq	%rdi, %rdx
	jne	.L14
	movq	32(%r12), %rdi
	cmpq	%rdi, 32(%rbp)
	jne	.L14
	jmp	.L22
.L40:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE35:
	.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	"No"
.LC2:
	.string	"Yes"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB35:
	.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
	leaq	.LC0(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	subq	$96, %rsp
	.cfi_def_cfa_offset 144
	movq	%fs:40, %rax
	movq	%rax, 88(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %rbp
	leaq	24(%rsp), %r12
	movq	%rbp, %rbx
	.p2align 4,,10
	.p2align 3
.L2:
	movq	%rbx, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addq	$4, %rbx
	call	__isoc99_scanf@PLT
	cmpq	%r12, %rbx
	jne	.L2
	leaq	48(%rsp), %r12
	leaq	72(%rsp), %r14
	movq	%r12, %rbx
	.p2align 4,,10
	.p2align 3
.L3:
	movq	%rbx, %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	addq	$4, %rbx
	call	__isoc99_scanf@PLT
	cmpq	%r14, %rbx
	jne	.L3
	movl	(%rsp), %esi
	xorl	%ecx, %ecx
	.p2align 4,,10
	.p2align 3
.L21:
	movq	0(%rbp), %rdx
	movq	8(%rbp), %rax
	xorq	(%r12), %rdx
	xorq	8(%r12), %rax
	orq	%rdx, %rax
	jne	.L4
	movq	16(%rbp), %rdx
	movq	24(%rbp), %rax
	xorq	16(%r12), %rdx
	xorq	24(%r12), %rax
	orq	%rdx, %rax
	jne	.L4
	movq	32(%r12), %rax
	cmpq	%rax, 32(%rbp)
	je	.L22
	.p2align 4,,10
	.p2align 3
.L4:
	movl	48(%rsp), %eax
	cmpl	%eax, %esi
	je	.L7
.L18:
	movd	68(%rsp), %xmm0
	movd	%eax, %xmm4
	leal	1(%rcx), %edx
	movdqa	%xmm0, %xmm1
	punpckldq	%xmm4, %xmm1
	cmpl	$3, %ecx
	ja	.L39
	movd	52(%rsp), %xmm1
	movd	64(%rsp), %xmm5
	punpckldq	%xmm0, %xmm1
	movd	%eax, %xmm0
	punpckldq	%xmm5, %xmm0
	movq	%xmm1, 48(%rsp)
	movq	%xmm0, 64(%rsp)
.L19:
	movl	%edx, %ecx
	jmp	.L21
	.p2align 4,,10
	.p2align 3
.L39:
	movl	56(%rsp), %eax
	movl	60(%rsp), %ecx
	movq	%xmm1, 56(%rsp)
	movl	%ecx, 68(%rsp)
	movl	%eax, 48(%rsp)
	cmpl	$8, %edx
	jne	.L19
.L20:
	movl	$40, %edx
	movq	%r12, %rsi
	movq	%rbp, %rdi
	call	memcmp@PLT
	testl	%eax, %eax
	je	.L22
	leaq	.LC1(%rip), %rdi
	call	puts@PLT
.L23:
	movq	88(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L40
	addq	$96, %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
.L7:
	.cfi_restore_state
	movdqu	52(%rsp), %xmm0
	movq	0(%rbp), %rdi
	movq	8(%rbp), %rdx
	pshufd	$141, %xmm0, %xmm1
	pshufd	$27, %xmm0, %xmm2
	pshufd	$114, %xmm0, %xmm3
	movups	%xmm1, 52(%rsp)
	xorq	8(%r12), %rdx
	xorq	(%r12), %rdi
	orq	%rdi, %rdx
	jne	.L10
	movq	16(%rbp), %rdi
	movq	24(%rbp), %rdx
	xorq	16(%r12), %rdi
	xorq	24(%r12), %rdx
	orq	%rdi, %rdx
	jne	.L10
	movq	32(%r12), %rdi
	cmpq	%rdi, 32(%rbp)
	je	.L22
	.p2align 4,,10
	.p2align 3
.L10:
	movups	%xmm2, 52(%rsp)
	movq	0(%rbp), %rdi
	movq	8(%rbp), %rdx
	xorq	(%r12), %rdi
	xorq	8(%r12), %rdx
	orq	%rdi, %rdx
	je	.L41
.L12:
	movups	%xmm3, 52(%rsp)
	movq	0(%rbp), %rdi
	movq	8(%rbp), %rdx
	xorq	(%r12), %rdi
	xorq	8(%r12), %rdx
	orq	%rdi, %rdx
	je	.L42
.L14:
	movups	%xmm0, 52(%rsp)
	movq	0(%rbp), %rdi
	movq	8(%rbp), %rdx
	xorq	(%r12), %rdi
	xorq	8(%r12), %rdx
	orq	%rdi, %rdx
	jne	.L18
	movq	16(%rbp), %rdi
	movq	24(%rbp), %rdx
	xorq	16(%r12), %rdi
	xorq	24(%r12), %rdx
	orq	%rdi, %rdx
	jne	.L18
	movq	32(%r12), %rdi
	cmpq	%rdi, 32(%rbp)
	jne	.L18
.L22:
	leaq	.LC2(%rip), %rdi
	call	puts@PLT
	jmp	.L23
.L41:
	movq	16(%rbp), %rdi
	movq	24(%rbp), %rdx
	xorq	16(%r12), %rdi
	xorq	24(%r12), %rdx
	orq	%rdi, %rdx
	jne	.L12
	movq	32(%r12), %rdi
	cmpq	%rdi, 32(%rbp)
	jne	.L12
	jmp	.L22
.L42:
	movq	16(%rbp), %rdi
	movq	24(%rbp), %rdx
	xorq	16(%r12), %rdi
	xorq	24(%r12), %rdx
	orq	%rdi, %rdx
	jne	.L14
	movq	32(%r12), %rdi
	cmpq	%rdi, 32(%rbp)
	jne	.L14
	jmp	.L22
.L40:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE35:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:

#include <stdio.h>
#include <string.h>


int main(void)
{
    int i,j,top,dice[10],dice2[10];

    for(i=0;i<6;i++){
        scanf("%d",&dice[i]);
    }
    for(i=0;i<6;i++){
        scanf("%d",&dice2[i]);
    }
    
    for(i=0;i<8;i++){
        if(memcmp(dice,dice2,sizeof(dice))==0)break;
        if(dice[0]==dice2[0]){
            for(j=0;j<4;j++){
                top=dice2[1];
                dice2[1]=dice2[2];
                dice2[2]=dice2[4];
                dice2[4]=dice2[3];
                dice2[3]=top;
                if(memcmp(dice,dice2,sizeof(dice))==0) goto OUT;
            }
        }
        if(i<4){
                top=dice2[0];
                dice2[0]=dice2[1];
                dice2[1]=dice2[5];
                dice2[5]=dice2[4];
                dice2[4]=top;
        }else{
                top=dice2[0];
                dice2[0]=dice2[2];
                dice2[2]=dice2[5];
                dice2[5]=dice2[3];
                dice2[3]=top;
        }
    }
    OUT:

    if(memcmp(dice,dice2,sizeof(dice))==0){
        printf("Yes\n");
    }else{
        printf("No\n");
    }
    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>
#include <string.h>


int main(void)
{
    int i,j,top,dice[10],dice2[10];

    for(i=0;i<6;i++){
        scanf("%d",&dice[i]);
    }
    for(i=0;i<6;i++){
        scanf("%d",&dice2[i]);
    }
    
    for(i=0;i<8;i++){
        if(memcmp(dice,dice2,sizeof(dice))==0)break;
        if(dice[0]==dice2[0]){
            for(j=0;j<4;j++){
                top=dice2[1];
                dice2[1]=dice2[2];
                dice2[2]=dice2[4];
                dice2[4]=dice2[3];
                dice2[3]=top;
                if(memcmp(dice,dice2,sizeof(dice))==0) goto OUT;
            }
        }
        if(i<4){
                top=dice2[0];
                dice2[0]=dice2[1];
                dice2[1]=dice2[5];
                dice2[5]=dice2[4];
                dice2[4]=top;
        }else{
                top=dice2[0];
                dice2[0]=dice2[2];
                dice2[2]=dice2[5];
                dice2[5]=dice2[3];
                dice2[3]=top;
        }
    }
    OUT:

    if(memcmp(dice,dice2,sizeof(dice))==0){
        printf("Yes\n");
    }else{
        printf("No\n");
    }
    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	$112, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -108(%rbp)
	jmp	.L2
.L3:
	leaq	-96(%rbp), %rdx
	movl	-108(%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, -108(%rbp)
.L2:
	cmpl	$5, -108(%rbp)
	jle	.L3
	movl	$0, -108(%rbp)
	jmp	.L4
.L5:
	leaq	-48(%rbp), %rdx
	movl	-108(%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, -108(%rbp)
.L4:
	cmpl	$5, -108(%rbp)
	jle	.L5
	movl	$0, -108(%rbp)
	jmp	.L6
.L15:
	leaq	-48(%rbp), %rcx
	leaq	-96(%rbp), %rax
	movl	$40, %edx
	movq	%rcx, %rsi
	movq	%rax, %rdi
	call	memcmp@PLT
	testl	%eax, %eax
	je	.L20
	movl	-96(%rbp), %edx
	movl	-48(%rbp), %eax
	cmpl	%eax, %edx
	jne	.L9
	movl	$0, -104(%rbp)
	jmp	.L10
.L12:
	movl	-44(%rbp), %eax
	movl	%eax, -100(%rbp)
	movl	-40(%rbp), %eax
	movl	%eax, -44(%rbp)
	movl	-32(%rbp), %eax
	movl	%eax, -40(%rbp)
	movl	-36(%rbp), %eax
	movl	%eax, -32(%rbp)
	movl	-100(%rbp), %eax
	movl	%eax, -36(%rbp)
	leaq	-48(%rbp), %rcx
	leaq	-96(%rbp), %rax
	movl	$40, %edx
	movq	%rcx, %rsi
	movq	%rax, %rdi
	call	memcmp@PLT
	testl	%eax, %eax
	je	.L21
	addl	$1, -104(%rbp)
.L10:
	cmpl	$3, -104(%rbp)
	jle	.L12
.L9:
	cmpl	$3, -108(%rbp)
	jg	.L13
	movl	-48(%rbp), %eax
	movl	%eax, -100(%rbp)
	movl	-44(%rbp), %eax
	movl	%eax, -48(%rbp)
	movl	-28(%rbp), %eax
	movl	%eax, -44(%rbp)
	movl	-32(%rbp), %eax
	movl	%eax, -28(%rbp)
	movl	-100(%rbp), %eax
	movl	%eax, -32(%rbp)
	jmp	.L14
.L13:
	movl	-48(%rbp), %eax
	movl	%eax, -100(%rbp)
	movl	-40(%rbp), %eax
	movl	%eax, -48(%rbp)
	movl	-28(%rbp), %eax
	movl	%eax, -40(%rbp)
	movl	-36(%rbp), %eax
	movl	%eax, -28(%rbp)
	movl	-100(%rbp), %eax
	movl	%eax, -36(%rbp)
.L14:
	addl	$1, -108(%rbp)
.L6:
	cmpl	$7, -108(%rbp)
	jle	.L15
	jmp	.L8
.L20:
	nop
	jmp	.L8
.L21:
	nop
.L8:
	leaq	-48(%rbp), %rcx
	leaq	-96(%rbp), %rax
	movl	$40, %edx
	movq	%rcx, %rsi
	movq	%rax, %rdi
	call	memcmp@PLT
	testl	%eax, %eax
	jne	.L16
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L17
.L16:
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
.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
	.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	$112, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -108(%rbp)
	jmp	.L2
.L3:
	leaq	-96(%rbp), %rdx
	movl	-108(%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, -108(%rbp)
.L2:
	cmpl	$5, -108(%rbp)
	jle	.L3
	movl	$0, -108(%rbp)
	jmp	.L4
.L5:
	leaq	-48(%rbp), %rdx
	movl	-108(%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, -108(%rbp)
.L4:
	cmpl	$5, -108(%rbp)
	jle	.L5
	movl	$0, -108(%rbp)
	jmp	.L6
.L15:
	leaq	-48(%rbp), %rcx
	leaq	-96(%rbp), %rax
	movl	$40, %edx
	movq	%rcx, %rsi
	movq	%rax, %rdi
	call	memcmp@PLT
	testl	%eax, %eax
	je	.L20
	movl	-96(%rbp), %edx
	movl	-48(%rbp), %eax
	cmpl	%eax, %edx
	jne	.L9
	movl	$0, -104(%rbp)
	jmp	.L10
.L12:
	movl	-44(%rbp), %eax
	movl	%eax, -100(%rbp)
	movl	-40(%rbp), %eax
	movl	%eax, -44(%rbp)
	movl	-32(%rbp), %eax
	movl	%eax, -40(%rbp)
	movl	-36(%rbp), %eax
	movl	%eax, -32(%rbp)
	movl	-100(%rbp), %eax
	movl	%eax, -36(%rbp)
	leaq	-48(%rbp), %rcx
	leaq	-96(%rbp), %rax
	movl	$40, %edx
	movq	%rcx, %rsi
	movq	%rax, %rdi
	call	memcmp@PLT
	testl	%eax, %eax
	je	.L21
	addl	$1, -104(%rbp)
.L10:
	cmpl	$3, -104(%rbp)
	jle	.L12
.L9:
	cmpl	$3, -108(%rbp)
	jg	.L13
	movl	-48(%rbp), %eax
	movl	%eax, -100(%rbp)
	movl	-44(%rbp), %eax
	movl	%eax, -48(%rbp)
	movl	-28(%rbp), %eax
	movl	%eax, -44(%rbp)
	movl	-32(%rbp), %eax
	movl	%eax, -28(%rbp)
	movl	-100(%rbp), %eax
	movl	%eax, -32(%rbp)
	jmp	.L14
.L13:
	movl	-48(%rbp), %eax
	movl	%eax, -100(%rbp)
	movl	-40(%rbp), %eax
	movl	%eax, -48(%rbp)
	movl	-28(%rbp), %eax
	movl	%eax, -40(%rbp)
	movl	-36(%rbp), %eax
	movl	%eax, -28(%rbp)
	movl	-100(%rbp), %eax
	movl	%eax, -36(%rbp)
.L14:
	addl	$1, -108(%rbp)
.L6:
	cmpl	$7, -108(%rbp)
	jle	.L15
	jmp	.L8
.L20:
	nop
	jmp	.L8
.L21:
	nop
.L8:
	leaq	-48(%rbp), %rcx
	leaq	-96(%rbp), %rax
	movl	$40, %edx
	movq	%rcx, %rsi
	movq	%rax, %rdi
	call	memcmp@PLT
	testl	%eax, %eax
	jne	.L16
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L17
.L16:
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
.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
	.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:
