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 rot[24][7] = {
	{ 0,1,2,3,4,5,6 },{ 0,1,3,5,2,4,6 },{ 0,1,4,2,5,3,6 },{ 0,1,5,4,3,2,6 },
	{ 0,2,6,3,4,1,5 },{ 0,2,3,1,6,4,5 },{ 0,2,1,4,3,6,5 },{ 0,2,4,6,1,3,5 },
	{ 0,3,1,2,5,6,4 },{ 0,3,2,6,1,5,4 },{ 0,3,5,1,6,2,4 },{ 0,3,6,5,2,1,4 },
	{ 0,4,1,5,2,6,3 },{ 0,4,2,1,6,5,3 },{ 0,4,5,6,1,2,3 },{ 0,4,6,2,5,1,3 },
	{ 0,5,1,3,4,6,2 },{ 0,5,3,6,1,4,2 },{ 0,5,4,1,6,3,2 },{ 0,5,6,4,3,1,2 },
	{ 0,6,2,4,3,5,1 },{ 0,6,3,2,5,4,1 },{ 0,6,5,3,4,2,1 },{ 0,6,4,5,2,3,1 } };
int assign[7];

int main()
{
	int i, j;
	int a[7], b[7], dice[7];

	for (i = 1; i <= 6; i++) scanf("%d", assign+i);
	for (i = 1; i <= 6; i++) scanf("%d", a+i);
	for (j = 0; j < 24; j++) {
		for (i = 1; i <= 6; i++) dice[i] = rot[j][i];
		for (i = 1; i <= 6; i++) b[i] = assign[dice[i]];
		for (i = 1; ; i++) {
			if (i > 6) { puts("Yes"); return 0; }
			if (a[i] != b[i]) break;
		}
	}
	puts("No");
	return 0;
}

