// File: /workspace/github_cpp_makefile_star2_O3/ChnMasterOG[P]KmerGO2/kmergo/kmer_union.cpp
// Function: kmer_union(KmerGO_parameters&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&)
short kmer_union(KmerGO_parameters& p, std::string &loginfo)
{
	std::vector<std::string> files, ab_files, kmerdb_list, beacon_list, beacon_kmer;
	std::vector<uint64> ALLcounter;
	std::vector<float> ALLfcounter;
	uint32 files_number;
	uint32 i, j;
	uint64 k, Allkmernumber = 0;

	getFiles(p.kmercountings_path, ab_files, true);
	getFiles(p.kmercountings_path, files, false);
	files_number = files.size();

	for (i = 0; i < files_number; i++)
	{
		if (files[i].compare(files[i].length() - 8, 8, ".kmc_suf", 0, 8) == 0)
		{
			kmerdb_list.push_back(files[i].substr(0, files[i].length() - 8));
		}
	}

	if (kmerdb_list.size() * 2 < files_number)
	{
		loginfo = "The number of k-mer database is error.";
		return -1;
	}

	//count all k-mer counters and k-mer number
	CKMCFile kmer_data_base;
	CKmerAPI* kmer_object;
	uint64 temp, counter;
	uint32 _kmer_length = 4;
	for (i = 0; i < kmerdb_list.size(); i++)
	{
		temp = 0;
		if (!kmer_data_base.OpenForListing(joinPath(p.kmercountings_path, kmerdb_list[i])))
		{
			loginfo = "Can not open some k-mer database.";
			return -2;
		}
		_kmer_length = kmer_data_base.KmerLength();
		kmer_object = new CKmerAPI(_kmer_length);
		while (kmer_data_base.ReadNextKmer(*kmer_object, counter))
		{
			temp += counter;
			Allkmernumber++;
		}
		delete kmer_object;
		ALLcounter.push_back(temp);
		kmer_data_base.Close();
	}

	//divided to process_number blocks
	std::string temp_kmer;
	for (i = 0; i < p.process_number; i++)
	{
		temp_kmer = "";
		if (p.process_number < 40)	//distribute k-mer nonuniformly
			distribute_kmer_nonuniformly(0, i * 10000 / p.process_number, 10000, temp_kmer);
		else	//distribute k-mer uniformly
			distribute_kmer_uniformly(0, i * 256 / p.process_number, temp_kmer);
		for (j = 0; j < _kmer_length - 4; j++) temp_kmer += "A";
		beacon_list.push_back(temp_kmer);
	}
	temp_kmer = "TTTT";
	for (i = 0; i < _kmer_length - 4; i++) temp_kmer += "T";
	beacon_list.push_back(temp_kmer);
	
	// normalization coefficient
	short power = -5;
	for (i = 0; i < kmerdb_list.size(); i++)
	{
		j = 0;
		k = ALLcounter[i];
		while (k != 0)
		{
			k /= 10;
			j++;
		}
		if (power < (short)j - 4) power = j - 4;
	}
	for (i = 0; i < kmerdb_list.size(); i++)
	{
		if (power > 0) ALLfcounter.push_back(ALLcounter[i] / pow(10, power));
		else ALLfcounter.push_back(ALLcounter[i] * pow(10, -power));
	}

	//start threads
	std::vector<std::thread> sub_thread;
	for (i = 0; i < p.process_number; i++)
	{
		beacon_kmer.push_back(beacon_list[i]);
		beacon_kmer.push_back(beacon_list[i + 1]);
		sub_thread.push_back(std::thread(get_Son_Matrix, i, p, kmerdb_list, beacon_kmer, ALLfcounter));
		beacon_kmer.clear();
	}
	sub_thread.push_back(std::thread(show_Progress, Allkmernumber));
	for (i = 0; i < p.process_number; i++)
	{
		sub_thread[i].join();
	}
	sub_thread[p.process_number].join();

	switch (union_err_number)
	{
	case -11:
		loginfo = "Can not open some k-mer database in at least one thread.";
	case -12:
		loginfo = "Can not open output files in at least one thread.";
	default:
		break;
	}

	return union_err_number;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x2a8, %rsp            # imm = 0x2A8
movq %rsi, 0x38(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0xc0(%rsp)
xorl %eax, %eax
movq %rax, 0xd0(%rsp)
movq %rax, 0x1e0(%rsp)
movaps %xmm0, 0x1d0(%rsp)
movq %rax, 0x30(%rsp)
movaps %xmm0, 0x20(%rsp)
movq %rax, 0x110(%rsp)
movaps %xmm0, 0x100(%rsp)
movq %rax, 0xf0(%rsp)
movaps %xmm0, 0xe0(%rsp)
movq %rax, 0x90(%rsp)
movaps %xmm0, 0x80(%rsp)
movq %rax, 0x70(%rsp)
movaps %xmm0, 0x60(%rsp)
movq %rax, 0xd8(%rsp)
leaq 0x1c0(%rsp), %rbx
movq %rbx, -0x10(%rbx)
movq 0x40(%rdi), %rsi
movq %rdi, 0x10(%rsp)
movq 0x48(%rdi), %rdx
addq %rsi, %rdx
leaq 0x1b0(%rsp), %rdi
callq 0x408000
leaq 0x1b0(%rsp), %rdi
leaq 0x1d0(%rsp), %rsi
movl $0x1, %edx
callq 0x4078ac
movq 0x1b0(%rsp), %rdi
cmpq %rbx, %rdi
je 0x409e32
movq 0x1c0(%rsp), %rsi
incq %rsi
callq 0x41ae90
leaq 0x1a0(%rsp), %rbx
movq %rbx, -0x10(%rbx)
movq 0x10(%rsp), %rax
movq 0x40(%rax), %rsi
movq 0x48(%rax), %rdx
addq %rsi, %rdx
leaq 0x190(%rsp), %rdi
callq 0x408000
leaq 0x190(%rsp), %rdi
leaq 0xc0(%rsp), %rsi
xorl %edx, %edx
callq 0x4078ac
movq 0x190(%rsp), %rdi
cmpq %rbx, %rdi
je 0x409e8f
movq 0x1a0(%rsp), %rsi
incq %rsi
callq 0x41ae90
movq 0xc8(%rsp), %r14
subq 0xc0(%rsp), %r14
sarq $0x5, %r14
movl $0x0, 0xc(%rsp)
testl %r14d, %r14d
je 0x409fa2
leaq 0x1f8(%rsp), %rbx
xorl %eax, %eax
leaq 0x1e8(%rsp), %r12
movl %eax, %r15d
movq 0xc0(%rsp), %rbp
shlq $0x5, %r15
movq 0x8(%rbp,%r15), %r13
movq %rbx, 0x1e8(%rsp)
movq %r12, %rdi
leaq 0x1981dd(%rip), %rsi    # 0x5a20c9
leaq 0x1981de(%rip), %rdx    # 0x5a20d1
callq 0x408096
addq %r15, %rbp
addq $-0x8, %r13
movl $0x8, %edx
movl $0x8, %r9d
movq %rbp, %rdi
movq %r13, %rsi
movq %r12, %rcx
xorl %r8d, %r8d
callq 0x48dcc0
movl %eax, %ebp
movq 0x1e8(%rsp), %rdi
cmpq %rbx, %rdi
je 0x409f3a
movq 0x1f8(%rsp), %rsi
incq %rsi
callq 0x41ae90
testl %ebp, %ebp
jne 0x409f8f
movl 0xc(%rsp), %eax
movq 0xc0(%rsp), %rcx
shlq $0x5, %rax
leaq (%rcx,%rax), %rsi
movq 0x8(%rcx,%rax), %rcx
addq $-0x8, %rcx
movq %r12, %rdi
xorl %edx, %edx
callq 0x48e3a0
leaq 0x20(%rsp), %rdi
movq %r12, %rsi
callq 0x407d24
movq 0x1e8(%rsp), %rdi
cmpq %rbx, %rdi
je 0x409f8f
movq 0x1f8(%rsp), %rsi
incq %rsi
callq 0x41ae90
movl 0xc(%rsp), %eax
incl %eax
movl %eax, 0xc(%rsp)
cmpl %r14d, %eax
jb 0x409ec6
movq 0x28(%rsp), %rax
subq 0x20(%rsp), %rax
sarq $0x4, %rax
movl %r14d, %ecx
cmpq %rcx, %rax
jae 0x409fde
movq 0x38(%rsp), %rdi
movq 0x8(%rdi), %rdx
movw $0xffff, %bx            # imm = 0xFFFF
leaq 0x19838c(%rip), %rcx    # 0x5a2358
movl $0x26, %r8d
xorl %esi, %esi
callq 0x48c7c0
jmp 0x40a7cb
leaq 0x1e8(%rsp), %rdi
callq 0x4167d6
movl $0x0, 0xc(%rsp)
movq 0x28(%rsp), %rax
cmpq 0x20(%rsp), %rax
je 0x40a25a
leaq 0x130(%rsp), %r13
leaq 0x40(%rsp), %r14
leaq 0x1e8(%rsp), %rbx
leaq 0x188(%rsp), %r15
movq $0x0, 0x98(%rsp)
movq %r13, 0x120(%rsp)
movq 0x10(%rsp), %rax
movq 0x40(%rax), %rsi
movq 0x48(%rax), %rdx
addq %rsi, %rdx
leaq 0x120(%rsp), %rdi
callq 0x408000
movl 0xc(%rsp), %eax
movq 0x20(%rsp), %rcx
shlq $0x5, %rax
leaq 0x150(%rsp), %rdx
movq %rdx, 0x140(%rsp)
movq (%rcx,%rax), %rsi
movq 0x8(%rcx,%rax), %rdx
addq %rsi, %rdx
leaq 0x140(%rsp), %r12
movq %r12, %rdi
callq 0x408000
movq %r14, %rbp
movq %r14, %rdi
leaq 0x120(%rsp), %rsi
movq %r12, %rdx
callq 0x407aca
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x4165fe
movl %eax, %ebp
movq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rax
cmpq %rax, %rdi
je 0x40a0c9
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x41ae90
movq 0x140(%rsp), %rdi
leaq 0x150(%rsp), %rax
cmpq %rax, %rdi
je 0x40a0ee
movq 0x150(%rsp), %rsi
incq %rsi
callq 0x41ae90
movq 0x120(%rsp), %rdi
cmpq %r13, %rdi
je 0x40a10b
movq 0x130(%rsp), %rsi
incq %rsi
callq 0x41ae90
testb %bpl, %bpl
je 0x40a33e
movq %rbx, %rdi
callq 0x4172d8
movl %eax, %ebp
movl $0x18, %edi
callq 0x41bd50
movq %rax, %r12
testl %ebp, %ebp
je 0x40a189
movl %ebp, %eax
andl $0x3, %eax
movb $0x4, %cl
subb %al, %cl
testl %eax, %eax
movzbl %cl, %ecx
cmovel %eax, %ecx
movb %cl, 0xc(%r12)
movzbl %cl, %r13d
addl %ebp, %r13d
movl %r13d, %eax
andl $0x1f, %eax
shrl $0x5, %r13d
cmpl $0x1, %eax
sbbl $-0x1, %r13d
movl %r13d, 0x10(%r12)
shll $0x3, %r13d
movq %r13, %rdi
callq 0x41bd90
movq %rax, (%r12)
movq %rax, %rdi
xorl %esi, %esi
movq %r13, %rdx
callq 0x401098
leaq 0x130(%rsp), %r13
jmp 0x40a1a0
movq $0x0, (%r12)
movl $0x0, 0x10(%r12)
movb $0x0, 0xc(%r12)
movl %ebp, 0x8(%r12)
movq %rbx, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x416f24
testb %al, %al
je 0x40a1d1
movq 0x188(%rsp), %rax
addq %rax, 0x98(%rsp)
incq 0xd8(%rsp)
jmp 0x40a1a5
movq (%r12), %rdi
testq %rdi, %rdi
je 0x40a1df
callq 0x41aea0
movl $0x18, %esi
movq %r12, %rdi
callq 0x41ae90
movq 0x88(%rsp), %rsi
cmpq 0x90(%rsp), %rsi
je 0x40a217
movq 0x98(%rsp), %rax
movq %rax, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x88(%rsp)
jmp 0x40a22c
leaq 0x80(%rsp), %rdi
leaq 0x98(%rsp), %rdx
callq 0x40b774
movq %rbx, %rdi
callq 0x41713a
movl 0xc(%rsp), %eax
incl %eax
movl %eax, 0xc(%rsp)
movq 0x28(%rsp), %rcx
subq 0x20(%rsp), %rcx
sarq $0x5, %rcx
cmpq %rax, %rcx
ja 0x40a020
addl $-0x4, %ebp
jmp 0x40a25c
xorl %ebp, %ebp
leaq 0x50(%rsp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
movl $0x0, 0xc(%rsp)
movq 0x10(%rsp), %rax
cmpw $0x0, 0xc(%rax)
je 0x40a364
leaq 0x1bcc3b(%rip), %rbx    # 0x5c6eca
leaq 0x40(%rsp), %r15
leaq 0x100(%rsp), %r12
leaq 0x1aebaa(%rip), %r13    # 0x5b8e4d
movq 0x48(%rsp), %rdx
movq %r15, %rdi
xorl %esi, %esi
movq %rbx, %rcx
xorl %r8d, %r8d
callq 0x48c7c0
movq 0x10(%rsp), %rax
movzwl 0xc(%rax), %ecx
movl 0xc(%rsp), %eax
cmpl $0x27, %ecx
ja 0x40a2e7
imull $0x2710, %eax, %eax     # imm = 0x2710
xorl %edx, %edx
divl %ecx
xorl %edi, %edi
movl %eax, %esi
movl $0x2710, %edx           # imm = 0x2710
movq %r15, %rcx
callq 0x409baf
jmp 0x40a2fa
shll $0x8, %eax
xorl %edx, %edx
divl %ecx
xorl %edi, %edi
movl %eax, %esi
movq %r15, %rdx
callq 0x409ca5
testl %ebp, %ebp
je 0x40a311
movl %ebp, %r14d
movq %r15, %rdi
movq %r13, %rsi
callq 0x48d320
decl %r14d
jne 0x40a301
movq %r12, %rdi
movq %r15, %rsi
callq 0x40aee0
movl 0xc(%rsp), %eax
incl %eax
movl %eax, 0xc(%rsp)
movq 0x10(%rsp), %rcx
movzwl 0xc(%rcx), %ecx
cmpl %ecx, %eax
jb 0x40a2a3
movq 0x48(%rsp), %rdx
jmp 0x40a366
movq 0x38(%rsp), %rdi
movq 0x8(%rdi), %rdx
movw $0xfffe, %bx            # imm = 0xFFFE
leaq 0x19802d(%rip), %rcx    # 0x5a237f
movl $0x21, %r8d
xorl %esi, %esi
callq 0x48c7c0
jmp 0x40a7be
xorl %edx, %edx
leaq 0x198034(%rip), %rcx    # 0x5a23a1
leaq 0x40(%rsp), %rdi
movl $0x4, %r8d
xorl %esi, %esi
callq 0x48c7c0
movl $0x0, 0xc(%rsp)
testl %ebp, %ebp
je 0x40a3b0
leaq 0x1aeac3(%rip), %rbx    # 0x5b8e55
leaq 0x40(%rsp), %r15
movq %r15, %rdi
movq %rbx, %rsi
callq 0x48d320
movl 0xc(%rsp), %eax
incl %eax
movl %eax, 0xc(%rsp)
cmpl %ebp, %eax
jb 0x40a397
leaq 0x100(%rsp), %rdi
leaq 0x40(%rsp), %rsi
callq 0x40aee0
movq 0x20(%rsp), %rsi
movq 0x28(%rsp), %rdi
movq %rdi, %r8
subq %rsi, %r8
je 0x40a59d
sarq $0x5, %r8
xorl %r9d, %r9d
movw $0xfffb, %bp            # imm = 0xFFFB
movq 0x80(%rsp), %r10
movabsq $-0x3333333333333333, %r11 # imm = 0xCCCCCCCCCCCCCCCD
movq (%r10,%r9,8), %rcx
movl $0x0, %ebx
testq %rcx, %rcx
je 0x40a41a
xorl %ebx, %ebx
movq %rcx, %rax
mulq %r11
shrq $0x3, %rdx
incl %ebx
cmpq $0x9, %rcx
movq %rdx, %rcx
ja 0x40a405
movswl %bp, %ebp
movswl %bx, %eax
addl $-0x4, %eax
addl $-0x4, %ebx
cmpl %ebp, %eax
cmovgl %ebx, %ebp
incl %r9d
cmpq %r9, %r8
ja 0x40a3f5
movl $0x0, 0xc(%rsp)
cmpq %rsi, %rdi
je 0x40a59d
movswl %bp, %eax
cvtsi2sd %eax, %xmm0
movsd %xmm0, 0x180(%rsp)
negl %eax
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
movsd %xmm0, 0x178(%rsp)
xorl %eax, %eax
leaq 0x60(%rsp), %rbx
leaq 0xa0(%rsp), %r15
testw %bp, %bp
jle 0x40a4f7
movq 0x80(%rsp), %rcx
movsd (%rcx,%rax,8), %xmm0
unpcklps 0x197df2(%rip), %xmm0   # xmm0 = xmm0[0],mem[0],xmm0[1],mem[1]
subpd 0x197dfa(%rip), %xmm0   # 0x5a2290
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1            # xmm1 = xmm1[1],xmm0[1]
addsd %xmm0, %xmm1
movapd %xmm1, 0x160(%rsp)
movsd 0x197da5(%rip), %xmm0   # 0x5a2258
movsd 0x180(%rsp), %xmm1
callq 0x4ba6e0
movapd 0x160(%rsp), %xmm1
divsd %xmm0, %xmm1
xorps %xmm0, %xmm0
cvtsd2ss %xmm1, %xmm0
movss %xmm0, 0xa0(%rsp)
movq 0x68(%rsp), %rsi
cmpq 0x70(%rsp), %rsi
jne 0x40a560
movq %rbx, %rdi
movq %r15, %rdx
callq 0x40ba5c
jmp 0x40a56d
movq 0x80(%rsp), %rcx
movsd (%rcx,%rax,8), %xmm0
unpcklps 0x197d75(%rip), %xmm0   # xmm0 = xmm0[0],mem[0],xmm0[1],mem[1]
subpd 0x197d7d(%rip), %xmm0   # 0x5a2290
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1            # xmm1 = xmm1[1],xmm0[1]
addsd %xmm0, %xmm1
movapd %xmm1, 0x160(%rsp)
movsd 0x197d28(%rip), %xmm0   # 0x5a2258
movsd 0x178(%rsp), %xmm1
callq 0x4ba6e0
mulsd 0x160(%rsp), %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0xa0(%rsp)
movq 0x68(%rsp), %rsi
cmpq 0x70(%rsp), %rsi
je 0x40a590
movss %xmm0, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x68(%rsp)
movl 0xc(%rsp), %eax
incl %eax
movl %eax, 0xc(%rsp)
movq 0x28(%rsp), %rcx
subq 0x20(%rsp), %rcx
sarq $0x5, %rcx
cmpq %rax, %rcx
ja 0x40a475
jmp 0x40a59d
movq %rbx, %rdi
movq %r15, %rdx
callq 0x40ba5c
jmp 0x40a56d
xorps %xmm0, %xmm0
movaps %xmm0, 0xa0(%rsp)
movq $0x0, 0xb0(%rsp)
movl $0x0, 0xc(%rsp)
movq 0x10(%rsp), %rax
cmpw $0x0, 0xc(%rax)
je 0x40a6b5
xorl %eax, %eax
leaq 0xe0(%rsp), %rbx
leaq 0x18(%rsp), %r12
leaq 0xa0(%rsp), %r15
movl %eax, %esi
shlq $0x5, %rsi
addq 0x100(%rsp), %rsi
movq %rbx, %rdi
callq 0x40aee0
movl 0xc(%rsp), %esi
incl %esi
shlq $0x5, %rsi
addq 0x100(%rsp), %rsi
movq %rbx, %rdi
callq 0x40aee0
leaq 0x60(%rsp), %rax
movq %rax, (%rsp)
movq %r12, %rdi
leaq -0x2402(%rip), %rsi     # 0x408224
leaq 0xc(%rsp), %rdx
movq 0x10(%rsp), %rcx
leaq 0x20(%rsp), %r8
movq %rbx, %r9
callq 0x40af1e
movq %r15, %rdi
movq %r12, %rsi
callq 0x40caa6
cmpq $0x0, 0x18(%rsp)
jne 0x40a94d
movq 0xe0(%rsp), %r14
movq 0xe8(%rsp), %r13
cmpq %r14, %r13
je 0x40a69a
leaq 0x10(%r14), %rbp
movq -0x10(%rbp), %rdi
cmpq %rdi, %rbp
je 0x40a682
movq (%rbp), %rsi
incq %rsi
callq 0x41ae90
leaq 0x20(%rbp), %rax
addq $0x10, %rbp
cmpq %r13, %rbp
movq %rax, %rbp
jne 0x40a66d
movq %r14, 0xe8(%rsp)
movl 0xc(%rsp), %eax
incl %eax
movl %eax, 0xc(%rsp)
movq 0x10(%rsp), %rcx
movzwl 0xc(%rcx), %ecx
cmpl %ecx, %eax
jb 0x40a5e3
leaq 0x386(%rip), %rsi       # 0x40aa42
leaq 0x18(%rsp), %rdi
leaq 0xd8(%rsp), %rdx
callq 0x40afd4
leaq 0xa0(%rsp), %rdi
leaq 0x18(%rsp), %rsi
callq 0x40caa6
cmpq $0x0, 0x18(%rsp)
jne 0x40a94d
movl $0x0, 0xc(%rsp)
xorl %edi, %edi
movq 0x10(%rsp), %rax
cmpw $0x0, 0xc(%rax)
je 0x40a72f
movl %edi, %edi
shlq $0x3, %rdi
addq 0xa0(%rsp), %rdi
callq 0x48e910
movl 0xc(%rsp), %edi
incl %edi
movl %edi, 0xc(%rsp)
movq 0x10(%rsp), %rax
movzwl 0xc(%rax), %eax
cmpl %eax, %edi
jb 0x40a702
movq %rax, %rdi
shll $0x3, %edi
addq 0xa0(%rsp), %rdi
callq 0x48e910
movzwl 0x210f94(%rip), %eax    # 0x61b6da
cmpl $0xfff4, %eax           # imm = 0xFFF4
je 0x40a771
cmpl $0xfff5, %eax           # imm = 0xFFF5
jne 0x40a78e
movq 0x38(%rsp), %rdi
movq 0x8(%rdi), %rdx
leaq 0x197b6e(%rip), %rcx    # 0x5a22d2
movl $0x38, %r8d
xorl %esi, %esi
callq 0x48c7c0
movq 0x38(%rsp), %rdi
movq 0x8(%rdi), %rdx
leaq 0x197b96(%rip), %rcx    # 0x5a2317
movl $0x31, %r8d
xorl %esi, %esi
callq 0x48c7c0
movzwl 0x210f45(%rip), %ebx    # 0x61b6da
leaq 0xa0(%rsp), %rdi
callq 0x40b054
movq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rax
cmpq %rax, %rdi
je 0x40a7be
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x41ae90
leaq 0x1e8(%rsp), %rdi
callq 0x4167fa
movq 0x60(%rsp), %rdi
testq %rdi, %rdi
je 0x40a7e2
movq 0x70(%rsp), %rsi
subq %rdi, %rsi
callq 0x41ae90
movq 0x80(%rsp), %rdi
testq %rdi, %rdi
je 0x40a7ff
movq 0x90(%rsp), %rsi
subq %rdi, %rsi
callq 0x41ae90
leaq 0xe0(%rsp), %rdi
callq 0x407c2a
leaq 0x100(%rsp), %rdi
callq 0x407c2a
leaq 0x20(%rsp), %rdi
callq 0x407c2a
leaq 0x1d0(%rsp), %rdi
callq 0x407c2a
leaq 0xc0(%rsp), %rdi
callq 0x407c2a
movl %ebx, %eax
addq $0x2a8, %rsp            # imm = 0x2A8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x40a9b8
jmp 0x40a945
jmp 0x40a95a
jmp 0x40a96e
jmp 0x40a997
jmp 0x40a95a
jmp 0x40a997
jmp 0x40a997
movq %rax, %r15
movq 0x190(%rsp), %rdi
cmpq %rbx, %rdi
je 0x40a9c8
movq 0x1a0(%rsp), %rsi
jmp 0x40a98b
movq %rax, %r15
movq 0x1b0(%rsp), %rdi
cmpq %rbx, %rdi
je 0x40a9c8
movq 0x1c0(%rsp), %rsi
jmp 0x40a98b
jmp 0x40a96e
movq %rax, %r15
movl $0x18, %esi
movq %r12, %rdi
jmp 0x40a9b1
movq %rax, %r15
movq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rax
cmpq %rax, %rdi
je 0x40a8f9
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x41ae90
jmp 0x40a8f9
movq %rax, %r15
jmp 0x40a91e
movq %rax, %r15
movq 0x140(%rsp), %rdi
leaq 0x150(%rsp), %rax
cmpq %rax, %rdi
je 0x40a91e
movq 0x150(%rsp), %rsi
incq %rsi
callq 0x41ae90
movq 0x120(%rsp), %rdi
leaq 0x130(%rsp), %rax
cmpq %rax, %rdi
je 0x40a9bb
movq 0x130(%rsp), %rsi
jmp 0x40a9ae
jmp 0x40a9b8
jmp 0x40a95a
cmpq $0x0, 0x18(%rsp)
je 0x40a95a
callq 0x41bb60
jmp 0x40a95a
jmp 0x40a997
jmp 0x40a973
jmp 0x40a96e
movq %rax, %r15
leaq 0xa0(%rsp), %rdi
callq 0x40b054
jmp 0x40a99a
jmp 0x40a9b8
movq %rax, %r15
jmp 0x40a9c8
movq %rax, %r15
movq 0x1e8(%rsp), %rdi
cmpq %rbx, %rdi
je 0x40a9c8
movq 0x1f8(%rsp), %rsi
incq %rsi
callq 0x41ae90
jmp 0x40a9c8
jmp 0x40a997
movq %rax, %r15
movq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rax
cmpq %rax, %rdi
je 0x40a9bb
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x41ae90
jmp 0x40a9bb
movq %rax, %r15
leaq 0x1e8(%rsp), %rdi
callq 0x4167fa
movq 0x60(%rsp), %rdi
testq %rdi, %rdi
je 0x40a9df
movq 0x70(%rsp), %rsi
subq %rdi, %rsi
callq 0x41ae90
movq 0x80(%rsp), %rdi
testq %rdi, %rdi
je 0x40a9fc
movq 0x90(%rsp), %rsi
subq %rdi, %rsi
callq 0x41ae90
leaq 0xe0(%rsp), %rdi
callq 0x407c2a
leaq 0x100(%rsp), %rdi
callq 0x407c2a
leaq 0x20(%rsp), %rdi
callq 0x407c2a
leaq 0x1d0(%rsp), %rdi
callq 0x407c2a
leaq 0xc0(%rsp), %rdi
callq 0x407c2a
movq %r15, %rdi
callq 0x4bfce0