// File: /workspace/github_cpp_makefile_star2_O3/simonrharris[P]SKA/src/ska.cpp
// Function: compareSubcommand(int, char**)
int compareSubcommand(int argc, char *argv[]){

	std::vector < std::string > args;
	std::string queryfile="";

	for (int i=2; i<argc; ++i){

		std::string arg=(argv[i]);

		if (arg=="-h" || arg=="--help"){
			compareHelp();
			return 0;
		}
		else if (arg == "-q"){
			i++;
			if (i<argc){
				queryfile = argv[i];
			}
			else {
				std::cerr << std::endl << "Expecting file name after -q flag" << std::endl << std::endl;
				return 1;
			}
		}
		else if (arg == "-f"){
			i++;
			if (i<argc){
				fileToVector(argv[i], args);
			}
			else {
				std::cerr << std::endl << "Expecting file name after -f flag" << std::endl << std::endl;
				return 1;
			}
		}
		else if (arg[0]=='-'){
			std::cerr << std::endl << "Unrecognised flag " << arg << std::endl << std::endl;
				return 1;
		}
		else {
			args.push_back(arg);
		}
	}

	if (args.size()<1){
		std::cerr << std::endl << "Too few arguments" << std::endl;
		compareHelp();
		return 1;
	}

	if (queryfile==""){
		std::cerr << std::endl << "Query kmer file is required" << std::endl;
		compareHelp();
		return 1;
	}

	if (compareKmerFiles(queryfile, args)){return 1;}

	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %rsi, %r12
movl %edi, %ebp
xorps %xmm0, %xmm0
movaps %xmm0, 0x50(%rsp)
movq $0x0, 0x60(%rsp)
leaq 0x18(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0xb5ab(%rip), %rdx      # 0x342a2
leaq 0x8(%rsp), %rdi
movq %rdx, %rsi
callq 0x85fc
cmpl $0x3, %ebp
jl 0x29088
movl $0x2, %ebx
leaq 0x40(%rsp), %r14
leaq 0x30(%rsp), %r15
movl %ebp, 0x2c(%rsp)
movslq %ebx, %rax
movq (%r12,%rax,8), %rsi
movq %r15, %rdi
leaq 0x68(%rsp), %rdx
callq 0x182e0
movq %r15, %rdi
leaq 0xc2e1(%rip), %rsi      # 0x3501f
callq 0x50f0
testl %eax, %eax
je 0x28e52
movq %r15, %rdi
leaq 0xc2cd(%rip), %rsi      # 0x35022
callq 0x50f0
testl %eax, %eax
je 0x28e52
movq %r15, %rdi
leaq 0xc9b0(%rip), %rsi      # 0x3571c
callq 0x50f0
testl %eax, %eax
je 0x28e61
movq %r15, %rdi
leaq 0xc31c(%rip), %rsi      # 0x3509f
callq 0x50f0
testl %eax, %eax
je 0x28ea7
movq 0x30(%rsp), %rax
cmpb $0x2d, (%rax)
jne 0x28efb
movq 0x1824b(%rip), %rcx     # 0x40ff0
movq (%rcx), %rax
movq -0x18(%rax), %rdi
addq %rcx, %rdi
movl $0xa, %esi
callq 0x53a0
movsbl %al, %esi
movq 0x1822d(%rip), %rdi     # 0x40ff0
callq 0x5030
movq %rax, %rdi
callq 0x5250
movq %rax, %r13
movl $0x12, %edx
movq %rax, %rdi
leaq 0xc2e2(%rip), %rsi      # 0x350c4
callq 0x5420
movq 0x30(%rsp), %rsi
movq 0x38(%rsp), %rdx
movq %r13, %rdi
callq 0x5420
movq %rax, %r13
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r13, %rdi
movl $0xa, %esi
callq 0x53a0
movsbl %al, %esi
movq %r13, %rdi
callq 0x5030
movq %rax, %rdi
callq 0x5250
movq %rax, %r13
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r13, %rdi
movl $0xa, %esi
callq 0x53a0
movsbl %al, %esi
movq %r13, %rdi
callq 0x5030
movq %rax, %rdi
callq 0x5250
jmp 0x2904d
xorl %r13d, %r13d
callq 0x28acb
xorl %ebp, %ebp
jmp 0x29055
incl %ebx
cmpl %ebp, %ebx
jge 0x28f12
movslq %ebx, %rax
movq %r12, %r15
movq (%r12,%rax,8), %r12
movq 0x10(%rsp), %r14
movq %r12, %rdi
callq 0x5180
movb $0x1, %bpl
leaq 0x8(%rsp), %rdi
xorl %esi, %esi
movq %r14, %rdx
leaq 0x40(%rsp), %r14
movq %r12, %rcx
movq %r15, %r12
movq %rax, %r8
callq 0x55e0
jmp 0x29055
incl %ebx
cmpl %ebp, %ebx
jge 0x28fb2
movslq %ebx, %rax
movq (%r12,%rax,8), %rsi
leaq 0x68(%rsp), %r15
movq %r15, %rdi
leaq 0x7(%rsp), %rdx
callq 0x182e0
movq %r15, %rdi
leaq 0x50(%rsp), %rsi
callq 0x8148
movq 0x68(%rsp), %rdi
leaq 0x78(%rsp), %rax
cmpq %rax, %rdi
je 0x28ef3
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x53c0
movb $0x1, %bpl
jmp 0x29055
movb $0x1, %bpl
leaq 0x50(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x8528
jmp 0x29055
movq 0x180d7(%rip), %rcx     # 0x40ff0
movq (%rcx), %rax
movq -0x18(%rax), %rdi
addq %rcx, %rdi
movl $0xa, %esi
callq 0x53a0
movsbl %al, %esi
movq 0x180b9(%rip), %rdi     # 0x40ff0
callq 0x5030
movq %rax, %rdi
callq 0x5250
movq %rax, %r13
movl $0x21, %edx
movq %rax, %rdi
leaq 0xc7c9(%rip), %rsi      # 0x3571f
callq 0x5420
movq (%r13), %rax
movq -0x18(%rax), %rdi
addq %r13, %rdi
movl $0xa, %esi
callq 0x53a0
movsbl %al, %esi
movq %r13, %rdi
callq 0x5030
movq %rax, %rdi
callq 0x5250
movq %rax, %r13
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r13, %rdi
movl $0xa, %esi
callq 0x53a0
movsbl %al, %esi
movq %r13, %rdi
callq 0x5030
movq %rax, %rdi
callq 0x5250
jmp 0x2904d
movq 0x18037(%rip), %rcx     # 0x40ff0
movq (%rcx), %rax
movq -0x18(%rax), %rdi
addq %rcx, %rdi
movl $0xa, %esi
callq 0x53a0
movsbl %al, %esi
movq 0x18019(%rip), %rdi     # 0x40ff0
callq 0x5030
movq %rax, %rdi
callq 0x5250
movq %rax, %r13
movl $0x21, %edx
movq %rax, %rdi
leaq 0xc0ac(%rip), %rsi      # 0x350a2
callq 0x5420
movq (%r13), %rax
movq -0x18(%rax), %rdi
addq %r13, %rdi
movl $0xa, %esi
callq 0x53a0
movsbl %al, %esi
movq %r13, %rdi
callq 0x5030
movq %rax, %rdi
callq 0x5250
movq %rax, %r13
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r13, %rdi
movl $0xa, %esi
callq 0x53a0
movsbl %al, %esi
movq %r13, %rdi
callq 0x5030
movq %rax, %rdi
callq 0x5250
movl $0x1, %r13d
xorl %ebp, %ebp
movq 0x30(%rsp), %rdi
cmpq %r14, %rdi
je 0x2906c
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x53c0
testb %bpl, %bpl
je 0x2919a
incl %ebx
movl 0x2c(%rsp), %ebp
cmpl %ebp, %ebx
leaq 0x30(%rsp), %r15
jl 0x28d20
movq 0x58(%rsp), %rax
cmpq 0x50(%rsp), %rax
je 0x290c6
leaq 0xb207(%rip), %rsi      # 0x342a2
leaq 0x8(%rsp), %rdi
callq 0x50f0
testl %eax, %eax
je 0x29122
leaq 0x8(%rsp), %rdi
leaq 0x50(%rsp), %rsi
callq 0xee14
xorl %r13d, %r13d
testl %eax, %eax
setne %r13b
jmp 0x2919a
movq 0x17f23(%rip), %rdi     # 0x40ff0
movq (%rdi), %rax
addq -0x18(%rax), %rdi
movl $0xa, %esi
callq 0x53a0
movsbl %al, %esi
movq 0x17f08(%rip), %rdi     # 0x40ff0
callq 0x5030
movq %rax, %rdi
callq 0x5250
movq %rax, %rbx
leaq 0xbfd8(%rip), %rsi      # 0x350d7
movl $0x11, %edx
movq %rax, %rdi
callq 0x5420
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x53a0
jmp 0x2917c
movq 0x17ec7(%rip), %rdi     # 0x40ff0
movq (%rdi), %rax
addq -0x18(%rax), %rdi
movl $0xa, %esi
callq 0x53a0
movsbl %al, %esi
movq 0x17eac(%rip), %rdi     # 0x40ff0
callq 0x5030
movq %rax, %rdi
callq 0x5250
movq %rax, %rbx
leaq 0xc5e6(%rip), %rsi      # 0x35741
movl $0x1b, %edx
movq %rax, %rdi
callq 0x5420
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x53a0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x5030
movq %rax, %rdi
callq 0x5250
movl $0x1, %r13d
callq 0x28acb
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x291b6
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x53c0
leaq 0x50(%rsp), %rdi
callq 0xab8e
movl %r13d, %eax
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x18(%rsp), %r15
movq %rax, %rbx
movq 0x68(%rsp), %rdi
leaq 0x78(%rsp), %rax
cmpq %rax, %rdi
je 0x29216
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x53c0
jmp 0x29216
jmp 0x2920e
movq %rax, %rbx
jmp 0x29249
jmp 0x29204
leaq 0x18(%rsp), %r15
movq %rax, %rbx
jmp 0x29232
leaq 0x18(%rsp), %r15
movq %rax, %rbx
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0x29232
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x53c0
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x29249
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x53c0
leaq 0x50(%rsp), %rdi
callq 0xab8e
movq %rbx, %rdi
callq 0x56a0