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

	std::string infile="";
	std::string kmerfile="";
	float minproportion=0.0;
	float maxproportion=1.0;
	int minsamples=0;
	int maxsamples=0;
	std::vector < std::string > args;

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

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

		if (arg=="-h" || arg=="--help"){
			weedHelp();
			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 == "-i"){
			i++;
			if (i<argc){
				infile = argv[i];
			}
			else {
				std::cerr << std::endl << "Expecting file name after -i flag" << std::endl << std::endl;
				return 1;
			}
		}
		else if (arg == "-m"){
			i++;
			if (i<argc){
				try {
					minsamples = getint(argv[i]);
				}
				catch (const std::invalid_argument& e) {
					std::cerr << std::endl << "Expecting positive int after -m flag" << std::endl << std::endl;
					return 1;
				}
			}
			else {
				std::cerr << std::endl << "Expecting positive int after -m flag" << std::endl << std::endl;
				return 1;
			}
			if (minsamples < 0){
				std::cerr << std::endl << "Minimum number of samples must be 0 or greater" << std::endl << std::endl;
				return 1;
			}
		}
		else if (arg == "-M"){
			i++;
			if (i<argc){
				try {
					maxsamples = getint(argv[i]);
				}
				catch (const std::invalid_argument& e) {
					std::cerr << std::endl << "Expecting positive int after -m flag" << std::endl << std::endl;
					return 1;
				}
			}
			else {
				std::cerr << std::endl << "Expecting positive int after -m flag" << std::endl << std::endl;
				return 1;
			}
			if (maxsamples < 0){
				std::cerr << std::endl << "Maximum number of samples must be 0 or greater" << std::endl << std::endl;
				return 1;
			}
		}
		else if (arg == "-p"){
			i++;
			if (i<argc){
				try {
					minproportion = getfloat(argv[i]);
				}
				catch (const std::invalid_argument& e) {
					std::cerr << std::endl << "Expecting float between 0 and 1 after -p flag" << std::endl << std::endl;
					return 1;
				}
			}
			else {
				std::cerr << std::endl << "Expecting float between 0 and 1 after -p flag" << std::endl << std::endl;
				return 1;
			}
			if (minproportion < 0 || minproportion > 1){
				std::cerr << std::endl << "Minimum proportion must be between 0 and 1" << std::endl << std::endl;
				return 1;
			}
		}
		else if (arg == "-P"){
			i++;
			if (i<argc){
				try {
					maxproportion = getfloat(argv[i]);
				}
				catch (const std::invalid_argument& e) {
					std::cerr << std::endl << "Expecting float between 0 and 1 after -P flag" << std::endl << std::endl;
					return 1;
				}
			}
			else {
				std::cerr << std::endl << "Expecting float between 0 and 1 after -P flag" << std::endl << std::endl;
				return 1;
			}
			if (maxproportion < 0 || maxproportion > 1){
				std::cerr << std::endl << "Maximum proportion must be between 0 and 1" << 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;
		weedHelp();
		return 1;
	}

	if (infile=="" && minproportion==0 && minsamples==0 && maxproportion==1 && maxproportion==0){
		std::cerr << "Input split kmer file is required if no sample numbers or proportions are set" << std::endl;
		weedHelp();
		return 1;
	}

	if (minproportion>=maxproportion){
		std::cerr << "Maxproportion must be greater than minproportion" << std::endl;
		weedHelp();
		return 1;
	}
	if (minsamples>=maxsamples && maxsamples!=0){
		std::cerr << "Maxsamples must be greater than minsamples" << std::endl;
		weedHelp();
		return 1;
	}

	skaVersion();

	std::cout << "Weeding kmers in " << infile << std::endl;
	std::cout << "From ";
	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;

	if (weedKmers(args, infile, minproportion, maxproportion, minsamples, maxsamples)){return 1;}

	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xc8, %rsp
movq %rsi, %r14
movl %edi, (%rsp)
leaq 0x28(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x2e9d(%rip), %rdx      # 0x342b2
leaq 0x18(%rsp), %rdi
movq %rdx, %rsi
callq 0x862a
leaq 0xb8(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x2e7d(%rip), %rdx      # 0x342b2
leaq 0xa8(%rsp), %rdi
movq %rdx, %rsi
callq 0x862a
xorps %xmm0, %xmm0
movaps %xmm0, 0x40(%rsp)
movq $0x0, 0x50(%rsp)
cmpl $0x3, (%rsp)
setge %r12b
jl 0x31f5c
movss 0x1b98(%rip), %xmm1     # 0x33004
movq $0x0, 0x38(%rsp)
movl $0x2, %r15d
leaq 0x70(%rsp), %rbx
leaq 0x60(%rsp), %r13
xorps %xmm0, %xmm0
movss %xmm0, 0xc(%rsp)
movss %xmm1, 0x4(%rsp)
movl $0x0, 0x10(%rsp)
movslq %r15d, %rax
movq (%r14,%rax,8), %rsi
movq %r13, %rdi
leaq 0x88(%rsp), %rdx
callq 0x184a2
movq %r13, %rdi
leaq 0x3b72(%rip), %rsi      # 0x3502f
callq 0x50f0
testl %eax, %eax
movb %r12b, 0xb(%rsp)
je 0x31632
movq %r13, %rdi
leaq 0x3b59(%rip), %rsi      # 0x35032
callq 0x50f0
testl %eax, %eax
je 0x31632
movq %r13, %rdi
leaq 0x3bbf(%rip), %rsi      # 0x350af
callq 0x50f0
testl %eax, %eax
je 0x31641
movq %r13, %rdi
leaq 0x407a(%rip), %rsi      # 0x35581
callq 0x50f0
testl %eax, %eax
je 0x316a4
movq %r13, %rdi
leaq 0x4bfe(%rip), %rsi      # 0x3611c
callq 0x50f0
testl %eax, %eax
je 0x31797
movq %r13, %rdi
leaq 0x59bb(%rip), %rsi      # 0x36ef0
callq 0x50f0
testl %eax, %eax
je 0x318ff
movq %r13, %rdi
leaq 0x3e0f(%rip), %rsi      # 0x3535b
callq 0x50f0
testl %eax, %eax
je 0x31a68
movq %r13, %rdi
leaq 0x59bf(%rip), %rsi      # 0x36f22
callq 0x50f0
testl %eax, %eax
je 0x31b4b
movq 0x60(%rsp), %rax
cmpb $0x2d, (%rax)
jne 0x31b8e
movq 0xfa6b(%rip), %rcx      # 0x40ff0
movq (%rcx), %rax
movq -0x18(%rax), %rdi
addq %rcx, %rdi
movl $0xa, %esi
callq 0x53a0
movsbl %al, %esi
movq 0xfa4d(%rip), %rdi      # 0x40ff0
callq 0x5030
movq %rax, %rdi
callq 0x5250
movq %rax, %rbp
movl $0x12, %edx
movq %rax, %rdi
leaq 0x3b12(%rip), %rsi      # 0x350d4
callq 0x5420
movq 0x60(%rsp), %rsi
movq 0x68(%rsp), %rdx
movq %rbp, %rdi
callq 0x5420
movq %rax, %rbp
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbp, %rdi
movl $0xa, %esi
callq 0x53a0
movsbl %al, %esi
movq %rbp, %rdi
callq 0x5030
movq %rax, %rdi
callq 0x5250
movq %rax, %rbp
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbp, %rdi
movl $0xa, %esi
callq 0x53a0
movsbl %al, %esi
movq %rbp, %rdi
callq 0x5030
movq %rax, %rdi
callq 0x5250
jmp 0x31dc1
xorl %r12d, %r12d
callq 0x31136
xorl %ebp, %ebp
jmp 0x31dc9
incl %r15d
cmpl (%rsp), %r15d
jge 0x316f7
movslq %r15d, %rax
movq (%r14,%rax,8), %rsi
leaq 0x88(%rsp), %r13
movq %r13, %rdi
leaq 0x17(%rsp), %rdx
callq 0x184a2
movq %r13, %rdi
leaq 0x40(%rsp), %rsi
callq 0x817c
movq 0x88(%rsp), %rdi
leaq 0x98(%rsp), %rax
cmpq %rax, %rdi
je 0x3169c
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x53c0
movb $0x1, %r12b
jmp 0x31dc9
incl %r15d
cmpl (%rsp), %r15d
jge 0x3185f
movslq %r15d, %rax
movq (%r14,%rax,8), %rbx
movq %r14, 0x80(%rsp)
movq 0x20(%rsp), %r13
movq %rbx, %rdi
callq 0x5180
movb $0x1, %r12b
leaq 0x18(%rsp), %rdi
xorl %esi, %esi
movq %r13, %rdx
movq 0x80(%rsp), %r14
movq %rbx, %rcx
leaq 0x70(%rsp), %rbx
movq %rax, %r8
callq 0x55e0
jmp 0x31dc9
movq 0xf8f2(%rip), %rcx      # 0x40ff0
movq (%rcx), %rax
movq -0x18(%rax), %rdi
addq %rcx, %rdi
movl $0xa, %esi
callq 0x53a0
movsbl %al, %esi
movq 0xf8d4(%rip), %rdi      # 0x40ff0
callq 0x5030
movq %rax, %rdi
callq 0x5250
movq %rax, %rbp
movl $0x21, %edx
movq %rax, %rdi
leaq 0x3977(%rip), %rsi      # 0x350b2
callq 0x5420
movq (%rbp), %rax
movq -0x18(%rax), %rdi
addq %rbp, %rdi
movl $0xa, %esi
callq 0x53a0
movsbl %al, %esi
movq %rbp, %rdi
callq 0x5030
movq %rax, %rdi
callq 0x5250
movq %rax, %rbp
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbp, %rdi
movl $0xa, %esi
callq 0x53a0
movsbl %al, %esi
movq %rbp, %rdi
callq 0x5030
movq %rax, %rdi
callq 0x5250
jmp 0x31dc1
incl %r15d
cmpl (%rsp), %r15d
jge 0x319c8
movslq %r15d, %rax
movq (%r14,%rax,8), %rdi
callq 0x260f0
movb $0x1, %r12b
movl %eax, 0x10(%rsp)
testl %eax, %eax
jns 0x31dc9
movq 0xf82a(%rip), %rcx      # 0x40ff0
movq (%rcx), %rax
movq -0x18(%rax), %rdi
addq %rcx, %rdi
movl $0xa, %esi
callq 0x53a0
movsbl %al, %esi
movq 0xf80c(%rip), %rdi      # 0x40ff0
callq 0x5030
movq %rax, %rdi
callq 0x5250
movq %rax, %rbp
movl $0x2e, %edx
movq %rax, %rdi
leaq 0x56be(%rip), %rsi      # 0x36ec1
callq 0x5420
movq (%rbp), %rax
movq -0x18(%rax), %rdi
addq %rbp, %rdi
movl $0xa, %esi
callq 0x53a0
movsbl %al, %esi
movq %rbp, %rdi
callq 0x5030
movq %rax, %rdi
callq 0x5250
movq %rax, %rbp
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbp, %rdi
movl $0xa, %esi
callq 0x53a0
movsbl %al, %esi
movq %rbp, %rdi
callq 0x5030
movq %rax, %rdi
callq 0x5250
jmp 0x31dc1
movq 0xf78a(%rip), %rcx      # 0x40ff0
movq (%rcx), %rax
movq -0x18(%rax), %rdi
addq %rcx, %rdi
movl $0xa, %esi
callq 0x53a0
movsbl %al, %esi
movq 0xf76c(%rip), %rdi      # 0x40ff0
callq 0x5030
movq %rax, %rdi
callq 0x5250
movq %rax, %rbp
movl $0x21, %edx
movq %rax, %rdi
leaq 0x4a7f(%rip), %rsi      # 0x36322
callq 0x5420
movq (%rbp), %rax
movq -0x18(%rax), %rdi
addq %rbp, %rdi
movl $0xa, %esi
callq 0x53a0
movsbl %al, %esi
movq %rbp, %rdi
callq 0x5030
movq %rax, %rdi
callq 0x5250
movq %rax, %rbp
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbp, %rdi
movl $0xa, %esi
callq 0x53a0
movsbl %al, %esi
movq %rbp, %rdi
callq 0x5030
movq %rax, %rdi
callq 0x5250
jmp 0x31dc1
incl %r15d
cmpl (%rsp), %r15d
jge 0x31aab
movslq %r15d, %rax
movq (%r14,%rax,8), %rdi
callq 0x260f0
movb $0x1, %r12b
movq %rax, 0x38(%rsp)
testl %eax, %eax
jns 0x31dc9
movq 0xf6c1(%rip), %rcx      # 0x40ff0
movq (%rcx), %rax
movq -0x18(%rax), %rdi
addq %rcx, %rdi
movl $0xa, %esi
callq 0x53a0
movsbl %al, %esi
movq 0xf6a3(%rip), %rdi      # 0x40ff0
callq 0x5030
movq %rax, %rdi
callq 0x5250
movq %rax, %rbp
movl $0x2e, %edx
movq %rax, %rdi
leaq 0x5587(%rip), %rsi      # 0x36ef3
callq 0x5420
movq (%rbp), %rax
movq -0x18(%rax), %rdi
addq %rbp, %rdi
movl $0xa, %esi
callq 0x53a0
movsbl %al, %esi
movq %rbp, %rdi
callq 0x5030
movq %rax, %rdi
callq 0x5250
movq %rax, %rbp
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbp, %rdi
movl $0xa, %esi
callq 0x53a0
movsbl %al, %esi
movq %rbp, %rdi
callq 0x5030
movq %rax, %rdi
callq 0x5250
jmp 0x31dc1
movq 0xf621(%rip), %rcx      # 0x40ff0
movq (%rcx), %rax
movq -0x18(%rax), %rdi
addq %rcx, %rdi
movl $0xa, %esi
callq 0x53a0
movsbl %al, %esi
movq 0xf603(%rip), %rdi      # 0x40ff0
callq 0x5030
movq %rax, %rdi
callq 0x5250
movq %rax, %rbp
movl $0x24, %edx
movq %rax, %rdi
leaq 0x5490(%rip), %rsi      # 0x36e9c
callq 0x5420
movq (%rbp), %rax
movq -0x18(%rax), %rdi
addq %rbp, %rdi
movl $0xa, %esi
callq 0x53a0
movsbl %al, %esi
movq %rbp, %rdi
callq 0x5030
movq %rax, %rdi
callq 0x5250
movq %rax, %rbp
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbp, %rdi
movl $0xa, %esi
callq 0x53a0
movsbl %al, %esi
movq %rbp, %rdi
callq 0x5030
movq %rax, %rdi
callq 0x5250
jmp 0x31dc1
incl %r15d
cmpl (%rsp), %r15d
jge 0x31ba5
movslq %r15d, %rax
movq (%r14,%rax,8), %rdi
callq 0x26159
movaps %xmm0, %xmm1
xorps %xmm0, %xmm0
ucomiss %xmm1, %xmm0
ja 0x31ce5
movb $0x1, %r12b
ucomiss 0x156a(%rip), %xmm1     # 0x33004
ja 0x31ce5
movss %xmm1, 0xc(%rsp)
jmp 0x31dc9
movq 0xf53e(%rip), %rcx      # 0x40ff0
movq (%rcx), %rax
movq -0x18(%rax), %rdi
addq %rcx, %rdi
movl $0xa, %esi
callq 0x53a0
movsbl %al, %esi
movq 0xf520(%rip), %rdi      # 0x40ff0
callq 0x5030
movq %rax, %rdi
callq 0x5250
movq %rax, %rbp
movl $0x24, %edx
movq %rax, %rdi
leaq 0x53ad(%rip), %rsi      # 0x36e9c
callq 0x5420
movq (%rbp), %rax
movq -0x18(%rax), %rdi
addq %rbp, %rdi
movl $0xa, %esi
callq 0x53a0
movsbl %al, %esi
movq %rbp, %rdi
callq 0x5030
movq %rax, %rdi
callq 0x5250
movq %rax, %rbp
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbp, %rdi
movl $0xa, %esi
callq 0x53a0
movsbl %al, %esi
movq %rbp, %rdi
callq 0x5030
movq %rax, %rdi
callq 0x5250
jmp 0x31dc1
incl %r15d
cmpl (%rsp), %r15d
jge 0x31c45
movslq %r15d, %rax
movq (%r14,%rax,8), %rdi
callq 0x26159
movaps %xmm0, %xmm1
xorps %xmm0, %xmm0
ucomiss %xmm1, %xmm0
ja 0x31d88
movb $0x1, %r12b
ucomiss 0x1487(%rip), %xmm1     # 0x33004
ja 0x31d88
movss %xmm1, 0x4(%rsp)
jmp 0x31dc9
movb $0x1, %r12b
leaq 0x40(%rsp), %rdi
leaq 0x60(%rsp), %rsi
callq 0x855c
jmp 0x31dc9
movq 0xf444(%rip), %rcx      # 0x40ff0
movq (%rcx), %rax
movq -0x18(%rax), %rdi
addq %rcx, %rdi
movl $0xa, %esi
callq 0x53a0
movsbl %al, %esi
movq 0xf426(%rip), %rdi      # 0x40ff0
callq 0x5030
movq %rax, %rdi
callq 0x5250
movq %rax, %rbp
movl $0x2d, %edx
movq %rax, %rdi
leaq 0x3775(%rip), %rsi      # 0x3535e
callq 0x5420
movq (%rbp), %rax
movq -0x18(%rax), %rdi
addq %rbp, %rdi
movl $0xa, %esi
callq 0x53a0
movsbl %al, %esi
movq %rbp, %rdi
callq 0x5030
movq %rax, %rdi
callq 0x5250
movq %rax, %rbp
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbp, %rdi
movl $0xa, %esi
callq 0x53a0
movsbl %al, %esi
movq %rbp, %rdi
callq 0x5030
movq %rax, %rdi
callq 0x5250
jmp 0x31dc1
movq 0xf3a4(%rip), %rcx      # 0x40ff0
movq (%rcx), %rax
movq -0x18(%rax), %rdi
addq %rcx, %rdi
movl $0xa, %esi
callq 0x53a0
movsbl %al, %esi
movq 0xf386(%rip), %rdi      # 0x40ff0
callq 0x5030
movq %rax, %rdi
callq 0x5250
movq %rax, %rbp
movl $0x2d, %edx
movq %rax, %rdi
leaq 0x529c(%rip), %rsi      # 0x36f25
callq 0x5420
movq (%rbp), %rax
movq -0x18(%rax), %rdi
addq %rbp, %rdi
movl $0xa, %esi
callq 0x53a0
movsbl %al, %esi
movq %rbp, %rdi
callq 0x5030
movq %rax, %rdi
callq 0x5250
movq %rax, %rbp
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbp, %rdi
movl $0xa, %esi
callq 0x53a0
movsbl %al, %esi
movq %rbp, %rdi
callq 0x5030
movq %rax, %rdi
callq 0x5250
jmp 0x31dc1
movss %xmm1, 0xc(%rsp)
movq 0xf2fe(%rip), %rcx      # 0x40ff0
movq (%rcx), %rax
movq -0x18(%rax), %rdi
addq %rcx, %rdi
movl $0xa, %esi
callq 0x53a0
movsbl %al, %esi
movq 0xf2e0(%rip), %rdi      # 0x40ff0
callq 0x5030
movq %rax, %rdi
callq 0x5250
movq %rax, %rbp
movl $0x2a, %edx
movq %rax, %rdi
leaq 0x365d(%rip), %rsi      # 0x3538c
callq 0x5420
movq (%rbp), %rax
movq -0x18(%rax), %rdi
addq %rbp, %rdi
movl $0xa, %esi
callq 0x53a0
movsbl %al, %esi
movq %rbp, %rdi
callq 0x5030
movq %rax, %rdi
callq 0x5250
movq %rax, %rbp
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbp, %rdi
movl $0xa, %esi
callq 0x53a0
movsbl %al, %esi
movq %rbp, %rdi
callq 0x5030
movq %rax, %rdi
callq 0x5250
jmp 0x31dc1
movss %xmm1, 0x4(%rsp)
movq 0xf25b(%rip), %rdi      # 0x40ff0
callq 0x5190
movq %rax, %rbp
movl $0x2a, %edx
movq %rax, %rdi
leaq 0x51a7(%rip), %rsi      # 0x36f53
callq 0x5420
movq %rbp, %rdi
callq 0x5190
movq %rax, %rdi
callq 0x5190
movl $0x1, %ebp
xorl %r12d, %r12d
movq 0x60(%rsp), %rdi
cmpq %rbx, %rdi
je 0x31de0
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x53c0
testb %r12b, %r12b
je 0x31f86
incl %r15d
cmpl (%rsp), %r15d
setl %r12b
leaq 0x60(%rsp), %r13
jl 0x3149c
jmp 0x31f8b
leaq 0x28(%rsp), %r12
movq %rax, %rbp
cmpl $0x1, %edx
jne 0x32328
movq %rbp, %rdi
callq 0x5160
movq 0xf1cc(%rip), %rdi      # 0x40ff0
callq 0x5190
movq %rax, %rbp
movl $0x2d, %edx
movq %rax, %rdi
leaq 0x50ea(%rip), %rsi      # 0x36f25
callq 0x5420
movq %rbp, %rdi
callq 0x5190
movq %rax, %rdi
callq 0x5190
callq 0x5630
jmp 0x31dc1
leaq 0x28(%rsp), %r12
movq %rax, %rbp
cmpl $0x1, %edx
jne 0x32328
movq %rbp, %rdi
callq 0x5160
movq 0xf176(%rip), %rdi      # 0x40ff0
callq 0x5190
movq %rax, %rbp
movl $0x2d, %edx
movq %rax, %rdi
leaq 0x34cd(%rip), %rsi      # 0x3535e
callq 0x5420
movq %rbp, %rdi
callq 0x5190
movq %rax, %rdi
callq 0x5190
callq 0x5630
jmp 0x31dc1
leaq 0x28(%rsp), %r12
movq %rax, %rbp
cmpl $0x1, %edx
jne 0x32328
movq %rbp, %rdi
callq 0x5160
movq 0xf120(%rip), %rdi      # 0x40ff0
callq 0x5190
movq %rax, %rbp
movl $0x24, %edx
movq %rax, %rdi
leaq 0x4fb5(%rip), %rsi      # 0x36e9c
callq 0x5420
movq %rbp, %rdi
callq 0x5190
movq %rax, %rdi
callq 0x5190
callq 0x5630
jmp 0x31dc1
leaq 0x28(%rsp), %r12
movq %rax, %rbp
cmpl $0x1, %edx
jne 0x32328
movq %rbp, %rdi
callq 0x5160
movq 0xf0ca(%rip), %rdi      # 0x40ff0
callq 0x5190
movq %rax, %rbp
movl $0x24, %edx
movq %rax, %rdi
leaq 0x4f5f(%rip), %rsi      # 0x36e9c
callq 0x5420
movq %rbp, %rdi
callq 0x5190
movq %rax, %rdi
callq 0x5190
callq 0x5630
jmp 0x31dc1
movl $0x0, 0x10(%rsp)
xorps %xmm0, %xmm0
movss %xmm0, 0xc(%rsp)
movss 0x108f(%rip), %xmm0     # 0x33004
movss %xmm0, 0x4(%rsp)
movq $0x0, 0x38(%rsp)
jmp 0x31f8b
movb 0xb(%rsp), %r12b
testb $0x1, %r12b
jne 0x320e9
movq 0x48(%rsp), %rax
cmpq 0x40(%rsp), %rax
je 0x3200f
leaq 0x230a(%rip), %rsi      # 0x342b2
leaq 0x18(%rsp), %rdi
callq 0x50f0
testl %eax, %eax
jne 0x3206b
xorps %xmm0, %xmm0
movss 0xc(%rsp), %xmm1
ucomiss %xmm0, %xmm1
jne 0x3206b
jp 0x3206b
cmpl $0x0, 0x10(%rsp)
jne 0x3206b
movss 0x4(%rsp), %xmm0
ucomiss 0x101a(%rip), %xmm0     # 0x33004
jne 0x3206b
jp 0x3206b
xorps %xmm0, %xmm0
movss 0x4(%rsp), %xmm1
ucomiss %xmm0, %xmm1
jne 0x3206b
jp 0x3206b
movl $0x4d, %edx
leaq 0x4f74(%rip), %rsi      # 0x36f7e
jmp 0x320a9
movq 0xefda(%rip), %rdi      # 0x40ff0
movq (%rdi), %rax
addq -0x18(%rax), %rdi
movl $0xa, %esi
callq 0x53a0
movsbl %al, %esi
movq 0xefbf(%rip), %rdi      # 0x40ff0
callq 0x5030
movq %rax, %rdi
callq 0x5250
movq %rax, %rbx
leaq 0x309f(%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 0x320cc
movss 0xc(%rsp), %xmm0
ucomiss 0x4(%rsp), %xmm0
jae 0x3209d
movq 0x38(%rsp), %rax
cmpl %eax, 0x10(%rsp)
jl 0x32148
testl %eax, %eax
je 0x32148
movl $0x2a, %edx
leaq 0x4f62(%rip), %rsi      # 0x36ffd
jmp 0x320a9
movl $0x30, %edx
leaq 0x4f23(%rip), %rsi      # 0x36fcc
movq 0xef40(%rip), %rbx      # 0x40ff0
movq %rbx, %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, %ebp
callq 0x31136
leaq 0x40(%rsp), %rdi
callq 0xabee
movq 0xa8(%rsp), %rdi
leaq 0xb8(%rsp), %rax
cmpq %rax, %rdi
je 0x32118
movq 0xb8(%rsp), %rsi
incq %rsi
callq 0x53c0
movq 0x18(%rsp), %rdi
leaq 0x28(%rsp), %rax
cmpq %rax, %rdi
je 0x32134
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x53c0
movl %ebp, %eax
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x26746
movq 0xee6c(%rip), %rdi      # 0x40fc0
leaq 0x4ecd(%rip), %rsi      # 0x37028
movl $0x11, %edx
callq 0x5420
movq 0x18(%rsp), %rsi
movq 0x20(%rsp), %rdx
movq 0xee4a(%rip), %rdi      # 0x40fc0
callq 0x5420
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 0xee14(%rip), %rbx      # 0x40fc0
leaq 0x4e87(%rip), %rsi      # 0x3703a
movl $0x5, %edx
movq %rbx, %rdi
callq 0x5420
movq 0x40(%rsp), %r12
movq 0x48(%rsp), %rsi
subq %r12, %rsi
sarq $0x5, %rsi
movslq 0xf318(%rip), %rax      # 0x414f0
cmpq %rax, %rsi
jbe 0x321ff
movq 0xeddc(%rip), %rdi      # 0x40fc0
callq 0x5240
leaq 0x2911(%rip), %rsi      # 0x34b01
movl $0x6, %edx
movq %rax, %rdi
callq 0x5420
jmp 0x32240
cmpq 0x48(%rsp), %r12
je 0x32240
movq 0xedb3(%rip), %r14      # 0x40fc0
leaq 0x2184(%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 0x32214
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x53a0
movsbl %al, %esi
movq 0xed62(%rip), %rdi      # 0x40fc0
callq 0x5030
movq %rax, %rdi
callq 0x5250
leaq 0x40(%rsp), %rdi
leaq 0x18(%rsp), %rsi
movss 0xc(%rsp), %xmm0
movss 0x4(%rsp), %xmm1
movl 0x10(%rsp), %edx
movq 0x38(%rsp), %rcx
callq 0x24b39
xorl %ebp, %ebp
testl %eax, %eax
setne %bpl
jmp 0x320e9
jmp 0x32325
movq %rax, %rbp
callq 0x5630
jmp 0x32328
movq %rax, %rbp
callq 0x5630
jmp 0x32328
jmp 0x32325
movq %rax, %rbp
callq 0x5630
jmp 0x32328
jmp 0x32325
jmp 0x32325
movq %rax, %rbp
callq 0x5630
jmp 0x32328
movq %rax, %rdi
callq 0x7d6a
jmp 0x32320
leaq 0x28(%rsp), %r12
movq %rax, %rbp
movq 0x88(%rsp), %rdi
leaq 0x98(%rsp), %rax
cmpq %rax, %rdi
je 0x32328
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x53c0
jmp 0x32328
jmp 0x32316
movq %rax, %rbp
jmp 0x3236e
movq %rax, %rbp
jmp 0x32385
jmp 0x32316
leaq 0x28(%rsp), %r12
movq %rax, %rbp
jmp 0x3233f
leaq 0x28(%rsp), %r12
movq %rax, %rbp
movq 0x60(%rsp), %rdi
cmpq %rbx, %rdi
je 0x3233f
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x53c0
leaq 0x40(%rsp), %rdi
callq 0xabee
movq 0xa8(%rsp), %rdi
leaq 0xb8(%rsp), %rax
cmpq %rax, %rdi
je 0x3236e
movq 0xb8(%rsp), %rsi
incq %rsi
callq 0x53c0
movq 0x18(%rsp), %rdi
cmpq %r12, %rdi
je 0x32385
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x53c0
movq %rbp, %rdi
callq 0x56a0