// File: tewalds[P]pentagod/./move.h
// Function: Move::Move(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, unsigned int)
Move(const std::string & str, unsigned int O = 8){
		if(     str == "swap"    ){ l = M_SWAP;    r = 14; o = O; }
		else if(str == "resign"  ){ l = M_RESIGN;  r = 14; o = O; }
		else if(str == "none"    ){ l = M_NONE;    r = 14; o = O; }
		else if(str == "unknown" ){ l = M_UNKNOWN; r = 14; o = O; }
		else if(str.length() <= 2){ l = M_NONE;    r = 14; o = O; }
		else{
			unsigned int y = tolower(str[0]) - 'a'; //[abcdef]
			unsigned int x = str[1] - '1';          //[123456]
			l = y*6+x;

			char c = tolower(str[2]);
			if(     c >= '1' && c <= '8') r = c - '1'; //[12345678]
			else if(c >= 's' && c <= 'z') r = c - 's'; //[stuvwxyz]
			else if(c >= 'a' && c <= 'h') r = c - 'a'; //[abcdefgh]
			else r = 0; //unknown, but do something

			if(str.length() == 5) {
				assert(O == 8 && str[3] == ':');
				o = str[4] - '0';
			} else {
				o = O;
			}
		}
	}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x30(%rsp)
