// File: auton1[P]motiflocation/motif.cpp
// Function: motif::basematch(char, char)
inline bool motif::basematch(const char base1, const char base2)
{
	switch (base1)
	{
		case 'a':
			switch (base2)
			{
			/*case 'c': case 'g': case 't': case 'y': case 'k': case 's': case 'b':	// quicker to test the -ve case
				return false;
			default:
				return true;*/
			case 'a': case 'r': case 'm': case 'w': case 'd': case 'h': case 'v': case 'n':
				return true; 
			default:
			
				return false; 
			}
			break;
		case 'c': 
			switch (base2)
			{
			/*case 'a': case 'g': case 't': case 'r': case 'k': case 'w': case 'h':	// quicker to test the -ve case
				return false;
			default:
				return true;*/
			case 'c': case 'y': case 'm': case 's': case 'b': case 'h': case 'v': case 'n':
				return true; 
			default:
				return false; 
			}
			break;
		case 'g':
			switch (base2)
			{
			/*case 'a': case 'c': case 't': case 'y': case 'm': case 'w': case 'h':	// quicker to test the -ve case
				return false;
			default:
				return true;*/
			case 'g': case 'r': case 'k': case 's': case 'b': case 'd': case 'v': case 'n':
				return true; 
			default:
				return false; 
			}
			break;
		case 't':
			switch (base2)
			{
			/*case 'a': case 'c': case 'g': case 'r': case 'm': case 's': case 'v':	// quicker to test the -ve case
				return false;
			default:
				return true;*/
			case 't': case 'y': case 'k': case 'w': case 'b': case 'd': case 'h': case 'n':
				return true; 
			default:
				return false; 
			}
			break;
		case 'n': 
			return false; 
		default:
			cout << "\nNon-standard character in sequence file: " << base1 << " : " << base2 << endl;
			//abort();
			return false;
		}
	return false;
}

// Assembly:
subq $0x38, %rsp
movb %dl, %al
movb %sil, %cl
movq %rdi, 0x28(%rsp)
movb %cl, 0x27(%rsp)
movb %al, 0x26(%rsp)
movsbl 0x27(%rsp), %eax
addl $-0x61, %eax
movl %eax, %ecx
movq %rcx, 0x18(%rsp)
subl $0x13, %eax
ja 0xb860
movq 0x18(%rsp), %rax
leaq 0x6086(%rip), %rcx      # 0x11740
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movsbl 0x26(%rsp), %eax
movl %eax, 0x14(%rsp)
subl $0x61, %eax
je 0xb710
jmp 0xb6d3
movl 0x14(%rsp), %eax
subl $0x64, %eax
je 0xb710
jmp 0xb6de
movl 0x14(%rsp), %eax
subl $0x68, %eax
je 0xb710
jmp 0xb6e9
movl 0x14(%rsp), %eax
addl $-0x6d, %eax
subl $0x2, %eax
jb 0xb710
jmp 0xb6f7
movl 0x14(%rsp), %eax
subl $0x72, %eax
je 0xb710
jmp 0xb702
movl 0x14(%rsp), %eax
addl $-0x76, %eax
subl $0x1, %eax
ja 0xb71a
jmp 0xb710
movb $0x1, 0x37(%rsp)
jmp 0xb8b0
movb $0x0, 0x37(%rsp)
jmp 0xb8b0
movsbl 0x26(%rsp), %eax
movl %eax, 0x10(%rsp)
addl $-0x62, %eax
subl $0x2, %eax
jb 0xb771
jmp 0xb737
movl 0x10(%rsp), %eax
subl $0x68, %eax
je 0xb771
jmp 0xb742
movl 0x10(%rsp), %eax
addl $-0x6d, %eax
subl $0x2, %eax
jb 0xb771
jmp 0xb750
movl 0x10(%rsp), %eax
subl $0x73, %eax
je 0xb771
jmp 0xb75b
movl 0x10(%rsp), %eax
subl $0x76, %eax
je 0xb771
jmp 0xb766
movl 0x10(%rsp), %eax
subl $0x79, %eax
jne 0xb77b
jmp 0xb771
movb $0x1, 0x37(%rsp)
jmp 0xb8b0
movb $0x0, 0x37(%rsp)
jmp 0xb8b0
movsbl 0x26(%rsp), %eax
movl %eax, 0xc(%rsp)
subl $0x62, %eax
je 0xb7da
jmp 0xb795
movl 0xc(%rsp), %eax
subl $0x64, %eax
je 0xb7da
jmp 0xb7a0
movl 0xc(%rsp), %eax
subl $0x67, %eax
je 0xb7da
jmp 0xb7ab
movl 0xc(%rsp), %eax
subl $0x6b, %eax
je 0xb7da
jmp 0xb7b6
movl 0xc(%rsp), %eax
subl $0x6e, %eax
je 0xb7da
jmp 0xb7c1
movl 0xc(%rsp), %eax
addl $-0x72, %eax
subl $0x2, %eax
jb 0xb7da
jmp 0xb7cf
movl 0xc(%rsp), %eax
subl $0x76, %eax
jne 0xb7e4
jmp 0xb7da
movb $0x1, 0x37(%rsp)
jmp 0xb8b0
movb $0x0, 0x37(%rsp)
jmp 0xb8b0
movsbl 0x26(%rsp), %eax
movl %eax, 0x8(%rsp)
subl $0x62, %eax
je 0xb84b
jmp 0xb7fe
movl 0x8(%rsp), %eax
subl $0x64, %eax
je 0xb84b
jmp 0xb809
movl 0x8(%rsp), %eax
subl $0x68, %eax
je 0xb84b
jmp 0xb814
movl 0x8(%rsp), %eax
subl $0x6b, %eax
je 0xb84b
jmp 0xb81f
movl 0x8(%rsp), %eax
subl $0x6e, %eax
je 0xb84b
jmp 0xb82a
movl 0x8(%rsp), %eax
subl $0x74, %eax
je 0xb84b
jmp 0xb835
movl 0x8(%rsp), %eax
subl $0x77, %eax
je 0xb84b
jmp 0xb840
movl 0x8(%rsp), %eax
subl $0x79, %eax
jne 0xb852
jmp 0xb84b
movb $0x1, 0x37(%rsp)
jmp 0xb8b0
movb $0x0, 0x37(%rsp)
jmp 0xb8b0
movb $0x0, 0x37(%rsp)
jmp 0xb8b0
movq 0xb771(%rip), %rdi      # 0x16fd8
leaq 0x5f7c(%rip), %rsi      # 0x117ea
callq 0x4320
movq %rax, %rdi
movsbl 0x27(%rsp), %esi
callq 0x43b0
movq %rax, %rdi
leaq 0x5f24(%rip), %rsi      # 0x117ae
callq 0x4320
movq %rax, %rdi
movsbl 0x26(%rsp), %esi
callq 0x43b0
movq %rax, %rdi
movq 0xb722(%rip), %rsi      # 0x16fc8
callq 0x4360
movb $0x0, 0x37(%rsp)
movb 0x37(%rsp), %al
andb $0x1, %al
addq $0x38, %rsp
retq
nopl (%rax,%rax)