// File: /workspace/github_cpp_makefile_star2_O3/YSRKEN[P]Shioi/I401/main.cpp
// Function: Board::CountRenB2(std::array<std::array<PackedStone, 5ul>, 2ul> const&, unsigned long, Direction, unsigned long&)
RenCount CountRenB2(const Pattern &pattern, const size_t position, const Direction dir, size_t &block_position) {
		/* Count "Straight Shi-Shi"
		* 1. BO|BBB|OB   "Ryoutou-no-ShiShi"
		* 2. BBO|BB|OBB  "Chouda-no-ShiShi"
		* 3. BBBO|B|OBBB "Souryu-no-ShiShi"
		* 一直線上に出来る四々で、両頭の四々・長蛇の四々・双龍の四々
		*/
		namespace p = packed_stone;
		{
			//BO|BBB|OB
			if (MatchPatternB(pattern, position, dir, {{ p::nb, p::bbnb }})) return RenCount(0, 2, 0);
			if (MatchPatternB(pattern, position, dir, {{ p::bnb, p::bnb }})) return RenCount(0, 2, 0);
			if (MatchPatternB(pattern, position, dir, {{ p::bbnb, p::nb }})) return RenCount(0, 2, 0);
			//BBO|BB|OBB
			if (MatchPatternB(pattern, position, dir, {{ p::nbb, p::bnbb }})) return RenCount(0, 2, 0);
			if (MatchPatternB(pattern, position, dir, {{ p::bnbb, p::nbb }})) return RenCount(0, 2, 0);
			//BBBO|B|OBBB
			if (MatchPatternB(pattern, position, dir, {{ p::nbbb, p::nbbb }})) return RenCount(0, 2, 0);
		}
		// Count Shi-ren
		{
			if (MatchPatternB(pattern, position, dir, {{ p::n, p::bbbn }})) return RenCount(1, 0, 0);
			if (MatchPatternB(pattern, position, dir, {{ p::bn, p::bbn }})) return RenCount(1, 0, 0);
			if (MatchPatternB(pattern, position, dir, {{ p::bbbn, p::n }})) return RenCount(1, 0, 0);
			if (MatchPatternB(pattern, position, dir, {{ p::bbn, p::bn }})) return RenCount(1, 0, 0);
		}
		// Count Katsu-Shi
		auto GetPosition = [&position, &dir](int count) -> int {return position + kPositionoffset[dir] * count; };
		{
			//11110
			if (MatchPatternB(pattern, position, dir, {{ p::bbb, p::n }})) {
				block_position = GetPosition(1) | limit2(0_sz, kBoardSize * kBoardSize);
				return RenCount(0, 1, 0);
			}
			if (MatchPatternB(pattern, position, dir, {{ p::bb, p::bn }})) {
				block_position = GetPosition(2) | limit2(0_sz, kBoardSize * kBoardSize);
				return RenCount(0, 1, 0);
			}
			if (MatchPatternB(pattern, position, dir, {{ p::b, p::bbn }})) {
				block_position = GetPosition(3) | limit2(0_sz, kBoardSize * kBoardSize);
				return RenCount(0, 1, 0);
			}
			if (MatchPatternB(pattern, position, dir, Side::Right, {{ p::bbbn }})) {
				block_position = GetPosition(4) | limit2(0_sz, kBoardSize * kBoardSize);
				return RenCount(0, 1, 0);
			}
			//11101
			if (MatchPatternB(pattern, position, dir, Side::Left, {{ p::nbbb }})) {
				block_position = GetPosition(-1) | limit2(0_sz, kBoardSize * kBoardSize);
				return RenCount(0, 1, 0);
			}
			if (MatchPatternB(pattern, position, dir, {{ p::bb, p::nb }})) {
				block_position = GetPosition(1) | limit2(0_sz, kBoardSize * kBoardSize);
				return RenCount(0, 1, 0);
			}
			if (MatchPatternB(pattern, position, dir, {{ p::b, p::bnb }})) {
				block_position = GetPosition(2) | limit2(0_sz, kBoardSize * kBoardSize);
				return RenCount(0, 1, 0);
			}
			if (MatchPatternB(pattern, position, dir, Side::Right, {{ p::bbnb }})) {
				block_position = GetPosition(3) | limit2(0_sz, kBoardSize * kBoardSize);
				return RenCount(0, 1, 0);
			}
			//11011
			if (MatchPatternB(pattern, position, dir, Side::Right, {{ p::bnbb }})) {
				block_position = GetPosition(2) | limit2(0_sz, kBoardSize * kBoardSize);
				return RenCount(0, 1, 0);
			}
			if (MatchPatternB(pattern, position, dir, { { Stone::Black, p::nbb } })) {
				block_position = GetPosition(1) | limit2(0_sz, kBoardSize * kBoardSize);
				return RenCount(0, 1, 0);
			}
			if (MatchPatternB(pattern, position, dir, {{ p::nbb, p::b }})) {
				block_position = GetPosition(-1) | limit2(0_sz, kBoardSize * kBoardSize);
				return RenCount(0, 1, 0);
			}
			if (MatchPatternB(pattern, position, dir, Side::Left, {{ p::bnbb }})) {
				block_position = GetPosition(-2) | limit2(0_sz, kBoardSize * kBoardSize);
				return RenCount(0, 1, 0);
			}
			//10111
			if (MatchPatternB(pattern, position, dir, Side::Right, {{ p::nbbb }})) {
				block_position = GetPosition(1) | limit2(0_sz, kBoardSize * kBoardSize);
				return RenCount(0, 1, 0);
			}
			if (MatchPatternB(pattern, position, dir, {{ p::nb, p::bb }})) {
				block_position = GetPosition(-1) | limit2(0_sz, kBoardSize * kBoardSize);
				return RenCount(0, 1, 0);
			}
			if (MatchPatternB(pattern, position, dir, {{ p::bnb, p::b }})) {
				block_position = GetPosition(-2) | limit2(0_sz, kBoardSize * kBoardSize);
				return RenCount(0, 1, 0);
			}
			if (MatchPatternB(pattern, position, dir, Side::Left, {{ p::bbnb }})) {
				block_position = GetPosition(-3) | limit2(0_sz, kBoardSize * kBoardSize);
				return RenCount(0, 1, 0);
			}
			//01111
			if (MatchPatternB(pattern, position, dir, {{ p::n, p::bbb }})) {
				block_position = GetPosition(-1) | limit2(0_sz, kBoardSize * kBoardSize);
				return RenCount(0, 1, 0);
			}
			if (MatchPatternB(pattern, position, dir, {{ p::bn, p::bb }})) {
				block_position = GetPosition(-2) | limit2(0_sz, kBoardSize * kBoardSize);
				return RenCount(0, 1, 0);
			}
			if (MatchPatternB(pattern, position, dir, {{ p::bbn, p::b }})) {
				block_position = GetPosition(-3) | limit2(0_sz, kBoardSize * kBoardSize);
				return RenCount(0, 1, 0);
			}
			if (MatchPatternB(pattern, position, dir, Side::Left, {{ p::bbbn }})) {
				block_position = GetPosition(-4) | limit2(0_sz, kBoardSize * kBoardSize);
				return RenCount(0, 1, 0);
			}
		}
		// Count Katsu-San
		{
			int offset1 = 0, offset2 = 0;
			while (true) {
				//011100
				if (MatchPatternB(pattern, position, dir, {{ p::bbn, p::nn }})) {
					offset1 = 1; offset2 = -3; break;
				}
				if (MatchPatternB(pattern, position, dir, {{ p::bn, p::bnn }})) {
					offset1 = 2; offset2 = -2; break;
				}
				if (MatchPatternB(pattern, position, dir, {{ p::n, p::bbnn }})) {
					offset1 = 3; offset2 = -1; break;
				}
				//011010
				if (MatchPatternB(pattern, position, dir, {{ p::nbbn, p::n }})) {
					offset1 = -1; break;
				}
				if (MatchPatternB(pattern, position, dir, {{ p::bn, p::nbn }})) {
					offset1 = 1; break;
				}
				if (MatchPatternB(pattern, position, dir, {{ p::n, p::bnbn }})) {
					offset1 = 2; break;
				}
				//010110
				if (MatchPatternB(pattern, position, dir, {{ p::n, p::nbbn }})) {
					offset1 = 1; break;
				}
				if (MatchPatternB(pattern, position, dir, {{ p::nbn, p::bn }})) {
					offset1 = -1; break;
				}
				if (MatchPatternB(pattern, position, dir, {{ p::bnbn, p::n }})) {
					offset1 = -2; break;
				}
				//001110
				if (MatchPatternB(pattern, position, dir, {{ p::nn, p::bbn }})) {
					offset1 = -1; offset2 = 3; break;
				}
				if (MatchPatternB(pattern, position, dir, {{ p::bnn, p::bn }})) {
					offset1 = -2; offset2 = 2; break;
				}
				if (MatchPatternB(pattern, position, dir, {{ p::bbnn, p::n }})) {
					offset1 = -3; offset2 = 1; break;
				}
				break;
			}
			if (offset2 != 0) {
				int next_pos = GetPosition(offset2);
				if (next_pos >= 0 && static_cast<std::size_t>(next_pos) < kBoardSize * kBoardSize) {
					board_[position] = Stone::Black;
					auto valid_flg = IsValidMove(next_pos);
					board_[position] = Stone::None;
					if (valid_flg) return RenCount(0, 0, 1);
				}
			}
			if (offset1 != 0) {
				int next_pos = GetPosition(offset1);
				if (next_pos >= 0 && static_cast<std::size_t>(next_pos) < kBoardSize * kBoardSize) {
					board_[position] = Stone::Black;
					auto valid_flg = IsValidMove(next_pos);
					board_[position] = Stone::None;
					if (valid_flg) return RenCount(0, 0, 1);
				}
			}
		}
		return RenCount(0, 0, 0);
	}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %r9, %r15
