// File: /workspace/github_cpp_makefile_star2_O3/Rjerk[P]ratabase/RatabaseManager.cpp
// Function: ratabase::RatabaseManager::deleteDB(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
bool RatabaseManager::deleteDB(const string& dbname)
{
    resetMsg();
    size_t id;
    if (searchDB(dbname, id)) {
        if (current_db == dbtable[id])
            current_db = dbtable[0];
        delete dbtable[id];
        dbtable[id] = nullptr;
        --dbcount;
        msg << "delete " << dbname << " [" << std::to_string(id) << "] ok." << endl;
        LOG_INFO << msg.str();
        return true;
    } else {
        msg << "\"" << dbname << "\" doesn't exist." << endl;
        LOG_INFO << msg.str();
        return false;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1b8, %rsp            # imm = 0x1B8
movq %rsi, %r12
movq %rdi, %r14
callq 0x899a
leaq 0x28(%rsp), %rdx
movq %r14, %rdi
movq %r12, %rsi
callq 0x88c4
movl %eax, %ebx
testb %al, %al
je 0x80cd
movq (%r14), %rax
movq 0x28(%rsp), %r15
movq (%rax,%r15,8), %r13
cmpq %r13, 0x8(%r14)
jne 0x8003
movq (%rax), %rcx
movq %rcx, 0x8(%r14)
movq (%rax,%r15,8), %r13
testq %r13, %r13
je 0x8010
movq %r13, %rdi
callq 0x8b20
movq %r13, %rdi
callq 0x32d0
movq (%r14), %rax
movq $0x0, (%rax,%r15,8)
decq 0x10(%r14)
leaq 0x18(%r14), %r13
leaq 0x546b(%rip), %rsi      # 0xd49d
movl $0x7, %edx
movq %r13, %rdi
callq 0x3340
movq (%r12), %rsi
movq 0x8(%r12), %rdx
movq %r13, %rdi
callq 0x3340
movq %rax, %r12
leaq 0x5418(%rip), %rsi      # 0xd472
movl $0x2, %edx
movq %rax, %rdi
callq 0x3340
movl $0x1, %esi
cmpq $0xa, %r15
jb 0x81a6
movl $0x4, %esi
movabsq $0x346dc5d63886594b, %rdi # imm = 0x346DC5D63886594B
movq %r15, %rcx
cmpq $0x63, %rcx
jbe 0x819f
cmpq $0x3e7, %rcx            # imm = 0x3E7
jbe 0x81a4
cmpq $0x2710, %rcx           # imm = 0x2710
jb 0x81a6
movq %rcx, %rax
mulq %rdi
shrq $0xb, %rdx
addl $0x4, %esi
cmpq $0x1869f, %rcx          # imm = 0x1869F
movq %rdx, %rcx
ja 0x8088
addl $-0x3, %esi
jmp 0x81a6
leaq 0x18(%r14), %r15
leaq 0x526f(%rip), %rsi      # 0xd347
movl $0x1, %edx
movq %r15, %rdi
callq 0x3340
movq (%r12), %rsi
movq 0x8(%r12), %rdx
movq %r15, %rdi
callq 0x3340
movq %rax, %r15
leaq 0x538c(%rip), %rsi      # 0xd48c
movl $0x10, %edx
movq %rax, %rdi
callq 0x3340
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x32f0
movsbl %al, %esi
movq %r15, %rdi
callq 0x3040
movq %rax, %rdi
callq 0x3200
callq 0xbc38
cmpl $0x2, %eax
jg 0x82ac
leaq 0x52e0(%rip), %rsi      # 0xd429
leaq 0x5355(%rip), %rcx      # 0xd4a5
leaq 0x30(%rsp), %r15
movq %r15, %rdi
movl $0x69, %edx
movl $0x2, %r8d
callq 0xb8ee
movq %r15, %rdi
callq 0xbc50
movq %rax, %r15
addq $0x20, %r14
leaq 0x8(%rsp), %rdi
movq %r14, %rsi
callq 0x3470
addq $0x10, %r15
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq %r15, %rdi
callq 0x3340
jmp 0x828f
addl $-0x2, %esi
jmp 0x81a6
decl %esi
movl %esi, %esi
leaq 0x40(%rsp), %rbp
movq %rbp, -0x10(%rbp)
leaq 0x30(%rsp), %r13
movq %r13, %rdi
xorl %edx, %edx
callq 0x3350
movq (%r13), %rdi
movl 0x8(%r13), %esi
movq %r15, %rdx
callq 0x8a0e
movq (%r13), %rsi
movq 0x8(%r13), %rdx
movq %r12, %rdi
callq 0x3340
movq %rax, %r15
leaq 0x528b(%rip), %rsi      # 0xd475
movl $0x5, %edx
movq %rax, %rdi
callq 0x3340
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x32f0
movsbl %al, %esi
movq %r15, %rdi
callq 0x3040
movq %rax, %rdi
callq 0x3200
movq 0x30(%rsp), %rdi
cmpq %rbp, %rdi
je 0x822d
callq 0x32d0
callq 0xbc38
cmpl $0x2, %eax
jg 0x82ac
leaq 0x51eb(%rip), %rsi      # 0xd429
leaq 0x5260(%rip), %rcx      # 0xd4a5
leaq 0x30(%rsp), %r15
movq %r15, %rdi
movl $0x65, %edx
movl $0x2, %r8d
callq 0xb8ee
movq %r15, %rdi
callq 0xbc50
movq %rax, %r15
addq $0x20, %r14
leaq 0x8(%rsp), %rdi
movq %r14, %rsi
callq 0x3470
addq $0x10, %r15
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq %r15, %rdi
callq 0x3340
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x82a2
callq 0x32d0
leaq 0x30(%rsp), %rdi
callq 0xbb02
movl %ebx, %eax
addq $0x1b8, %rsp            # imm = 0x1B8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x82c6
jmp 0x82e0
jmp 0x82e0
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x82e3
callq 0x32d0
jmp 0x82e3
jmp 0x82e0
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0xbb02
jmp 0x8301
movq %rax, %rbx
movq 0x30(%rsp), %rdi
cmpq %rbp, %rdi
je 0x8301
callq 0x32d0
movq %rbx, %rdi
callq 0x34d0
nop