code: func parseCPU(b []byte) (*Profile, error) {
  	var parse func([]byte) (uint64, []byte)
  	var n1, n2, n3, n4, n5 uint64
  	for _, parse = range cpuInts {
  		var tmp []byte
  		n1, tmp = parse(b)
  		n2, tmp = parse(tmp)
  		n3, tmp = parse(tmp)
  		n4, tmp = parse(tmp)
  		n5, tmp = parse(tmp)
  
  		if tmp != nil && n1 == 0 && n2 == 3 && n3 == 0 && n4 > 0 && n5 == 0 {
  			b = tmp
  			return cpuProfile(b, int64(n4), parse)
  		}
  		if tmp != nil && n1 == 0 && n2 == 3 && n3 == 1 && n4 > 0 && n5 == 0 {
  			b = tmp
  			return javaCPUProfile(b, int64(n4), parse)
  		}
  	}
  	return nil, errUnrecognized
  }
docs: // parseCPU parses a profilez legacy profile and returns a newly
  // populated Profile.
  //
  // The general format for profilez samples is a sequence of words in
  // binary format. The first words are a header with the following data:
  //   1st word -- 0
  //   2nd word -- 3
  //   3rd word -- 0 if a c++ application, 1 if a java application.
  //   4th word -- Sampling period (in microseconds).
  //   5th word -- Padding.