// File: /workspace/github_cpp_makefile_star2_O3/tewalds[P]morat/pentago/moveiterator.cpp
// Function: Morat::Pentago::RandomMoveIteratorTest()
void RandomMoveIteratorTest() {
	XORShift_uint32 rand32;
	XORShift_uint64 rand64;

	Board board;
	int i;

	i = 0;
	for (RandomMoveIterator<XORShift_uint32> move(board, rand32, 0); !move.done(); ++move)
		i++;
	assert(i == 288);

	i = 0;
	for (RandomMoveIterator<XORShift_uint64> move(board, rand64, 0); !move.done(); ++move)
		i++;
	assert(i == 288);

	i = 0;
	for (RandomMoveIterator<XORShift_uint32> move(board, rand32, 36); !move.done(); ++move)
		i++;
	assert(i == 6);

	i = 0;
	for (RandomMoveIterator<XORShift_uint32> move(board, rand32); !move.done(); ++move)
		i++;
	assert(i == 6);

	std::set<std::string> moves;
	for(MoveIterator move(board, 0); !move.done(); ++move)
		moves.insert(move->to_s());

	assert(moves.size() == 288);

	for (RandomMoveIterator<XORShift_uint32> move(board, rand32, 0); !move.done(); ++move)
		moves.insert(move->to_s());

	assert(moves.size() == 288);

	for (RandomMoveIterator<XORShift_uint32> move(board, rand32, 0); !move.done(); ++move)
		moves.erase(move->to_s());

	assert(moves.size() == 0);


	std::set<std::string> boards;
	for(MoveIterator move(board, 0); !move.done(); ++move)
		boards.insert(move.board().to_s());

	unsigned int size = boards.size();

	for (RandomMoveIterator<XORShift_uint32> move(board, rand32, 0); !move.done(); ++move)
		boards.insert(move.board().to_s());

	assert(boards.size() == size);

	for (RandomMoveIterator<XORShift_uint32> move(board, rand32, 0); !move.done(); ++move)
		boards.erase(move.board().to_s());

	assert(boards.size() == 0);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x118, %rsp            # imm = 0x118
leaq 0xc(%rsp), %r14
xorl %esi, %esi
movq %r14, %rdi
callq 0x1690c
leaq 0xe0(%rsp), %rdi
xorl %esi, %esi
callq 0x16884
leaq 0xa624(%rip), %rax      # 0x31da2
vxorps %xmm0, %xmm0, %xmm0
leaq 0xb0(%rsp), %rsi
leaq 0x10(%rsp), %rbx
movq %r14, %rdx
xorl %ecx, %ecx
vmovups %xmm0, 0x9(%rsi)
vmovaps %xmm0, (%rsi)
movq %rbx, %rdi
movb (%rax), %al
movb %al, 0x19(%rsi)
leaq 0xa5f9(%rip), %rax      # 0x31da5
movb (%rax), %al
movb %al, 0x1a(%rsi)
movw $0xdead, 0x1c(%rsi)     # imm = 0xDEAD
movq $0x0, 0x20(%rsi)
callq 0xde7a
movl $0x120, %ebp            # imm = 0x120
cmpl $0x0, 0x50(%rsp)
js 0x277dc
decl %ebp
movq %rbx, %rdi
callq 0xdf94
jmp 0x277c9
movq 0x48(%rsp), %rdi
testq %rdi, %rdi
je 0x277eb
callq 0x5490
testl %ebp, %ebp
jne 0x27c8f
leaq 0x10(%rsp), %rbx
leaq 0xb0(%rsp), %rsi
leaq 0xe0(%rsp), %rdx
xorl %ecx, %ecx
movq %rbx, %rdi
callq 0x27e9c
movl $0x120, %ebp            # imm = 0x120
cmpl $0x0, 0x50(%rsp)
js 0x2782a
decl %ebp
movq %rbx, %rdi
callq 0x27fb6
jmp 0x27817
movq 0x48(%rsp), %rdi
testq %rdi, %rdi
je 0x27839
callq 0x5490
testl %ebp, %ebp
jne 0x27cae
leaq 0x10(%rsp), %rbx
leaq 0xb0(%rsp), %rsi
leaq 0xc(%rsp), %rdx
movl $0x24, %ecx
movq %rbx, %rdi
callq 0xde7a
movl $0x6, %ebp
cmpl $0x0, 0x50(%rsp)
js 0x27878
decl %ebp
movq %rbx, %rdi
callq 0xdf94
jmp 0x27865
movq 0x48(%rsp), %rdi
testq %rdi, %rdi
je 0x27887
callq 0x5490
testl %ebp, %ebp
jne 0x27ccd
leaq 0x10(%rsp), %rbx
leaq 0xb0(%rsp), %rsi
leaq 0xc(%rsp), %rdx
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
movq %rbx, %rdi
callq 0xde7a
movl $0x6, %ebp
cmpl $0x0, 0x50(%rsp)
js 0x278c6
decl %ebp
movq %rbx, %rdi
callq 0xdf94
jmp 0x278b3
movq 0x48(%rsp), %rdi
testq %rdi, %rdi
je 0x278d5
callq 0x5490
testl %ebp, %ebp
jne 0x27cec
leaq 0xf0(%rsp), %rax
xorl %ecx, %ecx
movl $0x0, (%rax)
movq %rcx, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
movq %rcx, 0x20(%rax)
leaq 0x10(%rsp), %rdi
leaq 0xb0(%rsp), %rsi
xorl %edx, %edx
callq 0xe03e
leaq 0x40(%rsp), %rbx
leaq 0x70(%rsp), %r13
leaq 0x60(%rsp), %r14
leaq 0xe8(%rsp), %r15
leaq 0x10(%rsp), %r12
cmpb $0x24, 0x40(%rsp)
jge 0x27963
movq %r14, %rdi
movq %rbx, %rsi
callq 0xd3c2
movq %r15, %rdi
movq %r14, %rsi
callq 0x280e4
movq 0x60(%rsp), %rdi
cmpq %r13, %rdi
je 0x27959
callq 0x5310
movq %r12, %rdi
callq 0xe122
jmp 0x2792d
movq 0x58(%rsp), %rdi
testq %rdi, %rdi
je 0x27972
callq 0x5490
cmpq $0x120, 0x110(%rsp) # imm = 0x120
jne 0x27d0b
leaq 0x10(%rsp), %rdi
leaq 0xb0(%rsp), %rsi
leaq 0xc(%rsp), %rdx
xorl %ecx, %ecx
callq 0xde7a
leaq 0x60(%rsp), %rbx
leaq 0xe8(%rsp), %r14
leaq 0x10(%rsp), %r15
movslq 0x50(%rsp), %rsi
testq %rsi, %rsi
js 0x279ed
addq %rsi, %rsi
addq 0x48(%rsp), %rsi
movq %rbx, %rdi
callq 0xd3c2
movq %r14, %rdi
movq %rbx, %rsi
callq 0x280e4
movq 0x60(%rsp), %rdi
cmpq %r13, %rdi
je 0x279e3
callq 0x5310
movq %r15, %rdi
callq 0xdf94
jmp 0x279af
movq 0x48(%rsp), %rdi
testq %rdi, %rdi
je 0x279fc
callq 0x5490
cmpq $0x120, 0x110(%rsp) # imm = 0x120
jne 0x27d2a
leaq 0x10(%rsp), %rdi
leaq 0xb0(%rsp), %rsi
leaq 0xc(%rsp), %rdx
xorl %ecx, %ecx
callq 0xde7a
leaq 0x60(%rsp), %rbx
leaq 0xe8(%rsp), %r14
leaq 0x10(%rsp), %r15
movslq 0x50(%rsp), %rsi
testq %rsi, %rsi
js 0x27a82
addq %rsi, %rsi
addq 0x48(%rsp), %rsi
movq %rbx, %rdi
callq 0xd3c2
movq %r14, %rdi
movq %rbx, %rsi
callq 0x28278
movq %r14, %rdi
movq %rax, %rsi
callq 0x2832c
movq 0x60(%rsp), %rdi
cmpq %r13, %rdi
je 0x27a78
callq 0x5310
movq %r15, %rdi
callq 0xdf94
jmp 0x27a39
movq 0x48(%rsp), %rdi
testq %rdi, %rdi
je 0x27a91
callq 0x5490
cmpq $0x0, 0x110(%rsp)
jne 0x27d49
leaq 0x68(%rsp), %rax
xorl %ecx, %ecx
movl $0x0, (%rax)
movq %rcx, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
movq %rcx, 0x20(%rax)
leaq 0x10(%rsp), %rdi
leaq 0xb0(%rsp), %rsi
xorl %edx, %edx
callq 0xe03e
leaq 0x18(%rsp), %rbx
leaq 0xa0(%rsp), %r13
leaq 0x90(%rsp), %r14
leaq 0x60(%rsp), %r15
leaq 0x10(%rsp), %r12
cmpb $0x24, 0x40(%rsp)
jge 0x27b2e
movl $0x1, %edx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x1d25a
movq %r15, %rdi
movq %r14, %rsi
callq 0x280e4
movq 0x90(%rsp), %rdi
cmpq %r13, %rdi
je 0x27b24
callq 0x5310
movq %r12, %rdi
callq 0xe122
jmp 0x27af0
movq 0x58(%rsp), %rdi
testq %rdi, %rdi
je 0x27b3d
callq 0x5490
movl 0x88(%rsp), %ebp
leaq 0x10(%rsp), %rdi
leaq 0xb0(%rsp), %rsi
leaq 0xc(%rsp), %rdx
xorl %ecx, %ecx
callq 0xde7a
leaq 0x18(%rsp), %rbx
leaq 0x90(%rsp), %r14
leaq 0x60(%rsp), %r15
leaq 0x10(%rsp), %r12
cmpl $0x0, 0x50(%rsp)
js 0x27bb2
movl $0x1, %edx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x1d25a
movq %r15, %rdi
movq %r14, %rsi
callq 0x280e4
movq 0x90(%rsp), %rdi
cmpq %r13, %rdi
je 0x27ba8
callq 0x5310
movq %r12, %rdi
callq 0xdf94
jmp 0x27b74
movq 0x48(%rsp), %rdi
testq %rdi, %rdi
je 0x27bc1
callq 0x5490
cmpq %rbp, 0x88(%rsp)
jne 0x27d68
leaq 0x10(%rsp), %rdi
leaq 0xb0(%rsp), %rsi
leaq 0xc(%rsp), %rdx
xorl %ecx, %ecx
callq 0xde7a
leaq 0x18(%rsp), %rbx
leaq 0x90(%rsp), %r14
leaq 0x60(%rsp), %r15
leaq 0x10(%rsp), %r12
cmpl $0x0, 0x50(%rsp)
js 0x27c48
movl $0x1, %edx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x1d25a
movq %r15, %rdi
movq %r14, %rsi
callq 0x28278
movq %r15, %rdi
movq %rax, %rsi
callq 0x2832c
movq 0x90(%rsp), %rdi
cmpq %r13, %rdi
je 0x27c3e
callq 0x5310
movq %r12, %rdi
callq 0xdf94
jmp 0x27bff
movq 0x48(%rsp), %rdi
testq %rdi, %rdi
je 0x27c57
callq 0x5490
cmpq $0x0, 0x88(%rsp)
jne 0x27d87
leaq 0x60(%rsp), %rdi
callq 0x28024
leaq 0xe8(%rsp), %rdi
callq 0x28024
addq $0x118, %rsp            # imm = 0x118
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x9c28(%rip), %rdi      # 0x318be
leaq 0x9c2a(%rip), %rsi      # 0x318c7
leaq 0x9c74(%rip), %rcx      # 0x31918
movl $0x2e, %edx
callq 0x5200
leaq 0x9c09(%rip), %rdi      # 0x318be
leaq 0x9c0b(%rip), %rsi      # 0x318c7
leaq 0x9c55(%rip), %rcx      # 0x31918
movl $0x33, %edx
callq 0x5200
leaq 0x9c3d(%rip), %rdi      # 0x31911
leaq 0x9bec(%rip), %rsi      # 0x318c7
leaq 0x9c36(%rip), %rcx      # 0x31918
movl $0x38, %edx
callq 0x5200
leaq 0x9c1e(%rip), %rdi      # 0x31911
leaq 0x9bcd(%rip), %rsi      # 0x318c7
leaq 0x9c17(%rip), %rcx      # 0x31918
movl $0x3d, %edx
callq 0x5200
leaq 0x9c34(%rip), %rdi      # 0x31946
leaq 0x9bae(%rip), %rsi      # 0x318c7
leaq 0x9bf8(%rip), %rcx      # 0x31918
movl $0x43, %edx
callq 0x5200
leaq 0x9c15(%rip), %rdi      # 0x31946
leaq 0x9b8f(%rip), %rsi      # 0x318c7
leaq 0x9bd9(%rip), %rcx      # 0x31918
movl $0x48, %edx
callq 0x5200
leaq 0x9c0a(%rip), %rdi      # 0x3195a
leaq 0x9b70(%rip), %rsi      # 0x318c7
leaq 0x9bba(%rip), %rcx      # 0x31918
movl $0x4d, %edx
callq 0x5200
leaq 0x9bfd(%rip), %rdi      # 0x3196c
leaq 0x9b51(%rip), %rsi      # 0x318c7
leaq 0x9b9b(%rip), %rcx      # 0x31918
movl $0x59, %edx
callq 0x5200
leaq 0x9bf4(%rip), %rdi      # 0x31982
leaq 0x9b32(%rip), %rsi      # 0x318c7
leaq 0x9b7c(%rip), %rcx      # 0x31918
movl $0x5e, %edx
callq 0x5200
jmp 0x27daa
jmp 0x27daa
movq %rax, %rbx
jmp 0x27e59
jmp 0x27db6
jmp 0x27db6
movq %rax, %rbx
jmp 0x27e86
jmp 0x27dc6
jmp 0x27dc6
jmp 0x27dc6
jmp 0x27e35
movq %rax, %rbx
jmp 0x27e4a
jmp 0x27de4
movq 0x90(%rsp), %rdi
movq %rax, %rbx
cmpq %r13, %rdi
je 0x27de7
callq 0x5310
jmp 0x27de7
movq %rax, %rbx
movq 0x58(%rsp), %rdi
jmp 0x27e4f
jmp 0x27df6
jmp 0x27df6
jmp 0x27df6
jmp 0x27e65
movq %rax, %rbx
jmp 0x27e77
jmp 0x27e11
movq 0x60(%rsp), %rdi
movq %rax, %rbx
cmpq %r13, %rdi
je 0x27e14
callq 0x5310
jmp 0x27e14
movq %rax, %rbx
movq 0x58(%rsp), %rdi
jmp 0x27e7c
jmp 0x27e21
jmp 0x27e21
jmp 0x27e21
movq 0x48(%rsp), %rdi
movq %rax, %rbx
testq %rdi, %rdi
je 0x27e93
callq 0x5490
jmp 0x27e93
movq 0x90(%rsp), %rdi
movq %rax, %rbx
cmpq %r13, %rdi
je 0x27e4a
callq 0x5310
movq 0x48(%rsp), %rdi
testq %rdi, %rdi
je 0x27e59
callq 0x5490
leaq 0x60(%rsp), %rdi
callq 0x28024
jmp 0x27e86
movq 0x60(%rsp), %rdi
movq %rax, %rbx
cmpq %r13, %rdi
je 0x27e77
callq 0x5310
movq 0x48(%rsp), %rdi
testq %rdi, %rdi
je 0x27e86
callq 0x5490
leaq 0xe8(%rsp), %rdi
callq 0x28024
movq %rbx, %rdi
callq 0x56c0
nop