// File: /workspace/github_cpp_makefile_star2_O3/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, 0x7c22(%rip)      # 0xbc88
je 0x40c9
leaq 0x7bf1(%rip), %rdi      # 0xbc60
movq 0x7c02(%rip), %rsi      # 0xbc78
addq $0x20, %rsi
callq 0x5f62
movq (%rax), %rcx
cmpq 0x8(%rax), %rcx
jne 0x40c9
leaq 0x7bd1(%rip), %rbx      # 0xbc60
movq 0x7be2(%rip), %rsi      # 0xbc78
addq $0x20, %rsi
movq %rbx, %rdi
callq 0x6ffc
movq %rbx, %rdi
movq %rax, %rsi
callq 0x707e
movq 0x7bc4(%rip), %rsi      # 0xbc78
addq $0x20, %rsi
movq %rbx, %rdi
callq 0x5f62
movq (%rax), %rcx
cmpq 0x8(%rax), %rcx
je 0x408f
cmpb $0x0, 0x7acc(%rip)      # 0xbb9c
jne 0x40df
cmpb $0x1, 0x7ac4(%rip)      # 0xbb9d
jne 0x429a
cmpq $0x0, 0x7ba1(%rip)      # 0xbc88
je 0x429a
leaq 0x7adc(%rip), %rbx      # 0xbbd0
leaq 0x7a51(%rip), %r14      # 0xbb4c
movq %rbx, %rdi
movq %r14, %rsi
callq 0x5f62
movq (%rax), %rsi
addq $0xc, %rsi
leaq 0x7b4c(%rip), %rdi      # 0xbc60
callq 0x5f62
movq 0x8(%rax), %r15
subq (%rax), %r15
movq %rbx, %rdi
movq %r14, %rsi
callq 0x5f62
movq (%rax), %rsi
addq $0xc, %rsi
cmpq $0x4, %r15
jne 0x41dc
leaq 0x7b1d(%rip), %rbx      # 0xbc60
movq %rbx, %rdi
callq 0x6ffc
movq %rbx, %rdi
movq %rax, %rsi
callq 0x707e
cmpq $0x0, 0x7b2a(%rip)      # 0xbc88
je 0x429a
leaq 0x7afd(%rip), %rdi      # 0xbc68
callq 0x2210
leaq 0x7ae9(%rip), %rdi      # 0xbc60
leaq 0x20(%rax), %rsi
callq 0x5f62
movq (%rax), %rcx
cmpq 0x8(%rax), %rcx
jne 0x429a
leaq 0x7ad4(%rip), %rbx      # 0xbc68
leaq 0x7ac5(%rip), %r14      # 0xbc60
movq %rbx, %rdi
callq 0x2210
leaq 0x20(%rax), %rsi
movq %r14, %rdi
callq 0x6ffc
movq %r14, %rdi
movq %rax, %rsi
callq 0x707e
movq %rbx, %rdi
callq 0x2210
leaq 0x20(%rax), %rsi
movq %r14, %rdi
callq 0x5f62
movq (%rax), %rcx
cmpq 0x8(%rax), %rcx
je 0x419b
jmp 0x429a
leaq 0x7a7d(%rip), %r14      # 0xbc60
movq %r14, %rdi
callq 0x5f62
movq %rax, %rbx
leaq 0x79db(%rip), %r12      # 0xbbd0
leaq 0x7950(%rip), %r13      # 0xbb4c
movq %r12, %rdi
movq %r13, %rsi
callq 0x5f62
movq (%rax), %rsi
addq $0xc, %rsi
movq %r14, %rdi
callq 0x5f62
movq (%rax), %r15
movq %r12, %rdi
movq %r13, %rsi
callq 0x5f62
movq (%rax), %rsi
addq $0xc, %rsi
movq %r14, %rdi
callq 0x5f62
movq 0x8(%rax), %rsi
movq %r15, %rdi
movq %r13, %rdx
callq 0x6f08
movq %rax, %r15
movq %r12, %rdi
movq %r13, %rsi
callq 0x5f62
movq (%rax), %rsi
addq $0xc, %rsi
movq %r14, %rdi
callq 0x5f62
movq 0x8(%rax), %r14
cmpq %r14, %r15
je 0x429a
movq 0x8(%rbx), %rdx
subq %r14, %rdx
je 0x4285
movq %r15, %rdi
movq %r14, %rsi
callq 0x22e0
movq 0x8(%rbx), %rax
movq %rax, %rcx
jmp 0x428b
movq %r14, %rax
movq %r14, %rcx
subq %r14, %rax
addq %rax, %r15
cmpq %r15, %rcx
je 0x429a
movq %r15, 0x8(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq