// File: /workspace/github_cpp_makefile_star2_O1/splatlab[P]debgr/debruijn_graph.cc
// Function: dna::debruijn_graph::mark_edge_as_correct(dna::canonical_kmer, std::unordered_map<unsigned long, dna::debruijn_graph::unresolved_edge_set, std::hash<unsigned long>, std::equal_to<unsigned long>, std::allocator<std::pair<unsigned long const, dna::debruijn_graph::unresolved_edge_set>>>&, std::unordered_set<dna::canonical_kmer, std::hash<dna::canonical_kmer>, std::equal_to<dna::canonical_kmer>, std::allocator<dna::canonical_kmer>>&, bool)
void debruijn_graph::mark_edge_as_correct(edge e,
																						unresolved_edges_map &mbi,
																						unordered_set<edge> &work_queue,
																						bool can_use_hashing_rules) {
		uint64_t hash = occurences.get_hash(e);

		// If the edge is currently in mbi
		if (mbi.count(hash) > 0 && mbi[hash].count(e) > 0) {

			// Remove it, update the amount of unresolved count, and add its
			// nodes to the work-queue
			mbi[hash].erase(e);
			for (const auto & n : nodes(e))
				work_queue.insert(n);

			if (can_use_hashing_rules) {
				mbi[hash].unresolved_count -= abundance(e);

				// If any edge currently wants more count than is available,
				// then we know it wants too much
				for (const auto & o : mbi[hash]) {
					if (abundance(o) > mbi[hash].unresolved_count) {
						add_correction(o, mbi[hash].unresolved_count - abundance(o));
						for (const auto & n : nodes(o))
							work_queue.insert(n);
					}
				}
			
				// Figure out how much count the remaining edges currently want
				uint64_t current_total_edge_count = 0;
				for (const auto & o : mbi[hash])
					current_total_edge_count += abundance(o);

				// If the amount of total wanted count is the same as the amount
				// of available count, then we know all the remaining edges are
				// correct.
				if (mbi[hash].unresolved_count == current_total_edge_count) {
					for (const auto & o : mbi[hash])
						for (const auto & n : nodes(o))
							work_queue.insert(n);
					mbi.erase(hash);
				}
			}
		}
	}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movl %r9d, %ebx
movq %r8, %r14
movq %rcx, %r12
movl %esi, 0x30(%rsp)
movq %rdx, 0x38(%rsp)
movq %rdi, 0x18(%rsp)
movq 0x18(%rdi), %rcx
movl 0x8(%rcx), %eax
movq 0x48(%rcx), %r13
movq 0x40(%rcx), %rbp
leaq 0x50(%rsp), %r15
movl %esi, -0x8(%r15)
movq %rdx, (%r15)
movq %r15, %rdi
movl $0x8, %esi
movl %eax, %edx
callq 0xf8b0
movq %rax, %rdi
xorl %esi, %esi
movq %rbp, %rdx
movq %r13, %rcx
callq 0x2370
leaq 0x8(%rsp), %rsi
movq %rax, (%rsi)
movq %r12, %rdi
callq 0xe1c4
testq %rax, %rax
je 0x5319
leaq 0x8(%rsp), %rsi
movq %r12, %rdi
callq 0xe240
leaq 0x30(%rsp), %rsi
movq %rax, %rdi
callq 0xe500
testq %rax, %rax
je 0x5319
leaq 0x8(%rsp), %rsi
movq %r12, %rdi
callq 0xe240
leaq 0x30(%rsp), %r13
movq %rax, %rdi
movq %r13, %rsi
callq 0xe998
movl (%r13), %esi
movq 0x8(%r13), %rdx
leaq 0x48(%rsp), %r13
movq %r13, %rdi
callq 0x5341
movq 0x18(%r13), %r13
cmpq %r15, %r13
je 0x511b
leaq 0x10(%rsp), %rbp
leaq 0x20(%r13), %rsi
movq %r14, 0x10(%rsp)
movq %r14, %rdi
movq %rbp, %rdx
callq 0xd036
movq %r13, %rdi
callq 0x22a0
movq %rax, %r13
cmpq %r15, %rax
jne 0x50f7
leaq 0x48(%rsp), %rdi
callq 0xc78e
testb %bl, %bl
je 0x5319
movl 0x30(%rsp), %esi
movq 0x38(%rsp), %rdx
movq 0x18(%rsp), %rdi
callq 0x2ef0
movq %rax, %r13
leaq 0x8(%rsp), %rbp
movq %r12, %rdi
movq %rbp, %rsi
callq 0xe240
subq %r13, 0x38(%rax)
movq %r12, %rdi
movq %rbp, %rsi
callq 0xe240
movq 0x10(%rax), %rbx
testq %rbx, %rbx
movq %r12, 0x20(%rsp)
je 0x524a
leaq 0x10(%rsp), %rbp
movl 0x8(%rbx), %esi
movq 0x10(%rbx), %rdx
movq 0x18(%rsp), %rdi
callq 0x2ef0
movq %rax, %r13
movq %r12, %rdi
leaq 0x8(%rsp), %rsi
callq 0xe240
cmpq 0x38(%rax), %r13
jbe 0x523e
movl 0x8(%rbx), %eax
movl %eax, 0x2c(%rsp)
movq 0x10(%rbx), %rax
movq %rax, 0x40(%rsp)
movq %r12, %rdi
leaq 0x8(%rsp), %rsi
callq 0xe240
movq 0x38(%rax), %r12
movl 0x8(%rbx), %esi
movq 0x10(%rbx), %rdx
movq 0x18(%rsp), %r13
movq %r13, %rdi
callq 0x2ef0
subq %rax, %r12
movq %r13, %rdi
movl 0x2c(%rsp), %esi
movq 0x40(%rsp), %rdx
movq %r12, %rcx
callq 0x4fd2
movl 0x8(%rbx), %esi
movq 0x10(%rbx), %rdx
leaq 0x48(%rsp), %rdi
callq 0x5341
movq 0x60(%rsp), %r13
cmpq %r15, %r13
je 0x522f
leaq 0x20(%r13), %rsi
movq %r14, 0x10(%rsp)
movq %r14, %rdi
movq %rbp, %rdx
callq 0xd036
movq %r13, %rdi
callq 0x22a0
movq %rax, %r13
cmpq %r15, %rax
jne 0x520b
leaq 0x48(%rsp), %rdi
callq 0xc78e
movq 0x20(%rsp), %r12
movq (%rbx), %rbx
testq %rbx, %rbx
jne 0x5179
leaq 0x8(%rsp), %rsi
movq %r12, %rdi
callq 0xe240
movq 0x10(%rax), %r12
xorl %ebx, %ebx
testq %r12, %r12
je 0x5285
movq 0x18(%rsp), %r13
movl 0x8(%r12), %esi
movq 0x10(%r12), %rdx
movq %r13, %rdi
callq 0x2ef0
addq %rax, %rbx
movq (%r12), %r12
testq %r12, %r12
jne 0x5267
leaq 0x8(%rsp), %rsi
movq 0x20(%rsp), %r12
movq %r12, %rdi
callq 0xe240
cmpq %rbx, 0x38(%rax)
jne 0x5319
leaq 0x8(%rsp), %rsi
movq %r12, %rdi
callq 0xe240
movq 0x10(%rax), %rbx
testq %rbx, %rbx
je 0x530a
leaq 0x48(%rsp), %r12
leaq 0x10(%rsp), %r13
movl 0x8(%rbx), %esi
movq 0x10(%rbx), %rdx
movq %r12, %rdi
callq 0x5341
movq 0x60(%rsp), %rbp
cmpq %r15, %rbp
je 0x52fa
leaq 0x20(%rbp), %rsi
movq %r14, 0x10(%rsp)
movq %r14, %rdi
movq %r13, %rdx
callq 0xd036
movq %rbp, %rdi
callq 0x22a0
movq %rax, %rbp
cmpq %r15, %rax
jne 0x52d6
movq %r12, %rdi
callq 0xc78e
movq (%rbx), %rbx
testq %rbx, %rbx
jne 0x52bd
leaq 0x8(%rsp), %rsi
movq 0x20(%rsp), %rdi
callq 0xea84
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x532c
jmp 0x532c
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
callq 0xc78e
movq %rbx, %rdi
callq 0x23c0