func (q *IntQueue) Pop() int {
	if q.Len() <= 0 {
		panic("queue: empty queue")
	}
	v := q.buf[q.head]
	q.buf[q.head] = nilint
	q.head = (q.head + 1) % len(q.buf)
	q.count--
	if len(q.buf) > q.minlen && q.count*4 <= len(q.buf) {
		q.resize()
	}
	return v
}
Pop removes the element from the front of the queue.
This call panics if the queue is empty.
package codegen
var nilint int
type IntQueue struct {
	buf               []int
	head, tail, count int
	minlen            int
}
func NewIntQueue(capacity int) *IntQueue {
	if capacity < 16 {
		capacity = 16
	}
	return &IntQueue{buf: make([]int, capacity), minlen: capacity}
}
func (q *IntQueue) Len() int {
	return q.count
}
func (q *IntQueue) Push(elem int) {
	if q.count == len(q.buf) {
		q.resize()
	}
	q.buf[q.tail] = elem
	q.tail = (q.tail + 1) % len(q.buf)
	q.count++
}
func (q *IntQueue) Peek() int {
	if q.Len() <= 0 {
		panic("queue: empty queue")
	}
	return q.buf[q.head]
}
func (q *IntQueue) Get(i int) int {
	if i >= q.Len() || i < 0 {
		panic("queue: index out of range")
	}
	modi := (q.head + i) % len(q.buf)
	return q.buf[modi]
}