// File: /workspace/github_cpp_makefile_star2_O1/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 0x293d
movq 0x8(%rsi), %rbx
movq 0x10(%rsi), %r15
leaq 0x2e0(%rsp), %r14
movq %r14, %rdi
movl $0x20, %esi
callq 0x34bc
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 0x29bc
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), %rdx
movq %rdx, 0xa8(%rsp)
jmp 0x2737
movups (%rcx), %xmm0
movups %xmm0, (%rdx)
movq 0xd8(%rsp), %rdi
movq 0x100(%rsp), %rdx
movq %rdx, 0xa0(%rsp)
movq %rcx, 0xf8(%rsp)
xorl %ecx, %ecx
movq %rcx, 0x100(%rsp)
movb $0x0, 0x108(%rsp)
movb 0x118(%rsp), %dl
movb %dl, 0xb8(%rsp)
movq %rcx, 0xc0(%rsp)
movq $0xa00000, 0xc8(%rsp) # imm = 0xA00000
cmpq %rax, %rdi
je 0x27a0
movq 0xe8(%rsp), %rsi
incq %rsi
callq 0x2230
testq %rbx, %rbx
je 0x27af
movq %rbx, %rdi
callq 0x20c0
jmp 0x27b8
leaq 0x3951(%rip), %rbx      # 0x6107
xorl %eax, %eax
movq %rsp, %rsi
movq %rax, (%rsi)
movq %rbx, 0x8(%rsi)
leaq 0xd0(%rsp), %rdi
movl $0x3, %edx
callq 0x2a36
movq 0xd0(%rsp), %rax
movq -0x18(%rax), %rax
cmpl $0x0, 0xf0(%rsp,%rax)
jne 0x2917
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 0x3216
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 0x3dbc
movq %rax, 0x20(%rsp)
movq %rdx, 0x28(%rsp)
movq %r12, %rdi
callq 0x3dbc
movq %rax, 0x38(%rsp)
movq %rdx, 0x40(%rsp)
cmpq $0x0, 0x20(%rsp)
je 0x289f
movq %rbp, %rdi
leaq 0x20(%rsp), %rsi
leaq 0x38(%rsp), %rdx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x404c
leaq 0x68(%rsp), %rdi
movq %rbp, %rsi
callq 0x32fe
movq %rbp, %rdi
callq 0x4000
shrq $0xb, %r13
imulq $0x2710, %r13, %rax     # imm = 0x2710
movl $0x1, %ecx
subq %rax, %rcx
addq %rbx, %rcx
cmpq $0x1, %rcx
jne 0x28df
movq 0x68(%rsp), %rax
movq 0x208(%rax), %rdx
movq 0x210(%rax), %rcx
leaq 0x37ec(%rip), %rdi      # 0x60c1
movq %rbx, %rsi
xorl %eax, %eax
callq 0x2030
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x28fa
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2230
movq 0xd0(%rsp), %rax
movq -0x18(%rax), %rax
incq %rbx
cmpl $0x0, 0xf0(%rsp,%rax)
je 0x2808
leaq 0xd0(%rsp), %rdi
callq 0x2060
leaq 0x68(%rsp), %rdi
callq 0x2ac6
leaq 0x2e0(%rsp), %rdi
callq 0x3540
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 0x299c
movq %rax, %rbx
jmp 0x29a6
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x4000
jmp 0x2974
jmp 0x2971
movq %rax, %rbx
jmp 0x298f
jmp 0x2971
movq %rax, %rbx
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x298f
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2230
leaq 0xd0(%rsp), %rdi
callq 0x2060
leaq 0x68(%rsp), %rdi
callq 0x2ac6
leaq 0x2e0(%rsp), %rdi
callq 0x3540
movq %rbx, %rdi
callq 0x2380
nop