func (b *OpenBitSet) NextSetBit(index int64) int64 {
	assert(index >= 0)
	i := int(uint64(index) >> 6)
	if i >= b.wlen {
		return -1
	}
	subIndex := int(index & 0x3f)                       
	word := int64(uint64(b.bits[i]) >> uint(subIndex))  
	if word != 0 {
		return (int64(i) << 6) + int64(subIndex) + int64(NumberOfTrailingZeros(word))
	}
	for i++; i < b.wlen; i++ {
		word = b.bits[i]
		if word != 0 {
			return (int64(i) << 6) + int64(NumberOfTrailingZeros(word))
		}
	}
	return -1
}
L606
/*
Returns the index of the first set bit starting at the index specified.
- is returned if there are no more set bits.
package util
import (
	"bytes"
	"fmt"
)
type OpenBitSet struct {
	bits    []int64
	wlen    int    
	numBits int64  
}
func NewOpenBitSetOf(numBits int64) *OpenBitSet {
	assert(numBits > 0)
	bits := make([]int64, bits2words(numBits))
	return &OpenBitSet{
		numBits: numBits,
		bits:    bits,
		wlen:    len(bits),
	}
}
func NewOpenBitSet() *OpenBitSet {
	return NewOpenBitSetOf(64)
}
func (b *OpenBitSet) IsEmpty() bool {
	return b.Cardinality() == 0
}
func (b *OpenBitSet) Get(index int64) bool {
	i := int(index >> 6)  
	if i >= len(b.bits) {
		return false
	}
	bitmask := int64(1) << uint(index&0x3f)
	return (b.bits[i] & bitmask) != 0
}
func (b *OpenBitSet) Set(index int64) {
	wordNum := b.expandingWordNum(index)
	bitmask := int64(1) << uint64(index&0x3f)
	b.bits[wordNum] |= bitmask
}
func (b *OpenBitSet) expandingWordNum(index int64) int {
	wordNum := int(index >> 6)
	if wordNum >= b.wlen {
		b.ensureCapacity(index + 1)
	}
	return wordNum
}
func (b *OpenBitSet) Clear(index int64) {
	wordNum := int(index >> 6)  
	if wordNum >= b.wlen {
		return
	}
	bitmask := int64(1) << uint64(index)
	b.bits[wordNum] &= ^bitmask
}
func (b *OpenBitSet) Cardinality() int64 {
	return int64(pop_array(b.bits[:b.wlen]))
}