// File: /workspace/github_cpp_makefile_star2_O3/Ripser[P]ripser/ripser.cpp
// Function: ripser<sparse_distance_matrix>::compute_dim_0_pairs(std::vector<std::pair<float, long>, std::allocator<std::pair<float, long>>>&, std::vector<std::pair<float, long>, std::allocator<std::pair<float, long>>>&)
void compute_dim_0_pairs(std::vector<diameter_index_t>& edges,
	                         std::vector<diameter_index_t>& columns_to_reduce) {
#ifdef PRINT_PERSISTENCE_PAIRS
		std::cout << "persistence intervals in dim 0:" << std::endl;
#endif

		union_find dset(n);

		edges = get_edges();
		std::sort(edges.rbegin(), edges.rend(),
		          greater_diameter_or_smaller_index<diameter_index_t>);
		std::vector<index_t> vertices_of_edge(2);
		for (auto e : edges) {
			get_simplex_vertices(get_index(e), 1, n, vertices_of_edge.rbegin());
			index_t u = dset.find(vertices_of_edge[0]), v = dset.find(vertices_of_edge[1]);

			if (u != v) {
#ifdef PRINT_PERSISTENCE_PAIRS
				if (get_diameter(e) != 0)
					std::cout << " [0," << get_diameter(e) << ")" << std::endl;
#endif
				dset.link(u, v);
			} else if ((dim_max > 0) && (get_index(get_zero_apparent_cofacet(e, 1)) == -1))
				columns_to_reduce.push_back(e);
		}
		if (dim_max > 0) std::reverse(columns_to_reduce.begin(), columns_to_reduce.end());

#ifdef PRINT_PERSISTENCE_PAIRS
		for (index_t i = 0; i < n; ++i)
			if (dset.find(i) == i) std::cout << " [0, )" << std::endl;
#endif
	}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %rdx, %r15
