// File: /workspace/github_cpp_makefile_star2_O2/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 $0x68, %rsp
movq %rsi, %rbx
movl %edi, %ebp
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %rax
andq $0x0, 0x10(%rax)
movaps %xmm0, (%rax)
pushq $0x2
popq %r13
leaq 0x48(%rsp), %r15
leaq 0x28(%rsp), %r12
cmpl %ebp, %r13d
jge 0x229df
movslq %r13d, %rax
movq (%rbx,%rax,8), %rsi
movq %r15, %rdi
movq %r12, %rdx
callq 0x77c0
movq %r15, %rdi
leaq 0x472c(%rip), %rsi      # 0x26ff3
callq 0x132f3
testb %al, %al
jne 0x228e3
movq %r15, %rdi
leaq 0x471c(%rip), %rsi      # 0x26ff6
callq 0x132f3
testb %al, %al
je 0x22908
xorl %r14d, %r14d
callq 0x227da
xorl %r12d, %r12d
movq %r15, %rdi
callq 0x5778
incl %r13d
testb %r12b, %r12b
leaq 0x28(%rsp), %r12
jne 0x228a2
jmp 0x22a2c
movq %r15, %rdi
leaq 0x4761(%rip), %rsi      # 0x27073
callq 0x132f3
testb %al, %al
je 0x22951
incl %r13d
cmpl %ebp, %r13d
jge 0x22993
movslq %r13d, %rax
movq (%rbx,%rax,8), %rsi
movq %r12, %rdi
leaq 0xf(%rsp), %rdx
callq 0x77c0
movq %r12, %rdi
leaq 0x10(%rsp), %rsi
callq 0x7529
movq %r12, %rdi
callq 0x5778
movb $0x1, %r12b
jmp 0x228ee
movq 0x48(%rsp), %rax
cmpb $0x2d, (%rax)
jne 0x229ca
movq 0x1368e(%rip), %rdi     # 0x35ff0
callq 0x51c0
movq %rax, %rdi
leaq 0x4727(%rip), %rsi      # 0x27098
callq 0x53f0
movq %rax, %rdi
movq %r15, %rsi
callq 0x53a0
movq %rax, %rdi
callq 0x51c0
movq %rax, %rdi
callq 0x51c0
jmp 0x229be
movq 0x13656(%rip), %rdi     # 0x35ff0
callq 0x51c0
movq %rax, %rdi
leaq 0x46cd(%rip), %rsi      # 0x27076
callq 0x53f0
movq %rax, %rdi
callq 0x51c0
movq %rax, %rdi
callq 0x51c0
xorl %r12d, %r12d
pushq $0x1
popq %r14
jmp 0x228ee
movb $0x1, %r12b
leaq 0x10(%rsp), %rdi
movq %r15, %rsi
callq 0x77fc
jmp 0x228ee
movq 0x18(%rsp), %rax
cmpq 0x10(%rsp), %rax
je 0x22a00
leaq 0x10(%rsp), %rdi
callq 0x1771c
xorl %r14d, %r14d
testl %eax, %eax
setne %r14b
jmp 0x22a2c
movq 0x135e9(%rip), %rdi     # 0x35ff0
callq 0x51c0
leaq 0x4698(%rip), %rsi      # 0x270ab
movq %rax, %rdi
callq 0x53f0
movq %rax, %rdi
callq 0x51c0
callq 0x227da
pushq $0x1
popq %r14
leaq 0x10(%rsp), %rdi
callq 0x911e
movl %r14d, %eax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x5778
jmp 0x22a63
jmp 0x22a60
jmp 0x22a5b
movq %rax, %rbx
jmp 0x22a6d
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
callq 0x5778
leaq 0x10(%rsp), %rdi
callq 0x911e
movq %rbx, %rdi
callq 0x56c0