// File: /workspace/github_cpp_makefile_star2_O1/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 0x3f4f(%rip), %rcx      # 0x18cb9
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 0x14e04
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 0x15464
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 0x14dfe
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x32c0
cmpq $-0x1, %r13
jne 0x14da7
leaq 0x20(%rsp), %rdi
movq %r15, %rsi
movq %r12, %rdx
movq $-0x1, %rcx
callq 0x32e0
movq %rsp, %rdi
leaq 0x20(%rsp), %rsi
callq 0x1579c
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x14e43
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x32c0
movq (%rsp), %rsi
cmpq %rsi, 0x8(%rsp)
je 0x14f4b
movq %rbx, %rdi
callq 0x3160
movq (%rsp), %rax
movq 0x8(%rsp), %rdx
subq %rax, %rdx
sarq $0x5, %rdx
cmpq $0x2, %rdx
jb 0x14f51
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 0x14f58
movslq %eax, %rcx
cmpq %rax, %rcx
jne 0x14f64
movl (%r15), %ecx
cmpl $0x22, %ecx
je 0x14f64
testl %ecx, %ecx
jne 0x14ec6
movl %ebp, (%r15)
movl %eax, 0x20(%rbx)
movq (%rsp), %rax
movq 0x8(%rsp), %rdx
subq %rax, %rdx
sarq $0x5, %rdx
cmpq $0x2, %rdx
jbe 0x14f70
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 0x14f83
movabsq $-0x100000000, %rcx     # imm = 0xFFFFFFFF00000000
leaq -0x80000000(%rax), %rdx
cmpq %rcx, %rdx
jb 0x14f8f
movl (%r15), %ecx
cmpl $0x22, %ecx
je 0x14f8f
testl %ecx, %ecx
jne 0x14f31
movl %ebp, (%r15)
movl %eax, 0x24(%rbx)
movq %rsp, %rdi
callq 0x154a2
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %esi, %esi
xorl %edx, %edx
jmp 0x14f75
movl $0x1, %esi
jmp 0x14f75
leaq 0x3d75(%rip), %rdi      # 0x18cd4
callq 0x3190
leaq 0x3d69(%rip), %rdi      # 0x18cd4
callq 0x33e0
movl $0x2, %esi
leaq 0x37f2(%rip), %rdi      # 0x1876e
xorl %eax, %eax
callq 0x3410
leaq 0x3d4a(%rip), %rdi      # 0x18cd4
callq 0x3190
leaq 0x3d3e(%rip), %rdi      # 0x18cd4
callq 0x33e0
movq %rax, %r12
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
jmp 0x14fd1
jmp 0x14fbf
jmp 0x14fbf
jmp 0x14faf
movq %rax, %r12
cmpl $0x0, (%r15)
jne 0x14fe3
movl %ebp, (%r15)
jmp 0x14fe3
jmp 0x14fbf
movq %rax, %r12
jmp 0x14fe3
movq %rax, %r12
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x14fe3
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x32c0
movq %rsp, %rdi
callq 0x154a2
movq 0x50(%rsp), %rax
movq (%rax), %rdi
cmpq 0x40(%rsp), %rdi
je 0x1500a
movq 0x40(%rsp), %rax
movq (%rax), %rsi
incq %rsi
callq 0x32c0
movq (%rbx), %rdi
cmpq 0x48(%rsp), %rdi
je 0x15024
movq 0x48(%rsp), %rax
movq (%rax), %rsi
incq %rsi
callq 0x32c0
movq %r12, %rdi
callq 0x34b0