// File: /workspace/github_cpp_makefile_star2_O1/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 %rbx
subq $0x28, %rsp
movl %edx, %ebp
movq %rsi, %rbx
movq %rdi, %r14
callq 0x47f8
movl $0xffffffff, %r15d      # imm = 0xFFFFFFFF
testb %al, %al
jne 0x3b8a
testb %bpl, %bpl
je 0x3946
movq 0xc6dd(%rip), %r15      # 0xffe8
leaq 0x89b1(%rip), %rsi      # 0xc2c3
movl $0x7, %edx
movq %r15, %rdi
callq 0x2210
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x21c0
movsbl %al, %esi
movq %r15, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2150
movzbl 0xe1(%r14), %esi
movq %r14, %rdi
callq 0x488c
testb $0x1, %dl
je 0x3963
movq %rax, %r15
jmp 0x3b8a
testb %bpl, %bpl
je 0x39aa
movq 0xc679(%rip), %r15      # 0xffe8
leaq 0x8955(%rip), %rsi      # 0xc2cb
movl $0x4, %edx
movq %r15, %rdi
callq 0x2210
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x21c0
movsbl %al, %esi
movq %r15, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2150
leaq 0xef57(%rip), %rsi      # 0x12908
movq %rsp, %r15
movq %r15, %rdi
movq %r14, %rdx
callq 0x4958
movq 0x8(%r15), %rax
subq (%r15), %rax
je 0x39fb
sarq $0x3, %rax
decq %rax
leaq 0x18(%rsp), %rdi
movq $0x0, (%rdi)
movq %rax, 0x8(%rdi)
leaq 0xdb9a(%rip), %rsi      # 0x11580
movq %rdi, %rdx
callq 0x6d2e
movq (%rsp), %rcx
movl (%rcx,%rax,8), %r15d
jmp 0x3b74
testb %bpl, %bpl
je 0x3a46
movq 0xc5e1(%rip), %r15      # 0xffe8
leaq 0x88c7(%rip), %rsi      # 0xc2d5
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 0xc5af(%rip), %rdi      # 0xffe8
callq 0x2030
movq %rax, %rdi
callq 0x2150
movzbl 0xe1(%r14), %esi
movq %r14, %rdi
callq 0x49f8
testb $0x1, %dl
jne 0x3b71
testb %bpl, %bpl
je 0x3aaa
movq 0xc57d(%rip), %r15      # 0xffe8
leaq 0x885e(%rip), %rsi      # 0xc2d0
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 0xc54b(%rip), %rdi      # 0xffe8
callq 0x2030
movq %rax, %rdi
callq 0x2150
xorl %esi, %esi
cmpb $0x1, 0xe1(%r14)
sete %sil
incl %esi
movq %r14, %rdi
callq 0x49f8
testb $0x1, %dl
je 0x3aeb
movq %rax, %r15
cmpb $0x2, 0xe1(%r14)
je 0x3b74
movq %r14, %rdi
movq %r15, %rsi
callq 0x509e
testb %al, %al
jne 0x3b74
testb %bpl, %bpl
je 0x3b14
movq 0xc4f1(%rip), %rdi      # 0xffe8
leaq 0x87dd(%rip), %rsi      # 0xc2db
movl $0x5, %edx
callq 0x2210
movq 0xc4d9(%rip), %rdi      # 0xffe8
callq 0x20f0
movzbl 0xe1(%r14), %esi
movl $0x14, %edx
movq %r14, %rdi
callq 0x519a
testb $0x1, %dl
jne 0x3b71
testb %bpl, %bpl
je 0x3b57
movq 0xc4ae(%rip), %rdi      # 0xffe8
leaq 0x87a0(%rip), %rsi      # 0xc2e1
movl $0x4, %edx
callq 0x2210
movq 0xc496(%rip), %rdi      # 0xffe8
callq 0x20f0
movzbl 0xe1(%r14), %esi
movl $0x2, %edx
movq %r14, %rdi
callq 0x5608
testb $0x1, %dl
je 0x3b98
movq %rax, %r15
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x3b8a
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x21f0
movl %r15d, %eax
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
testb %bpl, %bpl
je 0x3bc1
movq 0xc444(%rip), %rdi      # 0xffe8
leaq 0x873b(%rip), %rsi      # 0xc2e6
movl $0x6, %edx
callq 0x2210
movq 0xc42c(%rip), %rdi      # 0xffe8
callq 0x20f0
movzbl %bpl, %edx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x5a58
movq %rax, %r15
testb $0x1, %dl
jne 0x3b74
xorl %eax, %eax
cmpq $0xe1, %r15
adcl $-0x2, %eax
movl %eax, %r15d
jmp 0x3b74
jmp 0x3bf3
jmp 0x3bf3
jmp 0x3bf3
jmp 0x3bf3
jmp 0x3bf3
movq %rax, %rbx
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x3c0c
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x21f0
movq %rbx, %rdi
callq 0x2330