func (s *Int64Set) findNodeAdd(value int64, preds *[maxLevel]*int64Node, succs *[maxLevel]*int64Node) int {
	x := s.header
	for i := int(atomic.LoadInt64(&s.highestLevel)) - 1; i >= 0; i-- {
		succ := x.atomicLoadNext(i)
		for succ != nil && succ.lessthan(value) {
			x = succ
			succ = x.atomicLoadNext(i)
		}
		preds[i] = x
		succs[i] = succ
		if succ != nil && succ.equal(value) {
			return i
		}
	}
	return -1
}
findNodeAdd takes a value and two maximal-height arrays then searches exactly as in a sequential skip-set.
The returned preds and succs always satisfy preds[i] > value >= succs[i].
package skipset
import (
	"sync"
	"sync/atomic"
	"unsafe"
)
type Int64Set struct {
	header       *int64Node
	length       int64
	highestLevel int64  
}
type int64Node struct {
	value int64
	next  optionalArray  
	mu    sync.Mutex
	flags bitflag
	level uint32
}
func newInt64Node(value int64, level int) *int64Node {
	node := &int64Node{
		value: value,
		level: uint32(level),
	}
	if level > op1 {
		node.next.extra = new([op2]unsafe.Pointer)
	}
	return node
}
func (n *int64Node) loadNext(i int) *int64Node {
	return (*int64Node)(n.next.load(i))
}
func (n *int64Node) storeNext(i int, node *int64Node) {
	n.next.store(i, unsafe.Pointer(node))
}
func (n *int64Node) atomicLoadNext(i int) *int64Node {
	return (*int64Node)(n.next.atomicLoad(i))
}
func (n *int64Node) atomicStoreNext(i int, node *int64Node) {
	n.next.atomicStore(i, unsafe.Pointer(node))
}
func (n *int64Node) lessthan(value int64) bool {
	return n.value < value
}
func (n *int64Node) equal(value int64) bool {
	return n.value == value
}
func NewInt64() *Int64Set {
	h := newInt64Node(0, maxLevel)
	h.flags.SetTrue(fullyLinked)
	return &Int64Set{
		header:       h,
		highestLevel: defaultHighestLevel,
	}
}
func (s *Int64Set) findNodeRemove(value int64, preds *[maxLevel]*int64Node, succs *[maxLevel]*int64Node) int {
	lFound, x := -1, s.header
	for i := int(atomic.LoadInt64(&s.highestLevel)) - 1; i >= 0; i-- {
		succ := x.atomicLoadNext(i)
		for succ != nil && succ.lessthan(value) {
			x = succ
			succ = x.atomicLoadNext(i)
		}
		preds[i] = x
		succs[i] = succ
		if lFound == -1 && succ != nil && succ.equal(value) {
			lFound = i
		}
	}
	return lFound
}