// File: /workspace/github_cpp_makefile_star2_O2/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
movq %rdi, %rbp
leaq 0x10(%rdi), %rax
movq %rax, (%rdi)
andq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
leaq 0x8889(%rip), %rsi      # 0x15299
callq 0x45a0
leaq 0x70(%rsp), %rdi
movq %r14, %rsi
callq 0x5e48
leaq 0x70(%rsp), %rsi
movq %rbp, %rdi
callq 0x45c0
leaq 0x70(%rsp), %rdi
callq 0x4120
leaq 0x8860(%rip), %rsi      # 0x152a0
movq %rbp, %rdi
callq 0x45a0
leaq 0x8853(%rip), %rsi      # 0x152a2
movq %rbp, %rdi
callq 0x45a0
movq %rbp, 0x8(%rsp)
pushq $0x1
popq %rbp
pushq $0x38
popq %rbx
leaq 0x10(%rsp), %r15
leaq 0x9491(%rip), %r12      # 0x15eff
leaq 0x70(%rsp), %r13
movl %ebp, %ebp
movq 0x158(%r14), %rsi
movq 0x160(%r14), %rax
subq %rsi, %rax
cqto
idivq %rbx
cmpq %rbp, %rax
jbe 0xcace
imulq $0x38, %rbp, %rax
addq %rax, %rsi
movq %r15, %rdi
callq 0x6eca
movq %r13, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0xcf6e
movq 0x8(%rsp), %rdi
movq %r13, %rsi
callq 0x45c0
movq %r13, %rdi
callq 0x4120
movq %r15, %rdi
callq 0x4120
incl %ebp
jmp 0xca73
leaq 0x87cb(%rip), %rsi      # 0x152a0
movq 0x8(%rsp), %rbp
movq %rbp, %rdi
callq 0x45a0
movq 0x160(%r14), %rax
cmpl $0x0, -0x14(%rax)
leaq 0x87c4(%rip), %r12      # 0x152b8
leaq 0x87b9(%rip), %r15      # 0x152b4
movq %r15, %rsi
cmoveq %r12, %rsi
leaq 0x30(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x6302
leaq 0x8794(%rip), %rsi      # 0x152ac
leaq 0x10(%rsp), %rdi
leaq 0x30(%rsp), %rdx
callq 0xcff4
leaq 0x8772(%rip), %rsi      # 0x152a0
leaq 0x50(%rsp), %rdi
leaq 0x6(%rsp), %rdx
callq 0x6302
leaq 0x70(%rsp), %rdi
leaq 0x10(%rsp), %rsi
leaq 0x50(%rsp), %rdx
callq 0xcf8d
leaq 0x70(%rsp), %rsi
movq %rbp, %rdi
callq 0x45c0
leaq 0x70(%rsp), %rdi
callq 0x4120
leaq 0x50(%rsp), %rdi
callq 0x4120
leaq 0x10(%rsp), %rdi
callq 0x4120
leaq 0x30(%rsp), %rdi
callq 0x4120
movl 0x170(%r14), %esi
movq %r14, %rdi
callq 0xce96
testb %al, %al
movq %r15, %rsi
cmoveq %r12, %rsi
leaq 0x30(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x6302
leaq 0x8707(%rip), %rsi      # 0x152bb
leaq 0x10(%rsp), %rdi
leaq 0x30(%rsp), %rdx
callq 0xcff4
leaq 0x86d6(%rip), %rsi      # 0x152a0
leaq 0x50(%rsp), %rdi
leaq 0x6(%rsp), %rdx
callq 0x6302
leaq 0x70(%rsp), %rdi
leaq 0x10(%rsp), %rsi
leaq 0x50(%rsp), %rdx
callq 0xcf8d
leaq 0x70(%rsp), %rsi
movq %rbp, %rdi
callq 0x45c0
leaq 0x70(%rsp), %rdi
callq 0x4120
leaq 0x50(%rsp), %rdi
callq 0x4120
leaq 0x10(%rsp), %rdi
callq 0x4120
leaq 0x30(%rsp), %rdi
callq 0x4120
xorl %esi, %esi
cmpl $0x0, 0x170(%r14)
sete %sil
movq %r14, %rdi
callq 0xce96
testb %al, %al
cmoveq %r12, %r15
leaq 0x30(%rsp), %rdi
leaq 0x7(%rsp), %rdx
movq %r15, %rsi
callq 0x6302
leaq 0x8676(%rip), %rsi      # 0x152cd
leaq 0x10(%rsp), %rdi
leaq 0x30(%rsp), %rdx
callq 0xcff4
leaq 0x8633(%rip), %rsi      # 0x152a0
leaq 0x50(%rsp), %rdi
leaq 0x6(%rsp), %rdx
callq 0x6302
leaq 0x70(%rsp), %rdi
leaq 0x10(%rsp), %rsi
leaq 0x50(%rsp), %rdx
callq 0xcf8d
leaq 0x70(%rsp), %rsi
movq %rbp, %rdi
callq 0x45c0
leaq 0x70(%rsp), %rdi
callq 0x4120
leaq 0x50(%rsp), %rdi
callq 0x4120
leaq 0x10(%rsp), %rdi
callq 0x4120
leaq 0x30(%rsp), %rdi
callq 0x4120
xorl %ebx, %ebx
leaq (%rsp,%rbx), %rdi
addq $0x70, %rdi
callq 0x6d44
addq $0xc, %rbx
cmpq $0x4b0, %rbx            # imm = 0x4B0
jne 0xccc7
leaq 0x70(%rsp), %rsi
movq %r14, %rdi
callq 0x8a04
movl %eax, %r14d
leaq 0x85e8(%rip), %rsi      # 0x152e0
movq %rbp, %rdi
callq 0x45a0
xorl %ebx, %ebx
testl %r14d, %r14d
cmovlel %ebx, %r14d
imulq $0xc, %r14, %r13
leaq 0x30(%rsp), %r14
leaq 0x91e6(%rip), %r15      # 0x15eff
leaq 0x10(%rsp), %r12
cmpq %rbx, %r13
je 0xcd62
leaq (%rsp,%rbx), %rsi
addq $0x70, %rsi
movq %r14, %rdi
callq 0x6eca
movq %r12, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0xcf6e
movq %rbp, %rdi
movq %r12, %rsi
callq 0x45c0
movq %r12, %rdi
callq 0x4120
movq %r14, %rdi
callq 0x4120
addq $0xc, %rbx
jmp 0xcd1e
leaq 0x8537(%rip), %rsi      # 0x152a0
movq %rbp, %rdi
callq 0x45a0
movq %rbp, %rax
addq $0x528, %rsp            # imm = 0x528
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xcda4
jmp 0xcdb3
jmp 0xcde4
jmp 0xcddf
jmp 0xce20
jmp 0xce20
jmp 0xcda4
jmp 0xcdb3
jmp 0xcde4
jmp 0xcddf
jmp 0xce20
jmp 0xce20
movq %rax, %r14
leaq 0x70(%rsp), %rdi
callq 0x4120
jmp 0xcdb6
movq %rax, %r14
leaq 0x50(%rsp), %rdi
callq 0x4120
jmp 0xcde7
jmp 0xcde4
jmp 0xcddf
jmp 0xce20
movq %rax, %r14
leaq 0x70(%rsp), %rdi
callq 0x4120
jmp 0xce23
jmp 0xce20
jmp 0xce20
jmp 0xce20
jmp 0xce20
movq %rax, %r14
jmp 0xcdf1
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0x4120
leaq 0x30(%rsp), %rdi
jmp 0xce0f
movq %rax, %r14
leaq 0x70(%rsp), %rdi
callq 0x4120
jmp 0xce0a
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0x4120
movq 0x8(%rsp), %rbp
jmp 0xce23
movq %rax, %r14
jmp 0xce14
movq %rax, %r14
movq %rbp, %rdi
callq 0x4120
movq %r14, %rdi
callq 0x4550
nop