// File: /workspace/github_cpp_makefile_star2_O1/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
cmpq $0x0, 0x7c62(%rip)      # 0xbc88
je 0x4089
leaq 0x7c31(%rip), %rdi      # 0xbc60
movq 0x7c42(%rip), %rsi      # 0xbc78
addq $0x20, %rsi
callq 0x5f42
movq (%rax), %rcx
cmpq 0x8(%rax), %rcx
jne 0x4089
leaq 0x7c11(%rip), %rbx      # 0xbc60
movq 0x7c22(%rip), %rsi      # 0xbc78
addq $0x20, %rsi
movq %rbx, %rdi
callq 0x7016
movq %rbx, %rdi
movq %rax, %rsi
callq 0x7092
movq 0x7c04(%rip), %rsi      # 0xbc78
addq $0x20, %rsi
movq %rbx, %rdi
callq 0x5f42
movq (%rax), %rcx
cmpq 0x8(%rax), %rcx
je 0x404f
cmpb $0x0, 0x7b0c(%rip)      # 0xbb9c
jne 0x409f
cmpb $0x1, 0x7b04(%rip)      # 0xbb9d
jne 0x4252
cmpq $0x0, 0x7be1(%rip)      # 0xbc88
je 0x4252
leaq 0x7b1c(%rip), %rbx      # 0xbbd0
leaq 0x7a91(%rip), %r14      # 0xbb4c
movq %rbx, %rdi
movq %r14, %rsi
callq 0x5f42
movq (%rax), %rsi
addq $0xc, %rsi
leaq 0x7b8c(%rip), %rdi      # 0xbc60
callq 0x5f42
movq 0x8(%rax), %r15
subq (%rax), %r15
movq %rbx, %rdi
movq %r14, %rsi
callq 0x5f42
movq (%rax), %rsi
addq $0xc, %rsi
cmpq $0x4, %r15
jne 0x419c
leaq 0x7b5d(%rip), %rbx      # 0xbc60
movq %rbx, %rdi
callq 0x7016
movq %rbx, %rdi
movq %rax, %rsi
callq 0x7092
cmpq $0x0, 0x7b6a(%rip)      # 0xbc88
je 0x4252
leaq 0x7b3d(%rip), %rdi      # 0xbc68
callq 0x2210
leaq 0x7b29(%rip), %rdi      # 0xbc60
leaq 0x20(%rax), %rsi
callq 0x5f42
movq (%rax), %rcx
cmpq 0x8(%rax), %rcx
jne 0x4252
leaq 0x7b14(%rip), %rbx      # 0xbc68
leaq 0x7b05(%rip), %r14      # 0xbc60
movq %rbx, %rdi
callq 0x2210
leaq 0x20(%rax), %rsi
movq %r14, %rdi
callq 0x7016
movq %r14, %rdi
movq %rax, %rsi
callq 0x7092
movq %rbx, %rdi
callq 0x2210
leaq 0x20(%rax), %rsi
movq %r14, %rdi
callq 0x5f42
movq (%rax), %rcx
cmpq 0x8(%rax), %rcx
je 0x415b
jmp 0x4252
leaq 0x7abd(%rip), %r14      # 0xbc60
movq %r14, %rdi
callq 0x5f42
movq %rax, %rbx
leaq 0x7a1b(%rip), %r12      # 0xbbd0
leaq 0x7990(%rip), %r13      # 0xbb4c
movq %r12, %rdi
movq %r13, %rsi
callq 0x5f42
movq (%rax), %rsi
addq $0xc, %rsi
movq %r14, %rdi
callq 0x5f42
movq (%rax), %r15
movq %r12, %rdi
movq %r13, %rsi
callq 0x5f42
movq (%rax), %rsi
addq $0xc, %rsi
movq %r14, %rdi
callq 0x5f42
movq 0x8(%rax), %rsi
movq %r15, %rdi
movq %r13, %rdx
callq 0x6f2e
movq %rax, %r15
movq %r12, %rdi
movq %r13, %rsi
callq 0x5f42
movq (%rax), %rsi
addq $0xc, %rsi
movq %r14, %rdi
callq 0x5f42
movq 0x8(%rax), %r14
cmpq %r14, %r15
je 0x4252
movq 0x8(%rbx), %rdx
subq %r14, %rdx
je 0x423c
movq %r15, %rdi
movq %r14, %rsi
callq 0x22e0
movq 0x8(%rbx), %rax
movq %rax, %rcx
subq %r14, %rcx
addq %rcx, %r15
cmpq %r15, %rax
je 0x4252
movq %r15, 0x8(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq