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

```c
#define X(V,N)0<=V+D[d][N]*(m-1)&&V+D[d][N]*(m-1)<n
D[13][3]={{1,0,0},{0,1,0},{0,0,1},{1,1,0},{1,0,1},{0,1,1},{1,-1,0},{1,0,-1},{0,1,-1},{1,1,1},{-1,1,1},{1,-1,1},{1,1,-1}};
M[7][7][7];main(n,m,p,I,x,y,i,j,k,c,d,z){for(;scanf("%d%d%d",&n,&m,&p),n;){
	for(memset(M,0,sizeof(M)),c=1,I=0;I<p;c*=-1){
		scanf("%d%d",&x,&y),x--,y--,I++;
		for(i=0;;i++)if(!M[x][y][i]){M[x][y][i]=c;break;}
		for(i=0;i<n;i++)for(j=0;j<n;j++)for(k=0;k<n;k++)for(d=0;d<13;d++)if(X(i,0)&&X(j,1)&&X(k,2)){
			for(z=0;z<m;z++)if(M[i+D[d][0]*z][j+D[d][1]*z][k+D[d][2]*z]!=c)break;
			if(z==m){printf("%s %d\n",c==1?"Black":"White",I);goto next;}
		}
	}
	puts("Draw");
next:
	for(;I<p;I++)scanf("%d%d",&x,&y);
}exit(0);}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	D
	.data
	.align 32
	.type	D, @object
	.size	D, 156
D:
	.long	1
	.long	0
	.long	0
	.long	0
	.long	1
	.long	0
	.long	0
	.long	0
	.long	1
	.long	1
	.long	1
	.long	0
	.long	1
	.long	0
	.long	1
	.long	0
	.long	1
	.long	1
	.long	1
	.long	-1
	.long	0
	.long	1
	.long	0
	.long	-1
	.long	0
	.long	1
	.long	-1
	.long	1
	.long	1
	.long	1
	.long	-1
	.long	1
	.long	1
	.long	1
	.long	-1
	.long	1
	.long	1
	.long	1
	.long	-1
	.globl	M
	.bss
	.align 32
	.type	M, @object
	.size	M, 1372
M:
	.zero	1372
	.section	.rodata
.LC0:
	.string	"%d%d"
.LC1:
	.string	"Black"
.LC2:
	.string	"White"
.LC3:
	.string	"%s %d\n"
.LC4:
	.string	"Draw"
.LC5:
	.string	"%d%d%d"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movl	%edi, -4(%rbp)
	movl	%esi, -8(%rbp)
	movl	%edx, -12(%rbp)
	movl	%ecx, -16(%rbp)
	movl	%r8d, -20(%rbp)
	movl	%r9d, -24(%rbp)
	jmp	.L2
.L26:
	movl	$1372, %edx
	movl	$0, %esi
	leaq	M(%rip), %rax
	movq	%rax, %rdi
	call	memset@PLT
	movl	$1, 40(%rbp)
	movl	$0, -16(%rbp)
	jmp	.L3
.L23:
	leaq	-24(%rbp), %rdx
	leaq	-20(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	scanf@PLT
	movl	-20(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -20(%rbp)
	movl	-24(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -24(%rbp)
	addl	$1, -16(%rbp)
	movl	$0, 16(%rbp)
.L6:
	movl	-20(%rbp), %edx
	movl	-24(%rbp), %eax
	movl	16(%rbp), %ecx
	movslq	%ecx, %rsi
	movslq	%edx, %rdx
	movslq	%eax, %rcx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$4, %rax
	addq	%rdx, %rax
	movq	%rcx, %rdx
	salq	$3, %rdx
	subq	%rcx, %rdx
	addq	%rdx, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,4), %rdx
	leaq	M(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	jne	.L4
	movl	-20(%rbp), %edx
	movl	-24(%rbp), %eax
	movl	16(%rbp), %ecx
	movslq	%ecx, %rsi
	movslq	%edx, %rdx
	movslq	%eax, %rcx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$4, %rax
	addq	%rdx, %rax
	movq	%rcx, %rdx
	salq	$3, %rdx
	subq	%rcx, %rdx
	addq	%rdx, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,4), %rcx
	leaq	M(%rip), %rdx
	movl	40(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	nop
	movl	$0, 16(%rbp)
	jmp	.L7
.L4:
	addl	$1, 16(%rbp)
	jmp	.L6
.L22:
	movl	$0, 24(%rbp)
	jmp	.L8
.L21:
	movl	$0, 32(%rbp)
	jmp	.L9
.L20:
	movl	$0, 48(%rbp)
	jmp	.L10
.L19:
	movl	48(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	D(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-8(%rbp), %edx
	subl	$1, %edx
	imull	%eax, %edx
	movl	16(%rbp), %eax
	addl	%edx, %eax
	testl	%eax, %eax
	js	.L11
	movl	48(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	D(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-8(%rbp), %edx
	subl	$1, %edx
	imull	%eax, %edx
	movl	16(%rbp), %eax
	addl	%eax, %edx
	movl	-4(%rbp), %eax
	cmpl	%eax, %edx
	jge	.L11
	movl	48(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	4+D(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-8(%rbp), %edx
	subl	$1, %edx
	imull	%eax, %edx
	movl	24(%rbp), %eax
	addl	%edx, %eax
	testl	%eax, %eax
	js	.L11
	movl	48(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	4+D(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-8(%rbp), %edx
	subl	$1, %edx
	imull	%eax, %edx
	movl	24(%rbp), %eax
	addl	%eax, %edx
	movl	-4(%rbp), %eax
	cmpl	%eax, %edx
	jge	.L11
	movl	48(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	8+D(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-8(%rbp), %edx
	subl	$1, %edx
	imull	%eax, %edx
	movl	32(%rbp), %eax
	addl	%edx, %eax
	testl	%eax, %eax
	js	.L11
	movl	48(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	8+D(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-8(%rbp), %edx
	subl	$1, %edx
	imull	%eax, %edx
	movl	32(%rbp), %eax
	addl	%eax, %edx
	movl	-4(%rbp), %eax
	cmpl	%eax, %edx
	jge	.L11
	movl	$0, 56(%rbp)
	jmp	.L12
.L15:
	movl	48(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	D(%rip), %rax
	movl	(%rdx,%rax), %eax
	imull	56(%rbp), %eax
	movl	%eax, %edx
	movl	16(%rbp), %eax
	leal	(%rdx,%rax), %esi
	movl	48(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	4+D(%rip), %rax
	movl	(%rdx,%rax), %eax
	imull	56(%rbp), %eax
	movl	%eax, %edx
	movl	24(%rbp), %eax
	leal	(%rdx,%rax), %ecx
	movl	48(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	8+D(%rip), %rax
	movl	(%rdx,%rax), %eax
	imull	56(%rbp), %eax
	movl	%eax, %edx
	movl	32(%rbp), %eax
	addl	%edx, %eax
	movslq	%eax, %rdi
	movslq	%esi, %rdx
	movslq	%ecx, %rcx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$4, %rax
	addq	%rdx, %rax
	movq	%rcx, %rdx
	salq	$3, %rdx
	subq	%rcx, %rdx
	addq	%rdx, %rax
	addq	%rdi, %rax
	leaq	0(,%rax,4), %rdx
	leaq	M(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, 40(%rbp)
	jne	.L27
	addl	$1, 56(%rbp)
.L12:
	movl	-8(%rbp), %eax
	cmpl	%eax, 56(%rbp)
	jl	.L15
	jmp	.L14
.L27:
	nop
.L14:
	movl	-8(%rbp), %eax
	cmpl	%eax, 56(%rbp)
	jne	.L11
	cmpl	$1, 40(%rbp)
	jne	.L16
	leaq	.LC1(%rip), %rax
	jmp	.L17
.L16:
	leaq	.LC2(%rip), %rax
.L17:
	movl	-16(%rbp), %edx
	movq	%rax, %rsi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L18
.L11:
	addl	$1, 48(%rbp)
.L10:
	cmpl	$12, 48(%rbp)
	jle	.L19
	addl	$1, 32(%rbp)
.L9:
	movl	-4(%rbp), %eax
	cmpl	%eax, 32(%rbp)
	jl	.L20
	addl	$1, 24(%rbp)
.L8:
	movl	-4(%rbp), %eax
	cmpl	%eax, 24(%rbp)
	jl	.L21
	addl	$1, 16(%rbp)
.L7:
	movl	-4(%rbp), %eax
	cmpl	%eax, 16(%rbp)
	jl	.L22
	negl	40(%rbp)
.L3:
	movl	-12(%rbp), %eax
	cmpl	%eax, -16(%rbp)
	jl	.L23
	leaq	.LC4(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
.L18:
	jmp	.L24
.L25:
	leaq	-24(%rbp), %rdx
	leaq	-20(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	scanf@PLT
	addl	$1, -16(%rbp)
.L24:
	movl	-12(%rbp), %eax
	cmpl	%eax, -16(%rbp)
	jl	.L25
.L2:
	leaq	-12(%rbp), %rcx
	leaq	-8(%rbp), %rdx
	leaq	-4(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC5(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	scanf@PLT
	movl	-4(%rbp), %eax
	testl	%eax, %eax
	jne	.L26
	movl	$0, %edi
	call	exit@PLT
	.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	"Black"
.LC1:
	.string	"White"
.LC2:
	.string	"%d%d"
.LC3:
	.string	"%s %d\n"
.LC4:
	.string	"Draw"
.LC5:
	.string	"%d%d%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	156+D(%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	$120, %rsp
	.cfi_def_cfa_offset 176
	leaq	100(%rsp), %rax
	movl	%edi, 108(%rsp)
	movq	%rax, 56(%rsp)
	leaq	104(%rsp), %rax
	movq	%rax, 64(%rsp)
	leaq	108(%rsp), %rax
	movl	%esi, 104(%rsp)
	movl	%edx, 100(%rsp)
	movl	%r8d, 96(%rsp)
	movl	%r9d, 92(%rsp)
	movq	%rax, 72(%rsp)
.L2:
	movq	56(%rsp), %rcx
	movq	64(%rsp), %rdx
	leaq	.LC5(%rip), %rdi
	xorl	%eax, %eax
	movq	72(%rsp), %rsi
	call	scanf@PLT
	movl	108(%rsp), %eax
	testl	%eax, %eax
	je	.L48
	movl	$171, %ecx
	xorl	%eax, %eax
	movl	100(%rsp), %r11d
	leaq	M(%rip), %rdi
	rep stosq
	movl	$0, (%rdi)
	testl	%r11d, %r11d
	jle	.L23
	leaq	92(%rsp), %rax
	xorl	%r14d, %r14d
	movl	$1, %r13d
	movq	%rax, 40(%rsp)
	leaq	96(%rsp), %rax
	movq	%rax, 48(%rsp)
	leaq	.LC2(%rip), %rax
	movq	%rax, 80(%rsp)
	movl	%r14d, 88(%rsp)
.L19:
	movq	40(%rsp), %rdx
	movq	48(%rsp), %rsi
	xorl	%eax, %eax
	movq	80(%rsp), %rdi
	call	scanf@PLT
	movl	96(%rsp), %eax
	addl	$1, 88(%rsp)
	leal	-1(%rax), %edx
	movl	92(%rsp), %eax
	movl	%edx, 96(%rsp)
	movslq	%edx, %rdx
	imulq	$196, %rdx, %rsi
	leal	-1(%rax), %ecx
	movl	%ecx, 92(%rsp)
	movslq	%ecx, %rcx
	leaq	0(,%rcx,8), %rax
	subq	%rcx, %rax
	leaq	(%rsi,%rax,4), %rsi
	leaq	M(%rip), %rax
	addq	%rax, %rsi
	movl	(%rsi), %eax
	testl	%eax, %eax
	je	.L7
	movl	4(%rsi), %r10d
	testl	%r10d, %r10d
	je	.L24
	movl	8(%rsi), %r9d
	testl	%r9d, %r9d
	je	.L25
	movl	12(%rsi), %r8d
	testl	%r8d, %r8d
	je	.L26
	movl	16(%rsi), %edi
	testl	%edi, %edi
	je	.L27
	cmpl	$1, 20(%rsi)
	movl	$5, %eax
	sbbl	$-1, %eax
.L7:
	leaq	(%rdx,%rdx,2), %rsi
	cltq
	leaq	M(%rip), %rbx
	salq	$4, %rsi
	addq	%rsi, %rdx
	leaq	(%rdx,%rcx,8), %rdx
	subq	%rcx, %rdx
	movl	108(%rsp), %ecx
	addq	%rdx, %rax
	movl	%r13d, (%rbx,%rax,4)
	testl	%ecx, %ecx
	jle	.L5
	movslq	%ecx, %rax
	movl	104(%rsp), %r14d
	movq	%rbx, 32(%rsp)
	movq	%rax, 16(%rsp)
	movq	$0, 24(%rsp)
	leal	-1(%r14), %esi
.L6:
	movq	32(%rsp), %rax
	movl	24(%rsp), %edi
	xorl	%r12d, %r12d
	movq	%rax, 8(%rsp)
.L18:
	movq	8(%rsp), %rbp
	movl	%r12d, %r11d
	xorl	%r10d, %r10d
	.p2align 4,,10
	.p2align 3
.L17:
	leaq	D(%rip), %rdx
	jmp	.L14
	.p2align 4,,10
	.p2align 3
.L8:
	addq	$12, %rdx
	cmpq	%rdx, %r15
	je	.L49
.L14:
	movslq	(%rdx), %r8
	movl	%r8d, %eax
	imull	%esi, %eax
	addl	%edi, %eax
	cmpl	%ecx, %eax
	jge	.L8
	testl	%eax, %eax
	js	.L8
	movl	4(%rdx), %r9d
	movl	%esi, %eax
	imull	%r9d, %eax
	addl	%r11d, %eax
	cmpl	%ecx, %eax
	jge	.L8
	testl	%eax, %eax
	js	.L8
	movslq	8(%rdx), %rbx
	movl	%esi, %eax
	imull	%ebx, %eax
	addl	%r10d, %eax
	cmpl	%ecx, %eax
	jge	.L8
	testl	%eax, %eax
	js	.L8
	testl	%r14d, %r14d
	jle	.L9
	movslq	%r9d, %rax
	leaq	0(,%rax,8), %r9
	subq	%rax, %r9
	leaq	(%r8,%r8,2), %rax
	salq	$4, %rax
	addq	%r8, %rax
	xorl	%r8d, %r8d
	addq	%rax, %r9
	movq	%rbp, %rax
	addq	%rbx, %r9
	salq	$2, %r9
	.p2align 4,,10
	.p2align 3
.L10:
	cmpl	%r13d, (%rax)
	jne	.L8
	addl	$1, %r8d
	addq	%r9, %rax
	cmpl	%r8d, %r14d
	jne	.L10
.L46:
	cmpl	$1, %r13d
	leaq	.LC1(%rip), %rax
	movl	88(%rsp), %r14d
	leaq	.LC0(%rip), %rsi
	cmovne	%rax, %rsi
	leaq	.LC3(%rip), %rdi
	xorl	%eax, %eax
	movl	%r14d, %edx
	call	printf@PLT
.L13:
	cmpl	%r14d, 100(%rsp)
	jle	.L2
	leaq	92(%rsp), %rbx
	leaq	96(%rsp), %rbp
	leaq	.LC2(%rip), %r12
.L21:
	movq	%rbx, %rdx
	movq	%rbp, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	call	scanf@PLT
	addl	$1, %r14d
	cmpl	%r14d, 100(%rsp)
	jg	.L21
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L49:
	addl	$1, %r10d
	addq	$4, %rbp
	cmpl	%ecx, %r10d
	jne	.L17
	addq	$28, 8(%rsp)
	addq	$1, %r12
	cmpq	16(%rsp), %r12
	jne	.L18
	addq	$1, 24(%rsp)
	movq	24(%rsp), %rax
	addq	$196, 32(%rsp)
	cmpq	16(%rsp), %rax
	jne	.L6
.L5:
	movl	88(%rsp), %eax
	negl	%r13d
	cmpl	%eax, 100(%rsp)
	jg	.L19
	movl	%eax, %r14d
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L9:
	jne	.L8
	jmp	.L46
	.p2align 4,,10
	.p2align 3
.L48:
	xorl	%edi, %edi
	call	exit@PLT
.L27:
	movl	$4, %eax
	jmp	.L7
.L26:
	movl	$3, %eax
	jmp	.L7
.L25:
	movl	$2, %eax
	jmp	.L7
.L24:
	movl	$1, %eax
	jmp	.L7
.L23:
	xorl	%r14d, %r14d
.L3:
	leaq	.LC4(%rip), %rdi
	call	puts@PLT
	jmp	.L13
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.globl	M
	.bss
	.align 32
	.type	M, @object
	.size	M, 1372
M:
	.zero	1372
	.globl	D
	.data
	.align 32
	.type	D, @object
	.size	D, 156
D:
	.long	1
	.long	0
	.long	0
	.long	0
	.long	1
	.long	0
	.long	0
	.long	0
	.long	1
	.long	1
	.long	1
	.long	0
	.long	1
	.long	0
	.long	1
	.long	0
	.long	1
	.long	1
	.long	1
	.long	-1
	.long	0
	.long	1
	.long	0
	.long	-1
	.long	0
	.long	1
	.long	-1
	.long	1
	.long	1
	.long	1
	.long	-1
	.long	1
	.long	1
	.long	1
	.long	-1
	.long	1
	.long	1
	.long	1
	.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	"Black"
.LC1:
	.string	"White"
.LC2:
	.string	"%d%d"
.LC3:
	.string	"%s %d\n"
.LC4:
	.string	"Draw"
.LC5:
	.string	"%d%d%d"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	156+D(%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	$120, %rsp
	.cfi_def_cfa_offset 176
	leaq	100(%rsp), %rax
	movl	%edi, 108(%rsp)
	movq	%rax, 56(%rsp)
	leaq	104(%rsp), %rax
	movq	%rax, 64(%rsp)
	leaq	108(%rsp), %rax
	movl	%esi, 104(%rsp)
	movl	%edx, 100(%rsp)
	movl	%r8d, 96(%rsp)
	movl	%r9d, 92(%rsp)
	movq	%rax, 72(%rsp)
.L2:
	movq	56(%rsp), %rcx
	movq	64(%rsp), %rdx
	leaq	.LC5(%rip), %rdi
	xorl	%eax, %eax
	movq	72(%rsp), %rsi
	call	scanf@PLT
	movl	108(%rsp), %eax
	testl	%eax, %eax
	je	.L48
	movl	$171, %ecx
	xorl	%eax, %eax
	movl	100(%rsp), %r11d
	leaq	M(%rip), %rdi
	rep stosq
	movl	$0, (%rdi)
	testl	%r11d, %r11d
	jle	.L23
	leaq	92(%rsp), %rax
	xorl	%r14d, %r14d
	movl	$1, %r13d
	movq	%rax, 40(%rsp)
	leaq	96(%rsp), %rax
	movq	%rax, 48(%rsp)
	leaq	.LC2(%rip), %rax
	movq	%rax, 80(%rsp)
	movl	%r14d, 88(%rsp)
.L19:
	movq	40(%rsp), %rdx
	movq	48(%rsp), %rsi
	xorl	%eax, %eax
	movq	80(%rsp), %rdi
	call	scanf@PLT
	movl	96(%rsp), %eax
	addl	$1, 88(%rsp)
	leal	-1(%rax), %edx
	movl	92(%rsp), %eax
	movl	%edx, 96(%rsp)
	movslq	%edx, %rdx
	imulq	$196, %rdx, %rsi
	leal	-1(%rax), %ecx
	movl	%ecx, 92(%rsp)
	movslq	%ecx, %rcx
	leaq	0(,%rcx,8), %rax
	subq	%rcx, %rax
	leaq	(%rsi,%rax,4), %rsi
	leaq	M(%rip), %rax
	addq	%rax, %rsi
	movl	(%rsi), %eax
	testl	%eax, %eax
	je	.L7
	movl	4(%rsi), %r10d
	testl	%r10d, %r10d
	je	.L24
	movl	8(%rsi), %r9d
	testl	%r9d, %r9d
	je	.L25
	movl	12(%rsi), %r8d
	testl	%r8d, %r8d
	je	.L26
	movl	16(%rsi), %edi
	testl	%edi, %edi
	je	.L27
	cmpl	$1, 20(%rsi)
	movl	$5, %eax
	sbbl	$-1, %eax
.L7:
	leaq	(%rdx,%rdx,2), %rsi
	cltq
	leaq	M(%rip), %rbx
	salq	$4, %rsi
	addq	%rsi, %rdx
	leaq	(%rdx,%rcx,8), %rdx
	subq	%rcx, %rdx
	movl	108(%rsp), %ecx
	addq	%rdx, %rax
	movl	%r13d, (%rbx,%rax,4)
	testl	%ecx, %ecx
	jle	.L5
	movslq	%ecx, %rax
	movl	104(%rsp), %r14d
	movq	%rbx, 32(%rsp)
	movq	%rax, 16(%rsp)
	movq	$0, 24(%rsp)
	leal	-1(%r14), %esi
.L6:
	movq	32(%rsp), %rax
	movl	24(%rsp), %edi
	xorl	%r12d, %r12d
	movq	%rax, 8(%rsp)
.L18:
	movq	8(%rsp), %rbp
	movl	%r12d, %r11d
	xorl	%r10d, %r10d
	.p2align 4,,10
	.p2align 3
.L17:
	leaq	D(%rip), %rdx
	jmp	.L14
	.p2align 4,,10
	.p2align 3
.L8:
	addq	$12, %rdx
	cmpq	%rdx, %r15
	je	.L49
.L14:
	movslq	(%rdx), %r8
	movl	%r8d, %eax
	imull	%esi, %eax
	addl	%edi, %eax
	cmpl	%ecx, %eax
	jge	.L8
	testl	%eax, %eax
	js	.L8
	movl	4(%rdx), %r9d
	movl	%esi, %eax
	imull	%r9d, %eax
	addl	%r11d, %eax
	cmpl	%ecx, %eax
	jge	.L8
	testl	%eax, %eax
	js	.L8
	movslq	8(%rdx), %rbx
	movl	%esi, %eax
	imull	%ebx, %eax
	addl	%r10d, %eax
	cmpl	%ecx, %eax
	jge	.L8
	testl	%eax, %eax
	js	.L8
	testl	%r14d, %r14d
	jle	.L9
	movslq	%r9d, %rax
	leaq	0(,%rax,8), %r9
	subq	%rax, %r9
	leaq	(%r8,%r8,2), %rax
	salq	$4, %rax
	addq	%r8, %rax
	xorl	%r8d, %r8d
	addq	%rax, %r9
	movq	%rbp, %rax
	addq	%rbx, %r9
	salq	$2, %r9
	.p2align 4,,10
	.p2align 3
.L10:
	cmpl	%r13d, (%rax)
	jne	.L8
	addl	$1, %r8d
	addq	%r9, %rax
	cmpl	%r8d, %r14d
	jne	.L10
.L46:
	cmpl	$1, %r13d
	leaq	.LC1(%rip), %rax
	movl	88(%rsp), %r14d
	leaq	.LC0(%rip), %rsi
	cmovne	%rax, %rsi
	leaq	.LC3(%rip), %rdi
	xorl	%eax, %eax
	movl	%r14d, %edx
	call	printf@PLT
.L13:
	cmpl	%r14d, 100(%rsp)
	jle	.L2
	leaq	92(%rsp), %rbx
	leaq	96(%rsp), %rbp
	leaq	.LC2(%rip), %r12
.L21:
	movq	%rbx, %rdx
	movq	%rbp, %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	call	scanf@PLT
	addl	$1, %r14d
	cmpl	%r14d, 100(%rsp)
	jg	.L21
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L49:
	addl	$1, %r10d
	addq	$4, %rbp
	cmpl	%ecx, %r10d
	jne	.L17
	addq	$28, 8(%rsp)
	addq	$1, %r12
	cmpq	16(%rsp), %r12
	jne	.L18
	addq	$1, 24(%rsp)
	movq	24(%rsp), %rax
	addq	$196, 32(%rsp)
	cmpq	16(%rsp), %rax
	jne	.L6
.L5:
	movl	88(%rsp), %eax
	negl	%r13d
	cmpl	%eax, 100(%rsp)
	jg	.L19
	movl	%eax, %r14d
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L9:
	jne	.L8
	jmp	.L46
	.p2align 4,,10
	.p2align 3
.L48:
	xorl	%edi, %edi
	call	exit@PLT
.L27:
	movl	$4, %eax
	jmp	.L7
.L26:
	movl	$3, %eax
	jmp	.L7
.L25:
	movl	$2, %eax
	jmp	.L7
.L24:
	movl	$1, %eax
	jmp	.L7
.L23:
	xorl	%r14d, %r14d
.L3:
	leaq	.LC4(%rip), %rdi
	call	puts@PLT
	jmp	.L13
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.globl	M
	.bss
	.align 32
	.type	M, @object
	.size	M, 1372
M:
	.zero	1372
	.globl	D
	.data
	.align 32
	.type	D, @object
	.size	D, 156
D:
	.long	1
	.long	0
	.long	0
	.long	0
	.long	1
	.long	0
	.long	0
	.long	0
	.long	1
	.long	1
	.long	1
	.long	0
	.long	1
	.long	0
	.long	1
	.long	0
	.long	1
	.long	1
	.long	1
	.long	-1
	.long	0
	.long	1
	.long	0
	.long	-1
	.long	0
	.long	1
	.long	-1
	.long	1
	.long	1
	.long	1
	.long	-1
	.long	1
	.long	1
	.long	1
	.long	-1
	.long	1
	.long	1
	.long	1
	.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:

#define X(V,N)0<=V+D[d][N]*(m-1)&&V+D[d][N]*(m-1)<n
D[13][3]={{1,0,0},{0,1,0},{0,0,1},{1,1,0},{1,0,1},{0,1,1},{1,-1,0},{1,0,-1},{0,1,-1},{1,1,1},{-1,1,1},{1,-1,1},{1,1,-1}};
M[7][7][7];main(n,m,p,I,x,y,i,j,k,c,d,z){for(;scanf("%d%d%d",&n,&m,&p),n;){
	for(memset(M,0,sizeof(M)),c=1,I=0;I<p;c*=-1){
		scanf("%d%d",&x,&y),x--,y--,I++;
		for(i=0;;i++)if(!M[x][y][i]){M[x][y][i]=c;break;}
		for(i=0;i<n;i++)for(j=0;j<n;j++)for(k=0;k<n;k++)for(d=0;d<13;d++)if(X(i,0)&&X(j,1)&&X(k,2)){
			for(z=0;z<m;z++)if(M[i+D[d][0]*z][j+D[d][1]*z][k+D[d][2]*z]!=c)break;
			if(z==m){printf("%s %d\n",c==1?"Black":"White",I);goto next;}
		}
	}
	puts("Draw");
next:
	for(;I<p;I++)scanf("%d%d",&x,&y);
}exit(0);}
3 3 3
1 1
1 1
1 1
3 3 7
2 2
1 3
1 1
2 3
2 1
3 3
3 1
4 3 15
1 1
0 2
1 1
3 3
3 3
1 1
3 3
3 3
4 4
1 1
4 4
4 4
4 4
4 1
2 2
0 0 0
 3 3 3
1 1
1 1
1 1
3 3 7
3 2
1 3
1 1
2 3
2 1
3 3
3 1
4 3 15
1 1
2 2
1 1
3 3
3 3
1 1
3 3
3 3
4 4
1 1
4 4
4 4
4 4
4 1
2 2
0 0 0
 3 3 3
1 1
1 1
1 1
3 3 7
3 3
1 3
1 1
2 3
2 1
3 3
3 1
4 3 15
1 1
2 2
1 1
3 3
3 3
1 1
3 3
3 3
4 4
1 1
4 4
4 4
4 4
4 1
2 2
0 0 0
 3 3 3
1 1
1 1
1 1
3 3 7
3 3
1 3
1 1
2 3
2 1
3 3
3 1
4 3 15
1 1
0 2
1 1
3 3
3 3
1 1
3 3
3 3
4 4
1 1
4 4
4 4
4 4
4 1
2 2
0 0 0
 3 3 3
1 1
1 1
1 1
3 3 7
3 3
1 3
2 1
2 3
2 1
3 3
3 1
4 3 15
1 1
0 2
1 1
3 3
3 3
1 1
3 3
3 3
4 4
1 1
4 4
4 4
4 4
4 1
2 2
0 0 0
 3 3 3
1 1
1 1
1 1
3 3 7
3 3
1 3
1 1
2 3
2 1
3 3
3 1
4 3 15
2 1
0 1
1 1
1 3
3 3
1 1
3 3
3 3
4 4
1 1
4 4
4 4
4 4
1 1
4 2
0 0 0
 3 3 3
1 1
1 1
1 1
3 3 7
3 3
1 3
1 1
2 1
2 1
3 3
3 1
4 3 15
1 1
2 2
1 1
3 3
3 3
1 1
3 3
3 3
4 2
1 1
4 4
4 4
4 4
4 1
2 2
0 0 0
 3 3 3
1 1
1 0
1 1
3 3 7
3 3
1 3
1 1
2 3
2 1
3 3
3 1
4 3 15
2 1
0 1
1 2
1 3
3 3
1 1
3 3
3 3
4 4
1 1
4 4
4 1
4 4
4 1
4 2
0 0 0
 3 3 3
1 0
1 1
1 1
3 3 7
2 1
1 3
1 1
2 3
2 1
3 3
3 1
4 3 15
1 0
0 2
1 1
3 3
1 3
1 1
3 1
3 3
4 4
1 1
4 4
1 4
4 4
3 1
2 2
0 0 0
 3 3 3
1 0
1 1
1 1
3 3 7
2 1
1 3
2 1
2 3
2 1
3 3
3 1
4 3 15
1 0
0 2
1 1
3 3
1 3
1 1
3 1
3 3
4 4
1 1
4 4
1 4
4 4
3 1
2 2
0 0 0

Draw
White 6
Draw
 Draw
White 6
Black 15
 Draw
Black 7
Black 15
 Draw
Black 7
Draw
 Draw
Draw
Draw
 Draw
Black 7
White 14
 Draw
Draw
Black 15
 Draw
Black 7
Black 13
 Draw
White 6
Black 15
 Draw
Black 5
Black 15

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

```c
#define X(V,N)0<=V+D[d][N]*(m-1)&&V+D[d][N]*(m-1)<n
D[13][3]={{1,0,0},{0,1,0},{0,0,1},{1,1,0},{1,0,1},{0,1,1},{1,-1,0},{1,0,-1},{0,1,-1},{1,1,1},{-1,1,1},{1,-1,1},{1,1,-1}};
M[7][7][7];main(n,m,p,I,x,y,i,j,k,c,d,z){for(;scanf("%d%d%d",&n,&m,&p),n;){
	for(memset(M,0,sizeof(M)),c=1,I=0;I<p;c*=-1){
		scanf("%d%d",&x,&y),x--,y--,I++;
		for(i=0;;i++)if(!M[x][y][i]){M[x][y][i]=c;break;}
		for(i=0;i<n;i++)for(j=0;j<n;j++)for(k=0;k<n;k++)for(d=0;d<13;d++)if(X(i,0)&&X(j,1)&&X(k,2)){
			for(z=0;z<m;z++)if(M[i+D[d][0]*z][j+D[d][1]*z][k+D[d][2]*z]!=c)break;
			if(z==m){printf("%s %d\n",c==1?"Black":"White",I);goto next;}
		}
	}
	puts("Draw");
next:
	for(;I<p;I++)scanf("%d%d",&x,&y);
}exit(0);}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	D
	.data
	.align 32
	.type	D, @object
	.size	D, 156