```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	rot
	.data
	.align 32
	.type	rot, @object
	.size	rot, 672
rot:
	.long	0
	.long	1
	.long	2
	.long	3
	.long	4
	.long	5
	.long	6
	.long	0
	.long	1
	.long	3
	.long	5
	.long	2
	.long	4
	.long	6
	.long	0
	.long	1
	.long	4
	.long	2
	.long	5
	.long	3
	.long	6
	.long	0
	.long	1
	.long	5
	.long	4
	.long	3
	.long	2
	.long	6
	.long	0
	.long	2
	.long	6
	.long	3
	.long	4
	.long	1
	.long	5
	.long	0
	.long	2
	.long	3
	.long	1
	.long	6
	.long	4
	.long	5
	.long	0
	.long	2
	.long	1
	.long	4
	.long	3
	.long	6
	.long	5
	.long	0
	.long	2
	.long	4
	.long	6
	.long	1
	.long	3
	.long	5
	.long	0
	.long	3
	.long	1
	.long	2
	.long	5
	.long	6
	.long	4
	.long	0
	.long	3
	.long	2
	.long	6
	.long	1
	.long	5
	.long	4
	.long	0
	.long	3
	.long	5
	.long	1
	.long	6
	.long	2
	.long	4
	.long	0
	.long	3
	.long	6
	.long	5
	.long	2
	.long	1
	.long	4
	.long	0
	.long	4
	.long	1
	.long	5
	.long	2
	.long	6
	.long	3
	.long	0
	.long	4
	.long	2
	.long	1
	.long	6
	.long	5
	.long	3
	.long	0
	.long	4
	.long	5
	.long	6
	.long	1
	.long	2
	.long	3
	.long	0
	.long	4
	.long	6
	.long	2
	.long	5
	.long	1
	.long	3
	.long	0
	.long	5
	.long	1
	.long	3
	.long	4
	.long	6
	.long	2
	.long	0
	.long	5
	.long	3
	.long	6
	.long	1
	.long	4
	.long	2
	.long	0
	.long	5
	.long	4
	.long	1
	.long	6
	.long	3
	.long	2
	.long	0
	.long	5
	.long	6
	.long	4
	.long	3
	.long	1
	.long	2
	.long	0
	.long	6
	.long	2
	.long	4
	.long	3
	.long	5
	.long	1
	.long	0
	.long	6
	.long	3
	.long	2
	.long	5
	.long	4
	.long	1
	.long	0
	.long	6
	.long	5
	.long	3
	.long	4
	.long	2
	.long	1
	.long	0
	.long	6
	.long	4
	.long	5
	.long	2
	.long	3
	.long	1
	.globl	assign
	.bss
	.align 16
	.type	assign, @object
	.size	assign, 28
assign:
	.zero	28
	.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
	addq	$-128, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$1, -120(%rbp)
	jmp	.L2
.L3:
	movl	-120(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	assign(%rip), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -120(%rbp)
.L2:
	cmpl	$6, -120(%rbp)
	jle	.L3
	movl	$1, -120(%rbp)
	jmp	.L4
.L5:
	movl	-120(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	-112(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -120(%rbp)
.L4:
	cmpl	$6, -120(%rbp)
	jle	.L5
	movl	$0, -116(%rbp)
	jmp	.L6
.L16:
	movl	$1, -120(%rbp)
	jmp	.L7
.L8:
	movl	-120(%rbp), %eax
	movslq	%eax, %rcx
	movl	-116(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$3, %rax
	subq	%rdx, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	rot(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-120(%rbp), %eax
	cltq
	movl	%edx, -48(%rbp,%rax,4)
	addl	$1, -120(%rbp)
.L7:
	cmpl	$6, -120(%rbp)
	jle	.L8
	movl	$1, -120(%rbp)
	jmp	.L9
.L10:
	movl	-120(%rbp), %eax
	cltq
	movl	-48(%rbp,%rax,4), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	assign(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-120(%rbp), %eax
	cltq
	movl	%edx, -80(%rbp,%rax,4)
	addl	$1, -120(%rbp)
.L9:
	cmpl	$6, -120(%rbp)
	jle	.L10
	movl	$1, -120(%rbp)
.L15:
	cmpl	$6, -120(%rbp)
	jle	.L11
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
	jmp	.L17
.L11:
	movl	-120(%rbp), %eax
	cltq
	movl	-112(%rbp,%rax,4), %edx
	movl	-120(%rbp), %eax
	cltq
	movl	-80(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	jne	.L20
	addl	$1, -120(%rbp)
	jmp	.L15
.L20:
	nop
	addl	$1, -116(%rbp)
.L6:
	cmpl	$23, -116(%rbp)
	jle	.L16
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
.L17:
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L18
	call	__stack_chk_fail@PLT
.L18:
	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
	leaq	4+assign(%rip), %rbx
	leaq	24(%rbx), %r12
	subq	$56, %rsp
	.cfi_def_cfa_offset 112
	movq	%fs:40, %rax
	movq	%rax, 40(%rsp)
	xorl	%eax, %eax
	.p2align 4,,10
	.p2align 3
.L2:
	movq	%rbx, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	addq	$4, %rbx
	call	__isoc99_scanf@PLT
	cmpq	%r12, %rbx
	jne	.L2
	leaq	4(%rsp), %rbx
	leaq	28(%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
	leaq	4+rot(%rip), %rax
	movl	4(%rsp), %esi
	movl	8(%rsp), %edi
	leaq	assign(%rip), %rdx
	movl	12(%rsp), %r8d
	movl	16(%rsp), %r9d
	leaq	672(%rax), %rbx
	movl	20(%rsp), %r10d
	movl	24(%rsp), %r11d
.L4:
	movslq	4(%rax), %rcx
	movl	(%rdx,%rcx,4), %ebp
	movslq	8(%rax), %rcx
	movl	(%rdx,%rcx,4), %r12d
	movslq	12(%rax), %rcx
	movl	(%rdx,%rcx,4), %r13d
	movslq	16(%rax), %rcx
	movl	(%rdx,%rcx,4), %r14d
	movslq	20(%rax), %rcx
	movl	(%rdx,%rcx,4), %r15d
	movslq	(%rax), %rcx
	cmpl	(%rdx,%rcx,4), %esi
	jne	.L5
	cmpl	%ebp, %edi
	jne	.L5
	cmpl	%r12d, %r8d
	jne	.L5
	cmpl	%r13d, %r9d
	jne	.L5
	cmpl	%r14d, %r10d
	jne	.L5
	cmpl	%r15d, %r11d
	jne	.L5
	leaq	.LC1(%rip), %rdi
	call	puts@PLT
.L6:
	movq	40(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L15
	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
.L5:
	.cfi_restore_state
	addq	$28, %rax
	cmpq	%rax, %rbx
	jne	.L4
	leaq	.LC2(%rip), %rdi
	call	puts@PLT
	jmp	.L6
.L15:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.globl	assign
	.bss
	.align 16
	.type	assign, @object
	.size	assign, 28
assign:
	.zero	28
	.globl	rot
	.data
	.align 32
	.type	rot, @object
	.size	rot, 672
rot:
	.long	0
	.long	1
	.long	2
	.long	3
	.long	4
	.long	5
	.long	6
	.long	0
	.long	1
	.long	3
	.long	5
	.long	2
	.long	4
	.long	6
	.long	0
	.long	1
	.long	4
	.long	2
	.long	5
	.long	3
	.long	6
	.long	0
	.long	1
	.long	5
	.long	4
	.long	3
	.long	2
	.long	6
	.long	0
	.long	2
	.long	6
	.long	3
	.long	4
	.long	1
	.long	5
	.long	0
	.long	2
	.long	3
	.long	1
	.long	6
	.long	4
	.long	5
	.long	0
	.long	2
	.long	1
	.long	4
	.long	3
	.long	6
	.long	5
	.long	0
	.long	2
	.long	4
	.long	6
	.long	1
	.long	3
	.long	5
	.long	0
	.long	3
	.long	1
	.long	2
	.long	5
	.long	6
	.long	4
	.long	0
	.long	3
	.long	2
	.long	6
	.long	1
	.long	5
	.long	4
	.long	0
	.long	3
	.long	5
	.long	1
	.long	6
	.long	2
	.long	4
	.long	0
	.long	3
	.long	6
	.long	5
	.long	2
	.long	1
	.long	4
	.long	0
	.long	4
	.long	1
	.long	5
	.long	2
	.long	6
	.long	3
	.long	0
	.long	4
	.long	2
	.long	1
	.long	6
	.long	5
	.long	3
	.long	0
	.long	4
	.long	5
	.long	6
	.long	1
	.long	2
	.long	3
	.long	0
	.long	4
	.long	6
	.long	2
	.long	5
	.long	1
	.long	3
	.long	0
	.long	5
	.long	1
	.long	3
	.long	4
	.long	6
	.long	2
	.long	0
	.long	5
	.long	3
	.long	6
	.long	1
	.long	4
	.long	2
	.long	0
	.long	5
	.long	4
	.long	1
	.long	6
	.long	3
	.long	2
	.long	0
	.long	5
	.long	6
	.long	4
	.long	3
	.long	1
	.long	2
	.long	0
	.long	6
	.long	2
	.long	4
	.long	3
	.long	5
	.long	1
	.long	0
	.long	6
	.long	3
	.long	2
	.long	5
	.long	4
	.long	1
	.long	0
	.long	6
	.long	5
	.long	3
	.long	4
	.long	2
	.long	1
	.long	0
	.long	6
	.long	4
	.long	5
	.long	2
	.long	3
	.long	1
	.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
	leaq	4+assign(%rip), %rbx
	leaq	24(%rbx), %r12
	subq	$56, %rsp
	.cfi_def_cfa_offset 112
	movq	%fs:40, %rax
	movq	%rax, 40(%rsp)
	xorl	%eax, %eax
	.p2align 4,,10
	.p2align 3
.L2:
	movq	%rbx, %rsi
	movq	%rbp, %rdi
	xorl	%eax, %eax
	addq	$4, %rbx
	call	__isoc99_scanf@PLT
	cmpq	%r12, %rbx
	jne	.L2
	leaq	4(%rsp), %rbx
	leaq	28(%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
	leaq	4+rot(%rip), %rax
	movl	4(%rsp), %esi
	movl	8(%rsp), %edi
	leaq	assign(%rip), %rdx
	movl	12(%rsp), %r8d
	movl	16(%rsp), %r9d
	leaq	672(%rax), %rbx
	movl	20(%rsp), %r10d
	movl	24(%rsp), %r11d
.L4:
	movslq	4(%rax), %rcx
	movl	(%rdx,%rcx,4), %ebp
	movslq	8(%rax), %rcx
	movl	(%rdx,%rcx,4), %r12d
	movslq	12(%rax), %rcx
	movl	(%rdx,%rcx,4), %r13d
	movslq	16(%rax), %rcx
	movl	(%rdx,%rcx,4), %r14d
	movslq	20(%rax), %rcx
	movl	(%rdx,%rcx,4), %r15d
	movslq	(%rax), %rcx
	cmpl	(%rdx,%rcx,4), %esi
	jne	.L5
	cmpl	%ebp, %edi
	jne	.L5
	cmpl	%r12d, %r8d
	jne	.L5
	cmpl	%r13d, %r9d
	jne	.L5
	cmpl	%r14d, %r10d
	jne	.L5
	cmpl	%r15d, %r11d
	jne	.L5
	leaq	.LC1(%rip), %rdi
	call	puts@PLT
.L6:
	movq	40(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L15
	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
.L5:
	.cfi_restore_state
	addq	$28, %rax
	cmpq	%rax, %rbx
	jne	.L4
	leaq	.LC2(%rip), %rdi
	call	puts@PLT
	jmp	.L6
.L15:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.size	main, .-main
	.globl	assign
	.bss
	.align 16
	.type	assign, @object
	.size	assign, 28
assign:
	.zero	28
	.globl	rot
	.data
	.align 32
	.type	rot, @object
	.size	rot, 672
rot:
	.long	0
	.long	1
	.long	2
	.long	3
	.long	4
	.long	5
	.long	6
	.long	0
	.long	1
	.long	3
	.long	5
	.long	2
	.long	4
	.long	6
	.long	0
	.long	1
	.long	4
	.long	2
	.long	5
	.long	3
	.long	6
	.long	0
	.long	1
	.long	5
	.long	4
	.long	3
	.long	2
	.long	6
	.long	0
	.long	2
	.long	6
	.long	3
	.long	4
	.long	1
	.long	5
	.long	0
	.long	2
	.long	3
	.long	1
	.long	6
	.long	4
	.long	5
	.long	0
	.long	2
	.long	1
	.long	4
	.long	3
	.long	6
	.long	5
	.long	0
	.long	2
	.long	4
	.long	6
	.long	1
	.long	3
	.long	5
	.long	0
	.long	3
	.long	1
	.long	2
	.long	5
	.long	6
	.long	4
	.long	0
	.long	3
	.long	2
	.long	6
	.long	1
	.long	5
	.long	4
	.long	0
	.long	3
	.long	5
	.long	1
	.long	6
	.long	2
	.long	4
	.long	0
	.long	3
	.long	6
	.long	5
	.long	2
	.long	1
	.long	4
	.long	0
	.long	4
	.long	1
	.long	5
	.long	2
	.long	6
	.long	3
	.long	0
	.long	4
	.long	2
	.long	1
	.long	6
	.long	5
	.long	3
	.long	0
	.long	4
	.long	5
	.long	6
	.long	1
	.long	2
	.long	3
	.long	0
	.long	4
	.long	6
	.long	2
	.long	5
	.long	1
	.long	3
	.long	0
	.long	5
	.long	1
	.long	3
	.long	4
	.long	6
	.long	2
	.long	0
	.long	5
	.long	3
	.long	6
	.long	1
	.long	4
	.long	2
	.long	0
	.long	5
	.long	4
	.long	1
	.long	6
	.long	3
	.long	2
	.long	0
	.long	5
	.long	6
	.long	4
	.long	3
	.long	1
	.long	2
	.long	0
	.long	6
	.long	2
	.long	4
	.long	3
	.long	5
	.long	1
	.long	0
	.long	6
	.long	3
	.long	2
	.long	5
	.long	4
	.long	1
	.long	0
	.long	6
	.long	5
	.long	3
	.long	4
	.long	2
	.long	1
	.long	0
	.long	6
	.long	4
	.long	5
	.long	2
	.long	3
	.long	1
	.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 rot[24][7] = {
	{ 0,1,2,3,4,5,6 },{ 0,1,3,5,2,4,6 },{ 0,1,4,2,5,3,6 },{ 0,1,5,4,3,2,6 },
	{ 0,2,6,3,4,1,5 },{ 0,2,3,1,6,4,5 },{ 0,2,1,4,3,6,5 },{ 0,2,4,6,1,3,5 },
	{ 0,3,1,2,5,6,4 },{ 0,3,2,6,1,5,4 },{ 0,3,5,1,6,2,4 },{ 0,3,6,5,2,1,4 },
	{ 0,4,1,5,2,6,3 },{ 0,4,2,1,6,5,3 },{ 0,4,5,6,1,2,3 },{ 0,4,6,2,5,1,3 },
	{ 0,5,1,3,4,6,2 },{ 0,5,3,6,1,4,2 },{ 0,5,4,1,6,3,2 },{ 0,5,6,4,3,1,2 },
	{ 0,6,2,4,3,5,1 },{ 0,6,3,2,5,4,1 },{ 0,6,5,3,4,2,1 },{ 0,6,4,5,2,3,1 } };
int assign[7];

int main()
{
	int i, j;
	int a[7], b[7], dice[7];

	for (i = 1; i <= 6; i++) scanf("%d", assign+i);
	for (i = 1; i <= 6; i++) scanf("%d", a+i);
	for (j = 0; j < 24; j++) {
		for (i = 1; i <= 6; i++) dice[i] = rot[j][i];
		for (i = 1; i <= 6; i++) b[i] = assign[dice[i]];
		for (i = 1; ; i++) {
			if (i > 6) { puts("Yes"); return 0; }
			if (a[i] != b[i]) break;
		}
	}
	puts("No");
	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 rot[24][7] = {
	{ 0,1,2,3,4,5,6 },{ 0,1,3,5,2,4,6 },{ 0,1,4,2,5,3,6 },{ 0,1,5,4,3,2,6 },
	{ 0,2,6,3,4,1,5 },{ 0,2,3,1,6,4,5 },{ 0,2,1,4,3,6,5 },{ 0,2,4,6,1,3,5 },
	{ 0,3,1,2,5,6,4 },{ 0,3,2,6,1,5,4 },{ 0,3,5,1,6,2,4 },{ 0,3,6,5,2,1,4 },
	{ 0,4,1,5,2,6,3 },{ 0,4,2,1,6,5,3 },{ 0,4,5,6,1,2,3 },{ 0,4,6,2,5,1,3 },
	{ 0,5,1,3,4,6,2 },{ 0,5,3,6,1,4,2 },{ 0,5,4,1,6,3,2 },{ 0,5,6,4,3,1,2 },
	{ 0,6,2,4,3,5,1 },{ 0,6,3,2,5,4,1 },{ 0,6,5,3,4,2,1 },{ 0,6,4,5,2,3,1 } };
int assign[7];

int main()
{
	int i, j;
	int a[7], b[7], dice[7];

	for (i = 1; i <= 6; i++) scanf("%d", assign+i);
	for (i = 1; i <= 6; i++) scanf("%d", a+i);
	for (j = 0; j < 24; j++) {
		for (i = 1; i <= 6; i++) dice[i] = rot[j][i];
		for (i = 1; i <= 6; i++) b[i] = assign[dice[i]];
		for (i = 1; ; i++) {
			if (i > 6) { puts("Yes"); return 0; }
			if (a[i] != b[i]) break;
		}
	}
	puts("No");
	return 0;
}

```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	rot
	.data
	.align 32
	.type	rot, @object
	.size	rot, 672
