// File: /workspace/github_cpp_makefile_star2_O1/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 %r13
pushq %r12
pushq %rbx
subq $0x368, %rsp            # imm = 0x368
leaq -0x50(%rbp), %rdi
callq 0x5c24
leaq -0x180(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x416e(%rip), %rsi      # 0x9399
leaq 0x416e(%rip), %rdx      # 0x93a0
leaq -0x190(%rbp), %r15
movq %r15, %rdi
callq 0x7034
leaq -0x170(%rbp), %r14
leaq -0x160(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x4147(%rip), %rsi      # 0x93a1
leaq 0x4147(%rip), %rdx      # 0x93a8
movq %r14, %rdi
callq 0x7034
leaq -0x150(%rbp), %r14
leaq -0x140(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x4127(%rip), %rsi      # 0x93a9
leaq 0x4127(%rip), %rdx      # 0x93b0
movq %r14, %rdi
callq 0x7034
leaq -0x130(%rbp), %r14
leaq -0x120(%rbp), %r12
movq %r12, -0x10(%r12)
leaq 0x4106(%rip), %rsi      # 0x93b1
leaq 0x4106(%rip), %rdx      # 0x93b8
movq %r14, %rdi
callq 0x7034
leaq -0x100(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x40ed(%rip), %rsi      # 0x93b9
leaq 0x40ed(%rip), %rdx      # 0x93c0
leaq -0x110(%rbp), %r15
movq %r15, %rdi
callq 0x7034
leaq -0xf0(%rbp), %r14
leaq -0xe0(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x40c6(%rip), %rsi      # 0x93c1
leaq 0x40c6(%rip), %rdx      # 0x93c8
movq %r14, %rdi
callq 0x7034
leaq -0xd0(%rbp), %r14
leaq -0xc0(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x40a6(%rip), %rsi      # 0x93c9
leaq 0x40a6(%rip), %rdx      # 0x93d0
movq %r14, %rdi
callq 0x7034
leaq -0xb0(%rbp), %r14
leaq -0xa0(%rbp), %r13
movq %r13, -0x10(%r13)
leaq 0x4086(%rip), %rsi      # 0x93d1
leaq 0x4086(%rip), %rdx      # 0x93d8
movq %r14, %rdi
callq 0x7034
movaps 0x3cef(%rip), %xmm0     # 0x9050
movaps %xmm0, -0x90(%rbp)
movaps 0x3cf1(%rip), %xmm0     # 0x9060
movaps %xmm0, -0x80(%rbp)
movaps 0x3cf6(%rip), %xmm0     # 0x9070
movaps %xmm0, -0x70(%rbp)
movaps 0x3cfb(%rip), %xmm0     # 0x9080
movaps %xmm0, -0x60(%rbp)
leaq 0x4160(%rip), %rsi      # 0x94f0
leaq -0x390(%rbp), %rbx
movl $0xff, %edx
movq %rbx, %rdi
callq 0x2160
leaq 0x4245(%rip), %rsi      # 0x95f0
leaq -0x290(%rbp), %rdi
movl $0xff, %edx
callq 0x2160
leaq -0x50(%rbp), %rdi
movq %rbx, %rsi
callq 0x3ac0
leaq -0x50(%rbp), %rbx
leaq -0x390(%rbp), %rsi
movq %rbx, %rdi
callq 0x3bfe
leaq 0x3ff7(%rip), %rsi      # 0x93d9
leaq 0x3c47(%rip), %rcx      # 0x9030
leaq -0x190(%rbp), %rdx
leaq -0x90(%rbp), %r8
leaq -0x70(%rbp), %r9
movq %rbx, %rdi
pushq $0x2
pushq $0x4
callq 0x3f1c
addq $0x10, %rsp
leaq 0x3fcd(%rip), %rsi      # 0x93df
leaq 0x3c27(%rip), %rcx      # 0x9040
leaq -0x50(%rbp), %rdi
leaq -0x110(%rbp), %rdx
leaq -0x80(%rbp), %r8
leaq -0x60(%rbp), %r9
pushq $0x0
pushq $0x4
callq 0x3f1c
addq $0x10, %rsp
leaq -0x50(%rbp), %rdi
leaq -0x290(%rbp), %rsi
callq 0x3ac0
leaq -0x290(%rbp), %rsi
movq %rbx, %rdi
callq 0x3bfe
leaq 0x3f86(%rip), %rsi      # 0x93e5
leaq 0x3bca(%rip), %rcx      # 0x9030
leaq -0x190(%rbp), %rdx
leaq -0x90(%rbp), %r8
leaq -0x70(%rbp), %r9
movq %rbx, %rdi
pushq $0x2
pushq $0x4
callq 0x3f1c
addq $0x10, %rsp
leaq 0x3f5c(%rip), %rsi      # 0x93eb
leaq 0x3baa(%rip), %rcx      # 0x9040
leaq -0x50(%rbp), %rdi
leaq -0x110(%rbp), %rdx
leaq -0x80(%rbp), %r8
leaq -0x60(%rbp), %r9
pushq $0x0
pushq $0x4
callq 0x3f1c
addq $0x10, %rsp
leaq -0x50(%rbp), %rdi
leaq -0x390(%rbp), %rsi
callq 0x3cb8
leaq -0x50(%rbp), %rdi
leaq -0x290(%rbp), %rsi
callq 0x3cb8
leaq 0x3f08(%rip), %rsi      # 0x93e5
leaq -0x50(%rbp), %rdi
callq 0x4af8
leaq 0x3d6c(%rip), %rsi      # 0x9259
leaq -0x50(%rbp), %rdi
callq 0x4af8
movq $-0x80, %rbx
movq -0x10(%r13), %rdi
cmpq %rdi, %r13
je 0x5512
movq (%r13), %rsi
incq %rsi
callq 0x21e0
addq $-0x20, %r13
addq $0x20, %rbx
jne 0x54fd
movq $-0x80, %rbx
movq -0x10(%r12), %rdi
cmpq %rdi, %r12
je 0x5539
movq (%r12), %rsi
incq %rsi
callq 0x21e0
addq $-0x20, %r12
addq $0x20, %rbx
jne 0x5523
leaq -0x50(%rbp), %rdi
callq 0x6cc4
xorl %eax, %eax
addq $0x368, %rsp            # imm = 0x368
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x5564
jmp 0x5564
movq %rax, %rbx
jmp 0x556f
movq %rax, %rbx
movq %r15, %r14
cmpq %r14, %r15
je 0x5604
addq $-0x10, %r14
leaq -0x110(%rbp), %r15
movq -0x10(%r14), %rdi
cmpq %rdi, %r14
je 0x5597
movq (%r14), %rsi
incq %rsi
callq 0x21e0
leaq -0x20(%r14), %rax
addq $-0x10, %r14
cmpq %r15, %r14
movq %rax, %r14
jne 0x5583
jmp 0x5604
jmp 0x55ad
jmp 0x55ad
movq %rax, %rbx
jmp 0x55b8
movq %rax, %rbx
movq %r15, %r14
cmpq %r14, %r15
je 0x562d
addq $-0x10, %r14
leaq -0x190(%rbp), %r15
movq -0x10(%r14), %rdi
cmpq %rdi, %r14
je 0x55dc
movq (%r14), %rsi
incq %rsi
callq 0x21e0
leaq -0x20(%r14), %rax
addq $-0x10, %r14
cmpq %r15, %r14
movq %rax, %r14
jne 0x55c8
jmp 0x562d
movq %rax, %rbx
leaq -0x90(%rbp), %rdi
leaq -0x110(%rbp), %rsi
callq 0x23b0
xorl %r14d, %r14d
movq -0x130(%rbp,%r14), %rdi
leaq (%r12,%r14), %rax
cmpq %rdi, %rax
je 0x5623
movq (%rax), %rsi
incq %rsi
callq 0x21e0
addq $-0x20, %r14
cmpq $-0x80, %r14
jne 0x5607
leaq -0x50(%rbp), %rdi
callq 0x6cc4
movq %rbx, %rdi
callq 0x2320