// File: /workspace/github_cpp_makefile_star2_O3/prophyle[P]prophasm/src/prophasm.cpp
// Function: main
int main (int argc, char* argv[])
{
	int32_t k=-1;

	std::string intersection_fn;
	std::vector<std::string> in_fns;
	std::vector<std::string> out_fns;
	std::string stats_fn;
	FILE *fstats=nullptr;

	if (argc<2){
		print_help();
		exit(1);
	}

	bool compute_intersection=false;
	bool compute_output=false;
	bool verbose=true;
	int32_t no_sets=0;

	int c;
	while ((c = getopt(argc, (char *const *)argv, "hSi:o:x:s:k:")) >= 0) {
		switch (c) {
			case 'h': {
				print_help();
				exit(0);
				break;
			}
			case 'i': {
				in_fns.push_back(std::string(optarg));
				no_sets+=1;
				break;
			}
			case 'o': {
				out_fns.push_back(std::string(optarg));
				compute_output=true;
				break;
			}
			case 'x': {
				intersection_fn=std::string(optarg);
				compute_intersection=true;
				break;
			}
			case 's': {
				stats_fn=std::string(optarg);
				if(stats_fn=="-"){
					fstats = stdin;
				}
				else {
					fstats = fopen(stats_fn.c_str(), "w+");
					test_file(fstats, stats_fn);
				}

				break;
			}
			case 'S': {
				verbose=false;

				break;
			}
			case 'k': {
				k = atoi(optarg);
				break;
			}
			case '?': {
				std::cerr<<"Unknown error"<<std::endl;
				exit(1);
				break;
			}
		}
	}

	if (k == -1){
		print_help();
		std::cerr << "K-mer size (-k) is required." << std::endl;
		return EXIT_FAILURE;
	}


	if (k <= 0 || max_allowed_kmer_length<k){
		std::cerr << "K-mer size must satisfy 1 <= k <= " << max_allowed_kmer_length << "." << std::endl;
		return EXIT_FAILURE;
	}

	if (compute_output && (static_cast<int32_t>(out_fns.size())!=no_sets)){
		std::cerr << "If -o is used, it must be used as many times as -i (" << no_sets << "!=" << out_fns.size() << ")." << std::endl;
		return EXIT_FAILURE;
	}

	if(fstats){
		fprintf(fstats,"# cmd: %s",argv[0]);

		for (int32_t i=1;i<argc;i++){
			fprintf(fstats," %s",argv[i]);
		}
		fprintf(fstats,"\n");
	}

	std::vector< std::unordered_set<nkmer_t> > full_sets(no_sets);

	if(verbose){
		std::cerr << "=====================" << std::endl;
		std::cerr << "1) Loading references" << std::endl;
		std::cerr << "=====================" << std::endl;
	}


	std::vector<int32_t> in_sizes;
	std::vector<int32_t> out_sizes;

	for(int32_t i=0;i<no_sets;i++){
		kmers_from_fasta(in_fns[i],full_sets[i],k,fstats,verbose);
		//debug_print_kmer_set(full_sets[i],k);
		in_sizes.insert(in_sizes.end(),full_sets[i].size());
	}

	if(verbose){
		std::cerr << "===============" << std::endl;
		std::cerr << "2) Intersecting" << std::endl;
		std::cerr << "===============" << std::endl;
	}


	std::unordered_set<nkmer_t> intersection;

	int32_t intersection_size = 0;

	if(compute_intersection){
		if (verbose){
			std::cerr << "2.1) Computing intersection" << std::endl;
		}

		find_intersection(full_sets, intersection);
		intersection_size  = intersection.size();
		if (verbose){
			std::cerr << "   intersection size: " <<  intersection_size << std::endl;
		}
		if(compute_output){
			if (verbose){
				std::cerr << "2.2) Removing this intersection from all kmer sets" << std::endl;
			}
			remove_subset(full_sets, intersection);
		}
	}

	if(compute_output){
		for (int32_t i=0;i<no_sets;i++){
			out_sizes.insert(out_sizes.end(),full_sets[i].size());
			assert(in_sizes[i]==out_sizes[i]+intersection_size);
			if (verbose){
				std::cerr << in_sizes[i] << " " << out_sizes[i] << " ...inter:" << intersection_size << std::endl;
			}
		}
	}

	if(verbose){
		std::cerr << "=============" << std::endl;
		std::cerr << "3) Assembling" << std::endl;
		std::cerr << "=============" << std::endl;
	}

	if(compute_output){
		for(int32_t i=0;i<static_cast<int32_t>(in_fns.size());i++){
			assemble(out_fns[i], full_sets[i], k, fstats, verbose);
		}
	}
	if(compute_intersection){
		assemble(intersection_fn, intersection, k, fstats, verbose);
	}

	if (fstats){
		fclose(fstats);
	}

	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x158, %rsp            # imm = 0x158
leaq 0x128(%rsp), %r14
movq %r14, -0x10(%r14)
xorl %eax, %eax
movq %rax, -0x8(%r14)
movb %al, (%r14)
movq %rax, 0xf0(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0xe0(%rsp)
movq %rax, 0xd0(%rsp)
movaps %xmm0, 0xc0(%rsp)
leaq 0x90(%rsp), %r13
movq %r13, -0x10(%r13)
movq %rax, -0x8(%r13)
movb %al, (%r13)
cmpl $0x2, %edi
jl 0x34e1
movq %rsi, %r15
movl %edi, %r12d
leaq 0x3c01(%rip), %rdx      # 0x64d0
callq 0x2070
testl %eax, %eax
js 0x2be1
movb $0x1, %cl
movl %ecx, (%rsp)
movq $0x0, 0x8(%rsp)
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
leaq 0x38(%rsp), %rbx
leaq 0x3715(%rip), %rbp      # 0x6010
leaq 0x138(%rsp), %r13
movl $0x0, 0x4(%rsp)
movq $0x0, 0x10(%rsp)
movq $0x0, 0x70(%rsp)
cmpl $0x67, %eax
movq %rcx, 0x18(%rsp)
jle 0x2985
leal -0x68(%rax), %ecx
cmpl $0xb, %ecx
ja 0x299a
movslq (%rbp,%rcx,4), %rax
addq %rbp, %rax
jmpq *%rax
movq 0x6680(%rip), %rax      # 0x8fc0
movq (%rax), %rsi
movq %rbx, %rdi
leaq 0x20(%rsp), %rdx
callq 0x38a4
leaq 0xe0(%rsp), %rdi
movq %rbx, %rsi
callq 0x4836
movq 0x38(%rsp), %rdi
leaq 0x48(%rsp), %rax
cmpq %rax, %rdi
je 0x297c
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x2230
incl 0x4(%rsp)
jmp 0x2b4b
cmpl $0x53, %eax
jne 0x2b32
movl $0x0, (%rsp)
jmp 0x2b4b
cmpl $0x78, %eax
jne 0x2b4b
movq 0x6616(%rip), %rax      # 0x8fc0
movq (%rax), %rsi
movq %rbx, %rdi
leaq 0x20(%rsp), %rdx
callq 0x38a4
leaq 0x118(%rsp), %rdi
movq %rbx, %rsi
callq 0x2290
movq 0x38(%rsp), %rdi
leaq 0x48(%rsp), %rax
cmpq %rax, %rdi
je 0x29e6
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x2230
movb $0x1, %al
movq %rax, 0x70(%rsp)
jmp 0x2b4b
movq 0x65c7(%rip), %rax      # 0x8fc0
movq (%rax), %rsi
movq %rbx, %rdi
leaq 0x20(%rsp), %rdx
callq 0x38a4
leaq 0xc0(%rsp), %rdi
movq %rbx, %rsi
callq 0x4836
movq 0x38(%rsp), %rdi
leaq 0x48(%rsp), %rax
cmpq %rax, %rdi
je 0x2a35
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x2230
movb $0x1, %al
movq %rax, 0x10(%rsp)
jmp 0x2b4b
movq 0x6578(%rip), %rax      # 0x8fc0
movq (%rax), %rdi
callq 0x2310
movq %rax, 0x18(%rsp)
jmp 0x2b4b
movq 0x655f(%rip), %rax      # 0x8fc0
movq (%rax), %rsi
movq %rbx, %rdi
leaq 0x20(%rsp), %rdx
callq 0x38a4
leaq 0x80(%rsp), %rdi
movq %rbx, %rsi
callq 0x2290
movq 0x38(%rsp), %rdi
leaq 0x48(%rsp), %rax
cmpq %rax, %rdi
je 0x2a9d
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x2230
leaq 0x80(%rsp), %rdi
leaq 0x3a31(%rip), %rsi      # 0x64dd
callq 0x2090
testl %eax, %eax
je 0x2b3c
movq 0x80(%rsp), %rdi
leaq 0x3a17(%rip), %rsi      # 0x64df
callq 0x2260
movq %rax, %r14
leaq 0x148(%rsp), %rax
movq %rax, 0x138(%rsp)
movq 0x80(%rsp), %rsi
movq 0x88(%rsp), %rdx
addq %rsi, %rdx
movq %r13, %rdi
callq 0x470a
movq %r14, 0x8(%rsp)
movq %r14, %rdi
movq %r13, %rsi
callq 0x2734
movq 0x138(%rsp), %rdi
leaq 0x148(%rsp), %rax
cmpq %rax, %rdi
je 0x2b4b
movq 0x148(%rsp), %rsi
incq %rsi
callq 0x2230
jmp 0x2b4b
cmpl $0x3f, %eax
jne 0x2b4b
jmp 0x349c
movq 0x648d(%rip), %rax      # 0x8fd0
movq (%rax), %rax
movq %rax, 0x8(%rsp)
movl %r12d, %edi
movq %r15, %rsi
leaq 0x3978(%rip), %rdx      # 0x64d0
callq 0x2070
testl %eax, %eax
movq 0x18(%rsp), %rcx
jns 0x291d
cmpl $-0x1, %ecx
leaq 0x128(%rsp), %r14
leaq 0x90(%rsp), %r13
je 0x2be1
leal -0x21(%rcx), %eax
cmpl $-0x21, %eax
ja 0x2c95
movq 0x645e(%rip), %rdi      # 0x8ff0
leaq 0x3974(%rip), %rsi      # 0x650d
movl $0x22, %edx
callq 0x2250
movq 0x6446(%rip), %rdi      # 0x8ff0
movl $0x20, %esi
callq 0x2370
movq %rax, %rbx
leaq 0x390a(%rip), %rsi      # 0x64c8
movl $0x1, %edx
movq %rax, %rdi
callq 0x2250
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x21f0
jmp 0x2c15
callq 0x253c
movq 0x6403(%rip), %rbx      # 0x8ff0
leaq 0x38fc(%rip), %rsi      # 0x64f0
movl $0x1c, %edx
movq %rbx, %rdi
callq 0x2250
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x21f0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2040
movl $0x1, %ebx
movq %rax, %rdi
callq 0x2170
movq 0x80(%rsp), %rdi
cmpq %r13, %rdi
je 0x2c4a
movq 0x90(%rsp), %rsi
incq %rsi
callq 0x2230
leaq 0xc0(%rsp), %rdi
callq 0x4632
leaq 0xe0(%rsp), %rdi
callq 0x4632
movq 0x118(%rsp), %rdi
cmpq %r14, %rdi
je 0x2c81
movq 0x128(%rsp), %rsi
incq %rsi
callq 0x2230
movl %ebx, %eax
addq $0x158, %rsp            # imm = 0x158
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
testb $0x1, 0x10(%rsp)
movl 0x4(%rsp), %ebp
je 0x2cbc
movq 0xc8(%rsp), %rax
subq 0xc0(%rsp), %rax
shrq $0x5, %rax
cmpl %eax, %ebp
jne 0x30d2
movq 0x8(%rsp), %r13
testq %r13, %r13
je 0x2d10
movq (%r15), %rdx
leaq 0x3898(%rip), %rsi      # 0x6568
movq %r13, %rdi
xorl %eax, %eax
callq 0x22e0
movl %r12d, %r14d
movl $0x1, %r12d
leaq 0x3884(%rip), %rbx      # 0x656e
movq (%r15,%r12,8), %rdx
movq %r13, %rdi
movq %rbx, %rsi
xorl %eax, %eax
callq 0x22e0
incq %r12
cmpq %r12, %r14
jne 0x2cea
movl $0xa, %edi
movq %r13, %rsi
callq 0x22a0
movslq %ebp, %rsi
leaq 0x20(%rsp), %rdi
leaq 0x38(%rsp), %rdx
callq 0x38e2
testb $0x1, (%rsp)
je 0x2dfe
movq 0x62bd(%rip), %rbx      # 0x8ff0
leaq 0x3838(%rip), %rsi      # 0x6572
movl $0x15, %edx
movq %rbx, %rdi
callq 0x2250
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x21f0
movsbl %al, %esi
movq 0x628b(%rip), %rdi      # 0x8ff0
callq 0x2040
movq %rax, %rdi
callq 0x2170
movq 0x6277(%rip), %rbx      # 0x8ff0
leaq 0x3808(%rip), %rsi      # 0x6588
movl $0x15, %edx
movq %rbx, %rdi
callq 0x2250
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x21f0
movsbl %al, %esi
movq 0x6245(%rip), %rdi      # 0x8ff0
callq 0x2040
movq %rax, %rdi
callq 0x2170
movq 0x6231(%rip), %rbx      # 0x8ff0
leaq 0x37ac(%rip), %rsi      # 0x6572
movl $0x15, %edx
movq %rbx, %rdi
callq 0x2250
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x21f0
movsbl %al, %esi
movq 0x61ff(%rip), %rdi      # 0x8ff0
callq 0x2040
movq %rax, %rdi
callq 0x2170
xorps %xmm0, %xmm0
movaps %xmm0, 0x100(%rsp)
xorl %eax, %eax
movq %rax, 0x110(%rsp)
movq %rax, 0xb0(%rsp)
movaps %xmm0, 0xa0(%rsp)
testl %ebp, %ebp
jle 0x2ea3
movl 0x4(%rsp), %r14d
shlq $0x5, %r14
movl $0x18, %r13d
xorl %ebp, %ebp
movzbl (%rsp), %ebx
andl $0x1, %ebx
leaq 0x100(%rsp), %r15
leaq 0x38(%rsp), %r12
movq 0xe0(%rsp), %rdi
addq %rbp, %rdi
movq 0x20(%rsp), %rax
leaq (%rax,%r13), %rsi
addq $-0x18, %rsi
movq 0x18(%rsp), %rdx
movq 0x8(%rsp), %rcx
movl %ebx, %r8d
callq 0x3986
movq 0x108(%rsp), %rsi
movq 0x20(%rsp), %rax
movl (%rax,%r13), %eax
movl %eax, 0x38(%rsp)
movq %r15, %rdi
movq %r12, %rdx
callq 0x4e4e
addq $0x20, %rbp
addq $0x38, %r13
cmpq %rbp, %r14
jne 0x2e4c
testb $0x1, (%rsp)
je 0x2f7f
movq 0x613c(%rip), %rbx      # 0x8ff0
leaq 0x36bd(%rip), %rsi      # 0x6578
movl $0xf, %edx
movq %rbx, %rdi
callq 0x2250
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x21f0
movsbl %al, %esi
movq 0x610a(%rip), %rdi      # 0x8ff0
callq 0x2040
movq %rax, %rdi
callq 0x2170
movq 0x60f6(%rip), %rbx      # 0x8ff0
leaq 0x369d(%rip), %rsi      # 0x659e
movl $0xf, %edx
movq %rbx, %rdi
callq 0x2250
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x21f0
movsbl %al, %esi
movq 0x60c4(%rip), %rdi      # 0x8ff0
callq 0x2040
movq %rax, %rdi
callq 0x2170
movq 0x60b0(%rip), %rbx      # 0x8ff0
leaq 0x3631(%rip), %rsi      # 0x6578
movl $0xf, %edx
movq %rbx, %rdi
callq 0x2250
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x21f0
movsbl %al, %esi
movq 0x607e(%rip), %rdi      # 0x8ff0
callq 0x2040
movq %rax, %rdi
callq 0x2170
leaq 0x68(%rsp), %rax
movq %rax, -0x30(%rax)
movq $0x1, -0x28(%rax)
xorps %xmm0, %xmm0
movups %xmm0, -0x20(%rax)
movl $0x3f800000, -0x10(%rax) # imm = 0x3F800000
movups %xmm0, -0x8(%rax)
xorl %ebx, %ebx
movq 0x10(%rsp), %rax
movl %eax, %r14d
testb $0x1, 0x70(%rsp)
leaq 0x90(%rsp), %r13
movl 0x4(%rsp), %ebp
je 0x3178
testb $0x1, (%rsp)
je 0x300f
movq 0x6020(%rip), %rbx      # 0x8ff0
leaq 0x35d7(%rip), %rsi      # 0x65ae
movl $0x1b, %edx
movq %rbx, %rdi
callq 0x2250
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x21f0
movsbl %al, %esi
movq 0x5fee(%rip), %rdi      # 0x8ff0
callq 0x2040
movq %rax, %rdi
callq 0x2170
leaq 0x20(%rsp), %rdi
leaq 0x38(%rsp), %rsi
callq 0x3f02
movl 0x50(%rsp), %ebx
testb $0x1, (%rsp)
je 0x315b
movq 0x5fbd(%rip), %rdi      # 0x8ff0
leaq 0x3590(%rip), %rsi      # 0x65ca
movl $0x16, %edx
callq 0x2250
movq 0x5fa5(%rip), %rdi      # 0x8ff0
movl %ebx, %esi
callq 0x2370
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x21f0
movsbl %al, %esi
movq %r15, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2170
testb $0x1, 0x10(%rsp)
je 0x32ab
movq 0x5f62(%rip), %r15      # 0x8ff0
leaq 0x354c(%rip), %rsi      # 0x65e1
movl $0x32, %edx
movq %r15, %rdi
callq 0x2250
movq (%r15), %rax
addq -0x18(%rax), %r15
movq %r15, %rdi
movl $0xa, %esi
callq 0x21f0
movsbl %al, %esi
movq 0x5f30(%rip), %rdi      # 0x8ff0
callq 0x2040
movq %rax, %rdi
callq 0x2170
jmp 0x3166
movq 0x5f17(%rip), %rdi      # 0x8ff0
leaq 0x3450(%rip), %rsi      # 0x6530
movl $0x34, %edx
callq 0x2250
movq 0x5eff(%rip), %rdi      # 0x8ff0
movl %ebp, %esi
callq 0x2370
movq %rax, %rbx
leaq 0x3463(%rip), %rsi      # 0x6565
movl $0x2, %edx
movq %rax, %rdi
callq 0x2250
movq 0xc8(%rsp), %rsi
subq 0xc0(%rsp), %rsi
sarq $0x5, %rsi
movq %rbx, %rdi
callq 0x2160
movq %rax, %rbx
leaq 0x3392(%rip), %rsi      # 0x64c7
movl $0x2, %edx
movq %rax, %rdi
callq 0x2250
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x21f0
jmp 0x2c15
testb $0x1, 0x10(%rsp)
je 0x329f
movb $0x1, %r14b
leaq 0x20(%rsp), %rdi
leaq 0x38(%rsp), %rsi
callq 0x4047
movl %r14d, 0x78(%rsp)
testl %ebp, %ebp
setle %al
movq 0x10(%rsp), %rcx
notb %cl
orb %al, %cl
testb $0x1, %cl
jne 0x3288
movl %ebp, %r14d
movl $0x18, %r13d
xorl %r15d, %r15d
leaq 0x7c(%rsp), %r12
movq 0xa8(%rsp), %rsi
movq 0x20(%rsp), %rax
movl (%rax,%r13), %eax
movl %eax, 0x7c(%rsp)
leaq 0xa0(%rsp), %rdi
movq %r12, %rdx
callq 0x4e4e
movq 0x100(%rsp), %rax
movl (%rax,%r15,4), %esi
movq 0xa0(%rsp), %rax
movl (%rax,%r15,4), %eax
addl %ebx, %eax
cmpl %eax, %esi
jne 0x34c2
testb $0x1, (%rsp)
je 0x3278
movq 0x5df3(%rip), %rdi      # 0x8ff0
callq 0x2370
movq %rax, %rbp
movl $0x1, %edx
movq %rax, %rdi
leaq 0x32b1(%rip), %rsi      # 0x64c5
callq 0x2250
movq 0xa0(%rsp), %rax
movl (%rax,%r15,4), %esi
movq %rbp, %rdi
callq 0x2370
movq %rax, %rbp
movl $0xa, %edx
movq %rax, %rdi
leaq 0x3425(%rip), %rsi      # 0x6664
callq 0x2250
movq %rbp, %rdi
movl %ebx, %esi
callq 0x2370
movq %rax, %rbp
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbp, %rdi
movl $0xa, %esi
callq 0x21f0
movsbl %al, %esi
movq %rbp, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2170
incq %r15
addq $0x38, %r13
cmpq %r15, %r14
jne 0x31a5
testb $0x1, (%rsp)
leaq 0x90(%rsp), %r13
movl 0x78(%rsp), %ebp
jne 0x32ad
jmp 0x337f
movl $0x0, (%rsp)
jmp 0x33ff
xorl %ebp, %ebp
movq 0x5d3c(%rip), %rbx      # 0x8ff0
leaq 0x32bf(%rip), %rsi      # 0x657a
movl $0xd, %edx
movq %rbx, %rdi
callq 0x2250
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x21f0
movsbl %al, %esi
movq 0x5d0a(%rip), %rdi      # 0x8ff0
callq 0x2040
movq %rax, %rdi
callq 0x2170
movq 0x5cf6(%rip), %rbx      # 0x8ff0
leaq 0x336e(%rip), %rsi      # 0x666f
movl $0xd, %edx
movq %rbx, %rdi
callq 0x2250
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x21f0
movsbl %al, %esi
movq 0x5cc4(%rip), %rdi      # 0x8ff0
callq 0x2040
movq %rax, %rdi
callq 0x2170
movq 0x5cb0(%rip), %rbx      # 0x8ff0
leaq 0x3233(%rip), %rsi      # 0x657a
movl $0xd, %edx
movq %rbx, %rdi
callq 0x2250
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x21f0
movsbl %al, %esi
movq 0x5c7e(%rip), %rdi      # 0x8ff0
callq 0x2040
movq %rax, %rdi
callq 0x2170
testb $0x1, %bpl
je 0x33f8
movq 0xe8(%rsp), %rax
subq 0xe0(%rsp), %rax
shrq $0x5, %rax
testl %eax, %eax
jle 0x33f8
xorl %r14d, %r14d
movzbl (%rsp), %ebx
andl $0x1, %ebx
xorl %r15d, %r15d
xorl %r12d, %r12d
movq 0xc0(%rsp), %rdi
addq %r15, %rdi
movq 0x20(%rsp), %rsi
addq %r14, %rsi
movq 0x18(%rsp), %rdx
movq 0x8(%rsp), %rcx
movl %ebx, %r8d
callq 0x40c7
incq %r12
movq 0xe8(%rsp), %rax
subq 0xe0(%rsp), %rax
shrq $0x5, %rax
cltq
addq $0x20, %r15
addq $0x38, %r14
cmpq %rax, %r12
jl 0x33ad
testb $0x1, 0x70(%rsp)
je 0x3424
movzbl (%rsp), %r8d
andl $0x1, %r8d
leaq 0x118(%rsp), %rdi
leaq 0x38(%rsp), %rsi
movq 0x18(%rsp), %rdx
movq 0x8(%rsp), %rcx
callq 0x40c7
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x3433
callq 0x2210
leaq 0x38(%rsp), %rdi
callq 0x4690
movq 0xa0(%rsp), %rdi
testq %rdi, %rdi
leaq 0x128(%rsp), %r14
je 0x3462
movq 0xb0(%rsp), %rsi
subq %rdi, %rsi
callq 0x2230
movq 0x100(%rsp), %rdi
testq %rdi, %rdi
je 0x347f
movq 0x110(%rsp), %rsi
subq %rdi, %rsi
callq 0x2230
leaq 0x20(%rsp), %rdi
callq 0x45ea
xorl %ebx, %ebx
jmp 0x2c2d
callq 0x253c
xorl %edi, %edi
callq 0x2280
movq 0x5b4d(%rip), %rdi      # 0x8ff0
leaq 0x3038(%rip), %rsi      # 0x64e2
movl $0xd, %edx
callq 0x2250
movq 0x5b35(%rip), %rdi      # 0x8ff0
callq 0x2100
jmp 0x34e6
leaq 0x314b(%rip), %rdi      # 0x6614
leaq 0x3170(%rip), %rsi      # 0x6640
leaq 0x3176(%rip), %rcx      # 0x664d
movl $0x2b7, %edx            # imm = 0x2B7
callq 0x2140
callq 0x253c
movl $0x1, %edi
callq 0x2280
jmp 0x35bd
jmp 0x35bd
jmp 0x3565
movq %rax, %rbx
jmp 0x35b1
jmp 0x356a
jmp 0x356a
jmp 0x356a
movq %rax, %rbx
movq 0x138(%rsp), %rdi
leaq 0x148(%rsp), %rax
cmpq %rax, %rdi
je 0x35c0
movq 0x148(%rsp), %rsi
jmp 0x3555
jmp 0x35bd
jmp 0x35bd
jmp 0x353e
jmp 0x35bd
movq %rax, %rbx
movq 0x38(%rsp), %rdi
leaq 0x48(%rsp), %rax
cmpq %rax, %rdi
je 0x35c0
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x2230
jmp 0x35c0
jmp 0x35bd
jmp 0x35bd
jmp 0x3565
movq %rax, %rbx
jmp 0x3577
movq %rax, %rbx
leaq 0x38(%rsp), %rdi
callq 0x4690
movq 0xa0(%rsp), %rdi
testq %rdi, %rdi
je 0x3594
movq 0xb0(%rsp), %rsi
subq %rdi, %rsi
callq 0x2230
movq 0x100(%rsp), %rdi
testq %rdi, %rdi
je 0x35b1
movq 0x110(%rsp), %rsi
subq %rdi, %rsi
callq 0x2230
leaq 0x20(%rsp), %rdi
callq 0x45ea
jmp 0x35c0
movq %rax, %rbx
movq 0x80(%rsp), %rdi
leaq 0x90(%rsp), %rax
cmpq %rax, %rdi
je 0x35e5
movq 0x90(%rsp), %rsi
incq %rsi
callq 0x2230
leaq 0xc0(%rsp), %rdi
callq 0x4632
leaq 0xe0(%rsp), %rdi
callq 0x4632
movq 0x118(%rsp), %rdi
leaq 0x128(%rsp), %rax
cmpq %rax, %rdi
je 0x3624
movq 0x128(%rsp), %rsi
incq %rsi
callq 0x2230
movq %rbx, %rdi
callq 0x2380