// File: /workspace/github_cpp_makefile_star2_O1/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 $0x98, %rsp
movq %rsi, 0x10(%rsp)
movl %edi, %r14d
xorps %xmm0, %xmm0
movaps %xmm0, 0x60(%rsp)
movq $0x0, 0x70(%rsp)
leaq 0x30(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0xb161(%rip), %rdx      # 0x342b2
leaq 0x20(%rsp), %rdi
movq %rdx, %rsi
callq 0x862a
cmpl $0x3, %r14d
setge %bl
jl 0x294fd
movl $0x2, %ebp
leaq 0x50(%rsp), %r12
leaq 0x40(%rsp), %r15
movl %r14d, 0x1c(%rsp)
movslq %ebp, %rax
movq 0x10(%rsp), %rcx
movq (%rcx,%rax,8), %rsi
movq %r15, %rdi
leaq 0x78(%rsp), %rdx
callq 0x184a2
movq %r15, %rdi
leaq 0xbe8d(%rip), %rsi      # 0x3502f
callq 0x50f0
testl %eax, %eax
je 0x292b6
movq %r15, %rdi
leaq 0xbe79(%rip), %rsi      # 0x35032
callq 0x50f0
testl %eax, %eax
je 0x292b6
movq %r15, %rdi
leaq 0xc55c(%rip), %rsi      # 0x3572c
callq 0x50f0
testl %eax, %eax
je 0x292c6
movq %r15, %rdi
leaq 0xbec8(%rip), %rsi      # 0x350af
callq 0x50f0
testl %eax, %eax
je 0x2930c
movq 0x40(%rsp), %rax
cmpb $0x2d, (%rax)
jne 0x2936c
movq 0x17de7(%rip), %rcx     # 0x40ff0
movq (%rcx), %rax
movq -0x18(%rax), %rdi
addq %rcx, %rdi
movl $0xa, %esi
callq 0x53a0
movsbl %al, %esi
movq 0x17dc9(%rip), %rdi     # 0x40ff0
callq 0x5030
movq %rax, %rdi
callq 0x5250
movq %rax, %r13
movl $0x12, %edx
movq %rax, %rdi
leaq 0xbe8e(%rip), %rsi      # 0x350d4
callq 0x5420
movq 0x40(%rsp), %rsi
movq 0x48(%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 0x294be
xorl %r13d, %r13d
callq 0x28f22
xorl %r14d, %r14d
jmp 0x294c7
incl %ebp
cmpl %r14d, %ebp
jge 0x29383
movslq %ebp, %rax
movq 0x10(%rsp), %rcx
movq (%rcx,%rax,8), %r12
movq 0x28(%rsp), %r15
movq %r12, %rdi
callq 0x5180
movb $0x1, %r14b
leaq 0x20(%rsp), %rdi
xorl %esi, %esi
movq %r15, %rdx
movq %r12, %rcx
leaq 0x50(%rsp), %r12
movq %rax, %r8
callq 0x55e0
jmp 0x294c7
incl %ebp
cmpl %r14d, %ebp
jge 0x29423
movslq %ebp, %rax
movq 0x10(%rsp), %rcx
movq (%rcx,%rax,8), %rsi
leaq 0x78(%rsp), %r14
movq %r14, %rdi
leaq 0xf(%rsp), %rdx
callq 0x184a2
movq %r14, %rdi
leaq 0x60(%rsp), %rsi
callq 0x817c
movq 0x78(%rsp), %rdi
leaq 0x88(%rsp), %rax
cmpq %rax, %rdi
je 0x29364
movq 0x88(%rsp), %rsi
incq %rsi
callq 0x53c0
movb $0x1, %r14b
jmp 0x294c7
movb $0x1, %r14b
leaq 0x60(%rsp), %rdi
leaq 0x40(%rsp), %rsi
callq 0x855c
jmp 0x294c7
movq 0x17c66(%rip), %rcx     # 0x40ff0
movq (%rcx), %rax
movq -0x18(%rax), %rdi
addq %rcx, %rdi
movl $0xa, %esi
callq 0x53a0
movsbl %al, %esi
movq 0x17c48(%rip), %rdi     # 0x40ff0
callq 0x5030
movq %rax, %rdi
callq 0x5250
movq %rax, %r13
movl $0x21, %edx
movq %rax, %rdi
leaq 0xc368(%rip), %rsi      # 0x3572f
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 0x294be
movq 0x17bc6(%rip), %rcx     # 0x40ff0
movq (%rcx), %rax
movq -0x18(%rax), %rdi
addq %rcx, %rdi
movl $0xa, %esi
callq 0x53a0
movsbl %al, %esi
movq 0x17ba8(%rip), %rdi     # 0x40ff0
callq 0x5030
movq %rax, %rdi
callq 0x5250
movq %rax, %r13
movl $0x21, %edx
movq %rax, %rdi
leaq 0xbc4b(%rip), %rsi      # 0x350b2
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 %r14d, %r14d
movq 0x40(%rsp), %rdi
cmpq %r12, %rdi
je 0x294de
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x53c0
testb %r14b, %r14b
je 0x294fd
incl %ebp
movl 0x1c(%rsp), %r14d
cmpl %r14d, %ebp
setl %bl
leaq 0x40(%rsp), %r15
jl 0x2917f
jmp 0x294fd
testb $0x1, %bl
leaq 0x30(%rsp), %r15
jne 0x2961d
movq 0x68(%rsp), %rax
cmpq 0x60(%rsp), %rax
je 0x29549
leaq 0xad94(%rip), %rsi      # 0x342b2
leaq 0x20(%rsp), %rdi
callq 0x50f0
testl %eax, %eax
je 0x295a5
leaq 0x20(%rsp), %rdi
leaq 0x60(%rsp), %rsi
callq 0xefd0
xorl %r13d, %r13d
testl %eax, %eax
setne %r13b
jmp 0x2961d
movq 0x17aa0(%rip), %rdi     # 0x40ff0
movq (%rdi), %rax
addq -0x18(%rax), %rdi
movl $0xa, %esi
callq 0x53a0
movsbl %al, %esi
movq 0x17a85(%rip), %rdi     # 0x40ff0
callq 0x5030
movq %rax, %rdi
callq 0x5250
movq %rax, %rbx
leaq 0xbb65(%rip), %rsi      # 0x350e7
movl $0x11, %edx
movq %rax, %rdi
callq 0x5420
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x53a0
jmp 0x295ff
movq 0x17a44(%rip), %rdi     # 0x40ff0
movq (%rdi), %rax
addq -0x18(%rax), %rdi
movl $0xa, %esi
callq 0x53a0
movsbl %al, %esi
movq 0x17a29(%rip), %rdi     # 0x40ff0
callq 0x5030
movq %rax, %rdi
callq 0x5250
movq %rax, %rbx
leaq 0xc173(%rip), %rsi      # 0x35751
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 0x28f22
movq 0x20(%rsp), %rdi
cmpq %r15, %rdi
je 0x29634
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x53c0
leaq 0x60(%rsp), %rdi
callq 0xabee
movl %r13d, %eax
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x30(%rsp), %r15
movq %rax, %rbx
movq 0x78(%rsp), %rdi
leaq 0x88(%rsp), %rax
cmpq %rax, %rdi
je 0x2969a
movq 0x88(%rsp), %rsi
incq %rsi
callq 0x53c0
jmp 0x2969a
jmp 0x29692
movq %rax, %rbx
jmp 0x296cd
jmp 0x2968d
leaq 0x30(%rsp), %r15
movq %rax, %rbx
jmp 0x296b6
leaq 0x30(%rsp), %r15
movq %rax, %rbx
movq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rax
cmpq %rax, %rdi
je 0x296b6
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x53c0
movq 0x20(%rsp), %rdi
cmpq %r15, %rdi
je 0x296cd
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x53c0
leaq 0x60(%rsp), %rdi
callq 0xabee
movq %rbx, %rdi
callq 0x56a0