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

	bool distancefile=true;
	bool clusterfile=true;
	bool includesingletons=false;
	std::string prefix="distances";
	float minid=0.9;
	int maxsnps=20;
	std::vector < std::string > args;

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

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

		if (arg=="-h" || arg=="--help"){
			distanceHelp();
			return 0;
		}
		else if (arg=="-c"){
			clusterfile=false;
		}
		else if (arg == "-d"){
			distancefile=false;
		}
		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){
				try {
					minid = getfloat(argv[i]);
				}
				catch (const std::invalid_argument& e) {
					std::cerr << std::endl << "Expecting float between 0 and 1 after -i flag" << std::endl << std::endl;
					return 1;
				}
			}
			else {
				std::cerr << std::endl << "Expecting float between 0 and 1 after -i flag" << std::endl << std::endl;
				return 1;
			}
			if (minid < 0 || minid > 1){
				std::cerr << std::endl << "Minimum identity must be between 0 and 1" << std::endl << std::endl;
				return 1;
			}
		}
		else if (arg == "-o"){
			i++;
			if (i<argc){
				prefix = argv[i];
			}
			else {
				std::cerr << std::endl << "Expecting string after -o flag" << std::endl << std::endl;
				return 1;
			}
		}
		else if (arg == "-s"){
			i++;
			if (i<argc){
				try {
					maxsnps = getint(argv[i]);
				}
				catch (const std::invalid_argument& e) {
					std::cerr << std::endl << "Expecting positive integer after -s flag" << std::endl << std::endl;
					return 1;
				}
			}
			else {
				std::cerr << std::endl << "Expecting positive integer after -s flag" << std::endl << std::endl;
				return 1;
			}
			if (maxsnps < 0){
				std::cerr << std::endl << "Maximum number of SNPs must be 0 or greater" << std::endl << std::endl;
				return 1;
			}
		}
		else if (arg == "-S"){
			includesingletons=true;
		}
		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;
		distanceHelp();
		return 1;
	}

	if (distancefile==false && clusterfile==false){
		std::cerr << std::endl << "At least one output file is required. i.e. you cannot use the -c and -d flags together." << std::endl << std::endl;
		return 1;
	}
	if (prefix=="false"){
		std::cerr << std::endl << "An output prefix (-p) is required." << std::endl << std::endl;
		return 1;
	}

	skaVersion();

	std::cout << "Calculating pairwise distances 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 << "Clusters will be created for isolates that are within " << maxsnps << " SNPs of one another and share at least " << minid*100 << "% of the split kmers of the isolate with fewer kmers" << std::endl;

	if (distancefile){
		std::cout << "Distances will be written to " << prefix << ".distances.tsv" << std::endl;
	}
	if (clusterfile){
		std::cout << "Clusters will be written to files with the prefix " << prefix << std::endl;
	}
	std::cout << std::endl;

	if (kmerDistance(prefix, distancefile, clusterfile, args, maxsnps, minid, includesingletons)){return 1;}

	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xb8, %rsp
