// File: /workspace/github_cpp_makefile_star2_O2/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, %rbx
movl %edi, %ebp
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
andq $0x0, 0x20(%rsp)
leaq 0x6eb7(%rip), %rsi      # 0x262c2
leaq 0x28(%rsp), %rdi
leaq 0x48(%rsp), %rdx
callq 0x77c0
pushq $0x2
popq %r12
leaq 0x48(%rsp), %r14
leaq 0x68(%rsp), %r15
cmpl %ebp, %r12d
jge 0x1f5ca
movslq %r12d, %rax
movq (%rbx,%rax,8), %rsi
movq %r14, %rdi
movq %r15, %rdx
callq 0x77c0
movq %r14, %rdi
leaq 0x7ba6(%rip), %rsi      # 0x26ff3
callq 0x132f3
testb %al, %al
jne 0x1f469
movq %r14, %rdi
leaq 0x7b96(%rip), %rsi      # 0x26ff6
callq 0x132f3
testb %al, %al
je 0x1f48e
xorl %r13d, %r13d
callq 0x1f332
xorl %r15d, %r15d
movq %r14, %rdi
callq 0x5778
incl %r12d
testb %r15b, %r15b
leaq 0x68(%rsp), %r15
jne 0x1f428
jmp 0x1f646
movq %r14, %rdi
leaq 0x8258(%rip), %rsi      # 0x276f0
callq 0x132f3
testb %al, %al
je 0x1f4bf
incl %r12d
cmpl %ebp, %r12d
jge 0x1f50f
movslq %r12d, %rax
movq (%rbx,%rax,8), %rsi
movb $0x1, %r15b
leaq 0x28(%rsp), %rdi
callq 0x5730
jmp 0x1f474
movq %r14, %rdi
leaq 0x7baa(%rip), %rsi      # 0x27073
callq 0x132f3
testb %al, %al
je 0x1f53c
incl %r12d
cmpl %ebp, %r12d
jge 0x1f57e
movslq %r12d, %rax
movq (%rbx,%rax,8), %rsi
movq %r15, %rdi
leaq 0xf(%rsp), %rdx
callq 0x77c0
movq %r15, %rdi
leaq 0x10(%rsp), %rsi
callq 0x7529
movq %r15, %rdi
callq 0x5778
movb $0x1, %r15b
jmp 0x1f474
movq 0x16ada(%rip), %rdi     # 0x35ff0
callq 0x51c0
movq %rax, %rdi
leaq 0x81ce(%rip), %rsi      # 0x276f3
callq 0x53f0
movq %rax, %rdi
callq 0x51c0
movq %rax, %rdi
callq 0x51c0
jmp 0x1f5a9
movq 0x48(%rsp), %rax
cmpb $0x2d, (%rax)
jne 0x1f5b5
movq 0x16aa3(%rip), %rdi     # 0x35ff0
callq 0x51c0
movq %rax, %rdi
leaq 0x7b3c(%rip), %rsi      # 0x27098
callq 0x53f0
movq %rax, %rdi
movq %r14, %rsi
callq 0x53a0
movq %rax, %rdi
callq 0x51c0
movq %rax, %rdi
callq 0x51c0
jmp 0x1f5a9
movq 0x16a6b(%rip), %rdi     # 0x35ff0
callq 0x51c0
movq %rax, %rdi
leaq 0x7ae2(%rip), %rsi      # 0x27076
callq 0x53f0
movq %rax, %rdi
callq 0x51c0
movq %rax, %rdi
callq 0x51c0
xorl %r15d, %r15d
pushq $0x1
popq %r13
jmp 0x1f474
movb $0x1, %r15b
leaq 0x10(%rsp), %rdi
movq %r14, %rsi
callq 0x77fc
jmp 0x1f474
movq 0x18(%rsp), %rax
cmpq 0x10(%rsp), %rax
je 0x1f600
leaq 0x6ce5(%rip), %rsi      # 0x262c2
leaq 0x28(%rsp), %rdi
callq 0x132f3
testb %al, %al
je 0x1f62e
movq 0x169fe(%rip), %rdi     # 0x35ff0
callq 0x51c0
leaq 0x8117(%rip), %rsi      # 0x27715
jmp 0x1f613
movq 0x169e9(%rip), %rdi     # 0x35ff0
callq 0x51c0
leaq 0x7a98(%rip), %rsi      # 0x270ab
movq %rax, %rdi
callq 0x53f0
movq %rax, %rdi
callq 0x51c0
callq 0x1f332
pushq $0x1
popq %r13
jmp 0x1f646
leaq 0x28(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0xcdc8
xorl %r13d, %r13d
testl %eax, %eax
setne %r13b
leaq 0x28(%rsp), %rdi
callq 0x5778
leaq 0x10(%rsp), %rdi
callq 0x911e
movl %r13d, %eax
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x68(%rsp), %rdi
callq 0x5778
jmp 0x1f68f
jmp 0x1f68c
movq %rax, %rbx
jmp 0x1f6a3
jmp 0x1f687
movq %rax, %rbx
jmp 0x1f699
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
callq 0x5778
leaq 0x28(%rsp), %rdi
callq 0x5778
leaq 0x10(%rsp), %rdi
callq 0x911e
movq %rbx, %rdi
callq 0x56c0