// GetASet2500 returns the value of ASet2500 if it is set or its
// zero value if it is unset.
337112
func (v *LargeDeltas) GetASet2500() (o map[string]struct{}) {
	if v != nil && v.ASet2500 != nil {
		return v.ASet2500
	}

	return
}
1131150
func (i *InteractionRestriction) GetExpiresAt() Timestamp {
	if i == nil || i.ExpiresAt == nil {
		return Timestamp{}
	}
	return *i.ExpiresAt
}
295791
func (sc *stateCheckpoint) GetDefaultCPUSet() cpuset.CPUSet {
	sc.mux.RLock()
	defer sc.mux.RUnlock()

	return sc.cache.GetDefaultCPUSet()
}
30337
func (a *Attribute) getInt() int64 {
	if a.Int == nil {
		return 0
	}

	i := *a.Int

	// Get the unit
	u := a.getTypedUnit()

	// If there is no unit just return the int
	if u == nil {
		return i
	}

	if u.InverseMultiplier {
		i /= u.Multiplier
	} else {
		i *= u.Multiplier
	}

	return i
}
673610
func (v *LargeDeltas) GetVertwo3000() (o *VersioningTestV2) {
	if v != nil && v.Vertwo3000 != nil {
		return v.Vertwo3000
	}

	return
}
330062
func (ns *Namespace) getRemote(cache *filecache.Cache, unmarshal func([]byte) (bool, error), req *http.Request) error {
	url := req.URL.String()
	id := helpers.MD5String(url)
	var handled bool
	var retry bool

	_, b, err := cache.GetOrCreateBytes(id, func() ([]byte, error) {
		var err error
		handled = true
		for i := 0; i <= resRetries; i++ {
			ns.deps.Log.INFO.Printf("Downloading: %s ...", url)
			var res *http.Response
			res, err = ns.client.Do(req)
			if err != nil {
				return nil, err
			}

			if isHTTPError(res) {
				return nil, errors.Errorf("Failed to retrieve remote file: %s", http.StatusText(res.StatusCode))
			}

			var b []byte
			b, err = ioutil.ReadAll(res.Body)

			if err != nil {
				return nil, err
			}
			res.Body.Close()

			retry, err = unmarshal(b)

			if err == nil {
				// Return it so it can be cached.
				return b, nil
			}

			if !retry {
				return nil, err
			}

			ns.deps.Log.INFO.Printf("Cannot read remote resource %s: %s", url, err)
			ns.deps.Log.INFO.Printf("Retry #%d for %s and sleeping for %s", i+1, url, resSleep)
			time.Sleep(resSleep)
		}

		return nil, err

	})

	if !handled {
		// This is cached content and should be correct.
		_, err = unmarshal(b)
	}

	return err
}
1288229
func GetFSTOutput(fst *FST, input []byte) (output interface{}, err error) {
	if fst.inputType != INPUT_TYPE_BYTE1 {
		panic("assert fail")
	}
	fstReader := fst.BytesReader()
	// TODO: would be nice not to alloc this on every lookup
	arc := fst.FirstArc(&Arc{})

	// Accumulate output as we go
	output = fst.outputs.NoOutput()
	for _, v := range input {
		ret, err := fst.FindTargetArc(int(v), arc, arc, fstReader)
		if ret == nil || err != nil {
			return ret, err
		}
		output = fst.outputs.Add(output, arc.Output)
	}

	if arc.IsFinal() {
		return fst.outputs.Add(output, arc.NextFinalOutput), nil
	} else {
		return nil, nil
	}
}
1064427
func (client *TPMClient) GetEKCert() (ekcert []byte, err error) {
	var ekcertData EkcertResponse

	ekresp, err := client.get(GetEKCertURL)
	if err != nil {
		return nil, fmt.Errorf("Can't obtain ekcert: %s", err)
	}
	defer ekresp.Body.Close()
	body, err := ioutil.ReadAll(ekresp.Body)
	if err != nil {
		return nil, fmt.Errorf("Can't read ekcert response: %s", err)
	}

	err = json.Unmarshal(body, &ekcertData)
	if err != nil {
		return nil, fmt.Errorf("Can't parse ekcert response: %s", err)
	}

	return ekcertData.EKCert, nil
}
597393
func (r *RepositoryRelease) GetPublishedAt() Timestamp {
	if r == nil || r.PublishedAt == nil {
		return Timestamp{}
	}
	return *r.PublishedAt
}
905565
func (a *AuthServer) GetCertAuthority(id services.CertAuthID, loadSigningKeys bool, opts ...services.MarshalOption) (services.CertAuthority, error) {
	return a.GetCache().GetCertAuthority(id, loadSigningKeys, opts...)
}
1017078
func (r *Store) GetUint(key string) (uint, error) {
	v, ok := r.GetEntry(key)
	if !ok {
		return 0, errFindParse.Format("uint", key)
	}
	return v.UintDefault(0)
}
972042
func (m *HashMap) GetOrInsert(key interface{}, value interface{}) (actual interface{}, loaded bool) {
	h := getKeyHash(key)
	var newelement *ListElement

	for {
		data, element := m.indexElement(h)
		if data == nil {
			m.allocate(DefaultSize)
			continue
		}

		for element != nil {
			if element.keyHash == h {
				switch key.(type) {
				case []byte:
					if bytes.Compare(element.key.([]byte), key.([]byte)) == 0 {
						return element.Value(), true
					}
				default:
					if element.key == key {
						actual = element.Value()
						return actual, true
					}
				}
			}

			if element.keyHash > h {
				break
			}

			element = element.Next()
		}

		if newelement == nil { // allocate only once
			newelement = &ListElement{
				key:     key,
				keyHash: h,
				value:   unsafe.Pointer(&value),
			}
		}

		if m.insertListElement(newelement, false) {
			return value, false
		}
	}
}
678293
func (self *CertificateStoreCtx) GetCurrentCert() *Certificate {
	x509 := C.X509_STORE_CTX_get_current_cert(self.ctx)
	if x509 == nil {
		return nil
	}
	// add a ref
	if 1 != C.X_X509_add_ref(x509) {
		return nil
	}
	cert := &Certificate{
		x: x509,
	}
	runtime.SetFinalizer(cert, func(cert *Certificate) {
		C.X509_free(cert.x)
	})
	return cert
}
1104802
func (c *Contract) GetByte(n uint64) byte {
	if n < uint64(len(c.Code)) {
		return c.Code[n]
	}

	return 0
}
598527
func (ec *EthereumClient) GetNonceAt(ctx *Context, account *Address, number int64) (nonce int64, _ error) {
	if number < 0 {
		rawNonce, err := ec.client.NonceAt(ctx.context, account.address, nil)
		return int64(rawNonce), err
	}
	rawNonce, err := ec.client.NonceAt(ctx.context, account.address, big.NewInt(number))
	return int64(rawNonce), err
}
132420
func (v *LargeDeltas) GetB1() (o *Bools) {
	if v != nil && v.B1 != nil {
		return v.B1
	}

	return
}
1279591
func getBase() (base int64) {
	base = bcm2835Base
	ranges, err := os.Open("/proc/device-tree/soc/ranges")
	defer ranges.Close()
	if err != nil {
		return
	}
	b := make([]byte, 4)
	n, err := ranges.ReadAt(b, 4)
	if n != 4 || err != nil {
		return
	}
	buf := bytes.NewReader(b)
	var out uint32
	err = binary.Read(buf, binary.BigEndian, &out)
	if err != nil {
		return
	}
	return int64(out)
}