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

```c
// AOJ 0171: Dice Puzzle
// 2017.8.17 bal4u@uu
// 2017.12.29
// ?????????????????¢??¨??????????????????????????°

#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 con[8][7][2] = {{{0}},
	{{0},{0},{0},{0},{0,3},{0},{0}},		// ?????????????????¨??¢??????
	{{0},{0},{1,5},{0},{0},{0},{0}},
	{{0},{0},{0,5},{2,4},{0},{0},{0}},
	{{0},{0},{0},{0},{0},{0},{0,1}},
	{{0},{0},{0},{0},{4,3},{0},{1,1}},
	{{0},{0},{5,5},{0},{0},{0},{2,1}},
	{{0},{0},{4,5},{6,4},{0},{0},{3,1}}};

char dice[8][8];
char kari[8][8], f[9];
char tr[128];

int rec(int n)
{
	int i, j, k, cnt;
	char tbl[7][2], c;

	if (n == 8) return 1;
	for (i = 0; i < 8; i++) {
		if (f[i]) continue;
		cnt = 0;
		for (j = 1; j <= 6; j++) if (con[n][j][1]) {
			c = tr[kari[con[n][j][0]][con[n][j][1]]];
			for (k = 1; ; k++) {
				if (k > 6) goto next;
				if (dice[i][k] == c) { tbl[cnt][0] = j, tbl[cnt++][1] = c; break; }
			}
		}

		for (j = 0; j < 24; j++) {
			for (k = 1; k <= 6; k++) kari[n][k] = dice[i][rot[j][k]];
			for (k = 0; k < cnt; k++) {
				if (kari[n][tbl[k][0]] != tbl[k][1]) break;
			}
			if (k < cnt) continue;
			f[i] = 1;
			if (rec(n+1)) return 1;
			f[i] = 0;
		}
		next:;
	}
	return 0;
}

int main()
{
	int i, j, k;
	char buf[10];

	for (i = 0; i < 26; i++) tr['a'+i] = 'A'+i, tr['A'+i] = 'a'+i;

	while (1) {
		for (i = 0; i < 8; i++) {
			fgets(buf, 10, stdin);
			if (*buf == '0') return 0;
			for (j = 0; j < 6; j++) dice[i][j+1] = buf[j];
			f[i] = 0;
		}
		for (i = 0; ; i++) {
			if (i == 7) { puts("NO"); break; }
			f[i] = 1;
			for (j = 0; j < 24; j++) {
				for (k = 1; k <= 6; k++) kari[0][k] = dice[i][rot[j][k]];
				if (rec(1)) { puts("YES"); goto next; }
			}
			f[i] = 0;
		}
		next:;
	}
	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	con
	.align 32
	.type	con, @object
	.size	con, 448
con:
	.long	0
	.zero	4
	.zero	48
	.long	0
	.zero	4
	.long	0
	.zero	4
	.long	0
	.zero	4
	.long	0
	.zero	4
	.long	0
	.long	3
	.long	0
	.zero	4
	.long	0
	.zero	4
	.long	0
	.zero	4
	.long	0
	.zero	4
	.long	1
	.long	5
	.long	0
	.zero	4
	.long	0
	.zero	4
	.long	0
	.zero	4
	.long	0
	.zero	4
	.long	0
	.zero	4
	.long	0
	.zero	4
	.long	0
	.long	5
	.long	2
	.long	4
	.long	0
	.zero	4
	.long	0
	.zero	4
	.long	0
	.zero	4
	.long	0
	.zero	4
	.long	0
	.zero	4
	.long	0
	.zero	4
	.long	0
	.zero	4
	.long	0
	.zero	4
	.long	0
	.zero	4
	.long	0
	.long	1
	.long	0
	.zero	4
	.long	0
	.zero	4
	.long	0
	.zero	4
	.long	0
	.zero	4
	.long	4
	.long	3
	.long	0
	.zero	4
	.long	1
	.long	1
	.long	0
	.zero	4
	.long	0
	.zero	4
	.long	5
	.long	5
	.long	0
	.zero	4
	.long	0
	.zero	4
	.long	0
	.zero	4
	.long	2
	.long	1
	.long	0
	.zero	4
	.long	0
	.zero	4
	.long	4
	.long	5
	.long	6
	.long	4
	.long	0
	.zero	4
	.long	0
	.zero	4
	.long	3
	.long	1
	.globl	dice
	.bss
	.align 32
	.type	dice, @object
	.size	dice, 64
dice:
	.zero	64
	.globl	kari
	.align 32
	.type	kari, @object
	.size	kari, 64
kari:
	.zero	64
	.globl	f
	.align 8
	.type	f, @object
	.size	f, 9
f:
	.zero	9
	.globl	tr
	.align 32
	.type	tr, @object
	.size	tr, 128
tr:
	.zero	128
	.text
	.globl	rec
	.type	rec, @function
rec:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$64, %rsp
	movl	%edi, -52(%rbp)
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	cmpl	$8, -52(%rbp)
	jne	.L2
	movl	$1, %eax
	jmp	.L26
.L2:
	movl	$0, -40(%rbp)
	jmp	.L4
.L25:
	movl	-40(%rbp), %eax
	cltq
	leaq	f(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	testb	%al, %al
	jne	.L28
	movl	$0, -28(%rbp)
	movl	$1, -36(%rbp)
	jmp	.L7
.L13:
	movl	-36(%rbp), %eax
	movslq	%eax, %rcx
	movl	-52(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$3, %rax
	subq	%rdx, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	4+con(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	je	.L8
	movl	-36(%rbp), %eax
	movslq	%eax, %rcx
	movl	-52(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$3, %rax
	subq	%rdx, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	con(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	-36(%rbp), %eax
	movslq	%eax, %rsi
	movl	-52(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$3, %rax
	subq	%rdx, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,8), %rdx
	leaq	4+con(%rip), %rax
	movl	(%rdx,%rax), %eax
	movslq	%eax, %rdx
	movslq	%ecx, %rax
	salq	$3, %rax
	addq	%rax, %rdx
	leaq	kari(%rip), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	movsbl	%al, %eax
	cltq
	leaq	tr(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	movb	%al, -41(%rbp)
	movl	$1, -32(%rbp)
.L12:
	cmpl	$6, -32(%rbp)
	jg	.L29
	movl	-32(%rbp), %eax
	movslq	%eax, %rdx
	movl	-40(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rax, %rdx
	leaq	dice(%rip), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	cmpb	%al, -41(%rbp)
	jne	.L11
	movl	-36(%rbp), %eax
	movl	%eax, %edx
	movl	-28(%rbp), %eax
	cltq
	movb	%dl, -22(%rbp,%rax,2)
	movl	-28(%rbp), %eax
	leal	1(%rax), %edx
	movl	%edx, -28(%rbp)
	cltq
	movzbl	-41(%rbp), %edx
	movb	%dl, -21(%rbp,%rax,2)
	jmp	.L8
.L11:
	addl	$1, -32(%rbp)
	jmp	.L12
.L8:
	addl	$1, -36(%rbp)
.L7:
	cmpl	$6, -36(%rbp)
	jle	.L13
	movl	$0, -36(%rbp)
	jmp	.L14
.L24:
	movl	$1, -32(%rbp)
	jmp	.L15
.L16:
	movl	-32(%rbp), %eax
	movslq	%eax, %rcx
	movl	-36(%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), %eax
	movslq	%eax, %rdx
	movl	-40(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rax, %rdx
	leaq	dice(%rip), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	movl	-32(%rbp), %edx
	movslq	%edx, %rcx
	movl	-52(%rbp), %edx
	movslq	%edx, %rdx
	salq	$3, %rdx
	addq	%rdx, %rcx
	leaq	kari(%rip), %rdx
	addq	%rcx, %rdx
	movb	%al, (%rdx)
	addl	$1, -32(%rbp)
.L15:
	cmpl	$6, -32(%rbp)
	jle	.L16
	movl	$0, -32(%rbp)
	jmp	.L17
.L20:
	movl	-32(%rbp), %eax
	cltq
	movzbl	-22(%rbp,%rax,2), %eax
	movsbl	%al, %eax
	movslq	%eax, %rdx
	movl	-52(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rax, %rdx
	leaq	kari(%rip), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %edx
	movl	-32(%rbp), %eax
	cltq
	movzbl	-21(%rbp,%rax,2), %eax
	cmpb	%al, %dl
	jne	.L30
	addl	$1, -32(%rbp)
.L17:
	movl	-32(%rbp), %eax
	cmpl	-28(%rbp), %eax
	jl	.L20
	jmp	.L19
.L30:
	nop
.L19:
	movl	-32(%rbp), %eax
	cmpl	-28(%rbp), %eax
	jl	.L31
	movl	-40(%rbp), %eax
	cltq
	leaq	f(%rip), %rdx
	movb	$1, (%rax,%rdx)
	movl	-52(%rbp), %eax
	addl	$1, %eax
	movl	%eax, %edi
	call	rec
	testl	%eax, %eax
	je	.L23
	movl	$1, %eax
	jmp	.L26
.L23:
	movl	-40(%rbp), %eax
	cltq
	leaq	f(%rip), %rdx
	movb	$0, (%rax,%rdx)
	jmp	.L22
.L31:
	nop
.L22:
	addl	$1, -36(%rbp)
.L14:
	cmpl	$23, -36(%rbp)
	jle	.L24
	jmp	.L6
.L10:
.L28:
	nop
	jmp	.L6
.L29:
	nop
.L6:
	addl	$1, -40(%rbp)
.L4:
	cmpl	$7, -40(%rbp)
	jle	.L25
	movl	$0, %eax
.L26:
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L27
	call	__stack_chk_fail@PLT
.L27:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	rec, .-rec
	.section	.rodata
.LC0:
	.string	"NO"
.LC1:
	.string	"YES"
	.text
	.globl	main
	.type	main, @function
main:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -32(%rbp)
	jmp	.L33
.L34:
	movl	-32(%rbp), %eax
	leal	65(%rax), %edx
	movl	-32(%rbp), %eax
	addl	$97, %eax
	movl	%edx, %ecx
	cltq
	leaq	tr(%rip), %rdx
	movb	%cl, (%rax,%rdx)
	movl	-32(%rbp), %eax
	leal	97(%rax), %edx
	movl	-32(%rbp), %eax
	addl	$65, %eax
	movl	%edx, %ecx
	cltq
	leaq	tr(%rip), %rdx
	movb	%cl, (%rax,%rdx)
	addl	$1, -32(%rbp)
.L33:
	cmpl	$25, -32(%rbp)
	jle	.L34
.L49:
	movl	$0, -32(%rbp)
	jmp	.L35
.L40:
	movq	stdin(%rip), %rdx
	leaq	-18(%rbp), %rax
	movl	$10, %esi
	movq	%rax, %rdi
	call	fgets@PLT
	movzbl	-18(%rbp), %eax
	cmpb	$48, %al
	jne	.L36
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L50
	jmp	.L51
.L36:
	movl	$0, -28(%rbp)
	jmp	.L38
.L39:
	movl	-28(%rbp), %eax
	leal	1(%rax), %edx
	movl	-28(%rbp), %eax
	cltq
	movzbl	-18(%rbp,%rax), %eax
	movslq	%edx, %rcx
	movl	-32(%rbp), %edx
	movslq	%edx, %rdx
	salq	$3, %rdx
	addq	%rdx, %rcx
	leaq	dice(%rip), %rdx
	addq	%rcx, %rdx
	movb	%al, (%rdx)
	addl	$1, -28(%rbp)
.L38:
	cmpl	$5, -28(%rbp)
	jle	.L39
	movl	-32(%rbp), %eax
	cltq
	leaq	f(%rip), %rdx
	movb	$0, (%rax,%rdx)
	addl	$1, -32(%rbp)
.L35:
	cmpl	$7, -32(%rbp)
	jle	.L40
	movl	$0, -32(%rbp)
.L48:
	cmpl	$7, -32(%rbp)
	jne	.L41
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L42
.L41:
	movl	-32(%rbp), %eax
	cltq
	leaq	f(%rip), %rdx
	movb	$1, (%rax,%rdx)
	movl	$0, -28(%rbp)
	jmp	.L43
.L47:
	movl	$1, -24(%rbp)
	jmp	.L44
.L45:
	movl	-24(%rbp), %eax
	movslq	%eax, %rcx
	movl	-28(%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), %eax
	movslq	%eax, %rdx
	movl	-32(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rax, %rdx
	leaq	dice(%rip), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %edx
	movl	-24(%rbp), %eax
	cltq
	leaq	kari(%rip), %rcx
	movb	%dl, (%rax,%rcx)
	addl	$1, -24(%rbp)
.L44:
	cmpl	$6, -24(%rbp)
	jle	.L45
	movl	$1, %edi
	call	rec
	testl	%eax, %eax
	je	.L46
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L42
.L46:
	addl	$1, -28(%rbp)
.L43:
	cmpl	$23, -28(%rbp)
	jle	.L47
	movl	-32(%rbp), %eax
	cltq
	leaq	f(%rip), %rdx
	movb	$0, (%rax,%rdx)
	addl	$1, -32(%rbp)
	jmp	.L48
.L42:
	jmp	.L49
.L51:
	call	__stack_chk_fail@PLT
.L50:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.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
	.p2align 4
	.type	rec.part.0, @function
rec.part.0:
.LFB25:
	.cfi_startproc
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leal	1(%rdi), %r11d
	leaq	f(%rip), %rcx
	xorl	%r8d, %r8d
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	leaq	1+dice(%rip), %rsi
	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
	movslq	%edi, %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$88, %rsp
	.cfi_def_cfa_offset 144
	movq	%fs:40, %rax
	movq	%rax, 72(%rsp)
	xorl	%eax, %eax
	leaq	0(,%rbp,8), %rax
	movq	%rax, %r9
	movq	%rax, 40(%rsp)
	subq	%rbp, %r9
	leaq	0(,%r9,8), %r15
	jmp	.L26
	.p2align 4,,10
	.p2align 3
.L2:
	addl	$1, %r8d
	addq	$1, %rcx
	addq	$8, %rsi
	cmpl	$8, %r8d
	je	.L67
.L26:
	cmpb	$0, (%rcx)
	jne	.L2
	leaq	con(%rip), %rax
	leaq	kari(%rip), %r12
	leaq	(%rax,%r15), %rdx
	movslq	12(%rdx), %r14
	testl	%r14d, %r14d
	jne	.L68
	leaq	(%rax,%r15), %rdi
	movslq	20(%rdi), %rdx
	testl	%edx, %edx
	jne	.L69
.L6:
	leaq	(%rax,%r15), %rdi
	movslq	28(%rdi), %rdx
	testl	%edx, %edx
	jne	.L70
.L9:
	leaq	(%rax,%r15), %rdi
	movslq	36(%rdi), %rdx
	testl	%edx, %edx
	jne	.L71
.L12:
	leaq	(%rax,%r15), %rdi
	movslq	44(%rdi), %rdx
	testl	%edx, %edx
	jne	.L72
.L15:
	addq	%r15, %rax
	movslq	52(%rax), %rdx
	testl	%edx, %edx
	jne	.L73
.L18:
	movslq	%r8d, %rax
	leaq	dice(%rip), %rdx
	leaq	4+rot(%rip), %rbx
	leaq	(%rdx,%rax,8), %r13
	movq	40(%rsp), %rax
	leaq	672(%rbx), %r10
	leaq	(%r12,%rax), %rdx
	jmp	.L21
	.p2align 4,,10
	.p2align 3
.L64:
	movl	%r11d, %edi
	movq	%rdx, 32(%rsp)
	movq	%rcx, 24(%rsp)
	movq	%rsi, 16(%rsp)
	movl	%r8d, 12(%rsp)
	movl	%r11d, 8(%rsp)
	call	rec.part.0
	testl	%eax, %eax
	jne	.L24
	movq	24(%rsp), %rcx
	movq	32(%rsp), %rdx
	leaq	676+rot(%rip), %r10
	movq	16(%rsp), %rsi
	movl	12(%rsp), %r8d
	movb	$0, (%rcx)
	movl	8(%rsp), %r11d
.L22:
	addq	$28, %rbx
	cmpq	%rbx, %r10
	je	.L2
.L21:
	movslq	(%rbx), %rax
	movzbl	0(%r13,%rax), %eax
	movb	%al, 1(%r12,%rbp,8)
	movslq	4(%rbx), %rax
	movzbl	0(%r13,%rax), %eax
	movb	%al, 2(%r12,%rbp,8)
	movslq	8(%rbx), %rax
	movzbl	0(%r13,%rax), %eax
	movb	%al, 3(%r12,%rbp,8)
	movslq	12(%rbx), %rax
	movzbl	0(%r13,%rax), %eax
	movb	%al, 4(%r12,%rbp,8)
	movslq	16(%rbx), %rax
	movzbl	0(%r13,%rax), %eax
	movb	%al, 5(%r12,%rbp,8)
	movslq	20(%rbx), %rax
	movzbl	0(%r13,%rax), %eax
	movb	%al, 6(%r12,%rbp,8)
	testl	%r14d, %r14d
	je	.L23
	movsbq	58(%rsp), %rax
	movzbl	(%rdx,%rax), %eax
	cmpb	%al, 59(%rsp)
	jne	.L22
	cmpl	$1, %r14d
	je	.L23
	movsbq	60(%rsp), %rax
	movzbl	(%rdx,%rax), %eax
	cmpb	%al, 61(%rsp)
	jne	.L22
	cmpl	$2, %r14d
	je	.L23
	movsbq	62(%rsp), %rax
	movzbl	(%rdx,%rax), %eax
	cmpb	%al, 63(%rsp)
	jne	.L22
	cmpl	$3, %r14d
	je	.L23
	movsbq	64(%rsp), %rax
	movzbl	(%rdx,%rax), %eax
	cmpb	%al, 65(%rsp)
	jne	.L22
	cmpl	$4, %r14d
	je	.L23
	movsbq	66(%rsp), %rax
	movzbl	(%rdx,%rax), %eax
	cmpb	%al, 67(%rsp)
	jne	.L22
	cmpl	$6, %r14d
	jne	.L23
	movsbq	68(%rsp), %rax
	movzbl	69(%rsp), %edi
	cmpb	%dil, (%rdx,%rax)
	jne	.L22
.L23:
	movb	$1, (%rcx)
	cmpl	$8, %r11d
	jne	.L64
.L24:
	movl	$1, %eax
.L1:
	movq	72(%rsp), %rdx
	subq	%fs:40, %rdx
	jne	.L74
	addq	$88, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	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
.L67:
	.cfi_restore_state
	xorl	%eax, %eax
	jmp	.L1
.L68:
	movslq	8(%rdx), %rdx
	leaq	tr(%rip), %rdi
	leaq	(%r12,%rdx,8), %rdx
	movsbq	(%rdx,%r14), %rdx
	movzbl	(%rdi,%rdx), %edx
	cmpb	(%rsi), %dl
	je	.L5
	cmpb	1(%rsi), %dl
	je	.L5
	cmpb	2(%rsi), %dl
	je	.L5
	cmpb	3(%rsi), %dl
	je	.L5
	cmpb	4(%rsi), %dl
	je	.L5
	cmpb	5(%rsi), %dl
	jne	.L2
.L5:
	leaq	(%rax,%r15), %rdi
	movb	%dl, 59(%rsp)
	movl	$1, %r14d
	movslq	20(%rdi), %rdx
	movb	$1, 58(%rsp)
	testl	%edx, %edx
	je	.L6
.L69:
	movslq	16(%rdi), %rdi
	leaq	(%r12,%rdi,8), %rdi
	movsbq	(%rdi,%rdx), %rdx
	leaq	tr(%rip), %rdi
	movzbl	(%rdi,%rdx), %edx
	cmpb	(%rsi), %dl
	je	.L8
	cmpb	1(%rsi), %dl
	je	.L8
	cmpb	2(%rsi), %dl
	je	.L8
	cmpb	3(%rsi), %dl
	je	.L8
	cmpb	4(%rsi), %dl
	je	.L8
	cmpb	5(%rsi), %dl
	jne	.L2
.L8:
	movslq	%r14d, %rdi
	addl	$1, %r14d
	movb	%dl, 59(%rsp,%rdi,2)
	movb	$2, 58(%rsp,%rdi,2)
	leaq	(%rax,%r15), %rdi
	movslq	28(%rdi), %rdx
	testl	%edx, %edx
	je	.L9
.L70:
	movslq	24(%rdi), %rdi
	leaq	(%r12,%rdi,8), %rdi
	movsbq	(%rdi,%rdx), %rdx
	leaq	tr(%rip), %rdi
	movzbl	(%rdi,%rdx), %edx
	cmpb	(%rsi), %dl
	je	.L11
	cmpb	1(%rsi), %dl
	je	.L11
	cmpb	2(%rsi), %dl
	je	.L11
	cmpb	3(%rsi), %dl
	je	.L11
	cmpb	4(%rsi), %dl
	je	.L11
	cmpb	5(%rsi), %dl
	jne	.L2
.L11:
	movslq	%r14d, %rdi
	addl	$1, %r14d
	movb	$3, 58(%rsp,%rdi,2)
	movb	%dl, 59(%rsp,%rdi,2)
	jmp	.L9
.L71:
	movslq	32(%rdi), %rdi
	leaq	(%r12,%rdi,8), %rdi
	movsbq	(%rdi,%rdx), %rdx
	leaq	tr(%rip), %rdi
	movzbl	(%rdi,%rdx), %edx
	cmpb	(%rsi), %dl
	je	.L14
	cmpb	1(%rsi), %dl
	je	.L14
	cmpb	2(%rsi), %dl
	je	.L14
	cmpb	3(%rsi), %dl
	je	.L14
	cmpb	4(%rsi), %dl
	je	.L14
	cmpb	5(%rsi), %dl
	jne	.L2
.L14:
	movslq	%r14d, %rdi
	addl	$1, %r14d
	movb	$4, 58(%rsp,%rdi,2)
	movb	%dl, 59(%rsp,%rdi,2)
	jmp	.L12
.L72:
	movslq	40(%rdi), %rdi
	leaq	(%r12,%rdi,8), %rdi
	movsbq	(%rdi,%rdx), %rdx
	leaq	tr(%rip), %rdi
	movzbl	(%rdi,%rdx), %edx
	cmpb	(%rsi), %dl
	je	.L17
	cmpb	1(%rsi), %dl
	je	.L17
	cmpb	2(%rsi), %dl
	je	.L17
	cmpb	3(%rsi), %dl
	je	.L17
	cmpb	4(%rsi), %dl
	je	.L17
	cmpb	5(%rsi), %dl
	jne	.L2
.L17:
	movslq	%r14d, %rdi
	addl	$1, %r14d
	movb	$5, 58(%rsp,%rdi,2)
	movb	%dl, 59(%rsp,%rdi,2)
	jmp	.L15
.L73:
	movslq	48(%rax), %rax
	leaq	(%r12,%rax,8), %rax
	movsbq	(%rax,%rdx), %rax
	leaq	tr(%rip), %rdx
	movzbl	(%rdx,%rax), %eax
	cmpb	(%rsi), %al
	je	.L20
	cmpb	1(%rsi), %al
	je	.L20
	cmpb	2(%rsi), %al
	je	.L20
	cmpb	3(%rsi), %al
	je	.L20
	cmpb	4(%rsi), %al
	je	.L20
	cmpb	5(%rsi), %al
	jne	.L2
.L20:
	movslq	%r14d, %rdx
	addl	$1, %r14d
	movb	$6, 58(%rsp,%rdx,2)
	movb	%al, 59(%rsp,%rdx,2)
	jmp	.L18
.L74:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE25:
	.size	rec.part.0, .-rec.part.0
	.p2align 4
	.globl	rec
	.type	rec, @function
rec:
.LFB23:
	.cfi_startproc
	endbr64
	cmpl	$8, %edi
	je	.L76
	jmp	rec.part.0
.L76:
	movl	$1, %eax
	ret
	.cfi_endproc
.LFE23:
	.size	rec, .-rec
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC4:
	.string	"NO"
.LC5:
	.string	"YES"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB24:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movl	$31353, %edx
	leaq	kari(%rip), %r15
	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
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$88, %rsp
	.cfi_def_cfa_offset 144
	movdqa	.LC0(%rip), %xmm0
	movq	%fs:40, %rax
	movq	%rax, 72(%rsp)
	xorl	%eax, %eax
	movq	.LC1(%rip), %rax
	movw	%dx, 89+tr(%rip)
	movups	%xmm0, 97+tr(%rip)
	movdqa	.LC2(%rip), %xmm0
	movq	%rax, 113+tr(%rip)
	movl	$23129, %eax
	movw	%ax, 121+tr(%rip)
	movq	.LC3(%rip), %rax
	movups	%xmm0, 65+tr(%rip)
	movq	%rax, 81+tr(%rip)
	leaq	62(%rsp), %rax
	movq	%rax, 40(%rsp)
.L78:
	movq	40(%rsp), %r12
	leaq	f(%rip), %rbp
	leaq	1+dice(%rip), %rbx
.L80:
	movq	stdin(%rip), %rdx
	movl	$10, %esi
	movq	%r12, %rdi
	call	fgets@PLT
	movzbl	62(%rsp), %eax
	cmpb	$48, %al
	je	.L79
	movb	%al, (%rbx)
	movzbl	63(%rsp), %eax
	addq	$8, %rbx
	addq	$1, %rbp
	movb	$0, -1(%rbp)
	movb	%al, -7(%rbx)
	movzbl	64(%rsp), %eax
	movb	%al, -6(%rbx)
	movzbl	65(%rsp), %eax
	movb	%al, -5(%rbx)
	movzbl	66(%rsp), %eax
	movb	%al, -4(%rbx)
	movzbl	67(%rsp), %eax
	movb	%al, -3(%rbx)
	leaq	65+dice(%rip), %rax
	cmpq	%rax, %rbx
	jne	.L80
	movq	$0, 32(%rsp)
	leaq	-65(%rax), %r12
	leaq	f(%rip), %rax
	addq	$8, %rax
	movq	%rax, 8(%rsp)
.L81:
	movq	32(%rsp), %rax
	leaq	f(%rip), %rcx
	movb	$1, (%rcx,%rax)
	leaq	4+rot(%rip), %rcx
	cltq
	movq	%rcx, 16(%rsp)
	movq	%rax, 24(%rsp)
	.p2align 4,,10
	.p2align 3
.L83:
	movq	16(%rsp), %rsi
	movq	24(%rsp), %rax
	leaq	1+dice(%rip), %r13
	leaq	f(%rip), %r14
	movslq	(%rsi), %rdx
	leaq	(%r12,%rax,8), %rax
	movzbl	(%rax,%rdx), %edx
	movb	%dl, 1+kari(%rip)
	movslq	4(%rsi), %rdx
	movzbl	(%rax,%rdx), %edx
	movb	%dl, 2+kari(%rip)
	movslq	8(%rsi), %rdx
	movzbl	(%rax,%rdx), %edx
	movb	%dl, 3+kari(%rip)
	movslq	12(%rsi), %rdx
	movzbl	(%rax,%rdx), %edx
	movb	%dl, 4+kari(%rip)
	movslq	16(%rsi), %rdx
	movzbl	(%rax,%rdx), %edx
	movb	%dl, 5+kari(%rip)
	movslq	20(%rsi), %rdx
	movzbl	(%rax,%rdx), %eax
	movb	%al, 6+kari(%rip)
	jmp	.L107
	.p2align 4,,10
	.p2align 3
.L84:
	addq	$1, %r14
	addq	$8, %r13
	cmpq	8(%rsp), %r14
	je	.L153
.L107:
	leaq	f(%rip), %rax
	movq	%rax, (%rsp)
	movl	%r14d, %eax
	subl	(%rsp), %eax
	cmpb	$0, (%r14)
	jne	.L84
	movslq	68+con(%rip), %rbp
	testl	%ebp, %ebp
	jne	.L154
	movslq	76+con(%rip), %rcx
	testl	%ecx, %ecx
	jne	.L155
.L88:
	movslq	84+con(%rip), %rcx
	testl	%ecx, %ecx
	jne	.L156
.L91:
	movslq	92+con(%rip), %rcx
	testl	%ecx, %ecx
	jne	.L157
.L94:
	movslq	100+con(%rip), %rcx
	testl	%ecx, %ecx
	jne	.L158
.L97:
	movslq	108+con(%rip), %rcx
	testl	%ecx, %ecx
	jne	.L159
.L100:
	cltq
	movq	%r13, (%rsp)
	leaq	4+rot(%rip), %rbx
	movq	%r14, %r13
	leaq	0(,%rax,8), %rsi
	movq	%rsi, %r14
	jmp	.L103
	.p2align 4,,10
	.p2align 3
.L150:
	movb	$0, 0(%r13)
.L104:
	addq	$28, %rbx
	leaq	676+rot(%rip), %rax
	cmpq	%rbx, %rax
	je	.L151
.L103:
	movslq	(%rbx), %rdx
	leaq	(%r12,%r14), %rax
	movzbl	(%rax,%rdx), %edx
	movb	%dl, 9+kari(%rip)
	movslq	4(%rbx), %rdx
	movzbl	(%rax,%rdx), %edx
	movb	%dl, 10+kari(%rip)
	movslq	8(%rbx), %rdx
	movzbl	(%rax,%rdx), %edx
	movb	%dl, 11+kari(%rip)
	movslq	12(%rbx), %rdx
	movzbl	(%rax,%rdx), %edx
	movb	%dl, 12+kari(%rip)
	movslq	16(%rbx), %rdx
	movzbl	(%rax,%rdx), %edx
	movb	%dl, 13+kari(%rip)
	movslq	20(%rbx), %rdx
	movzbl	(%rax,%rdx), %eax
	movb	%al, 14+kari(%rip)
	testl	%ebp, %ebp
	je	.L105
	movsbq	48(%rsp), %rax
	movzbl	49(%rsp), %edi
	cmpb	%dil, 8(%r15,%rax)
	jne	.L104
	cmpl	$1, %ebp
	je	.L105
	movsbq	50(%rsp), %rax
	movzbl	51(%rsp), %esi
	cmpb	%sil, 8(%r15,%rax)
	jne	.L104
	cmpl	$2, %ebp
	je	.L105
	movsbq	52(%rsp), %rax
	movzbl	8(%r15,%rax), %eax
	cmpb	%al, 53(%rsp)
	jne	.L104
	cmpl	$3, %ebp
	je	.L105
	movsbq	54(%rsp), %rax
	movzbl	8(%r15,%rax), %eax
	cmpb	%al, 55(%rsp)
	jne	.L104
	cmpl	$4, %ebp
	je	.L105
	movsbq	56(%rsp), %rax
	movzbl	8(%r15,%rax), %eax
	cmpb	%al, 57(%rsp)
	jne	.L104
	cmpl	$6, %ebp
	jne	.L105
	movsbq	58(%rsp), %rax
	movzbl	59(%rsp), %edi
	cmpb	%dil, 8(%r15,%rax)
	jne	.L104
.L105:
	movb	$1, 0(%r13)
	movl	$2, %edi
	call	rec.part.0
	testl	%eax, %eax
	je	.L150
	leaq	.LC5(%rip), %rdi
	call	puts@PLT
	jmp	.L78
.L153:
	addq	$28, 16(%rsp)
	movq	16(%rsp), %rax
	leaq	676+rot(%rip), %rdi
	cmpq	%rdi, %rax
	jne	.L83
	movq	32(%rsp), %rax
	leaq	f(%rip), %rcx
	movb	$0, (%rcx,%rax)
	addq	$1, %rax
	movq	%rax, 32(%rsp)
	cmpq	$7, %rax
	jne	.L81
	leaq	.LC4(%rip), %rdi
	call	puts@PLT
	jmp	.L78
	.p2align 4,,10
	.p2align 3
.L154:
	movslq	64+con(%rip), %rcx
	leaq	tr(%rip), %rdi
	leaq	(%r15,%rcx,8), %rcx
	movsbq	(%rcx,%rbp), %rcx
	movzbl	(%rdi,%rcx), %ecx
	cmpb	0(%r13), %cl
	je	.L87
	cmpb	1(%r13), %cl
	je	.L87
	cmpb	2(%r13), %cl
	je	.L87
	cmpb	3(%r13), %cl
	je	.L87
	cmpb	4(%r13), %cl
	je	.L87
	cmpb	5(%r13), %cl
	jne	.L84
.L87:
	movb	%cl, 49(%rsp)
	movslq	76+con(%rip), %rcx
	movl	$1, %ebp
	movb	$1, 48(%rsp)
	testl	%ecx, %ecx
	je	.L88
.L155:
	movslq	72+con(%rip), %rsi
	leaq	tr(%rip), %rdi
	leaq	(%r15,%rsi,8), %rsi
	movsbq	(%rsi,%rcx), %rcx
	movzbl	(%rdi,%rcx), %ecx
	cmpb	0(%r13), %cl
	je	.L90
	cmpb	1(%r13), %cl
	je	.L90
	cmpb	2(%r13), %cl
	je	.L90
	cmpb	3(%r13), %cl
	je	.L90
	cmpb	4(%r13), %cl
	je	.L90
	cmpb	5(%r13), %cl
	jne	.L84
.L90:
	movslq	%ebp, %rsi
	addl	$1, %ebp
	movb	%cl, 49(%rsp,%rsi,2)
	movslq	84+con(%rip), %rcx
	movb	$2, 48(%rsp,%rsi,2)
	testl	%ecx, %ecx
	je	.L91
.L156:
	movslq	80+con(%rip), %rsi
	leaq	tr(%rip), %rdi
	leaq	(%r15,%rsi,8), %rsi
	movsbq	(%rsi,%rcx), %rcx
	movzbl	(%rdi,%rcx), %ecx
	cmpb	0(%r13), %cl
	je	.L93
	cmpb	1(%r13), %cl
	je	.L93
	cmpb	2(%r13), %cl
	je	.L93
	cmpb	3(%r13), %cl
	je	.L93
	cmpb	4(%r13), %cl
	je	.L93
	cmpb	5(%r13), %cl
	jne	.L84
.L93:
	movslq	%ebp, %rsi
	addl	$1, %ebp
	movb	%cl, 49(%rsp,%rsi,2)
	movslq	92+con(%rip), %rcx
	movb	$3, 48(%rsp,%rsi,2)
	testl	%ecx, %ecx
	je	.L94
.L157:
	movslq	88+con(%rip), %rsi
	leaq	tr(%rip), %rdi
	leaq	(%r15,%rsi,8), %rsi
	movsbq	(%rsi,%rcx), %rcx
	movzbl	(%rdi,%rcx), %ecx
	cmpb	0(%r13), %cl
	je	.L96
	cmpb	1(%r13), %cl
	je	.L96
	cmpb	2(%r13), %cl
	je	.L96
	cmpb	3(%r13), %cl
	je	.L96
	cmpb	4(%r13), %cl
	je	.L96
	cmpb	5(%r13), %cl
	jne	.L84
.L96:
	movslq	%ebp, %rsi
	addl	$1, %ebp
	movb	%cl, 49(%rsp,%rsi,2)
	movslq	100+con(%rip), %rcx
	movb	$4, 48(%rsp,%rsi,2)
	testl	%ecx, %ecx
	je	.L97
.L158:
	movslq	96+con(%rip), %rsi
	leaq	tr(%rip), %rdi
	leaq	(%r15,%rsi,8), %rsi
	movsbq	(%rsi,%rcx), %rcx
	movzbl	(%rdi,%rcx), %ecx
	cmpb	0(%r13), %cl
	je	.L99
	cmpb	1(%r13), %cl
	je	.L99
	cmpb	2(%r13), %cl
	je	.L99
	cmpb	3(%r13), %cl
	je	.L99
	cmpb	4(%r13), %cl
	je	.L99
	cmpb	5(%r13), %cl
	jne	.L84
.L99:
	movslq	%ebp, %rsi
	addl	$1, %ebp
	movb	%cl, 49(%rsp,%rsi,2)
	movslq	108+con(%rip), %rcx
	movb	$5, 48(%rsp,%rsi,2)
	testl	%ecx, %ecx
	je	.L100
.L159:
	movslq	104+con(%rip), %rsi
	leaq	tr(%rip), %rdi
	leaq	(%r15,%rsi,8), %rsi
	movsbq	(%rsi,%rcx), %rcx
	movzbl	(%rdi,%rcx), %ecx
	cmpb	0(%r13), %cl
	je	.L102
	cmpb	1(%r13), %cl
	je	.L102
	cmpb	2(%r13), %cl
	je	.L102
	cmpb	3(%r13), %cl
	je	.L102
	cmpb	4(%r13), %cl
	je	.L102
	cmpb	5(%r13), %cl
	jne	.L84
.L102:
	movslq	%ebp, %rsi
	addl	$1, %ebp
	movb	$6, 48(%rsp,%rsi,2)
	movb	%cl, 49(%rsp,%rsi,2)
	jmp	.L100
.L151:
	movq	%r13, %r14
	movq	(%rsp), %r13
	jmp	.L84
.L79:
	movq	72(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L160
	addq	$88, %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
.L160:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE24:
	.size	main, .-main
	.globl	tr
	.bss
	.align 32
	.type	tr, @object
	.size	tr, 128
tr:
	.zero	128
	.globl	f
	.align 8
	.type	f, @object
	.size	f, 9
f:
	.zero	9
	.globl	kari
	.align 32
	.type	kari, @object
	.size	kari, 64
kari:
	.zero	64
	.globl	dice
	.align 32
	.type	dice, @object
	.size	dice, 64
dice:
	.zero	64
	.globl	con
	.data
	.align 32
	.type	con, @object
	.size	con, 448
con:
	.long	0
	.zero	4
	.zero	48
	.long	0
	.zero	4
	.long	0
	.zero	4
	.long	0
	.zero	4
	.long	0
	.zero	4
	.long	0
	.long	3
	.long	0
	.zero	4
	.long	0
	.zero	4
	.long	0
	.zero	4
	.long	0
	.zero	4
	.long	1
	.long	5
	.long	0
	.zero	4
	.long	0
	.zero	4
	.long	0
	.zero	4
	.long	0
	.zero	4
	.long	0
	.zero	4
	.long	0
	.zero	4
	.long	0
	.long	5
	.long	2
	.long	4
	.long	0
	.zero	4
	.long	0
	.zero	4
	.long	0
	.zero	4
	.long	0
	.zero	4
	.long	0
	.zero	4
	.long	0
	.zero	4
	.long	0
	.zero	4
	.long	0
	.zero	4
	.long	0
	.zero	4
	.long	0
	.long	1
	.long	0
	.zero	4
	.long	0
	.zero	4
	.long	0
	.zero	4
	.long	0
	.zero	4
	.long	4
	.long	3
	.long	0
	.zero	4
	.long	1
	.long	1
	.long	0
	.zero	4
	.long	0
	.zero	4
	.long	5
	.long	5
	.long	0
	.zero	4
	.long	0
	.zero	4
	.long	0
	.zero	4
	.long	2
	.long	1
	.long	0
	.zero	4
	.long	0
	.zero	4
	.long	4
	.long	5
	.long	6
	.long	4
	.long	0
	.zero	4
	.long	0
	.zero	4
	.long	3
	.long	1
	.globl	rot
	.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
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC0:
	.byte	65
	.byte	66
	.byte	67
	.byte	68
	.byte	69
	.byte	70
	.byte	71
	.byte	72
	.byte	73
	.byte	74
	.byte	75
	.byte	76
	.byte	77
	.byte	78
	.byte	79
	.byte	80
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC1:
	.byte	81
	.byte	82
	.byte	83
	.byte	84
	.byte	85
	.byte	86
	.byte	87
	.byte	88
	.section	.rodata.cst16
	.align 16
.LC2:
	.byte	97
	.byte	98
	.byte	99
	.byte	100
	.byte	101
	.byte	102
	.byte	103
	.byte	104
	.byte	105
	.byte	106
	.byte	107
	.byte	108
	.byte	109
	.byte	110
	.byte	111
	.byte	112
	.section	.rodata.cst8
	.align 8
.LC3:
	.byte	113
	.byte	114
	.byte	115
	.byte	116
	.byte	117
	.byte	118
	.byte	119
	.byte	120
	.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
	.p2align 4
	.type	rec.part.0, @function
rec.part.0:
.LFB25:
	.cfi_startproc
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leal	1(%rdi), %r11d
	leaq	f(%rip), %rcx
	xorl	%r8d, %r8d
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	leaq	1+dice(%rip), %rsi
	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
	movslq	%edi, %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$88, %rsp
	.cfi_def_cfa_offset 144
	movq	%fs:40, %rax
	movq	%rax, 72(%rsp)
	xorl	%eax, %eax
	leaq	0(,%rbp,8), %rax
	movq	%rax, %r9
	movq	%rax, 40(%rsp)
	subq	%rbp, %r9
	leaq	0(,%r9,8), %r15
	jmp	.L26
	.p2align 4,,10
	.p2align 3
.L2:
	addl	$1, %r8d
	addq	$1, %rcx
	addq	$8, %rsi
	cmpl	$8, %r8d
	je	.L67
.L26:
	cmpb	$0, (%rcx)
	jne	.L2
	leaq	con(%rip), %rax
	leaq	kari(%rip), %r12
	leaq	(%rax,%r15), %rdx
	movslq	12(%rdx), %r14
	testl	%r14d, %r14d
	jne	.L68
	leaq	(%rax,%r15), %rdi
	movslq	20(%rdi), %rdx
	testl	%edx, %edx
	jne	.L69
.L6:
	leaq	(%rax,%r15), %rdi
	movslq	28(%rdi), %rdx
	testl	%edx, %edx
	jne	.L70
.L9:
	leaq	(%rax,%r15), %rdi
	movslq	36(%rdi), %rdx
	testl	%edx, %edx
	jne	.L71
.L12:
	leaq	(%rax,%r15), %rdi
	movslq	44(%rdi), %rdx
	testl	%edx, %edx
	jne	.L72
.L15:
	addq	%r15, %rax
	movslq	52(%rax), %rdx
	testl	%edx, %edx
	jne	.L73
.L18:
	movslq	%r8d, %rax
	leaq	dice(%rip), %rdx
	leaq	4+rot(%rip), %rbx
	leaq	(%rdx,%rax,8), %r13
	movq	40(%rsp), %rax
	leaq	672(%rbx), %r10
	leaq	(%r12,%rax), %rdx
	jmp	.L21
	.p2align 4,,10
	.p2align 3
.L64:
	movl	%r11d, %edi
	movq	%rdx, 32(%rsp)
	movq	%rcx, 24(%rsp)
	movq	%rsi, 16(%rsp)
	movl	%r8d, 12(%rsp)
	movl	%r11d, 8(%rsp)
	call	rec.part.0
	testl	%eax, %eax
	jne	.L24
	movq	24(%rsp), %rcx
	movq	32(%rsp), %rdx
	leaq	676+rot(%rip), %r10
	movq	16(%rsp), %rsi
	movl	12(%rsp), %r8d
	movb	$0, (%rcx)
	movl	8(%rsp), %r11d
.L22:
	addq	$28, %rbx
	cmpq	%rbx, %r10
	je	.L2
.L21:
	movslq	(%rbx), %rax
	movzbl	0(%r13,%rax), %eax
	movb	%al, 1(%r12,%rbp,8)
	movslq	4(%rbx), %rax
	movzbl	0(%r13,%rax), %eax
	movb	%al, 2(%r12,%rbp,8)
	movslq	8(%rbx), %rax
	movzbl	0(%r13,%rax), %eax
	movb	%al, 3(%r12,%rbp,8)
	movslq	12(%rbx), %rax
	movzbl	0(%r13,%rax), %eax
	movb	%al, 4(%r12,%rbp,8)
	movslq	16(%rbx), %rax
	movzbl	0(%r13,%rax), %eax
	movb	%al, 5(%r12,%rbp,8)
	movslq	20(%rbx), %rax
	movzbl	0(%r13,%rax), %eax
	movb	%al, 6(%r12,%rbp,8)
	testl	%r14d, %r14d
	je	.L23
	movsbq	58(%rsp), %rax
	movzbl	(%rdx,%rax), %eax
	cmpb	%al, 59(%rsp)
	jne	.L22
	cmpl	$1, %r14d
	je	.L23
	movsbq	60(%rsp), %rax
	movzbl	(%rdx,%rax), %eax
	cmpb	%al, 61(%rsp)
	jne	.L22
	cmpl	$2, %r14d
	je	.L23
	movsbq	62(%rsp), %rax
	movzbl	(%rdx,%rax), %eax
	cmpb	%al, 63(%rsp)
	jne	.L22
	cmpl	$3, %r14d
	je	.L23
	movsbq	64(%rsp), %rax
	movzbl	(%rdx,%rax), %eax
	cmpb	%al, 65(%rsp)
	jne	.L22
	cmpl	$4, %r14d
	je	.L23
	movsbq	66(%rsp), %rax
	movzbl	(%rdx,%rax), %eax
	cmpb	%al, 67(%rsp)
	jne	.L22
	cmpl	$6, %r14d
	jne	.L23
	movsbq	68(%rsp), %rax
	movzbl	69(%rsp), %edi
	cmpb	%dil, (%rdx,%rax)
	jne	.L22
.L23:
	movb	$1, (%rcx)
	cmpl	$8, %r11d
	jne	.L64
.L24:
	movl	$1, %eax
.L1:
	movq	72(%rsp), %rdx
	subq	%fs:40, %rdx
	jne	.L74
	addq	$88, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	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
.L67:
	.cfi_restore_state
	xorl	%eax, %eax
	jmp	.L1
.L68:
	movslq	8(%rdx), %rdx
	leaq	tr(%rip), %rdi
	leaq	(%r12,%rdx,8), %rdx
	movsbq	(%rdx,%r14), %rdx
	movzbl	(%rdi,%rdx), %edx
	cmpb	(%rsi), %dl
	je	.L5
	cmpb	1(%rsi), %dl
	je	.L5
	cmpb	2(%rsi), %dl
	je	.L5
	cmpb	3(%rsi), %dl
	je	.L5
	cmpb	4(%rsi), %dl
	je	.L5
	cmpb	5(%rsi), %dl
	jne	.L2
.L5:
	leaq	(%rax,%r15), %rdi
	movb	%dl, 59(%rsp)
	movl	$1, %r14d
	movslq	20(%rdi), %rdx
	movb	$1, 58(%rsp)
	testl	%edx, %edx
	je	.L6
.L69:
	movslq	16(%rdi), %rdi
	leaq	(%r12,%rdi,8), %rdi
	movsbq	(%rdi,%rdx), %rdx
	leaq	tr(%rip), %rdi
	movzbl	(%rdi,%rdx), %edx
	cmpb	(%rsi), %dl
	je	.L8
	cmpb	1(%rsi), %dl
	je	.L8
	cmpb	2(%rsi), %dl
	je	.L8
	cmpb	3(%rsi), %dl
	je	.L8
	cmpb	4(%rsi), %dl
	je	.L8
	cmpb	5(%rsi), %dl
	jne	.L2
.L8:
	movslq	%r14d, %rdi
	addl	$1, %r14d
	movb	%dl, 59(%rsp,%rdi,2)
	movb	$2, 58(%rsp,%rdi,2)
	leaq	(%rax,%r15), %rdi
	movslq	28(%rdi), %rdx
	testl	%edx, %edx
	je	.L9
.L70:
	movslq	24(%rdi), %rdi
	leaq	(%r12,%rdi,8), %rdi
	movsbq	(%rdi,%rdx), %rdx
	leaq	tr(%rip), %rdi
	movzbl	(%rdi,%rdx), %edx
	cmpb	(%rsi), %dl
	je	.L11
	cmpb	1(%rsi), %dl
	je	.L11
	cmpb	2(%rsi), %dl
	je	.L11
	cmpb	3(%rsi), %dl
	je	.L11
	cmpb	4(%rsi), %dl
	je	.L11
	cmpb	5(%rsi), %dl
	jne	.L2
.L11:
	movslq	%r14d, %rdi
	addl	$1, %r14d
	movb	$3, 58(%rsp,%rdi,2)
	movb	%dl, 59(%rsp,%rdi,2)
	jmp	.L9
.L71:
	movslq	32(%rdi), %rdi
	leaq	(%r12,%rdi,8), %rdi
	movsbq	(%rdi,%rdx), %rdx
	leaq	tr(%rip), %rdi
	movzbl	(%rdi,%rdx), %edx
	cmpb	(%rsi), %dl
	je	.L14
	cmpb	1(%rsi), %dl
	je	.L14
	cmpb	2(%rsi), %dl
	je	.L14
	cmpb	3(%rsi), %dl
	je	.L14
	cmpb	4(%rsi), %dl
	je	.L14
	cmpb	5(%rsi), %dl
	jne	.L2
.L14:
	movslq	%r14d, %rdi
	addl	$1, %r14d
	movb	$4, 58(%rsp,%rdi,2)
	movb	%dl, 59(%rsp,%rdi,2)
	jmp	.L12
.L72:
	movslq	40(%rdi), %rdi
	leaq	(%r12,%rdi,8), %rdi
	movsbq	(%rdi,%rdx), %rdx
	leaq	tr(%rip), %rdi
	movzbl	(%rdi,%rdx), %edx
	cmpb	(%rsi), %dl
	je	.L17
	cmpb	1(%rsi), %dl
	je	.L17
	cmpb	2(%rsi), %dl
	je	.L17
	cmpb	3(%rsi), %dl
	je	.L17
	cmpb	4(%rsi), %dl
	je	.L17
	cmpb	5(%rsi), %dl
	jne	.L2
.L17:
	movslq	%r14d, %rdi
	addl	$1, %r14d
	movb	$5, 58(%rsp,%rdi,2)
	movb	%dl, 59(%rsp,%rdi,2)
	jmp	.L15
.L73:
	movslq	48(%rax), %rax
	leaq	(%r12,%rax,8), %rax
	movsbq	(%rax,%rdx), %rax
	leaq	tr(%rip), %rdx
	movzbl	(%rdx,%rax), %eax
	cmpb	(%rsi), %al
	je	.L20
	cmpb	1(%rsi), %al
	je	.L20
	cmpb	2(%rsi), %al
	je	.L20
	cmpb	3(%rsi), %al
	je	.L20
	cmpb	4(%rsi), %al
	je	.L20
	cmpb	5(%rsi), %al
	jne	.L2
.L20:
	movslq	%r14d, %rdx
	addl	$1, %r14d
	movb	$6, 58(%rsp,%rdx,2)
	movb	%al, 59(%rsp,%rdx,2)
	jmp	.L18
.L74:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE25:
	.size	rec.part.0, .-rec.part.0
	.p2align 4
	.globl	rec
	.type	rec, @function
rec:
.LFB23:
	.cfi_startproc
	endbr64
	cmpl	$8, %edi
	je	.L76
	jmp	rec.part.0
.L76:
	movl	$1, %eax
	ret
	.cfi_endproc
.LFE23:
	.size	rec, .-rec
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC4:
	.string	"NO"
.LC5:
	.string	"YES"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB24:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	movl	$31353, %edx
	leaq	kari(%rip), %r15
	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
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$88, %rsp
	.cfi_def_cfa_offset 144
	movdqa	.LC0(%rip), %xmm0
	movq	%fs:40, %rax
	movq	%rax, 72(%rsp)
	xorl	%eax, %eax
	movq	.LC1(%rip), %rax
	movw	%dx, 89+tr(%rip)
	movups	%xmm0, 97+tr(%rip)
	movdqa	.LC2(%rip), %xmm0
	movq	%rax, 113+tr(%rip)
	movl	$23129, %eax
	movw	%ax, 121+tr(%rip)
	movq	.LC3(%rip), %rax
	movups	%xmm0, 65+tr(%rip)
	movq	%rax, 81+tr(%rip)
	leaq	62(%rsp), %rax
	movq	%rax, 40(%rsp)
.L78:
	movq	40(%rsp), %r12
	leaq	f(%rip), %rbp
	leaq	1+dice(%rip), %rbx
.L80:
	movq	stdin(%rip), %rdx
	movl	$10, %esi
	movq	%r12, %rdi
	call	fgets@PLT
	movzbl	62(%rsp), %eax
	cmpb	$48, %al
	je	.L79
	movb	%al, (%rbx)
	movzbl	63(%rsp), %eax
	addq	$8, %rbx
	addq	$1, %rbp
	movb	$0, -1(%rbp)
	movb	%al, -7(%rbx)
	movzbl	64(%rsp), %eax
	movb	%al, -6(%rbx)
	movzbl	65(%rsp), %eax
	movb	%al, -5(%rbx)
	movzbl	66(%rsp), %eax
	movb	%al, -4(%rbx)
	movzbl	67(%rsp), %eax
	movb	%al, -3(%rbx)
	leaq	65+dice(%rip), %rax
	cmpq	%rax, %rbx
	jne	.L80
	movq	$0, 32(%rsp)
	leaq	-65(%rax), %r12
	leaq	f(%rip), %rax
	addq	$8, %rax
	movq	%rax, 8(%rsp)
.L81:
	movq	32(%rsp), %rax
	leaq	f(%rip), %rcx
	movb	$1, (%rcx,%rax)
	leaq	4+rot(%rip), %rcx
	cltq
	movq	%rcx, 16(%rsp)
	movq	%rax, 24(%rsp)
	.p2align 4,,10
	.p2align 3
.L83:
	movq	16(%rsp), %rsi
	movq	24(%rsp), %rax
	leaq	1+dice(%rip), %r13
	leaq	f(%rip), %r14
	movslq	(%rsi), %rdx
	leaq	(%r12,%rax,8), %rax
	movzbl	(%rax,%rdx), %edx
	movb	%dl, 1+kari(%rip)
	movslq	4(%rsi), %rdx
	movzbl	(%rax,%rdx), %edx
	movb	%dl, 2+kari(%rip)
	movslq	8(%rsi), %rdx
	movzbl	(%rax,%rdx), %edx
	movb	%dl, 3+kari(%rip)
	movslq	12(%rsi), %rdx
	movzbl	(%rax,%rdx), %edx
	movb	%dl, 4+kari(%rip)
	movslq	16(%rsi), %rdx
	movzbl	(%rax,%rdx), %edx
	movb	%dl, 5+kari(%rip)
	movslq	20(%rsi), %rdx
	movzbl	(%rax,%rdx), %eax
	movb	%al, 6+kari(%rip)
	jmp	.L107
	.p2align 4,,10
	.p2align 3
.L84:
	addq	$1, %r14
	addq	$8, %r13
	cmpq	8(%rsp), %r14
	je	.L153
.L107:
	leaq	f(%rip), %rax
	movq	%rax, (%rsp)
	movl	%r14d, %eax
	subl	(%rsp), %eax
	cmpb	$0, (%r14)
	jne	.L84
	movslq	68+con(%rip), %rbp
	testl	%ebp, %ebp
	jne	.L154
	movslq	76+con(%rip), %rcx
	testl	%ecx, %ecx
	jne	.L155
.L88:
	movslq	84+con(%rip), %rcx
	testl	%ecx, %ecx
	jne	.L156
.L91:
	movslq	92+con(%rip), %rcx
	testl	%ecx, %ecx
	jne	.L157
.L94:
	movslq	100+con(%rip), %rcx
	testl	%ecx, %ecx
	jne	.L158
.L97:
	movslq	108+con(%rip), %rcx
	testl	%ecx, %ecx
	jne	.L159
.L100:
	cltq
	movq	%r13, (%rsp)
	leaq	4+rot(%rip), %rbx
	movq	%r14, %r13
	leaq	0(,%rax,8), %rsi
	movq	%rsi, %r14
	jmp	.L103
	.p2align 4,,10
	.p2align 3
.L150:
	movb	$0, 0(%r13)
.L104:
	addq	$28, %rbx
	leaq	676+rot(%rip), %rax
	cmpq	%rbx, %rax
	je	.L151
.L103:
	movslq	(%rbx), %rdx
	leaq	(%r12,%r14), %rax
	movzbl	(%rax,%rdx), %edx
	movb	%dl, 9+kari(%rip)
	movslq	4(%rbx), %rdx
	movzbl	(%rax,%rdx), %edx
	movb	%dl, 10+kari(%rip)
	movslq	8(%rbx), %rdx
	movzbl	(%rax,%rdx), %edx
	movb	%dl, 11+kari(%rip)
	movslq	12(%rbx), %rdx
	movzbl	(%rax,%rdx), %edx
	movb	%dl, 12+kari(%rip)
	movslq	16(%rbx), %rdx
	movzbl	(%rax,%rdx), %edx
	movb	%dl, 13+kari(%rip)
	movslq	20(%rbx), %rdx
	movzbl	(%rax,%rdx), %eax
	movb	%al, 14+kari(%rip)
	testl	%ebp, %ebp
	je	.L105
	movsbq	48(%rsp), %rax
	movzbl	49(%rsp), %edi
	cmpb	%dil, 8(%r15,%rax)
	jne	.L104
	cmpl	$1, %ebp
	je	.L105
	movsbq	50(%rsp), %rax
	movzbl	51(%rsp), %esi
	cmpb	%sil, 8(%r15,%rax)
	jne	.L104
	cmpl	$2, %ebp
	je	.L105
	movsbq	52(%rsp), %rax
	movzbl	8(%r15,%rax), %eax
	cmpb	%al, 53(%rsp)
	jne	.L104
	cmpl	$3, %ebp
	je	.L105
	movsbq	54(%rsp), %rax
	movzbl	8(%r15,%rax), %eax
	cmpb	%al, 55(%rsp)
	jne	.L104
	cmpl	$4, %ebp
	je	.L105
	movsbq	56(%rsp), %rax
	movzbl	8(%r15,%rax), %eax
	cmpb	%al, 57(%rsp)
	jne	.L104
	cmpl	$6, %ebp
	jne	.L105
	movsbq	58(%rsp), %rax
	movzbl	59(%rsp), %edi
	cmpb	%dil, 8(%r15,%rax)
	jne	.L104
.L105:
	movb	$1, 0(%r13)
	movl	$2, %edi
	call	rec.part.0
	testl	%eax, %eax
	je	.L150
	leaq	.LC5(%rip), %rdi
	call	puts@PLT
	jmp	.L78
.L153:
	addq	$28, 16(%rsp)
	movq	16(%rsp), %rax
	leaq	676+rot(%rip), %rdi
	cmpq	%rdi, %rax
	jne	.L83
	movq	32(%rsp), %rax
	leaq	f(%rip), %rcx
	movb	$0, (%rcx,%rax)
	addq	$1, %rax
	movq	%rax, 32(%rsp)
	cmpq	$7, %rax
	jne	.L81
	leaq	.LC4(%rip), %rdi
	call	puts@PLT
	jmp	.L78
	.p2align 4,,10
	.p2align 3
.L154:
	movslq	64+con(%rip), %rcx
	leaq	tr(%rip), %rdi
	leaq	(%r15,%rcx,8), %rcx
	movsbq	(%rcx,%rbp), %rcx
	movzbl	(%rdi,%rcx), %ecx
	cmpb	0(%r13), %cl
	je	.L87
	cmpb	1(%r13), %cl
	je	.L87
	cmpb	2(%r13), %cl
	je	.L87
	cmpb	3(%r13), %cl
	je	.L87
	cmpb	4(%r13), %cl
	je	.L87
	cmpb	5(%r13), %cl
	jne	.L84
.L87:
	movb	%cl, 49(%rsp)
	movslq	76+con(%rip), %rcx
	movl	$1, %ebp
	movb	$1, 48(%rsp)
	testl	%ecx, %ecx
	je	.L88
.L155:
	movslq	72+con(%rip), %rsi
	leaq	tr(%rip), %rdi
	leaq	(%r15,%rsi,8), %rsi
	movsbq	(%rsi,%rcx), %rcx
	movzbl	(%rdi,%rcx), %ecx
	cmpb	0(%r13), %cl
	je	.L90
	cmpb	1(%r13), %cl
	je	.L90
	cmpb	2(%r13), %cl
	je	.L90
	cmpb	3(%r13), %cl
	je	.L90
	cmpb	4(%r13), %cl
	je	.L90
	cmpb	5(%r13), %cl
	jne	.L84
.L90:
	movslq	%ebp, %rsi
	addl	$1, %ebp
	movb	%cl, 49(%rsp,%rsi,2)
	movslq	84+con(%rip), %rcx
	movb	$2, 48(%rsp,%rsi,2)
	testl	%ecx, %ecx
	je	.L91
.L156:
	movslq	80+con(%rip), %rsi
	leaq	tr(%rip), %rdi
	leaq	(%r15,%rsi,8), %rsi
	movsbq	(%rsi,%rcx), %rcx
	movzbl	(%rdi,%rcx), %ecx
	cmpb	0(%r13), %cl
	je	.L93
	cmpb	1(%r13), %cl
	je	.L93
	cmpb	2(%r13), %cl
	je	.L93
	cmpb	3(%r13), %cl
	je	.L93
	cmpb	4(%r13), %cl
	je	.L93
	cmpb	5(%r13), %cl
	jne	.L84
.L93:
	movslq	%ebp, %rsi
	addl	$1, %ebp
	movb	%cl, 49(%rsp,%rsi,2)
	movslq	92+con(%rip), %rcx
	movb	$3, 48(%rsp,%rsi,2)
	testl	%ecx, %ecx
	je	.L94
.L157:
	movslq	88+con(%rip), %rsi
	leaq	tr(%rip), %rdi
	leaq	(%r15,%rsi,8), %rsi
	movsbq	(%rsi,%rcx), %rcx
	movzbl	(%rdi,%rcx), %ecx
	cmpb	0(%r13), %cl
	je	.L96
	cmpb	1(%r13), %cl
	je	.L96
	cmpb	2(%r13), %cl
	je	.L96
	cmpb	3(%r13), %cl
	je	.L96
	cmpb	4(%r13), %cl
	je	.L96
	cmpb	5(%r13), %cl
	jne	.L84
.L96:
	movslq	%ebp, %rsi
	addl	$1, %ebp
	movb	%cl, 49(%rsp,%rsi,2)
	movslq	100+con(%rip), %rcx
	movb	$4, 48(%rsp,%rsi,2)
	testl	%ecx, %ecx
	je	.L97
.L158:
	movslq	96+con(%rip), %rsi
	leaq	tr(%rip), %rdi
	leaq	(%r15,%rsi,8), %rsi
	movsbq	(%rsi,%rcx), %rcx
	movzbl	(%rdi,%rcx), %ecx
	cmpb	0(%r13), %cl
	je	.L99
	cmpb	1(%r13), %cl
	je	.L99
	cmpb	2(%r13), %cl
	je	.L99
	cmpb	3(%r13), %cl
	je	.L99
	cmpb	4(%r13), %cl
	je	.L99
	cmpb	5(%r13), %cl
	jne	.L84
.L99:
	movslq	%ebp, %rsi
	addl	$1, %ebp
	movb	%cl, 49(%rsp,%rsi,2)
	movslq	108+con(%rip), %rcx
	movb	$5, 48(%rsp,%rsi,2)
	testl	%ecx, %ecx
	je	.L100
.L159:
	movslq	104+con(%rip), %rsi
	leaq	tr(%rip), %rdi
	leaq	(%r15,%rsi,8), %rsi
	movsbq	(%rsi,%rcx), %rcx
	movzbl	(%rdi,%rcx), %ecx
	cmpb	0(%r13), %cl
	je	.L102
	cmpb	1(%r13), %cl
	je	.L102
	cmpb	2(%r13), %cl
	je	.L102
	cmpb	3(%r13), %cl
	je	.L102
	cmpb	4(%r13), %cl
	je	.L102
	cmpb	5(%r13), %cl
	jne	.L84
.L102:
	movslq	%ebp, %rsi
	addl	$1, %ebp
	movb	$6, 48(%rsp,%rsi,2)
	movb	%cl, 49(%rsp,%rsi,2)
	jmp	.L100
.L151:
	movq	%r13, %r14
	movq	(%rsp), %r13
	jmp	.L84
.L79:
	movq	72(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L160
	addq	$88, %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
.L160:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE24:
	.size	main, .-main
	.globl	tr
	.bss
	.align 32
	.type	tr, @object
	.size	tr, 128
tr:
	.zero	128
	.globl	f
	.align 8
	.type	f, @object
	.size	f, 9
f:
	.zero	9
	.globl	kari
	.align 32
	.type	kari, @object
	.size	kari, 64
kari:
	.zero	64
	.globl	dice
	.align 32
	.type	dice, @object
	.size	dice, 64
dice:
	.zero	64
	.globl	con
	.data
	.align 32
	.type	con, @object
	.size	con, 448
con:
	.long	0
	.zero	4
	.zero	48
	.long	0
	.zero	4
	.long	0
	.zero	4
	.long	0
	.zero	4
	.long	0
	.zero	4
	.long	0
	.long	3
	.long	0
	.zero	4
	.long	0
	.zero	4
	.long	0
	.zero	4
	.long	0
	.zero	4
	.long	1
	.long	5
	.long	0
	.zero	4
	.long	0
	.zero	4
	.long	0
	.zero	4
	.long	0
	.zero	4
	.long	0
	.zero	4
	.long	0
	.zero	4
	.long	0
	.long	5
	.long	2
	.long	4
	.long	0
	.zero	4
	.long	0
	.zero	4
	.long	0
	.zero	4
	.long	0
	.zero	4
	.long	0
	.zero	4
	.long	0
	.zero	4
	.long	0
	.zero	4
	.long	0
	.zero	4
	.long	0
	.zero	4
	.long	0
	.long	1
	.long	0
	.zero	4
	.long	0
	.zero	4
	.long	0
	.zero	4
	.long	0
	.zero	4
	.long	4
	.long	3
	.long	0
	.zero	4
	.long	1
	.long	1
	.long	0
	.zero	4
	.long	0
	.zero	4
	.long	5
	.long	5
	.long	0
	.zero	4
	.long	0
	.zero	4
	.long	0
	.zero	4
	.long	2
	.long	1
	.long	0
	.zero	4
	.long	0
	.zero	4
	.long	4
	.long	5
	.long	6
	.long	4
	.long	0
	.zero	4
	.long	0
	.zero	4
	.long	3
	.long	1
	.globl	rot
	.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
	.section	.rodata.cst16,"aM",@progbits,16
	.align 16
.LC0:
	.byte	65
	.byte	66
	.byte	67
	.byte	68
	.byte	69
	.byte	70
	.byte	71
	.byte	72
	.byte	73
	.byte	74
	.byte	75
	.byte	76
	.byte	77
	.byte	78
	.byte	79
	.byte	80
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC1:
	.byte	81
	.byte	82
	.byte	83
	.byte	84
	.byte	85
	.byte	86
	.byte	87
	.byte	88
	.section	.rodata.cst16
	.align 16
.LC2:
	.byte	97
	.byte	98
	.byte	99
	.byte	100
	.byte	101
	.byte	102
	.byte	103
	.byte	104
	.byte	105
	.byte	106
	.byte	107
	.byte	108
	.byte	109
	.byte	110
	.byte	111
	.byte	112
	.section	.rodata.cst8
	.align 8
.LC3:
	.byte	113
	.byte	114
	.byte	115
	.byte	116
	.byte	117
	.byte	118
	.byte	119
	.byte	120
	.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:

// AOJ 0171: Dice Puzzle
// 2017.8.17 bal4u@uu
// 2017.12.29
// ?????????????????¢??¨??????????????????????????°

#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 con[8][7][2] = {{{0}},
	{{0},{0},{0},{0},{0,3},{0},{0}},		// ?????????????????¨??¢??????
	{{0},{0},{1,5},{0},{0},{0},{0}},
	{{0},{0},{0,5},{2,4},{0},{0},{0}},
	{{0},{0},{0},{0},{0},{0},{0,1}},
	{{0},{0},{0},{0},{4,3},{0},{1,1}},
	{{0},{0},{5,5},{0},{0},{0},{2,1}},
	{{0},{0},{4,5},{6,4},{0},{0},{3,1}}};

char dice[8][8];
char kari[8][8], f[9];
char tr[128];

int rec(int n)
{
	int i, j, k, cnt;
	char tbl[7][2], c;

	if (n == 8) return 1;
	for (i = 0; i < 8; i++) {
		if (f[i]) continue;
		cnt = 0;
		for (j = 1; j <= 6; j++) if (con[n][j][1]) {
			c = tr[kari[con[n][j][0]][con[n][j][1]]];
			for (k = 1; ; k++) {
				if (k > 6) goto next;
				if (dice[i][k] == c) { tbl[cnt][0] = j, tbl[cnt++][1] = c; break; }
			}
		}

		for (j = 0; j < 24; j++) {
			for (k = 1; k <= 6; k++) kari[n][k] = dice[i][rot[j][k]];
			for (k = 0; k < cnt; k++) {
				if (kari[n][tbl[k][0]] != tbl[k][1]) break;
			}
			if (k < cnt) continue;
			f[i] = 1;
			if (rec(n+1)) return 1;
			f[i] = 0;
		}
		next:;
	}
	return 0;
}

int main()
{
	int i, j, k;
	char buf[10];

	for (i = 0; i < 26; i++) tr['a'+i] = 'A'+i, tr['A'+i] = 'a'+i;

	while (1) {
		for (i = 0; i < 8; i++) {
			fgets(buf, 10, stdin);
			if (*buf == '0') return 0;
			for (j = 0; j < 6; j++) dice[i][j+1] = buf[j];
			f[i] = 0;
		}
		for (i = 0; ; i++) {
			if (i == 7) { puts("NO"); break; }
			f[i] = 1;
			for (j = 0; j < 24; j++) {
				for (k = 1; k <= 6; k++) kari[0][k] = dice[i][rot[j][k]];
				if (rec(1)) { puts("YES"); goto next; }
			}
			f[i] = 0;
		}
		next:;
	}
	return 0;
}
zabZNq
BCxmAi
ZcbBCj
aizXCm
QgmABC
JHzMop
ImoXGz
MZTOhp
zabZnQ
BCxmAi
ZcbBCj
aizXCm
QgmABC
JHzMop
ImoXGz
MOTZhp
abcdef
ABDCFE
FBDCAE
abcdef
BEACDF
bfcaed
fabcde
DEABCF
UnivOf
AizuaH
zTXZYW
piglIt
GRULNP
higGtH
uAzIXZ
FizmKZ
UnivOf
AizuaH
piglIt
higGtH
GRULNP
uAzIXZ
FizmKZ
ZTXzYW
0
 zabZNq
BCxmAi
ZcbBCj
mCXzia
QgmABC
JHzMop
ImoXGz
MZTOhp
zabZnQ
BCxmAi
ZcbBCj
aizXCm
QgmABC
poMzHJ
ImoXGz
MOTZhp
abcdef
ABDCFE
FBDCAE
abcdef
BEACDF
bfcaed
fabcde
DEABCF
UnivOf
AizuaH
zTXZYW
piglIt
GRULNP
higGtH
uAzIXZ
FizmKZ
UnivOf
AizuaH
piglIt
higGtH
GRULNP
uAzIXZ
FizmKZ
ZTXzYW
0
 zabZNq
BCxmAi
ZcbBCj
mCXzia
QgmABC
JHzMop
ImoXGz
MZTOhp
zabZnQ
BCxmAi
ZcbBCj
aizXCm
QgmABC
poMzHJ
ImoXGz
MOTZhp
abcdef
ABDCFE
FBDCAE
abcdef
BEACDF
bfcaed
fabcde
DEABCF
UnOvif
AizuaH
zTXZYW
piglIt
GRULNP
higGtH
uAzIXZ
FizmKZ
UnivOf
AizuaH
piglIt
higGtH
GRULNP
uAzIXZ
FizmKZ
ZTXzYW
0
 zabZNq
BCxmAi
ZcbBCj
nCXzia
QgmABC
JHzNop
ImoXGz
OZTMhp
zabZnQ
BCwmAi
BcbZCj
aizXCm
QgmABC
poMzHJ
ImoXGz
MOTZhp
abcdef
ABDCFE
FBECAE
abcdef
BEACDF
bfcaed
fabcde
DE@BCF
UnOvif
HauziA
zTXZYW
piglIt
GNULRP
hgiGtH
uAzIXZ
FjzmKZ
UnivOf
AizuaH
piglIt
higGtH
GRULNP
uAzIXZ
FizmKZ
WYzXTZ
0
 zqbZNa
BCxmAi
ZcbBCj
nCXzia
QgmABC
JHzMop
ImoXGz
OZTMhp
zabZnQ
BCwmAi
BcbZCj
aizXCm
QgmABC
poMzHJ
ImoXGz
MOTZhp
abcdef
ABDCFE
FBDCAE
abcdef
BEACDF
bfcaed
fabcde
DE@BCF
OnUvif
AizuaH
zTXZYW
piglIt
GNULRP
hgiGtH
uAzIXZ
FizmKZ
UnivOf
AiyuaH
piglIt
higGtH
GRULNP
uAzIXZ
FizmKZ
ZTXzYW
0
 zabZNq
BCxmAi
ZcbBCj
aizXCm
QgmABC
JHzMop
ImoXGz
MZTOhp
zabZnQ
BCxmAi
ZcbBCj
aizXCm
QgmABC
poMzHJ
ImoXGz
MOTZhp
abcdef
ABDCFE
FBDCAE
abcdef
BEACDF
bfcaed
fabcde
DEABCF
UnivOf
AizuaH
zTXZYW
piglIt
GRULNP
higGtH
uAzIXZ
FizmKZ
UnivOf
AizuaH
piglIt
higGtH
GRULNP
uAzIXZ
FizmKZ
ZTXzYW
0
 zabZNq
BCxmAi
ZcbBCj
mCXzia
QgmABC
JHzMop
ImoXGz
MZTOhp
zabZnQ
BCxmAi
ZcbBCj
aizXCm
QgmABC
poMzHJ
ImoXGz
MOTZhp
abcdef
ABDCFE
FBDCAE
abcdef
BEACDF
bfcaed
fabcde
DE@BCF
UnOvif
AizuaH
zTXZYW
piglIt
GRULNP
higGtH
uAzIXZ
FizmKZ
UnivOf
AizuaH
piglIt
higGtH
GRULNP
uAzIXZ
FizmKZ
ZTXzYW
0
 zabZNq
BCxmAi
ZcbBCj
mCXzia
QgmABC
JHzMop
ImoXGz
OZTMhp
zabZnQ
BCxmAi
ZcbBCj
aizXCm
QgmABC
poMzHJ
ImoXGz
MOTZhp
abcdef
ABDCFE
FBDCAE
abcdef
BEACDF
bfcaed
fabcde
DE@BCF
UnOvif
AizuaH
zTXZYW
piglIt
GRULNP
higGtH
uAzIXZ
FizmKZ
UnivOf
AizuaH
piglIt
higGtH
GRULNP
uAzIXZ
FizmKZ
ZTXzYW
0
 zabZNq
BCxmAi
ZcbBCj
mCXzia
QgmABC
JHzMop
ImoXGz
OZTMhp
zabZnQ
BCxmAi
ZcbBCj
aizXCm
QgmABC
poMzHJ
ImoXGz
MOTZhp
abcdef
ABDCFE
FBDCAE
abcdef
BEACDF
bfcaed
fabcde
DE@BCF
UnOvif
AizuaH
zTXZYW
piglIt
GRULNP
hgiGtH
uAzIXZ
FizmKZ
UnivOf
AizuaH
piglIt
higGtH
GRULNP
uAzIXZ
FizmKZ
ZTXzYW
0
 zabZNq
BCxmAi
ZcbBCj
mCXzia
QgmABC
JHzMop
ImoXGz
OZTMhp
zabZnQ
BCwmAi
ZcbBCj
aizXCm
QgmABC
poMzHJ
ImoXGz
MOTZhp
abcdef
ABDCFE
FBDCAE
abcdef
BEACDF
bfcaed
fabcde
DE@BCF
UnOvif
AizuaH
zTXZYW
piglIt
GRULNP
hgiGtH
uAzIXZ
FizmKZ
UnivOf
AizuaH
piglIt
higGtH
GRULNP
uAzIXZ
FizmKZ
ZTXzYW
0

YES
NO
YES
YES
NO
 NO
NO
YES
YES
NO
 NO
NO
YES
NO
NO
 NO
NO
YES
NO
YES
 YES
NO
YES
NO
NO
 YES
NO
YES
YES
NO
 NO
NO
YES
NO
NO
 NO
NO
YES
NO
NO
 NO
NO
YES
NO
NO
 NO
NO
YES
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
// AOJ 0171: Dice Puzzle
// 2017.8.17 bal4u@uu
// 2017.12.29
// ?????????????????¢??¨??????????????????????????°

#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 con[8][7][2] = {{{0}},
	{{0},{0},{0},{0},{0,3},{0},{0}},		// ?????????????????¨??¢??????
	{{0},{0},{1,5},{0},{0},{0},{0}},
	{{0},{0},{0,5},{2,4},{0},{0},{0}},
	{{0},{0},{0},{0},{0},{0},{0,1}},
	{{0},{0},{0},{0},{4,3},{0},{1,1}},
	{{0},{0},{5,5},{0},{0},{0},{2,1}},
	{{0},{0},{4,5},{6,4},{0},{0},{3,1}}};

char dice[8][8];
char kari[8][8], f[9];
char tr[128];

int rec(int n)
{
	int i, j, k, cnt;
	char tbl[7][2], c;

	if (n == 8) return 1;
	for (i = 0; i < 8; i++) {
		if (f[i]) continue;
		cnt = 0;
		for (j = 1; j <= 6; j++) if (con[n][j][1]) {
			c = tr[kari[con[n][j][0]][con[n][j][1]]];
			for (k = 1; ; k++) {
				if (k > 6) goto next;
				if (dice[i][k] == c) { tbl[cnt][0] = j, tbl[cnt++][1] = c; break; }
			}
		}

		for (j = 0; j < 24; j++) {
			for (k = 1; k <= 6; k++) kari[n][k] = dice[i][rot[j][k]];
			for (k = 0; k < cnt; k++) {
				if (kari[n][tbl[k][0]] != tbl[k][1]) break;
			}
			if (k < cnt) continue;
			f[i] = 1;
			if (rec(n+1)) return 1;
			f[i] = 0;
		}
		next:;
	}
	return 0;
}

int main()
{
	int i, j, k;
	char buf[10];

	for (i = 0; i < 26; i++) tr['a'+i] = 'A'+i, tr['A'+i] = 'a'+i;

	while (1) {
		for (i = 0; i < 8; i++) {
			fgets(buf, 10, stdin);
			if (*buf == '0') return 0;
			for (j = 0; j < 6; j++) dice[i][j+1] = buf[j];
			f[i] = 0;
		}
		for (i = 0; ; i++) {
			if (i == 7) { puts("NO"); break; }
			f[i] = 1;
			for (j = 0; j < 24; j++) {
				for (k = 1; k <= 6; k++) kari[0][k] = dice[i][rot[j][k]];
				if (rec(1)) { puts("YES"); goto next; }
			}
			f[i] = 0;
		}
		next:;
	}
	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	con
	.align 32
	.type	con, @object
	.size	con, 448
con:
	.long	0
	.zero	4
	.zero	48
	.long	0
	.zero	4
	.long	0
	.zero	4
	.long	0
	.zero	4
	.long	0
	.zero	4
	.long	0
	.long	3
	.long	0
	.zero	4
	.long	0
	.zero	4
	.long	0
	.zero	4
	.long	0
	.zero	4
	.long	1
	.long	5
	.long	0
	.zero	4
	.long	0
	.zero	4
	.long	0
	.zero	4
	.long	0
	.zero	4
	.long	0
	.zero	4
	.long	0
	.zero	4
	.long	0
	.long	5
	.long	2
	.long	4
	.long	0
	.zero	4
	.long	0
	.zero	4
	.long	0
	.zero	4
	.long	0
	.zero	4
	.long	0
	.zero	4
	.long	0
	.zero	4
	.long	0
	.zero	4
	.long	0
	.zero	4
	.long	0
	.zero	4
	.long	0
	.long	1
	.long	0
	.zero	4
	.long	0
	.zero	4
	.long	0
	.zero	4
	.long	0
	.zero	4
	.long	4
	.long	3
	.long	0
	.zero	4
	.long	1
	.long	1
	.long	0
	.zero	4
	.long	0
	.zero	4
	.long	5
	.long	5
	.long	0
	.zero	4
	.long	0
	.zero	4
	.long	0
	.zero	4
	.long	2
	.long	1
	.long	0
	.zero	4
	.long	0
	.zero	4
	.long	4
	.long	5
	.long	6
	.long	4
	.long	0
	.zero	4
	.long	0
	.zero	4
	.long	3
	.long	1
	.globl	dice
	.bss
	.align 32
	.type	dice, @object
	.size	dice, 64
dice:
	.zero	64
	.globl	kari
	.align 32
	.type	kari, @object
	.size	kari, 64
kari:
	.zero	64
	.globl	f
	.align 8
	.type	f, @object
	.size	f, 9
f:
	.zero	9
	.globl	tr
	.align 32
	.type	tr, @object
	.size	tr, 128
tr:
	.zero	128
	.text
	.globl	rec
	.type	rec, @function
rec:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$64, %rsp
	movl	%edi, -52(%rbp)
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	cmpl	$8, -52(%rbp)
	jne	.L2
	movl	$1, %eax
	jmp	.L26
.L2:
	movl	$0, -40(%rbp)
	jmp	.L4
.L25:
	movl	-40(%rbp), %eax
	cltq
	leaq	f(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	testb	%al, %al
	jne	.L28
	movl	$0, -28(%rbp)
	movl	$1, -36(%rbp)
	jmp	.L7
.L13:
	movl	-36(%rbp), %eax
	movslq	%eax, %rcx
	movl	-52(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$3, %rax
	subq	%rdx, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	4+con(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	je	.L8
	movl	-36(%rbp), %eax
	movslq	%eax, %rcx
	movl	-52(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$3, %rax
	subq	%rdx, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	con(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	-36(%rbp), %eax
	movslq	%eax, %rsi
	movl	-52(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$3, %rax
	subq	%rdx, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,8), %rdx
	leaq	4+con(%rip), %rax
	movl	(%rdx,%rax), %eax
	movslq	%eax, %rdx
	movslq	%ecx, %rax
	salq	$3, %rax
	addq	%rax, %rdx
	leaq	kari(%rip), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	movsbl	%al, %eax
	cltq
	leaq	tr(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	movb	%al, -41(%rbp)
	movl	$1, -32(%rbp)
.L12:
	cmpl	$6, -32(%rbp)
	jg	.L29
	movl	-32(%rbp), %eax
	movslq	%eax, %rdx
	movl	-40(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rax, %rdx
	leaq	dice(%rip), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	cmpb	%al, -41(%rbp)
	jne	.L11
	movl	-36(%rbp), %eax
	movl	%eax, %edx
	movl	-28(%rbp), %eax
	cltq
	movb	%dl, -22(%rbp,%rax,2)
	movl	-28(%rbp), %eax
	leal	1(%rax), %edx
	movl	%edx, -28(%rbp)
	cltq
	movzbl	-41(%rbp), %edx
	movb	%dl, -21(%rbp,%rax,2)
	jmp	.L8
.L11:
	addl	$1, -32(%rbp)
	jmp	.L12
.L8:
	addl	$1, -36(%rbp)
.L7:
	cmpl	$6, -36(%rbp)
	jle	.L13
	movl	$0, -36(%rbp)
	jmp	.L14
.L24:
	movl	$1, -32(%rbp)
	jmp	.L15
.L16:
	movl	-32(%rbp), %eax
	movslq	%eax, %rcx
	movl	-36(%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), %eax
	movslq	%eax, %rdx
	movl	-40(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rax, %rdx
	leaq	dice(%rip), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	movl	-32(%rbp), %edx
	movslq	%edx, %rcx
	movl	-52(%rbp), %edx
	movslq	%edx, %rdx
	salq	$3, %rdx
	addq	%rdx, %rcx
	leaq	kari(%rip), %rdx
	addq	%rcx, %rdx
	movb	%al, (%rdx)
	addl	$1, -32(%rbp)
.L15:
	cmpl	$6, -32(%rbp)
	jle	.L16
	movl	$0, -32(%rbp)
	jmp	.L17
.L20:
	movl	-32(%rbp), %eax
	cltq
	movzbl	-22(%rbp,%rax,2), %eax
	movsbl	%al, %eax
	movslq	%eax, %rdx
	movl	-52(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rax, %rdx
	leaq	kari(%rip), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %edx
	movl	-32(%rbp), %eax
	cltq
	movzbl	-21(%rbp,%rax,2), %eax
	cmpb	%al, %dl
	jne	.L30
	addl	$1, -32(%rbp)
.L17:
	movl	-32(%rbp), %eax
	cmpl	-28(%rbp), %eax
	jl	.L20
	jmp	.L19
.L30:
	nop
.L19:
	movl	-32(%rbp), %eax
	cmpl	-28(%rbp), %eax
	jl	.L31
	movl	-40(%rbp), %eax
	cltq
	leaq	f(%rip), %rdx
	movb	$1, (%rax,%rdx)
	movl	-52(%rbp), %eax
	addl	$1, %eax
	movl	%eax, %edi
	call	rec
	testl	%eax, %eax
	je	.L23
	movl	$1, %eax
	jmp	.L26
.L23:
	movl	-40(%rbp), %eax
	cltq
	leaq	f(%rip), %rdx
	movb	$0, (%rax,%rdx)
	jmp	.L22
.L31:
	nop
.L22:
	addl	$1, -36(%rbp)
.L14:
	cmpl	$23, -36(%rbp)
	jle	.L24
	jmp	.L6
.L10:
.L28:
	nop
	jmp	.L6
.L29:
	nop
.L6:
	addl	$1, -40(%rbp)
.L4:
	cmpl	$7, -40(%rbp)
	jle	.L25
	movl	$0, %eax
.L26:
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L27
	call	__stack_chk_fail@PLT
.L27:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	rec, .-rec
	.section	.rodata
.LC0:
	.string	"NO"
.LC1:
	.string	"YES"
	.text
	.globl	main
	.type	main, @function
main:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -32(%rbp)
	jmp	.L33
.L34:
	movl	-32(%rbp), %eax
	leal	65(%rax), %edx
	movl	-32(%rbp), %eax
	addl	$97, %eax
	movl	%edx, %ecx
	cltq
	leaq	tr(%rip), %rdx
	movb	%cl, (%rax,%rdx)
	movl	-32(%rbp), %eax
	leal	97(%rax), %edx
	movl	-32(%rbp), %eax
	addl	$65, %eax
	movl	%edx, %ecx
	cltq
	leaq	tr(%rip), %rdx
	movb	%cl, (%rax,%rdx)
	addl	$1, -32(%rbp)
.L33:
	cmpl	$25, -32(%rbp)
	jle	.L34
.L49:
	movl	$0, -32(%rbp)
	jmp	.L35
.L40:
	movq	stdin(%rip), %rdx
	leaq	-18(%rbp), %rax
	movl	$10, %esi
	movq	%rax, %rdi
	call	fgets@PLT
	movzbl	-18(%rbp), %eax
	cmpb	$48, %al
	jne	.L36
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L50
	jmp	.L51
.L36:
	movl	$0, -28(%rbp)
	jmp	.L38
.L39:
	movl	-28(%rbp), %eax
	leal	1(%rax), %edx
	movl	-28(%rbp), %eax
	cltq
	movzbl	-18(%rbp,%rax), %eax
	movslq	%edx, %rcx
	movl	-32(%rbp), %edx
	movslq	%edx, %rdx
	salq	$3, %rdx
	addq	%rdx, %rcx
	leaq	dice(%rip), %rdx
	addq	%rcx, %rdx
	movb	%al, (%rdx)
	addl	$1, -28(%rbp)
.L38:
	cmpl	$5, -28(%rbp)
	jle	.L39
	movl	-32(%rbp), %eax
	cltq
	leaq	f(%rip), %rdx
	movb	$0, (%rax,%rdx)
	addl	$1, -32(%rbp)
.L35:
	cmpl	$7, -32(%rbp)
	jle	.L40
	movl	$0, -32(%rbp)
.L48:
	cmpl	$7, -32(%rbp)
	jne	.L41
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L42
.L41:
	movl	-32(%rbp), %eax
	cltq
	leaq	f(%rip), %rdx
	movb	$1, (%rax,%rdx)
	movl	$0, -28(%rbp)
	jmp	.L43
.L47:
	movl	$1, -24(%rbp)
	jmp	.L44
.L45:
	movl	-24(%rbp), %eax
	movslq	%eax, %rcx
	movl	-28(%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), %eax
	movslq	%eax, %rdx
	movl	-32(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rax, %rdx
	leaq	dice(%rip), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %edx
	movl	-24(%rbp), %eax
	cltq
	leaq	kari(%rip), %rcx
	movb	%dl, (%rax,%rcx)
	addl	$1, -24(%rbp)
.L44:
	cmpl	$6, -24(%rbp)
	jle	.L45
	movl	$1, %edi
	call	rec
	testl	%eax, %eax
	je	.L46
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L42
.L46:
	addl	$1, -28(%rbp)
.L43:
	cmpl	$23, -28(%rbp)
	jle	.L47
	movl	-32(%rbp), %eax
	cltq
	leaq	f(%rip), %rdx
	movb	$0, (%rax,%rdx)
	addl	$1, -32(%rbp)
	jmp	.L48
.L42:
	jmp	.L49
.L51:
	call	__stack_chk_fail@PLT
.L50:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.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
	.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	con
	.align 32
	.type	con, @object
	.size	con, 448
con:
	.long	0
	.zero	4
	.zero	48
	.long	0
	.zero	4
	.long	0
	.zero	4
	.long	0
	.zero	4
	.long	0
	.zero	4
	.long	0
	.long	3
	.long	0
	.zero	4
	.long	0
	.zero	4
	.long	0
	.zero	4
	.long	0
	.zero	4
	.long	1
	.long	5
	.long	0
	.zero	4
	.long	0
	.zero	4
	.long	0
	.zero	4
	.long	0
	.zero	4
	.long	0
	.zero	4
	.long	0
	.zero	4
	.long	0
	.long	5
	.long	2
	.long	4
	.long	0
	.zero	4
	.long	0
	.zero	4
	.long	0
	.zero	4
	.long	0
	.zero	4
	.long	0
	.zero	4
	.long	0
	.zero	4
	.long	0
	.zero	4
	.long	0
	.zero	4
	.long	0
	.zero	4
	.long	0
	.long	1
	.long	0
	.zero	4
	.long	0
	.zero	4
	.long	0
	.zero	4
	.long	0
	.zero	4
	.long	4
	.long	3
	.long	0
	.zero	4
	.long	1
	.long	1
	.long	0
	.zero	4
	.long	0
	.zero	4
	.long	5
	.long	5
	.long	0
	.zero	4
	.long	0
	.zero	4
	.long	0
	.zero	4
	.long	2
	.long	1
	.long	0
	.zero	4
	.long	0
	.zero	4
	.long	4
	.long	5
	.long	6
	.long	4
	.long	0
	.zero	4
	.long	0
	.zero	4
	.long	3
	.long	1
	.globl	dice
	.bss
	.align 32
	.type	dice, @object
	.size	dice, 64
dice:
	.zero	64
	.globl	kari
	.align 32
	.type	kari, @object
	.size	kari, 64
kari:
	.zero	64
	.globl	f
	.align 8
	.type	f, @object
	.size	f, 9
f:
	.zero	9
	.globl	tr
	.align 32
	.type	tr, @object
	.size	tr, 128
tr:
	.zero	128
	.text
	.globl	rec
	.type	rec, @function
rec:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$64, %rsp
	movl	%edi, -52(%rbp)
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	cmpl	$8, -52(%rbp)
	jne	.L2
	movl	$1, %eax
	jmp	.L26
.L2:
	movl	$0, -40(%rbp)
	jmp	.L4
.L25:
	movl	-40(%rbp), %eax
	cltq
	leaq	f(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	testb	%al, %al
	jne	.L28
	movl	$0, -28(%rbp)
	movl	$1, -36(%rbp)
	jmp	.L7
.L13:
	movl	-36(%rbp), %eax
	movslq	%eax, %rcx
	movl	-52(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$3, %rax
	subq	%rdx, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	4+con(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	je	.L8
	movl	-36(%rbp), %eax
	movslq	%eax, %rcx
	movl	-52(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$3, %rax
	subq	%rdx, %rax
	addq	%rcx, %rax
	leaq	0(,%rax,8), %rdx
	leaq	con(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	-36(%rbp), %eax
	movslq	%eax, %rsi
	movl	-52(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	salq	$3, %rax
	subq	%rdx, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,8), %rdx
	leaq	4+con(%rip), %rax
	movl	(%rdx,%rax), %eax
	movslq	%eax, %rdx
	movslq	%ecx, %rax
	salq	$3, %rax
	addq	%rax, %rdx
	leaq	kari(%rip), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	movsbl	%al, %eax
	cltq
	leaq	tr(%rip), %rdx
	movzbl	(%rax,%rdx), %eax
	movb	%al, -41(%rbp)
	movl	$1, -32(%rbp)
.L12:
	cmpl	$6, -32(%rbp)
	jg	.L29
	movl	-32(%rbp), %eax
	movslq	%eax, %rdx
	movl	-40(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rax, %rdx
	leaq	dice(%rip), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	cmpb	%al, -41(%rbp)
	jne	.L11
	movl	-36(%rbp), %eax
	movl	%eax, %edx
	movl	-28(%rbp), %eax
	cltq
	movb	%dl, -22(%rbp,%rax,2)
	movl	-28(%rbp), %eax
	leal	1(%rax), %edx
	movl	%edx, -28(%rbp)
	cltq
	movzbl	-41(%rbp), %edx
	movb	%dl, -21(%rbp,%rax,2)
	jmp	.L8
.L11:
	addl	$1, -32(%rbp)
	jmp	.L12
.L8:
	addl	$1, -36(%rbp)
.L7:
	cmpl	$6, -36(%rbp)
	jle	.L13
	movl	$0, -36(%rbp)
	jmp	.L14
.L24:
	movl	$1, -32(%rbp)
	jmp	.L15
.L16:
	movl	-32(%rbp), %eax
	movslq	%eax, %rcx
	movl	-36(%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), %eax
	movslq	%eax, %rdx
	movl	-40(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rax, %rdx
	leaq	dice(%rip), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %eax
	movl	-32(%rbp), %edx
	movslq	%edx, %rcx
	movl	-52(%rbp), %edx
	movslq	%edx, %rdx
	salq	$3, %rdx
	addq	%rdx, %rcx
	leaq	kari(%rip), %rdx
	addq	%rcx, %rdx
	movb	%al, (%rdx)
	addl	$1, -32(%rbp)
.L15:
	cmpl	$6, -32(%rbp)
	jle	.L16
	movl	$0, -32(%rbp)
	jmp	.L17
.L20:
	movl	-32(%rbp), %eax
	cltq
	movzbl	-22(%rbp,%rax,2), %eax
	movsbl	%al, %eax
	movslq	%eax, %rdx
	movl	-52(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rax, %rdx
	leaq	kari(%rip), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %edx
	movl	-32(%rbp), %eax
	cltq
	movzbl	-21(%rbp,%rax,2), %eax
	cmpb	%al, %dl
	jne	.L30
	addl	$1, -32(%rbp)
.L17:
	movl	-32(%rbp), %eax
	cmpl	-28(%rbp), %eax
	jl	.L20
	jmp	.L19
.L30:
	nop
.L19:
	movl	-32(%rbp), %eax
	cmpl	-28(%rbp), %eax
	jl	.L31
	movl	-40(%rbp), %eax
	cltq
	leaq	f(%rip), %rdx
	movb	$1, (%rax,%rdx)
	movl	-52(%rbp), %eax
	addl	$1, %eax
	movl	%eax, %edi
	call	rec
	testl	%eax, %eax
	je	.L23
	movl	$1, %eax
	jmp	.L26
.L23:
	movl	-40(%rbp), %eax
	cltq
	leaq	f(%rip), %rdx
	movb	$0, (%rax,%rdx)
	jmp	.L22
.L31:
	nop
.L22:
	addl	$1, -36(%rbp)
.L14:
	cmpl	$23, -36(%rbp)
	jle	.L24
	jmp	.L6
.L10:
.L28:
	nop
	jmp	.L6
.L29:
	nop
.L6:
	addl	$1, -40(%rbp)
.L4:
	cmpl	$7, -40(%rbp)
	jle	.L25
	movl	$0, %eax
.L26:
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L27
	call	__stack_chk_fail@PLT
.L27:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	rec, .-rec
	.section	.rodata
.LC0:
	.string	"NO"
.LC1:
	.string	"YES"
	.text
	.globl	main
	.type	main, @function
main:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -32(%rbp)
	jmp	.L33
.L34:
	movl	-32(%rbp), %eax
	leal	65(%rax), %edx
	movl	-32(%rbp), %eax
	addl	$97, %eax
	movl	%edx, %ecx
	cltq
	leaq	tr(%rip), %rdx
	movb	%cl, (%rax,%rdx)
	movl	-32(%rbp), %eax
	leal	97(%rax), %edx
	movl	-32(%rbp), %eax
	addl	$65, %eax
	movl	%edx, %ecx
	cltq
	leaq	tr(%rip), %rdx
	movb	%cl, (%rax,%rdx)
	addl	$1, -32(%rbp)
.L33:
	cmpl	$25, -32(%rbp)
	jle	.L34
.L49:
	movl	$0, -32(%rbp)
	jmp	.L35
.L40:
	movq	stdin(%rip), %rdx
	leaq	-18(%rbp), %rax
	movl	$10, %esi
	movq	%rax, %rdi
	call	fgets@PLT
	movzbl	-18(%rbp), %eax
	cmpb	$48, %al
	jne	.L36
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L50
	jmp	.L51
.L36:
	movl	$0, -28(%rbp)
	jmp	.L38
.L39:
	movl	-28(%rbp), %eax
	leal	1(%rax), %edx
	movl	-28(%rbp), %eax
	cltq
	movzbl	-18(%rbp,%rax), %eax
	movslq	%edx, %rcx
	movl	-32(%rbp), %edx
	movslq	%edx, %rdx
	salq	$3, %rdx
	addq	%rdx, %rcx
	leaq	dice(%rip), %rdx
	addq	%rcx, %rdx
	movb	%al, (%rdx)
	addl	$1, -28(%rbp)
.L38:
	cmpl	$5, -28(%rbp)
	jle	.L39
	movl	-32(%rbp), %eax
	cltq
	leaq	f(%rip), %rdx
	movb	$0, (%rax,%rdx)
	addl	$1, -32(%rbp)
.L35:
	cmpl	$7, -32(%rbp)
	jle	.L40
	movl	$0, -32(%rbp)
.L48:
	cmpl	$7, -32(%rbp)
	jne	.L41
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L42
.L41:
	movl	-32(%rbp), %eax
	cltq
	leaq	f(%rip), %rdx
	movb	$1, (%rax,%rdx)
	movl	$0, -28(%rbp)
	jmp	.L43
.L47:
	movl	$1, -24(%rbp)
	jmp	.L44
.L45:
	movl	-24(%rbp), %eax
	movslq	%eax, %rcx
	movl	-28(%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), %eax
	movslq	%eax, %rdx
	movl	-32(%rbp), %eax
	cltq
	salq	$3, %rax
	addq	%rax, %rdx
	leaq	dice(%rip), %rax
	addq	%rdx, %rax
	movzbl	(%rax), %edx
	movl	-24(%rbp), %eax
	cltq
	leaq	kari(%rip), %rcx
	movb	%dl, (%rax,%rcx)
	addl	$1, -24(%rbp)
.L44:
	cmpl	$6, -24(%rbp)
	jle	.L45
	movl	$1, %edi
	call	rec
	testl	%eax, %eax
	je	.L46
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
	jmp	.L42
.L46:
	addl	$1, -28(%rbp)
.L43:
	cmpl	$23, -28(%rbp)
	jle	.L47
	movl	-32(%rbp), %eax
	cltq
	leaq	f(%rip), %rdx
	movb	$0, (%rax,%rdx)
	addl	$1, -32(%rbp)
	jmp	.L48
.L42:
	jmp	.L49
.L51:
	call	__stack_chk_fail@PLT
.L50:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.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:
