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

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

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

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

		if (arg=="-h" || arg=="--help"){
			typeHelp();
			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 == "-p"){
			i++;
			if (i<argc){
				profilefile = argv[i];
			}
			else {
				std::cerr << std::endl << "Expecting file name after -p 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;
		typeHelp();
		return 1;
	}

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

	if (typeKmerFile(queryfile, profilefile, args)){return 1;}

	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xb8, %rsp
movq %rsi, %rbx
movl %edi, 0x8(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0x30(%rsp)
movq $0x0, 0x40(%rsp)
leaq 0x20(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x458e(%rip), %rdx      # 0x342b2
leaq 0x10(%rsp), %rdi
movq %rdx, %rsi
callq 0x862a
leaq 0x88(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x456d(%rip), %rdx      # 0x342b2
leaq 0x78(%rsp), %rdi
movq %rdx, %rsi
callq 0x862a
cmpl $0x3, 0x8(%rsp)
setge %r14b
jl 0x301fb
movl $0x2, %ebp
leaq 0x58(%rsp), %r15
movq %rbx, 0x50(%rsp)
movslq %ebp, %rax
movq (%rbx,%rax,8), %rsi
movq %r15, %rdi
leaq 0x98(%rsp), %rdx
callq 0x184a2
movq %r15, %rdi
leaq 0x529e(%rip), %rsi      # 0x3502f
callq 0x50f0
testl %eax, %eax
movb %r14b, 0x7(%rsp)
je 0x2fec1
movq %r15, %rdi
leaq 0x5285(%rip), %rsi      # 0x35032
callq 0x50f0
testl %eax, %eax
je 0x2fec1
movq %r15, %rdi
leaq 0x5968(%rip), %rsi      # 0x3572c
callq 0x50f0
testl %eax, %eax
je 0x2fed1
movq %r15, %rdi
leaq 0x52d4(%rip), %rsi      # 0x350af
callq 0x50f0
testl %eax, %eax
je 0x2ff1b
movq %r15, %rdi
leaq 0x5569(%rip), %rsi      # 0x3535b
callq 0x50f0
testl %eax, %eax
je 0x3001d
movq 0x58(%rsp), %rax
cmpb $0x2d, (%rax)
jne 0x30068
movq 0x111dc(%rip), %rcx     # 0x40ff0
movq (%rcx), %rax
movq -0x18(%rax), %rdi
addq %rcx, %rdi
movl $0xa, %esi
callq 0x53a0
movsbl %al, %esi
movq 0x111be(%rip), %rdi     # 0x40ff0
callq 0x5030
movq %rax, %rdi
callq 0x5250
movq %rax, %r13
movl $0x12, %edx
movq %rax, %rdi
leaq 0x5283(%rip), %rsi      # 0x350d4
callq 0x5420
movq 0x58(%rsp), %rsi
movq 0x60(%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 0x301ba
xorl %r13d, %r13d
callq 0x2fabb
xorl %r14d, %r14d
jmp 0x301c3
incl %ebp
cmpl 0x8(%rsp), %ebp
jge 0x2ff7d
movslq %ebp, %rax
movq (%rbx,%rax,8), %r12
movq 0x18(%rsp), %r15
movq %r12, %rdi
callq 0x5180
movb $0x1, %r14b
leaq 0x10(%rsp), %rdi
xorl %esi, %esi
movq %r15, %rdx
movq 0x50(%rsp), %rbx
movq %r12, %rcx
leaq 0x88(%rsp), %r12
movq %rax, %r8
callq 0x55e0
jmp 0x301c3
incl %ebp
cmpl 0x8(%rsp), %ebp
jge 0x3007f
movslq %ebp, %rax
movq (%rbx,%rax,8), %rsi
leaq 0x98(%rsp), %r15
movq %r15, %rdi
leaq 0xf(%rsp), %rdx
callq 0x184a2
movq %r15, %rdi
leaq 0x30(%rsp), %rsi
callq 0x817c
movq 0x98(%rsp), %rdi
leaq 0xa8(%rsp), %rax
cmpq %rax, %rdi
je 0x2ff75
movq 0xa8(%rsp), %rsi
incq %rsi
callq 0x53c0
movb $0x1, %r14b
jmp 0x301c3
movq 0x1106c(%rip), %rcx     # 0x40ff0
movq (%rcx), %rax
movq -0x18(%rax), %rdi
addq %rcx, %rdi
movl $0xa, %esi
callq 0x53a0
movsbl %al, %esi
movq 0x1104e(%rip), %rdi     # 0x40ff0
callq 0x5030
movq %rax, %rdi
callq 0x5250
movq %rax, %r13
movl $0x21, %edx
movq %rax, %rdi
leaq 0x576e(%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 0x301ba
incl %ebp
cmpl 0x8(%rsp), %ebp
jge 0x3011f
movslq %ebp, %rax
movq (%rbx,%rax,8), %r15
movq %r12, %rbx
movq 0x80(%rsp), %r12
movq %r15, %rdi
callq 0x5180
movb $0x1, %r14b
leaq 0x78(%rsp), %rdi
xorl %esi, %esi
movq %r12, %rdx
movq %rbx, %r12
movq 0x50(%rsp), %rbx
movq %r15, %rcx
movq %rax, %r8
callq 0x55e0
jmp 0x301c3
movb $0x1, %r14b
leaq 0x30(%rsp), %rdi
leaq 0x58(%rsp), %rsi
callq 0x855c
jmp 0x301c3
movq 0x10f6a(%rip), %rcx     # 0x40ff0
movq (%rcx), %rax
movq -0x18(%rax), %rdi
addq %rcx, %rdi
movl $0xa, %esi
callq 0x53a0
movsbl %al, %esi
movq 0x10f4c(%rip), %rdi     # 0x40ff0
callq 0x5030
movq %rax, %rdi
callq 0x5250
movq %rax, %r13
movl $0x21, %edx
movq %rax, %rdi
leaq 0x4fef(%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
jmp 0x301ba
movq 0x10eca(%rip), %rcx     # 0x40ff0
movq (%rcx), %rax
movq -0x18(%rax), %rdi
addq %rcx, %rdi
movl $0xa, %esi
callq 0x53a0
movsbl %al, %esi
movq 0x10eac(%rip), %rdi     # 0x40ff0
callq 0x5030
movq %rax, %rdi
callq 0x5250
movq %rax, %r13
movl $0x21, %edx
movq %rax, %rdi
leaq 0x68e3(%rip), %rsi      # 0x36a46
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 0x58(%rsp), %rdi
leaq 0x68(%rsp), %rax
cmpq %rax, %rdi
je 0x301df
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x53c0
testb %r14b, %r14b
je 0x301fd
incl %ebp
cmpl 0x8(%rsp), %ebp
setl %r14b
leaq 0x58(%rsp), %r15
jl 0x2fd70
jmp 0x30202
jmp 0x30202
movb 0x7(%rsp), %r14b
testb $0x1, %r14b
jne 0x30323
movq 0x38(%rsp), %rax
cmpq 0x30(%rsp), %rax
je 0x3024f
leaq 0x4093(%rip), %rsi      # 0x342b2
leaq 0x10(%rsp), %rdi
callq 0x50f0
testl %eax, %eax
je 0x302ab
leaq 0x10(%rsp), %rdi
leaq 0x78(%rsp), %rsi
leaq 0x30(%rsp), %rdx
callq 0x1f1fa
xorl %r13d, %r13d
testl %eax, %eax
setne %r13b
jmp 0x30323
movq 0x10d9a(%rip), %rdi     # 0x40ff0
movq (%rdi), %rax
addq -0x18(%rax), %rdi
movl $0xa, %esi
callq 0x53a0
movsbl %al, %esi
movq 0x10d7f(%rip), %rdi     # 0x40ff0
callq 0x5030
movq %rax, %rdi
callq 0x5250
movq %rax, %rbx
leaq 0x4e5f(%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 0x30305
movq 0x10d3e(%rip), %rdi     # 0x40ff0
movq (%rdi), %rax
addq -0x18(%rax), %rdi
movl $0xa, %esi
callq 0x53a0
movsbl %al, %esi
movq 0x10d23(%rip), %rdi     # 0x40ff0
callq 0x5030
movq %rax, %rdi
callq 0x5250
movq %rax, %rbx
leaq 0x546d(%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 0x2fabb
movq 0x78(%rsp), %rdi
cmpq %r12, %rdi
je 0x3033d
movq 0x88(%rsp), %rsi
incq %rsi
callq 0x53c0
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x30359
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x53c0
leaq 0x30(%rsp), %rdi
callq 0xabee
movl %r13d, %eax
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x20(%rsp), %r15
movq %rax, %rbx
movq 0x98(%rsp), %rdi
leaq 0xa8(%rsp), %rax
cmpq %rax, %rdi
je 0x303c7
movq 0xa8(%rsp), %rsi
incq %rsi
callq 0x53c0
jmp 0x303c7
jmp 0x303bf
movq %rax, %rbx
jmp 0x303fd
movq %rax, %rbx
jmp 0x30414
jmp 0x303b5
leaq 0x20(%rsp), %r15
movq %rax, %rbx
jmp 0x303e3
leaq 0x20(%rsp), %r15
movq %rax, %rbx
movq 0x58(%rsp), %rdi
leaq 0x68(%rsp), %rax
cmpq %rax, %rdi
je 0x303e3
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x53c0
movq 0x78(%rsp), %rdi
cmpq %r12, %rdi
je 0x303fd
movq 0x88(%rsp), %rsi
incq %rsi
callq 0x53c0
movq 0x10(%rsp), %rdi
cmpq %r15, %rdi
je 0x30414
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x53c0
leaq 0x30(%rsp), %rdi
callq 0xabee
movq %rbx, %rdi
callq 0x56a0