D:
	.long	1
	.long	0
	.long	0
	.long	0
	.long	1
	.long	0
	.long	0
	.long	0
	.long	1
	.long	1
	.long	1
	.long	0
	.long	1
	.long	0
	.long	1
	.long	0
	.long	1
	.long	1
	.long	1
	.long	-1
	.long	0
	.long	1
	.long	0
	.long	-1
	.long	0
	.long	1
	.long	-1
	.long	1
	.long	1
	.long	1
	.long	-1
	.long	1
	.long	1
	.long	1
	.long	-1
	.long	1
	.long	1
	.long	1
	.long	-1
	.globl	M
	.bss
	.align 32
	.type	M, @object
	.size	M, 1372
M:
	.zero	1372
	.section	.rodata
.LC0:
	.string	"%d%d"
.LC1:
	.string	"Black"
.LC2:
	.string	"White"
.LC3:
	.string	"%s %d\n"
.LC4:
	.string	"Draw"
.LC5:
	.string	"%d%d%d"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movl	%edi, -4(%rbp)
	movl	%esi, -8(%rbp)
	movl	%edx, -12(%rbp)
	movl	%ecx, -16(%rbp)
	movl	%r8d, -20(%rbp)
	movl	%r9d, -24(%rbp)
	jmp	.L2
