// File: 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
movq %rsp, %rbp
subq $0x2b0, %rsp            # imm = 0x2B0
movb %r9b, %al
movl %esi, -0x10(%rbp)
movq %rdx, -0x8(%rbp)
movq %rdi, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
andb $0x1, %al
movb %al, -0x29(%rbp)
movq -0x18(%rbp), %rdi
movq %rdi, -0x268(%rbp)
addq $0x8, %rdi
movq -0x10(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x40(%rbp)
movl -0x48(%rbp), %esi
movq -0x40(%rbp), %rdx
callq 0x10250
movq %rax, -0x38(%rbp)
movq -0x20(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x102a0
cmpq $0x0, %rax
jbe 0x91ae
movq -0x20(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x102d0
movq %rax, %rdi
leaq -0x10(%rbp), %rsi
callq 0x10300
cmpq $0x0, %rax
jbe 0x91ae
movq -0x20(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x102d0
movq %rax, %rdi
leaq -0x10(%rbp), %rsi
callq 0x10650
movq -0x10(%rbp), %rax
movq %rax, -0x90(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x88(%rbp)
movl -0x90(%rbp), %esi
movq -0x88(%rbp), %rdx
leaq -0x80(%rbp), %rdi
callq 0x91d0
leaq -0x80(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rdi
callq 0xe180
movq %rax, -0x98(%rbp)
movq -0x50(%rbp), %rdi
callq 0xe1b0
movq %rax, -0xa0(%rbp)
leaq -0x98(%rbp), %rdi
leaq -0xa0(%rbp), %rsi
callq 0xe1e0
testb $0x1, %al
jne 0x8bee
leaq -0x80(%rbp), %rdi
callq 0xe0f0
jmp 0x8c68
leaq -0x98(%rbp), %rdi
callq 0xe210
movq %rax, -0xa8(%rbp)
movq -0x28(%rbp), %rdi
movq -0xa8(%rbp), %rsi
callq 0x10680
movb %dl, -0x271(%rbp)
movq %rax, -0x270(%rbp)
jmp 0x8c20
movb -0x271(%rbp), %al
movq -0x270(%rbp), %rcx
movq %rcx, -0xc8(%rbp)
movb %al, -0xc0(%rbp)
leaq -0x98(%rbp), %rdi
callq 0xe230
jmp 0x8bcc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb0(%rbp)
movl %eax, -0xb4(%rbp)
leaq -0x80(%rbp), %rdi
callq 0xe0f0
jmp 0x91b7
testb $0x1, -0x29(%rbp)
je 0x91ac
movq -0x268(%rbp), %rdi
movq -0x10(%rbp), %rax
movq %rax, -0xd8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0xd0(%rbp)
movl -0xd8(%rbp), %esi
movq -0xd0(%rbp), %rdx
callq 0x4450
movq %rax, -0x280(%rbp)
movq -0x20(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x102d0
movq -0x280(%rbp), %rdx
movq 0x38(%rax), %rcx
subq %rdx, %rcx
movq %rcx, 0x38(%rax)
movq -0x20(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x102d0
movq %rax, -0xe0(%rbp)
movq -0xe0(%rbp), %rdi
callq 0x106c0
movq %rax, -0xe8(%rbp)
movq -0xe0(%rbp), %rdi
callq 0x106f0
movq %rax, -0xf0(%rbp)
leaq -0xe8(%rbp), %rdi
leaq -0xf0(%rbp), %rsi
callq 0x10720
testb $0x1, %al
jne 0x8d1d
jmp 0x8f39
leaq -0xe8(%rbp), %rdi
callq 0x10750
movq -0x268(%rbp), %rdi
movq %rax, -0xf8(%rbp)
movq -0xf8(%rbp), %rax
movq (%rax), %rcx
movq %rcx, -0x108(%rbp)
movq 0x8(%rax), %rax
movq %rax, -0x100(%rbp)
movl -0x108(%rbp), %esi
movq -0x100(%rbp), %rdx
callq 0x4450
movq %rax, -0x288(%rbp)
movq -0x20(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x102d0
movq %rax, %rcx
movq -0x288(%rbp), %rax
cmpq 0x38(%rcx), %rax
jbe 0x8f26
movq -0xf8(%rbp), %rax
movq (%rax), %rcx
movq %rcx, -0x118(%rbp)
movq 0x8(%rax), %rax
movq %rax, -0x110(%rbp)
movq -0x20(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x102d0
movq -0x268(%rbp), %rdi
movq 0x38(%rax), %rax
movq %rax, -0x290(%rbp)
movq -0xf8(%rbp), %rax
movq (%rax), %rcx
movq %rcx, -0x128(%rbp)
movq 0x8(%rax), %rax
movq %rax, -0x120(%rbp)
movl -0x128(%rbp), %esi
movq -0x120(%rbp), %rdx
callq 0x4450
movq -0x290(%rbp), %rcx
movq -0x268(%rbp), %rdi
subq %rax, %rcx
movl -0x118(%rbp), %esi
movq -0x110(%rbp), %rdx
callq 0x8a50
movq -0xf8(%rbp), %rax
movq (%rax), %rcx
movq %rcx, -0x170(%rbp)
movq 0x8(%rax), %rax
movq %rax, -0x168(%rbp)
movl -0x170(%rbp), %esi
movq -0x168(%rbp), %rdx
leaq -0x160(%rbp), %rdi
callq 0x91d0
leaq -0x160(%rbp), %rax
movq %rax, -0x130(%rbp)
movq -0x130(%rbp), %rdi
callq 0xe180
movq %rax, -0x178(%rbp)
movq -0x130(%rbp), %rdi
callq 0xe1b0
movq %rax, -0x180(%rbp)
leaq -0x178(%rbp), %rdi
leaq -0x180(%rbp), %rsi
callq 0xe1e0
testb $0x1, %al
jne 0x8ea7
leaq -0x160(%rbp), %rdi
callq 0xe0f0
jmp 0x8f24
leaq -0x178(%rbp), %rdi
callq 0xe210
movq %rax, -0x188(%rbp)
movq -0x28(%rbp), %rdi
movq -0x188(%rbp), %rsi
callq 0x10680
movb %dl, -0x299(%rbp)
movq %rax, -0x298(%rbp)
jmp 0x8ed9
movb -0x299(%rbp), %al
movq -0x298(%rbp), %rcx
movq %rcx, -0x198(%rbp)
movb %al, -0x190(%rbp)
leaq -0x178(%rbp), %rdi
callq 0xe230
jmp 0x8e82
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb0(%rbp)
movl %eax, -0xb4(%rbp)
leaq -0x160(%rbp), %rdi
callq 0xe0f0
jmp 0x91b7
jmp 0x8f26
jmp 0x8f28
leaq -0xe8(%rbp), %rdi
callq 0x10780
jmp 0x8d01
movq $0x0, -0x1a0(%rbp)
movq -0x20(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x102d0
movq %rax, -0x1a8(%rbp)
movq -0x1a8(%rbp), %rdi
callq 0x106c0
movq %rax, -0x1b0(%rbp)
movq -0x1a8(%rbp), %rdi
callq 0x106f0
movq %rax, -0x1b8(%rbp)
leaq -0x1b0(%rbp), %rdi
leaq -0x1b8(%rbp), %rsi
callq 0x10720
testb $0x1, %al
jne 0x8f97
jmp 0x8ffb
leaq -0x1b0(%rbp), %rdi
callq 0x10750
movq -0x268(%rbp), %rdi
movq %rax, -0x1c0(%rbp)
movq -0x1c0(%rbp), %rax
movq (%rax), %rcx
movq %rcx, -0x1d0(%rbp)
movq 0x8(%rax), %rax
movq %rax, -0x1c8(%rbp)
movl -0x1d0(%rbp), %esi
movq -0x1c8(%rbp), %rdx
callq 0x4450
addq -0x1a0(%rbp), %rax
movq %rax, -0x1a0(%rbp)
leaq -0x1b0(%rbp), %rdi
callq 0x10780
jmp 0x8f7e
movq -0x20(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x102d0
movq 0x38(%rax), %rax
cmpq -0x1a0(%rbp), %rax
jne 0x91aa
movq -0x20(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x102d0
movq %rax, -0x1d8(%rbp)
movq -0x1d8(%rbp), %rdi
callq 0x106c0
movq %rax, -0x1e0(%rbp)
movq -0x1d8(%rbp), %rdi
callq 0x106f0
movq %rax, -0x1e8(%rbp)
leaq -0x1e0(%rbp), %rdi
leaq -0x1e8(%rbp), %rsi
callq 0x10720
testb $0x1, %al
jne 0x906f
jmp 0x919d
leaq -0x1e0(%rbp), %rdi
callq 0x10750
movq %rax, -0x1f0(%rbp)
movq -0x1f0(%rbp), %rax
movq (%rax), %rcx
movq %rcx, -0x238(%rbp)
movq 0x8(%rax), %rax
movq %rax, -0x230(%rbp)
movl -0x238(%rbp), %esi
movq -0x230(%rbp), %rdx
leaq -0x228(%rbp), %rdi
callq 0x91d0
leaq -0x228(%rbp), %rax
movq %rax, -0x1f8(%rbp)
movq -0x1f8(%rbp), %rdi
callq 0xe180
movq %rax, -0x240(%rbp)
movq -0x1f8(%rbp), %rdi
callq 0xe1b0
movq %rax, -0x248(%rbp)
leaq -0x240(%rbp), %rdi
leaq -0x248(%rbp), %rsi
callq 0xe1e0
testb $0x1, %al
jne 0x9110
leaq -0x228(%rbp), %rdi
callq 0xe0f0
jmp 0x918a
leaq -0x240(%rbp), %rdi
callq 0xe210
movq %rax, -0x250(%rbp)
movq -0x28(%rbp), %rdi
movq -0x250(%rbp), %rsi
callq 0x10680
movb %dl, -0x2a9(%rbp)
movq %rax, -0x2a8(%rbp)
jmp 0x9142
movb -0x2a9(%rbp), %al
movq -0x2a8(%rbp), %rcx
movq %rcx, -0x260(%rbp)
movb %al, -0x258(%rbp)
leaq -0x240(%rbp), %rdi
callq 0xe230
jmp 0x90eb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb0(%rbp)
movl %eax, -0xb4(%rbp)
leaq -0x228(%rbp), %rdi
callq 0xe0f0
jmp 0x91b7
jmp 0x918c
leaq -0x1e0(%rbp), %rdi
callq 0x10780
jmp 0x9053
movq -0x20(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x107b0
jmp 0x91ac
jmp 0x91ae
addq $0x2b0, %rsp            # imm = 0x2B0
popq %rbp
retq
movq -0xb0(%rbp), %rdi
callq 0x3480
nopw %cs:(%rax,%rax)