// Tiocoutq return the number of bytes in the output buffer.
970529
func Tiocoutq(fd uintptr, argp *int) error {
	return ioctl(fd, syscall.TIOCOUTQ, uintptr(unsafe.Pointer(argp)))
}
196010
func packRQ(p []byte, op uint16, filename, mode string, opts options) int {
	binary.BigEndian.PutUint16(p, op)
	n := 2
	n += copy(p[2:len(p)-10], filename)
	p[n] = 0
	n++
	n += copy(p[n:], mode)
	p[n] = 0
	n++
	for name, value := range opts {
		n += copy(p[n:], name)
		p[n] = 0
		n++
		n += copy(p[n:], value)
		p[n] = 0
		n++
	}
	return n
}
33425
func (u *Ugen) Trunc(val Input) Input {
	return binOpTrunc(u.Rate, u, val, u.NumOutputs)
}
909481
func (s *CountService) Q(q string) *CountService {
	s.q = q
	return s
}
1082277
func allocBuffer(orig, cur string) *bytes.Buffer {
	output := &bytes.Buffer{}
	maxSize := len(orig) * 4

	// Avoid to reserve too much memory at once.
	if maxSize > bufferMaxInitGrowSize {
		maxSize = bufferMaxInitGrowSize
	}

	output.Grow(maxSize)
	output.WriteString(orig[:len(orig)-len(cur)])
	return output
}
623747
func (u *Ugen) Sumsqr(val Input) Input {
	return binOpSumsqr(u.Rate, u, val, u.NumOutputs)
}
52488
func NewSeq(s []byte) Seq {
	return Seq{
		Length: len(s),
		Seq:    contract(s),
	}
}
229076
func ErrPUNotUnique(puID string, err error) error {
	return &Error{
		puID:   puID,
		reason: PUNotUnique,
		err:    err,
	}
}
680013
func (b *Builder) ToOutsideQuery(t tap.Message_Type) (*tap.Message, error) {
	return &tap.Message{
		Type:            &t,
		SocketFamily:    &b.SocketFam,
		SocketProtocol:  &b.SocketProto,
		QueryTimeSec:    &b.TimeSec,
		QueryTimeNsec:   &b.TimeNsec,
		QueryMessage:    b.Packed,
		ResponseAddress: b.Address,
		ResponsePort:    &b.Port,
	}, b.err
}
499266
func makeReq(url string) ([]byte, error) {
  response, err := http.Get(url)
  if err != nil {
    fmt.Printf("%s", err)
    return nil, Error(fmt.Sprintf("%s", err))
  } else {
    defer response.Body.Close()
    contents, err := ioutil.ReadAll(response.Body)
    if err != nil {
      fmt.Printf("%s", err)
      return nil, Error(fmt.Sprintf("%s", err))
    }
    // fmt.Printf("%s\n", string(contents))
    return contents, nil
  }
}
1368754
func (a *Assertions) JSONEq(expected string, actual string, msgAndArgs ...interface{}) {
	if h, ok := a.t.(tHelper); ok {
		h.Helper()
	}
	JSONEq(a.t, expected, actual, msgAndArgs...)
}
978591
func (stmt *OCI8Stmt) NumInput() int {
	var bindCount C.ub4 // number of bind position
	_, err := stmt.ociAttrGet(unsafe.Pointer(&bindCount), C.OCI_ATTR_BIND_COUNT)
	if err != nil {
		return -1
	}

	return int(bindCount)
}
670750
func (u Vec) Eq(v Vec) bool {
	return nearlyEqual(u.X, v.X) && nearlyEqual(u.Y, v.Y)
}
1171268
func LineCount(screenWidth, w int) int {
	r := w / screenWidth
	if w%screenWidth != 0 {
		r++
	}
	return r
}
301569
func tiosToUnix(st *syscall.Termios) *unix.Termios {
	return &unix.Termios{
		Iflag:  st.Iflag,
		Oflag:  st.Oflag,
		Cflag:  st.Cflag,
		Lflag:  st.Lflag,
		Cc:     st.Cc,
	}
}
265739
func GtOrEqLit(column, literal string) Cmp {
	return Cmp{
		op:     geq,
		column: column,
		value:  lit(literal),
	}
}
1054987
func SumOutputValues(outputs []*wire.TxOut) (totalOutput btcutil.Amount) {
	for _, txOut := range outputs {
		totalOutput += btcutil.Amount(txOut.Value)
	}
	return totalOutput
}