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

	std::string outfile="fastq";
	long int covcutoff=4;
	long int filecovcutoff=2;
	long int kmersize=15;
	long int minquality=20;
	bool printalleles=false;
	float minmaf=0.2;
	std::vector < std::string > args;

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

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

		if (arg=="-h" || arg=="--help"){
			fastqHelp();
			return 0;
		}
		else if (arg=="-a"){
			printalleles=true;
		}
		else if (arg == "-c"){
			i++;
			if (i<argc){
				try {
					covcutoff = getint(argv[i]);
				}
				catch (const std::invalid_argument& e) {
					std::cerr << std::endl << "Expecting positive integer after -c flag" << std::endl << std::endl;
					return 1;
				}
			}
			else {
				std::cerr << std::endl << "Expecting positive integer after -c flag" << std::endl << std::endl;
				return 1;
			}
			if (covcutoff < MinCov){
				std::cerr << std::endl << "Coverage cutoff must be a positive integer greater than or equal to " << MinCov << std::endl << std::endl;
				return 1;
			}
		}
		else if (arg == "-C"){
			i++;
			if (i<argc){
				try {
					filecovcutoff = getint(argv[i]);
				}
				catch (const std::invalid_argument& e) {
					std::cerr << std::endl << "Expecting positive integer after -C flag" << std::endl << std::endl;
					return 1;
				}
			}
			else {
				std::cerr << std::endl << "Expecting positive integer after -C flag" << std::endl << std::endl;
				return 1;
			}
			if (filecovcutoff < MinFileCov){
				std::cerr << std::endl << "File coverage cutoff must be a positive integer greater than or equal to " << MinFileCov << std::endl << std::endl;
				return 1;
			}
		}
		else if (arg == "-k"){
			i++;
			if (i<argc){
				try {
					kmersize = getint(argv[i]);
				}
				catch (const std::invalid_argument& e) {
					std::cerr << std::endl << "Expecting positive integer after -k flag" << std::endl << std::endl;
					return 1;
				}
			}
			else {
				std::cerr << std::endl << "Expecting positive integer after -k flag" << std::endl << std::endl;
				return 1;
			}
			if (kmersize < MinKmer || kmersize > MaxKmer || kmersize % 3 != 0){
				std::cerr << std::endl << "Kmer size must be a positive integer between " << MinKmer << " and " << MaxKmer << " and must be divisible by 3" << std::endl << std::endl;
				return 1;
			}
		}
		else if (arg == "-m"){
			i++;
			if (i<argc){
				try {
					minmaf = getfloat(argv[i]);
				}
				catch (const std::invalid_argument& e) {
					std::cerr << std::endl << "Expecting float between 0 and 1 after -m flag" << std::endl << std::endl;
					return 1;
				}
			}
			else {
				std::cerr << std::endl << "Expecting float between 0 and 1 after -m flag" << std::endl << std::endl;
				return 1;
			}
			if (minmaf < 0 || minmaf > 1){
				std::cerr << std::endl << "Minimum minor allele frequency must be between 0 and 1" << std::endl << std::endl;
				return 1;
			}
		}
		else if (arg == "-o"){
			i++;
			if (i<argc){
				outfile = std::string(argv[i]);
			}
			else {
				std::cerr << std::endl << "Expecting file name after -o flag" << std::endl << std::endl;
				return 1;
			}
		}
		else if (arg == "-q"){
			i++;
			if (i<argc){
				try {
					minquality = getint(argv[i]);
				}
				catch (const std::invalid_argument& e) {
					std::cerr << std::endl << "Expecting positive integer after -q flag" << std::endl << std::endl;
					return 1;
				}
			}
			else {
				std::cerr << std::endl << "Expecting positive integer after -q flag" << std::endl << std::endl;
				return 1;
			}
			if (minquality < MinQual || minquality > MaxQual){
				std::cerr << std::endl << "Minimum quality cutoff must be a positive integer between " << MinQual << " and " << MaxQual << 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;
		fastqHelp();
		return 1;
	}

	skaVersion();

	std::cout << "Creating split " << kmersize << "mers for ";
	if (args.size()>maxNamesToPrint){
		std::cout << args.size() << " files";
	}
	else {
		for (std::vector < std::string >::iterator it = args.begin(); it != args.end(); ++it){
			std::cout << *it << " ";
		}
	}
	std::cout << std::endl;
	std::cout << "Filters:" << std::endl;
	std::cout << "\tCoverage cutoff = " << covcutoff << std::endl;
	std::cout << "\tPer file coverage cutoff = " << filecovcutoff << std::endl;
	std::cout << "\tMinimum minor allele frequency = " << minmaf << std::endl;
	std::cout << "\tMinimum base quality = " << minquality << std::endl;
	std::cout << "Output will be written to " << outfile << ".skf" << std::endl;
	if (printalleles){
		std::cout << "Allele frequencies will be written to " << outfile << "_alleles.tsv" << std::endl;
	}

	std::cout << std::endl;

	if (fastqToKmers(args, outfile, kmersize, minquality, filecovcutoff, covcutoff, minmaf, printalleles)){return 1;}

	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xc8, %rsp
movq %rsi, 0x10(%rsp)
movl %edi, %ebx
leaq 0x70(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0xa8c0(%rip), %rsi      # 0x3602f
leaq 0xa8be(%rip), %rdx      # 0x36034
leaq 0x60(%rsp), %rdi
callq 0x862a
movl $0x3e4ccccd, 0x1c(%rsp) # imm = 0x3E4CCCCD
xorps %xmm0, %xmm0
movaps %xmm0, 0x40(%rsp)
movq $0x0, 0x50(%rsp)
cmpl $0x3, %ebx
setge %r12b
jl 0x2c3b6
movl %ebx, 0x8(%rsp)
movl $0xf, %eax
movq %rax, 0x28(%rsp)
movl $0x14, %eax
movq %rax, 0x20(%rsp)
movl $0x2, %r13d
movl $0x2, %eax
movq %rax, 0x30(%rsp)
movl $0x4, %eax
movq %rax, 0x38(%rsp)
movl $0x0, 0xc(%rsp)
leaq 0x80(%rsp), %rbp
leaq 0xa8(%rsp), %rbx
movslq %r13d, %rax
movq 0x10(%rsp), %rcx
movq (%rcx,%rax,8), %rsi
movq %rbp, %rdi
movq %rbx, %rdx
callq 0x184a2
movq %rbp, %rdi
leaq 0x981e(%rip), %rsi      # 0x3502f
callq 0x50f0
testl %eax, %eax
je 0x2b93d
movq %rbp, %rdi
leaq 0x980a(%rip), %rsi      # 0x35032
callq 0x50f0
testl %eax, %eax
je 0x2b93d
movq %rbp, %rdi
leaq 0xa7f6(%rip), %rsi      # 0x36035
callq 0x50f0
movq %rbp, %r15
movb $0x1, %bpl
testl %eax, %eax
je 0x2b994
movq %r15, %rdi
leaq 0xa163(%rip), %rsi      # 0x359bf
callq 0x50f0
testl %eax, %eax
je 0x2b99c
movq %r15, %rdi
leaq 0xa833(%rip), %rsi      # 0x360a6
callq 0x50f0
testl %eax, %eax
je 0x2ba8b
movq %r15, %rdi
leaq 0x97af(%rip), %rsi      # 0x35039
callq 0x50f0
testl %eax, %eax
je 0x2bc19
movq %r15, %rdi
leaq 0xa87b(%rip), %rsi      # 0x3611c
callq 0x50f0
testl %eax, %eax
je 0x2be16
movq %r15, %rdi
leaq 0x9a81(%rip), %rsi      # 0x35339
callq 0x50f0
testl %eax, %eax
je 0x2bf7b
movq %r15, %rdi
leaq 0x9e5d(%rip), %rsi      # 0x3572c
callq 0x50f0
testl %eax, %eax
je 0x2c07f
movq 0x80(%rsp), %rax
cmpb $0x2d, (%rax)
jne 0x2c131
movq 0x156fc(%rip), %rdi     # 0x40ff0
callq 0x5190
movq %rax, %r14
movl $0x12, %edx
movq %rax, %rdi
leaq 0x97c9(%rip), %rsi      # 0x350d4
callq 0x5420
movq 0x80(%rsp), %rsi
movq 0x88(%rsp), %rdx
movq %r14, %rdi
callq 0x5420
movq %rax, %rdi
callq 0x5190
movq %rax, %rdi
callq 0x5190
jmp 0x2c217
xorl %ebp, %ebp
callq 0x2b42b
xorl %r14d, %r14d
movq 0x80(%rsp), %rdi
leaq 0x90(%rsp), %rax
cmpq %rax, %rdi
je 0x2b96c
movq 0x90(%rsp), %rsi
incq %rsi
callq 0x53c0
testb %bpl, %bpl
leaq 0x80(%rsp), %rbp
je 0x2c3e8
incl %r13d
cmpl 0x8(%rsp), %r13d
setl %r12b
jl 0x2b7f0
jmp 0x2c3e8
movb $0x1, %al
movl %eax, 0xc(%rsp)
jmp 0x2b947
incl %r13d
cmpl 0x8(%rsp), %r13d
jge 0x2bb7a
movslq %r13d, %rax
movq 0x10(%rsp), %rcx
movq (%rcx,%rax,8), %rdi
callq 0x260f0
movq %rax, %r15
movslq 0x15b27(%rip), %rax     # 0x414ec
cmpq %rax, %r15
jge 0x2ba81
movq 0x1561b(%rip), %rcx     # 0x40ff0
movq (%rcx), %rax
movq -0x18(%rax), %rdi
addq %rcx, %rdi
movl $0xa, %esi
callq 0x53a0
movsbl %al, %esi
movq 0x155fd(%rip), %rdi     # 0x40ff0
callq 0x5030
movq %rax, %rdi
callq 0x5250
movq %rax, %r14
movl $0x44, %edx
movq %rax, %rdi
leaq 0xa64f(%rip), %rsi      # 0x36061
callq 0x5420
movl 0x15acf(%rip), %esi     # 0x414ec
movq %r14, %rdi
callq 0x5690
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x53a0
movsbl %al, %esi
movq %r14, %rdi
callq 0x5030
movq %rax, %rdi
callq 0x5250
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x53a0
movsbl %al, %esi
movq %r14, %rdi
callq 0x5030
movq %rax, %rdi
callq 0x5250
movl $0x1, %r14d
xorl %ebp, %ebp
movq %r15, 0x38(%rsp)
jmp 0x2b947
incl %r13d
cmpl 0x8(%rsp), %r13d
jge 0x2bd77
movslq %r13d, %rax
movq 0x10(%rsp), %rcx
movq (%rcx,%rax,8), %rdi
callq 0x260f0
movq %rax, %r15
movslq 0x15ad4(%rip), %rax     # 0x41588
cmpq %rax, %r15
jge 0x2bb70
movq 0x1552c(%rip), %rcx     # 0x40ff0
movq (%rcx), %rax
movq -0x18(%rax), %rdi
addq %rcx, %rdi
movl $0xa, %esi
callq 0x53a0
movsbl %al, %esi
movq 0x1550e(%rip), %rdi     # 0x40ff0
callq 0x5030
movq %rax, %rdi
callq 0x5250
movq %rax, %r14
movl $0x49, %edx
movq %rax, %rdi
leaq 0xa5d1(%rip), %rsi      # 0x360d2
callq 0x5420
movl 0x15a7c(%rip), %esi     # 0x41588
movq %r14, %rdi
callq 0x5690
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x53a0
movsbl %al, %esi
movq %r14, %rdi
callq 0x5030
movq %rax, %rdi
callq 0x5250
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x53a0
movsbl %al, %esi
movq %r14, %rdi
callq 0x5030
movq %rax, %rdi
callq 0x5250
movl $0x1, %r14d
xorl %ebp, %ebp
movq %r15, 0x30(%rsp)
jmp 0x2b947
movq 0x1546f(%rip), %rcx     # 0x40ff0
movq (%rcx), %rax
movq -0x18(%rax), %rdi
addq %rcx, %rdi
movl $0xa, %esi
callq 0x53a0
movsbl %al, %esi
movq 0x15451(%rip), %rdi     # 0x40ff0
callq 0x5030
movq %rax, %rdi
callq 0x5250
movq %rax, %r14
movl $0x28, %edx
movq %rax, %rdi
leaq 0xa47a(%rip), %rsi      # 0x36038
callq 0x5420
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x53a0
movsbl %al, %esi
movq %r14, %rdi
callq 0x5030
movq %rax, %rdi
callq 0x5250
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x53a0
movsbl %al, %esi
movq %r14, %rdi
callq 0x5030
movq %rax, %rdi
callq 0x5250
jmp 0x2c217
incl %r13d
cmpl 0x8(%rsp), %r13d
jge 0x2bedc
movslq %r13d, %rax
movq 0x10(%rsp), %rcx
movq (%rcx,%rax,8), %rdi
callq 0x260f0
movq %rax, %r15
movabsq $-0x5555555555555555, %rcx # imm = 0xAAAAAAAAAAAAAAAB
imulq %rcx, %rax
movabsq $0x2aaaaaaaaaaaaaaa, %rcx # imm = 0x2AAAAAAAAAAAAAAA
addq %rcx, %rax
movabsq $0x5555555555555554, %rcx # imm = 0x5555555555555554
cmpq %rcx, %rax
ja 0x2bc81
movslq 0x15874(%rip), %rax     # 0x414e0
cmpq %rax, %r15
jl 0x2bc81
movslq 0x1586c(%rip), %rax     # 0x414e4
cmpq %rax, %r15
jle 0x2bd6d
movq 0x15368(%rip), %rcx     # 0x40ff0
movq (%rcx), %rax
movq -0x18(%rax), %rdi
addq %rcx, %rdi
movl $0xa, %esi
callq 0x53a0
movsbl %al, %esi
movq 0x1534a(%rip), %rdi     # 0x40ff0
callq 0x5030
movq %rax, %rdi
callq 0x5250
movq %rax, %r14
movl $0x2d, %edx
movq %rax, %rdi
leaq 0x93a0(%rip), %rsi      # 0x35065
callq 0x5420
movl 0x15810(%rip), %esi     # 0x414e0
movq %r14, %rdi
callq 0x5690
movq %rax, %r14
movl $0x5, %edx
movq %rax, %rdi
leaq 0x88d7(%rip), %rsi      # 0x345c1
callq 0x5420
movl 0x157ef(%rip), %esi     # 0x414e4
movq %r14, %rdi
callq 0x5690
movq %rax, %r14
movl $0x1b, %edx
movq %rax, %rdi
leaq 0x9384(%rip), %rsi      # 0x35093
callq 0x5420
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x53a0
movsbl %al, %esi
movq %r14, %rdi
callq 0x5030
movq %rax, %rdi
callq 0x5250
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x53a0
movsbl %al, %esi
movq %r14, %rdi
callq 0x5030
movq %rax, %rdi
callq 0x5250
movl $0x1, %r14d
xorl %ebp, %ebp
movq %r15, 0x28(%rsp)
jmp 0x2b947
movq 0x15272(%rip), %rcx     # 0x40ff0
movq (%rcx), %rax
movq -0x18(%rax), %rdi
addq %rcx, %rdi
movl $0xa, %esi
callq 0x53a0
movsbl %al, %esi
movq 0x15254(%rip), %rdi     # 0x40ff0
callq 0x5030
movq %rax, %rdi
callq 0x5250
movq %rax, %r14
movl $0x28, %edx
movq %rax, %rdi
leaq 0xa2ee(%rip), %rsi      # 0x360a9
callq 0x5420
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x53a0
movsbl %al, %esi
movq %r14, %rdi
callq 0x5030
movq %rax, %rdi
callq 0x5250
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x53a0
movsbl %al, %esi
movq %r14, %rdi
callq 0x5030
movq %rax, %rdi
callq 0x5250
jmp 0x2c217
incl %r13d
cmpl 0x8(%rsp), %r13d
jge 0x2bfe0
movslq %r13d, %rax
movq 0x10(%rsp), %rcx
movq (%rcx,%rax,8), %rdi
callq 0x26159
movss %xmm0, 0x1c(%rsp)
xorps %xmm1, %xmm1
ucomiss %xmm0, %xmm1
ja 0x2be50
ucomiss 0x71ba(%rip), %xmm0     # 0x33004
jbe 0x2b947
movq 0x15199(%rip), %rcx     # 0x40ff0
movq (%rcx), %rax
movq -0x18(%rax), %rdi
addq %rcx, %rdi
movl $0xa, %esi
callq 0x53a0
movsbl %al, %esi
movq 0x1517b(%rip), %rdi     # 0x40ff0
callq 0x5030
movq %rax, %rdi
callq 0x5250
movq %rax, %r14
movl $0x36, %edx
movq %rax, %rdi
leaq 0xa2b9(%rip), %rsi      # 0x3614d
callq 0x5420
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x53a0
movsbl %al, %esi
movq %r14, %rdi
callq 0x5030
movq %rax, %rdi
callq 0x5250
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x53a0
jmp 0x2c067
movq 0x1510d(%rip), %rcx     # 0x40ff0
movq (%rcx), %rax
movq -0x18(%rax), %rdi
addq %rcx, %rdi
movl $0xa, %esi
callq 0x53a0
movsbl %al, %esi
movq 0x150ef(%rip), %rdi     # 0x40ff0
callq 0x5030
movq %rax, %rdi
callq 0x5250
movq %rax, %r14
movl $0x28, %edx
movq %rax, %rdi
leaq 0x911c(%rip), %rsi      # 0x3503c
callq 0x5420
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x53a0
movsbl %al, %esi
movq %r14, %rdi
callq 0x5030
movq %rax, %rdi
callq 0x5250
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x53a0
movsbl %al, %esi
movq %r14, %rdi
callq 0x5030
movq %rax, %rdi
callq 0x5250
jmp 0x2c217
incl %r13d
cmpl 0x8(%rsp), %r13d
jge 0x2c148
movslq %r13d, %rax
movq 0x10(%rsp), %rcx
movq (%rcx,%rax,8), %rsi
movq %rbx, %r15
movq %rbx, %rdi
leaq 0x5c(%rsp), %rdx
callq 0x184a2
leaq 0x60(%rsp), %rdi
movq %r15, %rsi
callq 0x5470
movq 0xa8(%rsp), %rdi
leaq 0xb8(%rsp), %rax
cmpq %rax, %rdi
je 0x2b947
movq 0xb8(%rsp), %rsi
incq %rsi
callq 0x53c0
jmp 0x2b947
movq 0x15009(%rip), %rcx     # 0x40ff0
movq (%rcx), %rax
movq -0x18(%rax), %rdi
addq %rcx, %rdi
movl $0xa, %esi
callq 0x53a0
movsbl %al, %esi
movq 0x14feb(%rip), %rdi     # 0x40ff0
callq 0x5030
movq %rax, %rdi
callq 0x5250
movq %rax, %r14
movl $0x2d, %edx
movq %rax, %rdi
leaq 0xa0fb(%rip), %rsi      # 0x3611f
callq 0x5420
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x53a0
movsbl %al, %esi
movq %r14, %rdi
callq 0x5030
movq %rax, %rdi
callq 0x5250
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x53a0
movsbl %al, %esi
movq %r14, %rdi
callq 0x5030
movq %rax, %rdi
callq 0x5250
jmp 0x2c217
incl %r13d
cmpl 0x8(%rsp), %r13d
jge 0x2c1e4
movslq %r13d, %rax
movq 0x10(%rsp), %rcx
movq (%rcx,%rax,8), %rdi
callq 0x260f0
movq %rax, %r15
movslq 0x154dc(%rip), %rax     # 0x41584
cmpq %rax, %r15
jl 0x2c0b9
movslq 0x15434(%rip), %rax     # 0x414e8
cmpq %rax, %r15
jle 0x2c127
movq 0x14f30(%rip), %rdi     # 0x40ff0
callq 0x5190
movq %rax, %r14
movl $0x3a, %edx
movq %rax, %rdi
leaq 0xa0d6(%rip), %rsi      # 0x361ad
callq 0x5420
movl 0x154a2(%rip), %esi     # 0x41584
movq %r14, %rdi
callq 0x5690
movq %rax, %r14
movl $0x5, %edx
movq %rax, %rdi
leaq 0x84c5(%rip), %rsi      # 0x345c1
callq 0x5420
movl 0x153e1(%rip), %esi     # 0x414e8
movq %r14, %rdi
callq 0x5690
movq %rax, %rdi
callq 0x5190
movq %rax, %rdi
callq 0x5190
movl $0x1, %r14d
xorl %ebp, %ebp
movq %r15, 0x20(%rsp)
jmp 0x2b947
leaq 0x40(%rsp), %rdi
leaq 0x80(%rsp), %rsi
callq 0x855c
jmp 0x2b947
movq 0x14ea1(%rip), %rcx     # 0x40ff0
movq (%rcx), %rax
movq -0x18(%rax), %rdi
addq %rcx, %rdi
movl $0xa, %esi
callq 0x53a0
movsbl %al, %esi
movq 0x14e83(%rip), %rdi     # 0x40ff0
callq 0x5030
movq %rax, %rdi
callq 0x5250
movq %rax, %r14
movl $0x21, %edx
movq %rax, %rdi
leaq 0x93f8(%rip), %rsi      # 0x35584
callq 0x5420
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x53a0
movsbl %al, %esi
movq %r14, %rdi
callq 0x5030
movq %rax, %rdi
callq 0x5250
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x53a0
movsbl %al, %esi
movq %r14, %rdi
callq 0x5030
movq %rax, %rdi
callq 0x5250
jmp 0x2c217
movq 0x14e05(%rip), %rdi     # 0x40ff0
callq 0x5190
movq %rax, %r14
movl $0x28, %edx
movq %rax, %rdi
leaq 0x9f82(%rip), %rsi      # 0x36184
callq 0x5420
movq %r14, %rdi
callq 0x5190
movq %rax, %rdi
callq 0x5190
movl $0x1, %r14d
xorl %ebp, %ebp
jmp 0x2b947
movq %rax, %r14
cmpl $0x1, %edx
jne 0x2c911
movq %r14, %rdi
callq 0x5160
movq 0x14db1(%rip), %rdi     # 0x40ff0
callq 0x5190
movq %rax, %r14
movl $0x28, %edx
movq %rax, %rdi
leaq 0x9f2e(%rip), %rsi      # 0x36184
callq 0x5420
movq %r14, %rdi
callq 0x5190
movq %rax, %rdi
callq 0x5190
callq 0x5630
jmp 0x2c217
movq %rax, %r14
cmpl $0x1, %edx
jne 0x2c911
movq %r14, %rdi
callq 0x5160
movq 0x14d63(%rip), %rdi     # 0x40ff0
callq 0x5190
movq %rax, %r14
movl $0x2d, %edx
movq %rax, %rdi
leaq 0x9e7b(%rip), %rsi      # 0x3611f
callq 0x5420
movq %r14, %rdi
callq 0x5190
movq %rax, %rdi
callq 0x5190
callq 0x5630
jmp 0x2c217
movq %rax, %r14
cmpl $0x1, %edx
jne 0x2c911
movq %r14, %rdi
callq 0x5160
movq 0x14d12(%rip), %rdi     # 0x40ff0
callq 0x5190
movq %rax, %r14
movl $0x28, %edx
movq %rax, %rdi
leaq 0x8d47(%rip), %rsi      # 0x3503c
callq 0x5420
movq %r14, %rdi
callq 0x5190
movq %rax, %rdi
callq 0x5190
callq 0x5630
jmp 0x2c217
movq %rax, %r14
cmpl $0x1, %edx
jne 0x2c911
movq %r14, %rdi
callq 0x5160
movq 0x14cc1(%rip), %rdi     # 0x40ff0
callq 0x5190
movq %rax, %r14
movl $0x28, %edx
movq %rax, %rdi
leaq 0x9d63(%rip), %rsi      # 0x360a9
callq 0x5420
movq %r14, %rdi
callq 0x5190
movq %rax, %rdi
callq 0x5190
callq 0x5630
jmp 0x2c217
movq %rax, %r14
cmpl $0x1, %edx
jne 0x2c911
movq %r14, %rdi
callq 0x5160
movq 0x14c70(%rip), %rdi     # 0x40ff0
callq 0x5190
movq %rax, %r14
movl $0x28, %edx
movq %rax, %rdi
leaq 0x9ca1(%rip), %rsi      # 0x36038
callq 0x5420
movq %r14, %rdi
callq 0x5190
movq %rax, %rdi
callq 0x5190
callq 0x5630
jmp 0x2c217
movl $0x0, 0xc(%rsp)
movl $0x4, %eax
movq %rax, 0x38(%rsp)
movl $0x2, %eax
movq %rax, 0x30(%rsp)
movl $0x14, %eax
movq %rax, 0x20(%rsp)
movl $0xf, %eax
movq %rax, 0x28(%rsp)
jmp 0x2c3ed
leaq 0x70(%rsp), %r13
testb $0x1, %r12b
jne 0x2c882
movq 0x48(%rsp), %rax
cmpq 0x40(%rsp), %rax
je 0x2c492
callq 0x26746
movq 0x14bad(%rip), %rdi     # 0x40fc0
leaq 0x8cdf(%rip), %rsi      # 0x350f9
movl $0xf, %edx
callq 0x5420
movq 0x14b95(%rip), %rbx     # 0x40fc0
movq %rbx, %rdi
movq 0x28(%rsp), %rsi
callq 0x5390
leaq 0x7396(%rip), %rsi      # 0x337d5
movl $0x9, %edx
movq %rax, %rdi
callq 0x5420
movq 0x40(%rsp), %r12
movq 0x48(%rsp), %rsi
subq %r12, %rsi
sarq $0x5, %rsi
movslq 0x1508c(%rip), %rax     # 0x414f0
cmpq %rax, %rsi
jbe 0x2c50f
movq 0x14b4c(%rip), %rdi     # 0x40fc0
callq 0x5240
leaq 0x8681(%rip), %rsi      # 0x34b01
movl $0x6, %edx
movq %rax, %rdi
callq 0x5420
jmp 0x2c550
movq 0x14b57(%rip), %rdi     # 0x40ff0
movq (%rdi), %rax
addq -0x18(%rax), %rdi
movl $0xa, %esi
callq 0x53a0
movsbl %al, %esi
movq 0x14b3c(%rip), %rdi     # 0x40ff0
callq 0x5030
movq %rax, %rdi
callq 0x5250
movq %rax, %rbx
leaq 0x8c1c(%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, %r14d
callq 0x2b42b
jmp 0x2c882
cmpq 0x48(%rsp), %r12
je 0x2c550
movq 0x14aa3(%rip), %r14     # 0x40fc0
leaq 0x7e74(%rip), %r15      # 0x34398
movq (%r12), %rsi
movq 0x8(%r12), %rdx
movq %r14, %rdi
callq 0x5420
movl $0x1, %edx
movq %rax, %rdi
movq %r15, %rsi
callq 0x5420
addq $0x20, %r12
cmpq 0x48(%rsp), %r12
jne 0x2c524
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x53a0
movsbl %al, %esi
movq 0x14a52(%rip), %rdi     # 0x40fc0
callq 0x5030
movq %rax, %rdi
callq 0x5250
movq 0x14a3e(%rip), %rbx     # 0x40fc0
leaq 0x9c5f(%rip), %rsi      # 0x361e8
movl $0x8, %edx
movq %rbx, %rdi
callq 0x5420
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x53a0
movsbl %al, %esi
movq 0x14a0c(%rip), %rdi     # 0x40fc0
callq 0x5030
movq %rax, %rdi
callq 0x5250
movq 0x149f8(%rip), %rdi     # 0x40fc0
leaq 0x9c22(%rip), %rsi      # 0x361f1
movl $0x13, %edx
callq 0x5420
movq 0x149e0(%rip), %rdi     # 0x40fc0
movq 0x38(%rsp), %rsi
callq 0x5390
movq %rax, %rbx
movq (%rax), %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
movq 0x149a5(%rip), %rdi     # 0x40fc0
leaq 0x9be3(%rip), %rsi      # 0x36205
movl $0x1c, %edx
callq 0x5420
movq 0x1498d(%rip), %rdi     # 0x40fc0
movq 0x30(%rsp), %rsi
callq 0x5390
movq %rax, %rbx
movq (%rax), %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
movq 0x14952(%rip), %rdi     # 0x40fc0
leaq 0x9bad(%rip), %rsi      # 0x36222
movl $0x22, %edx
callq 0x5420
cvtss2sd 0x1c(%rsp), %xmm0
movq 0x14934(%rip), %rdi     # 0x40fc0
callq 0x5610
movq %rax, %rbx
movq (%rax), %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
movq 0x148fe(%rip), %rdi     # 0x40fc0
leaq 0x9b7c(%rip), %rsi      # 0x36245
movl $0x18, %edx
callq 0x5420
movq 0x148e6(%rip), %rdi     # 0x40fc0
movq 0x20(%rsp), %rsi
callq 0x5390
movq %rax, %rbx
movq (%rax), %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
movq 0x148ab(%rip), %rdi     # 0x40fc0
leaq 0x8d38(%rip), %rsi      # 0x35454
movl $0x1a, %edx
callq 0x5420
movq 0x60(%rsp), %rsi
movq 0x68(%rsp), %rdx
movq 0x14889(%rip), %rbx     # 0x40fc0
movq %rbx, %rdi
callq 0x5420
movq %rax, %r14
leaq 0x9615(%rip), %rsi      # 0x35d5e
movl $0x4, %edx
movq %rax, %rdi
callq 0x5420
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x53a0
movsbl %al, %esi
movq %r14, %rdi
callq 0x5030
movq %rax, %rdi
callq 0x5250
testb $0x1, 0xc(%rsp)
je 0x2c7f0
movq 0x14835(%rip), %rdi     # 0x40fc0
leaq 0x9acc(%rip), %rsi      # 0x3625e
movl $0x26, %edx
callq 0x5420
movq 0x60(%rsp), %rsi
movq 0x68(%rsp), %rdx
movq 0x14813(%rip), %rdi     # 0x40fc0
callq 0x5420
movq %rax, %r14
leaq 0x742d(%rip), %rsi      # 0x33be9
movl $0xc, %edx
movq %rax, %rdi
callq 0x5420
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x53a0
movsbl %al, %esi
movq %r14, %rdi
callq 0x5030
movq %rax, %rdi
callq 0x5250
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x53a0
movsbl %al, %esi
movq 0x147b2(%rip), %rdi     # 0x40fc0
callq 0x5030
movq %rax, %rdi
callq 0x5250
leaq 0x80(%rsp), %rdx
movq 0x28(%rsp), %rax
movl %eax, (%rdx)
leaq 0xa8(%rsp), %rcx
movq 0x20(%rsp), %rax
movl %eax, (%rcx)
leaq 0x5c(%rsp), %r8
movq 0x30(%rsp), %rax
movl %eax, (%r8)
leaq 0xa4(%rsp), %r9
movq 0x38(%rsp), %rax
movl %eax, (%r9)
movzbl 0xc(%rsp), %eax
andl $0x1, %eax
leaq 0x1c(%rsp), %r10
leaq 0x40(%rsp), %rdi
leaq 0x60(%rsp), %rsi
pushq %rax
pushq %r10
callq 0x13a6c
addq $0x10, %rsp
xorl %r14d, %r14d
testl %eax, %eax
setne %r14b
leaq 0x40(%rsp), %rdi
callq 0xabee
movq 0x60(%rsp), %rdi
cmpq %r13, %rdi
je 0x2c8a3
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x53c0
movl %r14d, %eax
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x2c90e
movq %rax, %r14
callq 0x5630
jmp 0x2c911
jmp 0x2c90e
movq %rax, %r14
callq 0x5630
jmp 0x2c911
movq %rax, %r14
callq 0x5630
jmp 0x2c911
jmp 0x2c90e
movq %rax, %r14
callq 0x5630
jmp 0x2c911
jmp 0x2c90e
movq %rax, %r14
callq 0x5630
jmp 0x2c911
jmp 0x2c90e
movq %rax, %rdi
callq 0x7d6a
jmp 0x2c90e
jmp 0x2c909
movq %rax, %r14
jmp 0x2c95c
jmp 0x2c909
jmp 0x2c909
movq %rax, %r14
jmp 0x2c936
movq %rax, %r14
movq 0x80(%rsp), %rdi
leaq 0x90(%rsp), %rax
cmpq %rax, %rdi
je 0x2c936
movq 0x90(%rsp), %rsi
incq %rsi
callq 0x53c0
leaq 0x40(%rsp), %rdi
callq 0xabee
movq 0x60(%rsp), %rdi
leaq 0x70(%rsp), %rax
cmpq %rax, %rdi
je 0x2c95c
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x53c0
movq %r14, %rdi
callq 0x56a0