// File: /workspace/github_cpp_makefile_star2_O2/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, %r14
movq %rdi, %rbx
movq 0x71f2(%rip), %rdi      # 0xafd8
leaq 0x3516(%rip), %rsi      # 0x7303
callq 0x21b0
movq %rax, %rdi
callq 0x20d0
cmpb $0x2a, (%r14)
jne 0x3e0b
cmpb $0x0, 0x1(%r14)
je 0x4041
movq %r14, -0x40(%rbp)
movq 0x71c2(%rip), %rdi      # 0xafd8
leaq 0x3536(%rip), %rsi      # 0x7353
callq 0x21b0
movq %rax, %rdi
callq 0x20d0
xorl %edi, %edi
movq (%rbx), %rcx
movq 0x8(%rbx), %rax
subq %rcx, %rax
cqto
movl $0x118, %esi            # imm = 0x118
idivq %rsi
cmpq %rdi, %rax
jbe 0x425f
movq %rdi, -0x38(%rbp)
imulq $0x118, %rdi, %r15      # imm = 0x118
leaq (%rcx,%r15), %rax
movq %rax, -0x30(%rbp)
movq 0x100(%rcx,%r15), %r13
movq 0x108(%rcx,%r15), %rax
subq %r13, %rax
cqto
movl $0xd0, %ecx
idivq %rcx
movq %rax, %r12
incq %r12
xorl %r14d, %r14d
decq %r12
je 0x4035
leaq (%r14,%r13), %rsi
addq $0xd0, %r14
movq -0x40(%rbp), %rdi
callq 0x2260
testl %eax, %eax
jne 0x3e82
leaq 0x3424(%rip), %rdi      # 0x72ce
movq -0x30(%rbp), %rsi
xorl %eax, %eax
callq 0x2040
movq (%rbx), %rax
movq 0x100(%rax,%r15), %rax
leaq (%rax,%r14), %rsi
addq $-0xd0, %rsi
leaq 0x344e(%rip), %rdi      # 0x7320
xorl %eax, %eax
callq 0x2040
leaq 0x35f7(%rip), %rdi      # 0x74d7
callq 0x22e0
movq 0x70ec(%rip), %r12      # 0xafd8
movq %r12, %rdi
leaq 0x343a(%rip), %rsi      # 0x7330
callq 0x21b0
movq (%rbx), %rcx
movq 0x100(%rcx,%r15), %rcx
movl -0x6c(%rcx,%r14), %esi
movq %rax, %rdi
callq 0x2320
movq %rax, %rdi
callq 0x20d0
movq %r12, %rdi
leaq 0x343e(%rip), %rsi      # 0x7363
callq 0x21b0
movq %rax, %rdi
callq 0x20d0
xorl %edx, %edx
xorl %r13d, %r13d
movq (%rbx), %rax
movq 0x100(%rax,%r15), %rax
movslq -0x68(%rax,%r14), %rcx
cmpq %rcx, %r13
jge 0x4002
movq -0x60(%rax,%r14), %rsi
addq %rdx, %rsi
movq 0x7079(%rip), %rdi      # 0xafd8
movq %rdx, -0x30(%rbp)
callq 0x2190
movq %rax, %rdi
movq %r15, %r12
leaq 0x3143(%rip), %r15      # 0x70b8
movq %r15, %rsi
callq 0x21b0
movq (%rbx), %rcx
movq 0x100(%rcx,%r12), %rcx
movq -0x48(%rcx,%r14), %rcx
movl (%rcx,%r13,4), %esi
movq %rax, %rdi
callq 0x2320
movq %rax, %rdi
movq %r15, %rsi
callq 0x21b0
movq (%rbx), %rcx
movq 0x100(%rcx,%r12), %rcx
movq -0x30(%rcx,%r14), %rcx
movl (%rcx,%r13,4), %esi
movq %rax, %rdi
callq 0x2320
movq %rax, %rdi
movq %r15, %rsi
movq %r12, %r15
callq 0x21b0
movq (%rbx), %rcx
movq 0x100(%rcx,%r12), %rcx
movq -0x18(%rcx,%r14), %rcx
movl (%rcx,%r13,4), %esi
movq %rax, %rdi
callq 0x2320
movq %rax, %rdi
callq 0x20d0
movq -0x30(%rbp), %rdx
incq %r13
addq $0x20, %rdx
jmp 0x3f37
movq 0x6fcf(%rip), %rdi      # 0xafd8
leaq 0x332e(%rip), %rsi      # 0x733e
callq 0x21b0
movq (%rbx), %rcx
movq 0x100(%rcx,%r15), %rcx
movl -0x64(%rcx,%r14), %esi
movq %rax, %rdi
callq 0x2320
movq %rax, %rdi
callq 0x20d0
movq -0x38(%rbp), %rdi
incq %rdi
jmp 0x3e2c
movq 0x6f90(%rip), %rdi      # 0xafd8
leaq 0x32c0(%rip), %rsi      # 0x730f
callq 0x21b0
movq %rax, %rdi
callq 0x20d0
movq (%rbx), %rsi
xorl %edi, %edi
movq 0x8(%rbx), %rax
subq %rsi, %rax
cqto
movl $0x118, %ecx            # imm = 0x118
idivq %rcx
cmpq %rdi, %rax
jbe 0x425f
movq %rdi, -0x48(%rbp)
imulq $0x118, %rdi, %rcx      # imm = 0x118
movq %rcx, -0x30(%rbp)
addq %rcx, %rsi
leaq 0x323a(%rip), %rdi      # 0x72ce
xorl %eax, %eax
callq 0x2040
xorl %r8d, %r8d
movq (%rbx), %rsi
movq -0x30(%rbp), %rax
movq 0x100(%rsi,%rax), %rcx
movq 0x108(%rsi,%rax), %rax
subq %rcx, %rax
cqto
movl $0xd0, %edi
idivq %rdi
cmpq %r8, %rax
jbe 0x4253
movq %r8, -0x38(%rbp)
imulq $0xd0, %r8, %r13
addq %r13, %rcx
leaq 0x3240(%rip), %rdi      # 0x7320
movq %rcx, %rsi
xorl %eax, %eax
callq 0x2040
leaq 0x33e6(%rip), %rdi      # 0x74d7
callq 0x22e0
movq 0x6edb(%rip), %rdi      # 0xafd8
leaq 0x322c(%rip), %rsi      # 0x7330
callq 0x21b0
movq (%rbx), %rcx
movq -0x30(%rbp), %rdx
movq 0x100(%rcx,%rdx), %rcx
movl 0x64(%rcx,%r13), %esi
movq %rax, %rdi
callq 0x2320
movq %rax, %rdi
callq 0x20d0
xorl %edx, %edx
xorl %r12d, %r12d
movq (%rbx), %rax
movq -0x30(%rbp), %rcx
movq 0x100(%rax,%rcx), %rax
movslq 0x68(%rax,%r13), %rcx
cmpq %rcx, %r12
jge 0x4210
addq %r13, %rax
movq 0x70(%rax), %rsi
addq %rdx, %rsi
movq 0x6e78(%rip), %rdi      # 0xafd8
movq %rdx, -0x40(%rbp)
callq 0x2190
movq %rax, %rdi
movq %rbx, %r15
leaq 0x2f42(%rip), %rbx      # 0x70b8
movq %rbx, %rsi
callq 0x21b0
movq (%r15), %rcx
movq -0x30(%rbp), %r14
movq 0x100(%rcx,%r14), %rcx
movq 0x88(%rcx,%r13), %rcx
movl (%rcx,%r12,4), %esi
movq %rax, %rdi
callq 0x2320
movq %rax, %rdi
movq %rbx, %rsi
callq 0x21b0
movq (%r15), %rcx
movq 0x100(%rcx,%r14), %rcx
movq 0xa0(%rcx,%r13), %rcx
movl (%rcx,%r12,4), %esi
movq %rax, %rdi
callq 0x2320
movq %rax, %rdi
movq %rbx, %rsi
movq %r15, %rbx
callq 0x21b0
movq (%r15), %rcx
movq 0x100(%rcx,%r14), %rcx
movq 0xb8(%rcx,%r13), %rcx
movl (%rcx,%r12,4), %esi
movq %rax, %rdi
callq 0x2320
movq %rax, %rdi
callq 0x20d0
movq -0x40(%rbp), %rdx
incq %r12
addq $0x20, %rdx
jmp 0x4132
movq 0x6dc1(%rip), %rdi      # 0xafd8
leaq 0x3120(%rip), %rsi      # 0x733e
callq 0x21b0
movq (%rbx), %rcx
movq -0x30(%rbp), %rdx
movq 0x100(%rcx,%rdx), %rcx
movl 0x6c(%rcx,%r13), %esi
movq %rax, %rdi
callq 0x2320
movq %rax, %rdi
callq 0x20d0
movq -0x38(%rbp), %r8
incq %r8
jmp 0x409e
movq -0x48(%rbp), %rdi
incq %rdi
jmp 0x4061
xorl %eax, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq