// File: /workspace/github_cpp_makefile_star2_O1/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, 0xa0(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0x90(%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 0x6bf6
movq %r15, 0x108(%rsp)
movl %ebp, 0x8(%rsp)
leaq 0x1a9f4(%rip), %rsi     # 0x29407
leaq 0x10(%rsp), %rdi
callq 0x5720
movl %r13d, %ebp
negl %ebp
cmovsl %r13d, %ebp
movl $0x1, %r15d
cmpl $0xa, %ebp
jb 0xea7a
movl $0x4, %r15d
movl $0xd1b71759, %eax       # imm = 0xD1B71759
movl %ebp, %ecx
cmpl $0x63, %ecx
jbe 0xea71
cmpl $0x3e7, %ecx            # imm = 0x3E7
jbe 0xea77
cmpl $0x2710, %ecx           # imm = 0x2710
jb 0xea7a
movl %ecx, %edx
imulq %rax, %rdx
shrq $0x2d, %rdx
addl $0x4, %r15d
cmpl $0x1869f, %ecx          # imm = 0x1869F
movl %edx, %ecx
ja 0xea3e
addl $-0x3, %r15d
jmp 0xea7a
addl $-0x2, %r15d
jmp 0xea7a
decl %r15d
shrl $0x1f, %r13d
leal (%r15,%r13), %esi
leaq 0x80(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x70(%rsp), %rdi
movl $0x2d, %edx
callq 0x5480
movl %r13d, %edi
addq 0x70(%rsp), %rdi
movl %r15d, %esi
movl %ebp, %edx
callq 0xe2d1
movq 0x10(%rsp), %rcx
movq 0x18(%rsp), %r8
movq 0x78(%rsp), %rdx
leaq (%rdx,%r8), %rax
movl $0xf, %esi
leaq 0x20(%rsp), %rdi
cmpq %rdi, %rcx
je 0xead6
movq 0x20(%rsp), %rsi
cmpq %rsi, %rax
jbe 0xeafc
movl $0xf, %esi
leaq 0x80(%rsp), %rdi
cmpq %rdi, 0x70(%rsp)
je 0xeaf7
movq 0x80(%rsp), %rsi
cmpq %rsi, %rax
jbe 0xeb0d
movq 0x70(%rsp), %rsi
leaq 0x10(%rsp), %rdi
callq 0x5150
jmp 0xeb1b
leaq 0x70(%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 0xeb48
movq %rsi, 0xa8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0xb8(%rsp)
jmp 0xeb4e
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 0x1a899(%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 0xebb5
movq %rsi, %r13
movq %rdx, 0xc8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0xd8(%rsp)
jmp 0xebbe
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 0xec36
movl $0x4, %r15d
movl $0xd1b71759, %eax       # imm = 0xD1B71759
movl %ebp, %ecx
cmpl $0x63, %ecx
jbe 0xec2d
cmpl $0x3e7, %ecx            # imm = 0x3E7
jbe 0xec33
cmpl $0x2710, %ecx           # imm = 0x2710
jb 0xec36
movl %ecx, %edx
imulq %rax, %rdx
shrq $0x2d, %rdx
addl $0x4, %r15d
cmpl $0x1869f, %ecx          # imm = 0x1869F
movl %edx, %ecx
ja 0xebfa
addl $-0x3, %r15d
jmp 0xec36
addl $-0x2, %r15d
jmp 0xec36
decl %r15d
shrl $0x1f, %r12d
leal (%r15,%r12), %esi
leaq 0x60(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x50(%rsp), %rdi
movl $0x2d, %edx
callq 0x5480
movl %r12d, %edi
addq 0x50(%rsp), %rdi
movl %r15d, %esi
movl %ebp, %edx
callq 0xe2d1
movq 0xc8(%rsp), %rcx
movq 0xd0(%rsp), %r8
movq 0x58(%rsp), %rdx
leaq (%rdx,%r8), %rax
movl $0xf, %esi
cmpq %r13, %rcx
je 0xec93
movq 0xd8(%rsp), %rsi
cmpq %rsi, %rax
jbe 0xecb3
movl $0xf, %esi
leaq 0x60(%rsp), %rdi
cmpq %rdi, 0x50(%rsp)
je 0xecae
movq 0x60(%rsp), %rsi
cmpq %rsi, %rax
jbe 0xecc7
movq 0x50(%rsp), %rsi
leaq 0xc8(%rsp), %rdi
callq 0x5150
jmp 0xecd5
leaq 0x50(%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 0xecf9
movq %rsi, 0x30(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x40(%rsp)
jmp 0xecff
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 0x1afda(%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 0xed5e
movq %rdx, 0xe8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0xf8(%rsp)
jmp 0xed66
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 0xed94
callq 0x53d0
movq 0x50(%rsp), %rdi
leaq 0x60(%rsp), %rax
cmpq %rax, %rdi
je 0xeda8
callq 0x53d0
movq 0xc8(%rsp), %rdi
cmpq %r13, %rdi
je 0xedba
callq 0x53d0
leaq 0xb8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xedd0
callq 0x53d0
movq 0x70(%rsp), %rdi
leaq 0x80(%rsp), %rax
cmpq %rax, %rdi
je 0xede7
callq 0x53d0
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0xedfb
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 0x6bf6
movl 0x8(%r14), %ecx
leaq 0x128(%rsp), %rsi
leaq 0x90(%rsp), %r8
movq 0x108(%rsp), %rdi
movl 0x8(%rsp), %edx
callq 0xf192
movq 0x128(%rsp), %rdi
cmpq %r15, %rdi
je 0xee5e
callq 0x53d0
movq 0x180(%rsp), %rax
movq 0x90(%rsp), %rsi
cmpq %rsi, 0x98(%rsp)
je 0xef22
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 0xeec2
callq 0x53d0
incq %r13
movq 0x90(%rsp), %rsi
movq 0x98(%rsp), %rax
subq %rsi, %rax
sarq $0x5, %rax
addq $0x20, %rbx
cmpq %r13, %rax
ja 0xee91
cmpl $-0x1, %r12d
movq 0x8(%rsp), %rbx
leaq 0xf8(%rsp), %r12
movq 0x180(%rsp), %rax
je 0xef22
movb $0x1, (%rax)
leaq 0x10(%rbx), %rcx
movq %rcx, (%rbx)
movq (%r14), %rdx
leaq 0x10(%r14), %rax
cmpq %rax, %rdx
je 0xef40
movq %rdx, (%rbx)
movq (%rax), %rcx
movq %rcx, 0x10(%rbx)
jmp 0xef46
movb $0x0, (%rax)
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0x1a526(%rip), %rdx     # 0x29459
movq %rbx, %rdi
movq %rdx, %rsi
callq 0xfa70
jmp 0xef5e
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 0xef70
callq 0x53d0
leaq 0x110(%rsp), %rdi
callq 0x6982
leaq 0x90(%rsp), %rdi
callq 0x6982
movq %rbx, %rax
addq $0x148, %rsp            # imm = 0x148
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xf057
movq %rax, %rbx
movq 0x128(%rsp), %rdi
cmpq %r15, %rdi
jne 0xf069
jmp 0xf06e
jmp 0xf057
movq %rax, %rbx
leaq 0x40(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xefdd
callq 0x53d0
jmp 0xefdd
movq %rax, %rbx
movq 0x50(%rsp), %rdi
leaq 0x60(%rsp), %rax
cmpq %rax, %rdi
je 0xeff6
callq 0x53d0
jmp 0xeff6
movq %rax, %rbx
movq 0xc8(%rsp), %rdi
cmpq %r13, %rdi
je 0xf00d
callq 0x53d0
jmp 0xf00d
movq %rax, %rbx
leaq 0xb8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xf028
callq 0x53d0
jmp 0xf028
movq %rax, %rbx
movq 0x70(%rsp), %rdi
leaq 0x80(%rsp), %rax
cmpq %rax, %rdi
je 0xf046
callq 0x53d0
jmp 0xf046
jmp 0xf043
movq %rax, %rbx
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
jmp 0xf07e
movq %rax, %rbx
jmp 0xf088
movq %rax, %rbx
jmp 0xf06e
movq %rax, %rbx
movq 0x30(%rsp), %rdi
cmpq %rbp, %rdi
je 0xf06e
callq 0x53d0
movq 0xe8(%rsp), %rdi
leaq 0xf8(%rsp), %rax
cmpq %rax, %rdi
je 0xf088
callq 0x53d0
leaq 0x110(%rsp), %rdi
callq 0x6982
leaq 0x90(%rsp), %rdi
callq 0x6982
movq %rbx, %rdi
callq 0x56b0