// File: /workspace/github_cpp_makefile_star2_O1/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 0x40805e
leaq 0x1b0(%rsp), %rdi
leaq 0x1d0(%rsp), %rsi
movl $0x1, %edx
callq 0x407914
movq 0x1b0(%rsp), %rdi
cmpq %rbx, %rdi
je 0x40a20e
movq 0x1c0(%rsp), %rsi
incq %rsi
callq 0x41b3a0
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 0x40805e
leaq 0x190(%rsp), %rdi
leaq 0xc0(%rsp), %rsi
xorl %edx, %edx
callq 0x407914
movq 0x190(%rsp), %rdi
cmpq %rbx, %rdi
je 0x40a26b
movq 0x1a0(%rsp), %rsi
incq %rsi
callq 0x41b3a0
movq 0xc8(%rsp), %r14
subq 0xc0(%rsp), %r14
sarq $0x5, %r14
movl $0x0, 0xc(%rsp)
testl %r14d, %r14d
je 0x40a37e
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 0x198e01(%rip), %rsi    # 0x5a30c9
leaq 0x198e02(%rip), %rdx    # 0x5a30d1
callq 0x4080ee
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 0x48e1d0
movl %eax, %ebp
movq 0x1e8(%rsp), %rdi
cmpq %rbx, %rdi
je 0x40a316
movq 0x1f8(%rsp), %rsi
incq %rsi
callq 0x41b3a0
testl %ebp, %ebp
jne 0x40a36b
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 0x48e8b0
leaq 0x20(%rsp), %rdi
movq %r12, %rsi
callq 0x407d8a
movq 0x1e8(%rsp), %rdi
cmpq %rbx, %rdi
je 0x40a36b
movq 0x1f8(%rsp), %rsi
incq %rsi
callq 0x41b3a0
movl 0xc(%rsp), %eax
incl %eax
movl %eax, 0xc(%rsp)
cmpl %r14d, %eax
jb 0x40a2a2
movq 0x28(%rsp), %rax
subq 0x20(%rsp), %rax
sarq $0x4, %rax
movl %r14d, %ecx
cmpq %rcx, %rax
jae 0x40a3ba
movq 0x38(%rsp), %rdi
movq 0x8(%rdi), %rdx
movw $0xffff, %bx            # imm = 0xFFFF
leaq 0x198fb0(%rip), %rcx    # 0x5a3358
movl $0x26, %r8d
xorl %esi, %esi
callq 0x48ccd0
jmp 0x40abb2
leaq 0x1e8(%rsp), %rdi
callq 0x416c52
movl $0x0, 0xc(%rsp)
movq 0x28(%rsp), %rax
cmpq 0x20(%rsp), %rax
je 0x40a636
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 0x40805e
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 0x40805e
movq %r14, %rbp
movq %r14, %rdi
leaq 0x120(%rsp), %rsi
movq %r12, %rdx
callq 0x407b32
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x416a7a
movl %eax, %ebp
movq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rax
cmpq %rax, %rdi
je 0x40a4a5
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x41b3a0
movq 0x140(%rsp), %rdi
leaq 0x150(%rsp), %rax
cmpq %rax, %rdi
je 0x40a4ca
movq 0x150(%rsp), %rsi
incq %rsi
callq 0x41b3a0
movq 0x120(%rsp), %rdi
cmpq %r13, %rdi
je 0x40a4e7
movq 0x130(%rsp), %rsi
incq %rsi
callq 0x41b3a0
testb %bpl, %bpl
je 0x40a7e7
movq %rbx, %rdi
callq 0x417730
movl %eax, %ebp
movl $0x18, %edi
callq 0x41c260
movq %rax, %r12
testl %ebp, %ebp
je 0x40a565
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 0x41c2a0
movq %rax, (%r12)
movq %rax, %rdi
xorl %esi, %esi
movq %r13, %rdx
callq 0x401098
leaq 0x130(%rsp), %r13
jmp 0x40a57c
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 0x417396
testb %al, %al
je 0x40a5ad
movq 0x188(%rsp), %rax
addq %rax, 0x98(%rsp)
incq 0xd8(%rsp)
jmp 0x40a581
movq (%r12), %rdi
testq %rdi, %rdi
je 0x40a5bb
callq 0x41b3b0
movl $0x18, %esi
movq %r12, %rdi
callq 0x41b3a0
movq 0x88(%rsp), %rsi
cmpq 0x90(%rsp), %rsi
je 0x40a5f3
movq 0x98(%rsp), %rax
movq %rax, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x88(%rsp)
jmp 0x40a608
leaq 0x80(%rsp), %rdi
leaq 0x98(%rsp), %rdx
callq 0x40ba10
movq %rbx, %rdi
callq 0x417592
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 0x40a3fc
addl $-0x4, %ebp
jmp 0x40a638
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 0x40a713
leaq 0x1bd83f(%rip), %rbx    # 0x5c7eaa
leaq 0x40(%rsp), %r15
leaq 0x100(%rsp), %r12
leaq 0x1af7ae(%rip), %r13    # 0x5b9e2d
movq 0x48(%rsp), %rdx
movq %r15, %rdi
xorl %esi, %esi
movq %rbx, %rcx
xorl %r8d, %r8d
callq 0x48ccd0
movq 0x10(%rsp), %rax
movzwl 0xc(%rax), %ecx
movl 0xc(%rsp), %eax
cmpl $0x27, %ecx
ja 0x40a6c3
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 0x409f8d
jmp 0x40a6d6
shll $0x8, %eax
xorl %edx, %edx
divl %ecx
xorl %edi, %edi
movl %eax, %esi
movq %r15, %rdx
callq 0x40a081
testl %ebp, %ebp
je 0x40a6ed
movl %ebp, %r14d
movq %r15, %rdi
movq %r13, %rsi
callq 0x48d830
decl %r14d
jne 0x40a6dd
movq %r12, %rdi
movq %r15, %rsi
callq 0x40b16e
movl 0xc(%rsp), %eax
incl %eax
movl %eax, 0xc(%rsp)
movq 0x10(%rsp), %rcx
movzwl 0xc(%rcx), %ecx
cmpl %ecx, %eax
jb 0x40a67f
leaq 0x40(%rsp), %rdi
movq 0x8(%rdi), %rdx
leaq 0x198c7e(%rip), %rcx    # 0x5a33a1
movl $0x4, %r8d
xorl %esi, %esi
callq 0x48ccd0
movl $0x0, 0xc(%rsp)
testl %ebp, %ebp
je 0x40a761
leaq 0x1af6f2(%rip), %rbx    # 0x5b9e35
leaq 0x40(%rsp), %r15
movq %r15, %rdi
movq %rbx, %rsi
callq 0x48d830
movl 0xc(%rsp), %eax
incl %eax
movl %eax, 0xc(%rsp)
cmpl %ebp, %eax
jb 0x40a748
leaq 0x100(%rsp), %rdi
leaq 0x40(%rsp), %rsi
callq 0x40b16e
movq 0x28(%rsp), %rsi
movq 0x20(%rsp), %rax
subq %rax, %rsi
je 0x40a80d
sarq $0x5, %rsi
xorl %edi, %edi
movw $0xfffb, %bp            # imm = 0xFFFB
movq 0x80(%rsp), %r8
movabsq $-0x3333333333333333, %r9 # imm = 0xCCCCCCCCCCCCCCCD
movq (%r8,%rdi,8), %rcx
movl $0x0, %r10d
testq %rcx, %rcx
je 0x40a7ca
xorl %r10d, %r10d
movq %rcx, %rax
mulq %r9
shrq $0x3, %rdx
incl %r10d
cmpq $0x9, %rcx
movq %rdx, %rcx
ja 0x40a7b4
movswl %bp, %ebp
movswl %r10w, %eax
addl $-0x4, %eax
addl $-0x4, %r10d
cmpl %ebp, %eax
cmovgl %r10d, %ebp
incl %edi
cmpq %rdi, %rsi
ja 0x40a7a2
jmp 0x40a811
movq 0x38(%rsp), %rdi
movq 0x8(%rdi), %rdx
movw $0xfffe, %bx            # imm = 0xFFFE
leaq 0x198b84(%rip), %rcx    # 0x5a337f
movl $0x21, %r8d
xorl %esi, %esi
callq 0x48ccd0
jmp 0x40aba5
movw $0xfffb, %bp            # imm = 0xFFFB
movl $0x0, 0xc(%rsp)
movq 0x28(%rsp), %rax
cmpq 0x20(%rsp), %rax
je 0x40a982
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 0x40a8dc
movq 0x80(%rsp), %rcx
movsd (%rcx,%rax,8), %xmm0
unpcklps 0x198a0d(%rip), %xmm0   # xmm0 = xmm0[0],mem[0],xmm0[1],mem[1]
subpd 0x198a15(%rip), %xmm0   # 0x5a3290
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1            # xmm1 = xmm1[1],xmm0[1]
addsd %xmm0, %xmm1
movapd %xmm1, 0x160(%rsp)
movsd 0x1989c0(%rip), %xmm0   # 0x5a3258
movsd 0x180(%rsp), %xmm1
callq 0x4babf0
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 0x40a945
movq %rbx, %rdi
movq %r15, %rdx
callq 0x40bd30
jmp 0x40a952
movq 0x80(%rsp), %rcx
movsd (%rcx,%rax,8), %xmm0
unpcklps 0x198990(%rip), %xmm0   # xmm0 = xmm0[0],mem[0],xmm0[1],mem[1]
subpd 0x198998(%rip), %xmm0   # 0x5a3290
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1            # xmm1 = xmm1[1],xmm0[1]
addsd %xmm0, %xmm1
movapd %xmm1, 0x160(%rsp)
movsd 0x198943(%rip), %xmm0   # 0x5a3258
movsd 0x178(%rsp), %xmm1
callq 0x4babf0
mulsd 0x160(%rsp), %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0xa0(%rsp)
movq 0x68(%rsp), %rsi
cmpq 0x70(%rsp), %rsi
je 0x40a975
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 0x40a85a
jmp 0x40a982
movq %rbx, %rdi
movq %r15, %rdx
callq 0x40bd30
jmp 0x40a952
xorps %xmm0, %xmm0
movaps %xmm0, 0xa0(%rsp)
movq $0x0, 0xb0(%rsp)
movl $0x0, 0xc(%rsp)
movq 0x10(%rsp), %rax
cmpw $0x0, 0xc(%rax)
je 0x40aa9a
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 0x40b16e
movl 0xc(%rsp), %esi
incl %esi
shlq $0x5, %rsi
addq 0x100(%rsp), %rsi
movq %rbx, %rdi
callq 0x40b16e
leaq 0x60(%rsp), %rax
movq %rax, (%rsp)
movq %r12, %rdi
leaq -0x2793(%rip), %rsi     # 0x408278
leaq 0xc(%rsp), %rdx
movq 0x10(%rsp), %rcx
leaq 0x20(%rsp), %r8
movq %rbx, %r9
callq 0x40b1ac
movq %r15, %rdi
movq %r12, %rsi
callq 0x40cda2
cmpq $0x0, 0x18(%rsp)
jne 0x40ad34
movq 0xe0(%rsp), %r14
movq 0xe8(%rsp), %r13
cmpq %r14, %r13
je 0x40aa7f
leaq 0x10(%r14), %rbp
movq -0x10(%rbp), %rdi
cmpq %rdi, %rbp
je 0x40aa67
movq (%rbp), %rsi
incq %rsi
callq 0x41b3a0
leaq 0x20(%rbp), %rax
addq $0x10, %rbp
cmpq %r13, %rbp
movq %rax, %rbp
jne 0x40aa52
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 0x40a9c8
leaq 0x388(%rip), %rsi       # 0x40ae29
leaq 0x18(%rsp), %rdi
leaq 0xd8(%rsp), %rdx
callq 0x40b274
leaq 0xa0(%rsp), %rdi
leaq 0x18(%rsp), %rsi
callq 0x40cda2
cmpq $0x0, 0x18(%rsp)
jne 0x40ad34
movl $0x0, 0xc(%rsp)
movq 0x10(%rsp), %rax
movzwl 0xc(%rax), %eax
testw %ax, %ax
je 0x40ab13
xorl %ecx, %ecx
movl %ecx, %edi
shlq $0x3, %rdi
addq 0xa0(%rsp), %rdi
callq 0x48ee20
movl 0xc(%rsp), %ecx
incl %ecx
movl %ecx, 0xc(%rsp)
movq 0x10(%rsp), %rax
movzwl 0xc(%rax), %eax
cmpl %eax, %ecx
jb 0x40aae9
movzwl %ax, %edi
shll $0x3, %edi
addq 0xa0(%rsp), %rdi
callq 0x48ee20
movzwl 0x211bad(%rip), %eax    # 0x61c6da
cmpl $0xfff4, %eax           # imm = 0xFFF4
je 0x40ab58
cmpl $0xfff5, %eax           # imm = 0xFFF5
jne 0x40ab75
movq 0x38(%rsp), %rdi
movq 0x8(%rdi), %rdx
leaq 0x198787(%rip), %rcx    # 0x5a32d2
movl $0x38, %r8d
xorl %esi, %esi
callq 0x48ccd0
movq 0x38(%rsp), %rdi
movq 0x8(%rdi), %rdx
leaq 0x1987af(%rip), %rcx    # 0x5a3317
movl $0x31, %r8d
xorl %esi, %esi
callq 0x48ccd0
movzwl 0x211b5e(%rip), %ebx    # 0x61c6da
leaq 0xa0(%rsp), %rdi
callq 0x40b306
movq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rax
cmpq %rax, %rdi
je 0x40aba5
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x41b3a0
leaq 0x1e8(%rsp), %rdi
callq 0x416c76
movq 0x60(%rsp), %rdi
testq %rdi, %rdi
je 0x40abc9
movq 0x70(%rsp), %rsi
subq %rdi, %rsi
callq 0x41b3a0
movq 0x80(%rsp), %rdi
testq %rdi, %rdi
je 0x40abe6
movq 0x90(%rsp), %rsi
subq %rdi, %rsi
callq 0x41b3a0
leaq 0xe0(%rsp), %rdi
callq 0x407c92
leaq 0x100(%rsp), %rdi
callq 0x407c92
leaq 0x20(%rsp), %rdi
callq 0x407c92
leaq 0x1d0(%rsp), %rdi
callq 0x407c92
leaq 0xc0(%rsp), %rdi
callq 0x407c92
movl %ebx, %eax
addq $0x2a8, %rsp            # imm = 0x2A8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x40ad9f
jmp 0x40ad2c
jmp 0x40ad41
jmp 0x40ad55
jmp 0x40ad41
jmp 0x40ad7e
jmp 0x40ad7e
movq %rax, %r15
movq 0x190(%rsp), %rdi
cmpq %rbx, %rdi
je 0x40adaf
movq 0x1a0(%rsp), %rsi
jmp 0x40ad72
movq %rax, %r15
movq 0x1b0(%rsp), %rdi
cmpq %rbx, %rdi
je 0x40adaf
movq 0x1c0(%rsp), %rsi
jmp 0x40ad72
jmp 0x40ad7e
jmp 0x40ad55
movq %rax, %r15
movl $0x18, %esi
movq %r12, %rdi
jmp 0x40ad98
movq %rax, %r15
movq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rax
cmpq %rax, %rdi
je 0x40ace0
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x41b3a0
jmp 0x40ace0
movq %rax, %r15
jmp 0x40ad05
movq %rax, %r15
movq 0x140(%rsp), %rdi
leaq 0x150(%rsp), %rax
cmpq %rax, %rdi
je 0x40ad05
movq 0x150(%rsp), %rsi
incq %rsi
callq 0x41b3a0
movq 0x120(%rsp), %rdi
leaq 0x130(%rsp), %rax
cmpq %rax, %rdi
je 0x40ada2
movq 0x130(%rsp), %rsi
jmp 0x40ad95
jmp 0x40ad9f
jmp 0x40ad41
cmpq $0x0, 0x18(%rsp)
je 0x40ad41
callq 0x41c070
jmp 0x40ad41
jmp 0x40ad7e
jmp 0x40ad5a
jmp 0x40ad55
movq %rax, %r15
leaq 0xa0(%rsp), %rdi
callq 0x40b306
jmp 0x40ad81
jmp 0x40ad9f
movq %rax, %r15
jmp 0x40adaf
movq %rax, %r15
movq 0x1e8(%rsp), %rdi
cmpq %rbx, %rdi
je 0x40adaf
movq 0x1f8(%rsp), %rsi
incq %rsi
callq 0x41b3a0
jmp 0x40adaf
jmp 0x40ad7e
movq %rax, %r15
movq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rax
cmpq %rax, %rdi
je 0x40ada2
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x41b3a0
jmp 0x40ada2
movq %rax, %r15
leaq 0x1e8(%rsp), %rdi
callq 0x416c76
movq 0x60(%rsp), %rdi
testq %rdi, %rdi
je 0x40adc6
movq 0x70(%rsp), %rsi
subq %rdi, %rsi
callq 0x41b3a0
movq 0x80(%rsp), %rdi
testq %rdi, %rdi
je 0x40ade3
movq 0x90(%rsp), %rsi
subq %rdi, %rsi
callq 0x41b3a0
leaq 0xe0(%rsp), %rdi
callq 0x407c92
leaq 0x100(%rsp), %rdi
callq 0x407c92
leaq 0x20(%rsp), %rdi
callq 0x407c92
leaq 0x1d0(%rsp), %rdi
callq 0x407c92
leaq 0xc0(%rsp), %rdi
callq 0x407c92
movq %r15, %rdi
callq 0x4c0230