// File: YSRKEN[P]Shioi/I401/main.cpp
// Function: Board::GetPatternB(unsigned long, Direction)
Pattern GetPatternB(const size_t position, const Direction dir) {
		const auto& pattern_length = kIterateTable[position][dir];
		Pattern pattern;
		for (auto s : { Side::Left, Side::Right }) {
			for (size_t i : rep(5)) {
				const int sign = (s == Side::Right) ? 1 : -1;
				pattern[s][i] = (pattern_length[s] <= i) 
					? ((i) ? pattern[s][i - 1U] | Stone::None : Stone::None)/* | Stone::None */
					: (this->board_ | PackPattern(position, dir, sign, sign * (i + 1)) | Normalize())/*.pop_back()*/;
			}
		}
		return pattern;
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xe0, %rsp
movq %rdi, -0xd0(%rbp)
movb %cl, %al
movq %rdi, %rcx
movq %rcx, -0xe0(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movb %al, -0x19(%rbp)
movq -0x10(%rbp), %rdi
movq %rdi, -0xd8(%rbp)
addq $0xe8, %rdi
movq -0x18(%rbp), %rsi
callq 0x56e0
movq %rax, %rdi
movzbl -0x19(%rbp), %eax
movl %eax, %esi
callq 0x5710
movq -0xd0(%rbp), %rdi
movq %rax, -0x28(%rbp)
callq 0x11410
movb $0x0, -0x42(%rbp)
movb $0x1, -0x41(%rbp)
leaq -0x42(%rbp), %rax
movq %rax, -0x40(%rbp)
movq $0x2, -0x38(%rbp)
leaq -0x40(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rdi
callq 0x11460
movq %rax, -0x50(%rbp)
movq -0x30(%rbp), %rdi
callq 0x11480
movq %rax, -0x58(%rbp)
movq -0x50(%rbp), %rax
cmpq -0x58(%rbp), %rax
je 0xef5b
movq -0x50(%rbp), %rax
movb (%rax), %al
movb %al, -0x59(%rbp)
movl $0x5, %edi
callq 0x114c0
movq %rax, -0x70(%rbp)
leaq -0x70(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x68(%rbp), %rdi
callq 0x114f0
movl %eax, -0x74(%rbp)
movq -0x68(%rbp), %rdi
callq 0x11520
movl %eax, -0x78(%rbp)
leaq -0x74(%rbp), %rdi
leaq -0x78(%rbp), %rsi
callq 0x11550
testb $0x1, %al
jne 0xee1b
jmp 0xef48
leaq -0x74(%rbp), %rdi
callq 0x11570
movslq (%rax), %rax
movq %rax, -0x80(%rbp)
movzbl -0x59(%rbp), %edx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl $0x1, %ecx
cmpl $0x1, %edx
cmovel %ecx, %eax
movl %eax, -0x84(%rbp)
movq -0x28(%rbp), %rdi
movzbl -0x59(%rbp), %eax
movl %eax, %esi
callq 0xdaf0
movq (%rax), %rax
cmpq -0x80(%rbp), %rax
ja 0xeea9
cmpq $0x0, -0x80(%rbp)
je 0xee99
movq -0xd0(%rbp), %rdi
movzbl -0x59(%rbp), %eax
movl %eax, %esi
callq 0x11580
movq %rax, %rdi
movq -0x80(%rbp), %rsi
subq $0x1, %rsi
callq 0x115b0
movq %rax, %rsi
leaq -0x98(%rbp), %rdi
xorl %edx, %edx
callq 0x3140
jmp 0xeea7
leaq -0x98(%rbp), %rdi
xorl %esi, %esi
callq 0x115e0
jmp 0xef0d
movq -0x18(%rbp), %rsi
movb -0x19(%rbp), %al
movl -0x84(%rbp), %ecx
movslq -0x84(%rbp), %rdx
movq -0x80(%rbp), %rdi
addq $0x1, %rdi
imulq %rdi, %rdx
movl %edx, %r8d
leaq -0xc0(%rbp), %rdi
movzbl %al, %edx
callq 0x11670
movq -0xd8(%rbp), %rsi
leaq -0xa8(%rbp), %rdi
leaq -0xc0(%rbp), %rdx
callq 0x2880
callq 0x116a0
leaq -0x98(%rbp), %rdi
leaq -0xa8(%rbp), %rsi
callq 0x11610
movq -0xd0(%rbp), %rdi
movzbl -0x59(%rbp), %eax
movl %eax, %esi
callq 0x11580
movq %rax, %rdi
movq -0x80(%rbp), %rsi
callq 0x115b0
movq %rax, %rdi
leaq -0x98(%rbp), %rsi
callq 0x3200
leaq -0x74(%rbp), %rdi
callq 0x116b0
jmp 0xee05
jmp 0xef4a
movq -0x50(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x50(%rbp)
jmp 0xedc0
movq -0xe0(%rbp), %rax
addq $0xe0, %rsp
popq %rbp
retq
nopl (%rax,%rax)