// File: /workspace/github_cpp_makefile_star2_O1/wwdatabase[P]database/./smmana/sm.h
// Function: SM_Manager::drop_table(char const*)
RC SM_Manager::drop_table(const char* tablename)//////////////need more
{
	for(int i = 0;i < databases[current_db_index].table.size();i++)
	{
		if(strcmp(tablename,databases[current_db_index].table[i].tablename) == 0)
		{// delete this table,
			string de_file(databases[i].dbname);
			de_file = de_file + "/"+tablename;
			record_manager->destroyFile(de_file.c_str());
			databases[current_db_index].table.erase(databases[current_db_index].table.begin()+i);
			de_file = de_file+".www";
			record_manager->destroyFile(de_file.c_str());
			return 0;
				//delete corresponding table info
		}

	}
	printf("Table %s does not exists!\n",tablename);
	return 0;

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %rsi, -0x30(%rbp)
movslq 0x18(%rdi), %rax
movq %rdi, -0x98(%rbp)
movq (%rdi), %r12
imulq $0x118, %rax, %rax      # imm = 0x118
movq 0x100(%r12,%rax), %r15
movq 0x108(%r12,%rax), %rax
subq %r15, %rax
setne %r13b
je 0x4a77
sarq $0x4, %rax
movabsq $0x4ec4ec4ec4ec4ec5, %rbx # imm = 0x4EC4EC4EC4EC4EC5
imulq %rax, %rbx
cmpq $0x1, %rbx
movq %rbx, %r14
adcq $0x0, %r14
movq -0x30(%rbp), %rdi
movq %r15, %rsi
callq 0x2240
testl %eax, %eax
je 0x48ca
addq $0xd0, %r15
decq %r14
xorl %r13d, %r13d
cmpq %r13, %r14
je 0x4a77
movq -0x30(%rbp), %rdi
movq %r15, %rsi
callq 0x2240
addq $0xd0, %r15
incq %r13
testl %eax, %eax
jne 0x489f
cmpq %r13, %rbx
seta %bl
jmp 0x48d0
movl %r13d, %ebx
xorl %r13d, %r13d
imulq $0x118, %r13, %r15      # imm = 0x118
addq %r12, %r15
leaq -0x40(%rbp), %rax
movq %rax, -0x10(%rax)
testq %r12, %r12
je 0x48f7
movq %r15, %rdi
callq 0x20c0
movq %rax, %rdx
addq %r15, %rdx
jmp 0x48fc
movl $0x1, %edx
leaq -0x50(%rbp), %r12
movq %r12, %rdi
movq %r15, %rsi
callq 0x7034
leaq -0x80(%rbp), %r14
movq %r14, -0x10(%r14)
movq (%r12), %rsi
movq 0x8(%r12), %rdx
addq %rsi, %rdx
leaq -0x90(%rbp), %rdi
callq 0x6f9a
leaq 0x49af(%rip), %rsi      # 0x92e1
leaq -0x90(%rbp), %rdi
callq 0x2380
leaq -0x90(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0x2380
leaq -0x60(%rbp), %r12
movq %r12, -0x10(%r12)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x4973
movq %rdx, -0x70(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x60(%rbp)
jmp 0x497b
movups (%rcx), %xmm0
movups %xmm0, (%r12)
movq 0x8(%rax), %rdx
leaq -0x70(%rbp), %r15
movq %rdx, 0x8(%r15)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq -0x50(%rbp), %rdi
movq %r15, %rsi
callq 0x2220
movq (%r15), %rdi
cmpq %r12, %rdi
je 0x49b6
movq -0x60(%rbp), %rsi
incq %rsi
callq 0x21e0
movq -0x90(%rbp), %rdi
cmpq %r14, %rdi
je 0x49ce
movq -0x80(%rbp), %rsi
incq %rsi
callq 0x21e0
movq -0x50(%rbp), %rsi
callq 0x39e8
movq -0x98(%rbp), %rcx
movslq 0x18(%rcx), %rax
movq (%rcx), %rcx
imulq $0x118, %rax, %rax      # imm = 0x118
leaq (%rcx,%rax), %rdi
addq $0x100, %rdi            # imm = 0x100
imulq $0xd0, %r13, %rsi
addq (%rdi), %rsi
callq 0x8006
leaq -0x70(%rbp), %rdi
movq %r12, (%rdi)
movq -0x50(%rbp), %rsi
movq -0x48(%rbp), %rdx
addq %rsi, %rdx
callq 0x6f9a
leaq 0x48bf(%rip), %rsi      # 0x92e3
leaq -0x70(%rbp), %rdi
callq 0x2380
leaq -0x50(%rbp), %rdi
leaq -0x70(%rbp), %r14
movq %r14, %rsi
callq 0x2220
movq (%r14), %rdi
cmpq %r12, %rdi
je 0x4a51
movq -0x60(%rbp), %rsi
incq %rsi
callq 0x21e0
movq -0x50(%rbp), %rsi
callq 0x39e8
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0x4a73
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x21e0
testb %bl, %bl
jne 0x4a89
leaq 0x486a(%rip), %rdi      # 0x92e8
movq -0x30(%rbp), %rsi
xorl %eax, %eax
callq 0x2050
xorl %eax, %eax
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq -0x70(%rbp), %rdi
cmpq %r12, %rdi
je 0x4ad7
movq -0x60(%rbp), %rsi
jmp 0x4ac8
jmp 0x4ad4
jmp 0x4ad4
jmp 0x4ab2
movq %r14, %rcx
movq %rax, %r14
movq -0x90(%rbp), %rdi
cmpq %rcx, %rdi
je 0x4ad7
movq -0x80(%rbp), %rsi
incq %rsi
callq 0x21e0
jmp 0x4ad7
jmp 0x4ad4
movq %rax, %r14
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0x4af0
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x21e0
movq %r14, %rdi
callq 0x2320