// File: /workspace/github_cpp_makefile_star2_O1/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 0x84c2(%rip), %r14      # 0xcfd8
leaq 0x47e6(%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
leaq 0x4701(%rip), %rsi      # 0x9259
movq %r15, -0x48(%rbp)
movq %r15, %rdi
callq 0x2240
testl %eax, %eax
je 0x4ed0
leaq 0x47e0(%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), %r12
cmpq %r12, 0x8(%rbx)
movq -0x48(%rbp), %r14
je 0x51eb
xorl %edx, %edx
movq %rbx, -0x30(%rbp)
movq %rdx, -0x40(%rbp)
imulq $0x118, %rdx, %rax      # imm = 0x118
movq 0x100(%r12,%rax), %rbx
movq %rax, -0x38(%rbp)
movq 0x108(%r12,%rax), %r13
subq %rbx, %r13
je 0x4e9b
addq -0x38(%rbp), %r12
sarq $0x4, %r13
movabsq $0x4ec4ec4ec4ec4ec5, %rax # imm = 0x4EC4EC4EC4EC4EC5
imulq %rax, %r13
cmpq $0x1, %r13
adcq $0x0, %r13
xorl %r15d, %r15d
leaq (%rbx,%r15), %rsi
movq %r14, %rdi
callq 0x2240
testl %eax, %eax
je 0x4c28
addq $0xd0, %r15
decq %r13
jne 0x4c07
jmp 0x4e9b
leaq 0x469f(%rip), %rdi      # 0x92ce
movq %r12, %rsi
xorl %eax, %eax
callq 0x2050
movq -0x30(%rbp), %r14
movq (%r14), %rax
movq -0x38(%rbp), %r13
movq 0x100(%rax,%r13), %rsi
addq %r15, %rsi
leaq 0x46ca(%rip), %rdi      # 0x9320
xorl %eax, %eax
callq 0x2050
leaq 0x4873(%rip), %rdi      # 0x94d7
callq 0x22c0
movl $0xd, %edx
movq 0x8363(%rip), %rbx      # 0xcfd8
movq %rbx, %rdi
leaq 0x46b1(%rip), %rsi      # 0x9330
callq 0x2200
movq (%r14), %rax
movq 0x100(%rax,%r13), %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 0x468b(%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 (%r14), %rax
movq 0x100(%rax,%r13), %rax
cmpl $0x0, 0x68(%rax,%r15)
jle 0x4e3d
movl $0x8, %r13d
xorl %ebx, %ebx
movq 0x70(%rax,%r15), %rax
movq -0x8(%rax,%r13), %rsi
movq (%rax,%r13), %rdx
movq %r12, %rdi
callq 0x2200
movq %rax, %r12
movl $0x1, %edx
movq %rax, %rdi
leaq 0x436d(%rip), %rsi      # 0x90b8
callq 0x2200
movq (%r14), %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 0x4334(%rip), %rsi      # 0x90b8
callq 0x2200
movq -0x30(%rbp), %rax
movq (%rax), %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 0x42fb(%rip), %rsi      # 0x90b8
callq 0x2200
movq -0x30(%rbp), %rax
movq (%rax), %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 0x81d0(%rip), %r12      # 0xcfd8
callq 0x2040
movq %rax, %rdi
callq 0x2120
incq %rbx
movq -0x30(%rbp), %rax
movq (%rax), %rax
movq 0x100(%rax,%r14), %rax
movq -0x30(%rbp), %r14
movslq 0x68(%rax,%r15), %rcx
addq $0x20, %r13
cmpq %rcx, %rbx
jl 0x4d23
movl $0x14, %edx
movq %r12, %rdi
leaq 0x44f2(%rip), %rsi      # 0x933e
callq 0x2200
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 -0x48(%rbp), %r14
movq -0x40(%rbp), %rdx
incq %rdx
movq -0x30(%rbp), %rbx
movq (%rbx), %r12
movq 0x8(%rbx), %rax
subq %r12, %rax
sarq $0x3, %rax
movabsq $-0x5075075075075075, %rcx # imm = 0xAF8AF8AF8AF8AF8B
imulq %rcx, %rax
cmpq %rdx, %rax
ja 0x4bbe
jmp 0x51eb
leaq 0x4438(%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 0x51eb
movq 0x80b9(%rip), %r15      # 0xcfd8
xorl %edx, %edx
movq %rbx, -0x30(%rbp)
movq %rdx, -0x40(%rbp)
imulq $0x118, %rdx, %r13      # imm = 0x118
addq %r13, %rsi
leaq 0x4394(%rip), %rdi      # 0x92ce
xorl %eax, %eax
callq 0x2050
movq (%rbx), %rax
movq 0x100(%rax,%r13), %rsi
cmpq %rsi, 0x108(%rax,%r13)
je 0x51bf
xorl %edx, %edx
movq %rdx, -0x38(%rbp)
imulq $0xd0, %rdx, %r12
addq %r12, %rsi
leaq 0x43af(%rip), %rdi      # 0x9320
xorl %eax, %eax
callq 0x2050
leaq 0x4558(%rip), %rdi      # 0x94d7
callq 0x22c0
movl $0xd, %edx
movq %r15, %rdi
leaq 0x439d(%rip), %rsi      # 0x9330
callq 0x2200
movq (%rbx), %rax
movq 0x100(%rax,%r13), %rax
movl 0x64(%rax,%r12), %esi
movq %r15, %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 %r12, %r14
callq 0x2040
movq %rax, %rdi
callq 0x2120
movq (%rbx), %rax
movq 0x100(%rax,%r13), %rax
cmpl $0x0, 0x68(%rax,%r12)
movq %r13, %r12
movq %rbx, %r13
movq %r15, %rsi
jle 0x5126
movl $0x8, %r15d
xorl %ebx, %ebx
movq 0x70(%rax,%r14), %rax
movq -0x8(%rax,%r15), %rsi
movq (%rax,%r15), %rdx
movq 0x7fbe(%rip), %rdi      # 0xcfd8
callq 0x2200
movq %r14, %r13
movq %rax, %r14
movl $0x1, %edx
movq %rax, %rdi
leaq 0x4084(%rip), %rsi      # 0x90b8
callq 0x2200
movq -0x30(%rbp), %rax
movq (%rax), %rax
movq 0x100(%rax,%r12), %rax
movq 0x88(%rax,%r13), %rax
movl (%rax,%rbx,4), %esi
movq %r14, %rdi
callq 0x2310
movq %rax, %r14
movl $0x1, %edx
movq %rax, %rdi
leaq 0x404b(%rip), %rsi      # 0x90b8
callq 0x2200
movq -0x30(%rbp), %rax
movq (%rax), %rax
movq 0x100(%rax,%r12), %rax
movq 0xa0(%rax,%r13), %rax
movl (%rax,%rbx,4), %esi
movq %r14, %rdi
callq 0x2310
movq %rax, %r14
movl $0x1, %edx
movq %rax, %rdi
leaq 0x4012(%rip), %rsi      # 0x90b8
callq 0x2200
movq -0x30(%rbp), %rax
movq (%rax), %rax
movq 0x100(%rax,%r12), %rax
movq 0xb8(%rax,%r13), %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 -0x30(%rbp), %r13
callq 0x2040
movq %rax, %rdi
callq 0x2120
movq 0x7ed3(%rip), %rsi      # 0xcfd8
incq %rbx
movq (%r13), %rax
movq 0x100(%rax,%r12), %rax
movslq 0x68(%rax,%r14), %rcx
addq $0x20, %r15
cmpq %rcx, %rbx
jl 0x5005
movl $0x14, %edx
movq %rsi, %r15
movq %rsi, %rdi
leaq 0x4206(%rip), %rsi      # 0x933e
callq 0x2200
movq (%r13), %rax
movq 0x100(%rax,%r12), %rax
movl 0x6c(%rax,%r14), %esi
movq %r15, %rdi
callq 0x2310
movq %r13, %rbx
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), %rdx
incq %rdx
movq (%r13), %rax
movq 0x100(%rax,%r12), %rsi
movq 0x108(%rax,%r12), %rax
subq %rsi, %rax
sarq $0x4, %rax
movabsq $0x4ec4ec4ec4ec4ec5, %rcx # imm = 0x4EC4EC4EC4EC4EC5
imulq %rcx, %rax
cmpq %rdx, %rax
movq %r12, %r13
ja 0x4f5c
movq -0x40(%rbp), %rdx
incq %rdx
movq (%rbx), %rsi
movq 0x8(%rbx), %rax
subq %rsi, %rax
sarq $0x3, %rax
movabsq $-0x5075075075075075, %rcx # imm = 0xAF8AF8AF8AF8AF8B
imulq %rcx, %rax
cmpq %rdx, %rax
ja 0x4f25
xorl %eax, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq