// File: /workspace/github_cpp_makefile_star2_O2/nmmmnu[P]HM3/hm3/main/db_lsmload.cc
// Function: main
int main(int argc, char **argv){
	if (argc <= 2){
		printUsage(argv[0]);
		return 1;
	}

	const auto filename	= argv[1];
	const auto lsm_path	= argv[2];
	const auto lsm_ext	= ".db";

	MemList memlist;

	using MyList	= hm3::FlushList<MemList,Flusher>;

	MyList mylist{
		memlist,
		Flusher{
			MyIDGenerator{},
			lsm_path,
			lsm_ext
		},
		MEMLIST_SIZE
	};

	FileReader reader{ filename };

	return listLoad(mylist, reader);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x4f8, %rsp            # imm = 0x4F8
cmpl $0x2, %edi
jg 0x25d2
pushq $0x1
popq %rbx
movq (%rsi), %r14
leaq 0x3b22(%rip), %rdi      # 0x60d1
callq 0x22f0
leaq 0x3a77(%rip), %rdi      # 0x6032
movq %r14, %rsi
xorl %eax, %eax
callq 0x2030
pushq $0xa
popq %rdi
callq 0x22b0
jmp 0x27a8
movq 0x8(%rsi), %rbx
movq 0x10(%rsi), %r14
leaq 0x2e0(%rsp), %rdi
pushq $0x20
popq %rsi
callq 0x31de
leaq 0x18(%rsp), %rdi
movq %r14, %rsi
callq 0x282c
leaq 0x48(%rsp), %rcx
movq $0x3, (%rcx)
leaq 0x39fa(%rip), %rax      # 0x6004
movq %rax, 0x8(%rcx)
leaq 0xd0(%rsp), %rdi
movq %rsp, %rsi
leaq 0x18(%rsp), %rdx
pushq $0x1
popq %r8
callq 0x285c
leaq 0x68(%rsp), %rdi
leaq 0x2e0(%rsp), %rsi
leaq 0xd0(%rsp), %rdx
movl $0xa00000, %ecx         # imm = 0xA00000
callq 0x28ac
leaq 0xd0(%rsp), %rdi
callq 0x28b6
leaq 0x18(%rsp), %rdi
movq %rbx, %rsi
callq 0x282c
leaq 0xd0(%rsp), %rdi
leaq 0x18(%rsp), %rsi
pushq $0x3
popq %rdx
callq 0x28d0
pushq $0x1
popq %r12
leaq 0x18(%rsp), %rbx
leaq 0x48(%rsp), %r15
leaq 0x10(%rsp), %r13
movq %r12, %r14
movq %r12, %rax
xorl %edx, %edx
movl $0x2710, %ecx           # imm = 0x2710
divq %rcx
movq %rax, %rbp
movq 0xd0(%rsp), %rax
movq -0x18(%rax), %rax
cmpl $0x0, 0xf0(%rsp,%rax)
jne 0x2782
movq %rbx, %rdi
leaq 0xd0(%rsp), %rsi
callq 0x2fac
movq 0x18(%rsp), %rax
andq $0x0, 0x48(%rsp)
movq 0x20(%rsp), %rcx
movq %rcx, 0x50(%rsp)
movq %rax, 0x58(%rsp)
movb $0x20, 0x60(%rsp)
movq %r15, %rdi
callq 0x3ac8
movq %rax, (%rsp)
movq %rdx, 0x8(%rsp)
movq %r15, %rdi
callq 0x3ac8
movq %rax, 0x38(%rsp)
movq %rdx, 0x40(%rsp)
cmpq $0x0, (%rsp)
je 0x2738
movq %r13, %rdi
movq %rsp, %rsi
leaq 0x38(%rsp), %rdx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x3d40
leaq 0x68(%rsp), %rdi
movq %r13, %rsi
callq 0x3056
movq %r13, %rdi
callq 0x3d20
imulq $0x2710, %rbp, %rax     # imm = 0x2710
movq %r14, %rcx
subq %rax, %rcx
addq %r12, %rcx
cmpq $0x1, %rcx
jne 0x2772
movq 0x68(%rsp), %rax
movq 0x208(%rax), %rdx
movq 0x210(%rax), %rcx
leaq 0x3922(%rip), %rdi      # 0x608a
movq %r12, %rsi
xorl %eax, %eax
callq 0x2030
movq %rbx, %rdi
callq 0x20f0
incq %r12
jmp 0x268b
leaq 0xd0(%rsp), %rdi
callq 0x2090
leaq 0x68(%rsp), %rdi
callq 0x2924
leaq 0x2e0(%rsp), %rdi
callq 0x325e
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x4f8, %rsp            # imm = 0x4F8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0xd0(%rsp), %rdi
callq 0x28b6
jmp 0x2816
jmp 0x27d0
movq %rax, %rbx
jmp 0x2816
movq %rax, %rbx
jmp 0x280c
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x3d20
jmp 0x27f5
jmp 0x27f2
jmp 0x27f2
movq %rax, %rbx
jmp 0x27ff
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0x20f0
leaq 0xd0(%rsp), %rdi
callq 0x2090
leaq 0x68(%rsp), %rdi
callq 0x2924
leaq 0x2e0(%rsp), %rdi
callq 0x325e
movq %rbx, %rdi
callq 0x2370
nop