// File: /workspace/github_cpp_makefile_star2_O1/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
movq %rcx, 0xc0(%rsp)
movl %edx, %ebp
movq %rsi, %r15
movq %rdi, 0x20(%rsp)
leaq 0xf8(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x14d0a(%rip), %rsi     # 0x32854
leaq 0x14d04(%rip), %rdx     # 0x32855
leaq 0xe8(%rsp), %rdi
callq 0xaf8a
leaq 0xd8(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x13bed(%rip), %rsi     # 0x3175e
leaq 0x13be7(%rip), %rdx     # 0x3175f
leaq 0xc8(%rsp), %rdi
callq 0xaf8a
leaq 0x60(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x10d41(%rip), %rdx     # 0x2e8d6
leaq 0x50(%rsp), %rdi
movq %rdx, %rsi
callq 0xaf8a
leaq 0xa8(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x10d21(%rip), %rdx     # 0x2e8d6
leaq 0x98(%rsp), %rdi
movq %rdx, %rsi
callq 0xaf8a
leaq 0x10(%rsp), %r12
testb %bpl, %bpl
je 0x1de08
movq %rsp, %rdi
movq %r12, (%rdi)
leaq 0x13b80(%rip), %rsi     # 0x31760
leaq 0x13b7a(%rip), %rdx     # 0x31761
callq 0xaf8a
leaq 0x38(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
addq %rsi, %rdx
leaq 0x28(%rsp), %rdi
callq 0xa73a
leaq 0x13b4f(%rip), %rsi     # 0x31762
leaq 0x28(%rsp), %rdi
callq 0x56e0
leaq 0x98(%rsp), %rdi
leaq 0x28(%rsp), %r13
movq %r13, %rsi
callq 0x5430
movq (%r13), %rdi
cmpq %r12, %rdi
je 0x1dc40
callq 0x52e0
leaq 0x28(%rsp), %rdi
movq %r12, (%rdi)
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
addq %rsi, %rdx
callq 0xa73a
leaq 0x13b06(%rip), %rsi     # 0x31766
leaq 0x28(%rsp), %rdi
callq 0x56e0
leaq 0x50(%rsp), %rdi
leaq 0x28(%rsp), %r13
movq %r13, %rsi
callq 0x5430
movq (%r13), %rdi
cmpq %r12, %rdi
je 0x1dc8a
callq 0x52e0
leaq 0x88(%rsp), %rbx
movq %rbx, -0x10(%rbx)
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
addq %rsi, %rdx
leaq 0x78(%rsp), %rdi
callq 0xa73a
leaq 0x13aba(%rip), %rsi     # 0x3176d
leaq 0x78(%rsp), %rdi
callq 0x56e0
leaq 0x13a9a(%rip), %rsi     # 0x3175e
leaq 0x78(%rsp), %rdi
callq 0x56e0
movq %r12, 0x28(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x1dcf1
movq %rdx, 0x28(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x38(%rsp)
jmp 0x1dcfb
vmovups (%rcx), %xmm0
vmovups %xmm0, (%r12)
movq 0x8(%rax), %rdx
leaq 0x28(%rsp), %r13
movq %rdx, 0x8(%r13)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0xe8(%rsp), %rdi
movq %r13, %rsi
callq 0x5430
movq (%r13), %rdi
cmpq %r12, %rdi
je 0x1dd35
callq 0x52e0
movq 0x78(%rsp), %rdi
cmpq %rbx, %rdi
je 0x1dd44
callq 0x52e0
leaq 0x78(%rsp), %rdi
movq %rbx, (%rdi)
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
addq %rsi, %rdx
callq 0xa73a
leaq 0x13a10(%rip), %rsi     # 0x31774
leaq 0x78(%rsp), %rdi
callq 0x56e0
leaq 0x139e9(%rip), %rsi     # 0x3175e
leaq 0x78(%rsp), %rdi
callq 0x56e0
movq %r12, 0x28(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x1dda2
movq %rdx, 0x28(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x38(%rsp)
jmp 0x1ddac
vmovups (%rcx), %xmm0
vmovups %xmm0, (%r12)
movq 0x8(%rax), %rdx
leaq 0x28(%rsp), %r13
movq %rdx, 0x8(%r13)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0xc8(%rsp), %rdi
movq %r13, %rsi
callq 0x5430
movq (%r13), %rdi
cmpq %r12, %rdi
je 0x1dde6
callq 0x52e0
movq 0x78(%rsp), %rdi
cmpq %rbx, %rdi
leaq 0x10(%rsp), %r12
je 0x1ddfa
callq 0x52e0
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x1de08
callq 0x52e0
movq 0x20(%rsp), %rdi
leaq 0x10(%rdi), %rax
movq %rax, 0xb8(%rsp)
movq %rax, (%rdi)
movq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
leaq 0x11731(%rip), %rsi     # 0x2f560
callq 0x56e0
cmpb $0x0, (%r15)
jle 0x1df00
xorl %ebx, %ebx
leaq 0x13f97(%rip), %r14     # 0x31dde
leaq 0x28(%rsp), %r13
leaq 0x50(%rsp), %rbp
movq %r13, %rdi
movq %r14, %rsi
movq %rbp, %rdx
callq 0x96db
leal 0x41(%rbx), %eax
movq 0x30(%rsp), %rsi
movsbl %al, %r8d
movl $0x1, %ecx
movq %r13, %rdi
xorl %edx, %edx
callq 0x56c0
movq %r12, (%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x1de9b
movq %rdx, (%rsp)
movq (%rcx), %rdx
movq %rdx, 0x10(%rsp)
jmp 0x1dea5
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 (%rsp), %rsi
movq 0x8(%rsp), %rdx
movq 0x20(%rsp), %rdi
callq 0x50c0
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x1dede
callq 0x52e0
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x1def2
callq 0x52e0
incl %ebx
movsbl (%r15), %eax
cmpl %eax, %ebx
jl 0x1de51
leaq 0x109ce(%rip), %rsi     # 0x2e8d5
movq 0x20(%rsp), %rdi
callq 0x56e0
xorl %ebp, %ebp
leaq 0x28(%rsp), %rbx
movsbl (%r15), %eax
cmpl %eax, %ebp
jge 0x1e2a4
cmpl $0x8, %ebp
ja 0x1df38
movq 0x20(%rsp), %rdi
movl $0x20, %esi
callq 0x5290
leal 0x1(%rbp), %esi
movq %rbx, %rdi
movl %esi, 0x74(%rsp)
callq 0x10fd1
movq 0x50(%rsp), %rcx
movq 0x58(%rsp), %r8
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x5380
movq %r12, (%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x1df7e
movq %rdx, (%rsp)
movq (%rcx), %rdx
movq %rdx, 0x10(%rsp)
jmp 0x1df88
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 (%rsp), %rsi
movq 0x8(%rsp), %rdx
movq 0x20(%rsp), %rdi
callq 0x50c0
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x1dfc1
callq 0x52e0
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x1dfd5
callq 0x52e0
movsbl (%r15), %eax
movl %eax, 0x4c(%rsp)
testl %eax, %eax
jle 0x1e1fc
movl 0x4c(%rsp), %r14d
movl %ebp, %r12d
xorl %ebx, %ebx
movb 0x7(%r15), %cl
movb 0x6(%r15), %al
xorb %bpl, %al
movl %ebx, %edx
xorb %cl, %dl
orb %al, %dl
jne 0x1e034
leaq 0x10(%rsp), %rax
movq %rax, (%rsp)
movq 0x50(%rsp), %rsi
movq 0x58(%rsp), %rdx
addq %rsi, %rdx
movq %rsp, %r13
movq %r13, %rdi
callq 0xa73a
movq %r13, %rdi
leaq 0x14d0a(%rip), %rsi     # 0x32d37
callq 0x56e0
jmp 0x1e08e
leal -0x1(%rbx), %edx
xorb %cl, %dl
orb %dl, %al
jne 0x1e06f
leaq 0x10(%rsp), %rax
movq %rax, (%rsp)
movq 0x50(%rsp), %rsi
movq 0x58(%rsp), %rdx
addq %rsi, %rdx
movq %rsp, %r13
movq %r13, %rdi
callq 0xa73a
movq %r13, %rdi
leaq 0x132af(%rip), %rsi     # 0x31317
callq 0x56e0
jmp 0x1e08e
leaq 0x10(%rsp), %rax
movq %rax, (%rsp)
movq %rsp, %rdi
leaq 0x13d5c(%rip), %rsi     # 0x31dde
leaq 0x13d56(%rip), %rdx     # 0x31ddf
callq 0xaf8a
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
movq 0x20(%rsp), %rdi
callq 0x50c0
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x1e0b4
callq 0x52e0
movsbq (%r15), %rax
movslq %ebp, %rcx
imulq %rax, %rcx
addq %rbx, %rcx
movq 0x10(%r15), %rax
shlq $0x4, %rcx
movb (%rax,%rcx), %al
leaq 0x14ded(%rip), %rcx     # 0x32ec1
cmpb (%rcx), %al
jne 0x1e143
movw %r12w, 0x78(%rsp)
movq 0xc0(%rsp), %rsi
cmpq $0x0, 0x10(%rsi)
je 0x1e337
leaq 0x28(%rsp), %r13
movq %r13, %rdi
leaq 0x78(%rsp), %rdx
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 %rsi, (%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x1e17c
movq %rdx, (%rsp)
movq (%rcx), %rdx
movq %rdx, 0x10(%rsp)
jmp 0x1e184
leaq 0xe8(%rsp), %rcx
leaq 0x14d70(%rip), %rdx     # 0x32ec2
cmpb (%rdx), %al
je 0x1e169
leaq 0xc8(%rsp), %rcx
leaq 0x14d5e(%rip), %rdx     # 0x32ec3
cmpb (%rdx), %al
jne 0x1e1d8
movq (%rcx), %rsi
movq 0x8(%rcx), %rdx
movq 0x20(%rsp), %rdi
callq 0x50c0
jmp 0x1e1e9
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 (%rsp), %rsi
movq 0x8(%rsp), %rdx
movq 0x20(%rsp), %rdi
callq 0x50c0
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x1e1c2
callq 0x52e0
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x1e1e9
callq 0x52e0
jmp 0x1e1e9
movq 0x20(%rsp), %rdi
leaq 0x13597(%rip), %rsi     # 0x3177b
callq 0x56e0
incq %rbx
addl $0x100, %r12d           # imm = 0x100
cmpl %ebx, %r14d
jne 0x1dfef
cmpb %bpl, 0x6(%r15)
jne 0x1e245
movl 0x4c(%rsp), %eax
decb %al
cmpb %al, 0x7(%r15)
jne 0x1e245
leaq 0x10(%rsp), %r12
movq %r12, (%rsp)
movq 0x50(%rsp), %rsi
movq 0x58(%rsp), %rdx
addq %rsi, %rdx
movq %rsp, %r14
movq %r14, %rdi
callq 0xa73a
leaq 0x28(%rsp), %rbx
movq %r14, %rdi
leaq 0x130d9(%rip), %rsi     # 0x31317
callq 0x56e0
jmp 0x1e269
leaq 0x10(%rsp), %r12
movq %r12, (%rsp)
movq %rsp, %rdi
leaq 0x13b86(%rip), %rsi     # 0x31dde
leaq 0x13b80(%rip), %rdx     # 0x31ddf
callq 0xaf8a
leaq 0x28(%rsp), %rbx
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
movq 0x20(%rsp), %rdi
callq 0x50c0
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x1e28a
callq 0x52e0
movq 0x20(%rsp), %rdi
movl $0xa, %esi
callq 0x5290
movl 0x74(%rsp), %eax
movl %eax, %ebp
jmp 0x1df18
movq 0x98(%rsp), %rsi
movq 0xa0(%rsp), %rdx
movq 0x20(%rsp), %rdi
callq 0x50c0
movq 0x98(%rsp), %rdi
leaq 0xa8(%rsp), %rax
cmpq %rax, %rdi
je 0x1e2d8
callq 0x52e0
movq 0x50(%rsp), %rdi
leaq 0x60(%rsp), %rax
cmpq %rax, %rdi
je 0x1e2ec
callq 0x52e0
movq 0xc8(%rsp), %rdi
leaq 0xd8(%rsp), %rax
cmpq %rax, %rdi
je 0x1e306
callq 0x52e0
movq 0xe8(%rsp), %rdi
leaq 0xf8(%rsp), %rax
cmpq %rax, %rdi
je 0x1e320
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 0x1e344
jmp 0x1e344
jmp 0x1e36d
jmp 0x1e344
movq %rax, %r14
movq 0x78(%rsp), %rdi
cmpq %rbx, %rdi
jne 0x1e366
jmp 0x1e370
jmp 0x1e36d
jmp 0x1e359
jmp 0x1e36d
movq %rax, %r14
movq 0x28(%rsp), %rdi
cmpq %r12, %rdi
je 0x1e370
callq 0x52e0
jmp 0x1e370
movq %rax, %r14
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
jne 0x1e43b
jmp 0x1e440
movq %rax, %r14
jmp 0x1e440
movq %rax, %r14
jmp 0x1e45a
movq %rax, %r14
jmp 0x1e46e
movq %rax, %r14
jmp 0x1e488
jmp 0x1e40e
jmp 0x1e3b7
jmp 0x1e40e
jmp 0x1e40e
jmp 0x1e40e
jmp 0x1e40e
jmp 0x1e3ff
jmp 0x1e3cb
movq %rax, %r14
movq (%rsp), %rdi
cmpq %r12, %rdi
jne 0x1e424
jmp 0x1e429
jmp 0x1e40e
jmp 0x1e40e
jmp 0x1e3ff
movq %rax, %r14
movq (%rsp), %rdi
cmpq %r12, %rdi
jne 0x1e3f2
jmp 0x1e402
jmp 0x1e40e
jmp 0x1e413
jmp 0x1e40e
jmp 0x1e40e
movq %rax, %r14
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x1e402
callq 0x52e0
jmp 0x1e402
jmp 0x1e413
jmp 0x1e40e
jmp 0x1e40e
movq %rax, %r14
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
jmp 0x1e41f
movq %rax, %r14
jmp 0x1e429
movq %rax, %r14
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x1e429
callq 0x52e0
movq 0x20(%rsp), %rax
movq (%rax), %rdi
cmpq 0xb8(%rsp), %rdi
je 0x1e440
callq 0x52e0
movq 0x98(%rsp), %rdi
leaq 0xa8(%rsp), %rax
cmpq %rax, %rdi
je 0x1e45a
callq 0x52e0
movq 0x50(%rsp), %rdi
leaq 0x60(%rsp), %rax
cmpq %rax, %rdi
je 0x1e46e
callq 0x52e0
movq 0xc8(%rsp), %rdi
leaq 0xd8(%rsp), %rax
cmpq %rax, %rdi
je 0x1e488
callq 0x52e0
movq 0xe8(%rsp), %rdi
leaq 0xf8(%rsp), %rax
cmpq %rax, %rdi
je 0x1e4a2
callq 0x52e0
movq %r14, %rdi
callq 0x5670