// File: /workspace/github_cpp_makefile_star2_O1/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 $0x38, %rsp
movq %r8, %r15
movq %rcx, %r12
movq %rdx, %rbx
movq %rsi, %r13
movss %xmm0, 0x14(%rsp)
movq %rdi, %r14
movb 0x906d(%rip), %al       # 0x123e0
testb %al, %al
je 0x952e
movq 0x70(%r14), %rax
cmpq %rax, 0x78(%r14)
je 0x9389
movq %rax, 0x78(%r14)
movq (%r12), %rdx
leaq 0x8fac(%rip), %rbp      # 0x12340
movq %rbp, %rdi
movss 0x14(%rsp), %xmm0
movq %r13, %rsi
callq 0x890e
movq %rbp, %rdi
movl $0x1, %esi
callq 0x89d2
testb %al, %al
je 0x94d0
leaq 0x70(%r14), %rax
movq %rax, 0x18(%rsp)
movb $0x1, %r13b
leaq 0x8f73(%rip), %rbp      # 0x12340
movq 0x8fc4(%rip), %rax      # 0x12398
addq $-0x10, (%rax)
movss 0x8ff0(%rip), %xmm0     # 0x123d0
maxss 0x8f88(%rip), %xmm0     # 0x12370
movq 0x8fa1(%rip), %rax      # 0x12390
movq 0x8fd2(%rip), %rcx      # 0x123c8
movq 0x8f53(%rip), %rdx      # 0x12350
movq (%rax), %rax
leaq (%rdx,%rdx,2), %rdx
movq 0x18(%rax,%rdx,8), %rax
movq (%rax,%rcx,8), %rax
addq 0x8f34(%rip), %rax      # 0x12348
addq 0x8f25(%rip), %rax      # 0x12340
movss %xmm0, (%rsp)
movq %rax, 0x8(%rsp)
movss 0x30(%r14), %xmm1
ucomiss %xmm0, %xmm1
jb 0x94bb
movq 0x78(%r14), %rsi
cmpq 0x80(%r14), %rsi
je 0x944f
movups (%rsp), %xmm0
movups %xmm0, (%rsi)
addq $0x10, 0x78(%r14)
jmp 0x945c
movq 0x18(%rsp), %rdi
movq %rsp, %rdx
callq 0x99fc
testb $0x1, %r13b
je 0x94bb
movss (%rsp), %xmm0
ucomiss 0x14(%rsp), %xmm0
jne 0x94bb
jp 0x94bb
movq 0x8(%rsp), %rcx
movq %rcx, %rax
xorl %edx, %edx
divq 0x8(%r15)
movq %r15, %rdi
movq %rdx, %rsi
leaq 0x8(%rsp), %rdx
callq 0x9b98
testq %rax, %rax
je 0x9499
cmpq $0x0, (%rax)
jne 0x94b8
movss (%rsp), %xmm0
movq 0x8(%rsp), %rsi
movq (%r12), %rdx
incq %rdx
movq %r14, %rdi
callq 0x962a
cmpq $-0x1, %rax
je 0x9515
xorl %r13d, %r13d
movq %rbp, %rdi
movl $0x1, %esi
callq 0x89d2
testb %al, %al
jne 0x93cd
movq 0x70(%r14), %r12
movq 0x78(%r14), %r13
cmpq %r13, %r12
je 0x9500
leaq 0x20(%rsp), %r15
movups (%r12), %xmm0
movaps %xmm0, 0x20(%rsp)
movq %rbx, %rdi
movq %r15, %rsi
callq 0x99a6
addq $0x10, %r12
cmpq %r13, %r12
jne 0x94e2
movq %r14, %rdi
movq %rbx, %rsi
callq 0x95f2
movss %xmm0, (%rsp)
movq %rax, 0x8(%rsp)
movss (%rsp), %xmm0
movq 0x8(%rsp), %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r14, %rdi
callq 0x25d4
jmp 0x937b
nop