// popBlockParams pops last block params from stack
974419
func (v *evalVisitor) popBlockParams() map[string]interface{} {
	var result map[string]interface{}

	if len(v.blockParams) == 0 {
		return result
	}

	result, v.blockParams = v.blockParams[len(v.blockParams)-1], v.blockParams[:len(v.blockParams)-1]
	return result
}
521497
func MsgOptionBlocks(blocks ...Block) MsgOption {
	return func(config *sendConfig) error {
		if blocks == nil {
			return nil
		}

		blocks, err := json.Marshal(blocks)
		if err == nil {
			config.values.Set("blocks", string(blocks))
		}
		return err
	}
}
1243336
func (s *stack) Pop() (interface{}, error) {
	lv := len(s.values)
	if lv == 0 {
		return nil, errors.New(ErrEmpty, errorMessages)
	}
	v := s.values[lv-1]
	s.values = s.values[:lv-1]
	return v, nil
}
637227
func (h *interfaces) PopAll() []interface{} {
	for n := h.Len(); n > 1; n-- {
		PopToLastF(n, h.less, func(i, j int) { h.list[i], h.list[j] = h.list[j], h.list[i] })
	}
	res := h.list
	h.list = nil
	return res
}
89138
func (pool *BlockPool) PopRequest() {
	pool.mtx.Lock()
	defer pool.mtx.Unlock()

	if r := pool.requesters[pool.height]; r != nil {
		/*  The block can disappear at any time, due to removePeer().
		if r := pool.requesters[pool.height]; r == nil || r.block == nil {
			PanicSanity("PopRequest() requires a valid block")
		}
		*/
		r.Stop()
		delete(pool.requesters, pool.height)
		pool.height++
	} else {
		panic(fmt.Sprintf("Expected requester to pop, got nothing at height %v", pool.height))
	}
}
97212
func dict_pop(fnname string, recv_ Value, args Tuple, kwargs []Tuple) (Value, error) {
	recv := recv_.(*Dict)
	var k, d Value
	if err := UnpackPositionalArgs(fnname, args, kwargs, 1, &k, &d); err != nil {
		return nil, err
	}
	if v, found, err := recv.Delete(k); err != nil {
		return nil, err // dict is frozen or key is unhashable
	} else if found {
		return v, nil
	} else if d != nil {
		return d, nil
	}
	return nil, fmt.Errorf("pop: missing key")
}
1348191
func (self *Collection) PopRaw() Model {
	if self.coll.Demand() == nil || len(self.coll.Demand().(EqList)) == 0 {
		panic("can't pop from a empty ListNode!")
	}

	obj := self.coll.Demand().(EqList)
	self.coll.markDirty()

	result := obj[len(obj)-1]
	if len(obj) == 1 {
		self.coll.SetEqualer(nil)
	} else {
		self.coll.SetEqualer(obj[:len(obj)-1])
	}
	if self.join != nil {
		for _, j := range self.join {
			j.Remove(len(obj)-1, result)
		}
	}

	return result
}
702906
func (h *Float64s) PopAll() []float64 {
	for n := h.Len(); n > 1; n-- {
		if h.less == nil {
			PopToLastF(n, h.list.Less, h.list.Swap)
		} else {
			PopToLastF(n, h.less, h.list.Swap)
		}
	}
	res := h.list
	h.list = nil
	return res
}
768844
func (b *XMLBase) pop() string {
	url := b.stack.pop()
	if url != nil {
		return url.String()
	}
	return ""
}
510772
func Pop(n int) MutatorFunc {
	return func(state *LexerState) error {
		if len(state.Stack) == 0 {
			return fmt.Errorf("nothing to pop")
		}
		state.Stack = state.Stack[:len(state.Stack)-n]
		return nil
	}
}
95539
func (ms *MatStack) Pop() error {
	if len(*ms) == 1 {
		return errors.New("Cannot pop from mat stack, at minimum stack length of 1")
	}
	(*ms) = (*ms)[:len(*ms)-1]

	return nil
}
1098900
func (v *evalVisitor) blockParam(name string) interface{} {
	for i := len(v.blockParams) - 1; i >= 0; i-- {
		for k, v := range v.blockParams[i] {
			if name == k {
				return v
			}
		}
	}

	return nil
}
590206
func (ms *TransformStack) Pop() (mgl64.Mat4, error) {
	if len(*ms) == 1 {
		return mgl64.Mat4{}, errors.New("attempt to pop last element of the stack; Matrix Stack must have at least one element")
	}

	retVal := (*ms)[len(*ms)-1]

	(*ms) = (*ms)[:len(*ms)-1]

	return retVal, nil
}
95533
func (nr *nameResolver) popJoin() {
	ctx := nr.currentContext()
	ctx.joinNodeStack = ctx.joinNodeStack[:len(ctx.joinNodeStack)-1]
}
425456
func (md *RootMetadata) ClearBlockChanges() {
	md.SetRefBytes(0)
	md.SetUnrefBytes(0)
	md.SetMDRefBytes(0)
	md.data.Changes.sizeEstimate = 0
	md.data.Changes.Info = data.BlockInfo{}
	md.data.Changes.Ops = nil
}
739106
func (pgb *ChainDB) BlockFlags(hash string) (bool, bool, error) {
	ctx, cancel := context.WithTimeout(pgb.ctx, pgb.queryTimeout)
	defer cancel()
	return pgb.blockFlags(ctx, hash)
}
88540
func (s *ListStack) Pop() (interface{}, error) {
	if s.IsEmpty() {
		return nil, errors.New("unable to pop element, stack is empty")
	}
	item := s.first.item
	s.first = s.first.next
	s.size--
	return item, nil
}