// File: wwdatabase[P]database/./smmana/sm.h
// Function: SM_Manager::show_db(char const*)
RC SM_Manager::show_db(const char* dbname)
{
	cout << "Show database:" << endl;
	if(strcmp(dbname,"*") == 0)
	{
		for(vector<DB>::iterator i = databases.begin();i != databases.end();i++)
		{
				printf("Database name: %s\n",i->dbname);
				printf("Table name:\n");
				for(int j =0 ;j <(i->table).size();j++)
				{
					cout << (i->table)[j].tablename << endl;
				}
		}
	}
	else{
			for(vector<DB>::iterator i = databases.begin();i != databases.end();i++)
			{
				if(strcmp(dbname,i->dbname) == 0)
				{
					printf("Database name: %s\n",i->dbname);
					printf("Table name:\n");
					for(int j =0 ;j <(i->table).size();j++)
					{
						cout << (i->table)[j].tablename << endl;
					}
					break;
				}

			}
		}

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x58(%rbp)
movq 0x11d99(%rip), %rdi     # 0x15fd8
leaq 0xb043(%rip), %rsi      # 0xf289
callq 0x2200
movq %rax, %rdi
movq 0x11d73(%rip), %rsi     # 0x15fc8
callq 0x2240
movq -0x10(%rbp), %rdi
leaq 0xaf8f(%rip), %rsi      # 0xf1f4
callq 0x2300
cmpl $0x0, %eax
jne 0x435e
movq -0x58(%rbp), %rdi
callq 0x6a70
movq %rax, -0x18(%rbp)
movq -0x58(%rbp), %rdi
callq 0x6ae0
movq %rax, -0x20(%rbp)
leaq -0x18(%rbp), %rdi
leaq -0x20(%rbp), %rsi
callq 0x6aa0
testb $0x1, %al
jne 0x42a3
jmp 0x4359
leaq -0x18(%rbp), %rdi
callq 0x6b10
movq %rax, %rsi
leaq 0xafe2(%rip), %rdi      # 0xf298
movb $0x0, %al
callq 0x2040
leaq 0xafe7(%rip), %rdi      # 0xf2ab
movb $0x0, %al
callq 0x2040
movl $0x0, -0x24(%rbp)
movslq -0x24(%rbp), %rax
movq %rax, -0x60(%rbp)
leaq -0x18(%rbp), %rdi
callq 0x6b10
movq %rax, %rdi
addq $0x100, %rdi            # imm = 0x100
callq 0x6c70
movq %rax, %rcx
movq -0x60(%rbp), %rax
cmpq %rcx, %rax
jae 0x4343
leaq -0x18(%rbp), %rdi
callq 0x6b10
movq %rax, %rdi
addq $0x100, %rdi            # imm = 0x100
movslq -0x24(%rbp), %rsi
callq 0x6ca0
movq %rax, %rsi
movq 0x11cb4(%rip), %rdi     # 0x15fd8
callq 0x2200
movq %rax, %rdi
movq 0x11c95(%rip), %rsi     # 0x15fc8
callq 0x2240
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x42d2
jmp 0x4345
leaq -0x18(%rbp), %rdi
xorl %esi, %esi
callq 0x6be0
movq %rax, -0x30(%rbp)
jmp 0x4280
jmp 0x446e
movq -0x58(%rbp), %rdi
callq 0x6a70
movq %rax, -0x38(%rbp)
movq -0x58(%rbp), %rdi
callq 0x6ae0
movq %rax, -0x40(%rbp)
leaq -0x38(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0x6aa0
testb $0x1, %al
jne 0x438e
jmp 0x446c
movq -0x10(%rbp), %rax
movq %rax, -0x68(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x6b10
movq -0x68(%rbp), %rdi
movq %rax, %rsi
callq 0x2300
cmpl $0x0, %eax
jne 0x4456
leaq -0x38(%rbp), %rdi
callq 0x6b10
movq %rax, %rsi
leaq 0xaed1(%rip), %rdi      # 0xf298
movb $0x0, %al
callq 0x2040
leaq 0xaed6(%rip), %rdi      # 0xf2ab
movb $0x0, %al
callq 0x2040
movl $0x0, -0x44(%rbp)
movslq -0x44(%rbp), %rax
movq %rax, -0x70(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x6b10
movq %rax, %rdi
addq $0x100, %rdi            # imm = 0x100
callq 0x6c70
movq %rax, %rcx
movq -0x70(%rbp), %rax
cmpq %rcx, %rax
jae 0x4454
leaq -0x38(%rbp), %rdi
callq 0x6b10
movq %rax, %rdi
addq $0x100, %rdi            # imm = 0x100
movslq -0x44(%rbp), %rsi
callq 0x6ca0
movq %rax, %rsi
movq 0x11ba3(%rip), %rdi     # 0x15fd8
callq 0x2200
movq %rax, %rdi
movq 0x11b84(%rip), %rsi     # 0x15fc8
callq 0x2240
movl -0x44(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x44(%rbp)
jmp 0x43e3
jmp 0x446c
jmp 0x4458
leaq -0x38(%rbp), %rdi
xorl %esi, %esi
callq 0x6be0
movq %rax, -0x50(%rbp)
jmp 0x436b
jmp 0x446e
xorl %eax, %eax
addq $0x70, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)