// File: /workspace/github_cpp_makefile_star2_O1/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 0xb00e(%rip), %r14      # 0x11fc8
leaq 0x56a2(%rip), %rsi      # 0xc663
movl $0x1f, %edx
movq %r14, %rdi
callq 0x2240
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x2200
movsbl %al, %esi
movq %r14, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2180
movq 0x20(%rbx), %rsi
leaq 0x30(%rsp), %rdi
callq 0x7b04
movq %rsp, %rdi
movq %rbx, %rsi
callq 0x2f08
movq (%r13), %rdi
movaps (%rsp), %xmm0
movq 0x10(%rsp), %rax
movq %rdi, (%rsp)
movups 0x8(%r13), %xmm1
movups %xmm0, (%r13)
movq %rax, 0x10(%r13)
movups %xmm1, 0x8(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
movq $0x0, 0x10(%rsp)
testq %rdi, %rdi
je 0x704c
callq 0x21e0
movq %r15, 0x20(%rsp)
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x705f
callq 0x21e0
movq (%r13), %r14
movq 0x8(%r13), %r15
movq %r15, %rax
subq %r14, %rax
je 0x70b6
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 0xb5a(%rip), %rcx       # 0x7bef
callq 0x7e3c
leaq 0x68(%rsp), %rdi
movq %r15, (%rdi)
leaq 0x60(%rsp), %rsi
movq %r14, (%rsi)
leaq 0xb3e(%rip), %rdx       # 0x7bef
callq 0x7fbe
movl $0x10, %edi
callq 0x2220
movq %rax, %r15
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movq (%r13), %r14
movq 0x8(%r13), %rax
movq %rax, 0x28(%rsp)
cmpq %rax, %r14
je 0x7270
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 0x870e
movq %rax, 0x8(%r15)
movq 0x40(%rbx), %rcx
movq 0x30(%rcx), %rcx
subq (%rcx,%rax,8), %r12
movq %r12, (%r15)
movq 0x30(%rsp), %rax
movq %r12, %rdx
movq %rdx, %rcx
movq (%rax,%rdx,8), %rdx
cmpq %rcx, %rdx
jne 0x711e
movq (%rax,%r12,8), %r13
cmpq %rcx, %r13
je 0x7146
leaq (%rax,%r12,8), %rdx
movq %rcx, (%rdx)
leaq (%rax,%r13,8), %rdx
movq (%rdx), %r13
cmpq %rcx, %r13
jne 0x7137
movq 0x8(%r15), %rdx
movq %rdx, %rsi
movq %rsi, %rcx
movq (%rax,%rsi,8), %rsi
cmpq %rcx, %rsi
jne 0x714d
movq (%rax,%rdx,8), %r12
cmpq %rcx, %r12
je 0x7175
leaq (%rax,%rdx,8), %rdx
movq %rcx, (%rdx)
leaq (%rax,%r12,8), %rdx
movq (%rdx), %r12
cmpq %rcx, %r12
jne 0x7166
cmpq %r12, %r13
jne 0x71ca
cmpq $0x0, 0x28(%rbx)
jle 0x7255
movss (%rsp), %xmm0
movq 0x8(%rsp), %rsi
movl $0x1, %edx
movq %rbx, %rdi
callq 0x7d22
cmpq $-0x1, %rax
jne 0x7255
movq 0x20(%rsp), %rdi
movq 0x8(%rdi), %rsi
cmpq 0x10(%rdi), %rsi
je 0x7266
movaps (%rsp), %xmm0
movups %xmm0, (%rsi)
addq $0x10, 0x8(%rdi)
jmp 0x7255
movss (%rsp), %xmm0
ucomiss 0x4ee6(%rip), %xmm0     # 0xc0bc
jne 0x71da
jnp 0x7245
movl $0x4, %edx
movq 0xade2(%rip), %rdi      # 0x11fc8
leaq 0x5496(%rip), %rsi      # 0xc683
callq 0x2240
xorps %xmm0, %xmm0
cvtss2sd (%rsp), %xmm0
movq 0xadc7(%rip), %rdi      # 0x11fc8
callq 0x2300
movq %rax, %rbp
movl $0x1, %edx
movq %rax, %rdi
leaq 0x5475(%rip), %rsi      # 0xc68d
callq 0x2240
movq (%rbp), %rax
movq -0x18(%rax), %rdi
addq %rbp, %rdi
movl $0xa, %esi
callq 0x2200
movsbl %al, %esi
movq %rbp, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2180
leaq 0x30(%rsp), %rdi
movq %r13, %rsi
movq %r12, %rdx
callq 0x7c9e
addq $0x10, %r14
cmpq 0x28(%rsp), %r14
jne 0x70df
jmp 0x7270
movq %rsp, %rdx
callq 0x9060
jmp 0x7255
cmpq $0x0, 0x28(%rbx)
jle 0x72ca
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 0x72ca
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 0x729d
cmpq $0x0, 0x20(%rbx)
jle 0x7367
xorl %r14d, %r14d
leaq 0x53a9(%rip), %r12      # 0xc688
movq 0x30(%rsp), %rax
movq %r14, %rdx
movq %rdx, %rcx
movq (%rax,%rdx,8), %rdx
cmpq %rcx, %rdx
jne 0x72e7
movq (%rax,%r14,8), %rdx
cmpq %rcx, %rdx
je 0x730f
leaq (%rax,%r14,8), %rsi
movq %rcx, (%rsi)
leaq (%rax,%rdx,8), %rsi
movq (%rsi), %rdx
cmpq %rcx, %rdx
jne 0x7300
cmpq %r14, %rdx
jne 0x735a
movl $0x6, %edx
movq 0xaca8(%rip), %rdi      # 0x11fc8
movq %r12, %rsi
callq 0x2240
movq 0xac99(%rip), %rcx      # 0x11fc8
movq (%rcx), %rax
movq -0x18(%rax), %rdi
addq %rcx, %rdi
movl $0xa, %esi
callq 0x2200
movsbl %al, %esi
movq 0xac7b(%rip), %rdi      # 0x11fc8
callq 0x2030
movq %rax, %rdi
callq 0x2180
incq %r14
cmpq 0x20(%rbx), %r14
jl 0x72df
movq %r15, %rdi
callq 0x21e0
movq 0x48(%rsp), %rdi
testq %rdi, %rdi
je 0x737e
callq 0x21e0
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0x738d
callq 0x21e0
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x73a0
jmp 0x73a0
movq %rax, %rbx
jmp 0x73b6
jmp 0x73ab
jmp 0x73ab
jmp 0x73ab
movq %rax, %rbx
movq %r15, %rdi
callq 0x21e0
leaq 0x30(%rsp), %rdi
callq 0x7d82
movq %rbx, %rdi
callq 0x2360