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

	std::vector < std::string > args;

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

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

		if (arg=="-h" || arg=="--help"){
			summaryHelp();
			return 0;
		}
		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;
		summaryHelp();
		return 1;
	}

	if (summariseKmerFiles(args)){return 1;}

	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %rsi, 0x30(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
movq $0x0, 0x20(%rsp)
cmpl $0x3, %edi
setge %r12b
jl 0x2f9a1
movl %edi, %ebp
movl $0x2, %r15d
leaq 0x38(%rsp), %r14
leaq 0x58(%rsp), %rbx
movslq %r15d, %rax
movq 0x30(%rsp), %rcx
movq (%rcx,%rax,8), %rsi
movq %r14, %rdi
movq %rbx, %rdx
callq 0x184a2
movq %r14, %rdi
leaq 0x58d9(%rip), %rsi      # 0x3502f
callq 0x50f0
testl %eax, %eax
je 0x2f853
movq %r14, %rdi
leaq 0x58c5(%rip), %rsi      # 0x35032
callq 0x50f0
testl %eax, %eax
je 0x2f853
movq %r14, %rdi
leaq 0x592b(%rip), %rsi      # 0x350af
callq 0x50f0
testl %eax, %eax
je 0x2f862
movq 0x38(%rsp), %rax
cmpb $0x2d, (%rax)
jne 0x2f8b3
movq 0x1184a(%rip), %rcx     # 0x40ff0
movq (%rcx), %rax
movq -0x18(%rax), %rdi
addq %rcx, %rdi
movl $0xa, %esi
callq 0x53a0
movsbl %al, %esi
movq 0x1182c(%rip), %rdi     # 0x40ff0
callq 0x5030
movq %rax, %rdi
callq 0x5250
movq %rax, %r13
movl $0x12, %edx
movq %rax, %rdi
leaq 0x58f1(%rip), %rsi      # 0x350d4
callq 0x5420
movq 0x38(%rsp), %rsi
movq 0x40(%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 0x2f962
xorl %r13d, %r13d
callq 0x2f538
xorl %ebx, %ebx
jmp 0x2f96a
incl %r15d
cmpl %ebp, %r15d
jge 0x2f8c7
movslq %r15d, %rax
movq 0x30(%rsp), %rcx
movq (%rcx,%rax,8), %rsi
movq %rbx, %rdi
leaq 0xf(%rsp), %rdx
callq 0x184a2
movq %rbx, %rdi
leaq 0x10(%rsp), %rsi
callq 0x817c
movq 0x58(%rsp), %rdi
leaq 0x68(%rsp), %rax
cmpq %rax, %rdi
je 0x2f8ac
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x53c0
movb $0x1, %bl
jmp 0x2f96a
movb $0x1, %bl
leaq 0x10(%rsp), %rdi
movq %r14, %rsi
callq 0x855c
jmp 0x2f96a
movq 0x11722(%rip), %rcx     # 0x40ff0
movq (%rcx), %rax
movq -0x18(%rax), %rdi
addq %rcx, %rdi
movl $0xa, %esi
callq 0x53a0
movsbl %al, %esi
movq 0x11704(%rip), %rdi     # 0x40ff0
callq 0x5030
movq %rax, %rdi
callq 0x5250
movq %rax, %r13
movl $0x21, %edx
movq %rax, %rdi
leaq 0x57a7(%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 %ebx, %ebx
movq 0x38(%rsp), %rdi
leaq 0x48(%rsp), %rax
cmpq %rax, %rdi
je 0x2f986
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x53c0
testb %bl, %bl
je 0x2f9a1
incl %r15d
cmpl %ebp, %r15d
setl %r12b
leaq 0x58(%rsp), %rbx
jl 0x2f735
jmp 0x2f9a1
testb $0x1, %r12b
jne 0x2fa44
movq 0x18(%rsp), %rax
cmpq 0x10(%rsp), %rax
je 0x2f9cc
leaq 0x10(%rsp), %rdi
callq 0x1dccc
xorl %r13d, %r13d
testl %eax, %eax
setne %r13b
jmp 0x2fa44
movq 0x1161d(%rip), %rdi     # 0x40ff0
movq (%rdi), %rax
addq -0x18(%rax), %rdi
movl $0xa, %esi
callq 0x53a0
movsbl %al, %esi
movq 0x11602(%rip), %rdi     # 0x40ff0
callq 0x5030
movq %rax, %rdi
callq 0x5250
movq %rax, %rbx
leaq 0x56e2(%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
movsbl %al, %esi
movq %rbx, %rdi
callq 0x5030
movq %rax, %rdi
callq 0x5250
movl $0x1, %r13d
callq 0x2f538
leaq 0x10(%rsp), %rdi
callq 0xabee
movl %r13d, %eax
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x58(%rsp), %rdi
leaq 0x68(%rsp), %rax
cmpq %rax, %rdi
je 0x2fa8d
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x53c0
jmp 0x2fa8d
jmp 0x2fa8a
jmp 0x2fa85
movq %rax, %rbx
jmp 0x2faa9
movq %rax, %rbx
movq 0x38(%rsp), %rdi
leaq 0x48(%rsp), %rax
cmpq %rax, %rdi
je 0x2faa9
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x53c0
leaq 0x10(%rsp), %rdi
callq 0xabee
movq %rbx, %rdi
callq 0x56a0