// File: tonymuu[P]distributed-kv-store/Entry.cpp
// Function: Entry::Entry(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
Entry::Entry(string entry){
	vector<string> tuple;
	this->delimiter = ":";
	size_t pos = entry.find(delimiter);
	size_t start = 0;
	while (pos != string::npos) {
		string field = entry.substr(start, pos-start);
		tuple.push_back(field);
		start = pos + delimiter.size();
		pos = entry.find(delimiter, start);
	}
	tuple.push_back(entry.substr(start));

	value = tuple.at(0);
	timestamp = stoi(tuple.at(1));
	replica = static_cast<ReplicaType>(stoi(tuple.at(2)));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xe0, %rsp
movq %rsi, -0xa8(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x98(%rbp)
movq %rdi, %rax
movq %rax, -0xa0(%rbp)
callq 0x44b0
movq -0x98(%rbp), %rdi
addq $0x28, %rdi
movq %rdi, -0x90(%rbp)
callq 0x44b0
leaq -0x28(%rbp), %rdi
callq 0x28ce0
movq -0x90(%rbp), %rdi
leaq 0x43af(%rip), %rsi      # 0x2ccc1
callq 0x44a0
jmp 0x28919
movq -0xa8(%rbp), %rdi
movq -0xa0(%rbp), %rsi
addq $0x28, %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0x4660
movq %rax, -0x40(%rbp)
movq $0x0, -0x48(%rbp)
cmpq $-0x1, -0x40(%rbp)
je 0x289fb
movq -0xa8(%rbp), %rsi
movq -0x48(%rbp), %rdx
movq -0x40(%rbp), %rcx
subq %rdx, %rcx
leaq -0x68(%rbp), %rdi
callq 0x4370
jmp 0x28968
leaq -0x28(%rbp), %rdi
leaq -0x68(%rbp), %rsi
callq 0x28d00
jmp 0x28977
movq -0xa0(%rbp), %rdi
movq -0x40(%rbp), %rax
movq %rax, -0xb0(%rbp)
addq $0x28, %rdi
callq 0x4240
movq -0xa0(%rbp), %rsi
movq -0xa8(%rbp), %rdi
movq %rax, %rcx
movq -0xb0(%rbp), %rax
addq %rcx, %rax
movq %rax, -0x48(%rbp)
addq $0x28, %rsi
movq -0x48(%rbp), %rdx
callq 0x4660
movq %rax, -0x40(%rbp)
leaq -0x68(%rbp), %rdi
callq 0x4200
jmp 0x28940
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
jmp 0x28b16
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0x68(%rbp), %rdi
callq 0x4200
jmp 0x28b16
movq -0xa8(%rbp), %rsi
movq -0x48(%rbp), %rdx
leaq -0x88(%rbp), %rdi
movq $-0x1, %rcx
callq 0x4370
jmp 0x28a1b
leaq -0x28(%rbp), %rdi
leaq -0x88(%rbp), %rsi
callq 0x28d70
jmp 0x28a2d
leaq -0x88(%rbp), %rdi
callq 0x4200
xorl %eax, %eax
movl %eax, %esi
leaq -0x28(%rbp), %rdi
callq 0x28da0
movq %rax, -0xb8(%rbp)
jmp 0x28a4f
movq -0xb8(%rbp), %rsi
movq -0xa0(%rbp), %rdi
callq 0x4050
jmp 0x28a64
leaq -0x28(%rbp), %rdi
movl $0x1, %esi
callq 0x28da0
movq %rax, -0xc0(%rbp)
jmp 0x28a7b
movq -0xc0(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
movl $0xa, %edx
callq 0x28de0
movl %eax, -0xc4(%rbp)
jmp 0x28a98
movq -0xa0(%rbp), %rax
movl -0xc4(%rbp), %ecx
movl %ecx, 0x20(%rax)
leaq -0x28(%rbp), %rdi
movl $0x2, %esi
callq 0x28da0
movq %rax, -0xd0(%rbp)
jmp 0x28abf
movq -0xd0(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
movl $0xa, %edx
callq 0x28de0
movl %eax, -0xd4(%rbp)
jmp 0x28adc
movq -0xa0(%rbp), %rax
movl -0xd4(%rbp), %ecx
movl %ecx, 0x24(%rax)
leaq -0x28(%rbp), %rdi
callq 0x28e20
addq $0xe0, %rsp
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0x88(%rbp), %rdi
callq 0x4200
leaq -0x28(%rbp), %rdi
callq 0x28e20
movq -0x90(%rbp), %rdi
callq 0x4200
movq -0x98(%rbp), %rdi
callq 0x4200
movq -0x30(%rbp), %rdi
callq 0x45b0