// File: /workspace/github_cpp_makefile_star2_O3/BU-DiSC[P]BF-Shared-Hashing/db.cpp
// Function: db::GetFromData(int, int, int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool*)
inline string db::GetFromData( int i, int bf_no, int index_pos, string key, bool * result )
{
	vector <string> data_block;
	vector <string> filter;
	string sst_data_filename = data_dir + "level_" + to_string(i) + "-sst_" + to_string(bf_no) + ".txt";

	
	//auto data_start = high_resolution_clock::now();
	read_data( sst_data_filename, index_pos, key.size(), data_block );
	//auto data_end = high_resolution_clock::now();
	//data_duration += duration_cast<microseconds>(data_end - data_start);	
	int found = -1;
	for ( int k=0 ; k<data_block.size() ; k++){
		string data_entry = data_block[k].substr( 0, key.size() );
		if(data_entry.compare(key) == 0){
			found = k;
		}
	}
	if ( found == -1 ){
		*result = false;
		return "";
	}
	else {
		*result = true;
		return key; 
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x148, %rsp            # imm = 0x148
movq %r9, %r14
movl %r8d, %ebp
movl %ecx, %r12d
movl %edx, %r13d
movq %rsi, %r15
movq %rdi, %rbx
xorl %eax, %eax
movq %rax, 0x60(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0x50(%rsp)
movq %rax, 0x120(%rsp)
movaps %xmm0, 0x110(%rsp)
leaq 0x20(%rsp), %rax
movq %rax, -0x10(%rax)
movq 0x60(%rsi), %rsi
movq 0x68(%r15), %rdx
addq %rsi, %rdx
leaq 0x10(%rsp), %rdi
callq 0x6c14
movq %r15, 0x108(%rsp)
movl %ebp, 0x8(%rsp)
leaq 0x1ab0e(%rip), %rsi     # 0x29407
leaq 0x10(%rsp), %rdi
callq 0x5720
movl %r13d, %ebp
negl %ebp
cmovsl %r13d, %ebp
movl $0x1, %r15d
cmpl $0xa, %ebp
jb 0xe960
movl $0x4, %r15d
movl $0xd1b71759, %eax       # imm = 0xD1B71759
movl %ebp, %ecx
cmpl $0x63, %ecx
jbe 0xe957
cmpl $0x3e7, %ecx            # imm = 0x3E7
jbe 0xe95d
cmpl $0x2710, %ecx           # imm = 0x2710
jb 0xe960
movl %ecx, %edx
imulq %rax, %rdx
shrq $0x2d, %rdx
addl $0x4, %r15d
cmpl $0x1869f, %ecx          # imm = 0x1869F
movl %edx, %ecx
ja 0xe924
addl $-0x3, %r15d
jmp 0xe960
addl $-0x2, %r15d
jmp 0xe960
decl %r15d
shrl $0x1f, %r13d
leal (%r15,%r13), %esi
leaq 0x98(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x88(%rsp), %rdi
movl $0x2d, %edx
callq 0x5480
movl %r13d, %edi
addq 0x88(%rsp), %rdi
movl %r15d, %esi
movl %ebp, %edx
callq 0xe1ba
movq 0x10(%rsp), %rcx
movq 0x18(%rsp), %r8
movq 0x90(%rsp), %rdx
leaq (%rdx,%r8), %rax
movl $0xf, %edi
leaq 0x20(%rsp), %rsi
cmpq %rsi, %rcx
je 0xe9c5
movq 0x20(%rsp), %rdi
movq 0x88(%rsp), %rsi
cmpq %rdi, %rax
jbe 0xe9f1
movl $0xf, %edi
leaq 0x98(%rsp), %r9
cmpq %r9, %rsi
je 0xe9ec
movq 0x98(%rsp), %rdi
cmpq %rdi, %rax
jbe 0xe9fd
leaq 0x10(%rsp), %rdi
callq 0x5150
jmp 0xea0e
leaq 0x88(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x5450
leaq 0xb8(%rsp), %rdx
movq %rdx, -0x10(%rdx)
movq (%rax), %rsi
leaq 0x10(%rax), %rcx
cmpq %rcx, %rsi
je 0xea3b
movq %rsi, 0xa8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0xb8(%rsp)
jmp 0xea41
movups (%rcx), %xmm0
movups %xmm0, (%rdx)
movq %rax, %rdx
addq $0x8, %rdx
movq 0x8(%rax), %rsi
movq %rsi, 0xb0(%rsp)
movq %rcx, (%rax)
movq $0x0, (%rdx)
movb $0x0, (%rcx)
leaq 0x1a9a6(%rip), %rsi     # 0x2940e
leaq 0xa8(%rsp), %rdi
callq 0x5720
leaq 0xd8(%rsp), %rsi
movq %rsi, -0x10(%rsi)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0xeaa8
movq %rsi, %r13
movq %rdx, 0xc8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0xd8(%rsp)
jmp 0xeab1
movups (%rcx), %xmm0
movq %rsi, %r13
movups %xmm0, (%rsi)
movq 0x8(%rax), %rdx
movq %rdx, 0xd0(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movl %r12d, %ebp
negl %ebp
cmovsl %r12d, %ebp
movl $0x1, %r15d
cmpl $0xa, %ebp
jb 0xeb29
movl $0x4, %r15d
movl $0xd1b71759, %eax       # imm = 0xD1B71759
movl %ebp, %ecx
cmpl $0x63, %ecx
jbe 0xeb20
cmpl $0x3e7, %ecx            # imm = 0x3E7
jbe 0xeb26
cmpl $0x2710, %ecx           # imm = 0x2710
jb 0xeb29
movl %ecx, %edx
imulq %rax, %rdx
shrq $0x2d, %rdx
addl $0x4, %r15d
cmpl $0x1869f, %ecx          # imm = 0x1869F
movl %edx, %ecx
ja 0xeaed
addl $-0x3, %r15d
jmp 0xeb29
addl $-0x2, %r15d
jmp 0xeb29
decl %r15d
shrl $0x1f, %r12d
leal (%r15,%r12), %esi
leaq 0x78(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x68(%rsp), %rdi
movl $0x2d, %edx
callq 0x5480
movl %r12d, %edi
addq 0x68(%rsp), %rdi
movl %r15d, %esi
movl %ebp, %edx
callq 0xe1ba
movq 0xc8(%rsp), %rcx
movq 0xd0(%rsp), %r8
movq 0x70(%rsp), %rdx
leaq (%rdx,%r8), %rax
movl $0xf, %edi
cmpq %r13, %rcx
je 0xeb86
movq 0xd8(%rsp), %rdi
movq 0x68(%rsp), %rsi
cmpq %rdi, %rax
jbe 0xeba9
movl $0xf, %edi
leaq 0x78(%rsp), %r9
cmpq %r9, %rsi
je 0xeba4
movq 0x78(%rsp), %rdi
cmpq %rdi, %rax
jbe 0xebb8
leaq 0xc8(%rsp), %rdi
callq 0x5150
jmp 0xebc6
leaq 0x68(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x5450
leaq 0x40(%rsp), %rdx
movq %rdx, -0x10(%rdx)
movq (%rax), %rsi
leaq 0x10(%rax), %rcx
cmpq %rcx, %rsi
je 0xebea
movq %rsi, 0x30(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x40(%rsp)
jmp 0xebf0
movups (%rcx), %xmm0
movups %xmm0, (%rdx)
movq %rax, %rdx
addq $0x8, %rdx
movq 0x8(%rax), %rsi
movq %rsi, 0x38(%rsp)
movq %rcx, (%rax)
movq $0x0, (%rdx)
movb $0x0, (%rcx)
leaq 0x1b0e9(%rip), %rsi     # 0x29cfd
leaq 0x30(%rsp), %rdi
callq 0x5720
leaq 0xf8(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0xec4f
movq %rdx, 0xe8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0xf8(%rsp)
jmp 0xec57
movups (%rcx), %xmm0
movups %xmm0, (%r12)
movq 0x8(%rax), %rdx
movq %rdx, 0xf0(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x40(%rsp), %rbp
movq -0x10(%rbp), %rdi
cmpq %rbp, %rdi
je 0xec85
callq 0x53d0
movq 0x68(%rsp), %rdi
leaq 0x78(%rsp), %rax
cmpq %rax, %rdi
je 0xec99
callq 0x53d0
movq 0xc8(%rsp), %rdi
cmpq %r13, %rdi
je 0xecab
callq 0x53d0
leaq 0xb8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xecc1
callq 0x53d0
movq 0x88(%rsp), %rdi
leaq 0x98(%rsp), %rax
cmpq %rax, %rdi
je 0xecdb
callq 0x53d0
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0xecef
callq 0x53d0
leaq 0x138(%rsp), %r15
movq %r15, -0x10(%r15)
movq 0xe8(%rsp), %rsi
movq 0xf0(%rsp), %rdx
addq %rsi, %rdx
leaq 0x128(%rsp), %rdi
callq 0x6c14
movl 0x8(%r14), %ecx
leaq 0x128(%rsp), %rsi
leaq 0x50(%rsp), %r8
movq 0x108(%rsp), %rdi
movl 0x8(%rsp), %edx
callq 0xf07a
movq 0x128(%rsp), %rdi
cmpq %r15, %rdi
je 0xed4f
callq 0x53d0
movq 0x180(%rsp), %rax
movq 0x50(%rsp), %rsi
cmpq %rsi, 0x58(%rsp)
je 0xee07
movq %rbx, 0x8(%rsp)
movl $0xffffffff, %r12d      # imm = 0xFFFFFFFF
xorl %ebx, %ebx
leaq 0x30(%rsp), %r15
xorl %r13d, %r13d
addq %rbx, %rsi
movq 0x8(%r14), %rcx
movq %r15, %rdi
xorl %edx, %edx
callq 0x5440
movq %r15, %rdi
movq %r14, %rsi
callq 0x5050
testl %eax, %eax
cmovel %r13d, %r12d
movq 0x30(%rsp), %rdi
cmpq %rbp, %rdi
je 0xedad
callq 0x53d0
incq %r13
movq 0x50(%rsp), %rsi
movq 0x58(%rsp), %rax
subq %rsi, %rax
sarq $0x5, %rax
addq $0x20, %rbx
cmpq %r13, %rax
ja 0xed7c
cmpl $-0x1, %r12d
movq 0x8(%rsp), %rbx
leaq 0xf8(%rsp), %r12
movq 0x180(%rsp), %rax
je 0xee07
movb $0x1, (%rax)
leaq 0x10(%rbx), %rcx
movq %rcx, (%rbx)
movq (%r14), %rdx
leaq 0x10(%r14), %rax
cmpq %rax, %rdx
je 0xee25
movq %rdx, (%rbx)
movq (%rax), %rcx
movq %rcx, 0x10(%rbx)
jmp 0xee2b
movb $0x0, (%rax)
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0x1a641(%rip), %rdx     # 0x29459
movq %rbx, %rdi
movq %rdx, %rsi
callq 0xf95c
jmp 0xee43
movups (%rax), %xmm0
movups %xmm0, (%rcx)
movq 0x8(%r14), %rcx
movq %rcx, 0x8(%rbx)
movq %rax, (%r14)
movq $0x0, 0x8(%r14)
movb $0x0, 0x10(%r14)
movq 0xe8(%rsp), %rdi
cmpq %r12, %rdi
je 0xee55
callq 0x53d0
leaq 0x110(%rsp), %rdi
callq 0x698e
leaq 0x50(%rsp), %rdi
callq 0x698e
movq %rbx, %rax
addq $0x148, %rsp            # imm = 0x148
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xef3c
movq %rax, %rbx
movq 0x128(%rsp), %rdi
cmpq %r15, %rdi
jne 0xef4e
jmp 0xef53
jmp 0xef3c
movq %rax, %rbx
leaq 0x40(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xeebf
callq 0x53d0
jmp 0xeebf
movq %rax, %rbx
movq 0x68(%rsp), %rdi
leaq 0x78(%rsp), %rax
cmpq %rax, %rdi
je 0xeed8
callq 0x53d0
jmp 0xeed8
movq %rax, %rbx
movq 0xc8(%rsp), %rdi
cmpq %r13, %rdi
je 0xeeef
callq 0x53d0
jmp 0xeeef
movq %rax, %rbx
leaq 0xb8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xef0a
callq 0x53d0
jmp 0xef0a
movq %rax, %rbx
movq 0x88(%rsp), %rdi
leaq 0x98(%rsp), %rax
cmpq %rax, %rdi
je 0xef2b
callq 0x53d0
jmp 0xef2b
jmp 0xef28
movq %rax, %rbx
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
jmp 0xef63
movq %rax, %rbx
jmp 0xef6d
movq %rax, %rbx
jmp 0xef53
movq %rax, %rbx
movq 0x30(%rsp), %rdi
cmpq %rbp, %rdi
je 0xef53
callq 0x53d0
movq 0xe8(%rsp), %rdi
leaq 0xf8(%rsp), %rax
cmpq %rax, %rdi
je 0xef6d
callq 0x53d0
leaq 0x110(%rsp), %rdi
callq 0x698e
leaq 0x50(%rsp), %rdi
callq 0x698e
movq %rbx, %rdi
callq 0x56b0