code: func gcas(in *iNode, old, n *mainNode, ct *Ctrie) bool {
  	prevPtr := (*unsafe.Pointer)(unsafe.Pointer(&n.prev))
  	atomic.StorePointer(prevPtr, unsafe.Pointer(old))
  	if atomic.CompareAndSwapPointer(
  		(*unsafe.Pointer)(unsafe.Pointer(&in.main)),
  		unsafe.Pointer(old), unsafe.Pointer(n)) {
  		gcasComplete(in, n, ct)
  		return atomic.LoadPointer(prevPtr) == nil
  	}
  	return false
  }
docs: // gcas is a generation-compare-and-swap which has semantics similar to RDCSS,
  // but it does not create the intermediate object except in the case of
  // failures that occur due to the snapshot being taken. This ensures that the
  // write occurs only if the Ctrie root generation has remained the same in
  // addition to the I-node having the expected value.