// File: /workspace/github_cpp_makefile_star2_O2/Ripser[P]ripser/ripser.cpp
// Function: diameter_entry_t ripser<sparse_distance_matrix>::init_coboundary_and_get_pivot<std::priority_queue<diameter_entry_t, std::vector<diameter_entry_t, std::allocator<diameter_entry_t>>, greater_diameter_or_smaller_index_comp<diameter_entry_t>>>(diameter_entry_t, std::priority_queue<diameter_entry_t, std::vector<diameter_entry_t, std::allocator<diameter_entry_t>>, greater_diameter_or_smaller_index_comp<diameter_entry_t>>&, long const&, std::unordered_map<long, unsigned long, ripser<sparse_distance_matrix>::entry_hash, ripser<sparse_distance_matrix>::equal_index, std::allocator<std::pair<long const, unsigned long>>>&)
diameter_entry_t init_coboundary_and_get_pivot(const diameter_entry_t simplex,
	                                               Column& working_coboundary, const index_t& dim,
	                                               entry_hash_map& pivot_column_index) {
		static simplex_coboundary_enumerator cofacets(*this);
		bool check_for_emergent_pair = true;
		cofacet_entries.clear();
		cofacets.set_simplex(simplex, dim);
		while (cofacets.has_next()) {
			diameter_entry_t cofacet = cofacets.next();
			if (get_diameter(cofacet) <= threshold) {
				cofacet_entries.push_back(cofacet);
				if (check_for_emergent_pair && (get_diameter(simplex) == get_diameter(cofacet))) {
					if ((pivot_column_index.find(get_entry(cofacet)) == pivot_column_index.end()) &&
					    (get_index(get_zero_apparent_facet(cofacet, dim + 1)) == -1))
						return cofacet;
					check_for_emergent_pair = false;
				}
			}
		}
		for (auto cofacet : cofacet_entries) working_coboundary.push(cofacet);
		return get_pivot(working_coboundary);
	}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %r8, 0x28(%rsp)
movq %rcx, %r12
movq %rdx, %rbx
movq %rsi, %r15
movss %xmm0, 0xc(%rsp)
movq %rdi, %r14
movb 0xaa8b(%rip), %al       # 0x133b0
testb %al, %al
je 0x8a56
movq 0x70(%r14), %rax
cmpq %rax, 0x78(%r14)
je 0x893b
movq %rax, 0x78(%r14)
leaq 0x70(%r14), %r13
movq %r12, 0x20(%rsp)
movq (%r12), %rdx
leaq 0xa9c1(%rip), %rbp      # 0x13310
movq %rbp, %rdi
movss 0xc(%rsp), %xmm0
movq %r15, %rsi
callq 0x7dcc
movb $0x1, %r12b
pushq $0x1
popq %r15
movq %rbp, %rdi
movl %r15d, %esi
callq 0x7e84
testb %al, %al
je 0x8a0f
movq %rbp, %rdi
callq 0x7fe8
movss %xmm0, 0x10(%rsp)
movq %rax, 0x18(%rsp)
movss 0x30(%r14), %xmm1
ucomiss %xmm0, %xmm1
jb 0x8967
movq %r13, %rdi
leaq 0x10(%rsp), %rsi
callq 0x8f7a
movss 0x10(%rsp), %xmm0
ucomiss 0xc(%rsp), %xmm0
setnp %al
sete %cl
andb %al, %cl
andb %r12b, %cl
cmpb $0x1, %cl
jne 0x8967
movq 0x28(%rsp), %rdi
leaq 0x18(%rsp), %rsi
callq 0x9192
xorl %r12d, %r12d
testq %rax, %rax
jne 0x8967
movss 0x10(%rsp), %xmm0
movq 0x18(%rsp), %rsi
movq 0x20(%rsp), %rax
movq (%rax), %rdx
incq %rdx
movq %r14, %rdi
callq 0x8bcc
xorl %r12d, %r12d
cmpq $-0x1, %rax
jne 0x8967
movss 0x10(%rsp), %xmm0
movq 0x18(%rsp), %rax
jmp 0x8a47
movq 0x70(%r14), %r12
movq 0x78(%r14), %r13
leaq 0x30(%rsp), %r15
cmpq %r13, %r12
je 0x8a3c
movups (%r12), %xmm0
movaps %xmm0, 0x30(%rsp)
movq %rbx, %rdi
movq %r15, %rsi
callq 0x8f98
addq $0x10, %r12
jmp 0x8a1c
movq %r14, %rdi
movq %rbx, %rsi
callq 0x8b86
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xa953(%rip), %rdi      # 0x133b0
callq 0x2310
testl %eax, %eax
je 0x892d
andq $0x0, 0xa8d6(%rip)      # 0x13348
leaq 0xa897(%rip), %rsi      # 0x13310
xorps %xmm0, %xmm0
movups %xmm0, 0xa8a5(%rip)     # 0x13328
movups %xmm0, 0xa8aa(%rip)     # 0x13334
movzwl 0x38(%r14), %eax
movw %ax, 0xa8ba(%rip)       # 0x13350
movq %r14, 0xa8bb(%rip)      # 0x13358
leaq 0x40(%r14), %rax
movq %rax, 0xa8b8(%rip)      # 0x13360
movups %xmm0, 0xa8b9(%rip)     # 0x13368
movups %xmm0, 0xa8c2(%rip)     # 0x13378
movups %xmm0, 0xa8cb(%rip)     # 0x13388
movups %xmm0, 0xa8d0(%rip)     # 0x13394
movq %r14, 0xa8dd(%rip)      # 0x133a8
leaq -0xd2a(%rip), %rdi      # 0x7da8
leaq 0xa6ef(%rip), %rdx      # 0x131c8
callq 0x21c0
leaq 0xa8cb(%rip), %rdi      # 0x133b0
callq 0x2160
jmp 0x892d
nop