movq %rsi, 0x20(%rsp)
movl %edi, %ebx
leaq 0x40(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0xa41e(%rip), %rsi      # 0x339bd
leaq 0xa420(%rip), %rdx      # 0x339c6
leaq 0x30(%rsp), %rdi
callq 0x85fc
xorps %xmm0, %xmm0
movaps %xmm0, 0x50(%rsp)
movq $0x0, 0x60(%rsp)
cmpl $0x3, %ebx
jl 0x29da8
movl %ebx, 0xc(%rsp)
movss 0xb352(%rip), %xmm0     # 0x34928
movss %xmm0, 0x10(%rsp)
movl $0x14, 0x2c(%rsp)
movl $0x2, %r13d
movb $0x1, %al
movl %eax, 0x14(%rsp)
movq $0x0, 0x68(%rsp)
leaq 0x70(%rsp), %r12
leaq 0x98(%rsp), %rbp
movb $0x1, %al
movl %eax, 0x18(%rsp)
movslq %r13d, %rax
movq 0x20(%rsp), %rcx
movq (%rcx,%rax,8), %rsi
movq %r12, %rdi
movq %rbp, %rdx
callq 0x182e0
movq %r12, %rdi
leaq 0xb9f2(%rip), %rsi      # 0x3501f
callq 0x50f0
testl %eax, %eax
je 0x29750
movq %r12, %rdi
leaq 0xb9de(%rip), %rsi      # 0x35022
callq 0x50f0
testl %eax, %eax
je 0x29750
movq %r12, %rdi
leaq 0xc354(%rip), %rsi      # 0x359af
callq 0x50f0
movb $0x1, %r14b
testl %eax, %eax
je 0x29799
movq %r12, %rdi
leaq 0xc33d(%rip), %rsi      # 0x359b2
callq 0x50f0
testl %eax, %eax
je 0x297a3
movq %r12, %rdi
leaq 0xba13(%rip), %rsi      # 0x3509f
callq 0x50f0
testl %eax, %eax
je 0x297ad
movq %r12, %rdi
leaq 0xbece(%rip), %rsi      # 0x35571
callq 0x50f0
testl %eax, %eax
je 0x29812
movq %r12, %rdi
leaq 0xbc6f(%rip), %rsi      # 0x35329
callq 0x50f0
testl %eax, %eax
je 0x298f7
movq %r12, %rdi
leaq 0xbcd6(%rip), %rsi      # 0x353a7
callq 0x50f0
testl %eax, %eax
je 0x299e4
movq %r12, %rdi
leaq 0xc379(%rip), %rsi      # 0x35a61
callq 0x50f0
movb $0x1, %r14b
testl %eax, %eax
je 0x29b8b
movq 0x70(%rsp), %rax
cmpb $0x2d, (%rax)
jne 0x29b97
movq 0x178e3(%rip), %rdi     # 0x40ff0
callq 0x5190
movq %rax, %r15
movl $0x12, %edx
movq %rax, %rdi
leaq 0xb9a0(%rip), %rsi      # 0x350c4
callq 0x5420
movq 0x70(%rsp), %rsi
movq 0x78(%rsp), %rdx
movq %r15, %rdi
callq 0x5420
movq %rax, %rdi
callq 0x5190
movq %rax, %rdi
callq 0x5190
jmp 0x29c43
xorl %r14d, %r14d
callq 0x2925b
xorl %r15d, %r15d
movq 0x70(%rsp), %rdi
leaq 0x80(%rsp), %rax
cmpq %rax, %rdi
je 0x2977d
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x53c0
testb %r14b, %r14b
je 0x29cf0
incl %r13d
cmpl 0xc(%rsp), %r13d
jl 0x2960c
jmp 0x29cfa
movl $0x0, 0x18(%rsp)
jmp 0x2975b
movl $0x0, 0x14(%rsp)
jmp 0x2975b
incl %r13d
cmpl 0xc(%rsp), %r13d
jge 0x29858
movslq %r13d, %rax
movq 0x20(%rsp), %rcx
movq (%rcx,%rax,8), %rsi
movq %rbp, %rbx
movq %rbp, %rdi
leaq 0x1f(%rsp), %rdx
callq 0x182e0
movq %rbx, %rdi
leaq 0x50(%rsp), %rsi
callq 0x8148
movq 0x98(%rsp), %rdi
leaq 0xa8(%rsp), %rax
cmpq %rax, %rdi
je 0x2975b
movq 0xa8(%rsp), %rsi
incq %rsi
callq 0x53c0
jmp 0x2975b
incl %r13d
cmpl 0xc(%rsp), %r13d
jge 0x29945
movslq %r13d, %rax
movq 0x20(%rsp), %rcx
movq (%rcx,%rax,8), %rdi
callq 0x25d65
movaps %xmm0, %xmm1
xorps %xmm0, %xmm0
ucomiss %xmm1, %xmm0
ja 0x29ae6
ucomiss 0x97bd(%rip), %xmm1     # 0x33004
ja 0x29ae6
movss %xmm1, 0x10(%rsp)
jmp 0x2975b
movq 0x17791(%rip), %rcx     # 0x40ff0
movq (%rcx), %rax
movq -0x18(%rax), %rdi
addq %rcx, %rdi
movl $0xa, %esi
callq 0x53a0
movsbl %al, %esi
movq 0x17773(%rip), %rdi     # 0x40ff0
callq 0x5030
movq %rax, %rdi
callq 0x5250
movq %rax, %r15
movl $0x21, %edx
movq %rax, %rdi
leaq 0xb806(%rip), %rsi      # 0x350a2
callq 0x5420
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x53a0
movsbl %al, %esi
movq %r15, %rdi
callq 0x5030
movq %rax, %rdi
callq 0x5250
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x53a0
movsbl %al, %esi
movq %r15, %rdi
callq 0x5030
movq %rax, %rdi
callq 0x5250
jmp 0x29c43
incl %r13d
cmpl 0xc(%rsp), %r13d
jge 0x29a47
movslq %r13d, %rax
movq 0x20(%rsp), %rcx
movq (%rcx,%rax,8), %rbx
movq 0x38(%rsp), %rax
movq %rax, 0x90(%rsp)
movq %rbx, %rdi
callq 0x5180
leaq 0x30(%rsp), %rdi
xorl %esi, %esi
movq 0x90(%rsp), %rdx
movq %rbx, %rcx
movq %rax, %r8
callq 0x55e0
jmp 0x2975b
movq 0x176a4(%rip), %rcx     # 0x40ff0
movq (%rcx), %rax
movq -0x18(%rax), %rdi
addq %rcx, %rdi
movl $0xa, %esi
callq 0x53a0
movsbl %al, %esi
movq 0x17686(%rip), %rdi     # 0x40ff0
callq 0x5030
movq %rax, %rdi
callq 0x5250
movq %rax, %r15
movl $0x2d, %edx
movq %rax, %rdi
leaq 0xc02c(%rip), %rsi      # 0x359b5
callq 0x5420
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x53a0
movsbl %al, %esi
movq %r15, %rdi
callq 0x5030
movq %rax, %rdi
callq 0x5250
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x53a0
movsbl %al, %esi
movq %r15, %rdi
callq 0x5030
movq %rax, %rdi
callq 0x5250
jmp 0x29c43
incl %r13d
cmpl 0xc(%rsp), %r13d
jge 0x29ba9
movslq %r13d, %rax
movq 0x20(%rsp), %rcx
movq (%rcx,%rax,8), %rdi
callq 0x25cfc
movl %eax, 0x2c(%rsp)
testl %eax, %eax
jns 0x2975b
movq 0x175da(%rip), %rdi     # 0x40ff0
callq 0x5190
movq %rax, %r15
movl $0x2b, %edx
movq %rax, %rdi
leaq 0xc008(%rip), %rsi      # 0x35a35
callq 0x5420
movq %r15, %rdi
callq 0x5190
movq %rax, %rdi
callq 0x5190
jmp 0x29c43
movq 0x175a2(%rip), %rcx     # 0x40ff0
movq (%rcx), %rax
movq -0x18(%rax), %rdi
addq %rcx, %rdi
movl $0xa, %esi
callq 0x53a0
movsbl %al, %esi
movq 0x17584(%rip), %rdi     # 0x40ff0
callq 0x5030
movq %rax, %rdi
callq 0x5250
movq %rax, %r15
movl $0x1e, %edx
movq %rax, %rdi
leaq 0xb8a1(%rip), %rsi      # 0x3532c
callq 0x5420
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x53a0
movsbl %al, %esi
movq %r15, %rdi
callq 0x5030
movq %rax, %rdi
callq 0x5250
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x53a0
movsbl %al, %esi
movq %r15, %rdi
callq 0x5030
movq %rax, %rdi
callq 0x5250
jmp 0x29c43
movss %xmm1, 0x10(%rsp)
movq 0x174fd(%rip), %rcx     # 0x40ff0
movq (%rcx), %rax
movq -0x18(%rax), %rdi
addq %rcx, %rdi
movl $0xa, %esi
callq 0x53a0
movsbl %al, %esi
movq 0x174df(%rip), %rdi     # 0x40ff0
callq 0x5030
movq %rax, %rdi
callq 0x5250
movq %rax, %r15
movl $0x28, %edx
movq %rax, %rdi
leaq 0xbeb3(%rip), %rsi      # 0x359e3
callq 0x5420
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x53a0
movsbl %al, %esi
movq %r15, %rdi
callq 0x5030
movq %rax, %rdi
callq 0x5250
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x53a0
movsbl %al, %esi
movq %r15, %rdi
callq 0x5030
movq %rax, %rdi
callq 0x5250
jmp 0x29c43
movb $0x1, %al
movq %rax, 0x68(%rsp)
jmp 0x2975b
leaq 0x50(%rsp), %rdi
movq %r12, %rsi
callq 0x8528
jmp 0x2975b
movq 0x17440(%rip), %rcx     # 0x40ff0
movq (%rcx), %rax
movq -0x18(%rax), %rdi
addq %rcx, %rdi
movl $0xa, %esi
callq 0x53a0
movsbl %al, %esi
movq 0x17422(%rip), %rdi     # 0x40ff0
callq 0x5030
movq %rax, %rdi
callq 0x5250
movq %rax, %r15
movl $0x28, %edx
movq %rax, %rdi
leaq 0xbe1f(%rip), %rsi      # 0x35a0c
callq 0x5420
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x53a0
movsbl %al, %esi
movq %r15, %rdi
callq 0x5030
movq %rax, %rdi
callq 0x5250
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x53a0
movsbl %al, %esi
movq %r15, %rdi
callq 0x5030
movq %rax, %rdi
callq 0x5250
movl $0x1, %r15d
xorl %r14d, %r14d
jmp 0x2975b
movq %rax, %r15
cmpl $0x1, %edx
jne 0x2a216
movq %r15, %rdi
callq 0x5160
movq 0x17384(%rip), %rdi     # 0x40ff0
callq 0x5190
movq %rax, %r15
movl $0x28, %edx
movq %rax, %rdi
leaq 0xbd89(%rip), %rsi      # 0x35a0c
callq 0x5420
movq %r15, %rdi
callq 0x5190
movq %rax, %rdi
callq 0x5190
callq 0x5630
jmp 0x29c43
movq %rax, %r15
cmpl $0x1, %edx
jne 0x2a216
movq %r15, %rdi
callq 0x5160
movq 0x17336(%rip), %rdi     # 0x40ff0
callq 0x5190
movq %rax, %r15
movl $0x2d, %edx
movq %rax, %rdi
leaq 0xbce4(%rip), %rsi      # 0x359b5
callq 0x5420
movq %r15, %rdi
callq 0x5190
movq %rax, %rdi
callq 0x5190
callq 0x5630
jmp 0x29c43
leaq 0x40(%rsp), %r13
jmp 0x29e20
movq 0x58(%rsp), %rax
cmpq 0x50(%rsp), %rax
leaq 0x40(%rsp), %r13
je 0x29da8
movl 0x14(%rsp), %eax
orb 0x18(%rsp), %al
testb $0x1, %al
jne 0x29e56
movq 0x172ca(%rip), %rdi     # 0x40ff0
movq (%rdi), %rax
addq -0x18(%rax), %rdi
movl $0xa, %esi
callq 0x53a0
movsbl %al, %esi
movq 0x172af(%rip), %rdi     # 0x40ff0
callq 0x5030
movq %rax, %rdi
callq 0x5250
movq %rax, %rbx
leaq 0xbd0c(%rip), %rsi      # 0x35a64
movl $0x57, %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
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x53a0
jmp 0x29f5c
movq 0x17241(%rip), %rdi     # 0x40ff0
movq (%rdi), %rax
addq -0x18(%rax), %rdi
movl $0xa, %esi
callq 0x53a0
movsbl %al, %esi
movq 0x17226(%rip), %rdi     # 0x40ff0
callq 0x5030
movq %rax, %rdi
callq 0x5250
movq %rax, %rbx
leaq 0xb2f6(%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, %r15d
callq 0x2925b
leaq 0x50(%rsp), %rdi
callq 0xab8e
movq 0x30(%rsp), %rdi
cmpq %r13, %rdi
je 0x29e41
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x53c0
movl %r15d, %eax
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xbc5f(%rip), %rsi      # 0x35abc
leaq 0x30(%rsp), %rdi
callq 0x50f0
testl %eax, %eax
je 0x29ed8
movl 0x2c(%rsp), %ebp
callq 0x26352
movq 0x17145(%rip), %rbx     # 0x40fc0
leaq 0xbc63(%rip), %rsi      # 0x35ae5
movl $0x23, %edx
movq %rbx, %rdi
callq 0x5420
movq 0x50(%rsp), %r12
movq 0x58(%rsp), %rax
movq %rax, %rsi
subq %r12, %rsi
sarq $0x5, %rsi
movslq 0x17646(%rip), %rcx     # 0x414f0
cmpq %rcx, %rsi
jbe 0x29f7a
movq 0x17106(%rip), %rdi     # 0x40fc0
callq 0x5240
leaq 0xac2b(%rip), %rsi      # 0x34af1
movl $0x6, %edx
movq %rax, %rdi
callq 0x5420
jmp 0x29fb9
movq 0x17111(%rip), %rdi     # 0x40ff0
movq (%rdi), %rax
addq -0x18(%rax), %rdi
movl $0xa, %esi
callq 0x53a0
movsbl %al, %esi
movq 0x170f6(%rip), %rdi     # 0x40ff0
callq 0x5030
movq %rax, %rdi
callq 0x5250
movq %rax, %rbx
leaq 0xbbb1(%rip), %rsi      # 0x35ac2
movl $0x22, %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
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
movl $0x1, %r15d
movq %rax, %rdi
callq 0x5250
jmp 0x29e20
cmpq %rax, %r12
je 0x29fb9
movq 0x1703a(%rip), %r14     # 0x40fc0
leaq 0xa3fb(%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 0x58(%rsp), %r12
jne 0x29f8d
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x53a0
movsbl %al, %esi
movq 0x16fe9(%rip), %rdi     # 0x40fc0
callq 0x5030
movq %rax, %rdi
callq 0x5250
movq 0x16fd5(%rip), %rdi     # 0x40fc0
leaq 0xbb17(%rip), %rsi      # 0x35b09
movl $0x36, %edx
callq 0x5420
movq 0x16fbd(%rip), %rbx     # 0x40fc0
movq %rbx, %rdi
movl %ebp, %esi
callq 0x5690
movq %rax, %r14
leaq 0xbb29(%rip), %rsi      # 0x35b40
movl $0x28, %edx
movq %rax, %rdi
callq 0x5420
movss 0x9650(%rip), %xmm0     # 0x3367c
mulss 0x10(%rsp), %xmm0
cvtss2sd %xmm0, %xmm0
movq %r14, %rdi
callq 0x5610
movq %rax, %r14
leaq 0xbb21(%rip), %rsi      # 0x35b69
movl $0x34, %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, 0x14(%rsp)
je 0x2a0ef
movq 0x16f36(%rip), %rdi     # 0x40fc0
leaq 0xbb0d(%rip), %rsi      # 0x35b9e
movl $0x1d, %edx
callq 0x5420
movq 0x30(%rsp), %rsi
movq 0x38(%rsp), %rdx
movq 0x16f14(%rip), %rdi     # 0x40fc0
callq 0x5420
movq %rax, %r14
leaq 0x9982(%rip), %rsi      # 0x33a3d
movl $0xe, %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, 0x18(%rsp)
je 0x2a14e
movq 0x16ec3(%rip), %rdi     # 0x40fc0
leaq 0xbab8(%rip), %rsi      # 0x35bbc
movl $0x32, %edx
callq 0x5420
movq 0x30(%rsp), %rsi
movq 0x38(%rsp), %rdx
movq 0x16ea1(%rip), %rdi     # 0x40fc0
callq 0x5420
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 (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x53a0
movsbl %al, %esi
movq 0x16e54(%rip), %rdi     # 0x40fc0
callq 0x5030
movq %rax, %rdi
callq 0x5250
movzbl 0x14(%rsp), %esi
andl $0x1, %esi
movzbl 0x18(%rsp), %edx
andl $0x1, %edx
movzbl 0x68(%rsp), %r9d
andl $0x1, %r9d
leaq 0x30(%rsp), %rdi
leaq 0x50(%rsp), %rcx
movl %ebp, %r8d
movss 0x10(%rsp), %xmm0
callq 0x104fc
xorl %r15d, %r15d
testl %eax, %eax
setne %r15b
jmp 0x29e20
jmp 0x2a213
movq %rax, %r15
callq 0x5630
jmp 0x2a216
jmp 0x2a213
movq %rax, %r15
callq 0x5630
jmp 0x2a216
movq %rax, %rdi
callq 0x7d38
movq %rax, %r15
movq 0x98(%rsp), %rdi
leaq 0xa8(%rsp), %rax
cmpq %rax, %rdi
je 0x2a216
movq 0xa8(%rsp), %rsi
incq %rsi
callq 0x53c0
jmp 0x2a216
jmp 0x2a213
jmp 0x2a20e
movq %rax, %r15
jmp 0x2a25e
jmp 0x2a20e
movq %rax, %r15
jmp 0x2a238
movq %rax, %r15
movq 0x70(%rsp), %rdi
leaq 0x80(%rsp), %rax
cmpq %rax, %rdi
je 0x2a238
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x53c0
leaq 0x50(%rsp), %rdi
callq 0xab8e
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0x2a25e
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x53c0
movq %r15, %rdi
callq 0x56a0