// File: /workspace/github_cpp_makefile_star2_O3/tewalds[P]morat/hex/board.cpp
// Function: Morat::Hex::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 = " ";
	for(int i = 0; i < size_; i++)
		s += " " + coord + char('A' + i);
	s += "\n";

	for(int y = 0; y < size_; y++){
		s += string(y + ((y + 1) < 10), ' ');
		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 += black + reset;
		s += '\n';
	}
	s += string(size_ + 2, ' ');
	for(int i = 0; i < size_; i++)
		s += white + " ";
	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, %r14
movq %rdi, 0x20(%rsp)
leaq 0xc8(%rsp), %rax
leaq 0x15f0c(%rip), %rsi     # 0x355fe
leaq 0x15f06(%rip), %rdx     # 0x355ff
leaq 0xb8(%rsp), %rdi
movq %rcx, 0x100(%rsp)
movq %rax, -0x10(%rax)
callq 0xb1dc
leaq 0xe8(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x1517d(%rip), %rsi     # 0x348a2
leaq 0x15177(%rip), %rdx     # 0x348a3
leaq 0xd8(%rsp), %rdi
callq 0xb1dc
leaq 0x60(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x121be(%rip), %rdx     # 0x31907
leaq 0x50(%rsp), %rdi
movq %rdx, %rsi
callq 0xb1dc
leaq 0xa8(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x1219e(%rip), %rdx     # 0x31907
leaq 0x98(%rsp), %rdi
movq %rdx, %rsi
callq 0xb1dc
leaq 0x10(%rsp), %r12
testb %bpl, %bpl
je 0x1f9b2
movq %rsp, %rdi
movq %r12, (%rdi)
leaq 0x15110(%rip), %rsi     # 0x348a4
leaq 0x1510a(%rip), %rdx     # 0x348a5
callq 0xb1dc
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
leaq 0x38(%rsp), %rbx
movq %rbx, -0x10(%rbx)
addq %rsi, %rdx
leaq 0x28(%rsp), %rdi
callq 0xa930
leaq 0x150e0(%rip), %rsi     # 0x348a6
leaq 0x28(%rsp), %rdi
callq 0x56e0
leaq 0x28(%rsp), %r13
leaq 0x98(%rsp), %rdi
movq %r13, %rsi
callq 0x5430
movq (%r13), %rdi
cmpq %rbx, %rdi
je 0x1f7f3
callq 0x52e0
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
leaq 0x28(%rsp), %rdi
movq %rbx, (%rdi)
addq %rsi, %rdx
callq 0xa930
leaq 0x15097(%rip), %rsi     # 0x348aa
leaq 0x28(%rsp), %rdi
callq 0x56e0
leaq 0x28(%rsp), %r13
leaq 0x50(%rsp), %rdi
movq %r13, %rsi
callq 0x5430
movq (%r13), %rdi
cmpq %rbx, %rdi
je 0x1f83d
callq 0x52e0
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
leaq 0x88(%rsp), %r15
movq %r15, -0x10(%r15)
addq %rsi, %rdx
leaq 0x78(%rsp), %rdi
callq 0xa930
leaq 0x1504b(%rip), %rsi     # 0x348b1
leaq 0x78(%rsp), %rdi
callq 0x56e0
leaq 0x1502b(%rip), %rsi     # 0x348a2
leaq 0x78(%rsp), %rdi
callq 0x56e0
movq %rbx, 0x28(%rsp)
movq %rax, %rcx
addq $0x10, %rcx
movq (%rax), %rdx
cmpq %rcx, %rdx
je 0x1f8a4
movq %rdx, 0x28(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x38(%rsp)
jmp 0x1f8ac
vmovups (%rcx), %xmm0
vmovups %xmm0, (%rbx)
movq 0x8(%rax), %rdx
leaq 0x28(%rsp), %r13
leaq 0xb8(%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 %rbx, %rdi
je 0x1f8e6
callq 0x52e0
movq 0x78(%rsp), %rdi
cmpq %r15, %rdi
je 0x1f8f5
callq 0x52e0
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
leaq 0x78(%rsp), %rdi
movq %r15, (%rdi)
addq %rsi, %rdx
callq 0xa930
leaq 0x14fa3(%rip), %rsi     # 0x348b8
leaq 0x78(%rsp), %rdi
callq 0x56e0
leaq 0x14f7c(%rip), %rsi     # 0x348a2
leaq 0x78(%rsp), %rdi
callq 0x56e0
movq %rbx, 0x28(%rsp)
movq %rax, %rcx
addq $0x10, %rcx
movq (%rax), %rdx
cmpq %rcx, %rdx
je 0x1f953
movq %rdx, 0x28(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x38(%rsp)
jmp 0x1f95b
vmovups (%rcx), %xmm0
vmovups %xmm0, (%rbx)
movq 0x8(%rax), %rdx
leaq 0x28(%rsp), %r13
leaq 0xd8(%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 %rbx, %rdi
je 0x1f995
callq 0x52e0
movq 0x78(%rsp), %rdi
cmpq %r15, %rdi
je 0x1f9a4
callq 0x52e0
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x1f9b2
callq 0x52e0
movq 0x20(%rsp), %rdi
leaq 0x10(%rdi), %rax
movq %rax, 0xf8(%rsp)
movq %rax, (%rdi)
leaq 0x16476(%rip), %rsi     # 0x35e43
leaq 0x16470(%rip), %rdx     # 0x35e44
callq 0xb1dc
cmpb $0x0, (%r14)
jle 0x1faa5
leaq 0x16459(%rip), %r15     # 0x35e43
leaq 0x28(%rsp), %r13
leaq 0x50(%rsp), %rbp
xorl %ebx, %ebx
movq %r13, %rdi
movq %r15, %rsi
movq %rbp, %rdx
callq 0x98b3
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 0x1fa40
movq %rdx, (%rsp)
movq (%rcx), %rdx
movq %rdx, 0x10(%rsp)
jmp 0x1fa4a
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 0x1fa83
callq 0x52e0
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x1fa97
callq 0x52e0
movsbl (%r14), %eax
incl %ebx
cmpl %eax, %ebx
jl 0x1f9f6
movq 0x20(%rsp), %rdi
leaq 0x11e55(%rip), %rsi     # 0x31906
callq 0x56e0
leaq 0x28(%rsp), %rbx
xorl %r13d, %r13d
movq %rsp, %r15
movsbl (%r14), %eax
cmpl %eax, %r13d
jge 0x1feb7
cmpl $0x9, %r13d
movl %r13d, %esi
movq %r12, (%rsp)
adcl $0x0, %esi
movl $0x20, %edx
movq %r15, %rdi
callq 0x53b0
movq 0x8(%rsp), %rdx
movq (%rsp), %rsi
movq 0x20(%rsp), %rdi
callq 0x50c0
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x1fb0a
callq 0x52e0
leal 0x1(%r13), %ebp
movq %rbx, %rdi
movl %ebp, %esi
callq 0x1131a
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 0x1fb4f
movq %rdx, (%rsp)
movq (%rcx), %rdx
movq %rdx, 0x10(%rsp)
jmp 0x1fb59
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 0x1fb92
callq 0x52e0
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
movl %ebp, 0x74(%rsp)
cmpq %rax, %rdi
je 0x1fbaa
callq 0x52e0
movsbl (%r14), %eax
movl %eax, 0x4c(%rsp)
testl %eax, %eax
jle 0x1fdd2
movl 0x4c(%rsp), %r12d
movl %r13d, %ebx
xorl %r15d, %r15d
movb 0x6(%r14), %al
movb 0x7(%r14), %cl
movl %r15d, %edx
xorb %r13b, %al
xorb %cl, %dl
orb %al, %dl
jne 0x1fc0b
movq 0x50(%rsp), %rsi
movq 0x58(%rsp), %rdx
leaq 0x10(%rsp), %rax
movq %rax, (%rsp)
addq %rsi, %rdx
movq %rsp, %rbp
movq %rbp, %rdi
callq 0xa930
leaq 0x16622(%rip), %rsi     # 0x36223
movq %rbp, %rdi
callq 0x56e0
jmp 0x1fc66
leal -0x1(%r15), %edx
xorb %cl, %dl
orb %dl, %al
jne 0x1fc47
movq 0x50(%rsp), %rsi
movq 0x58(%rsp), %rdx
leaq 0x10(%rsp), %rax
movq %rax, (%rsp)
addq %rsi, %rdx
movq %rsp, %rbp
movq %rbp, %rdi
callq 0xa930
leaq 0x1472a(%rip), %rsi     # 0x34367
movq %rbp, %rdi
callq 0x56e0
jmp 0x1fc66
leaq 0x10(%rsp), %rax
movq %rax, (%rsp)
leaq 0x161ec(%rip), %rsi     # 0x35e43
leaq 0x161e6(%rip), %rdx     # 0x35e44
movq %rsp, %rdi
callq 0xb1dc
movq 0x8(%rsp), %rdx
movq (%rsp), %rsi
movq 0x20(%rsp), %rdi
callq 0x50c0
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x1fc8c
callq 0x52e0
movsbq (%r14), %rax
movslq %r13d, %rcx
leaq 0x1670f(%rip), %rdx     # 0x363a9
imulq %rax, %rcx
movq 0x10(%r14), %rax
addq %r15, %rcx
shlq $0x4, %rcx
movb (%rax,%rcx), %al
cmpb (%rdx), %al
jne 0x1fd1a
movq 0x100(%rsp), %rsi
movw %bx, 0x78(%rsp)
cmpq $0x0, 0x10(%rsi)
je 0x1fffa
leaq 0x28(%rsp), %rbp
leaq 0x78(%rsp), %rdx
movq %rbp, %rdi
callq *0x18(%rsi)
movq 0x98(%rsp), %rcx
movq 0xa0(%rsp), %r8
movq %rbp, %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 0x1fd53
movq %rdx, (%rsp)
movq (%rcx), %rdx
movq %rdx, 0x10(%rsp)
jmp 0x1fd5b
leaq 0x16689(%rip), %rdx     # 0x363aa
leaq 0xb8(%rsp), %rcx
cmpb (%rdx), %al
je 0x1fd40
leaq 0x16677(%rip), %rdx     # 0x363ab
leaq 0xd8(%rsp), %rcx
cmpb (%rdx), %al
jne 0x1fdaf
movq 0x8(%rcx), %rdx
movq (%rcx), %rsi
movq 0x20(%rsp), %rdi
callq 0x50c0
jmp 0x1fdc0
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 0x1fd99
callq 0x52e0
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x1fdc0
callq 0x52e0
jmp 0x1fdc0
movq 0x20(%rsp), %rdi
leaq 0x14b04(%rip), %rsi     # 0x348bf
callq 0x56e0
incq %r15
addl $0x100, %ebx            # imm = 0x100
cmpl %r15d, %r12d
jne 0x1fbc5
cmpb %r13b, 0x6(%r14)
jne 0x1fe1b
movl 0x4c(%rsp), %eax
decb %al
cmpb %al, 0x7(%r14)
jne 0x1fe1b
movq 0x50(%rsp), %rsi
movq 0x58(%rsp), %rdx
leaq 0x10(%rsp), %r12
movq %r12, (%rsp)
addq %rsi, %rdx
movq %rsp, %r15
movq %r15, %rdi
callq 0xa930
leaq 0x1455b(%rip), %rsi     # 0x34367
movq %r15, %rdi
callq 0x56e0
leaq 0x28(%rsp), %rbx
jmp 0x1fe42
leaq 0x10(%rsp), %r12
movq %r12, (%rsp)
leaq 0x16018(%rip), %rsi     # 0x35e43
leaq 0x16012(%rip), %rdx     # 0x35e44
movq %rsp, %r15
movq %r15, %rdi
callq 0xb1dc
leaq 0x28(%rsp), %rbx
movq 0x8(%rsp), %rdx
movq (%rsp), %rsi
movq 0x20(%rsp), %rdi
callq 0x50c0
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x1fe63
callq 0x52e0
leaq 0xd8(%rsp), %rsi
leaq 0x98(%rsp), %rdx
movq %r15, %rdi
callq 0x20345
movq 0x8(%rsp), %rdx
movq (%rsp), %rsi
movq 0x20(%rsp), %rdi
callq 0x50c0
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x1fe9c
callq 0x52e0
movq 0x20(%rsp), %rdi
movl $0xa, %esi
callq 0x5290
movl 0x74(%rsp), %eax
movl %eax, %r13d
jmp 0x1fac1
movslq %eax, %rsi
movq %rsp, %rdi
movq %r12, (%rdi)
addq $0x2, %rsi
movl $0x20, %edx
callq 0x53b0
movq 0x8(%rsp), %rdx
movq (%rsp), %rsi
movq 0x20(%rsp), %rdi
callq 0x50c0
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x1feef
callq 0x52e0
cmpb $0x0, (%r14)
jle 0x1ff56
leaq 0x15f47(%rip), %r13     # 0x35e43
xorl %ebx, %ebx
movq %rsp, %r15
movq 0xb8(%rsp), %rsi
movq 0xc0(%rsp), %rdx
movq %r12, (%rsp)
addq %rsi, %rdx
movq %r15, %rdi
callq 0xa930
movq %r15, %rdi
movq %r13, %rsi
callq 0x56e0
movq 0x8(%rsp), %rdx
movq (%rsp), %rsi
movq 0x20(%rsp), %rdi
callq 0x50c0
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x1ff4c
callq 0x52e0
movsbl (%r14), %eax
incl %ebx
cmpl %eax, %ebx
jl 0x1ff01
movq 0x20(%rsp), %rdi
leaq 0x119a4(%rip), %rsi     # 0x31906
callq 0x56e0
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 0x1ff9b
callq 0x52e0
movq 0x50(%rsp), %rdi
leaq 0x60(%rsp), %rax
cmpq %rax, %rdi
je 0x1ffaf
callq 0x52e0
movq 0xd8(%rsp), %rdi
leaq 0xe8(%rsp), %rax
cmpq %rax, %rdi
je 0x1ffc9
callq 0x52e0
movq 0xb8(%rsp), %rdi
leaq 0xc8(%rsp), %rax
cmpq %rax, %rdi
je 0x1ffe3
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 0x20007
jmp 0x20007
jmp 0x20030
jmp 0x20007
movq 0x78(%rsp), %rdi
movq %rax, %r14
cmpq %r15, %rdi
jne 0x20029
jmp 0x20033
jmp 0x20030
jmp 0x2001c
jmp 0x20030
movq 0x28(%rsp), %rdi
movq %rax, %r14
cmpq %rbx, %rdi
je 0x20033
callq 0x52e0
jmp 0x20033
movq %rax, %r14
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
jne 0x20113
jmp 0x20118
jmp 0x20053
jmp 0x2008f
jmp 0x200e6
movq %rax, %r14
jmp 0x20118
movq %rax, %r14
jmp 0x20132
movq %rax, %r14
jmp 0x20146
movq %rax, %r14
jmp 0x20160
jmp 0x200e6
jmp 0x200e6
jmp 0x2008f
jmp 0x200e6
jmp 0x200e6
jmp 0x2008f
jmp 0x2008f
jmp 0x200e6
jmp 0x200d7
jmp 0x200a1
jmp 0x200e6
jmp 0x200e6
jmp 0x2008f
jmp 0x2008f
movq (%rsp), %rdi
movq %rax, %r14
cmpq %r12, %rdi
jne 0x200fc
jmp 0x20101
jmp 0x200e6
jmp 0x200e6
movq (%rsp), %rdi
movq %rax, %r14
cmpq %r12, %rdi
jne 0x200ca
jmp 0x200da
jmp 0x200d7
jmp 0x200e6
jmp 0x200eb
jmp 0x200e6
jmp 0x200e6
movq (%rsp), %rdi
movq %rax, %r14
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x200da
callq 0x52e0
jmp 0x200da
jmp 0x200eb
jmp 0x200e6
jmp 0x200e6
movq %rax, %r14
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
jmp 0x200f7
movq %rax, %r14
jmp 0x20101
movq (%rsp), %rdi
movq %rax, %r14
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x20101
callq 0x52e0
movq 0x20(%rsp), %rax
movq (%rax), %rdi
cmpq 0xf8(%rsp), %rdi
je 0x20118
callq 0x52e0
movq 0x98(%rsp), %rdi
leaq 0xa8(%rsp), %rax
cmpq %rax, %rdi
je 0x20132
callq 0x52e0
movq 0x50(%rsp), %rdi
leaq 0x60(%rsp), %rax
cmpq %rax, %rdi
je 0x20146
callq 0x52e0
movq 0xd8(%rsp), %rdi
leaq 0xe8(%rsp), %rax
cmpq %rax, %rdi
je 0x20160
callq 0x52e0
movq 0xb8(%rsp), %rdi
leaq 0xc8(%rsp), %rax
cmpq %rax, %rdi
je 0x2017a
callq 0x52e0
movq %r14, %rdi
callq 0x5670