// File: /workspace/github_cpp_makefile_star2_O3/YSRKEN[P]Shioi/I401/main.cpp
// Function: Board::NextMove(unsigned long, bool)
int NextMove(const size_t depth, bool debug_flg = false) {
		//PutBoard();
		// If the game is end, you don't move.
		if (IsGameEnd()) return -1;
		// Opening move
		if (debug_flg) std::cerr << "Opening" << endl;
		auto result = GetOpeningMove(turn_);
		if (result.second) return result.first;
		// Book move
		if (debug_flg) std::cerr << "Book" << endl;
		auto book_data = book.GetBookData(board_);
		if (book_data.size() != 0) return book_data[RandInt(book_data.size())];
		// If you can make Go-ren, you must do.
		if (debug_flg) std::cerr << "Goren" << endl;
		result = FindGorenMove(turn_);
		if (result.second) return result.first;
		// If enemy can make Go-ren, you must block it.
		if (debug_flg) std::cerr << "Stop Goren" << endl;
		result = FindGorenMove(EnemyTurn(turn_));
		if (result.second) {
			if(turn_ == Stone::White || IsValidMove(result.first)) return result.first;
		}
		// Search of quadruplex's problem(Shioi Tsume)
		if (debug_flg) std::cerr << "Shioi" << endl;
		result = FindShioiMove(turn_, kShioiDepth1);
		if (result.second) return result.first;
		// Search of attack's problem (Oi Tsume)
		if (debug_flg) std::cerr << "Oite" << endl;
		result = FindOiteMove(turn_, kOiteDepth1);
		if (result.second) return result.first;
		// Normal move search
		if (debug_flg) std::cerr << "Normal" << endl;
		result = FindNormalMove(depth, debug_flg);
		if (result.second) return result.first;
		if (result.first >= kBoardSize * kBoardSize) return -2;
		return -1;
	}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %edx, %ebp
movq %rsi, %rbx
movq %rdi, %r14
callq 0x479a
movl $0xffffffff, %r15d      # imm = 0xFFFFFFFF
testb %al, %al
jne 0x3b76
testb %bpl, %bpl
je 0x3975
movq 0xb709(%rip), %r12      # 0xefe8
leaq 0x7a0d(%rip), %rsi      # 0xb2f3
movl $0x7, %edx
movq %r12, %rdi
callq 0x2210
movq (%r12), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x21c0
movsbl %al, %esi
movq %r12, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2150
movzbl 0xe1(%r14), %esi
movq %r14, %rdi
callq 0x4824
testb $0x1, %dl
jne 0x398a
leaq 0xe1(%r14), %r13
leaq 0x79bd(%rip), %rsi      # 0xb2fb
movl $0x4, %edx
movq %r12, %rdi
callq 0x2210
movq (%r12), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x21c0
movsbl %al, %esi
movq %r12, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2150
jmp 0x3999
movzbl 0xe1(%r14), %esi
movq %r14, %rdi
callq 0x4824
testb $0x1, %dl
je 0x3992
movq %rax, %r15
jmp 0x3b76
leaq 0xe1(%r14), %r13
leaq 0xdf68(%rip), %rsi      # 0x11908
movq %rsp, %r15
movq %r15, %rdi
movq %r14, %rdx
callq 0x48f0
movq 0x8(%r15), %rax
subq (%r15), %rax
je 0x39ea
sarq $0x3, %rax
decq %rax
leaq 0x18(%rsp), %rdi
movq $0x0, (%rdi)
movq %rax, 0x8(%rdi)
leaq 0xcbab(%rip), %rsi      # 0x10580
movq %rdi, %rdx
callq 0x649e
movq (%rsp), %rdi
movl (%rdi,%rax,8), %r15d
jmp 0x3b69
testb %bpl, %bpl
je 0x3a35
movq 0xb5f2(%rip), %r15      # 0xefe8
leaq 0x7908(%rip), %rsi      # 0xb305
movl $0x5, %edx
movq %r15, %rdi
callq 0x2210
movq (%r15), %rax
addq -0x18(%rax), %r15
movq %r15, %rdi
movl $0xa, %esi
callq 0x21c0
movsbl %al, %esi
movq 0xb5c0(%rip), %rdi      # 0xefe8
callq 0x2030
movq %rax, %rdi
callq 0x2150
movzbl 0xe1(%r14), %esi
movq %r14, %rdi
callq 0x4990
testb $0x1, %dl
jne 0x3b5d
testb %bpl, %bpl
je 0x3a99
movq 0xb58e(%rip), %r15      # 0xefe8
leaq 0x789f(%rip), %rsi      # 0xb300
movl $0xa, %edx
movq %r15, %rdi
callq 0x2210
movq (%r15), %rax
addq -0x18(%rax), %r15
movq %r15, %rdi
movl $0xa, %esi
callq 0x21c0
movsbl %al, %esi
movq 0xb55c(%rip), %rdi      # 0xefe8
callq 0x2030
movq %rax, %rdi
callq 0x2150
xorl %esi, %esi
cmpb $0x1, 0xe1(%r14)
sete %sil
incl %esi
movq %r14, %rdi
callq 0x4990
testb $0x1, %dl
je 0x3ad7
movq %rax, %r15
cmpb $0x2, (%r13)
je 0x3b60
movq %r14, %rdi
movq %r15, %rsi
callq 0x4ed6
testb %al, %al
jne 0x3b60
testb %bpl, %bpl
je 0x3b00
movq 0xb505(%rip), %rdi      # 0xefe8
leaq 0x7821(%rip), %rsi      # 0xb30b
movl $0x5, %edx
callq 0x2210
movq 0xb4ed(%rip), %rdi      # 0xefe8
callq 0x20f0
movzbl 0xe1(%r14), %esi
movl $0x14, %edx
movq %r14, %rdi
callq 0x4f7e
testb $0x1, %dl
jne 0x3b5d
testb %bpl, %bpl
je 0x3b43
movq 0xb4c2(%rip), %rdi      # 0xefe8
leaq 0x77e4(%rip), %rsi      # 0xb311
movl $0x4, %edx
callq 0x2210
movq 0xb4aa(%rip), %rdi      # 0xefe8
callq 0x20f0
movzbl 0xe1(%r14), %esi
movl $0x2, %edx
movq %r14, %rdi
callq 0x5266
testb $0x1, %dl
je 0x3b88
movq %rax, %r15
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x3b76
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x21f0
movl %r15d, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
testb %bpl, %bpl
je 0x3bb1
movq 0xb454(%rip), %rdi      # 0xefe8
leaq 0x777b(%rip), %rsi      # 0xb316
movl $0x6, %edx
callq 0x2210
movq 0xb43c(%rip), %rdi      # 0xefe8
callq 0x20f0
movzbl %bpl, %edx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x5554
movq %rax, %r15
testb $0x1, %dl
jne 0x3b60
xorl %eax, %eax
cmpq $0xe1, %r15
adcl $-0x2, %eax
movl %eax, %r15d
jmp 0x3b60
jmp 0x3be3
jmp 0x3be3
jmp 0x3be3
jmp 0x3be3
jmp 0x3be3
movq %rax, %rbx
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x3bfc
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x21f0
movq %rbx, %rdi
callq 0x2330