// File: /workspace/github_cpp_makefile_star2_O3/BU-DiSC[P]BF-Shared-Hashing/db.cpp
// Function: db::loadBFAndIndex()
fsec db::loadBFAndIndex(){
	fp_vec = vector<uint64_t> (num_levels, 0);
	n_vec = vector<uint64_t> (num_levels, 0);
	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*));
	if(fastlocal_bf){
		FastLocalBF bf = FastLocalBF(bpk/num_filter_units);
		filter_size = bf.CalculateSpace(B*P);
        	num_probes = bf.num_probes_;
	}else{
		LegacyBF bf = LegacyBF(bpk/num_filter_units);
		uint32_t dont_care;
		filter_size = bf.CalculateSpace(B*P, &dont_care, &num_lines);
        	num_probes = bf.num_probes_;
	}
	int tmp_filter_size = filter_size;
	auto l_start = high_resolution_clock::now();
	auto l_end = high_resolution_clock::now();
	fsec load_duration = std::chrono::microseconds::zero();
	for(int i = 0; i < num_levels; i++){
		bf_prime[i] = (char***) malloc (num_sstPerLevel[i]*sizeof(char**));
		blk_fp_prime[i] = (char***) malloc (num_sstPerLevel[i]*sizeof(char**));
		blk_size_prime[i] = (int*) malloc (num_sstPerLevel[i]*sizeof(int));

		for(int j = 0; j < num_sstPerLevel[i]; j++){
			string sst_index_filename = index_dir + "level_" + to_string(i) + "-sst_" + to_string(j) + ".txt";
			l_start = high_resolution_clock::now();
			int index_size = read_index_size(sst_index_filename);	
			l_end = high_resolution_clock::now();
			load_duration += duration_cast<microseconds>(l_end - l_start);

			char** index = (char**) malloc((index_size+1)*sizeof(char*));
			for(int k = 0; k <= index_size; k++){
				index[k] = (char*) malloc ((K+1)*sizeof(char));
			}
			l_start = high_resolution_clock::now();
			read_index(sst_index_filename, index_size, index);
			l_end = high_resolution_clock::now();
			load_duration += duration_cast<microseconds>(l_end - l_start);

			blk_fp_prime[i][j] = index;
			blk_size_prime[i][j] = index_size;

			if(i == num_levels - 1 && j == num_sstPerLevel[i] - 1){
				if(fastlocal_bf){
					FastLocalBF bf = FastLocalBF(bpk/num_filter_units);
					last_filter_size = bf.CalculateSpace(last_sst_keys);
					last_num_lines = bf.num_lines_;
				}else{
					LegacyBF bf = LegacyBF(bpk/num_filter_units);
					uint32_t dont_care;
					last_filter_size = bf.CalculateSpace(last_sst_keys, &dont_care, &last_num_lines);
					last_num_lines = bf.num_lines_;

				}
				tmp_filter_size = last_filter_size;
			} 
			
			char** sst_bf = (char**) malloc (num_filter_units*sizeof(char*));

			for(int k = 0; k < num_filter_units; k++){
				string sst_bf_filename = bf_dir + "level_" + to_string(i) + "-sst_" + to_string(j) + "_" + to_string(k) + ".txt";
				char* blo_bf = (char*) malloc (tmp_filter_size*sizeof(char));
				l_start = high_resolution_clock::now();
				read_bf(sst_bf_filename, blo_bf, tmp_filter_size);
				l_end = high_resolution_clock::now();
				load_duration += duration_cast<microseconds>(l_end - l_start);
				sst_bf[k] = blo_bf;
			}
			bf_prime[i][j] = sst_bf;
		}
	}
	return load_duration;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x258, %rsp            # imm = 0x258
