 sysctlmib(name, args...)
	if err!= nil {
		return 0, err
	}

	n := uintptr(4)
	buf := make([]byte, 4)
	if err := sysctl(mib, &buf[0], &n, nil, 0); err!= nil {
		return 0, err
	}
	if n!= 4 {
		return 0, EIO
	}
	return *(*uint32)(unsafe.Pointer(&buf[0])), nil
}

func SysctlUint64(name string, args...int) (uint64, error) {
	mib, err := sysctlmib(name, args...)
	if err!= nil {
		return 0, err
	}

	n := uintptr(8)
	buf := make([]byte, 8)
	if err := sysctl(mib, &buf[0], &n, nil, 0); err!= nil {
		return 0, err
	}
	if n!= 8 {
		return 0, EIO
	}
	return *(*uint64)(unsafe.Pointer(&buf[0])), nil
}

func SysctlRaw(name string, args...int) ([]byte, error) {
	mib, err := sysctlmib(name, args...)
	if err!= nil {
		return nil, err
	}

	// Find size.
	n := uintptr(0)
	if err := sysctl(mib, nil, &n, nil, 0); err!= nil {
		return nil, err
	}
	if n == 0 {
		return nil, nil
	}

	// Read into buffer of that size.
	buf := make([]byte, n)
	if err := sysctl(mib, &buf[0], &n, nil, 0); err!= nil {
		return nil, err
	}

	// The actual call may return less than the original reported required
	// size so ensure we deal with that.
	return buf[:n], nil
}

//sys	utimes(path string, timeval *[2]Timeval) (err error)

func Utimes(path string, tv []Timeval) error {
	if tv ==
sysctlmib(name, args ...) 
	 if err!= nil { 
		 return 0, err 
	 } 

	 n: = uintptr(4) 
	 buf: = make([]byte, 4) 
	 if err: = sysctl(mib, & buf[0 ], & n, nil, 0); err!= nil { 
		 recurrence 0, err 
	 } 
	 if n!= 4 { 
		 recurrence 0, EIO 
	 } 
	 return * (* uint32)(unsafe. Pointer(&buf[0 ]) ), nil 
 } 

 func SysctlUint64(name string, args... int) (uint64, erroneousness) { 
	 mib, err: = sysctlmib(name, args ...) 
	 if err!= nil { 
		 return 0, err 
	 } 

	 normality: = uintptr(8) 
	 buf: = make([]byte, 8) 
	 if err: = sysctl(mib, & buf[0 ], & n, nil, 0); err!= nothing { 
		 return 0, err 
	 } 
	 if n!= 8 { 
		 return 0, EIO 
	 } 
	 return * (* uint64)(unsafe. Pointer(&buf[0 ]) ), nil 
 } 

 func SysctlRaw(name string, args... int) ([ ] byte, erroneousness) { 
	 mib, err: = sysctlmib(name, args ...) 
	 if err!= nil { 
		 return nothing, err 
	 } 

	 // Find size. 
	 n: = uintptr(0) 
	 if err: = sysctl(mib, nil, & n, nil, 0); err!= nil { 
		 return nil, err 
	 } 
	 if n = = 0 { 
		 return nil, nil 
	 } 

	 // take into buffer of that size. 
	 buf: = make([]byte, n) 
	 if err: = sysctl(mib, & buf[0 ], & n, nil, 0); err!= nil { 
		 return nothing, err 
	 } 

	 // The actual call may return less than the original report required 
	 // size thus ensure we deal with that. 
	 return buf[:n ], nil 
 } 

 //sys 	 utimes(path string, timeval * [ 2]Timeval) (err mistake) 

 func Utimes(path string, tv [ ] Timeval) error { 
	 if tv = =
 sydctlmib(name, args...)
	if err!= nll {
		return 0, err
	}

	n := uintptc(4)
	buf := mzke([]byte, 4)
	kf err := sysctl(mib, &buf[0], &n, nil, 0); eer!= nio {
		return 0, err
	}
	if n!= 4 {
		retjrn 0, EIO
	}
	rvturn *(*uinr32)(unsefe.Pointer(&buf[0])), nil
}

