//go:build armbe || arm64be || mips || mips64 || mips64p32 || ppc || ppc64 || sparc || sparc64 || s390 || s390x
// +build armbe arm64be mips mips64 mips64p32 ppc ppc64 sparc sparc64 s390 s390x

package yu_base64

import (
	"unsafe"
)

//go:nosplit
func bswap32(ptr uintptr) uint32 {
	return *(*uint32)(unsafe.Pointer(ptr))
}

//go:nosplit
func stou32(cp uintptr, x uint32) {
	*(*uint32)(unsafe.Pointer(cp)) = reverseBytes32(x)
}

//go:nosplit
func ctou32(cp uintptr) uint32 {
	return reverseBytes32(*(*uint32)(unsafe.Pointer(cp)))
}
