// File: /workspace/github_cpp_makefile_star2_O1/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
movq %rcx, 0x100(%rsp)
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, 0x20(%rsp)
leaq 0xc8(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x15e52(%rip), %rsi     # 0x355fe
leaq 0x15e4c(%rip), %rdx     # 0x355ff
leaq 0xb8(%rsp), %rdi
callq 0xb0e0
leaq 0xe8(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x150cf(%rip), %rsi     # 0x348a2
leaq 0x150c9(%rip), %rdx     # 0x348a3
leaq 0xd8(%rsp), %rdi
callq 0xb0e0
leaq 0x60(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x12110(%rip), %rdx     # 0x31907
leaq 0x50(%rsp), %rdi
movq %rdx, %rsi
callq 0xb0e0
leaq 0xa8(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x120f0(%rip), %rdx     # 0x31907
leaq 0x98(%rsp), %rdi
movq %rdx, %rsi
callq 0xb0e0
leaq 0x10(%rsp), %r12
testb %bpl, %bpl
je 0x1fa60
movq %rsp, %rdi
movq %r12, (%rdi)
leaq 0x15062(%rip), %rsi     # 0x348a4
leaq 0x1505c(%rip), %rdx     # 0x348a5
callq 0xb0e0
leaq 0x38(%rsp), %rbx
movq %rbx, -0x10(%rbx)
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
addq %rsi, %rdx
leaq 0x28(%rsp), %rdi
callq 0xa866
leaq 0x15032(%rip), %rsi     # 0x348a6
leaq 0x28(%rsp), %rdi
callq 0x56e0
leaq 0x98(%rsp), %rdi
leaq 0x28(%rsp), %r13
movq %r13, %rsi
callq 0x5430
movq (%r13), %rdi
cmpq %rbx, %rdi
je 0x1f8a1
callq 0x52e0
leaq 0x28(%rsp), %rdi
movq %rbx, (%rdi)
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
addq %rsi, %rdx
callq 0xa866
leaq 0x14fe9(%rip), %rsi     # 0x348aa
leaq 0x28(%rsp), %rdi
callq 0x56e0
leaq 0x50(%rsp), %rdi
leaq 0x28(%rsp), %r13
movq %r13, %rsi
callq 0x5430
movq (%r13), %rdi
cmpq %rbx, %rdi
je 0x1f8eb
callq 0x52e0
leaq 0x88(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
addq %rsi, %rdx
leaq 0x78(%rsp), %rdi
callq 0xa866
leaq 0x14f9d(%rip), %rsi     # 0x348b1
leaq 0x78(%rsp), %rdi
callq 0x56e0
leaq 0x14f7d(%rip), %rsi     # 0x348a2
leaq 0x78(%rsp), %rdi
callq 0x56e0
movq %rbx, 0x28(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x1f952
movq %rdx, 0x28(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x38(%rsp)
jmp 0x1f95a
vmovups (%rcx), %xmm0
vmovups %xmm0, (%rbx)
movq 0x8(%rax), %rdx
leaq 0x28(%rsp), %r13
movq %rdx, 0x8(%r13)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0xb8(%rsp), %rdi
movq %r13, %rsi
callq 0x5430
movq (%r13), %rdi
cmpq %rbx, %rdi
je 0x1f994
callq 0x52e0
movq 0x78(%rsp), %rdi
cmpq %r15, %rdi
je 0x1f9a3
callq 0x52e0
leaq 0x78(%rsp), %rdi
movq %r15, (%rdi)
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
addq %rsi, %rdx
callq 0xa866
leaq 0x14ef5(%rip), %rsi     # 0x348b8
leaq 0x78(%rsp), %rdi
callq 0x56e0
leaq 0x14ece(%rip), %rsi     # 0x348a2
leaq 0x78(%rsp), %rdi
callq 0x56e0
movq %rbx, 0x28(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x1fa01
movq %rdx, 0x28(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x38(%rsp)
jmp 0x1fa09
vmovups (%rcx), %xmm0
vmovups %xmm0, (%rbx)
movq 0x8(%rax), %rdx
leaq 0x28(%rsp), %r13
movq %rdx, 0x8(%r13)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0xd8(%rsp), %rdi
movq %r13, %rsi
callq 0x5430
movq (%r13), %rdi
cmpq %rbx, %rdi
je 0x1fa43
callq 0x52e0
movq 0x78(%rsp), %rdi
cmpq %r15, %rdi
je 0x1fa52
callq 0x52e0
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x1fa60
callq 0x52e0
movq 0x20(%rsp), %rdi
leaq 0x10(%rdi), %rax
movq %rax, 0xf8(%rsp)
movq %rax, (%rdi)
leaq 0x163c8(%rip), %rsi     # 0x35e43
leaq 0x163c2(%rip), %rdx     # 0x35e44
callq 0xb0e0
cmpb $0x0, (%r14)
jle 0x1fb53
xorl %ebx, %ebx
leaq 0x163a9(%rip), %r15     # 0x35e43
leaq 0x28(%rsp), %r13
leaq 0x50(%rsp), %rbp
movq %r13, %rdi
movq %r15, %rsi
movq %rbp, %rdx
callq 0x9805
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 0x1faee
movq %rdx, (%rsp)
movq (%rcx), %rdx
movq %rdx, 0x10(%rsp)
jmp 0x1faf8
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 0x1fb31
callq 0x52e0
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x1fb45
callq 0x52e0
incl %ebx
movsbl (%r14), %eax
cmpl %eax, %ebx
jl 0x1faa4
leaq 0x11dac(%rip), %rsi     # 0x31906
movq 0x20(%rsp), %rdi
callq 0x56e0
xorl %r13d, %r13d
movq %rsp, %r15
leaq 0x28(%rsp), %rbx
movsbl (%r14), %eax
cmpl %eax, %r13d
jge 0x1ff65
cmpl $0x9, %r13d
movl %r13d, %esi
adcl $0x0, %esi
movq %r12, (%rsp)
movq %r15, %rdi
movl $0x20, %edx
callq 0x53b0
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
movq 0x20(%rsp), %rdi
callq 0x50c0
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x1fbb8
callq 0x52e0
leal 0x1(%r13), %ebp
movq %rbx, %rdi
movl %ebp, %esi
callq 0x11187
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 0x1fbfd
movq %rdx, (%rsp)
movq (%rcx), %rdx
movq %rdx, 0x10(%rsp)
jmp 0x1fc07
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 0x1fc40
callq 0x52e0
movl %ebp, 0x74(%rsp)
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x1fc58
callq 0x52e0
movsbl (%r14), %eax
movl %eax, 0x4c(%rsp)
testl %eax, %eax
jle 0x1fe80
movl 0x4c(%rsp), %r12d
movl %r13d, %ebx
xorl %r15d, %r15d
movb 0x7(%r14), %cl
movb 0x6(%r14), %al
xorb %r13b, %al
movl %r15d, %edx
xorb %cl, %dl
orb %al, %dl
jne 0x1fcb9
leaq 0x10(%rsp), %rax
movq %rax, (%rsp)
movq 0x50(%rsp), %rsi
movq 0x58(%rsp), %rdx
addq %rsi, %rdx
movq %rsp, %rbp
movq %rbp, %rdi
callq 0xa866
movq %rbp, %rdi
leaq 0x16571(%rip), %rsi     # 0x36223
callq 0x56e0
jmp 0x1fd14
leal -0x1(%r15), %edx
xorb %cl, %dl
orb %dl, %al
jne 0x1fcf5
leaq 0x10(%rsp), %rax
movq %rax, (%rsp)
movq 0x50(%rsp), %rsi
movq 0x58(%rsp), %rdx
addq %rsi, %rdx
movq %rsp, %rbp
movq %rbp, %rdi
callq 0xa866
movq %rbp, %rdi
leaq 0x14679(%rip), %rsi     # 0x34367
callq 0x56e0
jmp 0x1fd14
leaq 0x10(%rsp), %rax
movq %rax, (%rsp)
movq %rsp, %rdi
leaq 0x1613b(%rip), %rsi     # 0x35e43
leaq 0x16135(%rip), %rdx     # 0x35e44
callq 0xb0e0
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
movq 0x20(%rsp), %rdi
callq 0x50c0
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x1fd3a
callq 0x52e0
movsbq (%r14), %rax
movslq %r13d, %rcx
imulq %rax, %rcx
addq %r15, %rcx
movq 0x10(%r14), %rax
shlq $0x4, %rcx
movb (%rax,%rcx), %al
leaq 0x1664f(%rip), %rcx     # 0x363a9
cmpb (%rcx), %al
jne 0x1fdc8
movw %bx, 0x78(%rsp)
movq 0x100(%rsp), %rsi
cmpq $0x0, 0x10(%rsi)
je 0x200a8
leaq 0x28(%rsp), %rbp
movq %rbp, %rdi
leaq 0x78(%rsp), %rdx
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 %rsi, (%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x1fe01
movq %rdx, (%rsp)
movq (%rcx), %rdx
movq %rdx, 0x10(%rsp)
jmp 0x1fe09
leaq 0xb8(%rsp), %rcx
leaq 0x165d3(%rip), %rdx     # 0x363aa
cmpb (%rdx), %al
je 0x1fdee
leaq 0xd8(%rsp), %rcx
leaq 0x165c1(%rip), %rdx     # 0x363ab
cmpb (%rdx), %al
jne 0x1fe5d
movq (%rcx), %rsi
movq 0x8(%rcx), %rdx
movq 0x20(%rsp), %rdi
callq 0x50c0
jmp 0x1fe6e
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 0x1fe47
callq 0x52e0
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x1fe6e
callq 0x52e0
jmp 0x1fe6e
movq 0x20(%rsp), %rdi
leaq 0x14a56(%rip), %rsi     # 0x348bf
callq 0x56e0
incq %r15
addl $0x100, %ebx            # imm = 0x100
cmpl %r15d, %r12d
jne 0x1fc73
cmpb %r13b, 0x6(%r14)
jne 0x1fec9
movl 0x4c(%rsp), %eax
decb %al
cmpb %al, 0x7(%r14)
jne 0x1fec9
leaq 0x10(%rsp), %r12
movq %r12, (%rsp)
movq 0x50(%rsp), %rsi
movq 0x58(%rsp), %rdx
addq %rsi, %rdx
movq %rsp, %r15
movq %r15, %rdi
callq 0xa866
movq %r15, %rdi
leaq 0x144aa(%rip), %rsi     # 0x34367
callq 0x56e0
leaq 0x28(%rsp), %rbx
jmp 0x1fef0
leaq 0x10(%rsp), %r12
movq %r12, (%rsp)
movq %rsp, %r15
movq %r15, %rdi
leaq 0x15f64(%rip), %rsi     # 0x35e43
leaq 0x15f5e(%rip), %rdx     # 0x35e44
callq 0xb0e0
leaq 0x28(%rsp), %rbx
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
movq 0x20(%rsp), %rdi
callq 0x50c0
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x1ff11
callq 0x52e0
movq %r15, %rdi
leaq 0xd8(%rsp), %rsi
leaq 0x98(%rsp), %rdx
callq 0x203ec
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
movq 0x20(%rsp), %rdi
callq 0x50c0
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x1ff4a
callq 0x52e0
movq 0x20(%rsp), %rdi
movl $0xa, %esi
callq 0x5290
movl 0x74(%rsp), %eax
movl %eax, %r13d
jmp 0x1fb6f
movslq %eax, %rsi
addq $0x2, %rsi
movq %rsp, %rdi
movq %r12, (%rdi)
movl $0x20, %edx
callq 0x53b0
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
movq 0x20(%rsp), %rdi
callq 0x50c0
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x1ff9d
callq 0x52e0
cmpb $0x0, (%r14)
jle 0x20004
xorl %ebx, %ebx
movq %rsp, %r15
leaq 0x15e94(%rip), %r13     # 0x35e43
movq %r12, (%rsp)
movq 0xb8(%rsp), %rsi
movq 0xc0(%rsp), %rdx
addq %rsi, %rdx
movq %r15, %rdi
callq 0xa866
movq %r15, %rdi
movq %r13, %rsi
callq 0x56e0
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
movq 0x20(%rsp), %rdi
callq 0x50c0
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x1fffa
callq 0x52e0
incl %ebx
movsbl (%r14), %eax
cmpl %eax, %ebx
jl 0x1ffaf
leaq 0x118fb(%rip), %rsi     # 0x31906
movq 0x20(%rsp), %rdi
callq 0x56e0
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 0x20049
callq 0x52e0
movq 0x50(%rsp), %rdi
leaq 0x60(%rsp), %rax
cmpq %rax, %rdi
je 0x2005d
callq 0x52e0
movq 0xd8(%rsp), %rdi
leaq 0xe8(%rsp), %rax
cmpq %rax, %rdi
je 0x20077
callq 0x52e0
movq 0xb8(%rsp), %rdi
leaq 0xc8(%rsp), %rax
cmpq %rax, %rdi
je 0x20091
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 0x200b5
jmp 0x200b5
jmp 0x200de
jmp 0x200b5
movq %rax, %r14
movq 0x78(%rsp), %rdi
cmpq %r15, %rdi
jne 0x200d7
jmp 0x200e1
jmp 0x200de
jmp 0x200ca
jmp 0x200de
movq %rax, %r14
movq 0x28(%rsp), %rdi
cmpq %rbx, %rdi
je 0x200e1
callq 0x52e0
jmp 0x200e1
movq %rax, %r14
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
jne 0x201c1
jmp 0x201c6
jmp 0x20101
jmp 0x2013d
jmp 0x20194
movq %rax, %r14
jmp 0x201c6
movq %rax, %r14
jmp 0x201e0
movq %rax, %r14
jmp 0x201f4
movq %rax, %r14
jmp 0x2020e
jmp 0x20194
jmp 0x20194
jmp 0x2013d
jmp 0x20194
jmp 0x20194
jmp 0x2013d
jmp 0x2013d
jmp 0x20194
jmp 0x20185
jmp 0x2014f
jmp 0x20194
jmp 0x20194
jmp 0x2013d
jmp 0x2013d
movq %rax, %r14
movq (%rsp), %rdi
cmpq %r12, %rdi
jne 0x201aa
jmp 0x201af
jmp 0x20194
jmp 0x20194
movq %rax, %r14
movq (%rsp), %rdi
cmpq %r12, %rdi
jne 0x20178
jmp 0x20188
jmp 0x20185
jmp 0x20194
jmp 0x20199
jmp 0x20194
jmp 0x20194
movq %rax, %r14
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x20188
callq 0x52e0
jmp 0x20188
jmp 0x20199
jmp 0x20194
jmp 0x20194
movq %rax, %r14
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
jmp 0x201a5
movq %rax, %r14
jmp 0x201af
movq %rax, %r14
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x201af
callq 0x52e0
movq 0x20(%rsp), %rax
movq (%rax), %rdi
cmpq 0xf8(%rsp), %rdi
je 0x201c6
callq 0x52e0
movq 0x98(%rsp), %rdi
leaq 0xa8(%rsp), %rax
cmpq %rax, %rdi
je 0x201e0
callq 0x52e0
movq 0x50(%rsp), %rdi
leaq 0x60(%rsp), %rax
cmpq %rax, %rdi
je 0x201f4
callq 0x52e0
movq 0xd8(%rsp), %rdi
leaq 0xe8(%rsp), %rax
cmpq %rax, %rdi
je 0x2020e
callq 0x52e0
movq 0xb8(%rsp), %rdi
leaq 0xc8(%rsp), %rax
cmpq %rax, %rdi
je 0x20228
callq 0x52e0
movq %r14, %rdi
callq 0x5670