rot:
	.long	0
	.long	1
	.long	2
	.long	3
	.long	4
	.long	5
	.long	6
	.long	0
	.long	1
	.long	3
	.long	5
	.long	2
	.long	4
	.long	6
	.long	0
	.long	1
	.long	4
	.long	2
	.long	5
	.long	3
	.long	6
	.long	0
	.long	1
	.long	5
	.long	4
	.long	3
	.long	2
	.long	6
	.long	0
	.long	2
	.long	6
	.long	3
	.long	4
	.long	1
	.long	5
	.long	0
	.long	2
	.long	3
	.long	1
	.long	6
	.long	4
	.long	5
	.long	0
	.long	2
	.long	1
	.long	4
	.long	3
	.long	6
	.long	5
	.long	0
	.long	2
	.long	4
	.long	6
	.long	1
	.long	3
	.long	5
	.long	0
	.long	3
	.long	1
	.long	2
	.long	5
	.long	6
	.long	4
	.long	0
	.long	3
	.long	2
	.long	6
	.long	1
	.long	5
	.long	4
	.long	0
	.long	3
	.long	5
	.long	1
	.long	6
	.long	2
	.long	4
	.long	0
	.long	3
	.long	6
	.long	5
	.long	2
	.long	1
	.long	4
	.long	0
	.long	4
	.long	1
	.long	5
	.long	2
	.long	6
	.long	3
	.long	0
	.long	4
	.long	2
	.long	1
	.long	6
	.long	5
	.long	3
	.long	0
	.long	4
	.long	5
	.long	6
	.long	1
	.long	2
	.long	3
	.long	0
	.long	4
	.long	6
	.long	2
	.long	5
	.long	1
	.long	3
	.long	0
	.long	5
	.long	1
	.long	3
	.long	4
	.long	6
	.long	2
	.long	0
	.long	5
	.long	3
	.long	6
	.long	1
	.long	4
	.long	2
	.long	0
	.long	5
	.long	4
	.long	1
	.long	6
	.long	3
	.long	2
	.long	0
	.long	5
	.long	6
	.long	4
	.long	3
	.long	1
	.long	2
	.long	0
	.long	6
	.long	2
	.long	4
	.long	3
	.long	5
	.long	1
	.long	0
	.long	6
	.long	3
	.long	2
	.long	5
	.long	4
	.long	1
	.long	0
	.long	6
	.long	5
	.long	3
	.long	4
	.long	2
	.long	1
	.long	0
	.long	6
	.long	4
	.long	5
	.long	2
	.long	3
	.long	1
	.globl	assign
	.bss
	.align 16
	.type	assign, @object
	.size	assign, 28
