// File: /workspace/github_cpp_makefile_star2_O3/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 0x2636
movq (%rsi), %rbx
leaq 0x3b10(%rip), %rdi      # 0x611c
callq 0x2310
leaq 0x3a1a(%rip), %rdi      # 0x6032
movq %rbx, %rsi
xorl %eax, %eax
callq 0x2030
movl $0xa, %edi
callq 0x22c0
movl $0x1, %eax
jmp 0x2912
movq 0x8(%rsi), %rbx
movq 0x10(%rsi), %r15
leaq 0x2e0(%rsp), %r14
movq %r14, %rdi
movl $0x20, %esi
callq 0x34d8
testq %r15, %r15
je 0x2662
movq %r15, %rdi
callq 0x20c0
jmp 0x266b
leaq 0x3a9e(%rip), %r15      # 0x6107
xorl %eax, %eax
movq %rsp, %rdx
movq %rax, (%rdx)
movq %r15, 0x8(%rdx)
leaq 0x48(%rsp), %rcx
movq $0x3, (%rcx)
leaq 0x397c(%rip), %rax      # 0x6004
movq %rax, 0x8(%rcx)
leaq 0xd0(%rsp), %rdi
leaq 0x20(%rsp), %rsi
movl $0x1, %r8d
callq 0x2990
leaq 0x88(%rsp), %rcx
movq %r14, -0x20(%rcx)
movq %rcx, -0x10(%rcx)
leaq 0xe8(%rsp), %rax
movq -0x10(%rax), %rdx
cmpq %rax, %rdx
je 0x26dc
movq %rdx, 0x78(%rsp)
movq 0xe8(%rsp), %rcx
movq %rcx, 0x88(%rsp)
jmp 0x26e2
movups (%rax), %xmm0
movups %xmm0, (%rcx)
leaq 0x108(%rsp), %rcx
movq -0x28(%rcx), %rdi
movq -0x10(%rcx), %rsi
leaq 0xa8(%rsp), %rdx
movq %rdi, -0x28(%rdx)
movq %rax, -0x30(%rcx)
movq $0x0, -0x28(%rcx)
movb $0x0, -0x20(%rcx)
movq %rdx, -0x10(%rdx)
cmpq %rcx, %rsi
je 0x2731
movq %rsi, 0x98(%rsp)
movq 0x108(%rsp), %rax
movq %rax, 0xa8(%rsp)
jmp 0x2737
movups (%rcx), %xmm0
movups %xmm0, (%rdx)
movq 0x100(%rsp), %rax
movq %rax, 0xa0(%rsp)
movb $0x0, 0x108(%rsp)
movb 0x118(%rsp), %al
movb %al, 0xb8(%rsp)
movq $0x0, 0xc0(%rsp)
movq $0xa00000, 0xc8(%rsp) # imm = 0xA00000
testq %rbx, %rbx
je 0x2784
movq %rbx, %rdi
callq 0x20c0
jmp 0x278d
leaq 0x397c(%rip), %rbx      # 0x6107
xorl %eax, %eax
movq %rsp, %rsi
movq %rax, (%rsi)
movq %rbx, 0x8(%rsi)
leaq 0xd0(%rsp), %rdi
movl $0x3, %edx
callq 0x2a0a
movq 0xd0(%rsp), %rax
movq -0x18(%rax), %rax
cmpl $0x0, 0xf0(%rsp,%rax)
jne 0x28ec
movl $0x1, %ebx
movq %rsp, %r14
leaq 0xd0(%rsp), %r15
leaq 0x48(%rsp), %r12
leaq 0x30(%rsp), %rbp
movq %rbx, %rax
movabsq $0x346dc5d63886594b, %rcx # imm = 0x346DC5D63886594B
mulq %rcx
movq %rdx, %r13
movq %r14, %rdi
movq %r15, %rsi
callq 0x321e
movq (%rsp), %rax
movq 0x8(%rsp), %rcx
movq $0x0, 0x48(%rsp)
movq %rcx, 0x50(%rsp)
movq %rax, 0x58(%rsp)
movb $0x20, 0x60(%rsp)
movq %r12, %rdi
callq 0x3de4
movq %rax, 0x20(%rsp)
movq %rdx, 0x28(%rsp)
movq %r12, %rdi
callq 0x3de4
movq %rax, 0x38(%rsp)
movq %rdx, 0x40(%rsp)
cmpq $0x0, 0x20(%rsp)
je 0x2874
movq %rbp, %rdi
leaq 0x20(%rsp), %rsi
leaq 0x38(%rsp), %rdx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x4070
leaq 0x68(%rsp), %rdi
movq %rbp, %rsi
callq 0x3308
movq %rbp, %rdi
callq 0x4024
shrq $0xb, %r13
imulq $0x2710, %r13, %rax     # imm = 0x2710
movl $0x1, %ecx
subq %rax, %rcx
addq %rbx, %rcx
cmpq $0x1, %rcx
jne 0x28b4
movq 0x68(%rsp), %rax
movq 0x208(%rax), %rdx
movq 0x210(%rax), %rcx
leaq 0x3817(%rip), %rdi      # 0x60c1
movq %rbx, %rsi
xorl %eax, %eax
callq 0x2030
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x28cf
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2230
movq 0xd0(%rsp), %rax
movq -0x18(%rax), %rax
incq %rbx
cmpl $0x0, 0xf0(%rsp,%rax)
je 0x27dd
leaq 0xd0(%rsp), %rdi
callq 0x2060
leaq 0x68(%rsp), %rdi
callq 0x2a9a
leaq 0x2e0(%rsp), %rdi
callq 0x355c
xorl %eax, %eax
addq $0x4f8, %rsp            # imm = 0x4F8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0x2971
movq %rax, %rbx
jmp 0x297b
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x4024
jmp 0x2949
jmp 0x2946
movq %rax, %rbx
jmp 0x2964
jmp 0x2946
movq %rax, %rbx
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x2964
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2230
leaq 0xd0(%rsp), %rdi
callq 0x2060
leaq 0x68(%rsp), %rdi
callq 0x2a9a
leaq 0x2e0(%rsp), %rdi
callq 0x355c
movq %rbx, %rdi
callq 0x2380