// File: /workspace/github_cpp_makefile_star2_O2/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 0x112f6
leaq 0xc0(%rsp), %rdi
xorl %esi, %esi
callq 0x112b8
leaq 0x8ae1(%rip), %rax      # 0x24c12
vxorps %xmm0, %xmm0, %xmm0
leaq 0x90(%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 0x8ab6(%rip), %rax      # 0x24c15
movb (%rax), %al
movb %al, 0x1a(%rsi)
movw $0xdead, 0x1c(%rsi)     # imm = 0xDEAD
andq $0x0, 0x20(%rsi)
callq 0xb12a
movl $0x120, %ebp            # imm = 0x120
cmpl $0x0, 0x50(%rsp)
js 0x1c18c
decl %ebp
movq %rbx, %rdi
callq 0xb226
jmp 0x1c179
leaq 0x10(%rsp), %rdi
callq 0xb292
testl %ebp, %ebp
jne 0x1c5aa
leaq 0x10(%rsp), %rbx
leaq 0x90(%rsp), %rsi
leaq 0xc0(%rsp), %rdx
xorl %ecx, %ecx
movq %rbx, %rdi
callq 0x1c77e
movl $0x120, %ebp            # imm = 0x120
cmpl $0x0, 0x50(%rsp)
js 0x1c1d5
decl %ebp
movq %rbx, %rdi
callq 0x1c87a
jmp 0x1c1c2
leaq 0x10(%rsp), %rdi
callq 0x1c8e6
testl %ebp, %ebp
jne 0x1c5c6
leaq 0x10(%rsp), %rbx
leaq 0x90(%rsp), %rsi
leaq 0xc(%rsp), %rdx
pushq $0x24
popq %rcx
movq %rbx, %rdi
callq 0xb12a
pushq $0x6
popq %rbp
cmpl $0x0, 0x50(%rsp)
js 0x1c21a
decl %ebp
movq %rbx, %rdi
callq 0xb226
jmp 0x1c207
leaq 0x10(%rsp), %rdi
callq 0xb292
testl %ebp, %ebp
jne 0x1c5e2
leaq 0x10(%rsp), %rbx
leaq 0x90(%rsp), %rsi
leaq 0xc(%rsp), %rdx
pushq $-0x1
popq %rcx
movq %rbx, %rdi
callq 0xb12a
pushq $0x6
popq %rbp
cmpl $0x0, 0x50(%rsp)
js 0x1c25f
decl %ebp
movq %rbx, %rdi
callq 0xb226
jmp 0x1c24c
leaq 0x10(%rsp), %rdi
callq 0xb292
testl %ebp, %ebp
jne 0x1c5fe
leaq 0xf0(%rsp), %rax
andl $0x0, (%rax)
andq $0x0, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
andq $0x0, 0x20(%rax)
leaq 0x10(%rsp), %rdi
leaq 0x90(%rsp), %rsi
xorl %edx, %edx
callq 0xb2ac
leaq 0x40(%rsp), %rbx
leaq 0x60(%rsp), %r14
leaq 0xe8(%rsp), %r15
leaq 0x10(%rsp), %r12
cmpb $0x24, 0x40(%rsp)
jge 0x1c2e8
movq %r14, %rdi
movq %rbx, %rsi
callq 0xabfe
movq %r15, %rdi
movq %r14, %rsi
callq 0x1c99c
movq %r14, %rdi
callq 0x5170
movq %r12, %rdi
callq 0xb372
jmp 0x1c2b9
leaq 0x48(%rsp), %rdi
callq 0xb916
cmpq $0x120, 0x110(%rsp) # imm = 0x120
jne 0x1c617
leaq 0x10(%rsp), %rdi
leaq 0x90(%rsp), %rsi
leaq 0xc(%rsp), %rdx
xorl %ecx, %ecx
callq 0xb12a
leaq 0x60(%rsp), %rbx
leaq 0xe8(%rsp), %r14
leaq 0x10(%rsp), %r15
movslq 0x50(%rsp), %rsi
testq %rsi, %rsi
js 0x1c366
addq %rsi, %rsi
addq 0x48(%rsp), %rsi
movq %rbx, %rdi
callq 0xabfe
movq %r14, %rdi
movq %rbx, %rsi
callq 0x1c99c
movq %rbx, %rdi
callq 0x5170
movq %r15, %rdi
callq 0xb226
jmp 0x1c32f
leaq 0x10(%rsp), %rdi
callq 0xb292
cmpq $0x120, 0x110(%rsp) # imm = 0x120
jne 0x1c630
leaq 0x10(%rsp), %rdi
leaq 0x90(%rsp), %rsi
leaq 0xc(%rsp), %rdx
xorl %ecx, %ecx
callq 0xb12a
leaq 0x60(%rsp), %rbx
leaq 0xe8(%rsp), %r14
leaq 0x10(%rsp), %r15
movslq 0x50(%rsp), %rsi
testq %rsi, %rsi
js 0x1c3e4
addq %rsi, %rsi
addq 0x48(%rsp), %rsi
movq %rbx, %rdi
callq 0xabfe
movq %r14, %rdi
movq %rbx, %rsi
callq 0x1cb46
movq %rbx, %rdi
callq 0x5170
movq %r15, %rdi
callq 0xb226
jmp 0x1c3ad
leaq 0x10(%rsp), %rdi
callq 0xb292
cmpq $0x0, 0x110(%rsp)
jne 0x1c649
leaq 0x68(%rsp), %rax
andl $0x0, (%rax)
andq $0x0, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
andq $0x0, 0x20(%rax)
leaq 0x10(%rsp), %rdi
leaq 0x90(%rsp), %rsi
xorl %edx, %edx
callq 0xb2ac
leaq 0x18(%rsp), %rbx
leaq 0xc8(%rsp), %r14
pushq $0x1
popq %rbp
leaq 0x60(%rsp), %r15
leaq 0x10(%rsp), %r12
cmpb $0x24, 0x40(%rsp)
jge 0x1c476
movq %r14, %rdi
movq %rbx, %rsi
movl %ebp, %edx
callq 0x15f06
movq %r15, %rdi
movq %r14, %rsi
callq 0x1c99c
movq %r14, %rdi
callq 0x5170
movq %r12, %rdi
callq 0xb372
jmp 0x1c445
leaq 0x48(%rsp), %rdi
callq 0xb916
movl 0x88(%rsp), %r13d
leaq 0x10(%rsp), %rdi
leaq 0x90(%rsp), %rsi
leaq 0xc(%rsp), %rdx
xorl %ecx, %ecx
callq 0xb12a
leaq 0x18(%rsp), %rbx
leaq 0xc8(%rsp), %r14
pushq $0x1
popq %rbp
leaq 0x60(%rsp), %r15
leaq 0x10(%rsp), %r12
cmpl $0x0, 0x50(%rsp)
js 0x1c4ec
movq %r14, %rdi
movq %rbx, %rsi
movl %ebp, %edx
callq 0x15f06
movq %r15, %rdi
movq %r14, %rsi
callq 0x1c99c
movq %r14, %rdi
callq 0x5170
movq %r12, %rdi
callq 0xb226
jmp 0x1c4bb
leaq 0x10(%rsp), %rdi
callq 0xb292
cmpq %r13, 0x88(%rsp)
jne 0x1c662
leaq 0x10(%rsp), %rdi
leaq 0x90(%rsp), %rsi
leaq 0xc(%rsp), %rdx
xorl %ecx, %ecx
callq 0xb12a
leaq 0x18(%rsp), %rbx
leaq 0xc8(%rsp), %r14
pushq $0x1
popq %rbp
leaq 0x60(%rsp), %r15
leaq 0x10(%rsp), %r12
cmpl $0x0, 0x50(%rsp)
js 0x1c568
movq %r14, %rdi
movq %rbx, %rsi
movl %ebp, %edx
callq 0x15f06
movq %r15, %rdi
movq %r14, %rsi
callq 0x1cb46
movq %r14, %rdi
callq 0x5170
movq %r12, %rdi
callq 0xb226
jmp 0x1c537
leaq 0x10(%rsp), %rdi
callq 0xb292
cmpq $0x0, 0x88(%rsp)
jne 0x1c67b
leaq 0x60(%rsp), %rdi
callq 0x1c900
leaq 0xe8(%rsp), %rdi
callq 0x1c900
addq $0x118, %rsp            # imm = 0x118
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x817d(%rip), %rdi      # 0x2472e
leaq 0x817f(%rip), %rsi      # 0x24737
leaq 0x81c9(%rip), %rcx      # 0x24788
pushq $0x2e
jmp 0x1c692
leaq 0x8161(%rip), %rdi      # 0x2472e
leaq 0x8163(%rip), %rsi      # 0x24737
leaq 0x81ad(%rip), %rcx      # 0x24788
pushq $0x33
jmp 0x1c692
leaq 0x8198(%rip), %rdi      # 0x24781
leaq 0x8147(%rip), %rsi      # 0x24737
leaq 0x8191(%rip), %rcx      # 0x24788
pushq $0x38
jmp 0x1c692
leaq 0x817c(%rip), %rdi      # 0x24781
leaq 0x812b(%rip), %rsi      # 0x24737
leaq 0x8175(%rip), %rcx      # 0x24788
pushq $0x3d
jmp 0x1c692
leaq 0x8198(%rip), %rdi      # 0x247b6
leaq 0x8112(%rip), %rsi      # 0x24737
leaq 0x815c(%rip), %rcx      # 0x24788
pushq $0x43
jmp 0x1c692
leaq 0x817f(%rip), %rdi      # 0x247b6
leaq 0x80f9(%rip), %rsi      # 0x24737
leaq 0x8143(%rip), %rcx      # 0x24788
pushq $0x48
jmp 0x1c692
leaq 0x817a(%rip), %rdi      # 0x247ca
leaq 0x80e0(%rip), %rsi      # 0x24737
leaq 0x812a(%rip), %rcx      # 0x24788
pushq $0x4d
jmp 0x1c692
leaq 0x8173(%rip), %rdi      # 0x247dc
leaq 0x80c7(%rip), %rsi      # 0x24737
leaq 0x8111(%rip), %rcx      # 0x24788
pushq $0x59
jmp 0x1c692
leaq 0x8170(%rip), %rdi      # 0x247f2
leaq 0x80ae(%rip), %rsi      # 0x24737
leaq 0x80f8(%rip), %rcx      # 0x24788
pushq $0x5e
popq %rdx
callq 0x5220
jmp 0x1c69c
jmp 0x1c69c
movq %rax, %rbx
jmp 0x1c6f7
jmp 0x1c6a5
jmp 0x1c6a5
movq %rax, %rbx
jmp 0x1c747
jmp 0x1c6c7
jmp 0x1c6b5
jmp 0x1c6c7
jmp 0x1c6c7
leaq 0xc8(%rsp), %rdi
movq %rax, %rbx
callq 0x5170
jmp 0x1c6ca
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0xb292
jmp 0x1c6f7
jmp 0x1c6ea
leaq 0xc8(%rsp), %rdi
movq %rax, %rbx
callq 0x5170
jmp 0x1c6ed
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
callq 0xb916
leaq 0x60(%rsp), %rdi
callq 0x1c900
jmp 0x1c747
jmp 0x1c71a
jmp 0x1c70b
jmp 0x1c71a
jmp 0x1c71a
leaq 0x60(%rsp), %rdi
movq %rax, %rbx
callq 0x5170
jmp 0x1c71d
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0xb292
jmp 0x1c747
jmp 0x1c73a
leaq 0x60(%rsp), %rdi
movq %rax, %rbx
callq 0x5170
jmp 0x1c73d
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
callq 0xb916
leaq 0xe8(%rsp), %rdi
callq 0x1c900
movq %rbx, %rdi
callq 0x5690
jmp 0x1c76f
jmp 0x1c76f
leaq 0x10(%rsp), %rdi
movq %rax, %rbx
callq 0x1c8e6
jmp 0x1c754
leaq 0x10(%rsp), %rdi
movq %rax, %rbx
callq 0xb292
jmp 0x1c754