// File: splatlab[P]debgr/debruijn_graph.cc
// Function: dna::debruijn_graph::do_work(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::do_work(node n,
															 unresolved_edges_map &mbi,
															 unordered_set<node> &work_queue,
															 bool can_use_hashing_rules) {
		// If there's no invariant discrepancy, and we know that all the
		// edges on one side are correct, then we can conclude that all
		// the edges on the other side are also correct.
		if (!invariant_discrepancy(n)) {
			if (left_side_is_definitely_correct(n, mbi))
				for (const auto & re : right_edges(n))
					mark_edge_as_correct(re, mbi, work_queue, can_use_hashing_rules);
			else if (right_side_is_definitely_correct(n, mbi))
				for (const auto & le : left_edges(n))
					mark_edge_as_correct(le, mbi, work_queue, can_use_hashing_rules);

			// If we know that there are no "through paths" on the left
			// side, and we know there are no paths ending on the right
			// side, then there must not be _any_ paths on the right side.
		} else if (left_invariant_value(n) == 0 && get_right_ends(n) == 0) {
			for (const auto & re : right_edges(n)) {
				add_correction(re, -abundance(re));
				mark_edge_as_correct(re, mbi, work_queue, can_use_hashing_rules);
			}
			// And vice versa
		} else if (right_invariant_value(n) == 0 && get_left_ends(n) == 0) {
			for (const auto & le : left_edges(n)) {
				add_correction(le, -abundance(le));
				mark_edge_as_correct(le, mbi, work_queue, can_use_hashing_rules);
			}

			// If we know all but one edge is correct, then solve for the
			// abundance of the remaining edge, fix it, and mark it correct.
		} else {
			edge wrong_edge = find_single_error_edge(n, mbi);
			if (wrong_edge != edge()) {
				int64_t correction = invariant_implied_abundance_correction(n,
																																		wrong_edge);
				if (correction != 0) {
					if (is_loop(wrong_edge)) {
						assert(((-correction) % 2) == 0);
						correction /= 2;
					}
					add_correction(wrong_edge, correction);
					mark_edge_as_correct(wrong_edge, mbi, work_queue, can_use_hashing_rules);
				}
			}
		}
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x370, %rsp            # imm = 0x370
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, -0x360(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x38(%rbp)
movl -0x40(%rbp), %esi
movq -0x38(%rbp), %rdx
callq 0x8100
cmpq $0x0, %rax
jne 0x95a8
movq -0x360(%rbp), %rdi
movq -0x10(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x20(%rbp), %rcx
movl -0x50(%rbp), %esi
movq -0x48(%rbp), %rdx
callq 0x85e0
testb $0x1, %al
jne 0x9337
jmp 0x944b
movq -0x360(%rbp), %rsi
movq -0x10(%rbp), %rax
movq %rax, -0x98(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x90(%rbp)
movl -0x98(%rbp), %edx
movq -0x90(%rbp), %rcx
leaq -0x88(%rbp), %rdi
callq 0x5890
leaq -0x88(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rdi
callq 0xe180
movq %rax, -0xa0(%rbp)
movq -0x58(%rbp), %rdi
callq 0xe1b0
movq %rax, -0xa8(%rbp)
leaq -0xa0(%rbp), %rdi
leaq -0xa8(%rbp), %rsi
callq 0xe1e0
testb $0x1, %al
jne 0x93c0
leaq -0x88(%rbp), %rdi
callq 0xe0f0
jmp 0x9446
leaq -0xa0(%rbp), %rdi
callq 0xe210
movq -0x360(%rbp), %rdi
movq %rax, -0xb0(%rbp)
movq -0xb0(%rbp), %rax
movups (%rax), %xmm0
movaps %xmm0, -0xc0(%rbp)
movq -0x20(%rbp), %rcx
movq -0x28(%rbp), %r8
movl -0xc0(%rbp), %esi
movq -0xb8(%rbp), %rdx
movzbl -0x29(%rbp), %r9d
andl $0x1, %r9d
callq 0x8ad0
jmp 0x9410
jmp 0x9412
leaq -0xa0(%rbp), %rdi
callq 0xe230
jmp 0x9398
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xc8(%rbp)
movl %eax, -0xcc(%rbp)
leaq -0x88(%rbp), %rdi
callq 0xe0f0
jmp 0x9bca
jmp 0x95a3
movq -0x360(%rbp), %rdi
movq -0x10(%rbp), %rax
movq %rax, -0xe0(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0xd8(%rbp)
movq -0x20(%rbp), %rcx
movl -0xe0(%rbp), %esi
movq -0xd8(%rbp), %rdx
callq 0x8730
testb $0x1, %al
jne 0x9487
jmp 0x95a1
movq -0x360(%rbp), %rsi
movq -0x10(%rbp), %rax
movq %rax, -0x128(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x120(%rbp)
movl -0x128(%rbp), %edx
movq -0x120(%rbp), %rcx
leaq -0x118(%rbp), %rdi
callq 0x5490
leaq -0x118(%rbp), %rax
movq %rax, -0xe8(%rbp)
movq -0xe8(%rbp), %rdi
callq 0xe180
movq %rax, -0x130(%rbp)
movq -0xe8(%rbp), %rdi
callq 0xe1b0
movq %rax, -0x138(%rbp)
leaq -0x130(%rbp), %rdi
leaq -0x138(%rbp), %rsi
callq 0xe1e0
testb $0x1, %al
jne 0x9519
leaq -0x118(%rbp), %rdi
callq 0xe0f0
jmp 0x959f
leaq -0x130(%rbp), %rdi
callq 0xe210
movq -0x360(%rbp), %rdi
movq %rax, -0x140(%rbp)
movq -0x140(%rbp), %rax
movups (%rax), %xmm0
movaps %xmm0, -0x150(%rbp)
movq -0x20(%rbp), %rcx
movq -0x28(%rbp), %r8
movl -0x150(%rbp), %esi
movq -0x148(%rbp), %rdx
movzbl -0x29(%rbp), %r9d
andl $0x1, %r9d
callq 0x8ad0
jmp 0x9569
jmp 0x956b
leaq -0x130(%rbp), %rdi
callq 0xe230
jmp 0x94f1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xc8(%rbp)
movl %eax, -0xcc(%rbp)
leaq -0x118(%rbp), %rdi
callq 0xe0f0
jmp 0x9bca
jmp 0x95a1
jmp 0x95a3
jmp 0x9bc1
movq -0x360(%rbp), %rdi
movq -0x10(%rbp), %rax
movq %rax, -0x160(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x158(%rbp)
movl -0x160(%rbp), %esi
movq -0x158(%rbp), %rdx
callq 0x7d40
cmpq $0x0, %rax
jne 0x97a0
movq -0x360(%rbp), %rdi
movq -0x10(%rbp), %rax
movq %rax, -0x170(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x168(%rbp)
movl -0x170(%rbp), %esi
movq -0x168(%rbp), %rdx
callq 0x7a50
cmpq $0x0, %rax
jne 0x97a0
movq -0x360(%rbp), %rsi
movq -0x10(%rbp), %rax
movq %rax, -0x1b8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x1b0(%rbp)
movl -0x1b8(%rbp), %edx
movq -0x1b0(%rbp), %rcx
leaq -0x1a8(%rbp), %rdi
callq 0x5890
leaq -0x1a8(%rbp), %rax
movq %rax, -0x178(%rbp)
movq -0x178(%rbp), %rdi
callq 0xe180
movq %rax, -0x1c0(%rbp)
movq -0x178(%rbp), %rdi
callq 0xe1b0
movq %rax, -0x1c8(%rbp)
leaq -0x1c0(%rbp), %rdi
leaq -0x1c8(%rbp), %rsi
callq 0xe1e0
testb $0x1, %al
jne 0x96ac
leaq -0x1a8(%rbp), %rdi
callq 0xe0f0
jmp 0x979b
leaq -0x1c0(%rbp), %rdi
callq 0xe210
movq -0x360(%rbp), %rdi
movq %rax, -0x1d0(%rbp)
movq -0x1d0(%rbp), %rax
movups (%rax), %xmm0
movaps %xmm0, -0x1e0(%rbp)
movq -0x1d0(%rbp), %rax
movups (%rax), %xmm0
movaps %xmm0, -0x1f0(%rbp)
movl -0x1f0(%rbp), %esi
movq -0x1e8(%rbp), %rdx
callq 0x4450
movq %rax, -0x368(%rbp)
jmp 0x9703
movq -0x360(%rbp), %rdi
movq -0x368(%rbp), %rcx
negq %rcx
movl -0x1e0(%rbp), %esi
movq -0x1d8(%rbp), %rdx
callq 0x8a50
jmp 0x9728
movq -0x360(%rbp), %rdi
movq -0x1d0(%rbp), %rax
movups (%rax), %xmm0
movaps %xmm0, -0x200(%rbp)
movq -0x20(%rbp), %rcx
movq -0x28(%rbp), %r8
movl -0x200(%rbp), %esi
movq -0x1f8(%rbp), %rdx
movzbl -0x29(%rbp), %r9d
andl $0x1, %r9d
callq 0x8ad0
jmp 0x9765
jmp 0x9767
leaq -0x1c0(%rbp), %rdi
callq 0xe230
jmp 0x9684
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xc8(%rbp)
movl %eax, -0xcc(%rbp)
leaq -0x1a8(%rbp), %rdi
callq 0xe0f0
jmp 0x9bca
jmp 0x9bbf
movq -0x360(%rbp), %rdi
movq -0x10(%rbp), %rax
movq %rax, -0x210(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x208(%rbp)
movl -0x210(%rbp), %esi
movq -0x208(%rbp), %rdx
callq 0x7f50
cmpq $0x0, %rax
jne 0x9998
movq -0x360(%rbp), %rdi
movq -0x10(%rbp), %rax
movq %rax, -0x220(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x218(%rbp)
movl -0x220(%rbp), %esi
movq -0x218(%rbp), %rdx
callq 0x79c0
cmpq $0x0, %rax
jne 0x9998
movq -0x360(%rbp), %rsi
movq -0x10(%rbp), %rax
movq %rax, -0x268(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x260(%rbp)
movl -0x268(%rbp), %edx
movq -0x260(%rbp), %rcx
leaq -0x258(%rbp), %rdi
callq 0x5490
leaq -0x258(%rbp), %rax
movq %rax, -0x228(%rbp)
movq -0x228(%rbp), %rdi
callq 0xe180
movq %rax, -0x270(%rbp)
movq -0x228(%rbp), %rdi
callq 0xe1b0
movq %rax, -0x278(%rbp)
leaq -0x270(%rbp), %rdi
leaq -0x278(%rbp), %rsi
callq 0xe1e0
testb $0x1, %al
jne 0x98a4
leaq -0x258(%rbp), %rdi
callq 0xe0f0
jmp 0x9993
leaq -0x270(%rbp), %rdi
callq 0xe210
movq -0x360(%rbp), %rdi
movq %rax, -0x280(%rbp)
movq -0x280(%rbp), %rax
movups (%rax), %xmm0
movaps %xmm0, -0x290(%rbp)
movq -0x280(%rbp), %rax
movups (%rax), %xmm0
movaps %xmm0, -0x2a0(%rbp)
movl -0x2a0(%rbp), %esi
movq -0x298(%rbp), %rdx
callq 0x4450
movq %rax, -0x370(%rbp)
jmp 0x98fb
movq -0x360(%rbp), %rdi
movq -0x370(%rbp), %rcx
negq %rcx
movl -0x290(%rbp), %esi
movq -0x288(%rbp), %rdx
callq 0x8a50
jmp 0x9920
movq -0x360(%rbp), %rdi
movq -0x280(%rbp), %rax
movups (%rax), %xmm0
movaps %xmm0, -0x2b0(%rbp)
movq -0x20(%rbp), %rcx
movq -0x28(%rbp), %r8
movl -0x2b0(%rbp), %esi
movq -0x2a8(%rbp), %rdx
movzbl -0x29(%rbp), %r9d
andl $0x1, %r9d
callq 0x8ad0
jmp 0x995d
jmp 0x995f
leaq -0x270(%rbp), %rdi
callq 0xe230
jmp 0x987c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xc8(%rbp)
movl %eax, -0xcc(%rbp)
leaq -0x258(%rbp), %rdi
callq 0xe0f0
jmp 0x9bca
jmp 0x9bbd
movq -0x360(%rbp), %rdi
movq -0x10(%rbp), %rax
movq %rax, -0x2d0(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x2c8(%rbp)
movq -0x20(%rbp), %rcx
movl -0x2d0(%rbp), %esi
movq -0x2c8(%rbp), %rdx
callq 0x8880
movl %eax, -0x2c0(%rbp)
movq %rdx, -0x2b8(%rbp)
movq -0x2c0(%rbp), %rax
movq %rax, -0x2e0(%rbp)
movq -0x2b8(%rbp), %rax
movq %rax, -0x2d8(%rbp)
leaq -0x300(%rbp), %rdi
callq 0x4180
movq -0x300(%rbp), %rax
movq %rax, -0x2f0(%rbp)
movq -0x2f8(%rbp), %rax
movq %rax, -0x2e8(%rbp)
movl -0x2e0(%rbp), %edi
movq -0x2d8(%rbp), %rsi
movl -0x2f0(%rbp), %edx
movq -0x2e8(%rbp), %rcx
callq 0x3bc0
testb $0x1, %al
jne 0x9a44
jmp 0x9bbb
movq -0x360(%rbp), %rdi
movq -0x10(%rbp), %rax
movq %rax, -0x318(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x310(%rbp)
movq -0x2c0(%rbp), %rax
movq %rax, -0x328(%rbp)
movq -0x2b8(%rbp), %rax
movq %rax, -0x320(%rbp)
movl -0x318(%rbp), %esi
movq -0x310(%rbp), %rdx
movl -0x328(%rbp), %ecx
movq -0x320(%rbp), %r8
callq 0x8170
movq %rax, -0x308(%rbp)
cmpq $0x0, -0x308(%rbp)
je 0x9bb9
movq -0x2c0(%rbp), %rax
movq %rax, -0x338(%rbp)
movq -0x2b8(%rbp), %rax
movq %rax, -0x330(%rbp)
movl -0x338(%rbp), %edi
movq -0x330(%rbp), %rsi
callq 0x7ef0
testb $0x1, %al
jne 0x9ae5
jmp 0x9b37
xorl %eax, %eax
subq -0x308(%rbp), %rax
movl $0x2, %ecx
cqto
idivq %rcx
cmpq $0x0, %rdx
jne 0x9b00
jmp 0x9b1f
leaq 0x2074b(%rip), %rdi     # 0x2a252
leaq 0x2067b(%rip), %rsi     # 0x2a189
movl $0x3bd, %edx            # imm = 0x3BD
leaq 0x20751(%rip), %rcx     # 0x2a26b
callq 0x3160
movq -0x308(%rbp), %rax
movl $0x2, %ecx
cqto
idivq %rcx
movq %rax, -0x308(%rbp)
movq -0x360(%rbp), %rdi
movq -0x2c0(%rbp), %rax
movq %rax, -0x348(%rbp)
movq -0x2b8(%rbp), %rax
movq %rax, -0x340(%rbp)
movq -0x308(%rbp), %rcx
movl -0x348(%rbp), %esi
movq -0x340(%rbp), %rdx
callq 0x8a50
movq -0x360(%rbp), %rdi
movq -0x2c0(%rbp), %rax
movq %rax, -0x358(%rbp)
movq -0x2b8(%rbp), %rax
movq %rax, -0x350(%rbp)
movq -0x20(%rbp), %rcx
movq -0x28(%rbp), %r8
movb -0x29(%rbp), %al
movl -0x358(%rbp), %esi
movq -0x350(%rbp), %rdx
andb $0x1, %al
movzbl %al, %r9d
callq 0x8ad0
jmp 0x9bbb
jmp 0x9bbd
jmp 0x9bbf
jmp 0x9bc1
addq $0x370, %rsp            # imm = 0x370
popq %rbp
retq
movq -0xc8(%rbp), %rdi
callq 0x3480
nopw %cs:(%rax,%rax)