// File: /workspace/github_cpp_makefile_star2_O3/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, 0x10(%rsp)
movl %edi, 0x4(%rsp)
leaq 0x78(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0x3465(%rip), %rdx      # 0x342a2
leaq 0x68(%rsp), %rdi
movq %rdx, %rsi
callq 0x85fc
leaq 0xb8(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x3445(%rip), %rdx      # 0x342a2
leaq 0xa8(%rsp), %rdi
movq %rdx, %rsi
callq 0x85fc
xorps %xmm0, %xmm0
movaps %xmm0, 0x20(%rsp)
movq $0x0, 0x30(%rsp)
cmpl $0x3, 0x4(%rsp)
jl 0x31a10
movss 0x2173(%rip), %xmm1     # 0x33004
movq $0x0, 0x40(%rsp)
movl $0x2, %r14d
leaq 0x58(%rsp), %rbx
leaq 0x48(%rsp), %r15
xorps %xmm0, %xmm0
movss %xmm0, 0xc(%rsp)
movss %xmm1, 0x8(%rsp)
xorl %r12d, %r12d
movslq %r14d, %rax
movq 0x10(%rsp), %rcx
movq (%rcx,%rax,8), %rsi
movq %r15, %rdi
leaq 0x88(%rsp), %rdx
callq 0x182e0
movq %r15, %rdi
leaq 0x413d(%rip), %rsi      # 0x3501f
callq 0x50f0
testl %eax, %eax
je 0x31052
movq %r15, %rdi
leaq 0x4129(%rip), %rsi      # 0x35022
callq 0x50f0
testl %eax, %eax
je 0x31052
movq %r15, %rdi
leaq 0x418f(%rip), %rsi      # 0x3509f
callq 0x50f0
testl %eax, %eax
je 0x31061
movq %r15, %rdi
leaq 0x464a(%rip), %rsi      # 0x35571
callq 0x50f0
testl %eax, %eax
je 0x310ca
movq %r15, %rdi
leaq 0x51ce(%rip), %rsi      # 0x3610c
callq 0x50f0
testl %eax, %eax
je 0x311c3
movq %r15, %rdi
leaq 0x5f8b(%rip), %rsi      # 0x36ee0
callq 0x50f0
testl %eax, %eax
je 0x31330
movq %r15, %rdi
leaq 0x43df(%rip), %rsi      # 0x3534b
callq 0x50f0
testl %eax, %eax
je 0x3149f
movq %r15, %rdi
leaq 0x5f8f(%rip), %rsi      # 0x36f12
callq 0x50f0
testl %eax, %eax
je 0x31588
movq 0x48(%rsp), %rax
cmpb $0x2d, (%rax)
jne 0x315d1
movq 0x1004b(%rip), %rcx     # 0x40ff0
movq (%rcx), %rax
movq -0x18(%rax), %rdi
addq %rcx, %rdi
movl $0xa, %esi
callq 0x53a0
movsbl %al, %esi
movq 0x1002d(%rip), %rdi     # 0x40ff0
callq 0x5030
movq %rax, %rdi
callq 0x5250
movq %rax, %rbp
movl $0x12, %edx
movq %rax, %rdi
leaq 0x40e2(%rip), %rsi      # 0x350c4
callq 0x5420
movq 0x48(%rsp), %rsi
movq 0x50(%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 0x31804
xorl %r15d, %r15d
callq 0x30b5c
xorl %ebp, %ebp
jmp 0x3180c
incl %r14d
cmpl 0x4(%rsp), %r14d
jge 0x31123
movslq %r14d, %rax
movq 0x10(%rsp), %rcx
movq (%rcx,%rax,8), %rsi
leaq 0x88(%rsp), %r15
movq %r15, %rdi
leaq 0x1f(%rsp), %rdx
callq 0x182e0
movq %r15, %rdi
leaq 0x20(%rsp), %rsi
callq 0x8148
movq 0x88(%rsp), %rdi
leaq 0x98(%rsp), %rax
cmpq %rax, %rdi
je 0x310c2
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x53c0
movb $0x1, %r15b
jmp 0x3180c
incl %r14d
cmpl 0x4(%rsp), %r14d
jge 0x31290
movslq %r14d, %rax
movq 0x10(%rsp), %rcx
movq (%rcx,%rax,8), %rbx
movl %r12d, 0x18(%rsp)
movq %r13, %r12
movq 0x70(%rsp), %r13
movq %rbx, %rdi
callq 0x5180
movb $0x1, %r15b
leaq 0x68(%rsp), %rdi
xorl %esi, %esi
movq %r13, %rdx
movq %r12, %r13
movl 0x18(%rsp), %r12d
movq %rbx, %rcx
leaq 0x58(%rsp), %rbx
movq %rax, %r8
callq 0x55e0
jmp 0x3180c
movq 0xfec6(%rip), %rcx      # 0x40ff0
movq (%rcx), %rax
movq -0x18(%rax), %rdi
addq %rcx, %rdi
movl $0xa, %esi
callq 0x53a0
movsbl %al, %esi
movq 0xfea8(%rip), %rdi      # 0x40ff0
callq 0x5030
movq %rax, %rdi
callq 0x5250
movq %rax, %rbp
movl $0x21, %edx
movq %rax, %rdi
leaq 0x3f3b(%rip), %rsi      # 0x350a2
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 0x31804
incl %r14d
cmpl 0x4(%rsp), %r14d
jge 0x313ff
movslq %r14d, %rax
movq 0x10(%rsp), %rcx
movq (%rcx,%rax,8), %rdi
callq 0x25cfc
movl %eax, %r12d
movb $0x1, %r15b
testl %eax, %eax
jns 0x3180c
movq 0xfdf9(%rip), %rcx      # 0x40ff0
movq (%rcx), %rax
movq -0x18(%rax), %rdi
addq %rcx, %rdi
movl $0xa, %esi
callq 0x53a0
movsbl %al, %esi
movq 0xfddb(%rip), %rdi      # 0x40ff0
callq 0x5030
movq %rax, %rdi
callq 0x5250
movq %rax, %rbp
movl $0x2e, %edx
movq %rax, %rdi
leaq 0x5c7d(%rip), %rsi      # 0x36eb1
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 0x31804
movq 0xfd59(%rip), %rcx      # 0x40ff0
movq (%rcx), %rax
movq -0x18(%rax), %rdi
addq %rcx, %rdi
movl $0xa, %esi
callq 0x53a0
movsbl %al, %esi
movq 0xfd3b(%rip), %rdi      # 0x40ff0
callq 0x5030
movq %rax, %rdi
callq 0x5250
movq %rax, %rbp
movl $0x21, %edx
movq %rax, %rdi
leaq 0x503e(%rip), %rsi      # 0x36312
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 0x31804
incl %r14d
cmpl 0x4(%rsp), %r14d
jge 0x314e8
movslq %r14d, %rax
movq 0x10(%rsp), %rcx
movq (%rcx,%rax,8), %rdi
callq 0x25cfc
movb $0x1, %r15b
movq %rax, 0x40(%rsp)
testl %eax, %eax
jns 0x3180c
movq 0xfc8a(%rip), %rcx      # 0x40ff0
movq (%rcx), %rax
movq -0x18(%rax), %rdi
addq %rcx, %rdi
movl $0xa, %esi
callq 0x53a0
movsbl %al, %esi
movq 0xfc6c(%rip), %rdi      # 0x40ff0
callq 0x5030
movq %rax, %rdi
callq 0x5250
movq %rax, %rbp
movl $0x2e, %edx
movq %rax, %rdi
leaq 0x5b40(%rip), %rsi      # 0x36ee3
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 0x31804
movq 0xfbea(%rip), %rcx      # 0x40ff0
movq (%rcx), %rax
movq -0x18(%rax), %rdi
addq %rcx, %rdi
movl $0xa, %esi
callq 0x53a0
movsbl %al, %esi
movq 0xfbcc(%rip), %rdi      # 0x40ff0
callq 0x5030
movq %rax, %rdi
callq 0x5250
movq %rax, %rbp
movl $0x24, %edx
movq %rax, %rdi
leaq 0x5a49(%rip), %rsi      # 0x36e8c
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 0x31804
incl %r14d
cmpl 0x4(%rsp), %r14d
jge 0x315e8
movslq %r14d, %rax
movq 0x10(%rsp), %rcx
movq (%rcx,%rax,8), %rdi
callq 0x25d65
movaps %xmm0, %xmm1
xorps %xmm0, %xmm0
ucomiss %xmm1, %xmm0
ja 0x31728
movb $0x1, %r15b
ucomiss 0x1b2d(%rip), %xmm1     # 0x33004
ja 0x31728
movss %xmm1, 0xc(%rsp)
jmp 0x3180c
movq 0xfb01(%rip), %rcx      # 0x40ff0
movq (%rcx), %rax
movq -0x18(%rax), %rdi
addq %rcx, %rdi
movl $0xa, %esi
callq 0x53a0
movsbl %al, %esi
movq 0xfae3(%rip), %rdi      # 0x40ff0
callq 0x5030
movq %rax, %rdi
callq 0x5250
movq %rax, %rbp
movl $0x24, %edx
movq %rax, %rdi
leaq 0x5960(%rip), %rsi      # 0x36e8c
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 0x31804
incl %r14d
cmpl 0x4(%rsp), %r14d
jge 0x31688
movslq %r14d, %rax
movq 0x10(%rsp), %rcx
movq (%rcx,%rax,8), %rdi
callq 0x25d65
movaps %xmm0, %xmm1
xorps %xmm0, %xmm0
ucomiss %xmm1, %xmm0
ja 0x317cb
movb $0x1, %r15b
ucomiss 0x1a44(%rip), %xmm1     # 0x33004
ja 0x317cb
movss %xmm1, 0x8(%rsp)
jmp 0x3180c
movb $0x1, %r15b
leaq 0x20(%rsp), %rdi
leaq 0x48(%rsp), %rsi
callq 0x8528
jmp 0x3180c
movq 0xfa01(%rip), %rcx      # 0x40ff0
movq (%rcx), %rax
movq -0x18(%rax), %rdi
addq %rcx, %rdi
movl $0xa, %esi
callq 0x53a0
movsbl %al, %esi
movq 0xf9e3(%rip), %rdi      # 0x40ff0
callq 0x5030
movq %rax, %rdi
callq 0x5250
movq %rax, %rbp
movl $0x2d, %edx
movq %rax, %rdi
leaq 0x3d22(%rip), %rsi      # 0x3534e
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 0x31804
movq 0xf961(%rip), %rcx      # 0x40ff0
movq (%rcx), %rax
movq -0x18(%rax), %rdi
addq %rcx, %rdi
movl $0xa, %esi
callq 0x53a0
movsbl %al, %esi
movq 0xf943(%rip), %rdi      # 0x40ff0
callq 0x5030
movq %rax, %rdi
callq 0x5250
movq %rax, %rbp
movl $0x2d, %edx
movq %rax, %rdi
leaq 0x5849(%rip), %rsi      # 0x36f15
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 0x31804
movss %xmm1, 0xc(%rsp)
movq 0xf8bb(%rip), %rcx      # 0x40ff0
movq (%rcx), %rax
movq -0x18(%rax), %rdi
addq %rcx, %rdi
movl $0xa, %esi
callq 0x53a0
movsbl %al, %esi
movq 0xf89d(%rip), %rdi      # 0x40ff0
callq 0x5030
movq %rax, %rdi
callq 0x5250
movq %rax, %rbp
movl $0x2a, %edx
movq %rax, %rdi
leaq 0x3c0a(%rip), %rsi      # 0x3537c
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 0x31804
movss %xmm1, 0x8(%rsp)
movq 0xf818(%rip), %rdi      # 0x40ff0
callq 0x5190
movq %rax, %rbp
movl $0x2a, %edx
movq %rax, %rdi
leaq 0x5754(%rip), %rsi      # 0x36f43
callq 0x5420
movq %rbp, %rdi
callq 0x5190
movq %rax, %rdi
callq 0x5190
movl $0x1, %ebp
xorl %r15d, %r15d
movq 0x48(%rsp), %rdi
cmpq %rbx, %rdi
je 0x31823
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x53c0
testb %r15b, %r15b
je 0x31a87
incl %r14d
cmpl 0x4(%rsp), %r14d
leaq 0x48(%rsp), %r15
jl 0x30ebc
jmp 0x31988
movq %rax, %rbp
cmpl $0x1, %edx
jne 0x31d0f
movq %rbp, %rdi
callq 0x5160
movq 0xf791(%rip), %rdi      # 0x40ff0
callq 0x5190
movq %rax, %rbp
movl $0x2d, %edx
movq %rax, %rdi
leaq 0x569f(%rip), %rsi      # 0x36f15
callq 0x5420
movq %rbp, %rdi
callq 0x5190
movq %rax, %rdi
callq 0x5190
callq 0x5630
jmp 0x31804
movq %rax, %rbp
cmpl $0x1, %edx
jne 0x31d0f
movq %rbp, %rdi
callq 0x5160
movq 0xf740(%rip), %rdi      # 0x40ff0
callq 0x5190
movq %rax, %rbp
movl $0x2d, %edx
movq %rax, %rdi
leaq 0x3a87(%rip), %rsi      # 0x3534e
callq 0x5420
movq %rbp, %rdi
callq 0x5190
movq %rax, %rdi
callq 0x5190
callq 0x5630
jmp 0x31804
movq %rax, %rbp
cmpl $0x1, %edx
jne 0x31d0f
movq %rbp, %rdi
callq 0x5160
movq 0xf6ef(%rip), %rdi      # 0x40ff0
callq 0x5190
movq %rax, %rbp
movl $0x24, %edx
movq %rax, %rdi
leaq 0x5574(%rip), %rsi      # 0x36e8c
callq 0x5420
movq %rbp, %rdi
callq 0x5190
movq %rax, %rdi
callq 0x5190
callq 0x5630
jmp 0x31804
movq %rax, %rbp
cmpl $0x1, %edx
jne 0x31d0f
movq %rbp, %rdi
callq 0x5160
movq 0xf69e(%rip), %rdi      # 0x40ff0
callq 0x5190
movq %rax, %rbp
movl $0x24, %edx
movq %rax, %rdi
leaq 0x5523(%rip), %rsi      # 0x36e8c
callq 0x5420
movq %rbp, %rdi
callq 0x5190
movq %rax, %rdi
callq 0x5190
callq 0x5630
jmp 0x31804
movq 0x28(%rsp), %rax
cmpq 0x20(%rsp), %rax
je 0x31a10
leaq 0x2907(%rip), %rsi      # 0x342a2
leaq 0x68(%rsp), %rdi
callq 0x50f0
testl %eax, %eax
jne 0x31ae1
xorps %xmm0, %xmm0
movss 0xc(%rsp), %xmm1
ucomiss %xmm0, %xmm1
jne 0x31ae1
jp 0x31ae1
testl %r12d, %r12d
jne 0x31ae1
movss 0x8(%rsp), %xmm0
ucomiss 0x1629(%rip), %xmm0     # 0x33004
jne 0x31ae1
jp 0x31ae1
xorps %xmm0, %xmm0
movss 0x8(%rsp), %xmm1
ucomiss %xmm0, %xmm1
jne 0x31ae1
jp 0x31ae1
movl $0x4d, %edx
leaq 0x5563(%rip), %rsi      # 0x36f6e
jmp 0x31b16
movq 0xf5d9(%rip), %rdi      # 0x40ff0
movq (%rdi), %rax
addq -0x18(%rax), %rdi
movl $0xa, %esi
callq 0x53a0
movsbl %al, %esi
movq 0xf5be(%rip), %rdi      # 0x40ff0
callq 0x5030
movq %rax, %rdi
callq 0x5250
movq %rax, %rbx
leaq 0x368e(%rip), %rsi      # 0x350d7
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, %ebp
callq 0x30b5c
leaq 0x20(%rsp), %rdi
callq 0xab8e
movq 0xa8(%rsp), %rdi
leaq 0xb8(%rsp), %rax
cmpq %rax, %rdi
je 0x31ab6
movq 0xb8(%rsp), %rsi
incq %rsi
callq 0x53c0
movq 0x68(%rsp), %rdi
cmpq %r13, %rdi
je 0x31acd
movq 0x78(%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
movss 0xc(%rsp), %xmm0
ucomiss 0x8(%rsp), %xmm0
jae 0x31b0a
movq 0x40(%rsp), %rbp
cmpl %ebp, %r12d
jl 0x31b3e
testl %ebp, %ebp
je 0x31b3e
movl $0x2a, %edx
leaq 0x54e5(%rip), %rsi      # 0x36fed
jmp 0x31b16
movl $0x30, %edx
leaq 0x54a6(%rip), %rsi      # 0x36fbc
movq 0xf4d3(%rip), %rbx      # 0x40ff0
movq %rbx, %rdi
callq 0x5420
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x53a0
jmp 0x31a6a
movl %r12d, 0x18(%rsp)
callq 0x26352
movq 0xf471(%rip), %rdi      # 0x40fc0
leaq 0x54c2(%rip), %rsi      # 0x37018
movl $0x11, %edx
callq 0x5420
movq 0x68(%rsp), %rsi
movq 0x70(%rsp), %rdx
movq 0xf44f(%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 0xf419(%rip), %rbx      # 0x40fc0
leaq 0x547c(%rip), %rsi      # 0x3702a
movl $0x5, %edx
movq %rbx, %rdi
callq 0x5420
movq 0x20(%rsp), %r12
movq 0x28(%rsp), %rax
movq %rax, %rsi
subq %r12, %rsi
sarq $0x5, %rsi
movslq 0xf91a(%rip), %rcx      # 0x414f0
cmpq %rcx, %rsi
jbe 0x31bfd
movq 0xf3de(%rip), %rdi      # 0x40fc0
callq 0x5240
leaq 0x2f03(%rip), %rsi      # 0x34af1
movl $0x6, %edx
movq %rax, %rdi
callq 0x5420
jmp 0x31c3c
cmpq %rax, %r12
je 0x31c3c
movq 0xf3b7(%rip), %r14      # 0x40fc0
leaq 0x2778(%rip), %r15      # 0x34388
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 0x28(%rsp), %r12
jne 0x31c10
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x53a0
movsbl %al, %esi
movq 0xf366(%rip), %rdi      # 0x40fc0
callq 0x5030
movq %rax, %rdi
callq 0x5250
leaq 0x20(%rsp), %rdi
leaq 0x68(%rsp), %rsi
movss 0xc(%rsp), %xmm0
movss 0x8(%rsp), %xmm1
movl 0x18(%rsp), %edx
movl %ebp, %ecx
callq 0x2476f
xorl %ebp, %ebp
testl %eax, %eax
setne %bpl
jmp 0x31a87
movq %rax, %rbp
callq 0x5630
jmp 0x31d0f
jmp 0x31d0c
movq %rax, %rbp
callq 0x5630
jmp 0x31d0f
jmp 0x31d0c
jmp 0x31d0c
movq %rax, %rbp
callq 0x5630
jmp 0x31d0f
movq %rax, %rbp
callq 0x5630
jmp 0x31d0f
jmp 0x31d0c
movq %rax, %rdi
callq 0x7d38
jmp 0x31d07
movq %rax, %rbp
movq 0x88(%rsp), %rdi
leaq 0x98(%rsp), %rax
cmpq %rax, %rdi
je 0x31d0f
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x53c0
jmp 0x31d0f
jmp 0x31d0c
movq %rax, %rbp
jmp 0x31d55
movq %rax, %rbp
jmp 0x31d6c
jmp 0x31d07
movq %rax, %rbp
jmp 0x31d26
movq %rax, %rbp
movq 0x48(%rsp), %rdi
cmpq %rbx, %rdi
je 0x31d26
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x53c0
leaq 0x20(%rsp), %rdi
callq 0xab8e
movq 0xa8(%rsp), %rdi
leaq 0xb8(%rsp), %rax
cmpq %rax, %rdi
je 0x31d55
movq 0xb8(%rsp), %rsi
incq %rsi
callq 0x53c0
movq 0x68(%rsp), %rdi
cmpq %r13, %rdi
je 0x31d6c
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x53c0
movq %rbp, %rdi
callq 0x56a0