// File: /workspace/github_cpp_makefile_star2_O3/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 0x5b62
leaq -0x180(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x4211(%rip), %rsi      # 0x9399
leaq 0x4211(%rip), %rdx      # 0x93a0
leaq -0x190(%rbp), %r14
movq %r14, %rdi
callq 0x6f98
leaq -0x170(%rbp), %r15
leaq -0x160(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x41ea(%rip), %rsi      # 0x93a1
leaq 0x41ea(%rip), %rdx      # 0x93a8
movq %r15, %rdi
callq 0x6f98
leaq -0x150(%rbp), %r15
leaq -0x140(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x41ca(%rip), %rsi      # 0x93a9
leaq 0x41ca(%rip), %rdx      # 0x93b0
movq %r15, %rdi
callq 0x6f98
leaq -0x130(%rbp), %r15
leaq -0x120(%rbp), %r12
movq %r12, -0x10(%r12)
leaq 0x41a9(%rip), %rsi      # 0x93b1
leaq 0x41a9(%rip), %rdx      # 0x93b8
movq %r15, %rdi
callq 0x6f98
leaq -0x100(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x4190(%rip), %rsi      # 0x93b9
leaq 0x4190(%rip), %rdx      # 0x93c0
leaq -0x110(%rbp), %r14
movq %r14, %rdi
callq 0x6f98
leaq -0xf0(%rbp), %r15
leaq -0xe0(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x4169(%rip), %rsi      # 0x93c1
leaq 0x4169(%rip), %rdx      # 0x93c8
movq %r15, %rdi
callq 0x6f98
leaq -0xd0(%rbp), %r15
leaq -0xc0(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x4149(%rip), %rsi      # 0x93c9
leaq 0x4149(%rip), %rdx      # 0x93d0
movq %r15, %rdi
callq 0x6f98
leaq -0xb0(%rbp), %r15
leaq -0xa0(%rbp), %r13
movq %r13, -0x10(%r13)
leaq 0x4129(%rip), %rsi      # 0x93d1
leaq 0x4129(%rip), %rdx      # 0x93d8
movq %r15, %rdi
callq 0x6f98
movaps 0x3d92(%rip), %xmm0     # 0x9050
movaps %xmm0, -0x90(%rbp)
movaps 0x3d94(%rip), %xmm0     # 0x9060
movaps %xmm0, -0x80(%rbp)
movaps 0x3d99(%rip), %xmm0     # 0x9070
movaps %xmm0, -0x70(%rbp)
movaps 0x3d9e(%rip), %xmm0     # 0x9080
movaps %xmm0, -0x60(%rbp)
leaq 0x4203(%rip), %rsi      # 0x94f0
leaq -0x390(%rbp), %rbx
movl $0xff, %edx
movq %rbx, %rdi
callq 0x2160
leaq 0x42e8(%rip), %rsi      # 0x95f0
leaq -0x290(%rbp), %rdi
movl $0xff, %edx
callq 0x2160
leaq -0x50(%rbp), %rdi
movq %rbx, %rsi
callq 0x3a34
leaq -0x50(%rbp), %rbx
leaq -0x390(%rbp), %rsi
movq %rbx, %rdi
callq 0x3b76
leaq 0x409a(%rip), %rsi      # 0x93d9
leaq 0x3cea(%rip), %rcx      # 0x9030
leaq -0x190(%rbp), %rdx
leaq -0x90(%rbp), %r8
leaq -0x70(%rbp), %r9
movq %rbx, %rdi
pushq $0x2
pushq $0x4
callq 0x3e9c
addq $0x10, %rsp
leaq 0x4070(%rip), %rsi      # 0x93df
leaq 0x3cca(%rip), %rcx      # 0x9040
leaq -0x50(%rbp), %rdi
leaq -0x110(%rbp), %rdx
leaq -0x80(%rbp), %r8
leaq -0x60(%rbp), %r9
pushq $0x0
pushq $0x4
callq 0x3e9c
addq $0x10, %rsp
leaq -0x50(%rbp), %rdi
leaq -0x290(%rbp), %rsi
callq 0x3a34
leaq -0x290(%rbp), %rsi
movq %rbx, %rdi
callq 0x3b76
leaq 0x4029(%rip), %rsi      # 0x93e5
leaq 0x3c6d(%rip), %rcx      # 0x9030
leaq -0x190(%rbp), %rdx
leaq -0x90(%rbp), %r8
leaq -0x70(%rbp), %r9
movq %rbx, %rdi
pushq $0x2
pushq $0x4
callq 0x3e9c
addq $0x10, %rsp
leaq 0x3fff(%rip), %rsi      # 0x93eb
leaq 0x3c4d(%rip), %rcx      # 0x9040
leaq -0x50(%rbp), %rdi
leaq -0x110(%rbp), %rdx
leaq -0x80(%rbp), %r8
leaq -0x60(%rbp), %r9
pushq $0x0
pushq $0x4
callq 0x3e9c
addq $0x10, %rsp
leaq -0x50(%rbp), %rdi
leaq -0x390(%rbp), %rsi
callq 0x3c42
leaq -0x50(%rbp), %rdi
leaq -0x290(%rbp), %rsi
callq 0x3c42
leaq 0x3fab(%rip), %rsi      # 0x93e5
leaq -0x50(%rbp), %rdi
callq 0x4a44
leaq 0x3e0f(%rip), %rsi      # 0x9259
leaq -0x50(%rbp), %rdi
callq 0x4a44
movq $-0x80, %rbx
movq -0x10(%r13), %rdi
cmpq %rdi, %r13
je 0x546f
movq (%r13), %rsi
incq %rsi
callq 0x21e0
addq $-0x20, %r13
addq $0x20, %rbx
jne 0x545a
movq $-0x80, %rbx
movq -0x10(%r12), %rdi
cmpq %rdi, %r12
je 0x5496
movq (%r12), %rsi
incq %rsi
callq 0x21e0
addq $-0x20, %r12
addq $0x20, %rbx
jne 0x5480
leaq -0x50(%rbp), %rdi
callq 0x6c16
xorl %eax, %eax
addq $0x368, %rsp            # imm = 0x368
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x54c1
jmp 0x54c1
movq %rax, %rbx
addq $-0x10, %r15
movq -0x10(%r15), %rdi
cmpq %rdi, %r15
je 0x54dc
movq (%r15), %rsi
incq %rsi
callq 0x21e0
leaq -0x20(%r15), %rax
addq $-0x10, %r15
cmpq %r14, %r15
movq %rax, %r15
jne 0x54c8
jmp 0x553f
movq %rax, %rbx
jmp 0x553f
jmp 0x54f7
jmp 0x54f7
movq %rax, %rbx
addq $-0x10, %r15
movq -0x10(%r15), %rdi
cmpq %rdi, %r15
je 0x5512
movq (%r15), %rsi
incq %rsi
callq 0x21e0
leaq -0x20(%r15), %rax
addq $-0x10, %r15
cmpq %r14, %r15
movq %rax, %r15
jne 0x54fe
jmp 0x5568
movq %rax, %rbx
jmp 0x5568
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 0x555e
movq (%rax), %rsi
incq %rsi
callq 0x21e0
addq $-0x20, %r14
cmpq $-0x80, %r14
jne 0x5542
leaq -0x50(%rbp), %rdi
callq 0x6c16
movq %rbx, %rdi
callq 0x2320
nop