movq %rsi, %r13
movq %rdi, %rbx
movq 0xb006(%rip), %r14      # 0x11fc8
leaq 0x569a(%rip), %rsi      # 0xc663
movl $0x1f, %edx
movq %r14, %rdi
callq 0x2230
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x21f0
movsbl %al, %esi
movq %r14, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2180
movq 0x20(%rbx), %rsi
leaq 0x30(%rsp), %rdi
callq 0x7af0
movq %rsp, %rdi
movq %rbx, %rsi
callq 0x2f02
movq %r15, 0x20(%rsp)
movq (%r13), %rdi
movaps (%rsp), %xmm0
movups %xmm0, (%r13)
movq 0x10(%rsp), %rax
movq %rax, 0x10(%r13)
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
movq $0x0, 0x10(%rsp)
testq %rdi, %rdi
je 0x7059
callq 0x21d0
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x7059
callq 0x21d0
movq (%r13), %r14
movq 0x8(%r13), %r15
movq %r15, %rax
subq %r14, %rax
je 0x70b0
movq %rsp, %rdi
movq %r15, (%rdi)
leaq 0x70(%rsp), %rsi
movq %r14, (%rsi)
sarq $0x4, %rax
bsrq %rax, %rdx
xorl $0x3f, %edx
addl %edx, %edx
xorq $0x7e, %rdx
leaq 0xb4c(%rip), %rcx       # 0x7bdb
callq 0x7e2a
leaq 0x68(%rsp), %rdi
movq %r15, (%rdi)
leaq 0x60(%rsp), %rsi
movq %r14, (%rsi)
leaq 0xb30(%rip), %rdx       # 0x7bdb
callq 0x7f89
movl $0x10, %edi
callq 0x2210
movq %rax, %r15
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movq (%r13), %r14
movq 0x8(%r13), %rax
movq %rax, 0x28(%rsp)
cmpq %rax, %r14
je 0x726a
movups (%r14), %xmm0
movaps %xmm0, (%rsp)
movq 0x8(%rsp), %r12
movq 0x20(%rbx), %rcx
decq %rcx
movl $0x2, %edx
movq %rbx, %rdi
movq %r12, %rsi
callq 0x86c8
movq %rax, 0x8(%r15)
movq 0x40(%rbx), %rcx
movq 0x30(%rcx), %rcx
subq (%rcx,%rax,8), %r12
movq %r12, (%r15)
movq 0x30(%rsp), %rcx
movq %r12, %rdx
movq %rdx, %r13
movq (%rcx,%rdx,8), %rdx
cmpq %r13, %rdx
jne 0x7118
movq (%rcx,%r12,8), %rdx
cmpq %r13, %rdx
je 0x7144
leaq (%rcx,%r12,8), %rax
movq %r13, (%rax)
leaq (%rcx,%rdx,8), %rax
movq (%rax), %rdx
cmpq %r13, %rdx
jne 0x7131
movq 0x8(%r15), %rax
movq %rax, %rdx
movq %rdx, %r12
movq (%rcx,%rdx,8), %rdx
cmpq %r12, %rdx
jne 0x7147
movq (%rcx,%rax,8), %rdx
cmpq %r12, %rdx
je 0x716f
leaq (%rcx,%rax,8), %rax
movq %r12, (%rax)
leaq (%rcx,%rdx,8), %rax
movq (%rax), %rdx
cmpq %r12, %rdx
jne 0x7160
cmpq %r12, %r13
jne 0x71c4
cmpq $0x0, 0x28(%rbx)
jle 0x724f
movss (%rsp), %xmm0
movq 0x8(%rsp), %rsi
movl $0x1, %edx
movq %rbx, %rdi
callq 0x7d10
cmpq $-0x1, %rax
jne 0x724f
movq 0x20(%rsp), %rdi
movq 0x8(%rdi), %rsi
cmpq 0x10(%rdi), %rsi
je 0x7260
movaps (%rsp), %xmm0
movups %xmm0, (%rsi)
addq $0x10, 0x8(%rdi)
jmp 0x724f
movss (%rsp), %xmm0
ucomiss 0x4eec(%rip), %xmm0     # 0xc0bc
jne 0x71d4
jnp 0x723f
movl $0x4, %edx
movq 0xade8(%rip), %rdi      # 0x11fc8
leaq 0x549c(%rip), %rsi      # 0xc683
callq 0x2230
xorps %xmm0, %xmm0
cvtss2sd (%rsp), %xmm0
movq 0xadcd(%rip), %rdi      # 0x11fc8
callq 0x22f0
movq %rax, %rbp
movl $0x1, %edx
movq %rax, %rdi
leaq 0x547b(%rip), %rsi      # 0xc68d
callq 0x2230
movq (%rbp), %rax
movq -0x18(%rax), %rdi
addq %rbp, %rdi
movl $0xa, %esi
callq 0x21f0
movsbl %al, %esi
movq %rbp, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2180
leaq 0x30(%rsp), %rdi
movq %r13, %rsi
movq %r12, %rdx
callq 0x7c8c
addq $0x10, %r14
cmpq 0x28(%rsp), %r14
jne 0x70d9
jmp 0x726a
movq %rsp, %rdx
callq 0x9002
jmp 0x724f
cmpq $0x0, 0x28(%rbx)
jle 0x72c4
movq 0x20(%rsp), %rcx
movq (%rcx), %rax
movq 0x8(%rcx), %rcx
cmpq %rcx, %rax
setne %dl
addq $-0x10, %rcx
cmpq %rax, %rcx
seta %sil
andb %dl, %sil
cmpb $0x1, %sil
jne 0x72c4
movss (%rax), %xmm0
movss (%rcx), %xmm1
movss %xmm1, (%rax)
movss %xmm0, (%rcx)
movq 0x8(%rax), %rdx
movq 0x8(%rcx), %rsi
movq %rsi, 0x8(%rax)
movq %rdx, 0x8(%rcx)
addq $0x10, %rax
addq $-0x10, %rcx
cmpq %rcx, %rax
jb 0x7297
cmpq $0x0, 0x20(%rbx)
jle 0x7361
xorl %r14d, %r14d
leaq 0x53af(%rip), %r12      # 0xc688
movq 0x30(%rsp), %rax
movq %r14, %rdx
movq %rdx, %rcx
movq (%rax,%rdx,8), %rdx
cmpq %rcx, %rdx
jne 0x72e1
movq (%rax,%r14,8), %rdx
cmpq %rcx, %rdx
je 0x7309
leaq (%rax,%r14,8), %rsi
movq %rcx, (%rsi)
leaq (%rax,%rdx,8), %rsi
movq (%rsi), %rdx
cmpq %rcx, %rdx
jne 0x72fa
cmpq %r14, %rcx
jne 0x7354
movl $0x6, %edx
movq 0xacae(%rip), %rdi      # 0x11fc8
movq %r12, %rsi
callq 0x2230
movq 0xac9f(%rip), %rcx      # 0x11fc8
movq (%rcx), %rax
movq -0x18(%rax), %rdi
addq %rcx, %rdi
movl $0xa, %esi
callq 0x21f0
movsbl %al, %esi
movq 0xac81(%rip), %rdi      # 0x11fc8
callq 0x2030
movq %rax, %rdi
callq 0x2180
incq %r14
cmpq 0x20(%rbx), %r14
jl 0x72d9
movq %r15, %rdi
callq 0x21d0
movq 0x48(%rsp), %rdi
testq %rdi, %rdi
je 0x7378
callq 0x21d0
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0x7387
callq 0x21d0
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x739a
jmp 0x739a
movq %rax, %rbx
jmp 0x73b0
jmp 0x73a5
jmp 0x73a5
jmp 0x73a5
movq %rax, %rbx
movq %r15, %rdi
callq 0x21d0
leaq 0x30(%rsp), %rdi
callq 0x7d70
movq %rbx, %rdi
callq 0x2350