// File: /workspace/github_cpp_makefile_star2_O3/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 0xb00a(%rip), %rsi      # 0x1a1e9
movq %rdi, 0x20(%rsp)
callq 0x4560
leaq 0x70(%rsp), %rdi
movq %r14, %rsi
callq 0x688a
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 0xf22b
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x42b0
leaq 0xafbe(%rip), %rsi      # 0x1a1f0
movq 0x20(%rsp), %rdi
callq 0x4560
leaq 0xafaf(%rip), %rsi      # 0x1a1f2
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 0xf35e
movl $0x1, %ecx
movl $0x2, %r13d
movq %rsp, %r15
leaq 0xbcc0(%rip), %r12      # 0x1af4f
imulq $0x38, %rcx, %rsi
addq %rax, %rsi
movq %r15, %rdi
callq 0x794c
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 0xf2cf
movq %rdx, 0x70(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x80(%rsp)
jmp 0xf2d5
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 0xf31b
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x42b0
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0xf336
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 0xf28f
leaq 0xae8b(%rip), %rsi      # 0x1a1f0
movq 0x20(%rsp), %rdi
callq 0x4560
movq %rbx, %r13
movq 0x160(%r14), %rax
xorl %edx, %edx
cmpl $0x0, -0x14(%rax)
sete %dl
leaq 0xae7f(%rip), %rbp      # 0x1a208
leaq 0xae74(%rip), %r15      # 0x1a204
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 0x70d8
leaq 0xae44(%rip), %rcx      # 0x1a1fc
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 0xf3f7
movq %rdx, (%rsp)
movq (%rcx), %rdx
movq %rdx, 0x10(%rsp)
jmp 0xf3fd
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 0xadca(%rip), %rsi      # 0x1a1f0
leaq 0xadc4(%rip), %rdx      # 0x1a1f1
leaq 0x50(%rsp), %rdi
callq 0x70d8
movq (%rsp), %rcx
movq 0x8(%rsp), %r8
movq 0x58(%rsp), %rdx
leaq (%rdx,%r8), %rax
movl $0xf, %edi
leaq 0x10(%rsp), %rsi
cmpq %rsi, %rcx
je 0xf45d
movq 0x10(%rsp), %rdi
movq 0x50(%rsp), %rsi
cmpq %rdi, %rax
jbe 0xf47b
movl $0xf, %edi
cmpq %r12, %rsi
je 0xf476
movq 0x60(%rsp), %rdi
cmpq %rdi, %rax
jbe 0xf485
movq %rsp, %rdi
callq 0x4090
jmp 0xf493
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 0xf4b6
movq %rdx, 0x70(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x80(%rsp)
jmp 0xf4be
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 0xf507
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x42b0
movq 0x50(%rsp), %rdi
cmpq %r12, %rdi
je 0xf51e
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x42b0
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0xf539
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x42b0
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0xf555
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x42b0
movl 0x170(%r14), %esi
movq %r14, %rdi
callq 0xfba6
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 0x70d8
leaq 0xac7a(%rip), %rcx      # 0x1a20b
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 0xf5cb
movq %rdx, (%rsp)
movq (%rcx), %rdx
movq %rdx, 0x10(%rsp)
jmp 0xf5d1
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 0xabf8(%rip), %rsi      # 0x1a1f0
leaq 0xabf2(%rip), %rdx      # 0x1a1f1
callq 0x70d8
movq (%rsp), %rcx
movq 0x8(%rsp), %r8
movq 0x58(%rsp), %rdx
leaq (%rdx,%r8), %rax
movl $0xf, %edi
leaq 0x10(%rsp), %rsi
cmpq %rsi, %rcx
je 0xf62a
movq 0x10(%rsp), %rdi
movq 0x50(%rsp), %rsi
cmpq %rdi, %rax
jbe 0xf648
movl $0xf, %edi
cmpq %r12, %rsi
je 0xf643
movq 0x60(%rsp), %rdi
cmpq %rdi, %rax
jbe 0xf652
movq %rsp, %rdi
callq 0x4090
jmp 0xf660
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 0xf683
movq %rdx, 0x70(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x80(%rsp)
jmp 0xf68b
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 0xf6d4
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x42b0
movq 0x50(%rsp), %rdi
cmpq %r12, %rdi
je 0xf6eb
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x42b0
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0xf706
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x42b0
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0xf722
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x42b0
xorl %esi, %esi
cmpl $0x0, 0x170(%r14)
sete %sil
movq %r14, %rdi
callq 0xfba6
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 0x70d8
leaq 0xaab8(%rip), %rcx      # 0x1a21d
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 0xf79f
movq %rdx, (%rsp)
movq (%rcx), %rdx
movq %rdx, 0x10(%rsp)
jmp 0xf7a6
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 0xaa23(%rip), %rsi      # 0x1a1f0
leaq 0xaa1d(%rip), %rdx      # 0x1a1f1
callq 0x70d8
movq (%rsp), %rcx
movq 0x8(%rsp), %r8
movq 0x58(%rsp), %rdx
leaq (%rdx,%r8), %rax
movl $0xf, %edi
cmpq %r15, %rcx
je 0xf7fa
movq 0x10(%rsp), %rdi
movq 0x50(%rsp), %rsi
cmpq %rdi, %rax
jbe 0xf818
movl $0xf, %edi
cmpq %r12, %rsi
je 0xf813
movq 0x60(%rsp), %rdi
cmpq %rdi, %rax
jbe 0xf822
movq %rsp, %rdi
callq 0x4090
jmp 0xf830
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 0xf853
movq %rdx, 0x70(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x80(%rsp)
jmp 0xf85b
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 0xf8a4
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x42b0
movq 0x50(%rsp), %rdi
cmpq %r12, %rdi
je 0xf8bb
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x42b0
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0xf8d1
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x42b0
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0xf8ed
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x42b0
xorl %r15d, %r15d
leaq (%rsp,%r15), %rdi
addq $0x70, %rdi
callq 0x7758
addq $0xc, %r15
cmpq $0x4b0, %r15            # imm = 0x4B0
jne 0xf8f0
leaq 0x70(%rsp), %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x9d82
movl %eax, %ebp
leaq 0xa90d(%rip), %rsi      # 0x1a230
movq %rbx, %rdi
callq 0x4560
testl %ebp, %ebp
jle 0xf9f1
movl %ebp, %r13d
leaq 0x28(%rsp), %r14
leaq 0xb60d(%rip), %r12      # 0x1af4f
movq %r14, %rdi
movq %r15, %rsi
callq 0x794c
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 0xf97e
movq %rdx, (%rsp)
movq (%rcx), %rdx
movq %rdx, 0x10(%rsp)
jmp 0xf984
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 0xf9c8
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x42b0
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0xf9e4
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x42b0
addq $0xc, %r15
decq %r13
jne 0xf942
leaq 0xa7f8(%rip), %rsi      # 0x1a1f0
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 0xfa39
jmp 0xfa58
jmp 0xfa74
jmp 0xfa94
jmp 0xfad6
jmp 0xfad6
jmp 0xfa39
jmp 0xfa58
jmp 0xfa74
jmp 0xfa94
jmp 0xfad6
jmp 0xfad6
movq %rax, %r14
movq 0x70(%rsp), %rdi
cmpq %r13, %rdi
je 0xfa5b
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x42b0
jmp 0xfa5b
movq %rax, %r14
movq 0x50(%rsp), %rdi
cmpq %r12, %rdi
je 0xfa77
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x42b0
jmp 0xfa77
movq %rax, %r14
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0xfa97
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x42b0
jmp 0xfa97
movq %rax, %r14
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0xfb18
movq 0x38(%rsp), %rsi
jmp 0xfb10
jmp 0xfad6
movq %rax, %r14
leaq 0x80(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xfb18
movq 0x80(%rsp), %rsi
jmp 0xfb10
jmp 0xfad6
jmp 0xfb6f
jmp 0xfad6
movq %rax, %r14
jmp 0xfb18
movq %rax, %r14
jmp 0xfafd
movq %rax, %r14
movq 0x70(%rsp), %rdi
cmpq %rbx, %rdi
je 0xfafd
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x42b0
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0xfb18
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x42b0
movq 0x48(%rsp), %rax
movq 0x20(%rsp), %rbx
jmp 0xfb77
movq %rax, %r14
jmp 0xfb68
movq %rax, %r14
jmp 0xfb4c
movq %rax, %r14
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0xfb4c
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x42b0
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0xfb68
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x42b0
movq 0x20(%rsp), %rbx
jmp 0xfb72
movq %rax, %r14
movq 0x48(%rsp), %rax
movq (%rbx), %rdi
cmpq %rax, %rdi
je 0xfb8a
movq (%rax), %rsi
incq %rsi
callq 0x42b0
movq %r14, %rdi
callq 0x44f0