movl %r8d, %r12d
movq %rcx, %r14
movq %rdx, %rbp
movq %rsi, %r13
movq %rdi, %rbx
movq %rsp, %r8
movq $0x1, (%r8)
movq $0x2, 0x8(%r8)
movq $0x51, 0x10(%r8)
movq $0x4, 0x18(%r8)
movq %rsi, %rdi
movq %rdx, %rsi
movq %rcx, %rdx
movl %r12d, %ecx
callq 0x7572
testb %al, %al
jne 0x78ac
movl $0x11, %eax
movq %rsp, %r8
movq %rax, (%r8)
movl $0x3, %ecx
movq %rcx, 0x8(%r8)
movq %rax, 0x10(%r8)
movq %rcx, 0x18(%r8)
movzbl %r12b, %r12d
movq %r13, %rdi
movq %rbp, %rsi
movq %r14, %rdx
movl %r12d, %ecx
callq 0x7572
testb %al, %al
jne 0x78ac
movq %rsp, %r8
movq $0x51, (%r8)
movq $0x4, 0x8(%r8)
movq $0x1, 0x10(%r8)
movq $0x2, 0x18(%r8)
movq %r13, %rdi
movq %rbp, %rsi
movq %r14, %rdx
movl %r12d, %ecx
callq 0x7572
testb %al, %al
jne 0x78ac
movq %rsp, %r8
movq $0x5, (%r8)
movq $0x3, 0x8(%r8)
movq $0x45, 0x10(%r8)
movq $0x4, 0x18(%r8)
movq %r13, %rdi
movq %rbp, %rsi
movq %r14, %rdx
movl %r12d, %ecx
callq 0x7572
testb %al, %al
jne 0x78ac
movq %rsp, %r8
movq $0x45, (%r8)
movq $0x4, 0x8(%r8)
movq $0x5, 0x10(%r8)
movq $0x3, 0x18(%r8)
movq %r13, %rdi
movq %rbp, %rsi
movq %r14, %rdx
movl %r12d, %ecx
callq 0x7572
testb %al, %al
jne 0x78ac
movl $0x15, %eax
movq %rsp, %r8
movq %rax, (%r8)
movl $0x4, %ecx
movq %rcx, 0x8(%r8)
movq %rax, 0x10(%r8)
movq %rcx, 0x18(%r8)
movq %r13, %rdi
movq %rbp, %rsi
movq %r14, %rdx
movl %r12d, %ecx
callq 0x7572
testb %al, %al
je 0x78cf
xorl %eax, %eax
movq %rax, (%rbx)
movq $0x2, 0x8(%rbx)
movq %rax, 0x10(%rbx)
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rsp, %r8
movq $0x0, (%r8)
movq $0x1, 0x8(%r8)
movq $0x54, 0x10(%r8)
movq $0x4, 0x18(%r8)
movq %r13, %rdi
movq %rbp, %rsi
movq %r14, %rdx
movl %r12d, %ecx
callq 0x7572
testb %al, %al
jne 0x79af
movq %rsp, %r8
movq $0x4, (%r8)
movq $0x2, 0x8(%r8)
movq $0x14, 0x10(%r8)
movq $0x3, 0x18(%r8)
movq %r13, %rdi
movq %rbp, %rsi
movq %r14, %rdx
movl %r12d, %ecx
callq 0x7572
testb %al, %al
jne 0x79af
movq %rsp, %r8
movq $0x54, (%r8)
movq $0x4, 0x8(%r8)
movq $0x0, 0x10(%r8)
movq $0x1, 0x18(%r8)
movq %r13, %rdi
movq %rbp, %rsi
movq %r14, %rdx
movl %r12d, %ecx
callq 0x7572
testb %al, %al
jne 0x79af
movq %rsp, %r8
movq $0x14, (%r8)
movq $0x3, 0x8(%r8)
movq $0x4, 0x10(%r8)
movq $0x2, 0x18(%r8)
movq %r13, %rdi
movq %rbp, %rsi
movq %r14, %rdx
movl %r12d, %ecx
callq 0x7572
testb %al, %al
je 0x79c2
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
movq $0x1, 0x10(%rbx)
jmp 0x78bd
movq %rsp, %r8
movq $0x15, (%r8)
movq $0x3, 0x8(%r8)
movq $0x0, 0x10(%r8)
movq $0x1, 0x18(%r8)
movq %r13, %rdi
movq %rbp, %rsi
movq %r14, %rdx
movl %r12d, %ecx
callq 0x7572
testb %al, %al
je 0x7a37
leaq 0x3a00(%rip), %rax      # 0xb400
addq (%rax,%r12,8), %r14
movl %r14d, %eax
movl $0xe1, %ecx
cmpq %rcx, %rax
cmovaeq %rcx, %rax
xorl %edx, %edx
testl %r14d, %r14d
cmoveq %rdx, %rax
cmovsq %rcx, %rax
movq %rax, (%r15)
movq %rdx, (%rbx)
movq $0x1, 0x8(%rbx)
movq %rdx, 0x10(%rbx)
jmp 0x78bd
movq %rsp, %r8
movq $0x5, (%r8)
movl $0x2, %eax
movq %rax, 0x8(%r8)
movq $0x4, 0x10(%r8)
movq %rax, 0x18(%r8)
movq %r13, %rdi
movq %rbp, %rsi
movq %r14, %rdx
movl %r12d, %ecx
callq 0x7572
testb %al, %al
je 0x7a7f
leaq 0x398e(%rip), %rax      # 0xb400
movq (%rax,%r12,8), %rax
leaq (%r14,%rax,2), %rax
jmp 0x7b03
movl $0x1, %eax
movq %rsp, %r8
movq %rax, (%r8)
movq %rax, 0x8(%r8)
movq $0x14, 0x10(%r8)
movq $0x3, 0x18(%r8)
movq %r13, %rdi
movq %rbp, %rsi
movq %r14, %rdx
movl %r12d, %ecx
callq 0x7572
testb %al, %al
je 0x7ac7
leaq 0x3946(%rip), %rax      # 0xb400
movq (%rax,%r12,8), %rax
leaq (%rax,%rax,2), %rax
addq %r14, %rax
jmp 0x7b03
movq %rsp, %r9
movq $0x54, (%r9)
movq $0x4, 0x8(%r9)
movq %r13, %rdi
movq %rbp, %rsi
movq %r14, %rdx
movl %r12d, %ecx
movl $0x1, %r8d
callq 0x760a
testb %al, %al
je 0x7b34
leaq 0x3905(%rip), %rax      # 0xb400
movq (%rax,%r12,8), %rax
leaq (%r14,%rax,4), %rax
movl %eax, %ecx
movl $0xe1, %edx
cmpq %rdx, %rcx
cmovaeq %rdx, %rcx
xorl %esi, %esi
testl %eax, %eax
cmoveq %rsi, %rcx
cmovsq %rdx, %rcx
movq %rcx, (%r15)
movq %rsi, (%rbx)
movq $0x1, 0x8(%rbx)
movq %rsi, 0x10(%rbx)
jmp 0x78bd
movq %rsp, %r9
movq $0x15, (%r9)
movq $0x4, 0x8(%r9)
movq %r13, %rdi
movq %rbp, %rsi
movq %r14, %rdx
movl %r12d, %ecx
xorl %r8d, %r8d
callq 0x760a
testb %al, %al
je 0x7b95
leaq 0x389b(%rip), %rax      # 0xb400
movq (%rax,%r12,8), %rax
movq %rax, %rcx
shlq $0x20, %rcx
subq %rax, %rcx
addq %r14, %rcx
movl %ecx, %eax
movl $0xe1, %edx
cmpq %rdx, %rax
cmovaeq %rdx, %rax
xorl %esi, %esi
testl %ecx, %ecx
cmoveq %rsi, %rax
cmovsq %rdx, %rax
movq %rax, (%r15)
jmp 0x7b20
movq %rsp, %r8
movq $0x5, (%r8)
movl $0x2, %eax
movq %rax, 0x8(%r8)
movq $0x1, 0x10(%r8)
movq %rax, 0x18(%r8)
movq %r13, %rdi
movq %rbp, %rsi
movq %r14, %rdx
movl %r12d, %ecx
callq 0x7572
testb %al, %al
jne 0x79f9
movl $0x1, %eax
movq %rsp, %r8
movq %rax, (%r8)
movq %rax, 0x8(%r8)
movq $0x11, 0x10(%r8)
movq $0x3, 0x18(%r8)
movq %r13, %rdi
movq %rbp, %rsi
movq %r14, %rdx
movl %r12d, %ecx
callq 0x7572
testb %al, %al
jne 0x7a6b
movq %rsp, %r9
movq $0x51, (%r9)
movq $0x4, 0x8(%r9)
movq %r13, %rdi
movq %rbp, %rsi
movq %r14, %rdx
movl %r12d, %ecx
movl $0x1, %r8d
callq 0x760a
testb %al, %al
jne 0x7ab3
movq %rsp, %r9
movq $0x45, (%r9)
movq $0x4, 0x8(%r9)
movq %r13, %rdi
movq %rbp, %rsi
movq %r14, %rdx
movl %r12d, %ecx
movl $0x1, %r8d
callq 0x760a
testb %al, %al
jne 0x7a6b
movl $0x1, %eax
movq %rsp, %r8
movq %rax, (%r8)
movq %rax, 0x8(%r8)
movq $0x5, 0x10(%r8)
movq $0x3, 0x18(%r8)
movq %r13, %rdi
movq %rbp, %rsi
movq %r14, %rdx
movl %r12d, %ecx
callq 0x7572
testb %al, %al
jne 0x79f9
movq %rsp, %r8
movq $0x5, (%r8)
movq $0x3, 0x8(%r8)
movl $0x1, %eax
movq %rax, 0x10(%r8)
movq %rax, 0x18(%r8)
movq %r13, %rdi
movq %rbp, %rsi
movq %r14, %rdx
movl %r12d, %ecx
callq 0x7572
testb %al, %al
jne 0x7b5e
movq %rsp, %r9
movq $0x45, (%r9)
movq $0x4, 0x8(%r9)
movq %r13, %rdi
movq %rbp, %rsi
movq %r14, %rdx
movl %r12d, %ecx
xorl %r8d, %r8d
callq 0x760a
testb %al, %al
je 0x7d1a
leaq 0x36f8(%rip), %rax      # 0xb400
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
decq %rcx
imulq (%rax,%r12,8), %rcx
jmp 0x7b73
movq %rsp, %r9
movq $0x15, (%r9)
movq $0x4, 0x8(%r9)
movq %r13, %rdi
movq %rbp, %rsi
movq %r14, %rdx
movl %r12d, %ecx
movl $0x1, %r8d
callq 0x760a
testb %al, %al
jne 0x79f9
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movq %rax, 0x20(%rsp)
movq %rsp, %r8
movq $0x1, (%r8)
movl $0x2, %eax
movq %rax, 0x8(%r8)
movq $0x5, 0x10(%r8)
movq %rax, 0x18(%r8)
movq %r13, %rdi
movq %rbp, %rsi
movq %r14, %rdx
movl %r12d, %ecx
callq 0x7572
testb %al, %al
je 0x7d97
leaq 0x3670(%rip), %rax      # 0xb400
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
jmp 0x7e16
movq %rsp, %r8
movq $0x11, (%r8)
movq $0x3, 0x8(%r8)
movl $0x1, %eax
movq %rax, 0x10(%r8)
movq %rax, 0x18(%r8)
movq %r13, %rdi
movq %rbp, %rsi
movq %r14, %rdx
movl %r12d, %ecx
callq 0x7572
testb %al, %al
je 0x7ddc
leaq 0x362e(%rip), %rax      # 0xb400
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
decq %rsi
jmp 0x7e16
movq %rsp, %r9
movq $0x51, (%r9)
movq $0x4, 0x8(%r9)
movq %r13, %rdi
movq %rbp, %rsi
movq %r14, %rdx
movl %r12d, %ecx
xorl %r8d, %r8d
callq 0x760a
testb %al, %al
je 0x7e35
leaq 0x35f3(%rip), %rax      # 0xb400
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
addq $-0x2, %rsi
imulq (%rax,%r12,8), %rsi
addq %r14, %rsi
movl %esi, %eax
movl $0xe1, %ecx
cmpq %rcx, %rax
cmovaeq %rcx, %rax
xorl %edx, %edx
testl %esi, %esi
jmp 0x7a18
movq %rsp, %r8
movq $0x0, (%r8)
movq $0x1, 0x8(%r8)
movq $0x15, 0x10(%r8)
movq $0x3, 0x18(%r8)
movq %r13, %rdi
movq %rbp, %rsi
movq %r14, %rdx
movl %r12d, %ecx
callq 0x7572
testb %al, %al
jne 0x7d89
movq %rsp, %r8
movq $0x4, (%r8)
movl $0x2, %eax
movq %rax, 0x8(%r8)
movq $0x5, 0x10(%r8)
movq %rax, 0x18(%r8)
movq %r13, %rdi
movq %rbp, %rsi
movq %r14, %rdx
movl %r12d, %ecx
callq 0x7572
testb %al, %al
jne 0x7dcb
movq %rsp, %r8
movq $0x14, (%r8)
movq $0x3, 0x8(%r8)
movl $0x1, %eax
movq %rax, 0x10(%r8)
movq %rax, 0x18(%r8)
movq %r13, %rdi
movq %rbp, %rsi
movq %r14, %rdx
movl %r12d, %ecx
callq 0x7572
testb %al, %al
jne 0x7e06
movq %rsp, %r9
movq $0x54, (%r9)
movq $0x4, 0x8(%r9)
movq %r13, %rdi
movq %rbp, %rsi
movq %r14, %rdx
movl %r12d, %ecx
xorl %r8d, %r8d
callq 0x760a
testb %al, %al
je 0x7f1f
leaq 0x34ef(%rip), %rax      # 0xb400
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
addq $-0x3, %rsi
jmp 0x7e16
movq %rsp, %r8
movq $0x14, (%r8)
movq $0x3, 0x8(%r8)
movq $0x0, 0x10(%r8)
movq $0x2, 0x18(%r8)
movq %r13, %rdi
movq %rbp, %rsi
movq %r14, %rdx
movl %r12d, %ecx
callq 0x7572
testb %al, %al
je 0x7f67
addq $-0x2, 0x20(%rsp)
movl $0x1, %r15d
jmp 0x7fe8
movq %rsp, %r8
movq $0x4, (%r8)
movq $0x2, 0x8(%r8)
movq $0x10, 0x10(%r8)
movq $0x3, 0x18(%r8)
movq %r13, %rdi
movq %rbp, %rsi
movq %r14, %rdx
movl %r12d, %ecx
callq 0x7572
testb %al, %al
je 0x7fab
decq 0x20(%rsp)
movl $0x2, %r15d
jmp 0x7fe8
movq %rsp, %r8
movq $0x0, (%r8)
movq $0x1, 0x8(%r8)
movq $0x50, 0x10(%r8)
movq $0x4, 0x18(%r8)
movq %r13, %rdi
movq %rbp, %rsi
movq %r14, %rdx
movl %r12d, %ecx
callq 0x7572
movl $0x3, %r15d
testb %al, %al
je 0x802f
leaq 0x3411(%rip), %rax      # 0xb400
movq 0x20(%rsp), %rcx
imulq (%rax,%r12,8), %rcx
addq %r14, %rcx
cmpl $0xe0, %ecx
ja 0x81a3
movq %rcx, %rax
movzbl %al, %esi
movb $0x1, (%r13,%r14)
movq %r13, %rdi
callq 0x4ed6
movb $0x0, (%r13,%r14)
testb %al, %al
je 0x81a3
jmp 0x81df
movq %rsp, %r8
movq $0x14, (%r8)
movq $0x4, 0x8(%r8)
movq $0x0, 0x10(%r8)
movq $0x1, 0x18(%r8)
movq %r13, %rdi
movq %rbp, %rsi
movq %r14, %rdx
movl %r12d, %ecx
callq 0x7572
movl $0xffffffff, %r15d      # imm = 0xFFFFFFFF
testb %al, %al
jne 0x81a3
movl $0x4, %eax
movq %rsp, %r8
movq %rax, (%r8)
movq $0x2, 0x8(%r8)
movq %rax, 0x10(%r8)
movq $0x3, 0x18(%r8)
movq %r13, %rdi
movq %rbp, %rsi
movq %r14, %rdx
movl %r12d, %ecx
callq 0x7572
movl $0x1, %r15d
testb %al, %al
jne 0x81a3
movq %rsp, %r8
movq $0x0, (%r8)
movq $0x1, 0x8(%r8)
movq $0x44, 0x10(%r8)
movq $0x4, 0x18(%r8)
movq %r13, %rdi
movq %rbp, %rsi
movq %r14, %rdx
movl %r12d, %ecx
callq 0x7572
movl $0x2, %r15d
testb %al, %al
jne 0x81a3
movq %rsp, %r8
movq $0x0, (%r8)
movq $0x1, 0x8(%r8)
movq $0x14, 0x10(%r8)
movq $0x4, 0x18(%r8)
movq %r13, %rdi
movq %rbp, %rsi
movq %r14, %rdx
movl %r12d, %ecx
callq 0x7572
movl $0x1, %r15d
testb %al, %al
jne 0x81a3
movl $0x4, %eax
movq %rsp, %r8
movq %rax, (%r8)
movq $0x3, 0x8(%r8)
movq %rax, 0x10(%r8)
movq $0x2, 0x18(%r8)
movq %r13, %rdi
movq %rbp, %rsi
movq %r14, %rdx
movl %r12d, %ecx
callq 0x7572
movl $0xffffffff, %r15d      # imm = 0xFFFFFFFF
testb %al, %al
jne 0x81a3
movq %rsp, %r8
movq $0x44, (%r8)
movq $0x4, 0x8(%r8)
movq $0x0, 0x10(%r8)
movq $0x1, 0x18(%r8)
movq %r13, %rdi
movq %rbp, %rsi
movq %r14, %rdx
movl %r12d, %ecx
callq 0x7572
movl $0xfffffffe, %r15d      # imm = 0xFFFFFFFE
testb %al, %al
je 0x81f2
leaq 0x3256(%rip), %rcx      # 0xb400
movl %r15d, %eax
imulq (%rcx,%r12,8), %rax
addq %r14, %rax
cmpl $0xe0, %eax
ja 0x82c9
movzbl %al, %esi
movb $0x1, (%r13,%r14)
movq %r13, %rdi
callq 0x4ed6
movb $0x0, (%r13,%r14)
testb %al, %al
je 0x82c9
movq $0x1, (%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rbx)
jmp 0x78bd
movq %rsp, %r8
movq $0x0, (%r8)
movq $0x2, 0x8(%r8)
movq $0x14, 0x10(%r8)
movq $0x3, 0x18(%r8)
movq %r13, %rdi
movq %rbp, %rsi
movq %r14, %rdx
movl %r12d, %ecx
callq 0x7572
testb %al, %al
je 0x8239
movl $0xffffffff, %r15d      # imm = 0xFFFFFFFF
movl $0x3, %eax
jmp 0x82bf
movq %rsp, %r8
movq $0x10, (%r8)
movq $0x3, 0x8(%r8)
movq $0x4, 0x10(%r8)
movq $0x2, 0x18(%r8)
movq %r13, %rdi
movq %rbp, %rsi
movq %r14, %rdx
movl %r12d, %ecx
callq 0x7572
testb %al, %al
je 0x827d
movl $0xfffffffe, %r15d      # imm = 0xFFFFFFFE
movl $0x2, %eax
jmp 0x82bf
movq %rsp, %r8
movq $0x50, (%r8)
movq $0x4, 0x8(%r8)
movq $0x0, 0x10(%r8)
movq $0x1, 0x18(%r8)
movq %r13, %rdi
movq %rbp, %rsi
movq %r14, %rdx
movl %r12d, %ecx
callq 0x7572
testb %al, %al
je 0x82c9
movl $0xfffffffd, %r15d      # imm = 0xFFFFFFFD
movl $0x1, %eax
movq %rax, 0x20(%rsp)
jmp 0x7fe8
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
movq $0x0, 0x10(%rbx)
jmp 0x78bd