movq %rdi, %rbx
movslq 0xdc(%rdi), %rsi
xorl %r15d, %r15d
leaq 0xf0(%rsp), %rdx
movq %r15, (%rdx)
leaq 0x170(%rsp), %r14
leaq 0x8(%rsp), %rcx
movq %r14, %rdi
callq 0xd0d0
movq 0x1b0(%rbx), %rdi
movaps (%r14), %xmm0
movups %xmm0, 0x1b0(%rbx)
movq 0x10(%r14), %rax
movq %rax, 0x1c0(%rbx)
movq %r15, 0x10(%r14)
xorps %xmm0, %xmm0
movaps %xmm0, (%r14)
testq %rdi, %rdi
je 0xb5b0
callq 0x53d0
movq 0x170(%rsp), %rdi
testq %rdi, %rdi
je 0xb5b0
callq 0x53d0
movslq 0xdc(%rbx), %rsi
xorl %r15d, %r15d
leaq 0xf0(%rsp), %rdx
movq %r15, (%rdx)
leaq 0x170(%rsp), %r14
leaq 0x8(%rsp), %rcx
movq %r14, %rdi
callq 0xd0d0
movq 0x1c8(%rbx), %rdi
movapd (%r14), %xmm0
movupd %xmm0, 0x1c8(%rbx)
movq 0x10(%r14), %rax
movq %rax, 0x1d8(%rbx)
movq %r15, 0x10(%r14)
xorpd %xmm0, %xmm0
movapd %xmm0, (%r14)
testq %rdi, %rdi
je 0xb622
callq 0x53d0
movq 0x170(%rsp), %rdi
testq %rdi, %rdi
je 0xb622
callq 0x53d0
movslq 0xdc(%rbx), %r14
shlq $0x3, %r14
movq %r14, %rdi
callq 0x5530
movq %rax, 0x158(%rbx)
movq %r14, %rdi
callq 0x5530
movq %rax, 0x160(%rbx)
movq %r14, %rdi
callq 0x5530
movq %rax, 0x168(%rbx)
cmpb $0x1, 0x10c(%rbx)
jne 0xb6f1
movl 0x104(%rbx), %eax
cltd
idivl 0x110(%rbx)
leaq 0x170(%rsp), %r14
movq %r14, %rdi
movl %eax, %esi
callq 0xd49c
movl 0xc4(%rbx), %ecx
imull 0xc8(%rbx), %ecx
movslq (%r14), %rax
testq %rax, %rax
setle %sil
testl %ecx, %ecx
setle %dil
movl $0x5, %edx
orb %sil, %dil
jne 0xb6d0
movl %ecx, %ecx
imulq %rcx, %rax
addq $0x7cfff, %rax          # imm = 0x7CFFF
shrq $0xc, %rax
movabsq $0x20c49ba5e353f7d, %rcx # imm = 0x20C49BA5E353F7D
mulq %rcx
shll $0x6, %edx
orl $0x5, %edx
movl %edx, 0x120(%rbx)
leaq 0x190(%rsp), %rdi
movl -0x1c(%rdi), %eax
movl %eax, 0x130(%rbx)
callq 0xe170
jmp 0xb78a
movl 0x104(%rbx), %eax
cltd
idivl 0x110(%rbx)
xorpd %xmm0, %xmm0
leaq 0x170(%rsp), %r14
movupd %xmm0, 0x10(%r14)
movq $0x0, 0x20(%r14)
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
mulsd 0x1da21(%rip), %xmm0    # 0x29148
movl %eax, (%r14)
cvttsd2si %xmm0, %eax
cmpl $0x2, %eax
movl $0x1, %ecx
cmovgel %eax, %ecx
cmpl $0x1e, %ecx
movl $0x1e, %eax
cmovll %ecx, %eax
movl %eax, 0x4(%r14)
movl 0xc4(%rbx), %esi
imull 0xc8(%rbx), %esi
leaq 0x128(%rbx), %rcx
leaq 0xf0(%rsp), %rdx
movq %r14, %rdi
callq 0x7398
movl %eax, 0x120(%rbx)
movl 0x4(%r14), %eax
movl %eax, 0x130(%rbx)
movq 0x10(%r14), %rdi
testq %rdi, %rdi
je 0xb78a
callq 0x53d0
movl 0x120(%rbx), %eax
movl %eax, 0x3c(%rsp)
callq 0x5080
callq 0x5080
movl 0xdc(%rbx), %ebp
testl %ebp, %ebp
jle 0xc765
leaq 0x12c(%rbx), %rax
movq %rax, 0x1e8(%rsp)
xorpd %xmm0, %xmm0
movss %xmm0, 0x4(%rsp)
movq 0xe8(%rbx), %rax
xorl %r14d, %r14d
movl $0xd1b71759, %r12d      # imm = 0xD1B71759
movslq (%rax,%r14,4), %rdi
shlq $0x3, %rdi
callq 0x5530
movq 0x158(%rbx), %rcx
movq %rax, (%rcx,%r14,8)
movq 0xe8(%rbx), %rax
movslq (%rax,%r14,4), %rdi
shlq $0x3, %rdi
callq 0x5530
movq 0x160(%rbx), %rcx
movq %rax, (%rcx,%r14,8)
movq 0xe8(%rbx), %rax
movslq (%rax,%r14,4), %rdi
shlq $0x2, %rdi
callq 0x5530
movq 0x168(%rbx), %rcx
movq %rax, (%rcx,%r14,8)
movq 0xe8(%rbx), %rax
cmpl $0x0, (%rax,%r14,4)
jle 0xc754
movq %r14, 0x30(%rsp)
xorl %edx, %edx
leaq 0x50(%rsp), %r14
movq %rdx, 0x28(%rsp)
movq %r14, 0x40(%rsp)
movq 0x40(%rbx), %rsi
movq 0x48(%rbx), %rdx
addq %rsi, %rdx
leaq 0x40(%rsp), %r15
movq %r15, %rdi
callq 0x6c14
movq %r15, %rdi
leaq 0x1db92(%rip), %rsi     # 0x29407
callq 0x5720
movl $0x1, %ebp
movq 0x30(%rsp), %r14
cmpq $0xa, %r14
jb 0xb8c7
movl $0x4, %ebp
movl %r14d, %eax
cmpl $0x63, %eax
jbe 0xb8c0
cmpl $0x3e7, %eax            # imm = 0x3E7
jbe 0xb8c5
cmpl $0x2710, %eax           # imm = 0x2710
jb 0xb8c7
movl %eax, %ecx
imulq %r12, %rcx
shrq $0x2d, %rcx
addl $0x4, %ebp
cmpl $0x1869f, %eax          # imm = 0x1869F
movl %ecx, %eax
ja 0xb892
addl $-0x3, %ebp
jmp 0xb8c7
addl $-0x2, %ebp
jmp 0xb8c7
decl %ebp
movl %ebp, %esi
leaq 0xb8(%rsp), %rax
movq %rax, 0xa8(%rsp)
leaq 0xa8(%rsp), %rdi
movl $0x2d, %edx
callq 0x5480
movq 0xa8(%rsp), %rdi
movl %ebp, %esi
movl %r14d, %edx
callq 0xe1ba
movq 0x40(%rsp), %rcx
movl $0xf, %edi
leaq 0x50(%rsp), %r15
cmpq %r15, %rcx
je 0xb916
movq 0x50(%rsp), %rdi
movq 0x48(%rsp), %r8
movq 0xa8(%rsp), %rsi
movq 0xb0(%rsp), %rdx
leaq (%rdx,%r8), %rax
cmpq %rdi, %rax
leaq 0xb8(%rsp), %r14
leaq 0x18(%rsp), %rbp
jbe 0xb958
movl $0xf, %edi
cmpq %r14, %rsi
je 0xb953
movq 0xb8(%rsp), %rdi
cmpq %rdi, %rax
jbe 0xb964
leaq 0x40(%rsp), %rdi
callq 0x5150
jmp 0xb975
leaq 0xa8(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x5450
leaq 0x98(%rsp), %rsi
movq %rsi, 0x88(%rsp)
movq (%rax), %rdx
leaq 0x10(%rax), %rcx
cmpq %rcx, %rdx
je 0xb9a6
movq %rdx, 0x88(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x98(%rsp)
jmp 0xb9ae
movupd (%rcx), %xmm0
movupd %xmm0, (%rsi)
movq %rax, %rdx
addq $0x8, %rdx
movq 0x8(%rax), %rsi
movq %rsi, 0x90(%rsp)
movq %rcx, (%rax)
movq $0x0, (%rdx)
movb $0x0, (%rcx)
leaq 0x88(%rsp), %rdi
leaq 0x1da31(%rip), %rsi     # 0x2940e
callq 0x5720
movq %rbp, 0x8(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0xba05
movq %rdx, 0x8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x18(%rsp)
jmp 0xba0e
movupd (%rcx), %xmm0
movupd %xmm0, (%rbp)
movq 0x8(%rax), %rdx
movq %rdx, 0x10(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movl $0x1, %ebp
movq 0x28(%rsp), %rax
cmpq $0xa, %rax
jb 0xba70
movl $0x4, %ebp
cmpl $0x63, %eax
jbe 0xba69
cmpl $0x3e7, %eax            # imm = 0x3E7
jbe 0xba6e
cmpl $0x2710, %eax           # imm = 0x2710
jb 0xba70
movl %eax, %ecx
imulq %r12, %rcx
shrq $0x2d, %rcx
addl $0x4, %ebp
cmpl $0x1869f, %eax          # imm = 0x1869F
movl %ecx, %eax
ja 0xba3b
addl $-0x3, %ebp
jmp 0xba70
addl $-0x2, %ebp
jmp 0xba70
decl %ebp
movl %ebp, %esi
leaq 0x78(%rsp), %rax
movq %rax, 0x68(%rsp)
leaq 0x68(%rsp), %rdi
movl $0x2d, %edx
callq 0x5480
movq 0x68(%rsp), %rdi
movl %ebp, %esi
movq 0x28(%rsp), %rdx
callq 0xe1ba
movq 0x8(%rsp), %rcx
movl $0xf, %edi
leaq 0x18(%rsp), %rax
cmpq %rax, %rcx
je 0xbab5
movq 0x18(%rsp), %rdi
movq 0x10(%rsp), %r8
movq 0x68(%rsp), %rsi
movq 0x70(%rsp), %rdx
leaq (%rdx,%r8), %rax
cmpq %rdi, %rax
leaq 0xb8(%rsp), %r14
leaq 0x50(%rsp), %r15
leaq 0x78(%rsp), %rbp
jbe 0xbaf3
movl $0xf, %edi
cmpq %rbp, %rsi
je 0xbaee
movq 0x78(%rsp), %rdi
cmpq %rdi, %rax
jbe 0xbaff
leaq 0x8(%rsp), %rdi
callq 0x5150
jmp 0xbb0d
leaq 0x68(%rsp), %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 0xbb3e
movq %rdx, 0x170(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x180(%rsp)
jmp 0xbb46
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)
leaq 0x170(%rsp), %rdi
leaq 0x1e188(%rip), %rsi     # 0x29cfd
callq 0x5720
leaq 0x100(%rsp), %rsi
movq %rsi, 0xf0(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0xbbae
movq %rdx, 0xf0(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x100(%rsp)
jmp 0xbbb6
movupd (%rcx), %xmm0
movupd %xmm0, (%rsi)
movq 0x8(%rax), %rdx
movq %rdx, 0xf8(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x170(%rsp), %rdi
leaq 0x180(%rsp), %rax
cmpq %rax, %rdi
je 0xbbeb
callq 0x53d0
movq 0x68(%rsp), %rdi
cmpq %rbp, %rdi
je 0xbbfa
callq 0x53d0
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
leaq 0x248(%rsp), %rbp
je 0xbc16
callq 0x53d0
movq 0x88(%rsp), %rdi
leaq 0x98(%rsp), %rax
cmpq %rax, %rdi
je 0xbc30
callq 0x53d0
movq 0xa8(%rsp), %rdi
cmpq %r14, %rdi
je 0xbc42
callq 0x53d0
movq 0x40(%rsp), %rdi
cmpq %r15, %rdi
leaq 0x238(%rsp), %r14
je 0xbc59
callq 0x53d0
callq 0x5080
movq %rax, %r15
movq %rbp, 0x238(%rsp)
movq 0xf0(%rsp), %rsi
movq 0xf8(%rsp), %rdx
addq %rsi, %rdx
movq %r14, %rdi
callq 0x6c14
movq %rbx, %rdi
movq %r14, %rsi
callq 0xdb34
movl %eax, %r14d
movq 0x238(%rsp), %rdi
cmpq %rbp, %rdi
je 0xbca4
callq 0x53d0
callq 0x5080
subq %r15, %rax
movabsq $0x20c49ba5e353f7cf, %rcx # imm = 0x20C49BA5E353F7CF
imulq %rcx
movq %rdx, %rax
shrq $0x3f, %rax
sarq $0x7, %rdx
addq %rax, %rdx
xorps %xmm0, %xmm0
cvtsi2ss %rdx, %xmm0
divss 0x1d32d(%rip), %xmm0    # 0x29004
movss %xmm0, 0xc8(%rsp)
leal 0x1(%r14), %r13d
movslq %r13d, %rdi
shlq $0x3, %rdi
callq 0x5530
movq %rax, %r15
movq %r14, 0x60(%rsp)
testl %r14d, %r14d
js 0xbd21
movslq 0xd0(%rbx), %rbp
incq %rbp
movl %r13d, %r13d
xorl %r14d, %r14d
movq %rbp, %rdi
callq 0x5530
movq %rax, (%r15,%r14,8)
incq %r14
cmpq %r14, %r13
jne 0xbd0d
callq 0x5080
movq %rax, %rbp
leaq 0x228(%rsp), %rax
movq %rax, 0x218(%rsp)
movq 0xf0(%rsp), %rsi
movq 0xf8(%rsp), %rdx
addq %rsi, %rdx
leaq 0x218(%rsp), %r14
movq %r14, %rdi
callq 0x6c14
movq %rbx, %rdi
movq %r14, %rsi
movq 0x60(%rsp), %r14
movl %r14d, %edx
movq %r15, %rcx
callq 0xdc2e
movq 0x218(%rsp), %rdi
leaq 0x228(%rsp), %rax
cmpq %rax, %rdi
je 0xbd8c
callq 0x53d0
callq 0x5080
subq %rbp, %rax
movabsq $0x20c49ba5e353f7cf, %rcx # imm = 0x20C49BA5E353F7CF
imulq %rcx
movq %rdx, %rax
shrq $0x3f, %rax
sarq $0x7, %rdx
addq %rax, %rdx
cvtsi2ss %rdx, %xmm1
divss 0x1d248(%rip), %xmm1    # 0x29004
movq 0x160(%rbx), %rax
movq 0x30(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq 0x28(%rsp), %rdx
movq %r15, (%rax,%rdx,8)
movq 0x168(%rbx), %rax
movq (%rax,%rcx,8), %rax
movl %r14d, (%rax,%rdx,4)
movl 0xdc(%rbx), %eax
decl %eax
cmpq %rax, %rcx
jne 0xbeb6
movq 0xe8(%rbx), %rax
movl (%rax,%rcx,4), %eax
decl %eax
cmpq %rax, %rdx
leaq 0xb8(%rsp), %rbp
leaq 0xd0(%rsp), %r15
jne 0xbf7a
movss %xmm1, 0x60(%rsp)
cmpb $0x1, 0x10c(%rbx)
jne 0xbecb
movl 0x104(%rbx), %eax
cltd
idivl 0x110(%rbx)
leaq 0x170(%rsp), %rdi
movl %eax, %esi
callq 0xd49c
movslq 0x100(%rbx), %rcx
testq %rcx, %rcx
setle %sil
movslq 0x170(%rsp), %rax
testq %rax, %rax
setle %dil
movl $0x5, %edx
orb %sil, %dil
jne 0xbe91
imulq %rcx, %rax
addq $0x7cfff, %rax          # imm = 0x7CFFF
shrq $0xc, %rax
movabsq $0x20c49ba5e353f7d, %rcx # imm = 0x20C49BA5E353F7D
mulq %rcx
shll $0x6, %edx
orl $0x5, %edx
movl %edx, 0x124(%rbx)
movl 0x178(%rsp), %eax
movl %eax, 0x12c(%rbx)
leaq 0x190(%rsp), %rdi
callq 0xe170
jmp 0xbf6a
leaq 0xb8(%rsp), %rbp
leaq 0xd0(%rsp), %r15
jmp 0xbf7a
movl 0x104(%rbx), %eax
cltd
idivl 0x110(%rbx)
leaq 0x180(%rsp), %rcx
xorps %xmm0, %xmm0
movups %xmm0, (%rcx)
movq $0x0, 0x10(%rcx)
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
movl %eax, 0x170(%rsp)
mulsd 0x1d244(%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, 0x174(%rsp)
movl 0x100(%rbx), %esi
leaq 0x170(%rsp), %rdi
leaq 0x8(%rsp), %rdx
movq 0x1e8(%rsp), %rcx
callq 0x7398
movl %eax, 0x124(%rbx)
movl 0x178(%rsp), %eax
movl %eax, 0x12c(%rbx)
movq 0x180(%rsp), %rdi
testq %rdi, %rdi
je 0xbf6a
callq 0x53d0
movss 0x60(%rsp), %xmm1
movl 0x124(%rbx), %eax
movl %eax, 0x3c(%rsp)
movss 0x4(%rsp), %xmm0
addss 0xc8(%rsp), %xmm0
addss %xmm1, %xmm0
movss %xmm0, 0x4(%rsp)
movslq 0x110(%rbx), %r14
leaq (,%r14,8), %rdi
callq 0x5530
movq %rax, 0xc8(%rsp)
testq %r14, %r14
jle 0xc6ed
movslq 0x3c(%rsp), %rax
movq %rax, 0x1f0(%rsp)
xorl %r14d, %r14d
leaq 0xe0(%rsp), %rax
movq %rax, 0xd0(%rsp)
movq 0x20(%rbx), %rsi
movq 0x28(%rbx), %rdx
addq %rsi, %rdx
movq %r15, %rdi
callq 0x6c14
movq %r15, %rdi
leaq 0x1d412(%rip), %rsi     # 0x29407
callq 0x5720
movl $0x1, %r15d
cmpq $0xa, 0x30(%rsp)
jb 0xc04c
movl $0x4, %r15d
movq 0x30(%rsp), %rax
cmpl $0x63, %eax
jbe 0xc043
cmpl $0x3e7, %eax            # imm = 0x3E7
jbe 0xc049
cmpl $0x2710, %eax           # imm = 0x2710
jb 0xc04c
movl %eax, %ecx
imulq %r12, %rcx
shrq $0x2d, %rcx
addl $0x4, %r15d
cmpl $0x1869f, %eax          # imm = 0x1869F
movl %ecx, %eax
ja 0xc013
addl $-0x3, %r15d
jmp 0xc04c
addl $-0x2, %r15d
jmp 0xc04c
decl %r15d
movl %r15d, %esi
leaq 0x160(%rsp), %rax
movq %rax, 0x150(%rsp)
leaq 0x150(%rsp), %rdi
movl $0x2d, %edx
callq 0x5480
movq 0x150(%rsp), %rdi
movl %r15d, %esi
movq 0x30(%rsp), %rdx
callq 0xe1ba
movq 0xd0(%rsp), %rcx
movl $0xf, %edi
leaq 0xe0(%rsp), %rax
cmpq %rax, %rcx
je 0xc0a8
movq 0xe0(%rsp), %rdi
movq 0xd8(%rsp), %r8
movq 0x150(%rsp), %rsi
movq 0x158(%rsp), %rdx
leaq (%rdx,%r8), %rax
cmpq %rdi, %rax
leaq 0xd0(%rsp), %rdi
jbe 0xc0f1
movl $0xf, %r10d
leaq 0x160(%rsp), %r9
cmpq %r9, %rsi
je 0xc0ec
movq 0x160(%rsp), %r10
cmpq %r10, %rax
jbe 0xc0f8
callq 0x5150
jmp 0xc109
leaq 0x150(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x5450
leaq 0x78(%rsp), %rsi
movq %rsi, 0x68(%rsp)
movq (%rax), %rdx
leaq 0x10(%rax), %rcx
cmpq %rcx, %rdx
je 0xc12e
movq %rdx, 0x68(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x78(%rsp)
jmp 0xc134
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq %rax, %rdx
addq $0x8, %rdx
movq 0x8(%rax), %rsi
movq %rsi, 0x70(%rsp)
movq %rcx, (%rax)
movq $0x0, (%rdx)
movb $0x0, (%rcx)
leaq 0x68(%rsp), %rdi
leaq 0x1d2b1(%rip), %rsi     # 0x2940e
callq 0x5720
movq %rbp, 0xa8(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0xc18e
movq %rdx, 0xa8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0xb8(%rsp)
jmp 0xc195
movups (%rcx), %xmm0
movups %xmm0, (%rbp)
movq 0x8(%rax), %rdx
movq %rdx, 0xb0(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movl $0x1, %r15d
movq 0x28(%rsp), %rax
cmpq $0xa, %rax
jb 0xc200
movl $0x4, %r15d
cmpl $0x63, %eax
jbe 0xc1f7
cmpl $0x3e7, %eax            # imm = 0x3E7
jbe 0xc1fd
cmpl $0x2710, %eax           # imm = 0x2710
jb 0xc200
movl %eax, %ecx
imulq %r12, %rcx
shrq $0x2d, %rcx
addl $0x4, %r15d
cmpl $0x1869f, %eax          # imm = 0x1869F
movl %ecx, %eax
ja 0xc1c7
addl $-0x3, %r15d
jmp 0xc200
addl $-0x2, %r15d
jmp 0xc200
decl %r15d
movl %r15d, %esi
leaq 0x140(%rsp), %rax
movq %rax, 0x130(%rsp)
leaq 0x130(%rsp), %rdi
movl $0x2d, %edx
callq 0x5480
movq 0x130(%rsp), %rdi
movl %r15d, %esi
movq 0x28(%rsp), %rdx
callq 0xe1ba
movq 0xa8(%rsp), %rcx
movl $0xf, %edi
cmpq %rbp, %rcx
je 0xc254
movq 0xb8(%rsp), %rdi
movq 0xb0(%rsp), %r8
movq 0x130(%rsp), %rsi
movq 0x138(%rsp), %rdx
leaq (%rdx,%r8), %rax
cmpq %rdi, %rax
leaq 0x98(%rsp), %r15
jbe 0xc29c
movl $0xf, %edi
leaq 0x140(%rsp), %r9
cmpq %r9, %rsi
je 0xc297
movq 0x140(%rsp), %rdi
cmpq %rdi, %rax
jbe 0xc2ab
leaq 0xa8(%rsp), %rdi
callq 0x5150
jmp 0xc2bc
leaq 0x130(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x5450
leaq 0x50(%rsp), %rsi
movq %rsi, 0x40(%rsp)
movq (%rax), %rdx
leaq 0x10(%rax), %rcx
cmpq %rcx, %rdx
je 0xc2e1
movq %rdx, 0x40(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x50(%rsp)
jmp 0xc2e7
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq %rax, %rdx
addq $0x8, %rdx
movq 0x8(%rax), %rsi
movq %rsi, 0x48(%rsp)
movq %rcx, (%rax)
movq $0x0, (%rdx)
movb $0x0, (%rcx)
leaq 0x40(%rsp), %rdi
leaq 0x1d0fc(%rip), %rsi     # 0x2940c
callq 0x5720
movq %r15, 0x88(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0xc341
movq %rdx, 0x88(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x98(%rsp)
jmp 0xc348
movups (%rcx), %xmm0
movups %xmm0, (%r15)
movq 0x8(%rax), %rdx
movq %rdx, 0x90(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movl $0x1, %r15d
cmpq $0xa, %r14
jb 0xc3b1
movl $0x4, %r15d
movl %r14d, %eax
cmpl $0x63, %eax
jbe 0xc3a8
cmpl $0x3e7, %eax            # imm = 0x3E7
jbe 0xc3ae
cmpl $0x2710, %eax           # imm = 0x2710
jb 0xc3b1
movl %eax, %ecx
imulq %r12, %rcx
shrq $0x2d, %rcx
addl $0x4, %r15d
cmpl $0x1869f, %eax          # imm = 0x1869F
movl %ecx, %eax
ja 0xc378
addl $-0x3, %r15d
jmp 0xc3b1
addl $-0x2, %r15d
jmp 0xc3b1
decl %r15d
movl %r15d, %esi
leaq 0x120(%rsp), %rax
movq %rax, 0x110(%rsp)
leaq 0x110(%rsp), %rdi
movl $0x2d, %edx
callq 0x5480
movq 0x110(%rsp), %rdi
movl %r15d, %esi
movl %r14d, %edx
callq 0xe1ba
movq 0x88(%rsp), %rcx
movl $0xf, %edi
leaq 0x98(%rsp), %r15
cmpq %r15, %rcx
je 0xc40b
movq 0x98(%rsp), %rdi
movq 0x90(%rsp), %r8
movq 0x110(%rsp), %rsi
movq 0x118(%rsp), %rdx
leaq (%rdx,%r8), %rax
cmpq %rdi, %rax
jbe 0xc44b
movl $0xf, %edi
leaq 0x120(%rsp), %r9
cmpq %r9, %rsi
je 0xc446
movq 0x120(%rsp), %rdi
cmpq %rdi, %rax
jbe 0xc45a
leaq 0x88(%rsp), %rdi
callq 0x5150
jmp 0xc46b
leaq 0x110(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x5450
leaq 0x18(%rsp), %rsi
movq %rsi, 0x8(%rsp)
movq (%rax), %rdx
leaq 0x10(%rax), %rcx
cmpq %rcx, %rdx
je 0xc490
movq %rdx, 0x8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x18(%rsp)
jmp 0xc496
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq %rax, %rdx
addq $0x8, %rdx
movq 0x8(%rax), %rsi
movq %rsi, 0x10(%rsp)
movq %rcx, (%rax)
movq $0x0, (%rdx)
movb $0x0, (%rcx)
leaq 0x8(%rsp), %rdi
leaq 0x1d83e(%rip), %rsi     # 0x29cfd
callq 0x5720
leaq 0x180(%rsp), %rsi
movq %rsi, 0x170(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0xc4f8
movq %rdx, 0x170(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x180(%rsp)
jmp 0xc4fe
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq 0x8(%rax), %rdx
movq %rdx, 0x178(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0xc52d
callq 0x53d0
movq 0x110(%rsp), %rdi
leaq 0x120(%rsp), %rax
cmpq %rax, %rdi
je 0xc547
callq 0x53d0
movq 0x88(%rsp), %rdi
cmpq %r15, %rdi
je 0xc559
callq 0x53d0
movq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rax
cmpq %rax, %rdi
je 0xc56d
callq 0x53d0
movq 0x130(%rsp), %rdi
leaq 0x140(%rsp), %rax
cmpq %rax, %rdi
je 0xc587
callq 0x53d0
movq 0xa8(%rsp), %rdi
cmpq %rbp, %rdi
je 0xc599
callq 0x53d0
movq 0x68(%rsp), %rdi
leaq 0x78(%rsp), %rax
cmpq %rax, %rdi
je 0xc5ad
callq 0x53d0
movq 0x150(%rsp), %rdi
leaq 0x160(%rsp), %rax
cmpq %rax, %rdi
je 0xc5c7
callq 0x53d0
movq 0xd0(%rsp), %rdi
leaq 0xe0(%rsp), %rax
cmpq %rax, %rdi
je 0xc5e1
callq 0x53d0
movq 0x1f0(%rsp), %rdi
callq 0x5530
movq %rax, %r15
callq 0x5080
movq %rax, %rbp
leaq 0x208(%rsp), %rax
movq %rax, 0x1f8(%rsp)
movq 0x170(%rsp), %rsi
movq 0x178(%rsp), %rdx
addq %rsi, %rdx
leaq 0x1f8(%rsp), %r13
movq %r13, %rdi
callq 0x6c14
movq %rbx, %rdi
movq %r13, %rsi
movq %r15, %rdx
movl 0x3c(%rsp), %ecx
callq 0xde3c
movq 0x1f8(%rsp), %rdi
leaq 0x208(%rsp), %rax
cmpq %rax, %rdi
je 0xc658
callq 0x53d0
callq 0x5080
subq %rbp, %rax
movabsq $0x20c49ba5e353f7cf, %rcx # imm = 0x20C49BA5E353F7CF
imulq %rcx
movq %rdx, %rax
shrq $0x3f, %rax
sarq $0x7, %rdx
addq %rax, %rdx
cvtsi2ss %rdx, %xmm1
divss 0x1c97c(%rip), %xmm1    # 0x29004
movq 0xc8(%rsp), %rax
movq %r15, (%rax,%r14,8)
movq 0x170(%rsp), %rdi
leaq 0x180(%rsp), %rax
cmpq %rax, %rdi
je 0xc6ba
movss %xmm1, 0x60(%rsp)
callq 0x53d0
movss 0x60(%rsp), %xmm1
movss 0x4(%rsp), %xmm0
addss %xmm1, %xmm0
movss %xmm0, 0x4(%rsp)
incq %r14
movslq 0x110(%rbx), %rax
cmpq %rax, %r14
leaq 0xb8(%rsp), %rbp
leaq 0xd0(%rsp), %r15
jl 0xbfc8
movq 0x158(%rbx), %rax
movq 0x30(%rsp), %r14
movq (%rax,%r14,8), %rax
movq 0x28(%rsp), %rdx
movq 0xc8(%rsp), %rcx
movq %rcx, (%rax,%rdx,8)
movq 0xf0(%rsp), %rdi
leaq 0x100(%rsp), %rax
cmpq %rax, %rdi
je 0xc72d
callq 0x53d0
movq 0x28(%rsp), %rdx
incq %rdx
movq 0xe8(%rbx), %rax
movslq (%rax,%r14,4), %rcx
cmpq %rcx, %rdx
leaq 0x50(%rsp), %r14
jl 0xb849
movl 0xdc(%rbx), %ebp
movq 0x30(%rsp), %r14
incq %r14
movslq %ebp, %rcx
cmpq %rcx, %r14
jl 0xb7d5
jmp 0xc76f
xorpd %xmm0, %xmm0
movss %xmm0, 0x4(%rsp)
movss 0x4(%rsp), %xmm0
addq $0x258, %rsp            # imm = 0x258
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xc8b3
movq %rax, %rbx
movq 0x40(%rsp), %rdi
cmpq %r14, %rdi
jne 0xc9e1
jmp 0xc9e6
movq %rax, %rbx
leaq 0x50(%rsp), %r15
jmp 0xc841
movq %rax, %rbx
jmp 0xc815
movq %rax, %rbx
jmp 0xc82f
movq %rax, %rbx
leaq 0xb8(%rsp), %r14
leaq 0x50(%rsp), %r15
jmp 0xc801
movq %rax, %rbx
jmp 0xc7f2
jmp 0xc8b3
movq %rax, %rbx
movq 0x170(%rsp), %rdi
leaq 0x180(%rsp), %rax
cmpq %rax, %rdi
je 0xc7f2
callq 0x53d0
movq 0x68(%rsp), %rdi
cmpq %rbp, %rdi
je 0xc801
callq 0x53d0
leaq 0x18(%rsp), %rax
movq 0x8(%rsp), %rdi
cmpq %rax, %rdi
je 0xc815
callq 0x53d0
movq 0x88(%rsp), %rdi
leaq 0x98(%rsp), %rax
cmpq %rax, %rdi
je 0xc82f
callq 0x53d0
movq 0xa8(%rsp), %rdi
cmpq %r14, %rdi
je 0xc841
callq 0x53d0
movq 0x40(%rsp), %rdi
cmpq %r15, %rdi
jne 0xc9e1
jmp 0xc9e6
movq %rax, %rbx
movq 0x238(%rsp), %rdi
cmpq %rbp, %rdi
jne 0xc9c7
jmp 0xc9cc
movq %rax, %rbx
movq 0x218(%rsp), %rdi
leaq 0x228(%rsp), %rax
jmp 0xc9c2
jmp 0xc8b3
movq %rax, %rbx
movq 0x1f8(%rsp), %rdi
leaq 0x208(%rsp), %rax
cmpq %rax, %rdi
je 0xc8be
callq 0x53d0
jmp 0xc8be
movq %rax, %rbx
jmp 0xc90e
movq %rax, %rbx
jmp 0xc998
movq %rax, %rbx
jmp 0xc9cc
movq %rax, %rbx
movq 0x170(%rsp), %rdi
leaq 0x180(%rsp), %rax
jmp 0xc9c2
jmp 0xc8ef
movq %rax, %rbx
jmp 0xc958
movq %rax, %rbx
jmp 0xc984
movq %rax, %rbx
leaq 0x98(%rsp), %r15
jmp 0xc928
movq %rax, %rbx
jmp 0xc9b2
movq %rax, %rbx
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0xc90e
callq 0x53d0
movq 0x110(%rsp), %rdi
leaq 0x120(%rsp), %rax
cmpq %rax, %rdi
je 0xc928
callq 0x53d0
movq 0x88(%rsp), %rdi
cmpq %r15, %rdi
je 0xc944
callq 0x53d0
jmp 0xc944
movq %rax, %rbx
jmp 0xc972
movq %rax, %rbx
movq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rax
cmpq %rax, %rdi
je 0xc958
callq 0x53d0
movq 0x130(%rsp), %rdi
leaq 0x140(%rsp), %rax
cmpq %rax, %rdi
je 0xc972
callq 0x53d0
movq 0xa8(%rsp), %rdi
cmpq %rbp, %rdi
je 0xc984
callq 0x53d0
leaq 0x78(%rsp), %rax
movq 0x68(%rsp), %rdi
cmpq %rax, %rdi
je 0xc998
callq 0x53d0
movq 0x150(%rsp), %rdi
leaq 0x160(%rsp), %rax
cmpq %rax, %rdi
je 0xc9b2
callq 0x53d0
movq 0xd0(%rsp), %rdi
leaq 0xe0(%rsp), %rax
cmpq %rax, %rdi
je 0xc9cc
callq 0x53d0
movq 0xf0(%rsp), %rdi
leaq 0x100(%rsp), %rax
cmpq %rax, %rdi
je 0xc9e6
callq 0x53d0
movq %rbx, %rdi
callq 0x56b0