// File: /workspace/github_cpp_makefile_star2_O3/tewalds[P]morat/gomoku/board.cpp
// Function: Morat::Gomoku::Board::to_s(bool, std::function<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> (Morat::Move)>) const
std::string Board::to_s(bool color, std::function<std::string(Move)> func) const {
	using std::string;
	string white = "O",
	       black = "@",
	       coord = "",
	       reset = "";
	if(color){
		string esc = "\033";
		reset = esc + "[0m";
		coord = esc + "[1;37m";
		white = esc + "[1;33m" + "@"; //yellow
		black = esc + "[1;34m" + "@"; //blue
	}

	string s;
	s += "  ";
	for(int i = 0; i < size_; i++)
		s += " " + coord + char('A' + i);
	s += "\n";

	for(int y = 0; y < size_; y++){
		if (y + 1 < 10)
			s += ' ';
		s += coord + to_str(y + 1);
		int end = line_end(y);
		for(int x = line_start(y); x < end; x++){
			s += (last_move_ == Move(x, y)   ? coord + "[" :
			      last_move_ == Move(x-1, y) ? coord + "]" : " ");
			Side p = get(x, y);
			if(     p == Side::NONE) s += reset + func(Move(x, y));
			else if(p == Side::P1)   s += white;
			else if(p == Side::P2)   s += black;
			else                     s += "?";
		}
		s += (last_move_ == Move(end-1, y) ? coord + "]" : " ");
		s += '\n';
	}

	s += reset;
	return s;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x108, %rsp            # imm = 0x108
movl %edx, %ebp
movq %rsi, %r15
movq %rdi, 0x20(%rsp)
leaq 0xf8(%rsp), %rax
leaq 0x13ef8(%rip), %rsi     # 0x31854
leaq 0x13ef2(%rip), %rdx     # 0x31855
leaq 0xe8(%rsp), %rdi
movq %rcx, 0xc0(%rsp)
movq %rax, -0x10(%rax)
callq 0xaf4e
leaq 0xd8(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x12dcf(%rip), %rsi     # 0x3075e
leaq 0x12dc9(%rip), %rdx     # 0x3075f
leaq 0xc8(%rsp), %rdi
callq 0xaf4e
leaq 0x60(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0xff23(%rip), %rdx      # 0x2d8d6
leaq 0x50(%rsp), %rdi
movq %rdx, %rsi
callq 0xaf4e
leaq 0xa8(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0xff03(%rip), %rdx      # 0x2d8d6
leaq 0x98(%rsp), %rdi
movq %rdx, %rsi
callq 0xaf4e
leaq 0x10(%rsp), %r12
testb %bpl, %bpl
je 0x1dc26
movq %rsp, %rdi
movq %r12, (%rdi)
leaq 0x12d62(%rip), %rsi     # 0x30760
leaq 0x12d5c(%rip), %rdx     # 0x30761
callq 0xaf4e
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
leaq 0x38(%rsp), %r12
movq %r12, -0x10(%r12)
addq %rsi, %rdx
leaq 0x28(%rsp), %rdi
callq 0xa6f0
leaq 0x12d31(%rip), %rsi     # 0x30762
leaq 0x28(%rsp), %rdi
callq 0x56e0
leaq 0x28(%rsp), %r13
leaq 0x98(%rsp), %rdi
movq %r13, %rsi
callq 0x5430
movq (%r13), %rdi
cmpq %r12, %rdi
je 0x1da5e
callq 0x52e0
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
leaq 0x28(%rsp), %rdi
movq %r12, (%rdi)
addq %rsi, %rdx
callq 0xa6f0
leaq 0x12ce8(%rip), %rsi     # 0x30766
leaq 0x28(%rsp), %rdi
callq 0x56e0
leaq 0x28(%rsp), %r13
leaq 0x50(%rsp), %rdi
movq %r13, %rsi
callq 0x5430
movq (%r13), %rdi
cmpq %r12, %rdi
je 0x1daa8
callq 0x52e0
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
leaq 0x88(%rsp), %rbx
movq %rbx, -0x10(%rbx)
addq %rsi, %rdx
leaq 0x78(%rsp), %rdi
callq 0xa6f0
leaq 0x12c9c(%rip), %rsi     # 0x3076d
leaq 0x78(%rsp), %rdi
callq 0x56e0
leaq 0x12c7c(%rip), %rsi     # 0x3075e
leaq 0x78(%rsp), %rdi
callq 0x56e0
movq %r12, 0x28(%rsp)
movq %rax, %rcx
addq $0x10, %rcx
movq (%rax), %rdx
cmpq %rcx, %rdx
je 0x1db0f
movq %rdx, 0x28(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x38(%rsp)
jmp 0x1db19
vmovups (%rcx), %xmm0
vmovups %xmm0, (%r12)
movq 0x8(%rax), %rdx
leaq 0x28(%rsp), %r13
leaq 0xe8(%rsp), %rdi
movq %r13, %rsi
movq %rdx, 0x8(%r13)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
callq 0x5430
movq (%r13), %rdi
cmpq %r12, %rdi
je 0x1db53
callq 0x52e0
movq 0x78(%rsp), %rdi
cmpq %rbx, %rdi
je 0x1db62
callq 0x52e0
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
leaq 0x78(%rsp), %rdi
movq %rbx, (%rdi)
addq %rsi, %rdx
callq 0xa6f0
leaq 0x12bf2(%rip), %rsi     # 0x30774
leaq 0x78(%rsp), %rdi
callq 0x56e0
leaq 0x12bcb(%rip), %rsi     # 0x3075e
leaq 0x78(%rsp), %rdi
callq 0x56e0
movq %r12, 0x28(%rsp)
movq %rax, %rcx
addq $0x10, %rcx
movq (%rax), %rdx
cmpq %rcx, %rdx
je 0x1dbc0
movq %rdx, 0x28(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x38(%rsp)
jmp 0x1dbca
vmovups (%rcx), %xmm0
vmovups %xmm0, (%r12)
movq 0x8(%rax), %rdx
leaq 0x28(%rsp), %r13
leaq 0xc8(%rsp), %rdi
movq %r13, %rsi
movq %rdx, 0x8(%r13)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
callq 0x5430
movq (%r13), %rdi
cmpq %r12, %rdi
je 0x1dc04
callq 0x52e0
movq 0x78(%rsp), %rdi
leaq 0x10(%rsp), %r12
cmpq %rbx, %rdi
je 0x1dc18
callq 0x52e0
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x1dc26
callq 0x52e0
movq 0x20(%rsp), %rdi
leaq 0x10(%rdi), %rax
movq %rax, (%rdi)
movq $0x0, 0x8(%rdi)
movq %rax, 0xb8(%rsp)
movb $0x0, 0x10(%rdi)
leaq 0x10913(%rip), %rsi     # 0x2e560
callq 0x56e0
cmpb $0x0, (%r15)
jle 0x1dd1e
leaq 0x1317b(%rip), %r14     # 0x30dde
leaq 0x28(%rsp), %r13
leaq 0x50(%rsp), %rbp
xorl %ebx, %ebx
movq %r13, %rdi
movq %r14, %rsi
movq %rbp, %rdx
callq 0x9675
movq 0x30(%rsp), %rsi
leal 0x41(%rbx), %eax
movsbl %al, %r8d
movl $0x1, %ecx
movq %r13, %rdi
xorl %edx, %edx
callq 0x56c0
movq %r12, (%rsp)
movq %rax, %rcx
addq $0x10, %rcx
movq (%rax), %rdx
cmpq %rcx, %rdx
je 0x1dcb9
movq %rdx, (%rsp)
movq (%rcx), %rdx
movq %rdx, 0x10(%rsp)
jmp 0x1dcc3
vmovups (%rcx), %xmm0
vmovups %xmm0, (%r12)
movq 0x8(%rax), %rdx
movq %rdx, 0x8(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x8(%rsp), %rdx
movq (%rsp), %rsi
movq 0x20(%rsp), %rdi
callq 0x50c0
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x1dcfc
callq 0x52e0
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x1dd10
callq 0x52e0
movsbl (%r15), %eax
incl %ebx
cmpl %eax, %ebx
jl 0x1dc6f
movq 0x20(%rsp), %rdi
leaq 0xfbab(%rip), %rsi      # 0x2d8d5
callq 0x56e0
leaq 0x28(%rsp), %rbx
xorl %ebp, %ebp
movsbl (%r15), %eax
cmpl %eax, %ebp
jge 0x1e0c2
cmpl $0x8, %ebp
ja 0x1dd56
movq 0x20(%rsp), %rdi
movl $0x20, %esi
callq 0x5290
leal 0x1(%rbp), %esi
movq %rbx, %rdi
movl %esi, 0x74(%rsp)
callq 0x1102e
movq 0x50(%rsp), %rcx
movq 0x58(%rsp), %r8
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x5380
movq %r12, (%rsp)
movq %rax, %rcx
addq $0x10, %rcx
movq (%rax), %rdx
cmpq %rcx, %rdx
je 0x1dd9c
movq %rdx, (%rsp)
movq (%rcx), %rdx
movq %rdx, 0x10(%rsp)
jmp 0x1dda6
vmovups (%rcx), %xmm0
vmovups %xmm0, (%r12)
movq 0x8(%rax), %rdx
movq %rdx, 0x8(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x8(%rsp), %rdx
movq (%rsp), %rsi
movq 0x20(%rsp), %rdi
callq 0x50c0
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x1dddf
callq 0x52e0
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x1ddf3
callq 0x52e0
movsbl (%r15), %eax
movl %eax, 0x4c(%rsp)
testl %eax, %eax
jle 0x1e01a
movl 0x4c(%rsp), %r14d
movl %ebp, %r12d
xorl %ebx, %ebx
movb 0x6(%r15), %al
movb 0x7(%r15), %cl
movl %ebx, %edx
xorb %bpl, %al
xorb %cl, %dl
orb %al, %dl
jne 0x1de52
movq 0x50(%rsp), %rsi
movq 0x58(%rsp), %rdx
leaq 0x10(%rsp), %rax
movq %rax, (%rsp)
addq %rsi, %rdx
movq %rsp, %r13
movq %r13, %rdi
callq 0xa6f0
leaq 0x13eef(%rip), %rsi     # 0x31d37
movq %r13, %rdi
callq 0x56e0
jmp 0x1deac
leal -0x1(%rbx), %edx
xorb %cl, %dl
orb %dl, %al
jne 0x1de8d
movq 0x50(%rsp), %rsi
movq 0x58(%rsp), %rdx
leaq 0x10(%rsp), %rax
movq %rax, (%rsp)
addq %rsi, %rdx
movq %rsp, %r13
movq %r13, %rdi
callq 0xa6f0
leaq 0x12494(%rip), %rsi     # 0x30317
movq %r13, %rdi
callq 0x56e0
jmp 0x1deac
leaq 0x10(%rsp), %rax
movq %rax, (%rsp)
leaq 0x12f41(%rip), %rsi     # 0x30dde
leaq 0x12f3b(%rip), %rdx     # 0x30ddf
movq %rsp, %rdi
callq 0xaf4e
movq 0x8(%rsp), %rdx
movq (%rsp), %rsi
movq 0x20(%rsp), %rdi
callq 0x50c0
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x1ded2
callq 0x52e0
movsbq (%r15), %rax
movslq %ebp, %rcx
leaq 0x13fe1(%rip), %rdx     # 0x31ec1
imulq %rax, %rcx
movq 0x10(%r15), %rax
addq %rbx, %rcx
shlq $0x4, %rcx
movb (%rax,%rcx), %al
cmpb (%rdx), %al
jne 0x1df61
movq 0xc0(%rsp), %rsi
movw %r12w, 0x78(%rsp)
cmpq $0x0, 0x10(%rsi)
je 0x1e155
leaq 0x28(%rsp), %r13
leaq 0x78(%rsp), %rdx
movq %r13, %rdi
callq *0x18(%rsi)
movq 0x98(%rsp), %rcx
movq 0xa0(%rsp), %r8
movq %r13, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x5380
leaq 0x10(%rsp), %rsi
movq %rax, %rcx
addq $0x10, %rcx
movq %rsi, (%rsp)
movq (%rax), %rdx
cmpq %rcx, %rdx
je 0x1df9a
movq %rdx, (%rsp)
movq (%rcx), %rdx
movq %rdx, 0x10(%rsp)
jmp 0x1dfa2
leaq 0x13f5a(%rip), %rdx     # 0x31ec2
leaq 0xe8(%rsp), %rcx
cmpb (%rdx), %al
je 0x1df87
leaq 0x13f48(%rip), %rdx     # 0x31ec3
leaq 0xc8(%rsp), %rcx
cmpb (%rdx), %al
jne 0x1dff6
movq 0x8(%rcx), %rdx
movq (%rcx), %rsi
movq 0x20(%rsp), %rdi
callq 0x50c0
jmp 0x1e007
vmovups (%rcx), %xmm0
vmovups %xmm0, (%rsi)
movq 0x8(%rax), %rdx
movq %rdx, 0x8(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x8(%rsp), %rdx
movq (%rsp), %rsi
movq 0x20(%rsp), %rdi
callq 0x50c0
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x1dfe0
callq 0x52e0
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x1e007
callq 0x52e0
jmp 0x1e007
movq 0x20(%rsp), %rdi
leaq 0x12779(%rip), %rsi     # 0x3077b
callq 0x56e0
incq %rbx
addl $0x100, %r12d           # imm = 0x100
cmpl %ebx, %r14d
jne 0x1de0d
cmpb %bpl, 0x6(%r15)
jne 0x1e063
movl 0x4c(%rsp), %eax
decb %al
cmpb %al, 0x7(%r15)
jne 0x1e063
movq 0x50(%rsp), %rsi
movq 0x58(%rsp), %rdx
leaq 0x10(%rsp), %r12
movq %r12, (%rsp)
addq %rsi, %rdx
movq %rsp, %r14
movq %r14, %rdi
callq 0xa6f0
leaq 0x28(%rsp), %rbx
leaq 0x122be(%rip), %rsi     # 0x30317
movq %r14, %rdi
callq 0x56e0
jmp 0x1e087
leaq 0x10(%rsp), %r12
movq %r12, (%rsp)
leaq 0x12d6b(%rip), %rsi     # 0x30dde
leaq 0x12d65(%rip), %rdx     # 0x30ddf
movq %rsp, %rdi
callq 0xaf4e
leaq 0x28(%rsp), %rbx
movq 0x8(%rsp), %rdx
movq (%rsp), %rsi
movq 0x20(%rsp), %rdi
callq 0x50c0
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x1e0a8
callq 0x52e0
movq 0x20(%rsp), %rdi
movl $0xa, %esi
callq 0x5290
movl 0x74(%rsp), %eax
movl %eax, %ebp
jmp 0x1dd36
movq 0xa0(%rsp), %rdx
movq 0x98(%rsp), %rsi
movq 0x20(%rsp), %rdi
callq 0x50c0
movq 0x98(%rsp), %rdi
leaq 0xa8(%rsp), %rax
cmpq %rax, %rdi
je 0x1e0f6
callq 0x52e0
movq 0x50(%rsp), %rdi
leaq 0x60(%rsp), %rax
cmpq %rax, %rdi
je 0x1e10a
callq 0x52e0
movq 0xc8(%rsp), %rdi
leaq 0xd8(%rsp), %rax
cmpq %rax, %rdi
je 0x1e124
callq 0x52e0
movq 0xe8(%rsp), %rdi
leaq 0xf8(%rsp), %rax
cmpq %rax, %rdi
je 0x1e13e
callq 0x52e0
movq 0x20(%rsp), %rax
addq $0x108, %rsp            # imm = 0x108
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x5100
jmp 0x1e162
jmp 0x1e162
jmp 0x1e18b
jmp 0x1e162
movq 0x78(%rsp), %rdi
movq %rax, %r14
cmpq %rbx, %rdi
jne 0x1e184
jmp 0x1e18e
jmp 0x1e18b
jmp 0x1e177
jmp 0x1e18b
movq 0x28(%rsp), %rdi
movq %rax, %r14
cmpq %r12, %rdi
je 0x1e18e
callq 0x52e0
jmp 0x1e18e
movq %rax, %r14
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
jne 0x1e259
jmp 0x1e25e
movq %rax, %r14
jmp 0x1e25e
movq %rax, %r14
jmp 0x1e278
movq %rax, %r14
jmp 0x1e28c
movq %rax, %r14
jmp 0x1e2a6
jmp 0x1e22c
jmp 0x1e1d5
jmp 0x1e22c
jmp 0x1e22c
jmp 0x1e22c
jmp 0x1e22c
jmp 0x1e21d
jmp 0x1e1e9
movq (%rsp), %rdi
movq %rax, %r14
cmpq %r12, %rdi
jne 0x1e242
jmp 0x1e247
jmp 0x1e22c
jmp 0x1e22c
jmp 0x1e21d
movq (%rsp), %rdi
movq %rax, %r14
cmpq %r12, %rdi
jne 0x1e210
jmp 0x1e220
jmp 0x1e22c
jmp 0x1e231
jmp 0x1e22c
jmp 0x1e22c
movq (%rsp), %rdi
movq %rax, %r14
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x1e220
callq 0x52e0
jmp 0x1e220
jmp 0x1e231
jmp 0x1e22c
jmp 0x1e22c
movq %rax, %r14
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
jmp 0x1e23d
movq %rax, %r14
jmp 0x1e247
movq (%rsp), %rdi
movq %rax, %r14
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x1e247
callq 0x52e0
movq 0x20(%rsp), %rax
movq (%rax), %rdi
cmpq 0xb8(%rsp), %rdi
je 0x1e25e
callq 0x52e0
movq 0x98(%rsp), %rdi
leaq 0xa8(%rsp), %rax
cmpq %rax, %rdi
je 0x1e278
callq 0x52e0
movq 0x50(%rsp), %rdi
leaq 0x60(%rsp), %rax
cmpq %rax, %rdi
je 0x1e28c
callq 0x52e0
movq 0xc8(%rsp), %rdi
leaq 0xd8(%rsp), %rax
cmpq %rax, %rdi
je 0x1e2a6
callq 0x52e0
movq 0xe8(%rsp), %rdi
leaq 0xf8(%rsp), %rax
cmpq %rax, %rdi
je 0x1e2c0
callq 0x52e0
movq %r14, %rdi
callq 0x5670