// File: /workspace/github_cpp_makefile_star2_O2/ATOMIC-LICHESS[P]ATOMKRAFT/debug.cpp
// Function: print_debuginfo(Position const&)
void print_debuginfo(const Position& pos) {
	char names[7][50] = {
			"PIECES", "PAWNS", "KNIGHTS", "BISHOPS",
			"ROOKS", "QUEENS", "KINGS"	
	};
	
	cout << endl;
	cout << "--- START DEBUG INFORMATION ---" << endl;
	cout << endl;
	
	cout << "CASTLING RIGHTS" << endl;
	print_castleRights(pos);
	cout << endl;
	
	
	for (int pt = 0; pt < 7; ++pt) {
		cout << "PIECELIST WHITE " << names[pt] << endl;
		for (int i = 0; i < pos.piece_count(WHITE, (PieceType)pt); ++i) {
			cout << pos.piece_list(WHITE, (PieceType)pt, i) << " ";
		}
		cout << endl << endl;
	}
	
	for (int pt = 0; pt < 7; ++pt) {
		cout << "PIECELIST BLACK " << names[pt] << endl;
		for (int i = 0; i < pos.piece_count(BLACK, (PieceType)pt); ++i) {
			cout << pos.piece_list(BLACK, (PieceType)pt, i) << " ";
		}
		cout << endl << endl;
	}
	
	cout << "BOARD" << endl;
	print_pos(pos);
	cout << endl;
	
	for (int pt = 0; pt < 7; ++pt) {
		cout << "WHITE " << names[pt] << endl;
		print_bb(pos.pieces((PieceType)pt, WHITE));
		cout << endl;
	}
	
	for (int pt = 0; pt < 7; ++pt) {
		cout << "BLACK " << names[pt] << endl;
		print_bb(pos.pieces((PieceType)pt, BLACK));
		cout << endl;
	}
	
	cout << endl;
	cout << "--- END DEBUG INFORMATION ---" << endl;
	cout << endl;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x168, %rsp            # imm = 0x168
movq %rdi, %rbx
leaq 0x1dcaa(%rip), %rsi     # 0x28860
movq %rsp, %rdi
movl $0x15e, %edx            # imm = 0x15E
callq 0x5310
movq 0x2a3d6(%rip), %r15     # 0x34fa0
movq %r15, %rdi
callq 0x51d0
leaq 0x1daee(%rip), %rsi     # 0x286c7
movq %r15, %rdi
callq 0x53b0
movq %rax, %rdi
callq 0x51d0
movq %r15, %rdi
callq 0x51d0
leaq 0x1daef(%rip), %rsi     # 0x286e7
movq %r15, %rdi
callq 0x53b0
movq %rax, %rdi
callq 0x51d0
movq %rbx, %rdi
callq 0xab22
movq %r15, %rdi
callq 0x51d0
leaq 0x190(%rbx), %rbp
xorl %r12d, %r12d
leaq 0x1d937(%rip), %r13     # 0x28560
cmpq $0x7, %r12
je 0xac9c
movq %r15, %rdi
leaq 0x1dabe(%rip), %rsi     # 0x286f7
callq 0x53b0
imulq $0x32, %r12, %rcx
leaq (%rsp,%rcx), %rsi
movq %rax, %rdi
callq 0x53b0
movq %rax, %rdi
callq 0x51d0
xorl %r14d, %r14d
movslq 0x150(%rbx,%r12,4), %rax
cmpq %rax, %r14
jge 0xac83
movl (%rbp,%r14,4), %esi
movq %r15, %rdi
callq 0x5760
movq %rax, %rdi
movq %r13, %rsi
callq 0x53b0
incq %r14
jmp 0xac59
movq %r15, %rdi
callq 0x51d0
movq %rax, %rdi
callq 0x51d0
incq %r12
addq $0x40, %rbp
jmp 0xac29
leaq 0x390(%rbx), %rbp
xorl %r12d, %r12d
movq 0x2a2f3(%rip), %r15     # 0x34fa0
leaq 0x1d8ac(%rip), %r13     # 0x28560
cmpq $0x7, %r12
je 0xad27
movq %r15, %rdi
leaq 0x1da44(%rip), %rsi     # 0x28708
callq 0x53b0
imulq $0x32, %r12, %rcx
leaq (%rsp,%rcx), %rsi
movq %rax, %rdi
callq 0x53b0
movq %rax, %rdi
callq 0x51d0
xorl %r14d, %r14d
movslq 0x170(%rbx,%r12,4), %rax
cmpq %rax, %r14
jge 0xad0e
movl (%rbp,%r14,4), %esi
movq %r15, %rdi
callq 0x5760
movq %rax, %rdi
movq %r13, %rsi
callq 0x53b0
incq %r14
jmp 0xace4
movq %r15, %rdi
callq 0x51d0
movq %rax, %rdi
callq 0x51d0
incq %r12
addq $0x40, %rbp
jmp 0xacb4
movq 0x2a272(%rip), %r15     # 0x34fa0
leaq 0x1d9e4(%rip), %rsi     # 0x28719
movq %r15, %rdi
callq 0x53b0
movq %rax, %rdi
callq 0x51d0
movq %rbx, %rdi
callq 0xa83c
movq %r15, %rdi
callq 0x51d0
xorl %r13d, %r13d
leaq 0x1d9a2(%rip), %r12     # 0x28701
movq %rsp, %r14
cmpq $0x7, %r13
je 0xadab
movq %r15, %rdi
movq %r12, %rsi
callq 0x53b0
movq %rax, %rdi
movq %r14, %rsi
callq 0x53b0
movq %rax, %rdi
callq 0x51d0
movq 0x140(%rbx), %rdi
andq 0x100(%rbx,%r13,8), %rdi
callq 0xa990
movq %r15, %rdi
callq 0x51d0
incq %r13
addq $0x32, %r14
jmp 0xad62
movq %rsp, %r14
xorl %r13d, %r13d
movq 0x2a1e8(%rip), %r15     # 0x34fa0
leaq 0x1d953(%rip), %r12     # 0x28712
cmpq $0x7, %r13
je 0xae08
movq %r15, %rdi
movq %r12, %rsi
callq 0x53b0
movq %rax, %rdi
movq %r14, %rsi
callq 0x53b0
movq %rax, %rdi
callq 0x51d0
movq 0x148(%rbx), %rdi
andq 0x100(%rbx,%r13,8), %rdi
callq 0xa990
movq %r15, %rdi
callq 0x51d0
incq %r13
addq $0x32, %r14
jmp 0xadbf
movq 0x2a191(%rip), %rbx     # 0x34fa0
movq %rbx, %rdi
callq 0x51d0
leaq 0x1d901(%rip), %rsi     # 0x2871f
movq %rbx, %rdi
callq 0x53b0
movq %rax, %rdi
callq 0x51d0
movq %rbx, %rdi
callq 0x51d0
addq $0x168, %rsp            # imm = 0x168
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq