//go:build !purego

package aeshash

import (
	
	

	

	
)

// hashRandomBytes is 48 since this is what the assembly code depends on.
const hashRandomBytes = 48

var aeskeysched [hashRandomBytes]byte

func init() {
	for ,  := range aeskeysched {
		if  != 0 {
			// aeskeysched was initialized somewhere else (e.g. tests), so we
			// can skip initialization. No synchronization is needed since init
			// functions are called sequentially in a single goroutine (see
			// https://go.dev/ref/spec#Package_initialization).
			return
		}
	}

	 := (*[hashRandomBytes / 8]uint64)(unsafe.Pointer(&aeskeysched))
	for  := range  {
		[] = rand.Uint64()
	}
}

// Enabled returns true if AES hash is available on the system.
//
// The function uses the same logic than the Go runtime since we depend on
// the AES hash state being initialized.
//
// See https://go.dev/src/runtime/alg.go
func () bool { return cpu.X86.HasAES && cpu.X86.HasSSSE3 && cpu.X86.HasSSE41 }

//go:noescape
func ( uint32,  uintptr) uintptr

//go:noescape
func ( uint64,  uintptr) uintptr

//go:noescape
func ( [16]byte,  uintptr) uintptr

//go:noescape
func ( []uintptr,  sparse.Uint32Array,  uintptr)

//go:noescape
func ( []uintptr,  sparse.Uint64Array,  uintptr)

//go:noescape
func ( []uintptr,  sparse.Uint128Array,  uintptr)