// File: /workspace/github_cpp_makefile_star2_O3/Lartu[P]coraldb/source/checkpoint.cpp
// Function: load_checkpoint()
void load_checkpoint()
{
    size_t loaded = 0;
    std::string line;
    std::ifstream checkpoint_file(global_filename);
    std::cout << "CoralDB: Attempting to load checkpoint file " << global_filename << std::endl;
    std::chrono::steady_clock::time_point begin = std::chrono::steady_clock::now();
    while (std::getline(checkpoint_file, line))
    {
        if (execute_command(line, 0) == 0)
        {
            ++loaded;
        }
        else
        {
            err_malformed_command_load(line);
        }
    }
    std::chrono::steady_clock::time_point end = std::chrono::steady_clock::now();
    std::cout << "CoralDB: Executed " << loaded << " startup commands in " << std::chrono::duration_cast<std::chrono::milliseconds>(end - begin).count() << " ms" << std::endl;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x228, %rsp            # imm = 0x228
leaq -0x38(%rbp), %r13
movq %r13, -0x10(%r13)
movq $0x0, -0x8(%r13)
movb $0x0, (%r13)
leaq 0x5bdf(%rip), %rsi      # 0xa370
leaq -0x250(%rbp), %rbx
movq %rbx, %rdi
movl $0x8, %edx
callq 0x3450
movq 0x5824(%rip), %rdi      # 0x9fd0
leaq 0x2a38(%rip), %rsi      # 0x71eb
movl $0x2c, %edx
callq 0x3330
movq 0x5bac(%rip), %rsi      # 0xa370
movq 0x5bad(%rip), %rdx      # 0xa378
movq 0x57fe(%rip), %rdi      # 0x9fd0
callq 0x3330
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x32f0
movsbl %al, %esi
movq %r14, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3200
xorl %r15d, %r15d
callq 0x33a0
movq %rax, %r14
leaq -0x48(%rbp), %r12
movq -0x250(%rbp), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x32f0
movsbl %al, %edx
movq %rbx, %rdi
movq %r12, %rsi
callq 0x34c0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x4861
movq %r12, %rdi
xorl %esi, %esi
callq 0x3c5b
testl %eax, %eax
je 0x485c
movq %r12, %rdi
callq 0x3a9d
jmp 0x4810
incq %r15
jmp 0x4810
callq 0x33a0
movq %rax, %rbx
movq 0x5760(%rip), %rdi      # 0x9fd0
leaq 0x29a1(%rip), %rsi      # 0x7218
movl $0x12, %edx
callq 0x3330
movq 0x5748(%rip), %rdi      # 0x9fd0
movq %r15, %rsi
callq 0x31f0
movq %rax, %r15
leaq 0x2991(%rip), %rsi      # 0x722b
movl $0x15, %edx
movq %rax, %rdi
callq 0x3330
subq %r14, %rbx
movabsq $0x431bde82d7b634db, %rcx # imm = 0x431BDE82D7B634DB
movq %rbx, %rax
imulq %rcx
movq %rdx, %rsi
shrq $0x3f, %rsi
sarq $0x12, %rdx
addq %rdx, %rsi
movq %r15, %rdi
callq 0x32d0
movq %rax, %rbx
leaq 0x2967(%rip), %rsi      # 0x7241
movl $0x3, %edx
movq %rax, %rdi
callq 0x3330
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x32f0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3200
leaq -0x250(%rbp), %rdi
callq 0x3090
movq -0x48(%rbp), %rdi
cmpq %r13, %rdi
je 0x4928
callq 0x32c0
addq $0x228, %rsp            # imm = 0x228
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0x4954
jmp 0x4945
jmp 0x4945
jmp 0x4945
movq %rax, %rbx
leaq -0x250(%rbp), %rdi
callq 0x3090
movq -0x48(%rbp), %rdi
cmpq %r13, %rdi
je 0x4962
callq 0x32c0
movq %rbx, %rdi
callq 0x34a0