// File: /workspace/github_cpp_makefile_star2_O3/wwdatabase[P]database/./smmana/sm.h
// Function: SM_Manager::show_table(char const*)
RC SM_Manager::show_table(const char* tablename)
{
	cout << "Show table:" << endl;
	if(strcmp(tablename,"*") == 0)
	{
		cout << "show all tables!" << endl;
		for(int i = 0;i < databases.size();i++)
		{
			printf("Database name: %s\n",databases[i].dbname);
			for(int j = 0;j < databases[i].table.size();j++)
			{
				printf("Table name: %s\n",databases[i].table[j].tablename);
				printf("Table info:\n");
				cout << "Record Size: " << databases[i].table[j].recordSize << endl;
				for(int k = 0; k< databases[i].table[j].attrNum;k++)
				{
					cout << databases[i].table[j].attrName[k] <<" "<<databases[i].table[j].attrType[k] << " " << databases[i].table[j].attrLength[k] << " " << databases[i].table[j].isNull[k] << endl;
				}
				cout <<"Primary key number: " <<databases[i].table[j].prikeyNum << endl;
			}
		}

	}
	else
	{
		cout << "show one table!" << endl;
		for(int i = 0;i < databases.size();i++)
		{
			for(int j = 0;j < databases[i].table.size();j++)
			{
				if(strcmp(tablename,databases[i].table[j].tablename) == 0)
				{
					printf("Database name: %s\n",databases[i].dbname);
					printf("Table name: %s\n",databases[i].table[j].tablename);
					printf("Table info:\n");
					cout << "Record Size: " << databases[i].table[j].recordSize << endl;
					cout << "Attribute name|Attribute type|Attribute length|isnull" << endl;
					for(int k = 0; k< databases[i].table[j].attrNum;k++)
					{
						cout << databases[i].table[j].attrName[k] <<" "<<databases[i].table[j].attrType[k] << " " << databases[i].table[j].attrLength[k] << " " << databases[i].table[j].isNull[k] << endl;
					}
					cout <<"Primary key number: " <<databases[i].table[j].prikeyNum << endl;
					break;
				}
			}
		}
	}

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r15
movq %rdi, %rbx
movq 0x8576(%rip), %r14      # 0xcfd8
leaq 0x489a(%rip), %rsi      # 0x9303
movl $0xb, %edx
movq %r14, %rdi
callq 0x2200
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x21b0
movsbl %al, %esi
movq %r14, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2120
cmpb $0x2a, (%r15)
movq %rbx, -0x40(%rbp)
jne 0x4ab2
cmpb $0x0, 0x1(%r15)
je 0x4e3c
movq %r15, -0x48(%rbp)
leaq 0x4896(%rip), %rsi      # 0x9353
movl $0xf, %edx
movq %r14, %rdi
callq 0x2200
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x21b0
movsbl %al, %esi
movq %r14, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2120
movq %rbx, %rax
movq (%rbx), %rbx
movq 0x8(%rax), %r14
cmpq %rbx, %r14
je 0x4e2b
xorl %edx, %edx
imulq $0x118, %rdx, %rax      # imm = 0x118
movq 0x100(%rbx,%rax), %r13
movq 0x108(%rbx,%rax), %r12
subq %r13, %r12
je 0x4e07
movq %rdx, -0x50(%rbp)
movq %rax, -0x38(%rbp)
addq %rbx, %rax
movq %rax, -0x30(%rbp)
sarq $0x4, %r12
movabsq $0x4ec4ec4ec4ec4ec5, %rax # imm = 0x4EC4EC4EC4EC4EC5
imulq %rax, %r12
cmpq $0x1, %r12
adcq $0x0, %r12
xorl %r15d, %r15d
leaq (%r15,%r13), %rsi
movq -0x48(%rbp), %rdi
callq 0x2240
testl %eax, %eax
je 0x4b74
addq $0xd0, %r15
decq %r12
jne 0x4b52
jmp 0x4e03
leaq 0x4753(%rip), %rdi      # 0x92ce
movq -0x30(%rbp), %rsi
xorl %eax, %eax
callq 0x2050
movq -0x40(%rbp), %r13
movq (%r13), %rax
movq -0x38(%rbp), %r14
movq 0x100(%rax,%r14), %rsi
addq %r15, %rsi
leaq 0x477c(%rip), %rdi      # 0x9320
xorl %eax, %eax
callq 0x2050
leaq 0x4925(%rip), %rdi      # 0x94d7
callq 0x22c0
movl $0xd, %edx
movq 0x8415(%rip), %rbx      # 0xcfd8
movq %rbx, %rdi
leaq 0x4763(%rip), %rsi      # 0x9330
callq 0x2200
movq (%r13), %rax
movq 0x100(%rax,%r14), %rax
movl 0x64(%rax,%r15), %esi
movq %rbx, %rdi
callq 0x2310
movq %rax, %r12
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x21b0
movsbl %al, %esi
movq %r12, %rdi
movq %rbx, %r12
callq 0x2040
movq %rax, %rdi
callq 0x2120
movl $0x35, %edx
movq %rbx, %rdi
leaq 0x473c(%rip), %rsi      # 0x9363
callq 0x2200
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x21b0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2120
movq (%r13), %rax
movq 0x100(%rax,%r14), %rax
cmpl $0x0, 0x68(%rax,%r15)
leaq 0x444c(%rip), %r14      # 0x90b8
jle 0x4d9e
movl $0x8, %edx
xorl %ebx, %ebx
movq %rdx, -0x30(%rbp)
movq 0x70(%rax,%r15), %rax
movq -0x8(%rax,%rdx), %rsi
movq -0x30(%rbp), %rcx
movq (%rax,%rcx), %rdx
movq %r12, %rdi
callq 0x2200
movq %rax, %r12
movl $0x1, %edx
movq %rax, %rdi
movq %r14, %rsi
callq 0x2200
movq -0x40(%rbp), %r13
movq (%r13), %rax
movq -0x38(%rbp), %r14
movq 0x100(%rax,%r14), %rax
movq 0x88(%rax,%r15), %rax
movl (%rax,%rbx,4), %esi
movq %r12, %rdi
callq 0x2310
movq %rax, %r12
movl $0x1, %edx
movq %rax, %rdi
leaq 0x43d5(%rip), %rsi      # 0x90b8
callq 0x2200
movq (%r13), %rax
movq 0x100(%rax,%r14), %rax
movq 0xa0(%rax,%r15), %rax
movl (%rax,%rbx,4), %esi
movq %r12, %rdi
callq 0x2310
movq %rax, %r12
movl $0x1, %edx
movq %rax, %rdi
leaq 0x439f(%rip), %rsi      # 0x90b8
callq 0x2200
movq (%r13), %rax
movq 0x100(%rax,%r14), %rax
movq 0xb8(%rax,%r15), %rax
movl (%rax,%rbx,4), %esi
movq %r12, %rdi
callq 0x2310
movq %rax, %r12
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x21b0
movsbl %al, %esi
movq %r12, %rdi
movq 0x8277(%rip), %r12      # 0xcfd8
callq 0x2040
movq %rax, %rdi
callq 0x2120
movq -0x30(%rbp), %rdx
incq %rbx
movq (%r13), %rax
leaq 0x4338(%rip), %r14      # 0x90b8
movq -0x38(%rbp), %rcx
movq 0x100(%rax,%rcx), %rax
movslq 0x68(%rax,%r15), %rcx
addq $0x20, %rdx
cmpq %rcx, %rbx
jl 0x4c79
movl $0x14, %edx
movq %r12, %rdi
leaq 0x4591(%rip), %rsi      # 0x933e
callq 0x2200
movq -0x40(%rbp), %r14
movq (%r14), %rax
movq -0x38(%rbp), %rcx
movq 0x100(%rax,%rcx), %rax
movl 0x6c(%rax,%r15), %esi
movq %r12, %rdi
callq 0x2310
movq %rax, %r12
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x21b0
movsbl %al, %esi
movq %r12, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2120
movq (%r14), %rbx
movq 0x8(%r14), %r14
movq -0x50(%rbp), %rdx
incq %rdx
movq %r14, %rax
subq %rbx, %rax
sarq $0x3, %rax
movabsq $-0x5075075075075075, %rcx # imm = 0xAF8AF8AF8AF8AF8B
imulq %rcx, %rax
cmpq %rdx, %rax
ja 0x4b06
xorl %eax, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x44cc(%rip), %rsi      # 0x930f
movl $0x10, %edx
movq %r14, %rdi
callq 0x2200
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x21b0
movsbl %al, %esi
movq %r14, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2120
movq (%rbx), %rsi
cmpq %rsi, 0x8(%rbx)
je 0x4e2b
movq 0x8151(%rip), %rbx      # 0xcfd8
xorl %edx, %edx
movq %rdx, -0x48(%rbp)
imulq $0x118, %rdx, %r13      # imm = 0x118
addq %r13, %rsi
leaq 0x4430(%rip), %rdi      # 0x92ce
xorl %eax, %eax
callq 0x2050
movq -0x40(%rbp), %r15
movq (%r15), %rsi
movq 0x100(%rsi,%r13), %rax
cmpq %rax, 0x108(%rsi,%r13)
je 0x512b
xorl %edi, %edi
movq %rdi, -0x38(%rbp)
imulq $0xd0, %rdi, %r12
addq %r12, %rax
leaq 0x4447(%rip), %rdi      # 0x9320
movq %rax, %rsi
xorl %eax, %eax
callq 0x2050
leaq 0x45ed(%rip), %rdi      # 0x94d7
callq 0x22c0
movl $0xd, %edx
movq %rbx, %rdi
leaq 0x4432(%rip), %rsi      # 0x9330
callq 0x2200
movq (%r15), %rax
movq 0x100(%rax,%r13), %rax
movl 0x64(%rax,%r12), %esi
movq %rbx, %rdi
callq 0x2310
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x21b0
movsbl %al, %esi
movq %r14, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2120
movq (%r15), %rax
movq 0x100(%rax,%r13), %rax
cmpl $0x0, 0x68(%rax,%r12)
movq %r15, %r14
movq %rbx, %rsi
jle 0x5097
movl $0x8, %r15d
xorl %ebx, %ebx
movq %r12, -0x30(%rbp)
movq 0x70(%rax,%r12), %rax
movq -0x8(%rax,%r15), %rsi
movq (%rax,%r15), %rdx
movq 0x8055(%rip), %rdi      # 0xcfd8
callq 0x2200
movq %r13, %r12
movq %r14, %r13
movq %rax, %r14
movl $0x1, %edx
movq %rax, %rdi
leaq 0x4118(%rip), %rsi      # 0x90b8
callq 0x2200
movq (%r13), %rax
movq 0x100(%rax,%r12), %rax
movq -0x30(%rbp), %rcx
movq 0x88(%rax,%rcx), %rax
movl (%rax,%rbx,4), %esi
movq %r14, %rdi
callq 0x2310
movq %rax, %r14
movl $0x1, %edx
movq %rax, %rdi
leaq 0x40de(%rip), %rsi      # 0x90b8
callq 0x2200
movq (%r13), %rax
movq 0x100(%rax,%r12), %rax
movq -0x30(%rbp), %rcx
movq 0xa0(%rax,%rcx), %rax
movl (%rax,%rbx,4), %esi
movq %r14, %rdi
callq 0x2310
movq %rax, %r14
movl $0x1, %edx
movq %rax, %rdi
leaq 0x40a4(%rip), %rsi      # 0x90b8
callq 0x2200
movq (%r13), %rax
movq 0x100(%rax,%r12), %rax
movq -0x30(%rbp), %rcx
movq 0xb8(%rax,%rcx), %rax
movl (%rax,%rbx,4), %esi
movq %r14, %rdi
callq 0x2310
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x21b0
movsbl %al, %esi
movq %r14, %rdi
movq %r13, %r14
movq %r12, %r13
movq -0x30(%rbp), %r12
callq 0x2040
movq %rax, %rdi
callq 0x2120
movq 0x7f61(%rip), %rsi      # 0xcfd8
incq %rbx
movq (%r14), %rax
movq 0x100(%rax,%r13), %rax
movslq 0x68(%rax,%r12), %rcx
addq $0x20, %r15
cmpq %rcx, %rbx
jl 0x4f6e
movl $0x14, %edx
movq %rsi, %rbx
movq %rsi, %rdi
leaq 0x4295(%rip), %rsi      # 0x933e
callq 0x2200
movq (%r14), %rax
movq 0x100(%rax,%r13), %rax
movl 0x6c(%rax,%r12), %esi
movq %rbx, %rdi
callq 0x2310
movq %r14, %r15
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x21b0
movsbl %al, %esi
movq %r14, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2120
movq -0x38(%rbp), %rdi
incq %rdi
movq (%r15), %rsi
movq 0x100(%rsi,%r13), %rax
movq 0x108(%rsi,%r13), %rcx
subq %rax, %rcx
sarq $0x4, %rcx
movabsq $0x4ec4ec4ec4ec4ec5, %rdx # imm = 0x4EC4EC4EC4EC4EC5
imulq %rdx, %rcx
cmpq %rdi, %rcx
ja 0x4ec4
movq -0x48(%rbp), %rdx
incq %rdx
movq 0x8(%r15), %rax
subq %rsi, %rax
sarq $0x3, %rax
movabsq $-0x5075075075075075, %rcx # imm = 0xAF8AF8AF8AF8AF8B
imulq %rcx, %rax
cmpq %rdx, %rax
ja 0x4e89
jmp 0x4e2b