// File: monikakushwaha28[P]Fiduccia_Matthesys-using-c-/Fiduccia_Mattheyses_v1.0.cpp
// Function: delete_base_and_empty_keys()
void delete_base_and_empty_keys()
{
	//Deleting empty keys:
	if (!gain_bucket.empty())
	{
		while (gain_bucket[gain_bucket.begin()->first].empty())
		{
			gain_bucket.erase(gain_bucket.begin()->first);
		}
	}

	//removing fixed elements from gain bucket
	if (found_baseC1 || found_baseCn1)
	{
		if (!gain_bucket.empty())
		{
			if (gain_bucket[node_map[base_cell][3]].size() == 1)
			{
				gain_bucket.erase(node_map[base_cell][3]);
				if (!gain_bucket.empty())
				{

					while (gain_bucket[gain_bucket.rbegin()->first].empty())
					{
						gain_bucket.erase(gain_bucket.rbegin()->first);
					}
				}
			}
			else
			{
				gain_bucket[node_map[base_cell][3]].erase(remove(gain_bucket[node_map[base_cell][3]].begin(), gain_bucket[node_map[base_cell][3]].end(), base_cell), gain_bucket[node_map[base_cell][3]].end());
			}
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
leaq 0x12569(%rip), %rdi     # 0x16c68
callq 0x7210
testb $0x1, %al
jne 0x476c
jmp 0x470a
leaq 0x12557(%rip), %rdi     # 0x16c68
callq 0x6da0
movq %rax, -0x8(%rbp)
leaq -0x8(%rbp), %rdi
callq 0x6e30
movq %rax, %rsi
leaq 0x1253b(%rip), %rdi     # 0x16c68
callq 0x6cc0
movq %rax, %rdi
callq 0x73d0
testb $0x1, %al
jne 0x4740
jmp 0x476a
leaq 0x12521(%rip), %rdi     # 0x16c68
callq 0x6da0
movq %rax, -0x10(%rbp)
leaq -0x10(%rbp), %rdi
callq 0x6e30
movq %rax, %rsi
leaq 0x12505(%rip), %rdi     # 0x16c68
callq 0x7410
jmp 0x470a
jmp 0x476c
testb $0x1, 0x12431(%rip)     # 0x16ba4
jne 0x4782
testb $0x1, 0x12429(%rip)     # 0x16ba5
je 0x49ae
leaq 0x124df(%rip), %rdi     # 0x16c68
callq 0x7210
testb $0x1, %al
jne 0x49ac
leaq 0x1243b(%rip), %rdi     # 0x16bd8
leaq 0x123b0(%rip), %rsi     # 0x16b54
callq 0x6cc0
movq %rax, %rdi
movl $0x3, %esi
callq 0x6ca0
movq %rax, %rsi
leaq 0x124a8(%rip), %rdi     # 0x16c68
callq 0x6cc0
movq %rax, %rdi
callq 0x6c80
cmpq $0x1, %rax
jne 0x487f
leaq 0x123fa(%rip), %rdi     # 0x16bd8
leaq 0x1236f(%rip), %rsi     # 0x16b54
callq 0x6cc0
movq %rax, %rdi
movl $0x3, %esi
callq 0x6ca0
movq %rax, %rsi
leaq 0x12467(%rip), %rdi     # 0x16c68
callq 0x7410
leaq 0x1245b(%rip), %rdi     # 0x16c68
callq 0x7210
testb $0x1, %al
jne 0x487a
jmp 0x4818
leaq -0x18(%rbp), %rdi
leaq 0x12445(%rip), %rsi     # 0x16c68
callq 0x7440
leaq -0x18(%rbp), %rdi
callq 0x7470
movq %rax, %rsi
leaq 0x1242d(%rip), %rdi     # 0x16c68
callq 0x6cc0
movq %rax, %rdi
callq 0x73d0
testb $0x1, %al
jne 0x484e
jmp 0x4878
leaq -0x20(%rbp), %rdi
leaq 0x1240f(%rip), %rsi     # 0x16c68
callq 0x7440
leaq -0x20(%rbp), %rdi
callq 0x7470
movq %rax, %rsi
leaq 0x123f7(%rip), %rdi     # 0x16c68
callq 0x7410
jmp 0x4818
jmp 0x487a
jmp 0x49aa
leaq 0x12352(%rip), %rdi     # 0x16bd8
leaq 0x122c7(%rip), %rsi     # 0x16b54
callq 0x6cc0
movq %rax, %rdi
movl $0x3, %esi
callq 0x6ca0
movq %rax, %rsi
leaq 0x123bf(%rip), %rdi     # 0x16c68
callq 0x6cc0
movq %rax, -0x60(%rbp)
leaq 0x1231f(%rip), %rdi     # 0x16bd8
leaq 0x12294(%rip), %rsi     # 0x16b54
callq 0x6cc0
movq %rax, %rdi
movl $0x3, %esi
callq 0x6ca0
movq %rax, %rsi
leaq 0x1238c(%rip), %rdi     # 0x16c68
callq 0x6cc0
movq %rax, %rdi
callq 0x7330
movq %rax, -0x38(%rbp)
leaq 0x122e4(%rip), %rdi     # 0x16bd8
leaq 0x12259(%rip), %rsi     # 0x16b54
callq 0x6cc0
movq %rax, %rdi
movl $0x3, %esi
callq 0x6ca0
movq %rax, %rsi
leaq 0x12351(%rip), %rdi     # 0x16c68
callq 0x6cc0
movq %rax, %rdi
callq 0x7360
movq %rax, -0x40(%rbp)
movq -0x38(%rbp), %rdi
movq -0x40(%rbp), %rsi
leaq 0x1221d(%rip), %rdx     # 0x16b54
callq 0x72e0
movq %rax, -0x30(%rbp)
leaq -0x28(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x7390
leaq 0x12284(%rip), %rdi     # 0x16bd8
leaq 0x121f9(%rip), %rsi     # 0x16b54
callq 0x6cc0
movq %rax, %rdi
movl $0x3, %esi
callq 0x6ca0
movq %rax, %rsi
leaq 0x122f1(%rip), %rdi     # 0x16c68
callq 0x6cc0
movq %rax, %rdi
callq 0x7360
movq %rax, -0x50(%rbp)
leaq -0x48(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0x7390
movq -0x60(%rbp), %rdi
movq -0x28(%rbp), %rsi
movq -0x48(%rbp), %rdx
callq 0x7250
movq %rax, -0x58(%rbp)
jmp 0x49ac
jmp 0x49ae
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)