// File: /workspace/github_cpp_makefile_star2_O1/codeandkey[P]neocortex/src/position.cpp
// Function: neocortex::Position::dump[abi:cxx11]()
std::string Position::dump() {
	std::string output;

	output += "board: \n";
	output += board.to_pretty();
	output += "\n";

	output += "history: ";

	for (unsigned i = 1; i < ply.size(); ++i) {
		output += ply[i].last_move.to_uci() + " ";
	}

	output += "\n";

	output += "check: " + std::string(check() ? "yes" : "no") + std::string("\n");
	output += "test_check(ctm): " + std::string(test_check(color_to_move) ? "yes" : "no") + std::string("\n");
	output += "test_check(!ctm): " + std::string(test_check(!color_to_move) ? "yes" : "no") + std::string("\n");

	Move moves[MAX_PL_MOVES];
	int num_moves = pseudolegal_moves(moves);

	output += "pseudolegal moves: ";

	for (int i = 0; i < num_moves; ++i) {
		output += moves[i].to_uci() + " ";
	}

	output += "\n";

	return output;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x528, %rsp            # imm = 0x528
movq %rsi, %r14
leaq 0x10(%rdi), %rax
movq %rax, 0x48(%rsp)
movq %rax, (%rdi)
movq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
leaq 0xa2de(%rip), %rsi      # 0x19129
movq %rdi, 0x20(%rsp)
callq 0x4560
leaq 0x70(%rsp), %rdi
movq %r14, %rsi
callq 0x6784
movq 0x70(%rsp), %rsi
movq 0x78(%rsp), %rdx
movq 0x20(%rsp), %rdi
callq 0x4090
leaq 0x80(%rsp), %rbx
movq -0x10(%rbx), %rdi
cmpq %rbx, %rdi
je 0xee97
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x42b0
leaq 0xa292(%rip), %rsi      # 0x19130
movq 0x20(%rsp), %rdi
callq 0x4560
leaq 0xa283(%rip), %rsi      # 0x19132
movq 0x20(%rsp), %rdi
callq 0x4560
movq 0x158(%r14), %rax
movq 0x160(%r14), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
movabsq $0x6db6db6db6db6db7, %rbp # imm = 0x6DB6DB6DB6DB6DB7
imulq %rbp, %rcx
cmpq $0x2, %rcx
jb 0xefca
movl $0x1, %ecx
movl $0x2, %r13d
movq %rsp, %r15
leaq 0xaf64(%rip), %r12      # 0x19e5f
imulq $0x38, %rcx, %rsi
addq %rax, %rsi
movq %r15, %rdi
callq 0x7840
movq %r15, %rdi
movq %r12, %rsi
callq 0x4560
movq %rbx, 0x70(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0xef3b
movq %rdx, 0x70(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x80(%rsp)
jmp 0xef41
movups (%rcx), %xmm0
movups %xmm0, (%rbx)
movq 0x8(%rax), %rdx
movq %rdx, 0x78(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x70(%rsp), %rsi
movq 0x78(%rsp), %rdx
movq 0x20(%rsp), %rdi
callq 0x4090
movq 0x70(%rsp), %rdi
cmpq %rbx, %rdi
je 0xef87
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x42b0
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0xefa2
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x42b0
movl %r13d, %ecx
movq 0x158(%r14), %rax
movq 0x160(%r14), %rdx
subq %rax, %rdx
sarq $0x3, %rdx
imulq %rbp, %rdx
incl %r13d
cmpq %rcx, %rdx
ja 0xeefb
leaq 0xa15f(%rip), %rsi      # 0x19130
movq 0x20(%rsp), %rdi
callq 0x4560
movq %rbx, %r13
movq 0x160(%r14), %rax
xorl %edx, %edx
cmpl $0x0, -0x14(%rax)
sete %dl
leaq 0xa153(%rip), %rbp      # 0x19148
leaq 0xa148(%rip), %r15      # 0x19144
movq %r15, %rsi
cmoveq %rbp, %rsi
leaq 0x38(%rsp), %rax
movq %rax, -0x10(%rax)
xorq $0x3, %rdx
addq %rsi, %rdx
leaq 0x28(%rsp), %rdi
callq 0x6fca
leaq 0xa118(%rip), %rcx      # 0x1913c
leaq 0x28(%rsp), %rdi
movl $0x7, %r8d
xorl %esi, %esi
xorl %edx, %edx
movq 0x20(%rsp), %rbx
callq 0x42f0
leaq 0x10(%rsp), %rsi
movq %rsi, (%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0xf063
movq %rdx, (%rsp)
movq (%rcx), %rdx
movq %rdx, 0x10(%rsp)
jmp 0xf069
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq 0x8(%rax), %rdx
movq %rdx, 0x8(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x60(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0xa09e(%rip), %rsi      # 0x19130
leaq 0xa098(%rip), %rdx      # 0x19131
leaq 0x50(%rsp), %rdi
callq 0x6fca
movq (%rsp), %rcx
movq 0x8(%rsp), %r8
movq 0x58(%rsp), %rdx
leaq (%rdx,%r8), %rax
movl $0xf, %esi
leaq 0x10(%rsp), %rdi
cmpq %rdi, %rcx
je 0xf0c9
movq 0x10(%rsp), %rsi
cmpq %rsi, %rax
jbe 0xf0e4
movl $0xf, %esi
cmpq %r12, 0x50(%rsp)
je 0xf0df
movq 0x60(%rsp), %rsi
cmpq %rsi, %rax
jbe 0xf0f3
movq 0x50(%rsp), %rsi
movq %rsp, %rdi
callq 0x4090
jmp 0xf101
leaq 0x50(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x42f0
movq %r13, 0x70(%rsp)
movq (%rax), %rdx
leaq 0x10(%rax), %rcx
cmpq %rcx, %rdx
je 0xf124
movq %rdx, 0x70(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x80(%rsp)
jmp 0xf12c
movups (%rcx), %xmm0
movups %xmm0, (%r13)
movq %rax, %rdx
addq $0x8, %rdx
movq 0x8(%rax), %rsi
movq %rsi, 0x78(%rsp)
movq %rcx, (%rax)
movq $0x0, (%rdx)
movb $0x0, (%rcx)
movq 0x70(%rsp), %rsi
movq 0x78(%rsp), %rdx
movq %rbx, %rdi
callq 0x4090
movq 0x70(%rsp), %rdi
cmpq %r13, %rdi
je 0xf175
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x42b0
movq 0x50(%rsp), %rdi
cmpq %r12, %rdi
je 0xf18c
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x42b0
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0xf1a7
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x42b0
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0xf1c3
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x42b0
movl 0x170(%r14), %esi
movq %r14, %rdi
callq 0xf818
testb %al, %al
movq %r15, %rsi
cmoveq %rbp, %rsi
leaq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rcx
movq %rcx, (%rdi)
movzbl %al, %eax
leaq (%rsi,%rax), %rdx
addq $0x2, %rdx
callq 0x6fca
leaq 0x9f4c(%rip), %rcx      # 0x1914b
leaq 0x28(%rsp), %rdi
movl $0x11, %r8d
xorl %esi, %esi
xorl %edx, %edx
callq 0x42f0
leaq 0x10(%rsp), %rsi
movq %rsi, (%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0xf239
movq %rdx, (%rsp)
movq (%rcx), %rdx
movq %rdx, 0x10(%rsp)
jmp 0xf23f
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq 0x8(%rax), %rdx
movq %rdx, 0x8(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x50(%rsp), %rdi
movq %r12, (%rdi)
leaq 0x9eca(%rip), %rsi      # 0x19130
leaq 0x9ec4(%rip), %rdx      # 0x19131
callq 0x6fca
movq (%rsp), %rcx
movq 0x8(%rsp), %r8
movq 0x58(%rsp), %rdx
leaq (%rdx,%r8), %rax
movl $0xf, %esi
leaq 0x10(%rsp), %rdi
cmpq %rdi, %rcx
je 0xf298
movq 0x10(%rsp), %rsi
cmpq %rsi, %rax
jbe 0xf2b3
movl $0xf, %esi
cmpq %r12, 0x50(%rsp)
je 0xf2ae
movq 0x60(%rsp), %rsi
cmpq %rsi, %rax
jbe 0xf2c2
movq 0x50(%rsp), %rsi
movq %rsp, %rdi
callq 0x4090
jmp 0xf2d0
leaq 0x50(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x42f0
movq %r13, 0x70(%rsp)
movq (%rax), %rdx
leaq 0x10(%rax), %rcx
cmpq %rcx, %rdx
je 0xf2f3
movq %rdx, 0x70(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x80(%rsp)
jmp 0xf2fb
movups (%rcx), %xmm0
movups %xmm0, (%r13)
movq %rax, %rdx
addq $0x8, %rdx
movq 0x8(%rax), %rsi
movq %rsi, 0x78(%rsp)
movq %rcx, (%rax)
movq $0x0, (%rdx)
movb $0x0, (%rcx)
movq 0x70(%rsp), %rsi
movq 0x78(%rsp), %rdx
movq %rbx, %rdi
callq 0x4090
movq 0x70(%rsp), %rdi
cmpq %r13, %rdi
je 0xf344
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x42b0
movq 0x50(%rsp), %rdi
cmpq %r12, %rdi
je 0xf35b
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x42b0
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0xf376
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x42b0
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0xf392
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x42b0
xorl %esi, %esi
cmpl $0x0, 0x170(%r14)
sete %sil
movq %r14, %rdi
callq 0xf818
testb %al, %al
cmoveq %rbp, %r15
leaq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rcx
movq %rcx, (%rdi)
movzbl %al, %eax
leaq (%r15,%rax), %rdx
addq $0x2, %rdx
movq %r15, %rsi
callq 0x6fca
leaq 0x9d88(%rip), %rcx      # 0x1915d
leaq 0x28(%rsp), %rdi
movl $0x12, %r8d
xorl %esi, %esi
xorl %edx, %edx
callq 0x42f0
leaq 0x10(%rsp), %r15
movq %r15, (%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0xf40f
movq %rdx, (%rsp)
movq (%rcx), %rdx
movq %rdx, 0x10(%rsp)
jmp 0xf416
movups (%rcx), %xmm0
movups %xmm0, (%r15)
movq 0x8(%rax), %rdx
movq %rdx, 0x8(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x50(%rsp), %rdi
movq %r12, (%rdi)
leaq 0x9cf3(%rip), %rsi      # 0x19130
leaq 0x9ced(%rip), %rdx      # 0x19131
callq 0x6fca
movq (%rsp), %rcx
movq 0x8(%rsp), %r8
movq 0x58(%rsp), %rdx
leaq (%rdx,%r8), %rax
movl $0xf, %esi
cmpq %r15, %rcx
je 0xf46a
movq 0x10(%rsp), %rsi
cmpq %rsi, %rax
jbe 0xf485
movl $0xf, %esi
cmpq %r12, 0x50(%rsp)
je 0xf480
movq 0x60(%rsp), %rsi
cmpq %rsi, %rax
jbe 0xf494
movq 0x50(%rsp), %rsi
movq %rsp, %rdi
callq 0x4090
jmp 0xf4a2
leaq 0x50(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x42f0
movq %r13, 0x70(%rsp)
movq (%rax), %rdx
leaq 0x10(%rax), %rcx
cmpq %rcx, %rdx
je 0xf4c5
movq %rdx, 0x70(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x80(%rsp)
jmp 0xf4cd
movups (%rcx), %xmm0
movups %xmm0, (%r13)
movq %rax, %rdx
addq $0x8, %rdx
movq 0x8(%rax), %rsi
movq %rsi, 0x78(%rsp)
movq %rcx, (%rax)
movq $0x0, (%rdx)
movb $0x0, (%rcx)
movq 0x70(%rsp), %rsi
movq 0x78(%rsp), %rdx
movq %rbx, %rdi
callq 0x4090
movq 0x70(%rsp), %rdi
cmpq %r13, %rdi
je 0xf516
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x42b0
movq 0x50(%rsp), %rdi
cmpq %r12, %rdi
je 0xf52d
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x42b0
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0xf543
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x42b0
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0xf55f
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x42b0
xorl %r15d, %r15d
leaq (%rsp,%r15), %rdi
addq $0x70, %rdi
callq 0x7648
addq $0xc, %r15
cmpq $0x4b0, %r15            # imm = 0x4B0
jne 0xf562
leaq 0x70(%rsp), %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x9cc2
movl %eax, %ebp
leaq 0x9bdb(%rip), %rsi      # 0x19170
movq %rbx, %rdi
callq 0x4560
testl %ebp, %ebp
jle 0xf663
movl %ebp, %r13d
leaq 0x28(%rsp), %r14
leaq 0xa8ab(%rip), %r12      # 0x19e5f
movq %r14, %rdi
movq %r15, %rsi
callq 0x7840
movq %r14, %rdi
movq %r12, %rsi
callq 0x4560
leaq 0x10(%rsp), %rsi
movq %rsi, (%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0xf5f0
movq %rdx, (%rsp)
movq (%rcx), %rdx
movq %rdx, 0x10(%rsp)
jmp 0xf5f6
movups (%rcx), %xmm0
movups %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 %rbx, %rdi
callq 0x4090
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0xf63a
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x42b0
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0xf656
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x42b0
addq $0xc, %r15
decq %r13
jne 0xf5b4
leaq 0x9ac6(%rip), %rsi      # 0x19130
movq %rbx, %rdi
callq 0x4560
movq %rbx, %rax
addq $0x528, %rsp            # imm = 0x528
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xf6ab
jmp 0xf6ca
jmp 0xf6e6
jmp 0xf706
jmp 0xf748
jmp 0xf748
jmp 0xf6ab
jmp 0xf6ca
jmp 0xf6e6
jmp 0xf706
jmp 0xf748
jmp 0xf748
movq %rax, %r14
movq 0x70(%rsp), %rdi
cmpq %r13, %rdi
je 0xf6cd
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x42b0
jmp 0xf6cd
movq %rax, %r14
movq 0x50(%rsp), %rdi
cmpq %r12, %rdi
je 0xf6e9
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x42b0
jmp 0xf6e9
movq %rax, %r14
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0xf709
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x42b0
jmp 0xf709
movq %rax, %r14
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0xf78a
movq 0x38(%rsp), %rsi
jmp 0xf782
jmp 0xf748
movq %rax, %r14
leaq 0x80(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xf78a
movq 0x80(%rsp), %rsi
jmp 0xf782
jmp 0xf748
jmp 0xf7e1
jmp 0xf748
movq %rax, %r14
jmp 0xf78a
movq %rax, %r14
jmp 0xf76f
movq %rax, %r14
movq 0x70(%rsp), %rdi
cmpq %rbx, %rdi
je 0xf76f
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x42b0
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0xf78a
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x42b0
movq 0x48(%rsp), %rax
movq 0x20(%rsp), %rbx
jmp 0xf7e9
movq %rax, %r14
jmp 0xf7da
movq %rax, %r14
jmp 0xf7be
movq %rax, %r14
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0xf7be
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x42b0
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0xf7da
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x42b0
movq 0x20(%rsp), %rbx
jmp 0xf7e4
movq %rax, %r14
movq 0x48(%rsp), %rax
movq (%rbx), %rdi
cmpq %rax, %rdi
je 0xf7fc
movq (%rax), %rsi
incq %rsi
callq 0x42b0
movq %r14, %rdi
callq 0x44f0