// File: /workspace/github_cpp_makefile_star2_O2/wwdatabase[P]database/testsm.cpp
// Function: main
int main()
{
	SM_Manager sm ;
	string attrname1[4] = {"attr1_1","attr1_2","attr1_3","attr1_4"};
	string attrname2[4] = {"attr2_1","attr2_2","attr2_3","attr2_4"};
	int attrtype1[4] = {ATTRINT,ATTRFLOAT,ATTRSTRING,ATTRSTRING};
	int attrtype2[4] = {ATTRINT,ATTRFLOAT,ATTRSTRING,ATTRINT};
	int len1[4] = {4,4,7,3};
	int len2[4]= {4,4,3,4};
	int attrnum1 = 4;
	int attrnum2=  4;
	int prikey1 = 2;
	int prikey2 = 0;
	int isnull_1[4] = {1,1,0,0};
	int isnull_2[4] = {0,0,1,1};
	char dbname1[255] = "testdb1";
	char dbname2[255] = "testdb2";
	sm.create_db(dbname1);
	sm.use_db(dbname1);
	sm.create_table("tb1_1",attrname1,attrtype1,len1,isnull_1,attrnum1,prikey1);
	sm.create_table("tb1_2",attrname2,attrtype2,len2,isnull_2,attrnum2,prikey2);
	sm.create_db(dbname2);
	sm.use_db(dbname2);
	sm.create_table("tb2_1",attrname1,attrtype1,len1,isnull_1,attrnum1,prikey1);
	sm.create_table("tb2_2",attrname2,attrtype2,len2,isnull_2,attrnum2,prikey2);
	sm.show_db(dbname1);
	sm.show_db(dbname2);
	sm.show_table("tb2_1");
	sm.show_table("*");// wierd bug: record size is zero for the first database*/
	//sm.drop_db(dbname1);
	//sm.drop_table("tb2_2");
return 0;


}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x368, %rsp            # imm = 0x368
leaq -0x40(%rbp), %rdi
callq 0x4bf0
leaq 0x3109(%rip), %rsi      # 0x7399
leaq -0x180(%rbp), %r14
leaq -0x380(%rbp), %rdx
movq %r14, %rdi
callq 0x46c6
leaq -0x160(%rbp), %r15
leaq 0x30ed(%rip), %rsi      # 0x73a1
leaq -0x280(%rbp), %rdx
movq %r15, %rdi
callq 0x46c6
leaq -0x140(%rbp), %r15
leaq 0x30d8(%rip), %rsi      # 0x73a9
leaq -0x100(%rbp), %rdx
movq %r15, %rdi
callq 0x46c6
leaq -0x120(%rbp), %r15
leaq 0x30c3(%rip), %rsi      # 0x73b1
leaq -0x50(%rbp), %rdx
movq %r15, %rdi
callq 0x46c6
leaq 0x30b8(%rip), %rsi      # 0x73b9
leaq -0x100(%rbp), %r14
leaq -0x380(%rbp), %rdx
movq %r14, %rdi
callq 0x46c6
leaq -0xe0(%rbp), %r15
leaq 0x309c(%rip), %rsi      # 0x73c1
leaq -0x280(%rbp), %rdx
movq %r15, %rdi
callq 0x46c6
leaq -0xc0(%rbp), %r15
leaq 0x3087(%rip), %rsi      # 0x73c9
leaq -0x50(%rbp), %rdx
movq %r15, %rdi
callq 0x46c6
leaq -0xa0(%rbp), %r15
leaq 0x3075(%rip), %rsi      # 0x73d1
leaq -0x60(%rbp), %rdx
movq %r15, %rdi
callq 0x46c6
movaps 0x2ce1(%rip), %xmm0     # 0x7050
movaps %xmm0, -0x50(%rbp)
movaps 0x2ce6(%rip), %xmm0     # 0x7060
movaps %xmm0, -0x60(%rbp)
movaps 0x2ceb(%rip), %xmm0     # 0x7070
movaps %xmm0, -0x80(%rbp)
movaps 0x2cf0(%rip), %xmm0     # 0x7080
movaps %xmm0, -0x70(%rbp)
leaq 0x3155(%rip), %rsi      # 0x74f0
leaq -0x380(%rbp), %rbx
movl $0xff, %edx
movq %rbx, %rdi
callq 0x2150
leaq 0x323a(%rip), %rsi      # 0x75f0
leaq -0x280(%rbp), %rdi
movl $0xff, %edx
callq 0x2150
leaq -0x40(%rbp), %rdi
movq %rbx, %rsi
callq 0x33de
leaq -0x40(%rbp), %rbx
leaq -0x380(%rbp), %rsi
movq %rbx, %rdi
callq 0x34e0
leaq 0x2fec(%rip), %rsi      # 0x73d9
leaq 0x2c3c(%rip), %rcx      # 0x7030
leaq -0x180(%rbp), %rdx
leaq -0x50(%rbp), %r8
leaq -0x80(%rbp), %r9
movq %rbx, %rdi
pushq $0x2
pushq $0x4
callq 0x36ec
popq %rcx
popq %rdx
leaq 0x2fc7(%rip), %rsi      # 0x73df
leaq 0x2c21(%rip), %rcx      # 0x7040
leaq -0x40(%rbp), %rdi
leaq -0x100(%rbp), %rdx
leaq -0x60(%rbp), %r8
leaq -0x70(%rbp), %r9
pushq $0x0
pushq $0x4
callq 0x36ec
popq %rcx
popq %rdx
leaq -0x40(%rbp), %rdi
leaq -0x280(%rbp), %rsi
callq 0x33de
leaq -0x280(%rbp), %rsi
movq %rbx, %rdi
callq 0x34e0
leaq 0x2f82(%rip), %rsi      # 0x73e5
leaq 0x2bc6(%rip), %rcx      # 0x7030
leaq -0x180(%rbp), %rdx
leaq -0x50(%rbp), %r8
leaq -0x80(%rbp), %r9
movq %rbx, %rdi
pushq $0x2
pushq $0x4
callq 0x36ec
popq %rcx
popq %rdx
leaq 0x2f5d(%rip), %rsi      # 0x73eb
leaq 0x2bab(%rip), %rcx      # 0x7040
leaq -0x40(%rbp), %rdi
leaq -0x100(%rbp), %rdx
leaq -0x60(%rbp), %r8
leaq -0x70(%rbp), %r9
pushq $0x0
pushq $0x4
callq 0x36ec
popq %rcx
popq %rdx
leaq -0x40(%rbp), %rdi
leaq -0x380(%rbp), %rsi
callq 0x357c
leaq -0x40(%rbp), %rdi
leaq -0x280(%rbp), %rsi
callq 0x357c
leaq 0x2f0b(%rip), %rsi      # 0x73e5
leaq -0x40(%rbp), %rdi
callq 0x3dc8
leaq 0x2d6f(%rip), %rsi      # 0x7259
leaq -0x40(%rbp), %rdi
callq 0x3dc8
pushq $0x60
popq %rbx
leaq (%rbx,%rbp), %rdi
addq $-0x100, %rdi
callq 0x20b0
addq $-0x20, %rbx
cmpq $-0x20, %rbx
jne 0x44f6
pushq $0x60
popq %rbx
leaq (%rbx,%rbp), %rdi
addq $-0x180, %rdi           # imm = 0xFE80
callq 0x20b0
addq $-0x20, %rbx
cmpq $-0x20, %rbx
jne 0x4513
leaq -0x40(%rbp), %rdi
callq 0x59d2
xorl %eax, %eax
addq $0x368, %rsp            # imm = 0x368
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
jmp 0x454a
jmp 0x454a
movq %rax, %rbx
addq $-0x20, %r15
movq %r15, %rdi
callq 0x20b0
cmpq %r14, %r15
jne 0x454d
jmp 0x45a5
movq %rax, %rbx
jmp 0x45a5
jmp 0x4569
jmp 0x4569
movq %rax, %rbx
addq $-0x20, %r15
movq %r15, %rdi
callq 0x20b0
cmpq %r14, %r15
jne 0x456c
jmp 0x45c3
movq %rax, %rbx
jmp 0x45c3
movq %rax, %rbx
pushq $0x60
popq %r14
leaq (%r14,%rbp), %rdi
addq $-0x100, %rdi
callq 0x20b0
addq $-0x20, %r14
cmpq $-0x20, %r14
jne 0x458b
pushq $0x60
popq %r14
leaq (%r14,%rbp), %rdi
addq $-0x180, %rdi           # imm = 0xFE80
callq 0x20b0
addq $-0x20, %r14
cmpq $-0x20, %r14
jne 0x45a9
leaq -0x40(%rbp), %rdi
callq 0x59d2
movq %rbx, %rdi
callq 0x2330