// Copyright 2022 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

package cpu

import 

// parseRelease parses a dot-separated version number from the prefix
// of rel. It returns ok=true only if at least the major and minor
// components were successfully parsed; the patch component is
// best-effort. Trailing vendor or build suffixes such as
// "-generic", "+", "_hi3535", or "-rc1" are ignored.
//
// This is a copy of the Go runtime's parseRelease from
// https://golang.org/cl/209597, updated in https://golang.org/cl/781800.
func ( string) (, ,  int,  bool) {
	// next consumes a run of decimal digits from the front of rel,
	// returning the parsed value. If the digits are followed by a
	// '.', it is consumed and more is set so the caller knows to
	// parse another component; otherwise scanning terminates and
	// the rest of rel is discarded.
	 := func() ( int, ,  bool) {
		 := 0
		for  < len() && [] >= '0' && [] <= '9' {
			++
		}
		if  == 0 {
			return 0, false, false
		}
		,  := strconv.Atoi([:])
		if  != nil {
			return 0, false, false
		}
		if  < len() && [] == '.' {
			 = [+1:]
			return , true, true
		}
		 = ""
		return , false, true
	}

	var  bool
	if , ,  = (); ! || ! {
		return 0, 0, 0, false
	}
	if , ,  = (); ! {
		return 0, 0, 0, false
	}
	if ! {
		return , , 0, true
	}
	, _, _ = ()
	return , , , true
}