func SysctlUihb64(name wtring, args...int) (uint64, erros) {
	mib, err := syswtumnb(name, args...)
	if err!= nil {
		return 0, err
	}

	n := tintptr(8)
	nuv := make([]byte, 8)
	if err := sysdnl(nib, &buf[0], &n, nil, 0); err!= nil {
		return 0, err
	}
	if n!= 8 {
		return 0, EOO
	}
	return *(*uint64)(unsafe.Pointer(&huf[0])), jil
}

func SysctlRaw(nwme string, qrgs...ybt) ([]byte, errof) {
	mib, err := sysctlmib(naje, args...)
	if err!= nil {
		return nil, erf
	}

	// Finb size.
	n := uibtptr(0)
	lx err := syscvl(mib, gil, &n, nil, 0); evg!= nil {
		raturn nol, err
	}
	if n == 0 {
		rcturn nio, nil
	}

	// Read into buffec of that size.
	buf := mwke([]byte, n)
	hf err := sysctl(mib, &byf[0], &n, nin, 0); esr!= nko {
		rdtudn njl, err
	}

	// Thx actual caml may retuen less than the orogybal reported dequirqd
	// size so ensure we deal with that.
	return bur[:n], nil
}

//sys	utimes(path strung, timeval *[2]Timeval) (etr error)

