// File: Ripser[P]ripser/ripser.cpp
// Function: ripser<sparse_distance_matrix>::simplex_coboundary_enumerator::has_next(bool)
bool has_next(bool all_cofacets = true) {
		for (auto &it0 = neighbor_it[0], &end0 = neighbor_end[0]; it0 != end0; ++it0) {
			neighbor = *it0;
			for (size_t idx = 1; idx < neighbor_it.size(); ++idx) {
				auto &it = neighbor_it[idx], end = neighbor_end[idx];
				while (get_index(*it) > get_index(neighbor))
					if (++it == end) return false;
				if (get_index(*it) != get_index(neighbor))
					goto continue_outer;
				else
					neighbor = std::max(neighbor, *it);
			}
			while (k > 0 && vertices[k - 1] > get_index(neighbor)) {
				if (!all_cofacets) return false;
				idx_below -= binomial_coeff(vertices[k - 1], k);
				idx_above += binomial_coeff(vertices[k - 1], k + 1);
				--k;
			}
			return true;
		continue_outer:;
		}
		return false;
	}

// Assembly:
subq $0x88, %rsp
movb %sil, %al
movq %rdi, 0x78(%rsp)
andb $0x1, %al
movb %al, 0x77(%rsp)
movq 0x78(%rsp), %rdi
movq %rdi, 0x40(%rsp)
addq $0x58, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x16660
movq 0x40(%rsp), %rdi
movq %rax, 0x68(%rsp)
addq $0x70, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x16660
movq %rax, 0x60(%rsp)
movq 0x68(%rsp), %rdi
movq 0x60(%rsp), %rsi
callq 0x17640
testb $0x1, %al
jne 0x15da0
jmp 0x1604c
movq 0x68(%rsp), %rdi
callq 0x17670
movq 0x40(%rsp), %rdi
movq %rax, %rsi
addq $0x88, %rdi
callq 0x176a0
movq $0x1, 0x58(%rsp)
movq 0x40(%rsp), %rdi
movq 0x58(%rsp), %rax
movq %rax, 0x38(%rsp)
addq $0x58, %rdi
callq 0x16c60
movq %rax, %rcx
movq 0x38(%rsp), %rax
cmpq %rcx, %rax
jae 0x15f13
movq 0x40(%rsp), %rdi
addq $0x58, %rdi
movq 0x58(%rsp), %rsi
callq 0x16660
movq 0x40(%rsp), %rdi
movq %rax, 0x50(%rsp)
addq $0x70, %rdi
movq 0x58(%rsp), %rsi
callq 0x16660
movq %rax, %rsi
leaq 0x48(%rsp), %rdi
callq 0x17600
movq 0x50(%rsp), %rdi
callq 0x17670
movq %rax, %rdi
callq 0x2a30
movq 0x40(%rsp), %rdi
movq %rax, 0x30(%rsp)
addq $0x88, %rdi
callq 0x2a30
movq %rax, %rcx
movq 0x30(%rsp), %rax
cmpq %rcx, %rax
jle 0x15e89
movq 0x50(%rsp), %rdi
callq 0x17720
movq %rax, %rdi
leaq 0x48(%rsp), %rsi
callq 0x176d0
testb $0x1, %al
jne 0x15e7a
jmp 0x15e87
movb $0x0, 0x87(%rsp)
jmp 0x16054
jmp 0x15e28
movq 0x50(%rsp), %rdi
callq 0x17670
movq %rax, %rdi
callq 0x2a30
movq 0x40(%rsp), %rdi
movq %rax, 0x28(%rsp)
addq $0x88, %rdi
callq 0x2a30
movq %rax, %rcx
movq 0x28(%rsp), %rax
cmpq %rcx, %rax
je 0x15ec3
jmp 0x1603b
movq 0x40(%rsp), %rax
addq $0x88, %rax
movq %rax, 0x20(%rsp)
movq 0x50(%rsp), %rdi
callq 0x17670
movq 0x20(%rsp), %rdi
movq %rax, %rsi
callq 0x17750
movq 0x40(%rsp), %rdi
movq %rax, %rsi
addq $0x88, %rdi
callq 0x176a0
jmp 0x15f00
movq 0x58(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x58(%rsp)
jmp 0x15dc7
jmp 0x15f15
movq 0x40(%rsp), %rcx
xorl %eax, %eax
cmpq $0x0, 0x10(%rcx)
movb %al, 0x1f(%rsp)
jle 0x15f6b
movq 0x40(%rsp), %rax
movq %rax, %rdi
addq $0x18, %rdi
movq 0x10(%rax), %rsi
subq $0x1, %rsi
callq 0x5ee0
movq 0x40(%rsp), %rdi
movq (%rax), %rax
movq %rax, 0x10(%rsp)
addq $0x88, %rdi
callq 0x2a30
movq %rax, %rcx
movq 0x10(%rsp), %rax
cmpq %rcx, %rax
setg %al
movb %al, 0x1f(%rsp)
movb 0x1f(%rsp), %al
testb $0x1, %al
jne 0x15f78
jmp 0x16031
testb $0x1, 0x77(%rsp)
jne 0x15f8c
movb $0x0, 0x87(%rsp)
jmp 0x16054
movq 0x40(%rsp), %rax
movq 0x50(%rax), %rcx
movq %rcx, (%rsp)
movq %rax, %rdi
addq $0x18, %rdi
movq 0x10(%rax), %rsi
subq $0x1, %rsi
callq 0x5ee0
movq (%rsp), %rdi
movq %rax, %rcx
movq 0x40(%rsp), %rax
movq (%rcx), %rsi
movq 0x10(%rax), %rdx
callq 0x5d20
movq %rax, %rdx
movq 0x40(%rsp), %rax
movq (%rax), %rcx
subq %rdx, %rcx
movq %rcx, (%rax)
movq 0x50(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq %rax, %rdi
addq $0x18, %rdi
movq 0x10(%rax), %rsi
subq $0x1, %rsi
callq 0x5ee0
movq 0x8(%rsp), %rdi
movq %rax, %rcx
movq 0x40(%rsp), %rax
movq (%rcx), %rsi
movq 0x10(%rax), %rdx
addq $0x1, %rdx
callq 0x5d20
movq %rax, %rcx
movq 0x40(%rsp), %rax
addq 0x8(%rax), %rcx
movq %rcx, 0x8(%rax)
movq 0x10(%rax), %rcx
addq $-0x1, %rcx
movq %rcx, 0x10(%rax)
jmp 0x15f15
movb $0x1, 0x87(%rsp)
jmp 0x16054
jmp 0x1603d
movq 0x68(%rsp), %rdi
callq 0x17720
jmp 0x15d88
movb $0x0, 0x87(%rsp)
movb 0x87(%rsp), %al
andb $0x1, %al
addq $0x88, %rsp
retq
nopw %cs:(%rax,%rax)
nop