// File: 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:
subq $0x1a8, %rsp            # imm = 0x1A8
movq %rdi, 0x58(%rsp)
movq %rdi, %rax
movq %rax, 0x60(%rsp)
movq %rdi, 0x1a0(%rsp)
movq %rsi, 0x198(%rsp)
movq %rdx, 0x190(%rsp)
movq 0x198(%rsp), %rax
movq %rax, 0x68(%rsp)
movb $0x1, 0x18f(%rsp)
movb $0x1, 0x18e(%rsp)
leaq 0x168(%rsp), %rdi
callq 0x55a0
movq 0x68(%rsp), %rdi
addq $0x68, %rdi
callq 0xc070
movq %rax, 0x70(%rsp)
jmp 0x3fd2b
movq 0x70(%rsp), %rax
movq %rax, 0x160(%rsp)
movq 0x160(%rsp), %rax
movq %rax, 0x148(%rsp)
movq 0x148(%rsp), %rdi
callq 0x1d370
movq %rdx, 0x48(%rsp)
movq %rax, 0x50(%rsp)
jmp 0x3fd61
movq 0x48(%rsp), %rax
movq 0x50(%rsp), %rcx
movq %rcx, 0x128(%rsp)
movq %rax, 0x130(%rsp)
movq 0x128(%rsp), %rax
movq 0x12d(%rsp), %rcx
movq %rcx, 0x13d(%rsp)
movq %rax, 0x138(%rsp)
movq 0x148(%rsp), %rdi
callq 0x1d3a0
movq %rdx, 0x38(%rsp)
movq %rax, 0x40(%rsp)
jmp 0x3fdb4
movq 0x38(%rsp), %rax
movq 0x40(%rsp), %rcx
movq %rcx, 0x108(%rsp)
movq %rax, 0x110(%rsp)
movq 0x108(%rsp), %rax
movq %rax, 0x118(%rsp)
movl 0x110(%rsp), %eax
movl %eax, 0x120(%rsp)
movb 0x114(%rsp), %al
movb %al, 0x124(%rsp)
leaq 0x138(%rsp), %rdi
leaq 0x118(%rsp), %rsi
callq 0x1d3f0
movb %al, 0x37(%rsp)
jmp 0x3fe15
movb 0x37(%rsp), %al
testb $0x1, %al
jne 0x3fe22
jmp 0x4006b
leaq 0x138(%rsp), %rdi
callq 0x1d420
movq %rax, 0x28(%rsp)
jmp 0x3fe36
movq 0x28(%rsp), %rax
movl (%rax), %eax
movl %eax, 0x104(%rsp)
leaq 0xc0(%rsp), %rdi
leaq 0x104(%rsp), %rsi
callq 0x19f80
jmp 0x3fe5b
leaq 0x10a75(%rip), %rdx     # 0x508d7
leaq 0xe0(%rsp), %rdi
leaq 0xc0(%rsp), %rsi
callq 0xb910
jmp 0x3fe79
leaq 0x168(%rsp), %rdi
leaq 0xe0(%rsp), %rsi
callq 0x5520
jmp 0x3fe90
leaq 0xe0(%rsp), %rdi
callq 0x5260
leaq 0xc0(%rsp), %rdi
callq 0x5260
movq 0x160(%rsp), %rdi
leaq 0x104(%rsp), %rsi
callq 0x437b0
movq %rax, 0x20(%rsp)
jmp 0x3fec6
movq 0x20(%rsp), %rax
movl %eax, 0xbc(%rsp)
testb $0x1, 0x18f(%rsp)
je 0x3ff65
movl 0xbc(%rsp), %eax
movl %eax, %edi
callq 0x437e0
movq %rax, 0x18(%rsp)
jmp 0x3fef5
movq 0x18(%rsp), %rax
movl %eax, 0xbc(%rsp)
jmp 0x3ff65
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x158(%rsp)
movl %eax, 0x154(%rsp)
jmp 0x400d7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x158(%rsp)
movl %eax, 0x154(%rsp)
jmp 0x3ff53
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x158(%rsp)
movl %eax, 0x154(%rsp)
leaq 0xe0(%rsp), %rdi
callq 0x5260
leaq 0xc0(%rsp), %rdi
callq 0x5260
jmp 0x400d7
xorl %eax, %eax
testb $0x1, 0x18e(%rsp)
movb %al, 0x17(%rsp)
je 0x3ffb7
movq 0x160(%rsp), %rdi
callq 0x1a8a0
movb %al, 0x16(%rsp)
jmp 0x3ff88
movb 0x16(%rsp), %al
movb %al, 0xbb(%rsp)
leaq 0x2d523(%rip), %rsi     # 0x6d4bd
leaq 0xbb(%rsp), %rdi
callq 0x1f930
movb %al, 0x15(%rsp)
jmp 0x3ffad
movb 0x15(%rsp), %al
movb %al, 0x17(%rsp)
jmp 0x3ffb7
movb 0x17(%rsp), %al
testb $0x1, %al
jne 0x3ffc1
jmp 0x3ffe2
movl 0xbc(%rsp), %eax
movl %eax, %edi
callq 0x439b0
movq %rax, 0x8(%rsp)
jmp 0x3ffd6
movq 0x8(%rsp), %rax
movl %eax, 0xbc(%rsp)
movl 0xbc(%rsp), %esi
leaq 0x98(%rsp), %rdi
callq 0x1a4d0
jmp 0x3fff8
leaq 0x168(%rsp), %rdi
leaq 0x98(%rsp), %rsi
callq 0x5520
jmp 0x4000f
leaq 0x98(%rsp), %rdi
callq 0x5260
leaq 0xc8c5(%rip), %rsi      # 0x4c8e8
leaq 0x168(%rsp), %rdi
callq 0x53b0
jmp 0x40032
jmp 0x40034
leaq 0x138(%rsp), %rdi
callq 0x1d4b0
jmp 0x40043
jmp 0x3fdfa
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x158(%rsp)
movl %eax, 0x154(%rsp)
leaq 0x98(%rsp), %rdi
callq 0x5260
jmp 0x400d7
leaq 0x78(%rsp), %rdi
leaq 0x168(%rsp), %rsi
callq 0x51b0
jmp 0x4007f
movq 0x58(%rsp), %rdi
movl $0x1, %esi
leaq 0x78(%rsp), %rdx
callq 0xd9a0
jmp 0x40095
leaq 0x78(%rsp), %rdi
callq 0x5260
leaq 0x168(%rsp), %rdi
callq 0x5260
movq 0x60(%rsp), %rax
addq $0x1a8, %rsp            # imm = 0x1A8
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x158(%rsp)
movl %eax, 0x154(%rsp)
leaq 0x78(%rsp), %rdi
callq 0x5260
leaq 0x168(%rsp), %rdi
callq 0x5260
movq 0x158(%rsp), %rdi
callq 0x5760
nopw %cs:(%rax,%rax)