// File: /workspace/github_cpp_makefile_star2_O3/BU-DiSC[P]BF-Shared-Hashing/lsm-emulation.cpp
// Function: loadfile(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, 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>>>>*, int*)
void loadfile( string filename, vector<string>* table, int* num )
{
	ifstream infile;
	infile.open( filename );

	if( infile.fail() ){
		cout << "Error opening " << filename << endl;
	}

	while( infile.peek() != EOF ){
		string line;
		getline(infile,line);
		int pos1 = line.find(" ");
		int pos2 = line.find(" ", pos1+2);
	    string data = line.substr(pos1+1, pos2-pos1-1);
		//cout << data << " " << data.size() << endl;
		table->push_back( data );
		(*num)++;
	}

	infile.close();
	return;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x258, %rsp            # imm = 0x258
movq %rdx, 0x20(%rsp)
movq %rsi, 0x28(%rsp)
movq %rdi, %r12
leaq 0x50(%rsp), %r13
movq %r13, %rdi
callq 0x5460
movq %r13, %rdi
movq %r12, %rsi
movl $0x8, %edx
callq 0x5380
movq 0x50(%rsp), %rax
movq -0x18(%rax), %rax
testb $0x5, 0x70(%rsp,%rax)
je 0x65b6
movq 0x32a6a(%rip), %rdi     # 0x38fd0
leaq 0x22acd(%rip), %rsi     # 0x2903a
movl $0xe, %edx
callq 0x5470
movq (%r12), %rsi
movq 0x8(%r12), %rdx
movq 0x32a49(%rip), %rdi     # 0x38fd0
callq 0x5470
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 0x10(%rsp), %rbx
leaq 0x30(%rsp), %r12
movq %r13, %rdi
callq 0x51a0
cmpl $-0x1, %eax
je 0x66be
movq %rbx, (%rsp)
movq $0x0, 0x8(%rsp)
movb $0x0, 0x10(%rsp)
movq 0x50(%rsp), %rax
movq -0x18(%rax), %rdi
addq %r13, %rdi
movl $0xa, %esi
callq 0x53f0
movq %rsp, %rbx
movsbl %al, %edx
movq %r13, %rdi
movq %rbx, %rsi
callq 0x56f0
movl $0x1, %ecx
movq %rbx, %rdi
leaq 0x2380b(%rip), %rbp     # 0x29e24
movq %rbp, %rsi
xorl %edx, %edx
callq 0x5690
movq %rax, %r14
movq %rbx, %r15
movq %rax, %rbx
shlq $0x20, %rbx
movabsq $0x200000000, %rax      # imm = 0x200000000
leaq (%rbx,%rax), %rdx
sarq $0x20, %rdx
movl $0x1, %ecx
movq %r15, %rdi
movq %rbp, %rsi
callq 0x5690
movabsq $0x100000000, %rcx      # imm = 0x100000000
addq %rcx, %rbx
sarq $0x20, %rbx
notl %r14d
addl %r14d, %eax
movslq %eax, %rcx
movq %r12, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x5440
movq 0x28(%rsp), %rdi
movq %r12, %rsi
callq 0x6b8a
movq 0x20(%rsp), %rax
incl (%rax)
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
leaq 0x10(%rsp), %rbx
je 0x66a7
callq 0x53d0
movq (%rsp), %rdi
cmpq %rbx, %rdi
je 0x65c0
callq 0x53d0
jmp 0x65c0
leaq 0x50(%rsp), %rdi
callq 0x50e0
leaq 0x50(%rsp), %rdi
callq 0x5100
addq $0x258, %rsp            # imm = 0x258
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x6701
jmp 0x6706
movq %rax, %rbx
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0x6709
callq 0x53d0
jmp 0x6709
movq %rax, %rbx
jmp 0x671c
movq %rax, %rbx
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x671c
callq 0x53d0
leaq 0x50(%rsp), %rdi
callq 0x5100
movq %rbx, %rdi
callq 0x56b0