// File: /workspace/github_cpp_makefile_star2_O1/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
movq %rsi, %r14
movq %rdi, 0x50(%rsp)
leaq 0x20(%rsp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq 0x80(%rsi), %rdi
callq 0x13010
leaq 0x58(%rsp), %r15
movq %rax, (%r15)
movl %edx, 0x8(%r15)
shrq $0x20, %rdx
movb %dl, 0xc(%r15)
leaq 0x40(%rsp), %r13
leaq 0x88(%rsp), %r12
leaq 0x10(%rsp), %rbx
leaq 0x7c86(%rip), %rbp      # 0x31906
cmpw $-0x1, 0x62(%rsp)
je 0x29dcb
movl 0x60(%rsp), %eax
movl %eax, 0xc(%rsp)
movq %r12, %rdi
leaq 0xc(%rsp), %rsi
callq 0x10cdc
movq %r12, %rdi
leaq 0xc198(%rip), %rsi      # 0x35e43
callq 0x56e0
movq %r13, 0x30(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x29cd3
movq %rdx, 0x30(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x40(%rsp)
jmp 0x29cdd
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 0x30(%rsp), %rsi
movq 0x38(%rsp), %rdx
movq %rbx, %rdi
callq 0x50c0
movq 0x30(%rsp), %rdi
cmpq %r13, %rdi
je 0x29d16
callq 0x52e0
movq 0x88(%rsp), %rdi
leaq 0x98(%rsp), %rax
cmpq %rax, %rdi
je 0x29d30
callq 0x52e0
movswq 0xe(%rsp), %rax
movq 0x90(%r14), %rcx
shlq $0x4, %rax
movq 0x8(%rcx,%rax), %rdi
movl %edi, %eax
shll $0x6, %eax
andl $0xc0fc0fc0, %eax       # imm = 0xC0FC0FC0
shrq $0x6, %rdi
andl $0x3f03f03f, %edi       # imm = 0x3F03F03F
orq %rax, %rdi
callq 0x2ca40
movb 0x88(%r14), %cl
leaq 0xc63b(%rip), %rdx      # 0x363ab
cmpb (%rdx), %cl
jne 0x29d86
movl %eax, %ecx
shrl %ecx
andl $0x55555555, %ecx       # imm = 0x55555555
andl $0xd5555555, %eax       # imm = 0xD5555555
leal (%rcx,%rax,2), %eax
leaq 0x30(%rsp), %rdi
movl %eax, %esi
callq 0x11206
movq 0x30(%rsp), %rsi
movq 0x38(%rsp), %rdx
movq %rbx, %rdi
callq 0x50c0
movq 0x30(%rsp), %rdi
cmpq %r13, %rdi
je 0x29db3
callq 0x52e0
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x56e0
movq %r15, %rdi
callq 0x13058
jmp 0x29c80
leaq 0x78(%rsp), %r14
movq %r14, -0x10(%r14)
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdx
addq %rsi, %rdx
leaq 0x68(%rsp), %rdi
callq 0xa866
leaq 0x68(%rsp), %rdx
movq 0x50(%rsp), %rbx
movq %rbx, %rdi
movl $0x1, %esi
callq 0xa7f0
movq 0x68(%rsp), %rdi
cmpq %r14, %rdi
je 0x29e11
callq 0x52e0
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x29e25
callq 0x52e0
movq %rbx, %rax
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x68(%rsp), %rdi
cmpq %r14, %rdi
jne 0x29e8c
jmp 0x29e98
jmp 0x29e95
jmp 0x29e95
movq %rax, %rbx
movq 0x30(%rsp), %rdi
cmpq %r13, %rdi
jne 0x29e8c
jmp 0x29e98
jmp 0x29e95
jmp 0x29e95
movq %rax, %rbx
jmp 0x29e77
movq %rax, %rbx
movq 0x30(%rsp), %rdi
cmpq %r13, %rdi
je 0x29e77
callq 0x52e0
movq 0x88(%rsp), %rdi
leaq 0x98(%rsp), %rax
cmpq %rax, %rdi
je 0x29e98
callq 0x52e0
jmp 0x29e98
jmp 0x29e95
movq %rax, %rbx
leaq 0x20(%rsp), %rax
movq 0x10(%rsp), %rdi
cmpq %rax, %rdi
je 0x29eac
callq 0x52e0
movq %rbx, %rdi
callq 0x5670