// File: /workspace/github_cpp_makefile_star2_O1/Konano[P]UselessDatabase/Database.cpp
// Function: Database::storeData(unsigned int)
Database::~Database() {
    update();
    fm->closeFile(mem_file);
    for (int i = 0; i < MAX_TABLE_NUM; i++) if (table[i] != nullptr) {
        delete table[i];
    }
    delete fm;
    delete bpm;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
xorps %xmm0, %xmm0
movaps %xmm0, 0x30(%rsp)
movq $0x0, 0x40(%rsp)
movl %esi, %ecx
movq %rcx, %rax
shlq $0x7, %rax
movq 0x850(%rdi,%rax), %rbx
movq 0x858(%rdi,%rax), %r12
cmpq %rbx, %r12
movq %rdi, 0x48(%rsp)
movq %rcx, 0x60(%rsp)
je 0x7dfa
leaq 0x8848(%rdi), %r13
leaq 0x20(%rdi), %rbp
leaq 0x50(%rsp), %r14
leaq 0x30(%rsp), %r15
movslq (%rbx), %rax
testq %rax, %rax
movl 0x4(%rbx), %edx
leaq (%rbp,%rax,8), %rcx
notl %eax
leaq (%r13,%rax,8), %rax
cmovsq %rax, %rcx
movq (%rcx), %rsi
movq %r14, %rdi
callq 0x26082
movq %r15, %rdi
movq %r14, %rsi
callq 0xa1bc
movq 0x50(%rsp), %rdi
testq %rdi, %rdi
je 0x7dec
movq (%rdi), %rax
callq *0x8(%rax)
addq $0x8, %rbx
cmpq %r12, %rbx
jne 0x7dad
jmp 0x7fc5
addq %rdi, %rax
addq $0x848, %rax            # imm = 0x848
movq 0x20(%rax), %rbx
movq 0x28(%rax), %r13
cmpq %rbx, %r13
je 0x7ec2
leaq 0x20(%rsp), %rbp
leaq 0x8848(%rdi), %r12
leaq 0x20(%rdi), %r14
leaq 0x58(%rsp), %r15
movl 0x8(%rbx), %eax
movl %eax, 0x8(%rsp)
movq (%rbx), %rax
movq %rax, (%rsp)
movq %rbp, 0x10(%rsp)
movq 0x10(%rbx), %rsi
movq 0x18(%rbx), %rdx
addq %rsi, %rdx
leaq 0x10(%rsp), %rdi
callq 0xa88e
cmpl $0x0, (%rsp)
je 0x7e99
movslq 0x4(%rsp), %rax
testq %rax, %rax
leaq (%r14,%rax,8), %rcx
notl %eax
leaq (%r12,%rax,8), %rax
cmovsq %rax, %rcx
movq (%rcx), %rsi
movl 0x8(%rsp), %edx
movq %r15, %rdi
callq 0x26082
leaq 0x30(%rsp), %rdi
movq %r15, %rsi
callq 0xa1bc
movq 0x58(%rsp), %rdi
testq %rdi, %rdi
je 0x7e99
movq (%rdi), %rax
callq *0x8(%rax)
movq 0x10(%rsp), %rdi
cmpq %rbp, %rdi
je 0x7eb0
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x53a0
addq $0x30, %rbx
cmpq %r13, %rbx
jne 0x7e29
jmp 0x7fc5
movq 0x38(%rax), %r14
movq 0x40(%rax), %rax
movq %rax, 0x78(%rsp)
cmpq %rax, %r14
je 0x7fc5
leaq 0x18(%rsp), %r15
movq 0x48(%rsp), %rax
leaq 0x8848(%rax), %rcx
movq %rcx, 0x70(%rsp)
addq $0x20, %rax
movq %rax, 0x68(%rsp)
leaq 0x80(%rsp), %rbx
leaq 0x30(%rsp), %r12
movl (%r14), %eax
movl %eax, (%rsp)
movq %r15, 0x8(%rsp)
movq 0x8(%r14), %rsi
movq 0x10(%r14), %rdx
addq %rsi, %rdx
leaq 0x8(%rsp), %rdi
callq 0xa88e
movslq (%rsp), %rax
testq %rax, %rax
movq 0x68(%rsp), %rcx
leaq (%rcx,%rax,8), %rcx
notl %eax
movq 0x70(%rsp), %rdx
leaq (%rdx,%rax,8), %rax
cmovsq %rax, %rcx
movq (%rcx), %rsi
movq %rbx, %r13
movq %rbx, %rdi
callq 0x260e2
movq 0x88(%rsp), %rax
subq 0x80(%rsp), %rax
movabsq $0x7fffffff8, %rcx      # imm = 0x7FFFFFFF8
testq %rcx, %rax
je 0x7f94
shrq $0x3, %rax
movl %eax, %ebp
xorl %ebx, %ebx
movq 0x80(%rsp), %rsi
addq %rbx, %rsi
movq %r12, %rdi
callq 0xa1bc
addq $0x8, %rbx
decq %rbp
jne 0x7f78
movq %r13, %rbx
movq %r13, %rdi
callq 0xa564
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x7fb6
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x53a0
addq $0x28, %r14
cmpq 0x78(%rsp), %r14
jne 0x7f04
movq 0x38(%rsp), %rax
subq 0x30(%rsp), %rax
movabsq $0x7fffffff8, %rcx      # imm = 0x7FFFFFFF8
testq %rcx, %rax
movq 0x48(%rsp), %rbx
movq 0x60(%rsp), %r14
je 0x7fff
movl $0x9fb8, %edi           # imm = 0x9FB8
addq 0x8848(%rbx,%r14,8), %rdi
leaq 0x30(%rsp), %rsi
callq 0x9c86
movq 0x8848(%rbx,%r14,8), %rax
incl 0x9fa0(%rax)
leaq 0x30(%rsp), %rdi
callq 0xa564
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x805d
jmp 0x805d
movq %rax, %rbx
jmp 0x8087
movq %rax, %rbx
movq 0x58(%rsp), %rdi
testq %rdi, %rdi
je 0x804a
movq (%rdi), %rax
callq *0x8(%rax)
jmp 0x804a
movq %rax, %rbx
movq 0x10(%rsp), %rdi
cmpq %rbp, %rdi
je 0x809e
movq 0x20(%rsp), %rsi
jmp 0x8096
jmp 0x805d
movq %rax, %rbx
jmp 0x809e
movq %rax, %rbx
movq 0x50(%rsp), %rdi
testq %rdi, %rdi
je 0x809e
movq (%rdi), %rax
callq *0x8(%rax)
jmp 0x809e
movq %rax, %rbx
leaq 0x80(%rsp), %rdi
callq 0xa564
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x809e
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x53a0
leaq 0x30(%rsp), %rdi
callq 0xa564
movq %rbx, %rdi
callq 0x56e0