movq %rsi, 0x28(%rsp)
movl %edx, 0x24(%rsp)
movq 0x30(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x28(%rsp), %rdi
leaq 0x2845f(%rip), %rsi     # 0x3da77
callq 0x8b90
testb $0x1, %al
jne 0x15623
jmp 0x1566a
movq 0x10(%rsp), %rax
movw (%rax), %cx
andw $0xff00, %cx            # imm = 0xFF00
orw $0xff, %cx
movw %cx, (%rax)
movw (%rax), %cx
andw $0xf0ff, %cx            # imm = 0xF0FF
orw $0xe00, %cx             # imm = 0xE00
movw %cx, (%rax)
movl 0x24(%rsp), %ecx
movw %cx, %dx
movw (%rax), %cx
andw $0xf, %dx
shlw $0xc, %dx
andw $0xfff, %cx             # imm = 0xFFF
orw %dx, %cx
movw %cx, (%rax)
jmp 0x159ee
movq 0x28(%rsp), %rdi
leaq 0x28406(%rip), %rsi     # 0x3da7c
callq 0x8b90
testb $0x1, %al
jne 0x15681
jmp 0x156c8
movq 0x10(%rsp), %rax
movw (%rax), %cx
andw $0xff00, %cx            # imm = 0xFF00
orw $0xfe, %cx
movw %cx, (%rax)
movw (%rax), %cx
andw $0xf0ff, %cx            # imm = 0xF0FF
orw $0xe00, %cx             # imm = 0xE00
movw %cx, (%rax)
movl 0x24(%rsp), %ecx
movw %cx, %dx
movw (%rax), %cx
andw $0xf, %dx
shlw $0xc, %dx
andw $0xfff, %cx             # imm = 0xFFF
orw %dx, %cx
movw %cx, (%rax)
jmp 0x159ec
movq 0x28(%rsp), %rdi
leaq 0x2839e(%rip), %rsi     # 0x3da72
callq 0x8b90
testb $0x1, %al
jne 0x156df
jmp 0x15726
movq 0x10(%rsp), %rax
movw (%rax), %cx
andw $0xff00, %cx            # imm = 0xFF00
orw $0xfd, %cx
movw %cx, (%rax)
movw (%rax), %cx
andw $0xf0ff, %cx            # imm = 0xF0FF
orw $0xe00, %cx             # imm = 0xE00
movw %cx, (%rax)
movl 0x24(%rsp), %ecx
movw %cx, %dx
movw (%rax), %cx
andw $0xf, %dx
shlw $0xc, %dx
andw $0xfff, %cx             # imm = 0xFFF
orw %dx, %cx
movw %cx, (%rax)
jmp 0x159ea
movq 0x28(%rsp), %rdi
leaq 0x28338(%rip), %rsi     # 0x3da6a
callq 0x8b90
testb $0x1, %al
jne 0x1573d
jmp 0x15784
movq 0x10(%rsp), %rax
movw (%rax), %cx
andw $0xff00, %cx            # imm = 0xFF00
orw $0xfc, %cx
movw %cx, (%rax)
movw (%rax), %cx
andw $0xf0ff, %cx            # imm = 0xF0FF
orw $0xe00, %cx             # imm = 0xE00
movw %cx, (%rax)
movl 0x24(%rsp), %ecx
movw %cx, %dx
movw (%rax), %cx
andw $0xf, %dx
shlw $0xc, %dx
andw $0xfff, %cx             # imm = 0xFFF
orw %dx, %cx
movw %cx, (%rax)
jmp 0x159e8
movq 0x28(%rsp), %rdi
callq 0x4570
cmpq $0x2, %rax
ja 0x157db
movq 0x10(%rsp), %rax
movw (%rax), %cx
andw $0xff00, %cx            # imm = 0xFF00
orw $0xfd, %cx
movw %cx, (%rax)
movw (%rax), %cx
andw $0xf0ff, %cx            # imm = 0xF0FF
orw $0xe00, %cx             # imm = 0xE00
movw %cx, (%rax)
movl 0x24(%rsp), %ecx
movw %cx, %dx
movw (%rax), %cx
andw $0xf, %dx
shlw $0xc, %dx
andw $0xfff, %cx             # imm = 0xFFF
orw %dx, %cx
movw %cx, (%rax)
jmp 0x159e6
movq 0x28(%rsp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x4400
movsbl (%rax), %edi
callq 0x4520
subl $0x61, %eax
movl %eax, 0x20(%rsp)
movq 0x28(%rsp), %rdi
movl $0x1, %esi
callq 0x4400
movq %rax, %rcx
movq 0x10(%rsp), %rax
movsbl (%rcx), %ecx
subl $0x31, %ecx
movl %ecx, 0x1c(%rsp)
imull $0x6, 0x20(%rsp), %ecx
addl 0x1c(%rsp), %ecx
movw %cx, %dx
movw (%rax), %cx
andw $0xff, %dx
andw $0xff00, %cx            # imm = 0xFF00
orw %dx, %cx
movw %cx, (%rax)
movq 0x28(%rsp), %rdi
movl $0x2, %esi
callq 0x4400
movsbl (%rax), %edi
callq 0x4520
movb %al, 0x1b(%rsp)
movsbl 0x1b(%rsp), %eax
cmpl $0x31, %eax
jl 0x15892
movsbl 0x1b(%rsp), %eax
cmpl $0x38, %eax
jg 0x15892
movq 0x10(%rsp), %rax
movsbl 0x1b(%rsp), %ecx
subl $0x31, %ecx
movw %cx, %dx
movw (%rax), %cx
andw $0xf, %dx
shlw $0x8, %dx
andw $0xf0ff, %cx            # imm = 0xF0FF
orw %dx, %cx
movw %cx, (%rax)
jmp 0x15922
movsbl 0x1b(%rsp), %eax
cmpl $0x73, %eax
jl 0x158ce
movsbl 0x1b(%rsp), %eax
cmpl $0x7a, %eax
jg 0x158ce
movq 0x10(%rsp), %rax
movsbl 0x1b(%rsp), %ecx
subl $0x73, %ecx
movw %cx, %dx
movw (%rax), %cx
andw $0xf, %dx
shlw $0x8, %dx
andw $0xf0ff, %cx            # imm = 0xF0FF
orw %dx, %cx
movw %cx, (%rax)
jmp 0x15920
movsbl 0x1b(%rsp), %eax
cmpl $0x61, %eax
jl 0x1590a
movsbl 0x1b(%rsp), %eax
cmpl $0x68, %eax
jg 0x1590a
movq 0x10(%rsp), %rax
movsbl 0x1b(%rsp), %ecx
subl $0x61, %ecx
movw %cx, %dx
movw (%rax), %cx
andw $0xf, %dx
shlw $0x8, %dx
andw $0xf0ff, %cx            # imm = 0xF0FF
orw %dx, %cx
movw %cx, (%rax)
jmp 0x1591e
movq 0x10(%rsp), %rax
movw (%rax), %cx
andw $0xf0ff, %cx            # imm = 0xF0FF
orw $0x0, %cx
movw %cx, (%rax)
jmp 0x15920
jmp 0x15922
movq 0x28(%rsp), %rdi
callq 0x4570
cmpq $0x5, %rax
jne 0x159c2
xorl %eax, %eax
cmpl $0x8, 0x24(%rsp)
movb %al, 0xf(%rsp)
jne 0x1595f
movq 0x28(%rsp), %rdi
movl $0x3, %esi
callq 0x4400
movsbl (%rax), %eax
cmpl $0x3a, %eax
sete %al
movb %al, 0xf(%rsp)
movb 0xf(%rsp), %al
testb $0x1, %al
jne 0x15969
jmp 0x1596b
jmp 0x1598a
leaq 0x28880(%rip), %rdi     # 0x3e1f2
leaq 0x28064(%rip), %rsi     # 0x3d9dd
movl $0x4a, %edx
leaq 0x28885(%rip), %rcx     # 0x3e20a
callq 0x4250
movq 0x28(%rsp), %rdi
movl $0x4, %esi
callq 0x4400
movq %rax, %rcx
movq 0x10(%rsp), %rax
movsbl (%rcx), %ecx
subl $0x30, %ecx
movw %cx, %dx
movw (%rax), %cx
andw $0xf, %dx
shlw $0xc, %dx
andw $0xfff, %cx             # imm = 0xFFF
orw %dx, %cx
movw %cx, (%rax)
jmp 0x159e4
movq 0x10(%rsp), %rax
movl 0x24(%rsp), %ecx
movw %cx, %dx
movw (%rax), %cx
andw $0xf, %dx
shlw $0xc, %dx
andw $0xfff, %cx             # imm = 0xFFF
orw %dx, %cx
movw %cx, (%rax)
jmp 0x159e6
jmp 0x159e8
jmp 0x159ea
jmp 0x159ec
jmp 0x159ee
addq $0x38, %rsp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)