// File: /workspace/github_cpp_makefile_star2_O1/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 $0x48, %rsp
movl %r9d, 0xc(%rsp)
movq %r8, %rbx
movq %rcx, %r14
movq %rdx, %r12
movl %esi, %r13d
movq %rdi, %r15
callq 0x497a
movq %rax, %rbp
movq %r15, %rdi
movl %r13d, %esi
movq %r12, %rdx
callq 0x4846
movq %r15, %rdi
movl %r13d, %esi
movq %r12, %rdx
cmpq %rax, %rbp
jne 0x546d
movq %r14, %rcx
callq 0x4db8
testb %al, %al
je 0x55c6
leaq 0x10(%rsp), %rbp
movq %rbp, %rdi
movq %r15, %rsi
movl %r13d, %edx
movq %r12, %rcx
callq 0x3978
movq 0x18(%rbp), %r12
leaq 0x18(%rsp), %r13
cmpq %r13, %r12
je 0x575b
movzbl 0xc(%rsp), %ebp
movl 0x20(%r12), %esi
movq 0x28(%r12), %rdx
movq %r15, %rdi
movq %r14, %rcx
movq %rbx, %r8
movl %ebp, %r9d
callq 0x501c
movq %r12, %rdi
callq 0x22a0
movq %rax, %r12
cmpq %r13, %rax
jne 0x543d
jmp 0x575b
callq 0x4846
testq %rax, %rax
jne 0x54bd
leaq 0x60(%r15), %rbp
leal (,%r13,2), %ecx
movq $-0x1, %rax
movq $-0x1, %rsi
shlq %cl, %rsi
cmpl $0x20, %r13d
notq %rsi
cmoveq %rax, %rsi
movq %r12, %rdi
callq 0xfa78
movq %rbp, %rdi
movq %rax, %rsi
xorl %edx, %edx
callq 0x1232e
testq %rax, %rax
je 0x563c
movq %r15, %rdi
movl %r13d, %esi
movq %r12, %rdx
callq 0x497a
testq %rax, %rax
jne 0x5516
leaq 0x38(%r15), %rbp
leal (,%r13,2), %ecx
movq $-0x1, %rax
movq $-0x1, %rsi
shlq %cl, %rsi
cmpl $0x20, %r13d
notq %rsi
cmoveq %rax, %rsi
movq %r12, %rdi
callq 0xfa78
movq %rbp, %rdi
movq %rax, %rsi
xorl %edx, %edx
callq 0x1232e
testq %rax, %rax
je 0x56d0
movq %r15, %rdi
movl %r13d, %esi
movq %r12, %rdx
movq %r14, %rcx
callq 0x4ed0
movl %eax, %ebp
testl %eax, %eax
setne %al
testq %rdx, %rdx
setne %cl
orb %al, %cl
cmpb $0x1, %cl
jne 0x5765
movq %rdx, %r8
movq %r15, %rdi
movl %r13d, %esi
movq %r12, %rdx
movl %ebp, %ecx
movq %r8, %r13
callq 0x4ab2
testq %rax, %rax
je 0x5765
movq %r13, %rdx
movq %rax, %r12
leaq 0x10(%rsp), %rdi
movl %ebp, %esi
callq 0x5341
leaq 0x10(%rsp), %rdi
movq 0x28(%rdi), %rax
movq %rax, 0x40(%rsp)
callq 0xc78e
cmpq $0x1, 0x40(%rsp)
jne 0x5598
testb $0x1, %r12b
jne 0x5774
sarq %r12
movq %r13, %rdx
movq %r15, %rdi
movl %ebp, %esi
movq %r12, %rcx
callq 0x4fd2
movzbl 0xc(%rsp), %r9d
movq %r15, %rdi
movl %ebp, %esi
movq %r13, %rdx
movq %r14, %rcx
movq %rbx, %r8
callq 0x501c
jmp 0x5765
movq %r15, %rdi
movl %r13d, %esi
movq %r12, %rdx
movq %r14, %rcx
callq 0x4e44
testb %al, %al
je 0x5765
leaq 0x10(%rsp), %rbp
movq %rbp, %rdi
movq %r15, %rsi
movl %r13d, %edx
movq %r12, %rcx
callq 0x37ec
movq 0x18(%rbp), %r12
leaq 0x18(%rsp), %r13
cmpq %r13, %r12
je 0x575b
movzbl 0xc(%rsp), %ebp
movl 0x20(%r12), %esi
movq 0x28(%r12), %rdx
movq %r15, %rdi
movq %r14, %rcx
movq %rbx, %r8
movl %ebp, %r9d
callq 0x501c
movq %r12, %rdi
callq 0x22a0
movq %rax, %r12
cmpq %r13, %rax
jne 0x560c
jmp 0x575b
leaq 0x10(%rsp), %rbp
movq %rbp, %rdi
movq %r15, %rsi
movl %r13d, %edx
movq %r12, %rcx
callq 0x3978
movq 0x18(%rbp), %r12
leaq 0x18(%rsp), %rax
cmpq %rax, %r12
je 0x575b
movzbl 0xc(%rsp), %eax
movl %eax, 0xc(%rsp)
movl 0x20(%r12), %r13d
movq 0x28(%r12), %rbp
movq %r15, %rdi
movl %r13d, %esi
movq %rbp, %rdx
callq 0x2ef0
negq %rax
movq %r15, %rdi
movl %r13d, %esi
movq %rbp, %rdx
movq %rax, %rcx
callq 0x4fd2
movl 0x20(%r12), %esi
movq 0x28(%r12), %rdx
movq %r15, %rdi
movq %r14, %rcx
movq %rbx, %r8
movl 0xc(%rsp), %r9d
callq 0x501c
movq %r12, %rdi
callq 0x22a0
movq %rax, %r12
leaq 0x18(%rsp), %rax
cmpq %rax, %r12
jne 0x566d
jmp 0x575b
leaq 0x10(%rsp), %rbp
movq %rbp, %rdi
movq %r15, %rsi
movl %r13d, %edx
movq %r12, %rcx
callq 0x37ec
movq 0x18(%rbp), %r12
leaq 0x18(%rsp), %rax
cmpq %rax, %r12
je 0x575b
movzbl 0xc(%rsp), %eax
movl %eax, 0xc(%rsp)
movl 0x20(%r12), %r13d
movq 0x28(%r12), %rbp
movq %r15, %rdi
movl %r13d, %esi
movq %rbp, %rdx
callq 0x2ef0
negq %rax
movq %r15, %rdi
movl %r13d, %esi
movq %rbp, %rdx
movq %rax, %rcx
callq 0x4fd2
movl 0x20(%r12), %esi
movq 0x28(%r12), %rdx
movq %r15, %rdi
movq %r14, %rcx
movq %rbx, %r8
movl 0xc(%rsp), %r9d
callq 0x501c
movq %r12, %rdi
callq 0x22a0
movq %rax, %r12
leaq 0x18(%rsp), %rax
cmpq %rax, %r12
jne 0x56fd
leaq 0x10(%rsp), %rdi
callq 0xc78e
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xeaea(%rip), %rdi      # 0x14265
leaq 0xea1a(%rip), %rsi      # 0x1419c
leaq 0xeaf5(%rip), %rcx      # 0x1427e
movl $0x3bd, %edx            # imm = 0x3BD
callq 0x2120
jmp 0x5799
jmp 0x5799
jmp 0x5799
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0xc78e
movq %rbx, %rdi
callq 0x23c0