// File: yangwanyuan[P]HLKVDS/src/ReadCache.cc
// Function: dslab::ReadCache::Delete(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void ReadCache::Delete(string key){
	WriteLock w_lock(myLock);
	map<string, string>::iterator it_dedup = dedup_map.find(key);
	if(it_dedup!=dedup_map.end()){
		multimap<string, string>::iterator it_refer = refer_map.find( it_dedup->second);	
		for(int i = 0; i < refer_map.count( it_dedup->second); i++){
			if(it_refer->second == key) {
				refer_map.erase(it_refer);
				break;
			}
		}
		if(refer_map.count(it_dedup->second)==0) cache_map->Delete(it_dedup->second);
		dedup_map.erase(it_dedup);
	}
}

// Assembly:
subq $0xf8, %rsp
movq %rsi, 0x58(%rsp)
movq %rdi, 0xf0(%rsp)
movq %rsi, 0xe8(%rsp)
movq 0xf0(%rsp), %rsi
movq %rsi, 0x50(%rsp)
addq $0x70, %rsi
leaq 0xd8(%rsp), %rdi
callq 0x388b0
movq 0x50(%rsp), %rdi
movq 0x58(%rsp), %rsi
addq $0x8, %rdi
callq 0x388e0
movq %rax, 0x60(%rsp)
jmp 0x38364
movq 0x50(%rsp), %rdi
movq 0x60(%rsp), %rax
movq %rax, 0xd0(%rsp)
addq $0x8, %rdi
callq 0x38950
movq %rax, 0xb8(%rsp)
leaq 0xd0(%rsp), %rdi
leaq 0xb8(%rsp), %rsi
callq 0x38930
testb $0x1, %al
jne 0x383a5
jmp 0x385af
movq 0x50(%rsp), %rax
addq $0x38, %rax
movq %rax, 0x40(%rsp)
leaq 0xd0(%rsp), %rdi
callq 0x38980
movq 0x40(%rsp), %rdi
movq %rax, %rsi
addq $0x20, %rsi
callq 0x389a0
movq %rax, 0x48(%rsp)
jmp 0x383d8
movq 0x48(%rsp), %rax
movq %rax, 0xb0(%rsp)
movl $0x0, 0xac(%rsp)
movq 0x50(%rsp), %rax
movslq 0xac(%rsp), %rcx
movq %rcx, 0x28(%rsp)
addq $0x38, %rax
movq %rax, 0x30(%rsp)
leaq 0xd0(%rsp), %rdi
callq 0x38980
movq 0x30(%rsp), %rdi
movq %rax, %rsi
addq $0x20, %rsi
callq 0x389d0
movq %rax, 0x38(%rsp)
jmp 0x38430
movq 0x28(%rsp), %rax
movq 0x38(%rsp), %rcx
cmpq %rcx, %rax
jae 0x384d4
leaq 0xb0(%rsp), %rdi
callq 0x38980
movq 0x58(%rsp), %rsi
movq %rax, %rdi
addq $0x20, %rdi
callq 0x21100
testb $0x1, %al
jne 0x38467
jmp 0x384bc
movq 0x50(%rsp), %rdi
addq $0x38, %rdi
movq 0xb0(%rsp), %rax
movq %rax, 0xa0(%rsp)
movq 0xa0(%rsp), %rsi
callq 0x38a00
movq %rax, 0x20(%rsp)
jmp 0x38494
movq 0x20(%rsp), %rax
movq %rax, 0x98(%rsp)
jmp 0x384d4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xc8(%rsp)
movl %eax, 0xc4(%rsp)
jmp 0x385c4
jmp 0x384be
movl 0xac(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xac(%rsp)
jmp 0x383f0
movq 0x50(%rsp), %rax
addq $0x38, %rax
movq %rax, 0x10(%rsp)
leaq 0xd0(%rsp), %rdi
callq 0x38980
movq 0x10(%rsp), %rdi
movq %rax, %rsi
addq $0x20, %rsi
callq 0x389d0
movq %rax, 0x18(%rsp)
jmp 0x38507
movq 0x18(%rsp), %rax
cmpq $0x0, %rax
jne 0x38580
movq 0x50(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x8(%rsp)
leaq 0xd0(%rsp), %rdi
callq 0x38980
movq %rax, %rsi
addq $0x20, %rsi
leaq 0x78(%rsp), %rdi
callq 0x81a0
jmp 0x3853f
movq 0x8(%rsp), %rdi
movq (%rdi), %rax
movq 0x20(%rax), %rax
leaq 0x78(%rsp), %rsi
callq *%rax
jmp 0x38554
leaq 0x78(%rsp), %rdi
callq 0x8928
jmp 0x38580
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xc8(%rsp)
movl %eax, 0xc4(%rsp)
leaq 0x78(%rsp), %rdi
callq 0x8928
jmp 0x385c4
movq 0x50(%rsp), %rdi
addq $0x8, %rdi
movq 0xd0(%rsp), %rax
movq %rax, 0x70(%rsp)
movq 0x70(%rsp), %rsi
callq 0x38bd0
movq %rax, (%rsp)
jmp 0x385a6
movq (%rsp), %rax
movq %rax, 0x68(%rsp)
leaq 0xd8(%rsp), %rdi
callq 0x38c10
addq $0xf8, %rsp
retq
leaq 0xd8(%rsp), %rdi
callq 0x38c10
movq 0xc8(%rsp), %rdi
callq 0x8820
nop