// File: /workspace/github_cpp_makefile_star2_O3/wwdatabase[P]database/./smmana/sm.h
// Function: SM_Manager::create_table(char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*, int*, int*, int*, int, int)
RC SM_Manager::create_table(const char* tablename,string attrname[],int attrtype[],int len[],int isnull[],int attrnum,int prim_key)//create two files
{
	table_entry tb;
	strcpy(tb.tablename,tablename);
	tb.prikeyNum = prim_key;
	tb.attrNum = attrnum;
	int record_size = attrnum/8+1;
	for(int i = 0;i < attrnum;i++)
	{
		switch(attrtype[i])
		{
			case ATTRINT :
				record_size+=4;
				tb.attrName.push_back(attrname[i]);
				tb.attrType.push_back(ATTRINT);
				tb.attrLength.push_back(4);
				tb.isNull.push_back(isnull[i]);
				break;
			case ATTRFLOAT:
				record_size+=4;
				tb.attrName.push_back(attrname[i]);
				tb.attrType.push_back(ATTRFLOAT);
				tb.attrLength.push_back(4);
				tb.isNull.push_back(isnull[i]);
				break;
			case ATTRSTRING:
				record_size+=len[i];
				tb.attrName.push_back(attrname[i]);
				tb.attrType.push_back(ATTRSTRING);
				tb.attrLength.push_back(len[i]);
				tb.isNull.push_back(isnull[i]);
				break;
			default:
				printf("Blackman question mark?\n");
				break;
		}
	}
	tb.recordSize = record_size;
	databases[current_db_index].table.push_back(tb);
	string create_location(databases[current_db_index].dbname);
	create_location  = create_location+"/"+tb.tablename;
	record_manager->createFile(create_location.c_str(),record_size,tb.attrType,tb.attrLength,tb.isNull,tb.prikeyNum);
	create_location  = create_location + ".www";
	//freopen(create_location.c_str(),"w",stdout);
	ofstream file1(create_location.c_str());
	file1 << tb.tablename << endl << tb.attrNum << " " << tb.prikeyNum<<" " <<tb.recordSize<< endl;
	//printf("%s\n%d %d\n",tb.tablename,tb.attrNum,tb.prikeyNum);
	for(int i = 0;i < tb.attrNum;i++)
	{
		file1 << tb.attrName[i] <<" "<<tb.attrType[i] <<" "<<tb.attrLength[i]<<" "<<tb.isNull[i]<< endl;
		//printf("%s %d %d %d\n",tb.attrName[i].c_str(),tb.attrType[i],tb.attrLength[i],tb.isNull[i]);
	}
	file1.close();
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x378, %rsp            # imm = 0x378
movq %r9, -0x30(%rbp)
movq %r8, -0x60(%rbp)
movq %rcx, %rbx
movq %rdx, %r15
movq %rdi, -0x58(%rbp)
movl 0x10(%rbp), %r12d
xorps %xmm0, %xmm0
leaq -0x150(%rbp), %rdi
movups %xmm0, 0xc0(%rdi)
movups %xmm0, 0xb0(%rdi)
movups %xmm0, 0xa0(%rdi)
movups %xmm0, 0x90(%rdi)
movups %xmm0, 0x80(%rdi)
movups %xmm0, 0x70(%rdi)
callq 0x21a0
leal 0x7(%r12), %r14d
testl %r12d, %r12d
cmovnsl %r12d, %r14d
sarl $0x3, %r14d
incl %r14d
movl 0x18(%rbp), %eax
leaq -0xe0(%rbp), %rcx
movl %eax, -0x4(%rcx)
movl %r12d, -0x8(%rcx)
testl %r12d, %r12d
jle 0x41c1
movl %r12d, %r13d
shlq $0x2, %r13
xorl %r12d, %r12d
movl (%rbx,%r12), %eax
cmpl $0x3, %eax
je 0x3fcd
cmpl $0x2, %eax
je 0x3f91
cmpl $0x1, %eax
jne 0x4011
leaq -0xe0(%rbp), %rdi
movq %r15, %rsi
callq 0x5914
movl $0x1, -0x398(%rbp)
movq -0xc0(%rbp), %rsi
cmpq -0xb8(%rbp), %rsi
je 0x40ac
movl $0x1, (%rsi)
addq $0x4, %rsi
movq %rsi, -0xc0(%rbp)
jmp 0x40bf
leaq -0xe0(%rbp), %rdi
movq %r15, %rsi
callq 0x5914
movl $0x2, -0x398(%rbp)
movq -0xc0(%rbp), %rsi
cmpq -0xb8(%rbp), %rsi
je 0x4022
movl $0x2, (%rsi)
addq $0x4, %rsi
movq %rsi, -0xc0(%rbp)
jmp 0x4035
movq -0x60(%rbp), %rax
addl (%rax,%r12), %r14d
leaq -0xe0(%rbp), %rdi
movq %r15, %rsi
callq 0x5914
movl $0x3, -0x398(%rbp)
movq -0xc0(%rbp), %rsi
cmpq -0xb8(%rbp), %rsi
je 0x4069
movl $0x3, (%rsi)
addq $0x4, %rsi
movq %rsi, -0xc0(%rbp)
jmp 0x407c
leaq 0x54a7(%rip), %rdi      # 0x94bf
callq 0x22c0
jmp 0x41a0
leaq -0xc8(%rbp), %rdi
leaq -0x398(%rbp), %rdx
callq 0x7238
movl $0x4, -0x398(%rbp)
movq -0xa8(%rbp), %rsi
cmpq -0xa0(%rbp), %rsi
je 0x40f3
movl $0x4, (%rsi)
addq $0x4, %rsi
movq %rsi, -0xa8(%rbp)
jmp 0x4106
leaq -0xc8(%rbp), %rdi
leaq -0x398(%rbp), %rdx
callq 0x7238
movq -0x60(%rbp), %rax
leaq (%rax,%r12), %rdx
movq -0xa8(%rbp), %rsi
cmpq -0xa0(%rbp), %rsi
je 0x4130
movl (%rdx), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, -0xa8(%rbp)
jmp 0x413c
leaq -0xc8(%rbp), %rdi
leaq -0x398(%rbp), %rdx
callq 0x7238
movl $0x4, -0x398(%rbp)
movq -0xa8(%rbp), %rsi
cmpq -0xa0(%rbp), %rsi
je 0x4162
movl $0x4, (%rsi)
addq $0x4, %rsi
movq %rsi, -0xa8(%rbp)
jmp 0x4175
leaq -0xb0(%rbp), %rdi
leaq -0x398(%rbp), %rdx
callq 0x7238
addl $0x4, %r14d
movq -0x30(%rbp), %rax
leaq (%rax,%r12), %rdx
movq -0x90(%rbp), %rsi
cmpq -0x88(%rbp), %rsi
jne 0x4191
leaq -0x98(%rbp), %rdi
callq 0x7940
jmp 0x41a0
leaq -0xb0(%rbp), %rdi
callq 0x7940
movq -0x30(%rbp), %rax
leaq (%rax,%r12), %rdx
movq -0x90(%rbp), %rsi
cmpq -0x88(%rbp), %rsi
jne 0x4191
leaq -0x98(%rbp), %rdi
callq 0x7940
jmp 0x41a0
leaq -0xb0(%rbp), %rdi
leaq -0x398(%rbp), %rdx
callq 0x7238
addl $0x4, %r14d
movq -0x30(%rbp), %rax
leaq (%rax,%r12), %rdx
movq -0x90(%rbp), %rsi
cmpq -0x88(%rbp), %rsi
je 0x41b3
movl (%rdx), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, -0x90(%rbp)
addq $0x4, %r12
addq $0x20, %r15
cmpq %r12, %r13
jne 0x3f33
jmp 0x41c1
leaq -0x98(%rbp), %rdi
callq 0x7940
jmp 0x41a0
leaq -0x150(%rbp), %rsi
movl %r14d, 0x64(%rsi)
movq -0x58(%rbp), %rbx
movslq 0x18(%rbx), %rax
movq (%rbx), %rcx
imulq $0x118, %rax, %rax      # imm = 0x118
leaq (%rcx,%rax), %rdi
addq $0x100, %rdi            # imm = 0x100
callq 0x5a3a
movslq 0x18(%rbx), %rax
movq (%rbx), %rcx
imulq $0x118, %rax, %rbx      # imm = 0x118
addq %rcx, %rbx
leaq -0x40(%rbp), %r12
movq %r12, -0x10(%r12)
testq %rcx, %rcx
je 0x421d
movq %rbx, %rdi
callq 0x20c0
movq %rax, %rdx
addq %rbx, %rdx
jmp 0x4222
movl $0x1, %edx
leaq -0x50(%rbp), %rdi
movq %rbx, %rsi
callq 0x6f98
leaq -0x70(%rbp), %r15
movq %r15, -0x10(%r15)
movq -0x50(%rbp), %rsi
movq -0x48(%rbp), %rdx
addq %rsi, %rdx
leaq -0x80(%rbp), %rdi
callq 0x6efa
leaq 0x5090(%rip), %rsi      # 0x92e1
leaq -0x80(%rbp), %rdi
callq 0x2380
leaq -0x80(%rbp), %rdi
leaq -0x150(%rbp), %rsi
callq 0x2380
leaq -0x388(%rbp), %r13
movq %r13, -0x10(%r13)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x4297
movq %rdx, -0x398(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x388(%rbp)
jmp 0x429f
movups (%rcx), %xmm0
movups %xmm0, (%r13)
movq 0x8(%rax), %rdx
leaq -0x398(%rbp), %rbx
movq %rdx, 0x8(%rbx)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq -0x50(%rbp), %rdi
movq %rbx, %rsi
callq 0x2220
movq (%rbx), %rdi
cmpq %r13, %rdi
je 0x42e0
movq -0x388(%rbp), %rsi
incq %rsi
callq 0x21e0
movq -0x80(%rbp), %rdi
cmpq %r15, %rdi
je 0x42f5
movq -0x70(%rbp), %rsi
incq %rsi
callq 0x21e0
movq -0x58(%rbp), %rax
movq 0x20(%rax), %rbx
movq -0x50(%rbp), %r15
leaq -0xc8(%rbp), %rsi
leaq -0x198(%rbp), %rdi
callq 0x5a76
leaq -0xb0(%rbp), %rsi
leaq -0x180(%rbp), %rdi
callq 0x5a76
leaq -0x98(%rbp), %rsi
leaq -0x168(%rbp), %rdi
callq 0x5a76
movl -0xe4(%rbp), %eax
movl %eax, (%rsp)
leaq -0x198(%rbp), %rcx
leaq -0x180(%rbp), %r8
leaq -0x168(%rbp), %r9
movq %rbx, %rdi
movq %r15, %rsi
movl %r14d, %edx
callq 0x2efc
movq -0x168(%rbp), %rdi
testq %rdi, %rdi
je 0x4381
movq -0x158(%rbp), %rsi
subq %rdi, %rsi
callq 0x21e0
movq -0x180(%rbp), %rdi
testq %rdi, %rdi
je 0x439c
movq -0x170(%rbp), %rsi
subq %rdi, %rsi
callq 0x21e0
movq -0x198(%rbp), %rdi
testq %rdi, %rdi
je 0x43b7
movq -0x188(%rbp), %rsi
subq %rdi, %rsi
callq 0x21e0
leaq -0x398(%rbp), %rdi
movq %r13, (%rdi)
movq -0x50(%rbp), %rsi
movq -0x48(%rbp), %rdx
addq %rsi, %rdx
callq 0x6efa
leaq 0x4f0b(%rip), %rsi      # 0x92e3
leaq -0x398(%rbp), %rdi
callq 0x2380
leaq -0x50(%rbp), %rdi
leaq -0x398(%rbp), %rbx
movq %rbx, %rsi
callq 0x2220
movq (%rbx), %rdi
cmpq %r13, %rdi
je 0x440e
movq -0x388(%rbp), %rsi
incq %rsi
callq 0x21e0
movq -0x50(%rbp), %rsi
leaq -0x398(%rbp), %rdi
movl $0x10, %edx
callq 0x21f0
leaq -0x150(%rbp), %r14
movq %r14, %rdi
callq 0x20c0
movq %rbx, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x2200
movq -0x398(%rbp), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x21b0
movsbl %al, %esi
leaq -0x398(%rbp), %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2120
movl -0xe8(%rbp), %esi
movq %rax, %rdi
callq 0x2310
movq %rax, %rbx
leaq 0x4c31(%rip), %rsi      # 0x90b8
movl $0x1, %edx
movq %rax, %rdi
callq 0x2200
movl -0xe4(%rbp), %esi
movq %rbx, %rdi
callq 0x2310
movq %rax, %rbx
leaq 0x4c0c(%rip), %rsi      # 0x90b8
movl $0x1, %edx
movq %rax, %rdi
callq 0x2200
movl -0xec(%rbp), %esi
movq %rbx, %rdi
callq 0x2310
movq %rax, %rbx
movq (%rax), %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
cmpl $0x0, -0xe8(%rbp)
jle 0x45e0
movl $0x8, %r13d
xorl %r12d, %r12d
leaq -0x398(%rbp), %rbx
leaq 0x4ba3(%rip), %r14      # 0x90b8
movq -0xe0(%rbp), %rax
movq -0x8(%rax,%r13), %rsi
movq (%rax,%r13), %rdx
movq %rbx, %rdi
callq 0x2200
movq %rax, %r15
movl $0x1, %edx
movq %rax, %rdi
movq %r14, %rsi
callq 0x2200
movq -0xc8(%rbp), %rax
movl (%rax,%r12,4), %esi
movq %r15, %rdi
callq 0x2310
movq %rax, %r15
movl $0x1, %edx
movq %rax, %rdi
movq %r14, %rsi
callq 0x2200
movq -0xb0(%rbp), %rax
movl (%rax,%r12,4), %esi
movq %r15, %rdi
callq 0x2310
movq %rax, %r15
movl $0x1, %edx
movq %rax, %rdi
movq %r14, %rsi
callq 0x2200
movq -0x98(%rbp), %rax
movl (%rax,%r12,4), %esi
movq %r15, %rdi
callq 0x2310
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x21b0
movsbl %al, %esi
movq %r15, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2120
incq %r12
movslq -0xe8(%rbp), %rax
addq $0x20, %r13
cmpq %rax, %r12
jl 0x4515
leaq -0x398(%rbp), %rdi
callq 0x2250
movq 0x89dd(%rip), %rax      # 0xcfd0
movq (%rax), %rcx
movq 0x18(%rax), %rax
leaq -0x390(%rbp), %rdi
movq %rcx, -0x8(%rdi)
movq -0x18(%rcx), %rcx
movq %rax, -0x398(%rbp,%rcx)
callq 0x2170
leaq -0x2a0(%rbp), %rdi
callq 0x2080
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0x463b
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x21e0
movq -0x98(%rbp), %rdi
testq %rdi, %rdi
je 0x4656
movq -0x88(%rbp), %rsi
subq %rdi, %rsi
callq 0x21e0
movq -0xb0(%rbp), %rdi
testq %rdi, %rdi
je 0x4671
movq -0xa0(%rbp), %rsi
subq %rdi, %rsi
callq 0x21e0
movq -0xc8(%rbp), %rdi
testq %rdi, %rdi
je 0x468c
movq -0xb8(%rbp), %rsi
subq %rdi, %rsi
callq 0x21e0
leaq -0xe0(%rbp), %rdi
callq 0x5960
xorl %eax, %eax
addq $0x378, %rsp            # imm = 0x378
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x4748
movq %rax, %rbx
movq -0x398(%rbp), %rdi
cmpq %r13, %rdi
je 0x4775
movq -0x388(%rbp), %rsi
jmp 0x473e
jmp 0x4748
movq %rax, %rbx
movq -0x168(%rbp), %rdi
testq %rdi, %rdi
je 0x46f2
movq -0x158(%rbp), %rsi
subq %rdi, %rsi
callq 0x21e0
jmp 0x46f2
movq %rax, %rbx
movq -0x180(%rbp), %rdi
testq %rdi, %rdi
je 0x4712
movq -0x170(%rbp), %rsi
subq %rdi, %rsi
callq 0x21e0
jmp 0x4712
movq %rax, %rbx
movq -0x198(%rbp), %rdi
testq %rdi, %rdi
je 0x4775
movq -0x188(%rbp), %rsi
subq %rdi, %rsi
jmp 0x4741
jmp 0x4748
jmp 0x472e
movq %rax, %rbx
movq -0x80(%rbp), %rdi
cmpq %r15, %rdi
je 0x4775
movq -0x70(%rbp), %rsi
incq %rsi
callq 0x21e0
jmp 0x4775
movq %rax, %rbx
jmp 0x4775
jmp 0x475d
jmp 0x475d
jmp 0x475d
jmp 0x475d
jmp 0x475d
jmp 0x475d
jmp 0x475d
jmp 0x4762
movq %rax, %rbx
jmp 0x478a
movq %rax, %rbx
leaq -0x398(%rbp), %rdi
callq 0x2280
leaq -0x40(%rbp), %r12
movq -0x50(%rbp), %rdi
cmpq %r12, %rdi
je 0x478a
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x21e0
leaq -0x150(%rbp), %rdi
callq 0x5af6
movq %rbx, %rdi
callq 0x2320