// File: /workspace/github_cpp_makefile_star2_O3/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, 0x48(%rsp)
movq %rax, (%rdi)
xorl %eax, %eax
movq %rax, 0x8(%rdi)
movb %al, 0x10(%rdi)
addq $0x28, %rdi
leaq 0x38(%rbx), %rcx
movq %rcx, 0x40(%rsp)
movq %rcx, 0x28(%rbx)
movq %rax, 0x30(%rbx)
movb %al, 0x38(%rbx)
movq %rax, 0x10(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
leaq 0x31bf(%rip), %rcx      # 0x17c5d
movl $0x1, %r8d
movq %rdi, 0x50(%rsp)
xorl %esi, %esi
xorl %edx, %edx
callq 0x3440
movq 0x28(%rbx), %rsi
movq 0x30(%rbx), %rcx
xorl %r12d, %r12d
movq %r15, %rdi
xorl %edx, %edx
callq 0x34a0
cmpq $-0x1, %rax
je 0x14b38
movq %rax, %r13
xorl %r12d, %r12d
leaq 0x20(%rsp), %rbp
movq %rsp, %r14
movq %r13, %rcx
subq %r12, %rcx
movq %rbp, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x32e0
movq %r14, %rdi
movq %rbp, %rsi
callq 0x15194
movq 0x28(%rbx), %rsi
movq 0x30(%rbx), %rcx
movq %r13, %r12
addq %rcx, %r12
movq %r15, %rdi
movq %r12, %rdx
callq 0x34a0
movq %rax, %r13
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x14b32
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x32c0
cmpq $-0x1, %r13
jne 0x14adb
leaq 0x20(%rsp), %rdi
movq %r15, %rsi
movq %r12, %rdx
movq $-0x1, %rcx
callq 0x32e0
movq %rsp, %rdi
leaq 0x20(%rsp), %rsi
callq 0x15496
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x14b77
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x32c0
movq (%rsp), %rsi
cmpq %rsi, 0x8(%rsp)
je 0x14c7f
movq %rbx, %rdi
callq 0x3160
movq (%rsp), %rax
movq 0x8(%rsp), %rdx
subq %rax, %rdx
sarq $0x5, %rdx
cmpq $0x2, %rdx
jb 0x14c85
movq 0x20(%rax), %r14
callq 0x3050
movq %rax, %r15
movl (%rax), %ebp
movl $0x0, (%rax)
leaq 0x20(%rsp), %r12
movq %r14, %rdi
movq %r12, %rsi
movl $0xa, %edx
callq 0x33c0
cmpq %r14, (%r12)
je 0x14c8c
movslq %eax, %rcx
cmpq %rax, %rcx
jne 0x14c98
movl (%r15), %ecx
cmpl $0x22, %ecx
je 0x14c98
testl %ecx, %ecx
jne 0x14bfa
movl %ebp, (%r15)
movl %eax, 0x20(%rbx)
movq (%rsp), %rax
movq 0x8(%rsp), %rdx
subq %rax, %rdx
sarq $0x5, %rdx
cmpq $0x2, %rdx
jbe 0x14ca4
movq 0x40(%rax), %r14
movl (%r15), %ebp
movl $0x0, (%r15)
leaq 0x20(%rsp), %r12
movq %r14, %rdi
movq %r12, %rsi
movl $0xa, %edx
callq 0x33c0
cmpq %r14, (%r12)
je 0x14cb7
movabsq $-0x100000000, %rcx     # imm = 0xFFFFFFFF00000000
leaq -0x80000000(%rax), %rdx
cmpq %rcx, %rdx
jb 0x14cc3
movl (%r15), %ecx
cmpl $0x22, %ecx
je 0x14cc3
testl %ecx, %ecx
jne 0x14c65
movl %ebp, (%r15)
movl %eax, 0x24(%rbx)
movq %rsp, %rdi
callq 0x151d2
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %esi, %esi
xorl %edx, %edx
jmp 0x14ca9
movl $0x1, %esi
jmp 0x14ca9
leaq 0x2fe5(%rip), %rdi      # 0x17c78
callq 0x3190
leaq 0x2fd9(%rip), %rdi      # 0x17c78
callq 0x33e0
movl $0x2, %esi
leaq 0x2abe(%rip), %rdi      # 0x1776e
xorl %eax, %eax
callq 0x3410
leaq 0x2fba(%rip), %rdi      # 0x17c78
callq 0x3190
leaq 0x2fae(%rip), %rdi      # 0x17c78
callq 0x33e0
movq %rax, %r12
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
jmp 0x14d05
jmp 0x14cf3
jmp 0x14cf3
jmp 0x14ce3
movq %rax, %r12
cmpl $0x0, (%r15)
jne 0x14d17
movl %ebp, (%r15)
jmp 0x14d17
jmp 0x14cf3
movq %rax, %r12
jmp 0x14d17
movq %rax, %r12
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x14d17
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x32c0
movq %rsp, %rdi
callq 0x151d2
movq 0x50(%rsp), %rax
movq (%rax), %rdi
cmpq 0x40(%rsp), %rdi
je 0x14d3e
movq 0x40(%rsp), %rax
movq (%rax), %rsi
incq %rsi
callq 0x32c0
movq (%rbx), %rdi
cmpq 0x48(%rsp), %rdi
je 0x14d58
movq 0x48(%rsp), %rax
movq (%rax), %rsi
incq %rsi
callq 0x32c0
movq %r12, %rdi
callq 0x34b0