.L26:
	movl	$1372, %edx
	movl	$0, %esi
	leaq	M(%rip), %rax
	movq	%rax, %rdi
	call	memset@PLT
	movl	$1, 40(%rbp)
	movl	$0, -16(%rbp)
	jmp	.L3
.L23:
	leaq	-24(%rbp), %rdx
	leaq	-20(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	scanf@PLT
	movl	-20(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -20(%rbp)
	movl	-24(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -24(%rbp)
	addl	$1, -16(%rbp)
	movl	$0, 16(%rbp)
.L6:
	movl	-20(%rbp), %edx
	movl	-24(%rbp), %eax
	movl	16(%rbp), %ecx
	movslq	%ecx, %rsi
	movslq	%edx, %rdx
	movslq	%eax, %rcx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$4, %rax
	addq	%rdx, %rax
	movq	%rcx, %rdx
	salq	$3, %rdx
	subq	%rcx, %rdx
	addq	%rdx, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,4), %rdx
	leaq	M(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	jne	.L4
	movl	-20(%rbp), %edx
	movl	-24(%rbp), %eax
	movl	16(%rbp), %ecx
	movslq	%ecx, %rsi
	movslq	%edx, %rdx
	movslq	%eax, %rcx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$4, %rax
	addq	%rdx, %rax
	movq	%rcx, %rdx
	salq	$3, %rdx
	subq	%rcx, %rdx
	addq	%rdx, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,4), %rcx
	leaq	M(%rip), %rdx
	movl	40(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	nop
	movl	$0, 16(%rbp)
	jmp	.L7
.L4:
	addl	$1, 16(%rbp)
	jmp	.L6
.L22:
	movl	$0, 24(%rbp)
	jmp	.L8
.L21:
	movl	$0, 32(%rbp)
	jmp	.L9
.L20:
	movl	$0, 48(%rbp)
	jmp	.L10
.L19:
	movl	48(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	D(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-8(%rbp), %edx
	subl	$1, %edx
	imull	%eax, %edx
	movl	16(%rbp), %eax
	addl	%edx, %eax
	testl	%eax, %eax
	js	.L11
	movl	48(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	D(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-8(%rbp), %edx
	subl	$1, %edx
	imull	%eax, %edx
	movl	16(%rbp), %eax
	addl	%eax, %edx
	movl	-4(%rbp), %eax
	cmpl	%eax, %edx
	jge	.L11
	movl	48(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	4+D(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-8(%rbp), %edx
	subl	$1, %edx
	imull	%eax, %edx
	movl	24(%rbp), %eax
	addl	%edx, %eax
	testl	%eax, %eax
	js	.L11
	movl	48(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	4+D(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-8(%rbp), %edx
	subl	$1, %edx
	imull	%eax, %edx
	movl	24(%rbp), %eax
	addl	%eax, %edx
	movl	-4(%rbp), %eax
	cmpl	%eax, %edx
	jge	.L11
	movl	48(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	8+D(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-8(%rbp), %edx
	subl	$1, %edx
	imull	%eax, %edx
	movl	32(%rbp), %eax
	addl	%edx, %eax
	testl	%eax, %eax
	js	.L11
	movl	48(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	8+D(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-8(%rbp), %edx
	subl	$1, %edx
	imull	%eax, %edx
	movl	32(%rbp), %eax
	addl	%eax, %edx
	movl	-4(%rbp), %eax
	cmpl	%eax, %edx
	jge	.L11
	movl	$0, 56(%rbp)
	jmp	.L12
.L15:
	movl	48(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	D(%rip), %rax
	movl	(%rdx,%rax), %eax
	imull	56(%rbp), %eax
	movl	%eax, %edx
	movl	16(%rbp), %eax
	leal	(%rdx,%rax), %esi
	movl	48(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	4+D(%rip), %rax
	movl	(%rdx,%rax), %eax
	imull	56(%rbp), %eax
	movl	%eax, %edx
	movl	24(%rbp), %eax
	leal	(%rdx,%rax), %ecx
	movl	48(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	8+D(%rip), %rax
	movl	(%rdx,%rax), %eax
	imull	56(%rbp), %eax
	movl	%eax, %edx
	movl	32(%rbp), %eax
	addl	%edx, %eax
	movslq	%eax, %rdi
	movslq	%esi, %rdx
	movslq	%ecx, %rcx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$4, %rax
	addq	%rdx, %rax
	movq	%rcx, %rdx
	salq	$3, %rdx
	subq	%rcx, %rdx
	addq	%rdx, %rax
	addq	%rdi, %rax
	leaq	0(,%rax,4), %rdx
	leaq	M(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, 40(%rbp)
	jne	.L27
	addl	$1, 56(%rbp)
.L12:
	movl	-8(%rbp), %eax
	cmpl	%eax, 56(%rbp)
	jl	.L15
	jmp	.L14
.L27:
	nop
.L14:
	movl	-8(%rbp), %eax
	cmpl	%eax, 56(%rbp)
	jne	.L11
	cmpl	$1, 40(%rbp)
	jne	.L16
	leaq	.LC1(%rip), %rax
	jmp	.L17
.L16:
	leaq	.LC2(%rip), %rax
.L17:
	movl	-16(%rbp), %edx
	movq	%rax, %rsi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L18
.L11:
	addl	$1, 48(%rbp)
.L10:
	cmpl	$12, 48(%rbp)
	jle	.L19
	addl	$1, 32(%rbp)
.L9:
	movl	-4(%rbp), %eax
	cmpl	%eax, 32(%rbp)
	jl	.L20
	addl	$1, 24(%rbp)
.L8:
	movl	-4(%rbp), %eax
	cmpl	%eax, 24(%rbp)
	jl	.L21
	addl	$1, 16(%rbp)
.L7:
	movl	-4(%rbp), %eax
	cmpl	%eax, 16(%rbp)
	jl	.L22
	negl	40(%rbp)
.L3:
	movl	-12(%rbp), %eax
	cmpl	%eax, -16(%rbp)
	jl	.L23
	leaq	.LC4(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
.L18:
	jmp	.L24
.L25:
	leaq	-24(%rbp), %rdx
	leaq	-20(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	scanf@PLT
	addl	$1, -16(%rbp)
.L24:
	movl	-12(%rbp), %eax
	cmpl	%eax, -16(%rbp)
	jl	.L25
.L2:
	leaq	-12(%rbp), %rcx
	leaq	-8(%rbp), %rdx
	leaq	-4(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC5(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	scanf@PLT
	movl	-4(%rbp), %eax
	testl	%eax, %eax
	jne	.L26
	movl	$0, %edi
	call	exit@PLT
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
```

Only output the optimized assembly code. Do not include any other text. Do not write any comments in the assembly code. Wrap the assembly code in ```assembly``` tags.
train
	.file	"temp.c"
	.text
	.globl	D
	.data
	.align 32
	.type	D, @object
	.size	D, 156
D:
	.long	1
	.long	0
	.long	0
	.long	0
	.long	1
	.long	0
	.long	0
	.long	0
	.long	1
	.long	1
	.long	1
	.long	0
	.long	1
	.long	0
	.long	1
	.long	0
	.long	1
	.long	1
	.long	1
	.long	-1
	.long	0
	.long	1
	.long	0
	.long	-1
	.long	0
	.long	1
	.long	-1
	.long	1
	.long	1
	.long	1
	.long	-1
	.long	1
	.long	1
	.long	1
	.long	-1
	.long	1
	.long	1
	.long	1
	.long	-1
	.globl	M
	.bss
	.align 32
	.type	M, @object
	.size	M, 1372
M:
	.zero	1372
	.section	.rodata
.LC0:
	.string	"%d%d"
.LC1:
	.string	"Black"
.LC2:
	.string	"White"
.LC3:
	.string	"%s %d\n"
.LC4:
	.string	"Draw"
.LC5:
	.string	"%d%d%d"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movl	%edi, -4(%rbp)
	movl	%esi, -8(%rbp)
	movl	%edx, -12(%rbp)
	movl	%ecx, -16(%rbp)
	movl	%r8d, -20(%rbp)
	movl	%r9d, -24(%rbp)
	jmp	.L2
.L26:
	movl	$1372, %edx
	movl	$0, %esi
	leaq	M(%rip), %rax
	movq	%rax, %rdi
	call	memset@PLT
	movl	$1, 40(%rbp)
	movl	$0, -16(%rbp)
	jmp	.L3
.L23:
	leaq	-24(%rbp), %rdx
	leaq	-20(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	scanf@PLT
	movl	-20(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -20(%rbp)
	movl	-24(%rbp), %eax
	subl	$1, %eax
	movl	%eax, -24(%rbp)
	addl	$1, -16(%rbp)
	movl	$0, 16(%rbp)
.L6:
	movl	-20(%rbp), %edx
	movl	-24(%rbp), %eax
	movl	16(%rbp), %ecx
	movslq	%ecx, %rsi
	movslq	%edx, %rdx
	movslq	%eax, %rcx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$4, %rax
	addq	%rdx, %rax
	movq	%rcx, %rdx
	salq	$3, %rdx
	subq	%rcx, %rdx
	addq	%rdx, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,4), %rdx
	leaq	M(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	jne	.L4
	movl	-20(%rbp), %edx
	movl	-24(%rbp), %eax
	movl	16(%rbp), %ecx
	movslq	%ecx, %rsi
	movslq	%edx, %rdx
	movslq	%eax, %rcx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$4, %rax
	addq	%rdx, %rax
	movq	%rcx, %rdx
	salq	$3, %rdx
	subq	%rcx, %rdx
	addq	%rdx, %rax
	addq	%rsi, %rax
	leaq	0(,%rax,4), %rcx
	leaq	M(%rip), %rdx
	movl	40(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	nop
	movl	$0, 16(%rbp)
	jmp	.L7
.L4:
	addl	$1, 16(%rbp)
	jmp	.L6
.L22:
	movl	$0, 24(%rbp)
	jmp	.L8
.L21:
	movl	$0, 32(%rbp)
	jmp	.L9
.L20:
	movl	$0, 48(%rbp)
	jmp	.L10
.L19:
	movl	48(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	D(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-8(%rbp), %edx
	subl	$1, %edx
	imull	%eax, %edx
	movl	16(%rbp), %eax
	addl	%edx, %eax
	testl	%eax, %eax
	js	.L11
	movl	48(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	D(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-8(%rbp), %edx
	subl	$1, %edx
	imull	%eax, %edx
	movl	16(%rbp), %eax
	addl	%eax, %edx
	movl	-4(%rbp), %eax
	cmpl	%eax, %edx
	jge	.L11
	movl	48(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	4+D(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-8(%rbp), %edx
	subl	$1, %edx
	imull	%eax, %edx
	movl	24(%rbp), %eax
	addl	%edx, %eax
	testl	%eax, %eax
	js	.L11
	movl	48(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	4+D(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-8(%rbp), %edx
	subl	$1, %edx
	imull	%eax, %edx
	movl	24(%rbp), %eax
	addl	%eax, %edx
	movl	-4(%rbp), %eax
	cmpl	%eax, %edx
	jge	.L11
	movl	48(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	8+D(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-8(%rbp), %edx
	subl	$1, %edx
	imull	%eax, %edx
	movl	32(%rbp), %eax
	addl	%edx, %eax
	testl	%eax, %eax
	js	.L11
	movl	48(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	8+D(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-8(%rbp), %edx
	subl	$1, %edx
	imull	%eax, %edx
	movl	32(%rbp), %eax
	addl	%eax, %edx
	movl	-4(%rbp), %eax
	cmpl	%eax, %edx
	jge	.L11
	movl	$0, 56(%rbp)
	jmp	.L12
.L15:
	movl	48(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	D(%rip), %rax
	movl	(%rdx,%rax), %eax
	imull	56(%rbp), %eax
	movl	%eax, %edx
	movl	16(%rbp), %eax
	leal	(%rdx,%rax), %esi
	movl	48(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	4+D(%rip), %rax
	movl	(%rdx,%rax), %eax
	imull	56(%rbp), %eax
	movl	%eax, %edx
	movl	24(%rbp), %eax
	leal	(%rdx,%rax), %ecx
	movl	48(%rbp), %eax
	movslq	%eax, %rdx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$2, %rax
	movq	%rax, %rdx
	leaq	8+D(%rip), %rax
	movl	(%rdx,%rax), %eax
	imull	56(%rbp), %eax
	movl	%eax, %edx
	movl	32(%rbp), %eax
	addl	%edx, %eax
	movslq	%eax, %rdi
	movslq	%esi, %rdx
	movslq	%ecx, %rcx
	movq	%rdx, %rax
	addq	%rax, %rax
	addq	%rdx, %rax
	salq	$4, %rax
	addq	%rdx, %rax
	movq	%rcx, %rdx
	salq	$3, %rdx
	subq	%rcx, %rdx
	addq	%rdx, %rax
	addq	%rdi, %rax
	leaq	0(,%rax,4), %rdx
	leaq	M(%rip), %rax
	movl	(%rdx,%rax), %eax
	cmpl	%eax, 40(%rbp)
	jne	.L27
	addl	$1, 56(%rbp)
.L12:
	movl	-8(%rbp), %eax
	cmpl	%eax, 56(%rbp)
	jl	.L15
	jmp	.L14
.L27:
	nop
.L14:
	movl	-8(%rbp), %eax
	cmpl	%eax, 56(%rbp)
	jne	.L11
	cmpl	$1, 40(%rbp)
	jne	.L16
	leaq	.LC1(%rip), %rax
	jmp	.L17
.L16:
	leaq	.LC2(%rip), %rax
.L17:
	movl	-16(%rbp), %edx
	movq	%rax, %rsi
	leaq	.LC3(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	jmp	.L18
.L11:
	addl	$1, 48(%rbp)
.L10:
	cmpl	$12, 48(%rbp)
	jle	.L19
	addl	$1, 32(%rbp)
.L9:
	movl	-4(%rbp), %eax
	cmpl	%eax, 32(%rbp)
	jl	.L20
	addl	$1, 24(%rbp)
.L8:
	movl	-4(%rbp), %eax
	cmpl	%eax, 24(%rbp)
	jl	.L21
	addl	$1, 16(%rbp)
.L7:
	movl	-4(%rbp), %eax
	cmpl	%eax, 16(%rbp)
	jl	.L22
	negl	40(%rbp)
.L3:
	movl	-12(%rbp), %eax
	cmpl	%eax, -16(%rbp)
	jl	.L23
	leaq	.LC4(%rip), %rax
	movq	%rax, %rdi
	call	puts@PLT
.L18:
	jmp	.L24
.L25:
	leaq	-24(%rbp), %rdx
	leaq	-20(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	scanf@PLT
	addl	$1, -16(%rbp)
.L24:
	movl	-12(%rbp), %eax
	cmpl	%eax, -16(%rbp)
	jl	.L25
.L2:
	leaq	-12(%rbp), %rcx
	leaq	-8(%rbp), %rdx
	leaq	-4(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC5(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	scanf@PLT
	movl	-4(%rbp), %eax
	testl	%eax, %eax
	jne	.L26
	movl	$0, %edi
	call	exit@PLT
	.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:
