// PopAll pops and returns all elements of the heap in reverse order.
439751
func (h *Strings) PopAll() []string {
	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
}
1257498
func (p *parser) popGroup() error {
	p.concatenation = p.stack
	p.alternation = p.concatenation.next
	p.group = p.alternation.next
	p.stack = p.group.next

	// The first () inside a Testgroup group goes directly to the group
	if p.group.t == ntTestgroup && len(p.group.children) == 0 {
		if p.unit == nil {
			return p.getErr(ErrConditionalExpression)
		}

		p.group.addChild(p.unit)
		p.unit = nil
	}
	return 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
}
103037
func (l *List) Pop() (b Buffer) {
	b = (*l)[0]
	*l = (*l)[1:]
	return b
}
46553
func (h *Strings) Pop() string {
	if h.less == nil {
		PopToLastF(len(h.list), h.list.Less, h.list.Swap)
	} else {
		PopToLastF(len(h.list), h.less, h.list.Swap)
	}

	res := h.list[len(h.list)-1]
	h.list[len(h.list)-1] = "" // remove the reference in h.list
	h.list = h.list[:len(h.list)-1]

	return res
}
619749
func (h *Heap) Pop() (interface{}, error) {
	h.lock.Lock()
	defer h.lock.Unlock()
	for len(h.data.queue) == 0 {
		// When the queue is empty, invocation of Pop() is blocked until new item is enqueued.
		// When Close() is called, the h.closed is set and the condition is broadcast,
		// which causes this loop to continue and return from the Pop().
		if h.closed {
			return nil, fmt.Errorf("heap is closed")
		}
		h.cond.Wait()
	}
	obj := heap.Pop(h.data)
	if obj != nil {
		return obj, nil
	} else {
		return nil, fmt.Errorf("object was removed from heap data")
	}
}
758579
func (list *List) Pop() string {
	if list.length == 0 {
		return ""
	}
	if list.length == 1 {
		s := list.first.Content
		list.first = nil
		list.last = nil
		list.length--
		return s
	}
	s := list.last.Content
	var prev *ListItem
	tmp := list.first
	for i := 0; i < list.length; i++ {
		if i == list.length-2 {
			prev = tmp
			break
		} else {
			tmp = tmp.Next
		}
	}
	prev.Next = nil
	list.length--
	return s
}
389396
func (s *NodeStack) Pop() graph.Node {
	v := *s
	v, n := v[:len(v)-1], v[len(v)-1]
	*s = v
	return n
}
235984
func Pop(h Interface) interface{} {
	n := h.Len() - 1
	h.Swap(n, 0)
	shuffleDown(h, 0, n)
	return h.Pop()
}
57826
func (s *Stack) Pop() (interface{}, error) {
	s.l.Lock()
	defer s.l.Unlock()
	l := len(s.s)
	if l > 0 {
		item := s.s[l-1]
		s.s = s.s[:l-1]
		return item, nil
	}
	return nil, ErrEmptyStack{action: "Pop"}
}
443217
func (p *PendingEvaluations) Pop() interface{} {
	n := len(*p)
	e := (*p)[n-1]
	(*p)[n-1] = nil
	*p = (*p)[:n-1]
	return e
}
1177634
func (h *interfaces) Pop() interface{} {
	PopToLastF(len(h.list), h.less, func(i, j int) { h.list[i], h.list[j] = h.list[j], h.list[i] })

	res := h.list[len(h.list)-1]
	h.list[len(h.list)-1] = nil // remove the reference in h.list
	h.list = h.list[:len(h.list)-1]

	return res
}
363735
func (list *List) PushAll(slice []string) *List {
	for _, s := range slice {
		list.Push(s)
	}
	return list
}
1162269
func (h *Float64s) Pop() float64 {
	if h.less == nil {
		PopToLastF(len(h.list), h.list.Less, h.list.Swap)
	} else {
		PopToLastF(len(h.list), h.less, h.list.Swap)
	}

	res := h.list[len(h.list)-1]
	h.list = h.list[:len(h.list)-1]

	return res
}
743850
func (h *expiryHeap) Pop() interface{} {
	old := h.Entries
	n := len(old)
	x := old[n-1]
	h.Entries = old[0 : n-1]
	return x
}
111661
func (p *BlockPuller) popBlock(seq uint64) *common.Block {
	if len(p.blockBuff) == 0 {
		return nil
	}
	block, rest := p.blockBuff[0], p.blockBuff[1:]
	p.blockBuff = rest
	// If the requested block sequence is the wrong one, discard the buffer
	// to start fetching blocks all over again.
	if seq != block.Header.Number {
		p.blockBuff = nil
		return nil
	}
	return block
}
1075995
func (s Int32) PopAny() (int32, bool) {
	for key := range s {
		s.Delete(key)
		return key, true
	}
	var zeroValue int32
	return zeroValue, false
}