// File: /workspace/github_cpp_makefile_star2_O3/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 %r12
pushq %rbx
subq $0xe0, %rsp
movq %rsi, %rbx
movb $0x0, 0xd(%rsp)
cmpl $0x3, %edi
je 0x3ac6
cmpl $0x2, %edi
jne 0x3b37
movq 0x8(%rbx), %rsi
leaq 0x30(%rsp), %r14
leaq 0x10(%rsp), %rdx
movq %r14, %rdi
callq 0x3d8c
leaq 0x7724(%rip), %rsi      # 0xb168
movq %r14, %rdi
callq 0x3100
movl %eax, %ebp
movq (%r14), %rdi
leaq 0x40(%rsp), %r12
cmpq %r12, %rdi
je 0x3a68
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x3280
movq 0x8(%rbx), %rsi
leaq 0x30(%rsp), %r14
leaq 0x10(%rsp), %rdx
movq %r14, %rdi
callq 0x3d8c
leaq 0x76e6(%rip), %rsi      # 0xb16b
movq %r14, %rdi
callq 0x3100
testl %eax, %eax
sete 0xd(%rsp)
sete %r15b
movq (%r14), %rdi
cmpq %r12, %rdi
je 0x3aad
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x3280
movq (%rbx), %rdi
testl %ebp, %ebp
je 0x3c0e
xorl %ebx, %ebx
leaq 0x76c1(%rip), %rsi      # 0xb182
jmp 0x3c22
movq 0x8(%rbx), %rsi
leaq 0x30(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x3d8c
leaq 0x7688(%rip), %rsi      # 0xb168
leaq 0x30(%rsp), %rdi
callq 0x3100
testl %eax, %eax
je 0x3b52
movq 0x10(%rbx), %rsi
leaq 0x10(%rsp), %rdi
leaq 0xe(%rsp), %rdx
callq 0x3d8c
leaq 0x7660(%rip), %rsi      # 0xb168
leaq 0x10(%rsp), %r14
movq %r14, %rdi
callq 0x3100
testl %eax, %eax
sete %bpl
movq (%r14), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x3b55
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x3280
jmp 0x3b55
cmpl $0x3, %edi
jg 0x3cec
movq (%rbx), %rdi
leaq 0x7638(%rip), %rsi      # 0xb182
xorl %r15d, %r15d
jmp 0x3c20
movb $0x1, %bpl
leaq 0x40(%rsp), %r12
movq -0x10(%r12), %rdi
cmpq %r12, %rdi
je 0x3b71
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x3280
movq 0x8(%rbx), %rsi
leaq 0x30(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x3d8c
leaq 0x75e0(%rip), %rsi      # 0xb16b
leaq 0x30(%rsp), %rdi
callq 0x3100
testl %eax, %eax
je 0x3be7
movq 0x10(%rbx), %rsi
leaq 0x10(%rsp), %rdi
leaq 0xe(%rsp), %rdx
callq 0x3d8c
leaq 0x75b8(%rip), %rsi      # 0xb16b
leaq 0x10(%rsp), %r14
movq %r14, %rdi
callq 0x3100
testl %eax, %eax
sete 0xd(%rsp)
sete %r15b
movq (%r14), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x3bef
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x3280
jmp 0x3bef
movb $0x1, 0xd(%rsp)
movb $0x1, %r15b
movq 0x30(%rsp), %rdi
cmpq %r12, %rdi
je 0x3c06
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x3280
movq (%rbx), %rdi
testb %bpl, %bpl
je 0x3c19
leaq 0x7582(%rip), %rsi      # 0xb197
movb $0x1, %bl
jmp 0x3c22
leaq 0x7562(%rip), %rsi      # 0xb182
xorl %ebx, %ebx
leaq 0x7571(%rip), %rax      # 0xb19a
leaq 0x7556(%rip), %rdx      # 0xb186
testb %r15b, %r15b
cmovneq %rax, %rdx
callq 0x366c
leaq 0x20(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x7557(%rip), %rsi      # 0xb1a4
leaq 0x7556(%rip), %rdx      # 0xb1aa
leaq 0x10(%rsp), %rdi
callq 0x4ea6
leaq 0xb00b(%rip), %r15      # 0xec70
leaq 0x58(%rsp), %r14
movq %r15, -0x28(%r14)
leaq 0x10(%rsp), %rsi
movq %r14, %rdi
callq 0x4f3c
movb %bl, 0xd0(%rsp)
xorps %xmm0, %xmm0
movups %xmm0, 0x38(%rsp)
movups %xmm0, 0x48(%rsp)
leaq 0xaf9a(%rip), %rax      # 0xec30
movq %rax, 0x30(%rsp)
movq $0x8000, 0xd8(%rsp) # imm = 0x8000
movq 0x10(%rsp), %rdi
cmpq %r12, %rdi
je 0x3cbe
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x3280
leaq 0x30(%rsp), %rdi
leaq 0xd(%rsp), %rsi
callq 0x3dca
movq %r15, 0x30(%rsp)
movq %r14, %rdi
callq 0x5356
xorl %eax, %eax
addq $0xe0, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq 0xb2fd(%rip), %rdi      # 0xeff0
leaq 0x7474(%rip), %rsi      # 0xb16e
callq 0x3260
movq %rax, %rdi
callq 0x3150
movq (%rbx), %rdi
leaq 0x7471(%rip), %rsi      # 0xb182
leaq 0x746e(%rip), %rdx      # 0xb186
callq 0x366c
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x32d0
movq %rax, %rbx
movq 0x30(%rsp), %rdi
cmpq %r12, %rdi
jne 0x3d47
jmp 0x3d83
movq %rax, %rbx
leaq 0x40(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3d83
movq 0x40(%rsp), %rsi
jmp 0x3d76
jmp 0x3d80
jmp 0x3d80
movq %rax, %rbx
movq %r15, 0x30(%rsp)
movq %r14, %rdi
callq 0x5356
jmp 0x3d83
movq %rax, %rbx
movq 0x10(%rsp), %rdi
cmpq %r12, %rdi
je 0x3d83
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x3280
jmp 0x3d83
movq %rax, %rbx
movq %rbx, %rdi
callq 0x33f0
nop