// File: 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:
subq $0x188, %rsp            # imm = 0x188
movq %rdi, 0x180(%rsp)
leaq 0x20(%rsp), %rdi
leaq 0x437b5(%rip), %rsi     # 0x59860
movl $0x15e, %edx            # imm = 0x15E
callq 0x63f0
movq 0x55efc(%rip), %rdi     # 0x6bfb8
movq 0x55ecd(%rip), %rsi     # 0x6bf90
callq 0x6520
movq 0x55ee9(%rip), %rdi     # 0x6bfb8
leaq 0x435f1(%rip), %rsi     # 0x596c7
callq 0x64b0
movq %rax, %rdi
movq 0x55eab(%rip), %rsi     # 0x6bf90
callq 0x6520
movq 0x55ec7(%rip), %rdi     # 0x6bfb8
movq 0x55e98(%rip), %rsi     # 0x6bf90
callq 0x6520
movq 0x55eb4(%rip), %rdi     # 0x6bfb8
leaq 0x435dc(%rip), %rsi     # 0x596e7
callq 0x64b0
movq %rax, %rdi
movq 0x55e76(%rip), %rsi     # 0x6bf90
callq 0x6520
movq 0x180(%rsp), %rdi
callq 0x15fd0
movq 0x55e85(%rip), %rdi     # 0x6bfb8
movq 0x55e56(%rip), %rsi     # 0x6bf90
callq 0x6520
movl $0x0, 0x1c(%rsp)
cmpl $0x7, 0x1c(%rsp)
jge 0x1622d
movq 0x55e5f(%rip), %rdi     # 0x6bfb8
leaq 0x43597(%rip), %rsi     # 0x596f7
callq 0x64b0
movq %rax, %rdi
movslq 0x1c(%rsp), %rax
leaq 0x20(%rsp), %rsi
imulq $0x32, %rax, %rax
addq %rax, %rsi
callq 0x64b0
movq %rax, %rdi
movq 0x55e08(%rip), %rsi     # 0x6bf90
callq 0x6520
movl $0x0, 0x18(%rsp)
movl 0x18(%rsp), %eax
movl %eax, 0x4(%rsp)
movq 0x180(%rsp), %rdi
movl 0x1c(%rsp), %edx
xorl %esi, %esi
callq 0x164c0
movl %eax, %ecx
movl 0x4(%rsp), %eax
cmpl %ecx, %eax
jge 0x161fb
movq 0x180(%rsp), %rdi
movl 0x1c(%rsp), %edx
movl 0x18(%rsp), %ecx
xorl %esi, %esi
callq 0x164f0
movl %eax, %esi
movq 0x55dde(%rip), %rdi     # 0x6bfb8
callq 0x6940
movq %rax, %rdi
leaq 0x43377(%rip), %rsi     # 0x59560
callq 0x64b0
movl 0x18(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x18(%rsp)
jmp 0x16195
movq 0x55db6(%rip), %rdi     # 0x6bfb8
movq 0x55d87(%rip), %rsi     # 0x6bf90
callq 0x6520
movq %rax, %rdi
movq 0x55d78(%rip), %rsi     # 0x6bf90
callq 0x6520
movl 0x1c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x1c(%rsp)
jmp 0x16147
movl $0x0, 0x14(%rsp)
cmpl $0x7, 0x14(%rsp)
jge 0x1631f
movq 0x55d71(%rip), %rdi     # 0x6bfb8
leaq 0x434ba(%rip), %rsi     # 0x59708
callq 0x64b0
movq %rax, %rdi
movslq 0x14(%rsp), %rax
leaq 0x20(%rsp), %rsi
imulq $0x32, %rax, %rax
addq %rax, %rsi
callq 0x64b0
movq %rax, %rdi
movq 0x55d1a(%rip), %rsi     # 0x6bf90
callq 0x6520
movl $0x0, 0x10(%rsp)
movl 0x10(%rsp), %eax
movl %eax, (%rsp)
movq 0x180(%rsp), %rdi
movl 0x14(%rsp), %edx
movl $0x1, %esi
callq 0x164c0
movl %eax, %ecx
movl (%rsp), %eax
cmpl %ecx, %eax
jge 0x162ed
movq 0x180(%rsp), %rdi
movl 0x14(%rsp), %edx
movl 0x10(%rsp), %ecx
movl $0x1, %esi
callq 0x164f0
movl %eax, %esi
movq 0x55cec(%rip), %rdi     # 0x6bfb8
callq 0x6940
movq %rax, %rdi
leaq 0x43285(%rip), %rsi     # 0x59560
callq 0x64b0
movl 0x10(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x10(%rsp)
jmp 0x16283
movq 0x55cc4(%rip), %rdi     # 0x6bfb8
movq 0x55c95(%rip), %rsi     # 0x6bf90
callq 0x6520
movq %rax, %rdi
movq 0x55c86(%rip), %rsi     # 0x6bf90
callq 0x6520
movl 0x14(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x14(%rsp)
jmp 0x16235
movq 0x55c92(%rip), %rdi     # 0x6bfb8
leaq 0x433ec(%rip), %rsi     # 0x59719
callq 0x64b0
movq %rax, %rdi
movq 0x55c54(%rip), %rsi     # 0x6bf90
callq 0x6520
movq 0x180(%rsp), %rdi
callq 0x15bd0
movq 0x55c63(%rip), %rdi     # 0x6bfb8
movq 0x55c34(%rip), %rsi     # 0x6bf90
callq 0x6520
movl $0x0, 0xc(%rsp)
cmpl $0x7, 0xc(%rsp)
jge 0x163e6
movq 0x55c41(%rip), %rdi     # 0x6bfb8
leaq 0x43383(%rip), %rsi     # 0x59701
callq 0x64b0
movq %rax, %rdi
movslq 0xc(%rsp), %rax
leaq 0x20(%rsp), %rsi
imulq $0x32, %rax, %rax
addq %rax, %rsi
callq 0x64b0
movq %rax, %rdi
movq 0x55bea(%rip), %rsi     # 0x6bf90
callq 0x6520
movq 0x180(%rsp), %rdi
movl 0xc(%rsp), %esi
xorl %edx, %edx
callq 0x16530
movq %rax, %rdi
callq 0x15da0
movq 0x55beb(%rip), %rdi     # 0x6bfb8
movq 0x55bbc(%rip), %rsi     # 0x6bf90
callq 0x6520
movl 0xc(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xc(%rsp)
jmp 0x16369
movl $0x0, 0x8(%rsp)
cmpl $0x7, 0x8(%rsp)
jge 0x1646e
movq 0x55bbc(%rip), %rdi     # 0x6bfb8
leaq 0x4330f(%rip), %rsi     # 0x59712
callq 0x64b0
movq %rax, %rdi
movslq 0x8(%rsp), %rax
leaq 0x20(%rsp), %rsi
imulq $0x32, %rax, %rax
addq %rax, %rsi
callq 0x64b0
movq %rax, %rdi
movq 0x55b65(%rip), %rsi     # 0x6bf90
callq 0x6520
movq 0x180(%rsp), %rdi
movl 0x8(%rsp), %esi
movl $0x1, %edx
callq 0x16530
movq %rax, %rdi
callq 0x15da0
movq 0x55b63(%rip), %rdi     # 0x6bfb8
movq 0x55b34(%rip), %rsi     # 0x6bf90
callq 0x6520
movl 0x8(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x8(%rsp)
jmp 0x163ee
movq 0x55b43(%rip), %rdi     # 0x6bfb8
movq 0x55b14(%rip), %rsi     # 0x6bf90
callq 0x6520
movq 0x55b30(%rip), %rdi     # 0x6bfb8
leaq 0x43290(%rip), %rsi     # 0x5971f
callq 0x64b0
movq %rax, %rdi
movq 0x55af2(%rip), %rsi     # 0x6bf90
callq 0x6520
movq 0x55b0e(%rip), %rdi     # 0x6bfb8
movq 0x55adf(%rip), %rsi     # 0x6bf90
callq 0x6520
addq $0x188, %rsp            # imm = 0x188
retq
nop