// File: Rjerk[P]ratabase/RatabaseManager.cpp
// Function: ratabase::RatabaseManager::createDB(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
bool RatabaseManager::createDB(const string& dbname)
{
    resetMsg();
    size_t id;
    if (searchDB(dbname, id)) {
        msg << "[" << std::to_string(id) << "] " << dbname << " have existed." << endl;
        LOG_INFO << msg.str();
        return false;
    }
    if (dbcount == DB_NUM_MAX) {
        msg << "The Number of databases limited in "
             << std::to_string(DB_NUM_MAX) << "."<< endl;
        LOG_INFO << msg.str();
        return false;
    }
    dbtable[dbcount] = new Ratabase(dbname);
    current_db = dbtable[dbcount];
    msg << "create " << dbname << " [" << std::to_string(dbcount) << "] ok." << endl;
    LOG_INFO << msg.str();
    ++dbcount;
    return true;
}

// Assembly:
subq $0x658, %rsp            # imm = 0x658
movq %rdi, 0x648(%rsp)
movq %rsi, 0x640(%rsp)
movq 0x648(%rsp), %rdi
movq %rdi, 0xc8(%rsp)
callq 0xda10
movq 0xc8(%rsp), %rdi
movq 0x640(%rsp), %rsi
leaq 0x638(%rsp), %rdx
callq 0xd910
testb $0x1, %al
jne 0xc4f2
jmp 0xc6fd
movq 0xc8(%rsp), %rdi
addq $0x18, %rdi
leaq 0x7f92(%rip), %rsi      # 0x14497
callq 0x3390
movq %rax, 0xb0(%rsp)
movq 0x638(%rsp), %rsi
leaq 0x618(%rsp), %rdi
movq %rdi, 0xb8(%rsp)
callq 0xdaa0
movq 0xb0(%rsp), %rdi
movq 0xb8(%rsp), %rsi
callq 0x3350
movq %rax, 0xc0(%rsp)
jmp 0xc54e
movq 0xc0(%rsp), %rdi
leaq 0x7ede(%rip), %rsi      # 0x1443b
callq 0x3390
movq %rax, 0xa8(%rsp)
jmp 0xc56c
movq 0xa8(%rsp), %rdi
movq 0x640(%rsp), %rsi
callq 0x3350
movq %rax, 0xa0(%rsp)
jmp 0xc58b
movq 0xa0(%rsp), %rdi
leaq 0x7ea4(%rip), %rsi      # 0x1443e
callq 0x3390
movq %rax, 0x98(%rsp)
jmp 0xc5a9
movq 0x98(%rsp), %rdi
movq 0xea08(%rip), %rsi      # 0x1afc0
callq 0x33c0
jmp 0xc5bf
leaq 0x618(%rsp), %rdi
callq 0x3280
callq 0x12170
cmpl $0x2, %eax
jg 0xc6f0
leaq 0x7e6c(%rip), %rsi      # 0x1444d
leaq 0x7e79(%rip), %rcx      # 0x14461
leaq 0x480(%rsp), %rdi
movq %rdi, 0x88(%rsp)
movl $0x39, %edx
movl $0x2, %r8d
callq 0x11e00
movq 0x88(%rsp), %rdi
callq 0x121a0
movq %rax, 0x90(%rsp)
jmp 0xc61f
movq 0xc8(%rsp), %rsi
movq 0x90(%rsp), %rax
addq $0x10, %rax
movq %rax, 0x80(%rsp)
addq $0x18, %rsi
leaq 0x460(%rsp), %rdi
callq 0x33b0
jmp 0xc64e
movq 0x80(%rsp), %rdi
leaq 0x460(%rsp), %rsi
callq 0x3350
jmp 0xc665
leaq 0x460(%rsp), %rdi
callq 0x3280
leaq 0x480(%rsp), %rdi
callq 0x12060
jmp 0xc6f0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x610(%rsp)
movl %eax, 0x60c(%rsp)
leaq 0x618(%rsp), %rdi
callq 0x3280
jmp 0xcafe
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x610(%rsp)
movl %eax, 0x60c(%rsp)
jmp 0xc6de
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x610(%rsp)
movl %eax, 0x60c(%rsp)
leaq 0x460(%rsp), %rdi
callq 0x3280
leaq 0x480(%rsp), %rdi
callq 0x12060
jmp 0xcafe
movb $0x0, 0x657(%rsp)
jmp 0xcaed
movq 0xc8(%rsp), %rax
cmpq $0xa, 0x10(%rax)
jne 0xc8b1
movq 0xc8(%rsp), %rdi
addq $0x18, %rdi
leaq 0x7d47(%rip), %rsi      # 0x1446a
callq 0x3390
movq %rax, 0x68(%rsp)
leaq 0x440(%rsp), %rdi
movq %rdi, 0x70(%rsp)
movl $0xa, %esi
callq 0xdaa0
movq 0x68(%rsp), %rdi
movq 0x70(%rsp), %rsi
callq 0x3350
movq %rax, 0x78(%rsp)
jmp 0xc75a
movq 0x78(%rsp), %rdi
leaq 0x7a79(%rip), %rsi      # 0x141df
callq 0x3390
movq %rax, 0x60(%rsp)
jmp 0xc772
movq 0x60(%rsp), %rdi
movq 0xe842(%rip), %rsi      # 0x1afc0
callq 0x33c0
jmp 0xc785
leaq 0x440(%rsp), %rdi
callq 0x3280
callq 0x12170
cmpl $0x2, %eax
jg 0xc8a4
leaq 0x7ca6(%rip), %rsi      # 0x1444d
leaq 0x7cb3(%rip), %rcx      # 0x14461
leaq 0x2b8(%rsp), %rdi
movq %rdi, 0x50(%rsp)
movl $0x3f, %edx
movl $0x2, %r8d
callq 0x11e00
movq 0x50(%rsp), %rdi
callq 0x121a0
movq %rax, 0x58(%rsp)
jmp 0xc7dc
movq 0xc8(%rsp), %rsi
movq 0x58(%rsp), %rax
addq $0x10, %rax
movq %rax, 0x48(%rsp)
addq $0x18, %rsi
leaq 0x298(%rsp), %rdi
callq 0x33b0
jmp 0xc805
movq 0x48(%rsp), %rdi
leaq 0x298(%rsp), %rsi
callq 0x3350
jmp 0xc819
leaq 0x298(%rsp), %rdi
callq 0x3280
leaq 0x2b8(%rsp), %rdi
callq 0x12060
jmp 0xc8a4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x610(%rsp)
movl %eax, 0x60c(%rsp)
leaq 0x440(%rsp), %rdi
callq 0x3280
jmp 0xcafe
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x610(%rsp)
movl %eax, 0x60c(%rsp)
jmp 0xc892
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x610(%rsp)
movl %eax, 0x60c(%rsp)
leaq 0x298(%rsp), %rdi
callq 0x3280
leaq 0x2b8(%rsp), %rdi
callq 0x12060
jmp 0xcafe
movb $0x0, 0x657(%rsp)
jmp 0xcaed
movl $0x48, %edi
callq 0x33a0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, 0x40(%rsp)
movq 0x640(%rsp), %rsi
callq 0xdd90
jmp 0xc8d5
movq 0xc8(%rsp), %rdi
movq 0x40(%rsp), %rdx
movq (%rdi), %rax
movq 0x10(%rdi), %rcx
movq %rdx, (%rax,%rcx,8)
movq (%rdi), %rax
movq 0x10(%rdi), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, 0x8(%rdi)
addq $0x18, %rdi
leaq 0x7b87(%rip), %rsi      # 0x1448e
callq 0x3390
movq %rax, %rdi
movq 0x640(%rsp), %rsi
callq 0x3350
movq %rax, %rdi
leaq 0x7b70(%rip), %rsi      # 0x14496
callq 0x3390
movq %rax, %rcx
movq 0xc8(%rsp), %rax
movq %rcx, 0x28(%rsp)
movq 0x10(%rax), %rsi
leaq 0x278(%rsp), %rdi
movq %rdi, 0x30(%rsp)
callq 0xdaa0
movq 0x28(%rsp), %rdi
movq 0x30(%rsp), %rsi
callq 0x3350
movq %rax, 0x38(%rsp)
jmp 0xc967
movq 0x38(%rsp), %rdi
leaq 0x7b26(%rip), %rsi      # 0x14499
callq 0x3390
movq %rax, 0x20(%rsp)
jmp 0xc97f
movq 0x20(%rsp), %rdi
movq 0xe635(%rip), %rsi      # 0x1afc0
callq 0x33c0
jmp 0xc992
leaq 0x278(%rsp), %rdi
callq 0x3280
callq 0x12170
cmpl $0x2, %eax
jg 0xcad1
leaq 0x7a99(%rip), %rsi      # 0x1444d
leaq 0x7aa6(%rip), %rcx      # 0x14461
leaq 0xf0(%rsp), %rdi
movq %rdi, 0x10(%rsp)
movl $0x45, %edx
movl $0x2, %r8d
callq 0x11e00
movq 0x10(%rsp), %rdi
callq 0x121a0
movq %rax, 0x18(%rsp)
jmp 0xc9e9
movq 0xc8(%rsp), %rsi
movq 0x18(%rsp), %rax
addq $0x10, %rax
movq %rax, 0x8(%rsp)
addq $0x18, %rsi
leaq 0xd0(%rsp), %rdi
callq 0x33b0
jmp 0xca12
movq 0x8(%rsp), %rdi
leaq 0xd0(%rsp), %rsi
callq 0x3350
jmp 0xca26
leaq 0xd0(%rsp), %rdi
callq 0x3280
leaq 0xf0(%rsp), %rdi
callq 0x12060
jmp 0xcad1
movq 0x40(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x610(%rsp)
movl %eax, 0x60c(%rsp)
callq 0x3370
jmp 0xcafe
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x610(%rsp)
movl %eax, 0x60c(%rsp)
leaq 0x278(%rsp), %rdi
callq 0x3280
jmp 0xcafe
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x610(%rsp)
movl %eax, 0x60c(%rsp)
jmp 0xcac2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x610(%rsp)
movl %eax, 0x60c(%rsp)
leaq 0xd0(%rsp), %rdi
callq 0x3280
leaq 0xf0(%rsp), %rdi
callq 0x12060
jmp 0xcafe
movq 0xc8(%rsp), %rax
movq 0x10(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x10(%rax)
movb $0x1, 0x657(%rsp)
movb 0x657(%rsp), %al
andb $0x1, %al
addq $0x658, %rsp            # imm = 0x658
retq
movq 0x610(%rsp), %rdi
callq 0x3590
nopl (%rax,%rax)