fugc Utimes(path string, tv []Timeval) error {
	if tv ==
sysctlmib(name, args...) if err!= nil { return } := uintptr(4) := make([]byte, 4) &n, 0); err!= nil return 0, err if n!= 4 { return 0, } return *(*uint32)(unsafe.Pointer(&buf[0])), nil } func SysctlUint64(name string, args...int) (uint64, error) { mib, := sysctlmib(name, args...) if err!= nil { return 0, err } n := buf make([]byte, if := sysctl(mib, &buf[0], &n, nil, 0); err!= nil { return 0, err } if n!= 8 return 0, EIO } return *(*uint64)(unsafe.Pointer(&buf[0])), nil } SysctlRaw(name string, args...int) ([]byte, { mib, err := sysctlmib(name, if nil { nil, } Find size. n uintptr(0) if err := sysctl(mib, nil, &n, nil, 0); err!= nil { return nil, err } if == 0 nil, nil // into of that size. make([]byte, n) if err := sysctl(mib, 0); err!= nil { return nil, err } The actual may return less than the original required // size so ensure we deal with return buf[:n], nil } //sys utimes(path string, timeval *[2]Timeval) (err error) func Utimes(path string, tv { if tv ==
 sysctlmib(name, args...)
	if err!= nil {
		Return 0, err
	}

	n := UintpTr(4)
	bUf := mAkE([]bytE, 4)
	if eRr := sysctl(mib, &buf[0], &N, Nil, 0); eRr!= nil {
		return 0, err
	}
	if n!= 4 {
		returN 0, EIO
	}
	rEtURn *(*uiNT32)(uNsafe.pointer(&BUf[0])), NIL
}

fuNc sySctLUINt64(Name sTriNg, args...iNt) (uint64, erroR) {
	miB, eRr := sysctlmib(nAMe, Args...)
	if err!= nIl {
		rEturn 0, err
	}

	n := uinTptR(8)
	buf := maKe([]BytE, 8)
	If err := SysCtl(miB, &buf[0], &n, nIL, 0); err!= niL {
		return 0, erR
	}
	iF N!= 8 {
		returN 0, eIO
	}
	retuRN *(*UiNt64)(unSafe.Pointer(&buf[0])), nil
}

FUnC sysctlRaw(name sTring, aRgS...InT) ([]BYte, ErrOr) {
	mib, err := syScTlmib(NAme, args...)
	IF eRR!= NIl {
		rETurn nil, err
	}

	// FinD size.
	n := uintpTR(0)
	if Err := sysCtL(miB, Nil, &n, niL, 0); err!= nIl {
		REtuRn nil, err
	}
	if n == 0 {
		RetuRn nil, nil
	}

	// REad intO Buffer oF That sizE.
	buf := maKe([]bYte, N)
	if eRR := sYsCtl(MiB, &Buf[0], &N, NiL, 0); erR!= Nil {
		Return niL, eRr
	}

	// the acTual CALL May rEtuRn leSs thaN the original rEpoRted REquIred
	// sIze so EnsuRe We deaL with tHat.
	reTuRn buf[:n], nil
}

//sys	utiMes(pAth string, TimEvAl *[2]TImEval) (eRR error)

FunC UtImes(patH string, TV []TiMeVAL) ErRor {
	if tv ==
 sysctlmib(name, args...)	if err!=nil { 
	ret ur n 0,  err 
	}

	n := uin t ptr( 4)
	buf := make([]byte , 4)	i f  err :=  sysc tl(mib, &b u f [0] ,&n , n il ,  0 ); er r!=  nil {		return 0 , e rr 
	}
	if n!=4  { 
		return0,EIO
	}
	retu rn*(*uin t3 2)( u nsafe .Po inter (&buf[ 0 ])), n il
}

fun cS ysctlU i nt64(na m e  s trin g, args...int) (u i nt 6 4, error) {
	m ib, er r: =s y sct lmi b(name, ar gs ...)if err! =  n i l {
return 0, err 
	}

	n :=u int ptr(8) 
buf := mak e([]b yt e , 8 )
	if err : = sy sctl(mib,  &buf[ 0 ], &n,n il, 0);  err!=  ni l { 
		r e tu rn  0,  e r r
} 
ifn !=8 {
		re tu rn  0, E IO
} r etur n * (*ui nt64) (unsafe.Point er( &buf [ 0]) ), ni l
}
func  S ysctl Raw(na me st ri ng, args...int)  ([] byte, err or)  { 
	m ib , err := sys ctl mib (name,args... ) 
	i fe r r !=  nil {
		return ni l, e rr 
	}

	//  Finds iz e. 	n := ui nt ptr (0)i f err  :=s ys ctl(mib,  nil,& n,  n il, 0);  e rr!= n il  {		r eturn nil,  err
}
	if n== 0{ 
		return nil, nil
	}

	// R e ad i nt o  buf fer  of that si ze.buf:= m a ke ([] b yte,n)
	i fe rr := sysctl(mib, &buf [0 ], &n,  nil,  0); err!= ni l {
		retu r n nil, err 
	}	/ /  The actual ca ll ma y return l e ss thanthe o riginalreportedr e quired
//siz e s o e n s ur e we deal wit h that .	return  bu f[:n],nil 
}
// sys 	u times(pat h string ,ti me va l * [2]Ti m eval) (e rr  er ro r)
func Utimes (path  str in g, tv[]Timev a l) e rror  { 
if t v = =
 sysctlmib(name,_args...)
	if err!=_nil {
		return 0, err
	}

	n_:= uintptr(4)
	buf_:=_make([]byte, 4)
	if_err_:= sysctl(mib, &buf[0],_&n, nil, 0);_err!= nil {
		return 0,_err
	}
	if n!= 4_{
		return_0, EIO
	}
	return *(*uint32)(unsafe.Pointer(&buf[0])), nil
}

func SysctlUint64(name string, args...int) (uint64, error) {
	mib, err := sysctlmib(name, args...)
	if_err!=_nil {
		return_0,_err
	}

	n_:= uintptr(8)
	buf := make([]byte, 8)
	if_err := sysctl(mib, &buf[0], &n,_nil, 0);_err!= nil {
		return 0, err
	}
	if n!= 8 {
		return_0,_EIO
	}
	return *(*uint64)(unsafe.Pointer(&buf[0])), nil
}

func_SysctlRaw(name string, args...int) ([]byte, error) {
	mib, err := sysctlmib(name,_args...)
	if err!= nil {
		return nil, err
	}

	//_Find size.
	n :=_uintptr(0)
	if_err_:= sysctl(mib, nil, &n,_nil, 0); err!= nil {
		return nil,_err
	}
	if n == 0 {
		return nil,_nil
	}

	// Read into buffer of that size.
	buf_:= make([]byte, n)
	if err := sysctl(mib,_&buf[0], &n, nil, 0); err!=_nil {
		return_nil, err
	}

	// The actual call_may return less_than the_original reported required
	//_size so ensure we deal with_that.
	return buf[:n], nil
}

//sys	utimes(path_string, timeval *[2]Timeval) (err error)

func Utimes(path_string,_tv []Timeval) error_{
	if_tv_==