assign:
	.zero	28
	.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
	addq	$-128, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$1, -120(%rbp)
	jmp	.L2
.L3:
	movl	-120(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	assign(%rip), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -120(%rbp)
.L2:
	cmpl	$6, -120(%rbp)
	jle	.L3
	movl	$1, -120(%rbp)
	jmp	.L4
.L5:
	movl	-120(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	-112(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -120(%rbp)
.L4:
	cmpl	$6, -120(%rbp)
	jle	.L5
	movl	$0, -116(%rbp)
	jmp	.L6
.L16:
	movl	$1, -120(%rbp)
	jmp	.L7
.L8:
	movl	-120(%rbp), %eax
	movslq	%eax, %rcx
	movl	-116(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$3, %rax
	subq	%rdx, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	rot(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-120(%rbp), %eax
	cltq
	movl	%edx, -48(%rbp,%rax,4)
	addl	$1, -120(%rbp)
.L7:
	cmpl	$6, -120(%rbp)
	jle	.L8
	movl	$1, -120(%rbp)
	jmp	.L9
.L10:
	movl	-120(%rbp), %eax
	cltq
	movl	-48(%rbp,%rax,4), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	assign(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-120(%rbp), %eax
	cltq
	movl	%edx, -80(%rbp,%rax,4)
	addl	$1, -120(%rbp)
.L9:
	cmpl	$6, -120(%rbp)
	jle	.L10
	movl	$1, -120(%rbp)
.L15:
	cmpl	$6, -120(%rbp)
	jle	.L11
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
	jmp	.L17
.L11:
	movl	-120(%rbp), %eax
	cltq
	movl	-112(%rbp,%rax,4), %edx
	movl	-120(%rbp), %eax
	cltq
	movl	-80(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	jne	.L20
	addl	$1, -120(%rbp)
	jmp	.L15
.L20:
	nop
	addl	$1, -116(%rbp)
.L6:
	cmpl	$23, -116(%rbp)
	jle	.L16
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
.L17:
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L18
	call	__stack_chk_fail@PLT
.L18:
	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.
val
	.file	"temp.c"
	.text
	.globl	rot
	.data
	.align 32
	.type	rot, @object
	.size	rot, 672
rot:
	.long	0
	.long	1
	.long	2
	.long	3
	.long	4
	.long	5
	.long	6
	.long	0
	.long	1
	.long	3
	.long	5
	.long	2
	.long	4
	.long	6
	.long	0
	.long	1
	.long	4
	.long	2
	.long	5
	.long	3
	.long	6
	.long	0
	.long	1
	.long	5
	.long	4
	.long	3
	.long	2
	.long	6
	.long	0
	.long	2
	.long	6
	.long	3
	.long	4
	.long	1
	.long	5
	.long	0
	.long	2
	.long	3
	.long	1
	.long	6
	.long	4
	.long	5
	.long	0
	.long	2
	.long	1
	.long	4
	.long	3
	.long	6
	.long	5
	.long	0
	.long	2
	.long	4
	.long	6
	.long	1
	.long	3
	.long	5
	.long	0
	.long	3
	.long	1
	.long	2
	.long	5
	.long	6
	.long	4
	.long	0
	.long	3
	.long	2
	.long	6
	.long	1
	.long	5
	.long	4
	.long	0
	.long	3
	.long	5
	.long	1
	.long	6
	.long	2
	.long	4
	.long	0
	.long	3
	.long	6
	.long	5
	.long	2
	.long	1
	.long	4
	.long	0
	.long	4
	.long	1
	.long	5
	.long	2
	.long	6
	.long	3
	.long	0
	.long	4
	.long	2
	.long	1
	.long	6
	.long	5
	.long	3
	.long	0
	.long	4
	.long	5
	.long	6
	.long	1
	.long	2
	.long	3
	.long	0
	.long	4
	.long	6
	.long	2
	.long	5
	.long	1
	.long	3
	.long	0
	.long	5
	.long	1
	.long	3
	.long	4
	.long	6
	.long	2
	.long	0
	.long	5
	.long	3
	.long	6
	.long	1
	.long	4
	.long	2
	.long	0
	.long	5
	.long	4
	.long	1
	.long	6
	.long	3
	.long	2
	.long	0
	.long	5
	.long	6
	.long	4
	.long	3
	.long	1
	.long	2
	.long	0
	.long	6
	.long	2
	.long	4
	.long	3
	.long	5
	.long	1
	.long	0
	.long	6
	.long	3
	.long	2
	.long	5
	.long	4
	.long	1
	.long	0
	.long	6
	.long	5
	.long	3
	.long	4
	.long	2
	.long	1
	.long	0
	.long	6
	.long	4
	.long	5
	.long	2
	.long	3
	.long	1
	.globl	assign
	.bss
	.align 16
	.type	assign, @object
	.size	assign, 28
assign:
	.zero	28
	.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
	addq	$-128, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$1, -120(%rbp)
	jmp	.L2
.L3:
	movl	-120(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	assign(%rip), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -120(%rbp)
.L2:
	cmpl	$6, -120(%rbp)
	jle	.L3
	movl	$1, -120(%rbp)
	jmp	.L4
.L5:
	movl	-120(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	-112(%rbp), %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	addl	$1, -120(%rbp)
.L4:
	cmpl	$6, -120(%rbp)
	jle	.L5
	movl	$0, -116(%rbp)
	jmp	.L6
.L16:
	movl	$1, -120(%rbp)
	jmp	.L7
.L8:
	movl	-120(%rbp), %eax
	movslq	%eax, %rcx
	movl	-116(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$3, %rax
	subq	%rdx, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,4), %rdx
	leaq	rot(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-120(%rbp), %eax
	cltq
	movl	%edx, -48(%rbp,%rax,4)
	addl	$1, -120(%rbp)
.L7:
	cmpl	$6, -120(%rbp)
	jle	.L8
	movl	$1, -120(%rbp)
	jmp	.L9
.L10:
	movl	-120(%rbp), %eax
	cltq
	movl	-48(%rbp,%rax,4), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	assign(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-120(%rbp), %eax
	cltq
	movl	%edx, -80(%rbp,%rax,4)
	addl	$1, -120(%rbp)
.L9:
	cmpl	$6, -120(%rbp)
	jle	.L10
	movl	$1, -120(%rbp)
.L15:
	cmpl	$6, -120(%rbp)
	jle	.L11
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
	jmp	.L17
.L11:
	movl	-120(%rbp), %eax
	cltq
	movl	-112(%rbp,%rax,4), %edx
	movl	-120(%rbp), %eax
	cltq
	movl	-80(%rbp,%rax,4), %eax
	cmpl	%eax, %edx
	jne	.L20
	addl	$1, -120(%rbp)
	jmp	.L15
.L20:
	nop
	addl	$1, -116(%rbp)
.L6:
	cmpl	$23, -116(%rbp)
	jle	.L16
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	movl	$0, %eax
.L17:
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L18
	call	__stack_chk_fail@PLT
.L18:
	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:
