// File: /workspace/github_cpp_makefile_star2_O1/SeanChao[P]KV-Store/persistence.cc
// Function: main
int main(int argc, char *argv[])
{
	bool verbose = false;
	bool testmode = false;

	if (argc == 2) {
		verbose = std::string(argv[1]) == "-v";
		testmode = std::string(argv[1]) == "-t";
	} else if (argc == 3) {
		verbose = std::string(argv[1]) == "-v" ||
			std::string(argv[2]) == "-v";
		testmode = std::string(argv[1]) == "-t" ||
			std::string(argv[2]) == "-t";
	} else if (argc > 3) {
		std::cerr << "Too many arguments." << std::endl;
		usage(argv[0], "OFF", "Preparation Mode");
		exit(-1);
	}
	usage(argv[0], verbose ? "ON" : "OFF",
	      testmode ? "Test Mode" : "Preparation Mode");

	PersistenceTest test("./data", verbose);

	test.start_test(static_cast<void *>(&testmode));

	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x118, %rsp            # imm = 0x118
movq %rsi, %rbx
movb $0x0, 0x5(%rsp)
cmpl $0x3, %edi
je 0x3ab2
cmpl $0x2, %edi
jne 0x3b08
movq 0x8(%rbx), %rsi
leaq 0x68(%rsp), %r14
leaq 0x28(%rsp), %rdx
movq %r14, %rdi
callq 0x3d74
leaq 0x7712(%rip), %rsi      # 0xb168
movq %r14, %rdi
callq 0x3100
testl %eax, %eax
sete %r15b
movq (%r14), %rdi
leaq 0x78(%rsp), %r12
cmpq %r12, %rdi
je 0x3a7e
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x3280
movq 0x8(%rbx), %rsi
leaq 0x68(%rsp), %r14
leaq 0x28(%rsp), %rdx
movq %r14, %rdi
callq 0x3d74
leaq 0x76d0(%rip), %rsi      # 0xb16b
movq %r14, %rdi
callq 0x3100
testl %eax, %eax
sete 0x5(%rsp)
movq (%r14), %rdi
jmp 0x3bd7
movq 0x8(%rbx), %rsi
leaq 0x68(%rsp), %rdi
leaq 0x48(%rsp), %rdx
callq 0x3d74
leaq 0x769c(%rip), %rsi      # 0xb168
leaq 0x68(%rsp), %rdi
callq 0x3100
movl %eax, %ebp
testl %eax, %eax
je 0x3b19
movq 0x10(%rbx), %rsi
leaq 0x28(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x3d74
leaq 0x7672(%rip), %rsi      # 0xb168
leaq 0x28(%rsp), %rdi
callq 0x3100
testl %eax, %eax
sete %r15b
jmp 0x3b1c
cmpl $0x4, %edi
jge 0x3cd5
xorl %r15d, %r15d
jmp 0x3be9
movb $0x1, %r15b
testl %ebp, %ebp
je 0x3b3b
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3b3b
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x3280
leaq 0x78(%rsp), %r12
movq -0x10(%r12), %rdi
cmpq %r12, %rdi
je 0x3b57
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x3280
movq 0x8(%rbx), %rsi
leaq 0x68(%rsp), %rdi
leaq 0x8(%rsp), %rdx
callq 0x3d74
leaq 0x75fa(%rip), %rsi      # 0xb16b
leaq 0x68(%rsp), %rdi
callq 0x3100
movl %eax, %ebp
testl %eax, %eax
je 0x3bcb
movq 0x10(%rbx), %rsi
leaq 0x48(%rsp), %rdi
leaq 0x6(%rsp), %rdx
callq 0x3d74
leaq 0x75d0(%rip), %rsi      # 0xb16b
leaq 0x48(%rsp), %r14
movq %r14, %rdi
callq 0x3100
testl %eax, %eax
sete 0x5(%rsp)
movq (%r14), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x3bd0
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x3280
jmp 0x3bd0
movb $0x1, 0x5(%rsp)
testl %ebp, %ebp
movq 0x68(%rsp), %rdi
cmpq %r12, %rdi
je 0x3be9
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x3280
movq (%rbx), %rdi
leaq 0x75a4(%rip), %rax      # 0xb197
leaq 0x7588(%rip), %rsi      # 0xb182
testb %r15b, %r15b
cmovneq %rax, %rsi
leaq 0x7592(%rip), %rax      # 0xb19a
leaq 0x7577(%rip), %rdx      # 0xb186
cmpb $0x0, 0x5(%rsp)
cmovneq %rax, %rdx
callq 0x367c
leaq 0x18(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0x7577(%rip), %rsi      # 0xb1a4
leaq 0x7576(%rip), %rdx      # 0xb1aa
leaq 0x8(%rsp), %rdi
callq 0x4e24
leaq 0xaff3(%rip), %r12      # 0xec38
leaq 0x90(%rsp), %r14
movq %r12, -0x28(%r14)
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
callq 0x4eb4
movb %r15b, 0x108(%rsp)
xorps %xmm0, %xmm0
movups %xmm0, 0x70(%rsp)
movups %xmm0, 0x80(%rsp)
leaq 0xaf7b(%rip), %rax      # 0xebf8
movq %rax, 0x68(%rsp)
movq $0x8000, 0x110(%rsp) # imm = 0x8000
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x3ca5
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x3280
leaq 0x68(%rsp), %rdi
leaq 0x5(%rsp), %rsi
callq 0x3db2
movq %r12, 0x68(%rsp)
movq %r14, %rdi
callq 0x52e2
xorl %eax, %eax
addq $0x118, %rsp            # imm = 0x118
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0xb314(%rip), %rdi      # 0xeff0
leaq 0x748b(%rip), %rsi      # 0xb16e
callq 0x3260
movq %rax, %rdi
callq 0x3150
movq (%rbx), %rdi
leaq 0x7488(%rip), %rsi      # 0xb182
leaq 0x7485(%rip), %rdx      # 0xb186
callq 0x367c
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x32d0
movq %rax, %rbx
movq 0x68(%rsp), %rdi
cmpq %r12, %rdi
jne 0x3d30
jmp 0x3d6c
movq %rax, %rbx
leaq 0x78(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3d6c
movq 0x78(%rsp), %rsi
jmp 0x3d5f
jmp 0x3d69
jmp 0x3d69
movq %rax, %rbx
movq %r12, 0x68(%rsp)
movq %r14, %rdi
callq 0x52e2
jmp 0x3d6c
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x3d6c
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x3280
jmp 0x3d6c
movq %rax, %rbx
movq %rbx, %rdi
callq 0x33f0