// File: SethKasmann[P]clever-girl/src/test.cpp
// Function: ccrTest()
void ccrTest()
{
	for (int i = 0; i < ccrTotalTests; ++i)
	{
		State s(ccrFen[i]);
		history.clear();
		history.push(std::make_pair(nullMove, s.getKey()));
		SearchInfo si;
		si.moveTime = allocate_time(10000000, 0, 40);
		si.clock.set();
		// Clear the game list.
		ttable.clear();
		lineManager.clearPv();

		int score;
		for (int d = 1; d < 9; ++d)
		{
			score = scout_search(s, si, d, 0, Neg_inf, Pos_inf, true, false, true);
			if (si.quit)
				break;
		}

		Move pv = lineManager.getPvMove();

		std::cout << s;
		std::cout << "bestmove " << getSrc(pv) << toString(pv) << std::endl;
		std::cout << ccrResults[i] << '\n';
	}
}

// Assembly:
subq $0x618, %rsp            # imm = 0x618
movl $0x0, 0x614(%rsp)
cmpl $0x19, 0x614(%rsp)
jge 0x3c6f1
movslq 0x614(%rsp), %rax
shlq $0x5, %rax
leaq 0x21340d(%rip), %rsi    # 0x24f840
addq %rax, %rsi
leaq 0x108(%rsp), %rdi
movq %rdi, 0x48(%rsp)
callq 0x36550
leaq 0x1da2f1(%rip), %rdi    # 0x216740
movq %rdi, 0x50(%rsp)
callq 0x306e0
movq 0x48(%rsp), %rdi
callq 0x308b0
movq %rax, 0xf0(%rsp)
leaq 0x900c(%rip), %rdi      # 0x4547e
leaq 0xf0(%rsp), %rsi
callq 0x30870
movq 0x50(%rsp), %rdi
movw %ax, 0xf8(%rsp)
movq %rdx, 0x100(%rsp)
leaq 0xf8(%rsp), %rsi
callq 0x30840
leaq 0x98(%rsp), %rdi
callq 0x3c710
movl $0x989680, %edi         # imm = 0x989680
xorl %esi, %esi
movl $0x28, %edx
callq 0x3c7e0
movq %rax, 0x58(%rsp)
jmp 0x3c4c6
movq 0x58(%rsp), %rax
movq %rax, 0xc0(%rsp)
leaq 0xc8(%rsp), %rdi
callq 0x30600
jmp 0x3c4e2
leaq 0x2141a7(%rip), %rdi    # 0x250690
callq 0x35b40
jmp 0x3c4f0
leaq 0x1d5289(%rip), %rdi    # 0x211780
callq 0x25e80
jmp 0x3c4fe
movl $0x1, 0x84(%rsp)
cmpl $0x9, 0x84(%rsp)
jge 0x3c5a6
movl 0x84(%rsp), %edx
movq %rsp, %rax
movl $0x1, 0x10(%rax)
movl $0x0, 0x8(%rax)
movl $0x1, (%rax)
leaq 0x108(%rsp), %rdi
leaq 0x98(%rsp), %rsi
xorl %ecx, %ecx
movl $0xffff3cb0, %r8d       # imm = 0xFFFF3CB0
movl $0xc350, %r9d           # imm = 0xC350
callq 0x33ff0
movl %eax, 0x44(%rsp)
jmp 0x3c55e
movl 0x44(%rsp), %eax
movl %eax, 0x88(%rsp)
testb $0x1, 0xd2(%rsp)
je 0x3c58e
jmp 0x3c5a6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x90(%rsp)
movl %eax, 0x8c(%rsp)
jmp 0x3c6e2
jmp 0x3c590
movl 0x84(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x84(%rsp)
jmp 0x3c509
leaq 0x1d51d3(%rip), %rdi    # 0x211780
xorl %esi, %esi
callq 0x25dd0
movw %ax, 0x42(%rsp)
jmp 0x3c5bb
movw 0x42(%rsp), %ax
movw %ax, 0x82(%rsp)
movq 0x149e9(%rip), %rdi     # 0x50fb8
leaq 0x108(%rsp), %rsi
callq 0x38ae0
jmp 0x3c5de
movq 0x149d3(%rip), %rdi     # 0x50fb8
leaq 0x6df6(%rip), %rsi      # 0x433e2
callq 0x5290
movq %rax, 0x38(%rsp)
jmp 0x3c5f8
movzwl 0x82(%rsp), %edi
callq 0x26810
movl %eax, 0x34(%rsp)
jmp 0x3c60b
movl 0x34(%rsp), %esi
movq 0x38(%rsp), %rdi
callq 0x5360
movq %rax, 0x28(%rsp)
jmp 0x3c620
movzwl 0x82(%rsp), %esi
leaq 0x60(%rsp), %rdi
callq 0x263f0
jmp 0x3c634
movq 0x28(%rsp), %rdi
leaq 0x60(%rsp), %rsi
callq 0x5220
movq %rax, 0x20(%rsp)
jmp 0x3c64a
movq 0x20(%rsp), %rdi
movq 0x1493a(%rip), %rsi     # 0x50f90
callq 0x52c0
jmp 0x3c65d
leaq 0x60(%rsp), %rdi
callq 0x5538
movslq 0x614(%rsp), %rax
shlq $0x5, %rax
leaq 0x2134e6(%rip), %rsi    # 0x24fb60
addq %rax, %rsi
movq 0x14934(%rip), %rdi     # 0x50fb8
callq 0x5220
movq %rax, 0x18(%rsp)
jmp 0x3c690
movq 0x18(%rsp), %rdi
movl $0xa, %esi
callq 0x5300
jmp 0x3c6a1
leaq 0x98(%rsp), %rdi
callq 0x3c8c0
movl 0x614(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x614(%rsp)
jmp 0x3c412
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x90(%rsp)
movl %eax, 0x8c(%rsp)
leaq 0x60(%rsp), %rdi
callq 0x5538
leaq 0x98(%rsp), %rdi
callq 0x3c8c0
jmp 0x3c6f9
addq $0x618, %rsp            # imm = 0x618
retq
movq 0x90(%rsp), %rdi
callq 0x54b0
nopw %cs:(%rax,%rax)