// File: /workspace/github_cpp_makefile_star2_O2/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl %r9d, %ebp
movq %r8, %rbx
movq %rcx, %r14
movq %rdx, %r12
movl %esi, %r13d
movq %rdi, %r15
callq 0x43f2
movq %r15, %rdi
movl %r13d, %esi
movq %r12, %rdx
testq %rax, %rax
je 0x4cf9
callq 0x4244
testq %rax, %rax
jne 0x4c2d
leaq 0x58(%r15), %rdi
movl %r13d, %esi
movq %r12, %rdx
callq 0x7dcc
testq %rax, %rax
je 0x4dca
movl %ebp, 0x4(%rsp)
movq %r15, %rdi
movl %r13d, %esi
movq %r12, %rdx
callq 0x4334
testq %rax, %rax
jne 0x4c5c
leaq 0x30(%r15), %rdi
movl %r13d, %esi
movq %r12, %rdx
callq 0x7dcc
testq %rax, %rax
je 0x4e52
movq %r15, %rdi
movl %r13d, %esi
movq %r12, %rdx
movq %r14, %rcx
callq 0x4786
movl %eax, %ebp
testl %eax, %eax
setne %al
testq %rdx, %rdx
setne %cl
orb %al, %cl
cmpb $0x1, %cl
jne 0x4edf
movq %rdx, %r8
movq %r15, %rdi
movl %r13d, %esi
movq %r12, %rdx
movl %ebp, %ecx
movq %r8, %r13
callq 0x4428
testq %rax, %rax
je 0x4edf
movq %r13, %rsi
movq %rax, %r12
movl %ebp, %edi
callq 0x4301
testb %al, %al
je 0x4cc2
testb $0x1, %r12b
jne 0x4eee
sarq %r12
movq %r15, %rdi
movl %ebp, %esi
movq %r13, %rdx
movq %r12, %rcx
callq 0x4862
movzbl 0x4(%rsp), %r9d
movq %r15, %rdi
movl %ebp, %esi
movq %r13, %rdx
movq %r14, %rcx
movq %rbx, %r8
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x48ac
movq %r14, %rcx
callq 0x466e
testb %al, %al
je 0x4d5b
leaq 0x8(%rsp), %rdi
movq %r15, %rsi
movl %r13d, %edx
movq %r12, %rcx
callq 0x34b2
leaq 0x8(%rsp), %rax
movq 0x18(%rax), %r12
leaq 0x10(%rsp), %r13
movzbl %bpl, %ebp
cmpq %r13, %r12
je 0x4ed5
movl 0x20(%r12), %esi
movq 0x28(%r12), %rdx
movq %r15, %rdi
movq %r14, %rcx
movq %rbx, %r8
movl %ebp, %r9d
callq 0x48ac
movq %r12, %rdi
callq 0x2260
movq %rax, %r12
jmp 0x4d2a
movq %r15, %rdi
movl %r13d, %esi
movq %r12, %rdx
movq %r14, %rcx
callq 0x46fa
testb %al, %al
je 0x4edf
leaq 0x8(%rsp), %rdi
movq %r15, %rsi
movl %r13d, %edx
movq %r12, %rcx
callq 0x330e
leaq 0x8(%rsp), %rax
movq 0x18(%rax), %r12
leaq 0x10(%rsp), %r13
movzbl %bpl, %ebp
cmpq %r13, %r12
je 0x4ed5
movl 0x20(%r12), %esi
movq 0x28(%r12), %rdx
movq %r15, %rdi
movq %r14, %rcx
movq %rbx, %r8
movl %ebp, %r9d
callq 0x48ac
movq %r12, %rdi
callq 0x2260
movq %rax, %r12
jmp 0x4d99
leaq 0x8(%rsp), %rdi
movq %r15, %rsi
movl %r13d, %edx
movq %r12, %rcx
callq 0x34b2
leaq 0x8(%rsp), %rax
movq 0x18(%rax), %r12
movzbl %bpl, %eax
movl %eax, 0x4(%rsp)
leaq 0x10(%rsp), %rax
cmpq %rax, %r12
je 0x4ed5
movl 0x20(%r12), %r13d
movq 0x28(%r12), %rbp
movq %r15, %rdi
movl %r13d, %esi
movq %rbp, %rdx
callq 0x2bfe
negq %rax
movq %r15, %rdi
movl %r13d, %esi
movq %rbp, %rdx
movq %rax, %rcx
callq 0x4862
movl 0x20(%r12), %esi
movq 0x28(%r12), %rdx
movq %r15, %rdi
movq %r14, %rcx
movq %rbx, %r8
movl 0x4(%rsp), %r9d
callq 0x48ac
movq %r12, %rdi
callq 0x2260
movq %rax, %r12
jmp 0x4dee
leaq 0x8(%rsp), %rbp
movq %rbp, %rdi
movq %r15, %rsi
movl %r13d, %edx
movq %r12, %rcx
callq 0x330e
movq 0x18(%rbp), %r12
movzbl 0x4(%rsp), %eax
movl %eax, 0x4(%rsp)
leaq 0x10(%rsp), %rax
cmpq %rax, %r12
je 0x4ed5
movl 0x20(%r12), %r13d
movq 0x28(%r12), %rbp
movq %r15, %rdi
movl %r13d, %esi
movq %rbp, %rdx
callq 0x2bfe
negq %rax
movq %r15, %rdi
movl %r13d, %esi
movq %rbp, %rdx
movq %rax, %rcx
callq 0x4862
movl 0x20(%r12), %esi
movq 0x28(%r12), %rdx
movq %r15, %rdi
movq %r14, %rcx
movq %rbx, %r8
movl 0x4(%rsp), %r9d
callq 0x48ac
movq %r12, %rdi
callq 0x2260
movq %rax, %r12
jmp 0x4e75
leaq 0x8(%rsp), %rdi
callq 0x9eb0
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xc370(%rip), %rdi      # 0x11265
leaq 0xc2a0(%rip), %rsi      # 0x1119c
leaq 0xc37b(%rip), %rcx      # 0x1127e
movl $0x3bd, %edx            # imm = 0x3BD
callq 0x2110
jmp 0x4f13
jmp 0x4f13
jmp 0x4f13
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x9eb0
movq %rbx, %rdi
callq 0x23b0