// File: /workspace/github_cpp_makefile_star2_O3/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 0x490e
movq %rax, %rbp
movq %r15, %rdi
movl %r13d, %esi
movq %r12, %rdx
callq 0x47da
movq %r15, %rdi
movl %r13d, %esi
movq %r12, %rdx
cmpq %rax, %rbp
jne 0x53ff
movq %r14, %rcx
callq 0x4d44
testb %al, %al
je 0x5558
leaq 0x10(%rsp), %rbp
movq %rbp, %rdi
movq %r15, %rsi
movl %r13d, %edx
movq %r12, %rcx
callq 0x3922
movq 0x18(%rbp), %r12
leaq 0x18(%rsp), %r13
cmpq %r13, %r12
je 0x56ed
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 0x4fae
movq %r12, %rdi
callq 0x2290
movq %rax, %r12
cmpq %r13, %rax
jne 0x53cf
jmp 0x56ed
callq 0x47da
testq %rax, %rax
jne 0x544f
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 0xf992
movq %rbp, %rdi
movq %rax, %rsi
xorl %edx, %edx
callq 0x120d0
testq %rax, %rax
je 0x55ce
movq %r15, %rdi
movl %r13d, %esi
movq %r12, %rdx
callq 0x490e
testq %rax, %rax
jne 0x54a8
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 0xf992
movq %rbp, %rdi
movq %rax, %rsi
xorl %edx, %edx
callq 0x120d0
testq %rax, %rax
je 0x5662
movq %r15, %rdi
movl %r13d, %esi
movq %r12, %rdx
movq %r14, %rcx
callq 0x4e5c
movl %eax, %ebp
testl %eax, %eax
setne %al
testq %rdx, %rdx
setne %cl
orb %al, %cl
cmpb $0x1, %cl
jne 0x56f7
movq %rdx, %r8
movq %r15, %rdi
movl %r13d, %esi
movq %r12, %rdx
movl %ebp, %ecx
movq %r8, %r13
callq 0x4a46
testq %rax, %rax
je 0x56f7
movq %r13, %rdx
movq %rax, %r12
leaq 0x10(%rsp), %rdi
movl %ebp, %esi
callq 0x52d3
leaq 0x10(%rsp), %rdi
movq 0x28(%rdi), %rax
movq %rax, 0x40(%rsp)
callq 0xc756
cmpq $0x1, 0x40(%rsp)
jne 0x552a
testb $0x1, %r12b
jne 0x5706
sarq %r12
movq %r13, %rdx
movq %r15, %rdi
movl %ebp, %esi
movq %r12, %rcx
callq 0x4f64
movzbl 0xc(%rsp), %r9d
movq %r15, %rdi
movl %ebp, %esi
movq %r13, %rdx
movq %r14, %rcx
movq %rbx, %r8
callq 0x4fae
jmp 0x56f7
movq %r15, %rdi
movl %r13d, %esi
movq %r12, %rdx
movq %r14, %rcx
callq 0x4dd0
testb %al, %al
je 0x56f7
leaq 0x10(%rsp), %rbp
movq %rbp, %rdi
movq %r15, %rsi
movl %r13d, %edx
movq %r12, %rcx
callq 0x3796
movq 0x18(%rbp), %r12
leaq 0x18(%rsp), %r13
cmpq %r13, %r12
je 0x56ed
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 0x4fae
movq %r12, %rdi
callq 0x2290
movq %rax, %r12
cmpq %r13, %rax
jne 0x559e
jmp 0x56ed
leaq 0x10(%rsp), %rbp
movq %rbp, %rdi
movq %r15, %rsi
movl %r13d, %edx
movq %r12, %rcx
callq 0x3922
movq 0x18(%rbp), %r12
leaq 0x18(%rsp), %rax
cmpq %rax, %r12
je 0x56ed
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 0x2eaa
negq %rax
movq %r15, %rdi
movl %r13d, %esi
movq %rbp, %rdx
movq %rax, %rcx
callq 0x4f64
movl 0x20(%r12), %esi
movq 0x28(%r12), %rdx
movq %r15, %rdi
movq %r14, %rcx
movq %rbx, %r8
movl 0xc(%rsp), %r9d
callq 0x4fae
movq %r12, %rdi
callq 0x2290
movq %rax, %r12
leaq 0x18(%rsp), %rax
cmpq %rax, %r12
jne 0x55ff
jmp 0x56ed
leaq 0x10(%rsp), %rbp
movq %rbp, %rdi
movq %r15, %rsi
movl %r13d, %edx
movq %r12, %rcx
callq 0x3796
movq 0x18(%rbp), %r12
leaq 0x18(%rsp), %rax
cmpq %rax, %r12
je 0x56ed
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 0x2eaa
negq %rax
movq %r15, %rdi
movl %r13d, %esi
movq %rbp, %rdx
movq %rax, %rcx
callq 0x4f64
movl 0x20(%r12), %esi
movq 0x28(%r12), %rdx
movq %r15, %rdi
movq %r14, %rcx
movq %rbx, %r8
movl 0xc(%rsp), %r9d
callq 0x4fae
movq %r12, %rdi
callq 0x2290
movq %rax, %r12
leaq 0x18(%rsp), %rax
cmpq %rax, %r12
jne 0x568f
leaq 0x10(%rsp), %rdi
callq 0xc756
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xeb58(%rip), %rdi      # 0x14265
leaq 0xea88(%rip), %rsi      # 0x1419c
leaq 0xeb63(%rip), %rcx      # 0x1427e
movl $0x3bd, %edx            # imm = 0x3BD
callq 0x2120
jmp 0x572b
jmp 0x572b
jmp 0x572b
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0xc756
movq %rbx, %rdi
callq 0x23b0