// File: /workspace/github_cpp_makefile_star2_O1/BU-DiSC[P]BF-Shared-Hashing/db.cpp
// Function: db::Build(std::vector<std::vector<std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>, std::allocator<std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>>, std::allocator<std::vector<std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>, std::allocator<std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>>>>, bool)
void db::Build( vector<vector<vector<string> > > reallocated_keys, bool bf_only )
{
	cout << "DB Build started." << endl;

	string index_command = "rm -rf " + index_dir+"/*";
	string data_command = "rm -rf " + data_dir+"/*";
	string bf_command = "rm -rf " + bf_dir+"/*";
	system(bf_command.c_str());
	if ( bf_only==false ){
		system(data_command.c_str());
		system(index_command.c_str());
	}
	
	fp_vec = vector<uint64_t> (num_levels, 0);
	n_vec = vector<uint64_t> (num_levels, 0);
	ofstream file_settings (settings_file, ios::out);
	file_settings << P << endl;
	file_settings << B << endl;
	file_settings << E << endl;
	file_settings << K << endl;
	file_settings << num_filter_units << endl;
	hash_digests = vector<uint64_t> (num_filter_units, 0);
	file_settings << num_levels << endl;
	file_settings << last_sst_keys << endl;

	ofstream file_fence(fence_file, ios::out);
	for ( int i=0 ; i<num_levels ; i++ ){
                int len = fence_pointers[i].size();
		for ( int j=0 ; j<len ; j++ ){
			file_fence << fence_pointers[i][j] << endl;
		}
	}
	file_fence.close();
	if(fastlocal_bf){
		FastLocalBF tmpbf = FastLocalBF(bpk/num_filter_units);
		filter_size = tmpbf.CalculateSpace(B*P);
		last_filter_size = tmpbf.CalculateSpace(last_sst_keys);
		num_probes = tmpbf.num_probes_;
	}else{
		LegacyBF tmpbf = LegacyBF(bpk/num_filter_units);
		uint32_t dont_care;
		filter_size = tmpbf.CalculateSpace(B*P, &dont_care, &num_lines);
		last_filter_size = tmpbf.CalculateSpace(last_sst_keys, &dont_care, &last_num_lines);
		num_probes = tmpbf.num_probes_;

	}
	
	
	bf_prime = (char****) malloc  ( num_levels * sizeof(char***));
	blk_fp_prime = (char****) malloc  ( num_levels * sizeof(char***));
	blk_size_prime = (int**) malloc (num_levels*sizeof(int*));
	cout << "total lv " << num_levels << endl;
	for( int l = 0; l < num_levels; l++){
		cout << "lv " << l << endl;
		vector<vector<string> > keys_one_level = reallocated_keys[l];
		int num_sst = keys_one_level.size();
		bf_prime[l] = (char***) malloc (num_sst*sizeof(char**));
		blk_fp_prime[l] = (char***) malloc (num_sst*sizeof(char**));
		blk_size_prime[l] = (int*) malloc (num_sst*sizeof(int));
		file_settings << num_sst << endl;
		for(int sst_index = 0; sst_index < num_sst; sst_index++){
			vector<string> keys_one_sst = keys_one_level[sst_index];
			char** sst_bf = (char**) malloc (num_filter_units*sizeof(char*));
			string sst_bf_prefix = bf_dir + "level_" + to_string(l) + "-sst_" + to_string(sst_index);



			for(int blo = 0; blo < num_filter_units; blo++){
				string sst_bf_filename = sst_bf_prefix + "_" + to_string(blo) +".txt";
				//cout << sst_bf_filename << endl;
				int end = keys_one_sst.size();
				if(fastlocal_bf){
					FastLocalBF bf = FastLocalBF(bpk/num_filter_units);
					for( int i=0 ; i <end ; i++){
					
						BFHash bfHash (keys_one_sst[i]);	
						vector<uint64_t>* hash_digests = bfHash.getLevelwiseHashDigest(l);
						BFHash::reset = true;
						bf.AddKey(keys_one_sst[i], hash_digests->at(blo));
					}
					bf.Finish();
					flushBFfile(sst_bf_filename, bf.data_, bf.space_);
					char* blo_bf = ( char*) malloc (bf.space_*sizeof(char));
					memcpy(blo_bf, bf.data_, bf.space_);
					sst_bf[blo] = blo_bf;
				}else{
					LegacyBF bf = LegacyBF(bpk/num_filter_units);
					for( int i=0 ; i <end ; i++){
					
						BFHash bfHash (keys_one_sst[i]);	
						vector<uint64_t>* hash_digests = bfHash.getLevelwiseHashDigest(l);
						BFHash::reset = true;
						bf.AddKey(keys_one_sst[i], hash_digests->at(blo));
					}
					bf.Finish();
					flushBFfile(sst_bf_filename, bf.data_, bf.space_);
					char* blo_bf = ( char*) malloc (bf.space_*sizeof(char));
					memcpy(blo_bf, bf.data_, bf.space_);
					sst_bf[blo] = blo_bf;
				}
				//FastLocalBF bf (bpk/num_filter_units*1000);
				
			}
			bf_prime[l][sst_index] = sst_bf;

			// fence pointers
			
			string sst_index_filename = index_dir + "level_" + to_string(l) + "-sst_" + to_string(sst_index) + ".txt";
			// building index
			char** index_one_sst = (char**) malloc (ceil(keys_one_sst.size()/B)*sizeof(char*));
			int j = 0;
			for( int i=0; i<keys_one_sst.size() ; i+=B ){
				index_one_sst[j] = (char *) malloc ((K+1)*sizeof(char));
				strcpy(index_one_sst[j], keys_one_sst[i].c_str());
				j++;
			}
			blk_fp_prime[l][sst_index] = index_one_sst;
			blk_size_prime[l][sst_index] = j;
			flushIndexes(sst_index_filename, index_one_sst, j, K);
			string sst_data_filename = data_dir + "level_" + to_string(l) + "-sst_" + to_string(sst_index) + ".txt";
			for( int i=0 ; i<keys_one_sst.size() ; i++ ){
				keys_one_sst[i].resize(E, '0');
			}
			flushfile(sst_data_filename, &keys_one_sst);
		
		}
	}

	file_settings.close();

	return;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x6c8, %rsp            # imm = 0x6C8
movl %edx, %ebx
movq %rsi, 0x218(%rsp)
movq %rdi, %r15
movq 0x30c63(%rip), %r14     # 0x38fd0
leaq 0x2106c(%rip), %rsi     # 0x293e0
movl $0x11, %edx
movq %r14, %rdi
callq 0x5470
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x53f0
movsbl %al, %esi
movq %r14, %rdi
callq 0x5040
movq %rax, %rdi
callq 0x52a0
leaq 0x40(%r15), %rdx
leaq 0x2103f(%rip), %rsi     # 0x293f2
leaq 0x2c0(%rsp), %r14
movq %r14, %rdi
callq 0xd1cf
leaq 0x21030(%rip), %rsi     # 0x293fa
movq %r14, %rdi
callq 0x5720
leaq 0x208(%rsp), %rsi
movq %rsi, -0x10(%rsi)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x8402
movq %rdx, 0x1f8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x208(%rsp)
jmp 0x840a
movupd (%rcx), %xmm0
movupd %xmm0, (%rsi)
movq 0x8(%rax), %rdx
movq %rdx, 0x200(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x2d0(%rsp), %r14
movq -0x10(%r14), %rdi
cmpq %r14, %rdi
je 0x843b
callq 0x53d0
leaq 0x60(%r15), %rdx
leaq 0x20fac(%rip), %rsi     # 0x293f2
leaq 0x2c0(%rsp), %rdi
callq 0xd1cf
leaq 0x20fa0(%rip), %rsi     # 0x293fa
leaq 0x2c0(%rsp), %rdi
callq 0x5720
leaq 0x1e8(%rsp), %rsi
movq %rsi, -0x10(%rsi)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x8497
movq %rdx, 0x1d8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x1e8(%rsp)
jmp 0x849f
movupd (%rcx), %xmm0
movupd %xmm0, (%rsi)
movq 0x8(%rax), %rdx
movq %rdx, 0x1e0(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x2c0(%rsp), %rdi
cmpq %r14, %rdi
je 0x84cc
callq 0x53d0
leaq 0x20(%r15), %rdx
leaq 0x20f1b(%rip), %rsi     # 0x293f2
leaq 0x2c0(%rsp), %rdi
callq 0xd1cf
leaq 0x20f0f(%rip), %rsi     # 0x293fa
leaq 0x2c0(%rsp), %rdi
callq 0x5720
leaq 0x1c8(%rsp), %rsi
movq %rsi, -0x10(%rsi)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x8528
movq %rdx, 0x1b8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x1c8(%rsp)
jmp 0x8530
movupd (%rcx), %xmm0
movupd %xmm0, (%rsi)
movq 0x8(%rax), %rdx
movq %rdx, 0x1c0(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x2c0(%rsp), %rdi
cmpq %r14, %rdi
je 0x855d
callq 0x53d0
movq 0x1b8(%rsp), %rdi
callq 0x5360
testb %bl, %bl
jne 0x8588
movq 0x1d8(%rsp), %rdi
callq 0x5360
movq 0x1f8(%rsp), %rdi
callq 0x5360
movslq 0xdc(%r15), %rsi
leaq 0x4c0(%rsp), %rdx
movq $0x0, (%rdx)
leaq 0x2c0(%rsp), %rdi
leaq 0xe8(%rsp), %rcx
callq 0xd250
movq 0x1b0(%r15), %rdi
movapd 0x2c0(%rsp), %xmm0
movq 0x2d0(%rsp), %rax
movq %rdi, 0x2c0(%rsp)
movupd 0x1b8(%r15), %xmm1
movupd %xmm0, 0x1b0(%r15)
movq %rax, 0x1c0(%r15)
movupd %xmm1, 0x2c8(%rsp)
xorpd %xmm0, %xmm0
movapd %xmm0, 0x2c0(%rsp)
movq $0x0, 0x2d0(%rsp)
testq %rdi, %rdi
je 0x8618
callq 0x53d0
movq 0x2c0(%rsp), %rdi
testq %rdi, %rdi
je 0x862a
callq 0x53d0
movslq 0xdc(%r15), %rsi
leaq 0x4c0(%rsp), %rdx
movq $0x0, (%rdx)
leaq 0x2c0(%rsp), %rdi
leaq 0xe8(%rsp), %rcx
callq 0xd250
movq 0x1c8(%r15), %rdi
movapd 0x2c0(%rsp), %xmm0
movq 0x2d0(%rsp), %rax
movq %rdi, 0x2c0(%rsp)
movupd 0x1d0(%r15), %xmm1
movupd %xmm0, 0x1c8(%r15)
movq %rax, 0x1d8(%r15)
movupd %xmm1, 0x2c8(%rsp)
xorpd %xmm0, %xmm0
movapd %xmm0, 0x2c0(%rsp)
movq $0x0, 0x2d0(%rsp)
testq %rdi, %rdi
je 0x86ba
callq 0x53d0
movq 0x2c0(%rsp), %rdi
testq %rdi, %rdi
je 0x86cc
callq 0x53d0
leaq 0x80(%r15), %rsi
leaq 0x2c0(%rsp), %rdi
movl $0x10, %edx
callq 0x5730
movl 0xc4(%r15), %esi
leaq 0x2c0(%rsp), %rdi
callq 0x5680
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x53f0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x5040
movq %rax, %rdi
callq 0x52a0
movl 0xc8(%r15), %esi
leaq 0x2c0(%rsp), %rdi
callq 0x5680
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x53f0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x5040
movq %rax, %rdi
callq 0x52a0
movl 0xcc(%r15), %esi
leaq 0x2c0(%rsp), %rdi
callq 0x5680
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x53f0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x5040
movq %rax, %rdi
callq 0x52a0
movl 0xd0(%r15), %esi
leaq 0x2c0(%rsp), %rdi
callq 0x5680
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x53f0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x5040
movq %rax, %rdi
callq 0x52a0
movl 0x110(%r15), %esi
leaq 0x2c0(%rsp), %rdi
callq 0x5680
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x53f0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x5040
movq %rax, %rdi
callq 0x52a0
movslq 0x110(%r15), %rsi
leaq 0xe8(%rsp), %rdx
movq $0x0, (%rdx)
leaq 0x4c0(%rsp), %rdi
leaq 0x170(%rsp), %rcx
callq 0xd250
movq 0x170(%r15), %rdi
movapd 0x4c0(%rsp), %xmm0
movq 0x4d0(%rsp), %rax
movq %rdi, 0x4c0(%rsp)
movupd 0x178(%r15), %xmm1
movupd %xmm0, 0x170(%r15)
movq %rax, 0x180(%r15)
movupd %xmm1, 0x4c8(%rsp)
xorpd %xmm0, %xmm0
movapd %xmm0, 0x4c0(%rsp)
movq $0x0, 0x4d0(%rsp)
testq %rdi, %rdi
je 0x88ab
callq 0x53d0
movq 0x4c0(%rsp), %rdi
testq %rdi, %rdi
je 0x88bd
callq 0x53d0
movl 0xdc(%r15), %esi
leaq 0x2c0(%rsp), %rdi
callq 0x5680
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x53f0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x5040
movq %rax, %rdi
callq 0x52a0
movl 0x100(%r15), %esi
leaq 0x2c0(%rsp), %rdi
callq 0x5680
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x53f0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x5040
movq %rax, %rdi
callq 0x52a0
leaq 0xa0(%r15), %rsi
leaq 0x4c0(%rsp), %rdi
movl $0x10, %edx
callq 0x5730
cmpl $0x0, 0xdc(%r15)
movq %r15, %r14
movq %r15, 0xe0(%rsp)
jle 0x8a11
xorl %r15d, %r15d
leaq 0x4c0(%rsp), %rbx
movq 0x140(%r14), %rax
leaq (%r15,%r15,2), %r12
movq 0x8(%rax,%r12,8), %r13
subq (%rax,%r12,8), %r13
shrq $0x5, %r13
testl %r13d, %r13d
jle 0x89f6
andl $0x7fffffff, %r13d      # imm = 0x7FFFFFFF
movl $0x8, %ebp
movq 0xe0(%rsp), %rax
movq 0x140(%rax), %rax
movq (%rax,%r12,8), %rax
movq -0x8(%rax,%rbp), %rsi
movq (%rax,%rbp), %rdx
movq %rbx, %rdi
callq 0x5470
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x53f0
movsbl %al, %esi
movq %r14, %rdi
callq 0x5040
movq %rax, %rdi
callq 0x52a0
addq $0x20, %rbp
decq %r13
jne 0x899f
incq %r15
movq 0xe0(%rsp), %r14
movslq 0xdc(%r14), %rax
cmpq %rax, %r15
jl 0x8976
leaq 0x4c0(%rsp), %rdi
callq 0x5570
movq %r14, %r15
cmpb $0x1, 0x10c(%r14)
jne 0x8b08
movl 0x104(%r15), %eax
cltd
idivl 0x110(%r15)
leaq 0xe8(%rsp), %rdi
movl %eax, %esi
callq 0xd5ea
movl 0xc4(%r15), %eax
imull 0xc8(%r15), %eax
movslq 0xe8(%rsp), %rsi
testq %rsi, %rsi
setle %dl
testl %eax, %eax
setle %dil
movl $0x5, %ecx
orb %dl, %dil
movl $0x5, %edx
jne 0x8aa2
movl %eax, %eax
imulq %rsi, %rax
addq $0x7cfff, %rax          # imm = 0x7CFFF
shrq $0xc, %rax
movabsq $0x20c49ba5e353f7d, %rdx # imm = 0x20C49BA5E353F7D
mulq %rdx
shll $0x6, %edx
orl $0x5, %edx
testl %esi, %esi
setle %dil
movl %edx, 0x120(%r15)
movslq 0x100(%r15), %rax
testq %rax, %rax
setle %dl
orb %dil, %dl
jne 0x8ae5
imulq %rsi, %rax
addq $0x7cfff, %rax          # imm = 0x7CFFF
shrq $0xc, %rax
movabsq $0x20c49ba5e353f7d, %rcx # imm = 0x20C49BA5E353F7D
mulq %rcx
movq %rdx, %rcx
shll $0x6, %ecx
orl $0x5, %ecx
movl %ecx, 0x124(%r15)
leaq 0x108(%rsp), %rdi
movl -0x1c(%rdi), %eax
movl %eax, 0x130(%r15)
callq 0xe28e
jmp 0x8bc6
movl 0x104(%r15), %eax
cltd
idivl 0x110(%r15)
xorpd %xmm0, %xmm0
leaq 0xe8(%rsp), %rbx
movupd %xmm0, 0x10(%rbx)
movq $0x0, 0x20(%rbx)
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
mulsd 0x20609(%rip), %xmm0    # 0x29148
movl %eax, (%rbx)
cvttsd2si %xmm0, %eax
cmpl $0x2, %eax
movl $0x1, %ecx
cmovgel %eax, %ecx
cmpl $0x1e, %ecx
movl $0x1e, %eax
cmovll %ecx, %eax
movl %eax, 0x4(%rbx)
movl 0xc4(%r15), %esi
imull 0xc8(%r15), %esi
leaq 0x128(%r15), %rcx
leaq 0x170(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rdx
callq 0x73b4
movl %eax, 0x120(%r15)
movl 0x100(%r15), %esi
leaq 0x12c(%r15), %rcx
movq %rbx, %rdi
movq %r14, %rdx
callq 0x73b4
movl %eax, 0x124(%r15)
movl 0x4(%rbx), %eax
movl %eax, 0x130(%r15)
movq 0x10(%rbx), %rdi
testq %rdi, %rdi
je 0x8bc6
callq 0x53d0
movslq 0xdc(%r15), %rbx
shlq $0x3, %rbx
movq %rbx, %rdi
callq 0x5530
movq %rax, 0x158(%r15)
movq %rbx, %rdi
callq 0x5530
movq %rax, 0x160(%r15)
movq %rbx, %rdi
callq 0x5530
movq %rax, 0x168(%r15)
movq 0x303cb(%rip), %rdi     # 0x38fd0
leaq 0x207f1(%rip), %rsi     # 0x293fd
movl $0x9, %edx
callq 0x5470
movl 0xdc(%r15), %esi
movq 0x303ac(%rip), %rdi     # 0x38fd0
callq 0x5680
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x53f0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x5040
movq %rax, %rdi
callq 0x52a0
cmpl $0x0, 0xdc(%r15)
jle 0xa1a4
leaq 0x68(%rsp), %r13
movq $0x0, 0x8(%rsp)
movq 0x3035a(%rip), %rbx     # 0x38fd0
leaq 0x228(%rsp), %r14
movl $0x3, %edx
movq %rbx, %rdi
leaq 0x20776(%rip), %rsi     # 0x29403
callq 0x5470
movq %rbx, %rdi
movq 0x8(%rsp), %rsi
callq 0x5680
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x53f0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x5040
movq %rax, %rdi
callq 0x52a0
movq 0x8(%rsp), %r12
leaq (%r12,%r12,2), %rsi
shlq $0x3, %rsi
movq 0x218(%rsp), %rax
addq (%rax), %rsi
movq %r14, %rdi
callq 0x6df2
movq 0x230(%rsp), %rbp
subq 0x228(%rsp), %rbp
sarq $0x3, %rbp
movabsq $-0x5555555555555555, %rax # imm = 0xAAAAAAAAAAAAAAAB
imulq %rax, %rbp
movq %rbp, %rbx
shlq $0x20, %rbx
movq %rbx, %r14
sarq $0x1d, %r14
movq %r14, %rdi
callq 0x5530
movq 0x158(%r15), %rcx
movq %rax, (%rcx,%r12,8)
movq %r14, %rdi
callq 0x5530
movq 0x160(%r15), %rcx
movq %rax, (%rcx,%r12,8)
sarq $0x1e, %rbx
movq %rbx, %rdi
callq 0x5530
movq 0x168(%r15), %rcx
movq %rax, (%rcx,%r12,8)
leaq 0x2c0(%rsp), %rdi
movq %rbp, 0xd8(%rsp)
movl %ebp, %esi
callq 0x5680
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x53f0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x5040
movq %rax, %rdi
callq 0x52a0
cmpl $0x0, 0xd8(%rsp)
leaq 0xf8(%rsp), %r14
leaq 0x158(%rsp), %rbx
jle 0xa170
movq 0xd8(%rsp), %rax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movq %rax, 0xd8(%rsp)
xorl %eax, %eax
movq %rax, 0x50(%rsp)
leaq (%rax,%rax,2), %rsi
shlq $0x3, %rsi
addq 0x228(%rsp), %rsi
movq %rbx, %rdi
callq 0x68fe
movslq 0x110(%r15), %rdi
shlq $0x3, %rdi
callq 0x5530
movq %rax, %r12
movq %r13, 0x58(%rsp)
movq 0x20(%r15), %rsi
movq 0x28(%r15), %rdx
addq %rsi, %rdx
leaq 0x58(%rsp), %rbx
movq %rbx, %rdi
callq 0x6bf6
movq %rbx, %rdi
leaq 0x205e4(%rip), %rsi     # 0x29407
callq 0x5720
movl $0x1, %ebx
cmpq $0xa, 0x8(%rsp)
jb 0x8e79
movl $0x4, %ebx
movq 0x8(%rsp), %rax
cmpl $0x63, %eax
jbe 0x8e72
cmpl $0x3e7, %eax            # imm = 0x3E7
jbe 0x8e77
cmpl $0x2710, %eax           # imm = 0x2710
jb 0x8e79
movl %eax, %ecx
movl $0xd1b71759, %edx       # imm = 0xD1B71759
imulq %rdx, %rcx
shrq $0x2d, %rcx
addl $0x4, %ebx
cmpl $0x1869f, %eax          # imm = 0x1869F
movl %ecx, %eax
ja 0x8e3f
addl $-0x3, %ebx
jmp 0x8e79
addl $-0x2, %ebx
jmp 0x8e79
decl %ebx
movl %ebx, %esi
leaq 0x20(%rsp), %rax
movq %rax, 0x10(%rsp)
leaq 0x10(%rsp), %rdi
movl $0x2d, %edx
callq 0x5480
movq 0x10(%rsp), %rdi
movl %ebx, %esi
movq 0x8(%rsp), %rdx
callq 0xe2d1
movq 0x58(%rsp), %rcx
movl $0xf, %esi
cmpq %r13, %rcx
je 0x8eb9
movq 0x68(%rsp), %rsi
movq 0x60(%rsp), %r8
movq 0x18(%rsp), %rdx
leaq (%rdx,%r8), %rax
cmpq %rsi, %rax
jbe 0x8ee7
movl $0xf, %esi
leaq 0x20(%rsp), %rdi
cmpq %rdi, 0x10(%rsp)
je 0x8ee2
movq 0x20(%rsp), %rsi
cmpq %rsi, %rax
jbe 0x8ef8
movq 0x10(%rsp), %rsi
leaq 0x58(%rsp), %rdi
callq 0x5150
jmp 0x8f06
leaq 0x10(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x5450
leaq 0x40(%rsp), %rsi
movq %rsi, 0x30(%rsp)
movq (%rax), %rdx
leaq 0x10(%rax), %rcx
cmpq %rcx, %rdx
je 0x8f2b
movq %rdx, 0x30(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x40(%rsp)
jmp 0x8f33
movupd (%rcx), %xmm0
movupd %xmm0, (%rsi)
movq %rax, %rdx
addq $0x8, %rdx
movq 0x8(%rax), %rsi
movq %rsi, 0x38(%rsp)
movq %rcx, (%rax)
movq $0x0, (%rdx)
movb $0x0, (%rcx)
leaq 0x30(%rsp), %rdi
leaq 0x204b2(%rip), %rsi     # 0x2940e
callq 0x5720
movq %r14, 0xe8(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x8f8d
movq %rdx, 0xe8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0xf8(%rsp)
jmp 0x8f96
movupd (%rcx), %xmm0
movupd %xmm0, (%r14)
movq 0x50(%rsp), %rsi
movq 0x8(%rax), %rdx
movq %rdx, 0xf0(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movl $0x1, %ebx
cmpq $0xa, %rsi
jb 0x9002
movl $0x4, %ebx
movl %esi, %eax
cmpl $0x63, %eax
jbe 0x8ffb
cmpl $0x3e7, %eax            # imm = 0x3E7
jbe 0x9000
cmpl $0x2710, %eax           # imm = 0x2710
jb 0x9002
movl %eax, %ecx
movl $0xd1b71759, %edx       # imm = 0xD1B71759
imulq %rdx, %rcx
shrq $0x2d, %rcx
addl $0x4, %ebx
cmpl $0x1869f, %eax          # imm = 0x1869F
movl %ecx, %eax
ja 0x8fc8
addl $-0x3, %ebx
jmp 0x9002
addl $-0x2, %ebx
jmp 0x9002
decl %ebx
movl %ebx, %esi
leaq 0x88(%rsp), %rax
movq %rax, 0x78(%rsp)
leaq 0x78(%rsp), %rdi
movl $0x2d, %edx
callq 0x5480
movq 0x78(%rsp), %rdi
movl %ebx, %esi
movq 0x50(%rsp), %rdx
callq 0xe2d1
movq 0xe8(%rsp), %rcx
movl $0xf, %esi
cmpq %r14, %rcx
je 0x904b
movq 0xf8(%rsp), %rsi
movq 0xf0(%rsp), %r8
movq 0x80(%rsp), %rdx
leaq (%rdx,%r8), %rax
cmpq %rsi, %rax
leaq 0x78(%rsp), %r9
jbe 0x908a
movl $0xf, %esi
leaq 0x88(%rsp), %rdi
cmpq %rdi, 0x78(%rsp)
je 0x9085
movq 0x88(%rsp), %rsi
cmpq %rsi, %rax
jbe 0x909e
movq 0x78(%rsp), %rsi
leaq 0xe8(%rsp), %rdi
callq 0x5150
jmp 0x90aa
movq %r9, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x5450
leaq 0x180(%rsp), %rsi
movq %rsi, 0x170(%rsp)
movq (%rax), %rdx
leaq 0x10(%rax), %rcx
cmpq %rcx, %rdx
je 0x90db
movq %rdx, 0x170(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x180(%rsp)
jmp 0x90e3
movupd (%rcx), %xmm0
movupd %xmm0, (%rsi)
movq %rax, %rdx
addq $0x8, %rdx
movq 0x8(%rax), %rsi
movq %rsi, 0x178(%rsp)
movq %rcx, (%rax)
movq $0x0, (%rdx)
movb $0x0, (%rcx)
movq 0x78(%rsp), %rdi
leaq 0x88(%rsp), %rax
cmpq %rax, %rdi
je 0x911a
callq 0x53d0
movq 0xe8(%rsp), %rdi
cmpq %r14, %rdi
je 0x912c
callq 0x53d0
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0x9140
callq 0x53d0
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x9154
callq 0x53d0
movq 0x58(%rsp), %rdi
cmpq %r13, %rdi
je 0x9163
callq 0x53d0
cmpl $0x0, 0x110(%r15)
jle 0x96c5
xorl %ebx, %ebx
movq %r13, 0x58(%rsp)
movq 0x170(%rsp), %rsi
movq 0x178(%rsp), %rdx
addq %rsi, %rdx
leaq 0x58(%rsp), %r14
movq %r14, %rdi
callq 0x6bf6
movq %r14, %rdi
leaq 0x2026a(%rip), %rsi     # 0x2940c
callq 0x5720
movl $0x1, %r14d
cmpq $0xa, %rbx
jb 0x91f9
movl $0x4, %r14d
movl %ebx, %eax
cmpl $0x63, %eax
jbe 0x91f0
cmpl $0x3e7, %eax            # imm = 0x3E7
jbe 0x91f6
cmpl $0x2710, %eax           # imm = 0x2710
jb 0x91f9
movl %eax, %ecx
movl $0xd1b71759, %edx       # imm = 0xD1B71759
imulq %rdx, %rcx
shrq $0x2d, %rcx
addl $0x4, %r14d
cmpl $0x1869f, %eax          # imm = 0x1869F
movl %ecx, %eax
ja 0x91bb
addl $-0x3, %r14d
jmp 0x91f9
addl $-0x2, %r14d
jmp 0x91f9
decl %r14d
movl %r14d, %esi
leaq 0x20(%rsp), %rax
movq %rax, 0x10(%rsp)
leaq 0x10(%rsp), %rdi
movl $0x2d, %edx
callq 0x5480
movq 0x10(%rsp), %rdi
movl %r14d, %esi
movl %ebx, %edx
callq 0xe2d1
movq 0x58(%rsp), %rcx
movl $0xf, %esi
cmpq %r13, %rcx
je 0x9238
movq 0x68(%rsp), %rsi
movq 0x60(%rsp), %r8
movq 0x18(%rsp), %rdx
leaq (%rdx,%r8), %rax
cmpq %rsi, %rax
leaq 0xf8(%rsp), %r14
jbe 0x926e
movl $0xf, %esi
leaq 0x20(%rsp), %rdi
cmpq %rdi, 0x10(%rsp)
je 0x9269
movq 0x20(%rsp), %rsi
cmpq %rsi, %rax
jbe 0x927f
movq 0x10(%rsp), %rsi
leaq 0x58(%rsp), %rdi
callq 0x5150
jmp 0x928d
leaq 0x10(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x5450
movq %r14, 0xe8(%rsp)
movq (%rax), %rdx
leaq 0x10(%rax), %rcx
cmpq %rcx, %rdx
je 0x92b6
movq %rdx, 0xe8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0xf8(%rsp)
jmp 0x92bf
movupd (%rcx), %xmm0
movupd %xmm0, (%r14)
movq %rax, %rdx
addq $0x8, %rdx
movq 0x8(%rax), %rsi
movq %rsi, 0xf0(%rsp)
movq %rcx, (%rax)
movq $0x0, (%rdx)
movb $0x0, (%rcx)
leaq 0xe8(%rsp), %rdi
leaq 0x20a0f(%rip), %rsi     # 0x29cfd
callq 0x5720
leaq 0x40(%rsp), %rsi
movq %rsi, 0x30(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x931b
movq %rdx, 0x30(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x40(%rsp)
jmp 0x9323
movupd (%rcx), %xmm0
movupd %xmm0, (%rsi)
movq 0x8(%rax), %rdx
movq %rdx, 0x38(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0xe8(%rsp), %rdi
cmpq %r14, %rdi
je 0x934d
callq 0x53d0
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x9361
callq 0x53d0
movq 0x58(%rsp), %rdi
cmpq %r13, %rdi
je 0x9370
callq 0x53d0
movq 0x160(%rsp), %r14
subq 0x158(%rsp), %r14
shrq $0x5, %r14
cmpb $0x1, 0x10c(%r15)
jne 0x9513
movl 0x104(%r15), %eax
cltd
idivl 0x110(%r15)
leaq 0xe8(%rsp), %rdi
movl %eax, %esi
callq 0xd5ea
testl %r14d, %r14d
jle 0x946f
andl $0x7fffffff, %r14d      # imm = 0x7FFFFFFF
xorl %r13d, %r13d
movq 0x158(%rsp), %rsi
addq %r13, %rsi
leaq 0x58(%rsp), %rbp
movq %rbp, %rdi
callq 0xd6da
movq %rbp, %rdi
movq 0x8(%rsp), %rsi
callq 0x1180e
leaq 0x2ffe9(%rip), %rcx     # 0x393d8
movb $0x1, (%rcx)
movq (%rax), %rcx
movq 0x8(%rax), %rdx
subq %rcx, %rdx
sarq $0x3, %rdx
cmpq %rbx, %rdx
jbe 0xa27d
movq (%rcx,%rbx,8), %rcx
movq %rcx, 0x10(%rsp)
movq 0x138(%rsp), %rax
movq 0x148(%rsp), %rdx
addq $-0x8, %rdx
cmpq %rdx, %rax
je 0x943c
movq %rcx, (%rax)
addq $0x8, %rax
movq %rax, 0x138(%rsp)
jmp 0x944e
leaq 0x108(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0xe33e
movq 0x58(%rsp), %rdi
leaq 0x68(%rsp), %rax
cmpq %rax, %rdi
je 0x9462
callq 0x53d0
addq $0x20, %r13
decq %r14
jne 0x93c3
leaq 0xe8(%rsp), %rdi
callq 0xd730
leaq 0x2b0(%rsp), %r14
leaq 0x2a0(%rsp), %r13
movq %r14, 0x2a0(%rsp)
movq 0x30(%rsp), %rsi
movq 0x38(%rsp), %rdx
addq %rsi, %rdx
movq %r13, %rdi
callq 0x6bf6
movq 0xf8(%rsp), %rdx
movl 0x100(%rsp), %ecx
movq %r13, %rsi
callq 0xa774
movq 0x2a0(%rsp), %rdi
cmpq %r14, %rdi
je 0x94d2
callq 0x53d0
movl 0x100(%rsp), %r14d
movq %r14, %rdi
callq 0x5530
movq %rax, %rbp
movq 0xf8(%rsp), %rsi
movq %rax, %rdi
movq %r14, %rdx
callq 0x5330
movq %rbp, (%r12,%rbx,8)
leaq 0x108(%rsp), %rdi
callq 0xe28e
leaq 0x68(%rsp), %r13
jmp 0x9696
movl 0x104(%r15), %eax
cltd
idivl 0x110(%r15)
leaq 0xf8(%rsp), %rcx
xorpd %xmm0, %xmm0
movupd %xmm0, (%rcx)
movq $0x0, 0x10(%rcx)
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
movl %eax, 0xe8(%rsp)
mulsd 0x1fbf8(%rip), %xmm0    # 0x29148
cvttsd2si %xmm0, %eax
cmpl $0x2, %eax
movl $0x1, %ecx
cmovll %ecx, %eax
cmpl $0x1e, %eax
movl $0x1e, %ecx
cmovgel %ecx, %eax
movl %eax, 0xec(%rsp)
testl %r14d, %r14d
jle 0x95ef
andl $0x7fffffff, %r14d      # imm = 0x7FFFFFFF
xorl %r15d, %r15d
movq 0x158(%rsp), %rsi
addq %r15, %rsi
leaq 0x58(%rsp), %rbp
movq %rbp, %rdi
callq 0xd6da
movq %rbp, %rdi
movq 0x8(%rsp), %rsi
callq 0x1180e
leaq 0x2fe2c(%rip), %rcx     # 0x393d8
movb $0x1, (%rcx)
movq (%rax), %rcx
movq 0x8(%rax), %rdx
subq %rcx, %rdx
sarq $0x3, %rdx
cmpq %rbx, %rdx
jbe 0xa28e
movq (%rcx,%rbx,8), %rdx
leaq 0xe8(%rsp), %rdi
callq 0x7154
movq 0x58(%rsp), %rdi
cmpq %r13, %rdi
je 0x95e6
callq 0x53d0
addq $0x20, %r15
decq %r14
jne 0x9580
leaq 0xe8(%rsp), %rdi
callq 0x7190
leaq 0x290(%rsp), %r14
leaq 0x280(%rsp), %r15
movq %r14, 0x280(%rsp)
movq 0x30(%rsp), %rsi
movq 0x38(%rsp), %rdx
addq %rsi, %rdx
movq %r15, %rdi
callq 0x6bf6
movq 0x110(%rsp), %rdx
movl 0xf4(%rsp), %ecx
movq %r15, %rsi
callq 0xa774
movq 0x280(%rsp), %rdi
cmpq %r14, %rdi
je 0x9652
callq 0x53d0
movslq 0xf4(%rsp), %r14
movq %r14, %rdi
callq 0x5530
movq %rax, %rbp
movq 0x110(%rsp), %rsi
movq %rax, %rdi
movq %r14, %rdx
callq 0x5330
movq %rbp, (%r12,%rbx,8)
movq 0xf8(%rsp), %rdi
testq %rdi, %rdi
movq 0xe0(%rsp), %r15
je 0x9696
callq 0x53d0
leaq 0xf8(%rsp), %r14
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0x96b2
callq 0x53d0
incq %rbx
movslq 0x110(%r15), %rax
cmpq %rax, %rbx
jl 0x9173
movq 0x158(%r15), %rax
movq 0x8(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq 0x50(%rsp), %rcx
movq %r12, (%rax,%rcx,8)
leaq 0x88(%rsp), %rax
movq %rax, 0x78(%rsp)
movq 0x40(%r15), %rsi
movq 0x48(%r15), %rdx
addq %rsi, %rdx
leaq 0x78(%rsp), %rbx
movq %rbx, %rdi
callq 0x6bf6
movq %rbx, %rdi
leaq 0x1fcfa(%rip), %rsi     # 0x29407
callq 0x5720
movl $0x1, %ebx
cmpq $0xa, 0x8(%rsp)
leaq 0xc8(%rsp), %r12
jb 0x976b
movl $0x4, %ebx
movq 0x8(%rsp), %rax
cmpl $0x63, %eax
jbe 0x9764
cmpl $0x3e7, %eax            # imm = 0x3E7
jbe 0x9769
cmpl $0x2710, %eax           # imm = 0x2710
jb 0x976b
movl %eax, %ecx
movl $0xd1b71759, %edx       # imm = 0xD1B71759
imulq %rdx, %rcx
shrq $0x2d, %rcx
addl $0x4, %ebx
cmpl $0x1869f, %eax          # imm = 0x1869F
movl %ecx, %eax
ja 0x9731
addl $-0x3, %ebx
jmp 0x976b
addl $-0x2, %ebx
jmp 0x976b
decl %ebx
movl %ebx, %esi
movq %r12, 0xb8(%rsp)
leaq 0xb8(%rsp), %rdi
movl $0x2d, %edx
callq 0x5480
movq 0xb8(%rsp), %rdi
movl %ebx, %esi
movq 0x8(%rsp), %rdx
callq 0xe2d1
movq 0x78(%rsp), %rcx
movl $0xf, %esi
leaq 0x88(%rsp), %rax
cmpq %rax, %rcx
je 0x97ba
movq 0x88(%rsp), %rsi
movq 0x80(%rsp), %r8
movq 0xc0(%rsp), %rdx
leaq (%rdx,%r8), %rax
cmpq %rsi, %rax
leaq 0x78(%rsp), %rdi
leaq 0xb8(%rsp), %r9
jbe 0x97fc
movl $0xf, %esi
cmpq %r12, 0xb8(%rsp)
je 0x97f7
movq 0xc8(%rsp), %rsi
cmpq %rsi, %rax
jbe 0x980b
movq 0xb8(%rsp), %rsi
callq 0x5150
jmp 0x9817
movq %r9, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x5450
leaq 0x20(%rsp), %rsi
movq %rsi, 0x10(%rsp)
movq (%rax), %rdx
leaq 0x10(%rax), %rcx
cmpq %rcx, %rdx
je 0x983c
movq %rdx, 0x10(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x20(%rsp)
jmp 0x9844
movupd (%rcx), %xmm0
movupd %xmm0, (%rsi)
movq %rax, %rdx
addq $0x8, %rdx
movq 0x8(%rax), %rsi
movq %rsi, 0x18(%rsp)
movq %rcx, (%rax)
movq $0x0, (%rdx)
movb $0x0, (%rcx)
leaq 0x10(%rsp), %rdi
leaq 0x1fba1(%rip), %rsi     # 0x2940e
callq 0x5720
movq %r13, 0x58(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x9895
movq %rdx, 0x58(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x68(%rsp)
jmp 0x989f
movupd (%rcx), %xmm0
movupd %xmm0, (%r13)
movq 0x50(%rsp), %rsi
movq 0x8(%rax), %rdx
movq %rdx, 0x60(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movl $0x1, %ebx
cmpq $0xa, %rsi
jb 0x9908
movl $0x4, %ebx
movl %esi, %eax
cmpl $0x63, %eax
jbe 0x9901
cmpl $0x3e7, %eax            # imm = 0x3E7
jbe 0x9906
cmpl $0x2710, %eax           # imm = 0x2710
jb 0x9908
movl %eax, %ecx
movl $0xd1b71759, %edx       # imm = 0xD1B71759
imulq %rdx, %rcx
shrq $0x2d, %rcx
addl $0x4, %ebx
cmpl $0x1869f, %eax          # imm = 0x1869F
movl %ecx, %eax
ja 0x98ce
addl $-0x3, %ebx
jmp 0x9908
addl $-0x2, %ebx
jmp 0x9908
decl %ebx
movl %ebx, %esi
leaq 0xa8(%rsp), %rax
movq %rax, 0x98(%rsp)
leaq 0x98(%rsp), %rdi
movl $0x2d, %edx
callq 0x5480
movq 0x98(%rsp), %rdi
movl %ebx, %esi
movq 0x50(%rsp), %rdx
callq 0xe2d1
movq 0x58(%rsp), %rcx
movl $0xf, %esi
cmpq %r13, %rcx
je 0x9954
movq 0x68(%rsp), %rsi
movq 0x60(%rsp), %r8
movq 0xa0(%rsp), %rdx
leaq (%rdx,%r8), %rax
cmpq %rsi, %rax
jbe 0x998e
movl $0xf, %esi
leaq 0xa8(%rsp), %rdi
cmpq %rdi, 0x98(%rsp)
je 0x9989
movq 0xa8(%rsp), %rsi
cmpq %rsi, %rax
jbe 0x99a2
movq 0x98(%rsp), %rsi
leaq 0x58(%rsp), %rdi
callq 0x5150
jmp 0x99b3
leaq 0x98(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x5450
leaq 0x40(%rsp), %rsi
movq %rsi, 0x30(%rsp)
movq (%rax), %rdx
leaq 0x10(%rax), %rcx
cmpq %rcx, %rdx
je 0x99d8
movq %rdx, 0x30(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x40(%rsp)
jmp 0x99e0
movupd (%rcx), %xmm0
movupd %xmm0, (%rsi)
movq %rax, %rdx
addq $0x8, %rdx
movq 0x8(%rax), %rsi
movq %rsi, 0x38(%rsp)
movq %rcx, (%rax)
movq $0x0, (%rdx)
movb $0x0, (%rcx)
leaq 0x30(%rsp), %rdi
leaq 0x202f4(%rip), %rsi     # 0x29cfd
callq 0x5720
movq %r14, 0xe8(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x9a3a
movq %rdx, 0xe8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0xf8(%rsp)
jmp 0x9a43
movupd (%rcx), %xmm0
movupd %xmm0, (%r14)
movq 0x8(%rax), %rdx
movq %rdx, 0xf0(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0x9a72
callq 0x53d0
movq 0x98(%rsp), %rdi
leaq 0xa8(%rsp), %rax
cmpq %rax, %rdi
je 0x9a8c
callq 0x53d0
movq 0x58(%rsp), %rdi
cmpq %r13, %rdi
je 0x9a9b
callq 0x53d0
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x9aaf
callq 0x53d0
movq 0xb8(%rsp), %rdi
cmpq %r12, %rdi
je 0x9ac1
callq 0x53d0
movq 0x78(%rsp), %rdi
leaq 0x88(%rsp), %rax
cmpq %rax, %rdi
je 0x9ad8
callq 0x53d0
movq 0x158(%rsp), %r13
movq 0x160(%rsp), %rbp
movq %rbp, %rbx
subq %r13, %rbx
sarq $0x5, %rbx
movslq 0xc8(%r15), %rcx
movq %rbx, %rax
xorl %edx, %edx
movq %rcx, 0x1b0(%rsp)
divq %rcx
movq %rax, %xmm0
punpckldq 0x1f64a(%rip), %xmm0 # xmm0 = xmm0[0],mem[0],xmm0[1],mem[1]
subpd 0x1f652(%rip), %xmm0    # 0x29170
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1            # xmm1 = xmm1[1],xmm0[1]
addsd %xmm0, %xmm1
mulsd 0x1f5e6(%rip), %xmm1    # 0x29118
cvttsd2si %xmm1, %rax
xorl %r12d, %r12d
movq %rax, %rcx
sarq $0x3f, %rcx
subsd 0x1f607(%rip), %xmm1    # 0x29150
cvttsd2si %xmm1, %rdi
andq %rcx, %rdi
orq %rax, %rdi
callq 0x5530
movq %rax, %r14
cmpq %r13, %rbp
je 0x9bc4
movslq 0xd0(%r15), %rax
incq %rax
movq %rax, 0x220(%rsp)
movq 0x1b0(%rsp), %r15
shlq $0x5, %r15
xorl %r12d, %r12d
movq %r14, %rbp
xorl %r14d, %r14d
movq 0x220(%rsp), %rdi
callq 0x5530
movq %rax, (%rbp,%r12,8)
movq (%r13), %rsi
movq %rax, %rdi
callq 0x53c0
incq %r12
addq 0x1b0(%rsp), %r14
addq %r15, %r13
cmpq %r14, %rbx
ja 0x9b88
movq 0xe0(%rsp), %r15
movq %rbp, %r14
movq 0x160(%r15), %rax
movq 0x8(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq 0x50(%rsp), %rdx
movq %r14, (%rax,%rdx,8)
movq 0x168(%r15), %rax
movq (%rax,%rcx,8), %rax
movl %r12d, (%rax,%rdx,4)
leaq 0x270(%rsp), %r13
movq %r13, 0x260(%rsp)
movq 0xe8(%rsp), %rsi
movq 0xf0(%rsp), %rdx
addq %rsi, %rdx
leaq 0x260(%rsp), %rbx
movq %rbx, %rdi
callq 0x6bf6
movl 0xd0(%r15), %r8d
movq %rbx, %rsi
movq %r14, %rdx
movl %r12d, %ecx
leaq 0xf8(%rsp), %r14
callq 0xa840
movq 0x260(%rsp), %rdi
cmpq %r13, %rdi
je 0x9c4e
callq 0x53d0
leaq 0xc8(%rsp), %r12
movq %r12, 0xb8(%rsp)
movq 0x60(%r15), %rsi
movq 0x68(%r15), %rdx
addq %rsi, %rdx
leaq 0xb8(%rsp), %rbx
movq %rbx, %rdi
callq 0x6bf6
leaq 0x68(%rsp), %r13
movq %rbx, %rdi
leaq 0x1f77f(%rip), %rsi     # 0x29407
callq 0x5720
movl $0x1, %ebx
cmpq $0xa, 0x8(%rsp)
jb 0x9cde
movl $0x4, %ebx
movq 0x8(%rsp), %rax
cmpl $0x63, %eax
jbe 0x9cd7
cmpl $0x3e7, %eax            # imm = 0x3E7
jbe 0x9cdc
cmpl $0x2710, %eax           # imm = 0x2710
jb 0x9cde
movl %eax, %ecx
movl $0xd1b71759, %edx       # imm = 0xD1B71759
imulq %rdx, %rcx
shrq $0x2d, %rcx
addl $0x4, %ebx
cmpl $0x1869f, %eax          # imm = 0x1869F
movl %ecx, %eax
ja 0x9ca4
addl $-0x3, %ebx
jmp 0x9cde
addl $-0x2, %ebx
jmp 0x9cde
decl %ebx
movl %ebx, %esi
leaq 0xa8(%rsp), %rax
movq %rax, 0x98(%rsp)
leaq 0x98(%rsp), %rdi
movl $0x2d, %edx
callq 0x5480
movq 0x98(%rsp), %rdi
movl %ebx, %esi
movq 0x8(%rsp), %rdx
callq 0xe2d1
movq 0xb8(%rsp), %rcx
movl $0xf, %esi
cmpq %r12, %rcx
je 0x9d30
movq 0xc8(%rsp), %rsi
movq 0xc0(%rsp), %r8
movq 0xa0(%rsp), %rdx
leaq (%rdx,%r8), %rax
cmpq %rsi, %rax
leaq 0x78(%rsp), %rbx
jbe 0x9d72
movl $0xf, %esi
leaq 0xa8(%rsp), %rdi
cmpq %rdi, 0x98(%rsp)
je 0x9d6d
movq 0xa8(%rsp), %rsi
cmpq %rsi, %rax
jbe 0x9d89
movq 0x98(%rsp), %rsi
leaq 0xb8(%rsp), %rdi
callq 0x5150
jmp 0x9d9a
leaq 0x98(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x5450
leaq 0x88(%rsp), %rsi
movq %rsi, 0x78(%rsp)
movq (%rax), %rdx
leaq 0x10(%rax), %rcx
cmpq %rcx, %rdx
je 0x9dc5
movq %rdx, 0x78(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x88(%rsp)
jmp 0x9dcd
movupd (%rcx), %xmm0
movupd %xmm0, (%rsi)
movq %rax, %rdx
addq $0x8, %rdx
movq 0x8(%rax), %rsi
movq %rsi, 0x80(%rsp)
movq %rcx, (%rax)
movq $0x0, (%rdx)
movb $0x0, (%rcx)
movq %rbx, %rdi
leaq 0x1f617(%rip), %rsi     # 0x2940e
callq 0x5720
leaq 0x20(%rsp), %rsi
movq %rsi, 0x10(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x9e24
movq %rdx, 0x10(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x20(%rsp)
jmp 0x9e2c
movupd (%rcx), %xmm0
movupd %xmm0, (%rsi)
movq 0x50(%rsp), %rsi
movq 0x8(%rax), %rdx
movq %rdx, 0x18(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movl $0x1, %ebx
cmpq $0xa, %rsi
jb 0x9e95
movl $0x4, %ebx
movl %esi, %eax
cmpl $0x63, %eax
jbe 0x9e8e
cmpl $0x3e7, %eax            # imm = 0x3E7
jbe 0x9e93
cmpl $0x2710, %eax           # imm = 0x2710
jb 0x9e95
movl %eax, %ecx
movl $0xd1b71759, %edx       # imm = 0xD1B71759
imulq %rdx, %rcx
shrq $0x2d, %rcx
addl $0x4, %ebx
cmpl $0x1869f, %eax          # imm = 0x1869F
movl %ecx, %eax
ja 0x9e5b
addl $-0x3, %ebx
jmp 0x9e95
addl $-0x2, %ebx
jmp 0x9e95
decl %ebx
movl %ebx, %esi
leaq 0x1a0(%rsp), %rax
movq %rax, 0x190(%rsp)
leaq 0x190(%rsp), %rdi
movl $0x2d, %edx
callq 0x5480
movq 0x190(%rsp), %rdi
movl %ebx, %esi
movq 0x50(%rsp), %rdx
callq 0xe2d1
movq 0x10(%rsp), %rcx
movl $0xf, %esi
leaq 0x20(%rsp), %rax
cmpq %rax, %rcx
je 0x9ee6
movq 0x20(%rsp), %rsi
movq 0x18(%rsp), %r8
movq 0x198(%rsp), %rdx
leaq (%rdx,%r8), %rax
cmpq %rsi, %rax
jbe 0x9f20
movl $0xf, %esi
leaq 0x1a0(%rsp), %rdi
cmpq %rdi, 0x190(%rsp)
je 0x9f1b
movq 0x1a0(%rsp), %rsi
cmpq %rsi, %rax
jbe 0x9f34
movq 0x190(%rsp), %rsi
leaq 0x10(%rsp), %rdi
callq 0x5150
jmp 0x9f45
leaq 0x190(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x5450
movq %r13, 0x58(%rsp)
movq (%rax), %rdx
leaq 0x10(%rax), %rcx
cmpq %rcx, %rdx
je 0x9f65
movq %rdx, 0x58(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x68(%rsp)
jmp 0x9f6f
movupd (%rcx), %xmm0
movupd %xmm0, (%r13)
movq %rax, %rdx
addq $0x8, %rdx
movq 0x8(%rax), %rsi
movq %rsi, 0x60(%rsp)
movq %rcx, (%rax)
movq $0x0, (%rdx)
movb $0x0, (%rcx)
leaq 0x58(%rsp), %rdi
leaq 0x1fd65(%rip), %rsi     # 0x29cfd
callq 0x5720
leaq 0x40(%rsp), %rsi
movq %rsi, 0x30(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x9fc5
movq %rdx, 0x30(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x40(%rsp)
jmp 0x9fcd
movupd (%rcx), %xmm0
movupd %xmm0, (%rsi)
movq 0x8(%rax), %rdx
movq %rdx, 0x38(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x58(%rsp), %rdi
cmpq %r13, %rdi
je 0x9ff4
callq 0x53d0
movq 0x190(%rsp), %rdi
leaq 0x1a0(%rsp), %rax
cmpq %rax, %rdi
je 0xa00e
callq 0x53d0
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0xa022
callq 0x53d0
movq 0x78(%rsp), %rdi
leaq 0x88(%rsp), %rax
cmpq %rax, %rdi
je 0xa039
callq 0x53d0
movq 0x98(%rsp), %rdi
leaq 0xa8(%rsp), %rax
cmpq %rax, %rdi
je 0xa053
callq 0x53d0
movq 0xb8(%rsp), %rdi
cmpq %r12, %rdi
je 0xa065
callq 0x53d0
movq 0x158(%rsp), %rdi
cmpq %rdi, 0x160(%rsp)
leaq 0x250(%rsp), %r12
je 0xa0bb
xorl %ebx, %ebx
xorl %r14d, %r14d
addq %rbx, %rdi
movslq 0xcc(%r15), %rsi
movl $0x30, %edx
callq 0x5140
incq %r14
movq 0x158(%rsp), %rdi
movq 0x160(%rsp), %rax
subq %rdi, %rax
sarq $0x5, %rax
addq $0x20, %rbx
cmpq %r14, %rax
ja 0xa084
movq %r12, 0x240(%rsp)
movq 0x30(%rsp), %rsi
movq 0x38(%rsp), %rdx
addq %rsi, %rdx
leaq 0x240(%rsp), %rbx
movq %rbx, %rdi
callq 0x6bf6
movq %rbx, %rsi
leaq 0x158(%rsp), %rdx
leaq 0xf8(%rsp), %r14
callq 0xa960
movq 0x240(%rsp), %rdi
cmpq %r12, %rdi
je 0xa10a
callq 0x53d0
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
leaq 0x158(%rsp), %rbx
je 0xa126
callq 0x53d0
movq 0xe8(%rsp), %rdi
cmpq %r14, %rdi
je 0xa138
callq 0x53d0
movq 0x170(%rsp), %rdi
leaq 0x180(%rsp), %rax
cmpq %rax, %rdi
je 0xa152
callq 0x53d0
movq %rbx, %rdi
callq 0x6982
movq 0x50(%rsp), %rax
incq %rax
cmpq 0xd8(%rsp), %rax
jne 0x8dcc
leaq 0x228(%rsp), %r14
movq %r14, %rdi
callq 0x6bb0
movq 0x8(%rsp), %rdx
incq %rdx
movslq 0xdc(%r15), %rax
movq %rdx, 0x8(%rsp)
cmpq %rax, %rdx
movq 0x2ee32(%rip), %rbx     # 0x38fd0
jl 0x8c7e
leaq 0x2c0(%rsp), %rbx
movq %rbx, %rdi
callq 0x5570
movq 0x2edf5(%rip), %rax     # 0x38fb0
movq (%rax), %r14
movq 0x18(%rax), %r15
leaq 0x4c8(%rsp), %rdi
movq %r14, -0x8(%rdi)
movq -0x18(%r14), %rax
movq %r15, 0x4c0(%rsp,%rax)
callq 0x5350
movl $0xf8, %r12d
leaq 0x4c0(%rsp), %rdi
addq %r12, %rdi
callq 0x5160
leaq 0x2c8(%rsp), %rdi
movq %r14, -0x8(%rdi)
movq -0x18(%r14), %rax
movq %r15, 0x2c0(%rsp,%rax)
callq 0x5350
addq %r12, %rbx
movq %rbx, %rdi
callq 0x5160
movq 0x1b8(%rsp), %rdi
leaq 0x1c8(%rsp), %rax
cmpq %rax, %rdi
je 0xa237
callq 0x53d0
movq 0x1d8(%rsp), %rdi
leaq 0x1e8(%rsp), %rax
cmpq %rax, %rdi
je 0xa251
callq 0x53d0
movq 0x1f8(%rsp), %rdi
leaq 0x208(%rsp), %rax
cmpq %rax, %rdi
je 0xa26b
callq 0x53d0
addq $0x6c8, %rsp            # imm = 0x6C8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1edef(%rip), %rdi     # 0x29073
movq %rbx, %rsi
xorl %eax, %eax
callq 0x55d0
leaq 0x1edde(%rip), %rdi     # 0x29073
movq %rbx, %rsi
xorl %eax, %eax
callq 0x55d0
jmp 0xa543
jmp 0xa316
jmp 0xa316
jmp 0xa304
jmp 0xa304
jmp 0xa304
movq %rax, %rbx
movq 0x2c0(%rsp), %rdi
cmpq %r14, %rdi
jne 0xa732
jmp 0xa737
movq %rax, %rbx
jmp 0xa737
movq %rax, %rbx
movq 0x2c0(%rsp), %rdi
cmpq %r14, %rdi
jne 0xa74c
jmp 0xa751
movq %rax, %rbx
jmp 0xa751
movq %rax, %rbx
leaq 0x2d0(%rsp), %rax
movq -0x10(%rax), %rdi
jmp 0xa761
movq %rax, %rbx
jmp 0xa71d
jmp 0xa543
jmp 0xa543
movq %rax, %rbx
jmp 0xa6e5
jmp 0xa4eb
jmp 0xa543
movq %rax, %rbx
movq 0x240(%rsp), %rdi
cmpq %r12, %rdi
je 0xa5ea
callq 0x53d0
jmp 0xa5ea
jmp 0xa5df
movq %rax, %rbx
jmp 0xa367
movq %rax, %rbx
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0xa367
callq 0x53d0
movq 0x98(%rsp), %rdi
leaq 0xa8(%rsp), %rax
cmpq %rax, %rdi
je 0xa386
callq 0x53d0
jmp 0xa386
movq %rax, %rbx
movq 0x58(%rsp), %rdi
cmpq %r13, %rdi
je 0xa3ac
callq 0x53d0
jmp 0xa3ac
movq %rax, %rbx
leaq 0xf8(%rsp), %r14
jmp 0xa5fe
jmp 0xa3f7
movq %rax, %rbx
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0xa3e3
callq 0x53d0
jmp 0xa3e3
movq %rax, %rbx
movq 0x260(%rsp), %rdi
cmpq %r13, %rdi
jne 0xa5f9
jmp 0xa5fe
jmp 0xa594
movq %rax, %rbx
movq 0xb8(%rsp), %rdi
cmpq %r12, %rdi
je 0xa3fa
callq 0x53d0
jmp 0xa3fa
movq %rax, %rbx
movq 0x78(%rsp), %rdi
leaq 0x88(%rsp), %rax
jmp 0xa66f
movq %rax, %rbx
jmp 0xa5fe
movq %rax, %rbx
jmp 0xa42d
jmp 0xa449
movq %rax, %rbx
movq 0x58(%rsp), %rdi
cmpq %r13, %rdi
je 0xa42d
callq 0x53d0
movq 0x190(%rsp), %rdi
leaq 0x1a0(%rsp), %rax
cmpq %rax, %rdi
je 0xa456
callq 0x53d0
jmp 0xa456
movq %rax, %rbx
jmp 0xa4a0
movq %rax, %rbx
jmp 0xa46a
movq %rax, %rbx
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0xa46a
callq 0x53d0
movq 0x78(%rsp), %rdi
leaq 0x88(%rsp), %rax
cmpq %rax, %rdi
je 0xa486
callq 0x53d0
jmp 0xa486
movq %rax, %rbx
movq 0x98(%rsp), %rdi
leaq 0xa8(%rsp), %rax
cmpq %rax, %rdi
je 0xa4a0
callq 0x53d0
movq 0xb8(%rsp), %rdi
cmpq %r12, %rdi
jne 0xa5f9
jmp 0xa5fe
movq %rax, %rbx
jmp 0xa693
movq %rax, %rbx
movq 0x78(%rsp), %rdi
leaq 0x88(%rsp), %rax
cmpq %rax, %rdi
je 0xa4f6
callq 0x53d0
jmp 0xa4f6
jmp 0xa4dc
movq %rax, %rbx
jmp 0xa530
movq %rax, %rbx
jmp 0xa51c
movq %rax, %rbx
jmp 0xa508
movq %rax, %rbx
jmp 0xa6a0
movq %rax, %rbx
movq 0xe8(%rsp), %rdi
cmpq %r14, %rdi
je 0xa508
callq 0x53d0
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0xa51c
callq 0x53d0
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0xa530
callq 0x53d0
movq 0x58(%rsp), %rdi
cmpq %r13, %rdi
jne 0xa68e
jmp 0xa693
movq %rax, %rbx
jmp 0xa6ad
movq %rax, %rbx
movq 0x280(%rsp), %rdi
cmpq %r14, %rdi
jne 0xa64e
jmp 0xa653
movq %rax, %rbx
movq 0x2a0(%rsp), %rdi
cmpq %r14, %rdi
jne 0xa62d
jmp 0xa632
movq %rax, %rbx
jmp 0xa665
jmp 0xa60f
jmp 0xa614
movq %rax, %rbx
jmp 0xa5b3
movq %rax, %rbx
jmp 0xa679
jmp 0xa5c9
movq %rax, %rbx
movq 0xe8(%rsp), %rdi
cmpq %r14, %rdi
je 0xa5b3
callq 0x53d0
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0xa5cc
callq 0x53d0
jmp 0xa5cc
movq %rax, %rbx
movq 0x58(%rsp), %rdi
cmpq %r13, %rdi
jne 0xa674
jmp 0xa679
movq %rax, %rbx
leaq 0xf8(%rsp), %r14
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0xa5fe
callq 0x53d0
movq 0xe8(%rsp), %rdi
cmpq %r14, %rdi
jne 0xa674
jmp 0xa679
jmp 0xa641
movq %rax, %rbx
jmp 0xa653
movq %rax, %rbx
jmp 0xa632
jmp 0xa61b
movq %rax, %rbx
leaq 0x68(%rsp), %rax
movq 0x58(%rsp), %rdi
cmpq %rax, %rdi
je 0xa632
callq 0x53d0
leaq 0x108(%rsp), %rdi
callq 0xe28e
jmp 0xa665
movq %rax, %rbx
movq 0x58(%rsp), %rdi
cmpq %r13, %rdi
je 0xa653
callq 0x53d0
movq 0xf8(%rsp), %rdi
testq %rdi, %rdi
je 0xa665
callq 0x53d0
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0xa679
callq 0x53d0
movq 0x170(%rsp), %rdi
leaq 0x180(%rsp), %rax
cmpq %rax, %rdi
je 0xa693
callq 0x53d0
leaq 0x158(%rsp), %rdi
callq 0x6982
leaq 0x228(%rsp), %rdi
callq 0x6bb0
movq 0x2e8fc(%rip), %rax     # 0x38fb0
movq (%rax), %rcx
movq 0x18(%rax), %rax
leaq 0x4c8(%rsp), %rdi
movq %rcx, -0x8(%rdi)
movq -0x18(%rcx), %rcx
movq %rax, 0x4c0(%rsp,%rcx)
callq 0x5350
leaq 0x5b8(%rsp), %rdi
callq 0x5160
movq 0x2e8c4(%rip), %rax     # 0x38fb0
movq (%rax), %rcx
movq 0x18(%rax), %rax
leaq 0x2c8(%rsp), %rdi
movq %rcx, -0x8(%rdi)
movq -0x18(%rcx), %rcx
movq %rax, 0x2c0(%rsp,%rcx)
callq 0x5350
leaq 0x3b8(%rsp), %rdi
callq 0x5160
leaq 0x1c8(%rsp), %rax
movq 0x1b8(%rsp), %rdi
cmpq %rax, %rdi
je 0xa737
callq 0x53d0
leaq 0x1e8(%rsp), %rax
movq 0x1d8(%rsp), %rdi
cmpq %rax, %rdi
je 0xa751
callq 0x53d0
leaq 0x208(%rsp), %rax
movq 0x1f8(%rsp), %rdi
cmpq %rax, %rdi
je 0xa76b
callq 0x53d0
movq %rbx, %rdi
callq 0x56b0
nop