// File: /workspace/github_cpp_makefile_star2_O3/tewalds[P]morat/hex/gtpgeneral.cpp
// Function: Morat::Hex::GTP::gtp_patterns(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>)
GTPResponse GTP::gtp_patterns(vecstr args){
	bool symmetric = true;
	bool invert = true;
	std::string ret;
	const Board & board = *hist;
	for (auto move : board) {
		ret += move.to_s() + " ";
		unsigned int p = board.pattern(move);
		if(symmetric)
			p = board.pattern_symmetry(p);
		if(invert && board.to_play() == Side::P2)
			p = board.pattern_invert(p);
		ret += to_str(p);
		ret += "\n";
	}
	return GTPResponse(true, ret);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
leaq 0x20(%rsp), %rax
movq %rsi, %r14
movq %rdi, 0x50(%rsp)
leaq 0x80(%rsi), %rdi
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
callq 0x13114
leaq 0x58(%rsp), %r15
leaq 0x40(%rsp), %r13
leaq 0x88(%rsp), %r12
leaq 0x10(%rsp), %rbx
leaq 0x7d99(%rip), %rbp      # 0x31906
movq %rax, (%r15)
movl %edx, 0x8(%r15)
shrq $0x20, %rdx
movb %dl, 0xc(%r15)
cmpw $-0x1, 0x62(%rsp)
je 0x29cc7
movl 0x60(%rsp), %eax
movl %eax, 0xc(%rsp)
leaq 0xc(%rsp), %rsi
movq %r12, %rdi
callq 0x10e7e
leaq 0xc29f(%rip), %rsi      # 0x35e43
movq %r12, %rdi
callq 0x56e0
movq %r13, 0x30(%rsp)
movq %rax, %rcx
addq $0x10, %rcx
movq (%rax), %rdx
cmpq %rcx, %rdx
je 0x29bcf
movq %rdx, 0x30(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x40(%rsp)
jmp 0x29bd9
vmovups (%rcx), %xmm0
vmovups %xmm0, (%r13)
movq 0x8(%rax), %rdx
movq %rdx, 0x38(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x38(%rsp), %rdx
movq 0x30(%rsp), %rsi
movq %rbx, %rdi
callq 0x50c0
movq 0x30(%rsp), %rdi
cmpq %r13, %rdi
je 0x29c12
callq 0x52e0
movq 0x88(%rsp), %rdi
leaq 0x98(%rsp), %rax
cmpq %rax, %rdi
je 0x29c2c
callq 0x52e0
movswq 0xe(%rsp), %rax
movq 0x90(%r14), %rcx
shlq $0x4, %rax
movq 0x8(%rcx,%rax), %rdi
movl %edi, %eax
shll $0x6, %eax
shrq $0x6, %rdi
andl $0xc0fc0fc0, %eax       # imm = 0xC0FC0FC0
andl $0x3f03f03f, %edi       # imm = 0x3F03F03F
orq %rax, %rdi
callq 0x2c95e
leaq 0xc746(%rip), %rdx      # 0x363ab
movb 0x88(%r14), %cl
cmpb (%rdx), %cl
jne 0x29c82
movl %eax, %ecx
shrl %ecx
andl $0xd5555555, %eax       # imm = 0xD5555555
andl $0x55555555, %ecx       # imm = 0x55555555
leal (%rcx,%rax,2), %eax
leaq 0x30(%rsp), %rdi
movl %eax, %esi
callq 0x11399
movq 0x38(%rsp), %rdx
movq 0x30(%rsp), %rsi
movq %rbx, %rdi
callq 0x50c0
movq 0x30(%rsp), %rdi
cmpq %r13, %rdi
je 0x29caf
callq 0x52e0
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x56e0
movq %r15, %rdi
callq 0x1315e
jmp 0x29b7c
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdx
leaq 0x78(%rsp), %r14
movq %r14, -0x10(%r14)
addq %rsi, %rdx
leaq 0x68(%rsp), %rdi
callq 0xa930
movq 0x50(%rsp), %rbx
leaq 0x68(%rsp), %rdx
movl $0x1, %esi
movq %rbx, %rdi
callq 0xa8ba
movq 0x68(%rsp), %rdi
cmpq %r14, %rdi
je 0x29d0d
callq 0x52e0
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x29d21
callq 0x52e0
movq %rbx, %rax
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x68(%rsp), %rdi
movq %rax, %rbx
cmpq %r14, %rdi
jne 0x29d88
jmp 0x29d94
jmp 0x29d91
jmp 0x29d91
movq 0x30(%rsp), %rdi
movq %rax, %rbx
cmpq %r13, %rdi
jne 0x29d88
jmp 0x29d94
jmp 0x29d91
jmp 0x29d91
movq %rax, %rbx
jmp 0x29d73
movq 0x30(%rsp), %rdi
movq %rax, %rbx
cmpq %r13, %rdi
je 0x29d73
callq 0x52e0
movq 0x88(%rsp), %rdi
leaq 0x98(%rsp), %rax
cmpq %rax, %rdi
je 0x29d94
callq 0x52e0
jmp 0x29d94
jmp 0x29d91
movq %rax, %rbx
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x29da8
callq 0x52e0
movq %rbx, %rdi
callq 0x5670