github.com/ttpreport/gvisor-ligolo@v0.0.0-20240123134145-a858404967ba/pkg/abi/nvgpu/nvgpu_abi_autogen_unsafe.go (about)

     1  // Automatically generated marshal implementation. See tools/go_marshal.
     2  
     3  package nvgpu
     4  
     5  import (
     6  	"github.com/ttpreport/gvisor-ligolo/pkg/gohacks"
     7  	"github.com/ttpreport/gvisor-ligolo/pkg/hostarch"
     8  	"github.com/ttpreport/gvisor-ligolo/pkg/marshal"
     9  	"io"
    10  	"reflect"
    11  	"runtime"
    12  	"unsafe"
    13  )
    14  
    15  // Marshallable types used by this file.
    16  var _ marshal.Marshallable = (*Handle)(nil)
    17  var _ marshal.Marshallable = (*IoctlAllocOSEvent)(nil)
    18  var _ marshal.Marshallable = (*IoctlFreeOSEvent)(nil)
    19  var _ marshal.Marshallable = (*IoctlNVOS02ParametersWithFD)(nil)
    20  var _ marshal.Marshallable = (*IoctlNVOS33ParametersWithFD)(nil)
    21  var _ marshal.Marshallable = (*IoctlRegisterFD)(nil)
    22  var _ marshal.Marshallable = (*IoctlSysParams)(nil)
    23  var _ marshal.Marshallable = (*NV0000_CTRL_SYSTEM_GET_BUILD_VERSION_PARAMS)(nil)
    24  var _ marshal.Marshallable = (*NV0005_ALLOC_PARAMETERS)(nil)
    25  var _ marshal.Marshallable = (*NV0080_ALLOC_PARAMETERS)(nil)
    26  var _ marshal.Marshallable = (*NV0080_CTRL_FIFO_GET_CHANNELLIST_PARAMS)(nil)
    27  var _ marshal.Marshallable = (*NV0080_CTRL_GR_ROUTE_INFO)(nil)
    28  var _ marshal.Marshallable = (*NV2080_ALLOC_PARAMETERS)(nil)
    29  var _ marshal.Marshallable = (*NV2080_CTRL_FIFO_DISABLE_CHANNELS_PARAMS)(nil)
    30  var _ marshal.Marshallable = (*NV2080_CTRL_GR_GET_INFO_PARAMS)(nil)
    31  var _ marshal.Marshallable = (*NV503C_ALLOC_PARAMETERS)(nil)
    32  var _ marshal.Marshallable = (*NV83DE_ALLOC_PARAMETERS)(nil)
    33  var _ marshal.Marshallable = (*NVB0B5_ALLOCATION_PARAMETERS)(nil)
    34  var _ marshal.Marshallable = (*NVOS00Parameters)(nil)
    35  var _ marshal.Marshallable = (*NVOS02Parameters)(nil)
    36  var _ marshal.Marshallable = (*NVOS21Parameters)(nil)
    37  var _ marshal.Marshallable = (*NVOS32Parameters)(nil)
    38  var _ marshal.Marshallable = (*NVOS33Parameters)(nil)
    39  var _ marshal.Marshallable = (*NVOS34Parameters)(nil)
    40  var _ marshal.Marshallable = (*NVOS54Parameters)(nil)
    41  var _ marshal.Marshallable = (*NVOS55Parameters)(nil)
    42  var _ marshal.Marshallable = (*NVOS56Parameters)(nil)
    43  var _ marshal.Marshallable = (*NVOS57Parameters)(nil)
    44  var _ marshal.Marshallable = (*NVOS64Parameters)(nil)
    45  var _ marshal.Marshallable = (*NVXXXX_CTRL_XXX_INFO)(nil)
    46  var _ marshal.Marshallable = (*NV_CHANNEL_ALLOC_PARAMS)(nil)
    47  var _ marshal.Marshallable = (*NV_CHANNEL_GROUP_ALLOCATION_PARAMETERS)(nil)
    48  var _ marshal.Marshallable = (*NV_CTXSHARE_ALLOCATION_PARAMETERS)(nil)
    49  var _ marshal.Marshallable = (*NV_GR_ALLOCATION_PARAMETERS)(nil)
    50  var _ marshal.Marshallable = (*NV_HOPPER_USERMODE_A_PARAMS)(nil)
    51  var _ marshal.Marshallable = (*NV_MEMORY_DESC_PARAMS)(nil)
    52  var _ marshal.Marshallable = (*NV_VASPACE_ALLOCATION_PARAMETERS)(nil)
    53  var _ marshal.Marshallable = (*P64)(nil)
    54  var _ marshal.Marshallable = (*RMAPIVersion)(nil)
    55  var _ marshal.Marshallable = (*RS_ACCESS_MASK)(nil)
    56  var _ marshal.Marshallable = (*RS_SHARE_POLICY)(nil)
    57  var _ marshal.Marshallable = (*UVM_ALLOC_SEMAPHORE_POOL_PARAMS)(nil)
    58  var _ marshal.Marshallable = (*UVM_CREATE_EXTERNAL_RANGE_PARAMS)(nil)
    59  var _ marshal.Marshallable = (*UVM_CREATE_RANGE_GROUP_PARAMS)(nil)
    60  var _ marshal.Marshallable = (*UVM_DESTROY_RANGE_GROUP_PARAMS)(nil)
    61  var _ marshal.Marshallable = (*UVM_FREE_PARAMS)(nil)
    62  var _ marshal.Marshallable = (*UVM_INITIALIZE_PARAMS)(nil)
    63  var _ marshal.Marshallable = (*UVM_MAP_DYNAMIC_PARALLELISM_REGION_PARAMS)(nil)
    64  var _ marshal.Marshallable = (*UVM_MAP_EXTERNAL_ALLOCATION_PARAMS)(nil)
    65  var _ marshal.Marshallable = (*UVM_PAGEABLE_MEM_ACCESS_PARAMS)(nil)
    66  var _ marshal.Marshallable = (*UVM_REGISTER_CHANNEL_PARAMS)(nil)
    67  var _ marshal.Marshallable = (*UVM_REGISTER_GPU_PARAMS)(nil)
    68  var _ marshal.Marshallable = (*UVM_REGISTER_GPU_VASPACE_PARAMS)(nil)
    69  var _ marshal.Marshallable = (*UVM_UNREGISTER_CHANNEL_PARAMS)(nil)
    70  var _ marshal.Marshallable = (*UVM_UNREGISTER_GPU_PARAMS)(nil)
    71  var _ marshal.Marshallable = (*UVM_UNREGISTER_GPU_VASPACE_PARAMS)(nil)
    72  var _ marshal.Marshallable = (*UVM_VALIDATE_VA_RANGE_PARAMS)(nil)
    73  var _ marshal.Marshallable = (*UvmGpuMappingAttributes)(nil)
    74  
    75  // SizeBytes implements marshal.Marshallable.SizeBytes.
    76  func (n *NV0005_ALLOC_PARAMETERS) SizeBytes() int {
    77  	return 8 +
    78  		(*Handle)(nil).SizeBytes() +
    79  		(*Handle)(nil).SizeBytes() +
    80  		(*P64)(nil).SizeBytes()
    81  }
    82  
    83  // MarshalBytes implements marshal.Marshallable.MarshalBytes.
    84  func (n *NV0005_ALLOC_PARAMETERS) MarshalBytes(dst []byte) []byte {
    85  	dst = n.HParentClient.MarshalUnsafe(dst)
    86  	dst = n.HSrcResource.MarshalUnsafe(dst)
    87  	hostarch.ByteOrder.PutUint32(dst[:4], uint32(n.HClass))
    88  	dst = dst[4:]
    89  	hostarch.ByteOrder.PutUint32(dst[:4], uint32(n.NotifyIndex))
    90  	dst = dst[4:]
    91  	dst = n.Data.MarshalUnsafe(dst)
    92  	return dst
    93  }
    94  
    95  // UnmarshalBytes implements marshal.Marshallable.UnmarshalBytes.
    96  func (n *NV0005_ALLOC_PARAMETERS) UnmarshalBytes(src []byte) []byte {
    97  	src = n.HParentClient.UnmarshalUnsafe(src)
    98  	src = n.HSrcResource.UnmarshalUnsafe(src)
    99  	n.HClass = uint32(hostarch.ByteOrder.Uint32(src[:4]))
   100  	src = src[4:]
   101  	n.NotifyIndex = uint32(hostarch.ByteOrder.Uint32(src[:4]))
   102  	src = src[4:]
   103  	src = n.Data.UnmarshalUnsafe(src)
   104  	return src
   105  }
   106  
   107  // Packed implements marshal.Marshallable.Packed.
   108  //
   109  //go:nosplit
   110  func (n *NV0005_ALLOC_PARAMETERS) Packed() bool {
   111  	return n.Data.Packed() && n.HParentClient.Packed() && n.HSrcResource.Packed()
   112  }
   113  
   114  // MarshalUnsafe implements marshal.Marshallable.MarshalUnsafe.
   115  func (n *NV0005_ALLOC_PARAMETERS) MarshalUnsafe(dst []byte) []byte {
   116  	if n.Data.Packed() && n.HParentClient.Packed() && n.HSrcResource.Packed() {
   117  		size := n.SizeBytes()
   118  		gohacks.Memmove(unsafe.Pointer(&dst[0]), unsafe.Pointer(n), uintptr(size))
   119  		return dst[size:]
   120  	}
   121  	// Type NV0005_ALLOC_PARAMETERS doesn't have a packed layout in memory, fallback to MarshalBytes.
   122  	return n.MarshalBytes(dst)
   123  }
   124  
   125  // UnmarshalUnsafe implements marshal.Marshallable.UnmarshalUnsafe.
   126  func (n *NV0005_ALLOC_PARAMETERS) UnmarshalUnsafe(src []byte) []byte {
   127  	if n.Data.Packed() && n.HParentClient.Packed() && n.HSrcResource.Packed() {
   128  		size := n.SizeBytes()
   129  		gohacks.Memmove(unsafe.Pointer(n), unsafe.Pointer(&src[0]), uintptr(size))
   130  		return src[size:]
   131  	}
   132  	// Type NV0005_ALLOC_PARAMETERS doesn't have a packed layout in memory, fallback to UnmarshalBytes.
   133  	return n.UnmarshalBytes(src)
   134  }
   135  
   136  // CopyOutN implements marshal.Marshallable.CopyOutN.
   137  func (n *NV0005_ALLOC_PARAMETERS) CopyOutN(cc marshal.CopyContext, addr hostarch.Addr, limit int) (int, error) {
   138  	if !n.Data.Packed() && n.HParentClient.Packed() && n.HSrcResource.Packed() {
   139  		// Type NV0005_ALLOC_PARAMETERS doesn't have a packed layout in memory, fall back to MarshalBytes.
   140  		buf := cc.CopyScratchBuffer(n.SizeBytes()) // escapes: okay.
   141  		n.MarshalBytes(buf)                        // escapes: fallback.
   142  		return cc.CopyOutBytes(addr, buf[:limit])  // escapes: okay.
   143  	}
   144  
   145  	// Construct a slice backed by dst's underlying memory.
   146  	var buf []byte
   147  	hdr := (*reflect.SliceHeader)(unsafe.Pointer(&buf))
   148  	hdr.Data = uintptr(gohacks.Noescape(unsafe.Pointer(n)))
   149  	hdr.Len = n.SizeBytes()
   150  	hdr.Cap = n.SizeBytes()
   151  
   152  	length, err := cc.CopyOutBytes(addr, buf[:limit]) // escapes: okay.
   153  	// Since we bypassed the compiler's escape analysis, indicate that n
   154  	// must live until the use above.
   155  	runtime.KeepAlive(n) // escapes: replaced by intrinsic.
   156  	return length, err
   157  }
   158  
   159  // CopyOut implements marshal.Marshallable.CopyOut.
   160  func (n *NV0005_ALLOC_PARAMETERS) CopyOut(cc marshal.CopyContext, addr hostarch.Addr) (int, error) {
   161  	return n.CopyOutN(cc, addr, n.SizeBytes())
   162  }
   163  
   164  // CopyIn implements marshal.Marshallable.CopyIn.
   165  func (n *NV0005_ALLOC_PARAMETERS) CopyIn(cc marshal.CopyContext, addr hostarch.Addr) (int, error) {
   166  	if !n.Data.Packed() && n.HParentClient.Packed() && n.HSrcResource.Packed() {
   167  		// Type NV0005_ALLOC_PARAMETERS doesn't have a packed layout in memory, fall back to UnmarshalBytes.
   168  		buf := cc.CopyScratchBuffer(n.SizeBytes()) // escapes: okay.
   169  		length, err := cc.CopyInBytes(addr, buf)   // escapes: okay.
   170  		// Unmarshal unconditionally. If we had a short copy-in, this results in a
   171  		// partially unmarshalled struct.
   172  		n.UnmarshalBytes(buf) // escapes: fallback.
   173  		return length, err
   174  	}
   175  
   176  	// Construct a slice backed by dst's underlying memory.
   177  	var buf []byte
   178  	hdr := (*reflect.SliceHeader)(unsafe.Pointer(&buf))
   179  	hdr.Data = uintptr(gohacks.Noescape(unsafe.Pointer(n)))
   180  	hdr.Len = n.SizeBytes()
   181  	hdr.Cap = n.SizeBytes()
   182  
   183  	length, err := cc.CopyInBytes(addr, buf) // escapes: okay.
   184  	// Since we bypassed the compiler's escape analysis, indicate that n
   185  	// must live until the use above.
   186  	runtime.KeepAlive(n) // escapes: replaced by intrinsic.
   187  	return length, err
   188  }
   189  
   190  // WriteTo implements io.WriterTo.WriteTo.
   191  func (n *NV0005_ALLOC_PARAMETERS) WriteTo(writer io.Writer) (int64, error) {
   192  	if !n.Data.Packed() && n.HParentClient.Packed() && n.HSrcResource.Packed() {
   193  		// Type NV0005_ALLOC_PARAMETERS doesn't have a packed layout in memory, fall back to MarshalBytes.
   194  		buf := make([]byte, n.SizeBytes())
   195  		n.MarshalBytes(buf)
   196  		length, err := writer.Write(buf)
   197  		return int64(length), err
   198  	}
   199  
   200  	// Construct a slice backed by dst's underlying memory.
   201  	var buf []byte
   202  	hdr := (*reflect.SliceHeader)(unsafe.Pointer(&buf))
   203  	hdr.Data = uintptr(gohacks.Noescape(unsafe.Pointer(n)))
   204  	hdr.Len = n.SizeBytes()
   205  	hdr.Cap = n.SizeBytes()
   206  
   207  	length, err := writer.Write(buf)
   208  	// Since we bypassed the compiler's escape analysis, indicate that n
   209  	// must live until the use above.
   210  	runtime.KeepAlive(n) // escapes: replaced by intrinsic.
   211  	return int64(length), err
   212  }
   213  
   214  // SizeBytes implements marshal.Marshallable.SizeBytes.
   215  func (n *NV0080_ALLOC_PARAMETERS) SizeBytes() int {
   216  	return 36 +
   217  		(*Handle)(nil).SizeBytes() +
   218  		(*Handle)(nil).SizeBytes() +
   219  		(*Handle)(nil).SizeBytes() +
   220  		1*4 +
   221  		1*4
   222  }
   223  
   224  // MarshalBytes implements marshal.Marshallable.MarshalBytes.
   225  func (n *NV0080_ALLOC_PARAMETERS) MarshalBytes(dst []byte) []byte {
   226  	hostarch.ByteOrder.PutUint32(dst[:4], uint32(n.DeviceID))
   227  	dst = dst[4:]
   228  	dst = n.HClientShare.MarshalUnsafe(dst)
   229  	dst = n.HTargetClient.MarshalUnsafe(dst)
   230  	dst = n.HTargetDevice.MarshalUnsafe(dst)
   231  	hostarch.ByteOrder.PutUint32(dst[:4], uint32(n.Flags))
   232  	dst = dst[4:]
   233  	for idx := 0; idx < 4; idx++ {
   234  		dst[0] = byte(n.Pad0[idx])
   235  		dst = dst[1:]
   236  	}
   237  	hostarch.ByteOrder.PutUint64(dst[:8], uint64(n.VASpaceSize))
   238  	dst = dst[8:]
   239  	hostarch.ByteOrder.PutUint64(dst[:8], uint64(n.VAStartInternal))
   240  	dst = dst[8:]
   241  	hostarch.ByteOrder.PutUint64(dst[:8], uint64(n.VALimitInternal))
   242  	dst = dst[8:]
   243  	hostarch.ByteOrder.PutUint32(dst[:4], uint32(n.VAMode))
   244  	dst = dst[4:]
   245  	for idx := 0; idx < 4; idx++ {
   246  		dst[0] = byte(n.Pad1[idx])
   247  		dst = dst[1:]
   248  	}
   249  	return dst
   250  }
   251  
   252  // UnmarshalBytes implements marshal.Marshallable.UnmarshalBytes.
   253  func (n *NV0080_ALLOC_PARAMETERS) UnmarshalBytes(src []byte) []byte {
   254  	n.DeviceID = uint32(hostarch.ByteOrder.Uint32(src[:4]))
   255  	src = src[4:]
   256  	src = n.HClientShare.UnmarshalUnsafe(src)
   257  	src = n.HTargetClient.UnmarshalUnsafe(src)
   258  	src = n.HTargetDevice.UnmarshalUnsafe(src)
   259  	n.Flags = uint32(hostarch.ByteOrder.Uint32(src[:4]))
   260  	src = src[4:]
   261  	for idx := 0; idx < 4; idx++ {
   262  		n.Pad0[idx] = src[0]
   263  		src = src[1:]
   264  	}
   265  	n.VASpaceSize = uint64(hostarch.ByteOrder.Uint64(src[:8]))
   266  	src = src[8:]
   267  	n.VAStartInternal = uint64(hostarch.ByteOrder.Uint64(src[:8]))
   268  	src = src[8:]
   269  	n.VALimitInternal = uint64(hostarch.ByteOrder.Uint64(src[:8]))
   270  	src = src[8:]
   271  	n.VAMode = uint32(hostarch.ByteOrder.Uint32(src[:4]))
   272  	src = src[4:]
   273  	for idx := 0; idx < 4; idx++ {
   274  		n.Pad1[idx] = src[0]
   275  		src = src[1:]
   276  	}
   277  	return src
   278  }
   279  
   280  // Packed implements marshal.Marshallable.Packed.
   281  //
   282  //go:nosplit
   283  func (n *NV0080_ALLOC_PARAMETERS) Packed() bool {
   284  	return n.HClientShare.Packed() && n.HTargetClient.Packed() && n.HTargetDevice.Packed()
   285  }
   286  
   287  // MarshalUnsafe implements marshal.Marshallable.MarshalUnsafe.
   288  func (n *NV0080_ALLOC_PARAMETERS) MarshalUnsafe(dst []byte) []byte {
   289  	if n.HClientShare.Packed() && n.HTargetClient.Packed() && n.HTargetDevice.Packed() {
   290  		size := n.SizeBytes()
   291  		gohacks.Memmove(unsafe.Pointer(&dst[0]), unsafe.Pointer(n), uintptr(size))
   292  		return dst[size:]
   293  	}
   294  	// Type NV0080_ALLOC_PARAMETERS doesn't have a packed layout in memory, fallback to MarshalBytes.
   295  	return n.MarshalBytes(dst)
   296  }
   297  
   298  // UnmarshalUnsafe implements marshal.Marshallable.UnmarshalUnsafe.
   299  func (n *NV0080_ALLOC_PARAMETERS) UnmarshalUnsafe(src []byte) []byte {
   300  	if n.HClientShare.Packed() && n.HTargetClient.Packed() && n.HTargetDevice.Packed() {
   301  		size := n.SizeBytes()
   302  		gohacks.Memmove(unsafe.Pointer(n), unsafe.Pointer(&src[0]), uintptr(size))
   303  		return src[size:]
   304  	}
   305  	// Type NV0080_ALLOC_PARAMETERS doesn't have a packed layout in memory, fallback to UnmarshalBytes.
   306  	return n.UnmarshalBytes(src)
   307  }
   308  
   309  // CopyOutN implements marshal.Marshallable.CopyOutN.
   310  func (n *NV0080_ALLOC_PARAMETERS) CopyOutN(cc marshal.CopyContext, addr hostarch.Addr, limit int) (int, error) {
   311  	if !n.HClientShare.Packed() && n.HTargetClient.Packed() && n.HTargetDevice.Packed() {
   312  		// Type NV0080_ALLOC_PARAMETERS doesn't have a packed layout in memory, fall back to MarshalBytes.
   313  		buf := cc.CopyScratchBuffer(n.SizeBytes()) // escapes: okay.
   314  		n.MarshalBytes(buf)                        // escapes: fallback.
   315  		return cc.CopyOutBytes(addr, buf[:limit])  // escapes: okay.
   316  	}
   317  
   318  	// Construct a slice backed by dst's underlying memory.
   319  	var buf []byte
   320  	hdr := (*reflect.SliceHeader)(unsafe.Pointer(&buf))
   321  	hdr.Data = uintptr(gohacks.Noescape(unsafe.Pointer(n)))
   322  	hdr.Len = n.SizeBytes()
   323  	hdr.Cap = n.SizeBytes()
   324  
   325  	length, err := cc.CopyOutBytes(addr, buf[:limit]) // escapes: okay.
   326  	// Since we bypassed the compiler's escape analysis, indicate that n
   327  	// must live until the use above.
   328  	runtime.KeepAlive(n) // escapes: replaced by intrinsic.
   329  	return length, err
   330  }
   331  
   332  // CopyOut implements marshal.Marshallable.CopyOut.
   333  func (n *NV0080_ALLOC_PARAMETERS) CopyOut(cc marshal.CopyContext, addr hostarch.Addr) (int, error) {
   334  	return n.CopyOutN(cc, addr, n.SizeBytes())
   335  }
   336  
   337  // CopyIn implements marshal.Marshallable.CopyIn.
   338  func (n *NV0080_ALLOC_PARAMETERS) CopyIn(cc marshal.CopyContext, addr hostarch.Addr) (int, error) {
   339  	if !n.HClientShare.Packed() && n.HTargetClient.Packed() && n.HTargetDevice.Packed() {
   340  		// Type NV0080_ALLOC_PARAMETERS doesn't have a packed layout in memory, fall back to UnmarshalBytes.
   341  		buf := cc.CopyScratchBuffer(n.SizeBytes()) // escapes: okay.
   342  		length, err := cc.CopyInBytes(addr, buf)   // escapes: okay.
   343  		// Unmarshal unconditionally. If we had a short copy-in, this results in a
   344  		// partially unmarshalled struct.
   345  		n.UnmarshalBytes(buf) // escapes: fallback.
   346  		return length, err
   347  	}
   348  
   349  	// Construct a slice backed by dst's underlying memory.
   350  	var buf []byte
   351  	hdr := (*reflect.SliceHeader)(unsafe.Pointer(&buf))
   352  	hdr.Data = uintptr(gohacks.Noescape(unsafe.Pointer(n)))
   353  	hdr.Len = n.SizeBytes()
   354  	hdr.Cap = n.SizeBytes()
   355  
   356  	length, err := cc.CopyInBytes(addr, buf) // escapes: okay.
   357  	// Since we bypassed the compiler's escape analysis, indicate that n
   358  	// must live until the use above.
   359  	runtime.KeepAlive(n) // escapes: replaced by intrinsic.
   360  	return length, err
   361  }
   362  
   363  // WriteTo implements io.WriterTo.WriteTo.
   364  func (n *NV0080_ALLOC_PARAMETERS) WriteTo(writer io.Writer) (int64, error) {
   365  	if !n.HClientShare.Packed() && n.HTargetClient.Packed() && n.HTargetDevice.Packed() {
   366  		// Type NV0080_ALLOC_PARAMETERS doesn't have a packed layout in memory, fall back to MarshalBytes.
   367  		buf := make([]byte, n.SizeBytes())
   368  		n.MarshalBytes(buf)
   369  		length, err := writer.Write(buf)
   370  		return int64(length), err
   371  	}
   372  
   373  	// Construct a slice backed by dst's underlying memory.
   374  	var buf []byte
   375  	hdr := (*reflect.SliceHeader)(unsafe.Pointer(&buf))
   376  	hdr.Data = uintptr(gohacks.Noescape(unsafe.Pointer(n)))
   377  	hdr.Len = n.SizeBytes()
   378  	hdr.Cap = n.SizeBytes()
   379  
   380  	length, err := writer.Write(buf)
   381  	// Since we bypassed the compiler's escape analysis, indicate that n
   382  	// must live until the use above.
   383  	runtime.KeepAlive(n) // escapes: replaced by intrinsic.
   384  	return int64(length), err
   385  }
   386  
   387  // SizeBytes implements marshal.Marshallable.SizeBytes.
   388  func (n *NV2080_ALLOC_PARAMETERS) SizeBytes() int {
   389  	return 4
   390  }
   391  
   392  // MarshalBytes implements marshal.Marshallable.MarshalBytes.
   393  func (n *NV2080_ALLOC_PARAMETERS) MarshalBytes(dst []byte) []byte {
   394  	hostarch.ByteOrder.PutUint32(dst[:4], uint32(n.SubDeviceID))
   395  	dst = dst[4:]
   396  	return dst
   397  }
   398  
   399  // UnmarshalBytes implements marshal.Marshallable.UnmarshalBytes.
   400  func (n *NV2080_ALLOC_PARAMETERS) UnmarshalBytes(src []byte) []byte {
   401  	n.SubDeviceID = uint32(hostarch.ByteOrder.Uint32(src[:4]))
   402  	src = src[4:]
   403  	return src
   404  }
   405  
   406  // Packed implements marshal.Marshallable.Packed.
   407  //
   408  //go:nosplit
   409  func (n *NV2080_ALLOC_PARAMETERS) Packed() bool {
   410  	return true
   411  }
   412  
   413  // MarshalUnsafe implements marshal.Marshallable.MarshalUnsafe.
   414  func (n *NV2080_ALLOC_PARAMETERS) MarshalUnsafe(dst []byte) []byte {
   415  	size := n.SizeBytes()
   416  	gohacks.Memmove(unsafe.Pointer(&dst[0]), unsafe.Pointer(n), uintptr(size))
   417  	return dst[size:]
   418  }
   419  
   420  // UnmarshalUnsafe implements marshal.Marshallable.UnmarshalUnsafe.
   421  func (n *NV2080_ALLOC_PARAMETERS) UnmarshalUnsafe(src []byte) []byte {
   422  	size := n.SizeBytes()
   423  	gohacks.Memmove(unsafe.Pointer(n), unsafe.Pointer(&src[0]), uintptr(size))
   424  	return src[size:]
   425  }
   426  
   427  // CopyOutN implements marshal.Marshallable.CopyOutN.
   428  func (n *NV2080_ALLOC_PARAMETERS) CopyOutN(cc marshal.CopyContext, addr hostarch.Addr, limit int) (int, error) {
   429  	// Construct a slice backed by dst's underlying memory.
   430  	var buf []byte
   431  	hdr := (*reflect.SliceHeader)(unsafe.Pointer(&buf))
   432  	hdr.Data = uintptr(gohacks.Noescape(unsafe.Pointer(n)))
   433  	hdr.Len = n.SizeBytes()
   434  	hdr.Cap = n.SizeBytes()
   435  
   436  	length, err := cc.CopyOutBytes(addr, buf[:limit]) // escapes: okay.
   437  	// Since we bypassed the compiler's escape analysis, indicate that n
   438  	// must live until the use above.
   439  	runtime.KeepAlive(n) // escapes: replaced by intrinsic.
   440  	return length, err
   441  }
   442  
   443  // CopyOut implements marshal.Marshallable.CopyOut.
   444  func (n *NV2080_ALLOC_PARAMETERS) CopyOut(cc marshal.CopyContext, addr hostarch.Addr) (int, error) {
   445  	return n.CopyOutN(cc, addr, n.SizeBytes())
   446  }
   447  
   448  // CopyIn implements marshal.Marshallable.CopyIn.
   449  func (n *NV2080_ALLOC_PARAMETERS) CopyIn(cc marshal.CopyContext, addr hostarch.Addr) (int, error) {
   450  	// Construct a slice backed by dst's underlying memory.
   451  	var buf []byte
   452  	hdr := (*reflect.SliceHeader)(unsafe.Pointer(&buf))
   453  	hdr.Data = uintptr(gohacks.Noescape(unsafe.Pointer(n)))
   454  	hdr.Len = n.SizeBytes()
   455  	hdr.Cap = n.SizeBytes()
   456  
   457  	length, err := cc.CopyInBytes(addr, buf) // escapes: okay.
   458  	// Since we bypassed the compiler's escape analysis, indicate that n
   459  	// must live until the use above.
   460  	runtime.KeepAlive(n) // escapes: replaced by intrinsic.
   461  	return length, err
   462  }
   463  
   464  // WriteTo implements io.WriterTo.WriteTo.
   465  func (n *NV2080_ALLOC_PARAMETERS) WriteTo(writer io.Writer) (int64, error) {
   466  	// Construct a slice backed by dst's underlying memory.
   467  	var buf []byte
   468  	hdr := (*reflect.SliceHeader)(unsafe.Pointer(&buf))
   469  	hdr.Data = uintptr(gohacks.Noescape(unsafe.Pointer(n)))
   470  	hdr.Len = n.SizeBytes()
   471  	hdr.Cap = n.SizeBytes()
   472  
   473  	length, err := writer.Write(buf)
   474  	// Since we bypassed the compiler's escape analysis, indicate that n
   475  	// must live until the use above.
   476  	runtime.KeepAlive(n) // escapes: replaced by intrinsic.
   477  	return int64(length), err
   478  }
   479  
   480  // SizeBytes implements marshal.Marshallable.SizeBytes.
   481  func (n *NV503C_ALLOC_PARAMETERS) SizeBytes() int {
   482  	return 4
   483  }
   484  
   485  // MarshalBytes implements marshal.Marshallable.MarshalBytes.
   486  func (n *NV503C_ALLOC_PARAMETERS) MarshalBytes(dst []byte) []byte {
   487  	hostarch.ByteOrder.PutUint32(dst[:4], uint32(n.Flags))
   488  	dst = dst[4:]
   489  	return dst
   490  }
   491  
   492  // UnmarshalBytes implements marshal.Marshallable.UnmarshalBytes.
   493  func (n *NV503C_ALLOC_PARAMETERS) UnmarshalBytes(src []byte) []byte {
   494  	n.Flags = uint32(hostarch.ByteOrder.Uint32(src[:4]))
   495  	src = src[4:]
   496  	return src
   497  }
   498  
   499  // Packed implements marshal.Marshallable.Packed.
   500  //
   501  //go:nosplit
   502  func (n *NV503C_ALLOC_PARAMETERS) Packed() bool {
   503  	return true
   504  }
   505  
   506  // MarshalUnsafe implements marshal.Marshallable.MarshalUnsafe.
   507  func (n *NV503C_ALLOC_PARAMETERS) MarshalUnsafe(dst []byte) []byte {
   508  	size := n.SizeBytes()
   509  	gohacks.Memmove(unsafe.Pointer(&dst[0]), unsafe.Pointer(n), uintptr(size))
   510  	return dst[size:]
   511  }
   512  
   513  // UnmarshalUnsafe implements marshal.Marshallable.UnmarshalUnsafe.
   514  func (n *NV503C_ALLOC_PARAMETERS) UnmarshalUnsafe(src []byte) []byte {
   515  	size := n.SizeBytes()
   516  	gohacks.Memmove(unsafe.Pointer(n), unsafe.Pointer(&src[0]), uintptr(size))
   517  	return src[size:]
   518  }
   519  
   520  // CopyOutN implements marshal.Marshallable.CopyOutN.
   521  func (n *NV503C_ALLOC_PARAMETERS) CopyOutN(cc marshal.CopyContext, addr hostarch.Addr, limit int) (int, error) {
   522  	// Construct a slice backed by dst's underlying memory.
   523  	var buf []byte
   524  	hdr := (*reflect.SliceHeader)(unsafe.Pointer(&buf))
   525  	hdr.Data = uintptr(gohacks.Noescape(unsafe.Pointer(n)))
   526  	hdr.Len = n.SizeBytes()
   527  	hdr.Cap = n.SizeBytes()
   528  
   529  	length, err := cc.CopyOutBytes(addr, buf[:limit]) // escapes: okay.
   530  	// Since we bypassed the compiler's escape analysis, indicate that n
   531  	// must live until the use above.
   532  	runtime.KeepAlive(n) // escapes: replaced by intrinsic.
   533  	return length, err
   534  }
   535  
   536  // CopyOut implements marshal.Marshallable.CopyOut.
   537  func (n *NV503C_ALLOC_PARAMETERS) CopyOut(cc marshal.CopyContext, addr hostarch.Addr) (int, error) {
   538  	return n.CopyOutN(cc, addr, n.SizeBytes())
   539  }
   540  
   541  // CopyIn implements marshal.Marshallable.CopyIn.
   542  func (n *NV503C_ALLOC_PARAMETERS) CopyIn(cc marshal.CopyContext, addr hostarch.Addr) (int, error) {
   543  	// Construct a slice backed by dst's underlying memory.
   544  	var buf []byte
   545  	hdr := (*reflect.SliceHeader)(unsafe.Pointer(&buf))
   546  	hdr.Data = uintptr(gohacks.Noescape(unsafe.Pointer(n)))
   547  	hdr.Len = n.SizeBytes()
   548  	hdr.Cap = n.SizeBytes()
   549  
   550  	length, err := cc.CopyInBytes(addr, buf) // escapes: okay.
   551  	// Since we bypassed the compiler's escape analysis, indicate that n
   552  	// must live until the use above.
   553  	runtime.KeepAlive(n) // escapes: replaced by intrinsic.
   554  	return length, err
   555  }
   556  
   557  // WriteTo implements io.WriterTo.WriteTo.
   558  func (n *NV503C_ALLOC_PARAMETERS) WriteTo(writer io.Writer) (int64, error) {
   559  	// Construct a slice backed by dst's underlying memory.
   560  	var buf []byte
   561  	hdr := (*reflect.SliceHeader)(unsafe.Pointer(&buf))
   562  	hdr.Data = uintptr(gohacks.Noescape(unsafe.Pointer(n)))
   563  	hdr.Len = n.SizeBytes()
   564  	hdr.Cap = n.SizeBytes()
   565  
   566  	length, err := writer.Write(buf)
   567  	// Since we bypassed the compiler's escape analysis, indicate that n
   568  	// must live until the use above.
   569  	runtime.KeepAlive(n) // escapes: replaced by intrinsic.
   570  	return int64(length), err
   571  }
   572  
   573  // SizeBytes implements marshal.Marshallable.SizeBytes.
   574  func (n *NV83DE_ALLOC_PARAMETERS) SizeBytes() int {
   575  	return 0 +
   576  		(*Handle)(nil).SizeBytes() +
   577  		(*Handle)(nil).SizeBytes() +
   578  		(*Handle)(nil).SizeBytes()
   579  }
   580  
   581  // MarshalBytes implements marshal.Marshallable.MarshalBytes.
   582  func (n *NV83DE_ALLOC_PARAMETERS) MarshalBytes(dst []byte) []byte {
   583  	dst = n.HDebuggerClient_Obsolete.MarshalUnsafe(dst)
   584  	dst = n.HAppClient.MarshalUnsafe(dst)
   585  	dst = n.HClass3DObject.MarshalUnsafe(dst)
   586  	return dst
   587  }
   588  
   589  // UnmarshalBytes implements marshal.Marshallable.UnmarshalBytes.
   590  func (n *NV83DE_ALLOC_PARAMETERS) UnmarshalBytes(src []byte) []byte {
   591  	src = n.HDebuggerClient_Obsolete.UnmarshalUnsafe(src)
   592  	src = n.HAppClient.UnmarshalUnsafe(src)
   593  	src = n.HClass3DObject.UnmarshalUnsafe(src)
   594  	return src
   595  }
   596  
   597  // Packed implements marshal.Marshallable.Packed.
   598  //
   599  //go:nosplit
   600  func (n *NV83DE_ALLOC_PARAMETERS) Packed() bool {
   601  	return n.HAppClient.Packed() && n.HClass3DObject.Packed() && n.HDebuggerClient_Obsolete.Packed()
   602  }
   603  
   604  // MarshalUnsafe implements marshal.Marshallable.MarshalUnsafe.
   605  func (n *NV83DE_ALLOC_PARAMETERS) MarshalUnsafe(dst []byte) []byte {
   606  	if n.HAppClient.Packed() && n.HClass3DObject.Packed() && n.HDebuggerClient_Obsolete.Packed() {
   607  		size := n.SizeBytes()
   608  		gohacks.Memmove(unsafe.Pointer(&dst[0]), unsafe.Pointer(n), uintptr(size))
   609  		return dst[size:]
   610  	}
   611  	// Type NV83DE_ALLOC_PARAMETERS doesn't have a packed layout in memory, fallback to MarshalBytes.
   612  	return n.MarshalBytes(dst)
   613  }
   614  
   615  // UnmarshalUnsafe implements marshal.Marshallable.UnmarshalUnsafe.
   616  func (n *NV83DE_ALLOC_PARAMETERS) UnmarshalUnsafe(src []byte) []byte {
   617  	if n.HAppClient.Packed() && n.HClass3DObject.Packed() && n.HDebuggerClient_Obsolete.Packed() {
   618  		size := n.SizeBytes()
   619  		gohacks.Memmove(unsafe.Pointer(n), unsafe.Pointer(&src[0]), uintptr(size))
   620  		return src[size:]
   621  	}
   622  	// Type NV83DE_ALLOC_PARAMETERS doesn't have a packed layout in memory, fallback to UnmarshalBytes.
   623  	return n.UnmarshalBytes(src)
   624  }
   625  
   626  // CopyOutN implements marshal.Marshallable.CopyOutN.
   627  func (n *NV83DE_ALLOC_PARAMETERS) CopyOutN(cc marshal.CopyContext, addr hostarch.Addr, limit int) (int, error) {
   628  	if !n.HAppClient.Packed() && n.HClass3DObject.Packed() && n.HDebuggerClient_Obsolete.Packed() {
   629  		// Type NV83DE_ALLOC_PARAMETERS doesn't have a packed layout in memory, fall back to MarshalBytes.
   630  		buf := cc.CopyScratchBuffer(n.SizeBytes()) // escapes: okay.
   631  		n.MarshalBytes(buf)                        // escapes: fallback.
   632  		return cc.CopyOutBytes(addr, buf[:limit])  // escapes: okay.
   633  	}
   634  
   635  	// Construct a slice backed by dst's underlying memory.
   636  	var buf []byte
   637  	hdr := (*reflect.SliceHeader)(unsafe.Pointer(&buf))
   638  	hdr.Data = uintptr(gohacks.Noescape(unsafe.Pointer(n)))
   639  	hdr.Len = n.SizeBytes()
   640  	hdr.Cap = n.SizeBytes()
   641  
   642  	length, err := cc.CopyOutBytes(addr, buf[:limit]) // escapes: okay.
   643  	// Since we bypassed the compiler's escape analysis, indicate that n
   644  	// must live until the use above.
   645  	runtime.KeepAlive(n) // escapes: replaced by intrinsic.
   646  	return length, err
   647  }
   648  
   649  // CopyOut implements marshal.Marshallable.CopyOut.
   650  func (n *NV83DE_ALLOC_PARAMETERS) CopyOut(cc marshal.CopyContext, addr hostarch.Addr) (int, error) {
   651  	return n.CopyOutN(cc, addr, n.SizeBytes())
   652  }
   653  
   654  // CopyIn implements marshal.Marshallable.CopyIn.
   655  func (n *NV83DE_ALLOC_PARAMETERS) CopyIn(cc marshal.CopyContext, addr hostarch.Addr) (int, error) {
   656  	if !n.HAppClient.Packed() && n.HClass3DObject.Packed() && n.HDebuggerClient_Obsolete.Packed() {
   657  		// Type NV83DE_ALLOC_PARAMETERS doesn't have a packed layout in memory, fall back to UnmarshalBytes.
   658  		buf := cc.CopyScratchBuffer(n.SizeBytes()) // escapes: okay.
   659  		length, err := cc.CopyInBytes(addr, buf)   // escapes: okay.
   660  		// Unmarshal unconditionally. If we had a short copy-in, this results in a
   661  		// partially unmarshalled struct.
   662  		n.UnmarshalBytes(buf) // escapes: fallback.
   663  		return length, err
   664  	}
   665  
   666  	// Construct a slice backed by dst's underlying memory.
   667  	var buf []byte
   668  	hdr := (*reflect.SliceHeader)(unsafe.Pointer(&buf))
   669  	hdr.Data = uintptr(gohacks.Noescape(unsafe.Pointer(n)))
   670  	hdr.Len = n.SizeBytes()
   671  	hdr.Cap = n.SizeBytes()
   672  
   673  	length, err := cc.CopyInBytes(addr, buf) // escapes: okay.
   674  	// Since we bypassed the compiler's escape analysis, indicate that n
   675  	// must live until the use above.
   676  	runtime.KeepAlive(n) // escapes: replaced by intrinsic.
   677  	return length, err
   678  }
   679  
   680  // WriteTo implements io.WriterTo.WriteTo.
   681  func (n *NV83DE_ALLOC_PARAMETERS) WriteTo(writer io.Writer) (int64, error) {
   682  	if !n.HAppClient.Packed() && n.HClass3DObject.Packed() && n.HDebuggerClient_Obsolete.Packed() {
   683  		// Type NV83DE_ALLOC_PARAMETERS doesn't have a packed layout in memory, fall back to MarshalBytes.
   684  		buf := make([]byte, n.SizeBytes())
   685  		n.MarshalBytes(buf)
   686  		length, err := writer.Write(buf)
   687  		return int64(length), err
   688  	}
   689  
   690  	// Construct a slice backed by dst's underlying memory.
   691  	var buf []byte
   692  	hdr := (*reflect.SliceHeader)(unsafe.Pointer(&buf))
   693  	hdr.Data = uintptr(gohacks.Noescape(unsafe.Pointer(n)))
   694  	hdr.Len = n.SizeBytes()
   695  	hdr.Cap = n.SizeBytes()
   696  
   697  	length, err := writer.Write(buf)
   698  	// Since we bypassed the compiler's escape analysis, indicate that n
   699  	// must live until the use above.
   700  	runtime.KeepAlive(n) // escapes: replaced by intrinsic.
   701  	return int64(length), err
   702  }
   703  
   704  // SizeBytes implements marshal.Marshallable.SizeBytes.
   705  func (n *NVB0B5_ALLOCATION_PARAMETERS) SizeBytes() int {
   706  	return 8
   707  }
   708  
   709  // MarshalBytes implements marshal.Marshallable.MarshalBytes.
   710  func (n *NVB0B5_ALLOCATION_PARAMETERS) MarshalBytes(dst []byte) []byte {
   711  	hostarch.ByteOrder.PutUint32(dst[:4], uint32(n.Version))
   712  	dst = dst[4:]
   713  	hostarch.ByteOrder.PutUint32(dst[:4], uint32(n.EngineType))
   714  	dst = dst[4:]
   715  	return dst
   716  }
   717  
   718  // UnmarshalBytes implements marshal.Marshallable.UnmarshalBytes.
   719  func (n *NVB0B5_ALLOCATION_PARAMETERS) UnmarshalBytes(src []byte) []byte {
   720  	n.Version = uint32(hostarch.ByteOrder.Uint32(src[:4]))
   721  	src = src[4:]
   722  	n.EngineType = uint32(hostarch.ByteOrder.Uint32(src[:4]))
   723  	src = src[4:]
   724  	return src
   725  }
   726  
   727  // Packed implements marshal.Marshallable.Packed.
   728  //
   729  //go:nosplit
   730  func (n *NVB0B5_ALLOCATION_PARAMETERS) Packed() bool {
   731  	return true
   732  }
   733  
   734  // MarshalUnsafe implements marshal.Marshallable.MarshalUnsafe.
   735  func (n *NVB0B5_ALLOCATION_PARAMETERS) MarshalUnsafe(dst []byte) []byte {
   736  	size := n.SizeBytes()
   737  	gohacks.Memmove(unsafe.Pointer(&dst[0]), unsafe.Pointer(n), uintptr(size))
   738  	return dst[size:]
   739  }
   740  
   741  // UnmarshalUnsafe implements marshal.Marshallable.UnmarshalUnsafe.
   742  func (n *NVB0B5_ALLOCATION_PARAMETERS) UnmarshalUnsafe(src []byte) []byte {
   743  	size := n.SizeBytes()
   744  	gohacks.Memmove(unsafe.Pointer(n), unsafe.Pointer(&src[0]), uintptr(size))
   745  	return src[size:]
   746  }
   747  
   748  // CopyOutN implements marshal.Marshallable.CopyOutN.
   749  func (n *NVB0B5_ALLOCATION_PARAMETERS) CopyOutN(cc marshal.CopyContext, addr hostarch.Addr, limit int) (int, error) {
   750  	// Construct a slice backed by dst's underlying memory.
   751  	var buf []byte
   752  	hdr := (*reflect.SliceHeader)(unsafe.Pointer(&buf))
   753  	hdr.Data = uintptr(gohacks.Noescape(unsafe.Pointer(n)))
   754  	hdr.Len = n.SizeBytes()
   755  	hdr.Cap = n.SizeBytes()
   756  
   757  	length, err := cc.CopyOutBytes(addr, buf[:limit]) // escapes: okay.
   758  	// Since we bypassed the compiler's escape analysis, indicate that n
   759  	// must live until the use above.
   760  	runtime.KeepAlive(n) // escapes: replaced by intrinsic.
   761  	return length, err
   762  }
   763  
   764  // CopyOut implements marshal.Marshallable.CopyOut.
   765  func (n *NVB0B5_ALLOCATION_PARAMETERS) CopyOut(cc marshal.CopyContext, addr hostarch.Addr) (int, error) {
   766  	return n.CopyOutN(cc, addr, n.SizeBytes())
   767  }
   768  
   769  // CopyIn implements marshal.Marshallable.CopyIn.
   770  func (n *NVB0B5_ALLOCATION_PARAMETERS) CopyIn(cc marshal.CopyContext, addr hostarch.Addr) (int, error) {
   771  	// Construct a slice backed by dst's underlying memory.
   772  	var buf []byte
   773  	hdr := (*reflect.SliceHeader)(unsafe.Pointer(&buf))
   774  	hdr.Data = uintptr(gohacks.Noescape(unsafe.Pointer(n)))
   775  	hdr.Len = n.SizeBytes()
   776  	hdr.Cap = n.SizeBytes()
   777  
   778  	length, err := cc.CopyInBytes(addr, buf) // escapes: okay.
   779  	// Since we bypassed the compiler's escape analysis, indicate that n
   780  	// must live until the use above.
   781  	runtime.KeepAlive(n) // escapes: replaced by intrinsic.
   782  	return length, err
   783  }
   784  
   785  // WriteTo implements io.WriterTo.WriteTo.
   786  func (n *NVB0B5_ALLOCATION_PARAMETERS) WriteTo(writer io.Writer) (int64, error) {
   787  	// Construct a slice backed by dst's underlying memory.
   788  	var buf []byte
   789  	hdr := (*reflect.SliceHeader)(unsafe.Pointer(&buf))
   790  	hdr.Data = uintptr(gohacks.Noescape(unsafe.Pointer(n)))
   791  	hdr.Len = n.SizeBytes()
   792  	hdr.Cap = n.SizeBytes()
   793  
   794  	length, err := writer.Write(buf)
   795  	// Since we bypassed the compiler's escape analysis, indicate that n
   796  	// must live until the use above.
   797  	runtime.KeepAlive(n) // escapes: replaced by intrinsic.
   798  	return int64(length), err
   799  }
   800  
   801  // SizeBytes implements marshal.Marshallable.SizeBytes.
   802  func (n *NV_CHANNEL_ALLOC_PARAMS) SizeBytes() int {
   803  	return 40 +
   804  		(*Handle)(nil).SizeBytes() +
   805  		(*Handle)(nil).SizeBytes() +
   806  		(*Handle)(nil).SizeBytes() +
   807  		(*Handle)(nil).SizeBytes() +
   808  		(*Handle)(nil).SizeBytes()*NV_MAX_SUBDEVICES +
   809  		8*NV_MAX_SUBDEVICES +
   810  		(*Handle)(nil).SizeBytes() +
   811  		(*NV_MEMORY_DESC_PARAMS)(nil).SizeBytes() +
   812  		(*NV_MEMORY_DESC_PARAMS)(nil).SizeBytes() +
   813  		(*NV_MEMORY_DESC_PARAMS)(nil).SizeBytes() +
   814  		(*NV_MEMORY_DESC_PARAMS)(nil).SizeBytes() +
   815  		(*Handle)(nil).SizeBytes() +
   816  		(*NV_MEMORY_DESC_PARAMS)(nil).SizeBytes() +
   817  		(*NV_MEMORY_DESC_PARAMS)(nil).SizeBytes()
   818  }
   819  
   820  // MarshalBytes implements marshal.Marshallable.MarshalBytes.
   821  func (n *NV_CHANNEL_ALLOC_PARAMS) MarshalBytes(dst []byte) []byte {
   822  	dst = n.HObjectError.MarshalUnsafe(dst)
   823  	dst = n.HObjectBuffer.MarshalUnsafe(dst)
   824  	hostarch.ByteOrder.PutUint64(dst[:8], uint64(n.GPFIFOOffset))
   825  	dst = dst[8:]
   826  	hostarch.ByteOrder.PutUint32(dst[:4], uint32(n.GPFIFOEntries))
   827  	dst = dst[4:]
   828  	hostarch.ByteOrder.PutUint32(dst[:4], uint32(n.Flags))
   829  	dst = dst[4:]
   830  	dst = n.HContextShare.MarshalUnsafe(dst)
   831  	dst = n.HVASpace.MarshalUnsafe(dst)
   832  	for idx := 0; idx < NV_MAX_SUBDEVICES; idx++ {
   833  		dst = n.HUserdMemory[idx].MarshalUnsafe(dst)
   834  	}
   835  	for idx := 0; idx < NV_MAX_SUBDEVICES; idx++ {
   836  		hostarch.ByteOrder.PutUint64(dst[:8], uint64(n.UserdOffset[idx]))
   837  		dst = dst[8:]
   838  	}
   839  	hostarch.ByteOrder.PutUint32(dst[:4], uint32(n.EngineType))
   840  	dst = dst[4:]
   841  	hostarch.ByteOrder.PutUint32(dst[:4], uint32(n.CID))
   842  	dst = dst[4:]
   843  	hostarch.ByteOrder.PutUint32(dst[:4], uint32(n.SubDeviceID))
   844  	dst = dst[4:]
   845  	dst = n.HObjectECCError.MarshalUnsafe(dst)
   846  	dst = n.InstanceMem.MarshalUnsafe(dst)
   847  	dst = n.UserdMem.MarshalUnsafe(dst)
   848  	dst = n.RamfcMem.MarshalUnsafe(dst)
   849  	dst = n.MthdbufMem.MarshalUnsafe(dst)
   850  	dst = n.HPhysChannelGroup.MarshalUnsafe(dst)
   851  	hostarch.ByteOrder.PutUint32(dst[:4], uint32(n.InternalFlags))
   852  	dst = dst[4:]
   853  	dst = n.ErrorNotifierMem.MarshalUnsafe(dst)
   854  	dst = n.ECCErrorNotifierMem.MarshalUnsafe(dst)
   855  	hostarch.ByteOrder.PutUint32(dst[:4], uint32(n.ProcessID))
   856  	dst = dst[4:]
   857  	hostarch.ByteOrder.PutUint32(dst[:4], uint32(n.SubProcessID))
   858  	dst = dst[4:]
   859  	return dst
   860  }
   861  
   862  // UnmarshalBytes implements marshal.Marshallable.UnmarshalBytes.
   863  func (n *NV_CHANNEL_ALLOC_PARAMS) UnmarshalBytes(src []byte) []byte {
   864  	src = n.HObjectError.UnmarshalUnsafe(src)
   865  	src = n.HObjectBuffer.UnmarshalUnsafe(src)
   866  	n.GPFIFOOffset = uint64(hostarch.ByteOrder.Uint64(src[:8]))
   867  	src = src[8:]
   868  	n.GPFIFOEntries = uint32(hostarch.ByteOrder.Uint32(src[:4]))
   869  	src = src[4:]
   870  	n.Flags = uint32(hostarch.ByteOrder.Uint32(src[:4]))
   871  	src = src[4:]
   872  	src = n.HContextShare.UnmarshalUnsafe(src)
   873  	src = n.HVASpace.UnmarshalUnsafe(src)
   874  	for idx := 0; idx < NV_MAX_SUBDEVICES; idx++ {
   875  		src = n.HUserdMemory[idx].UnmarshalUnsafe(src)
   876  	}
   877  	for idx := 0; idx < NV_MAX_SUBDEVICES; idx++ {
   878  		n.UserdOffset[idx] = uint64(hostarch.ByteOrder.Uint64(src[:8]))
   879  		src = src[8:]
   880  	}
   881  	n.EngineType = uint32(hostarch.ByteOrder.Uint32(src[:4]))
   882  	src = src[4:]
   883  	n.CID = uint32(hostarch.ByteOrder.Uint32(src[:4]))
   884  	src = src[4:]
   885  	n.SubDeviceID = uint32(hostarch.ByteOrder.Uint32(src[:4]))
   886  	src = src[4:]
   887  	src = n.HObjectECCError.UnmarshalUnsafe(src)
   888  	src = n.InstanceMem.UnmarshalUnsafe(src)
   889  	src = n.UserdMem.UnmarshalUnsafe(src)
   890  	src = n.RamfcMem.UnmarshalUnsafe(src)
   891  	src = n.MthdbufMem.UnmarshalUnsafe(src)
   892  	src = n.HPhysChannelGroup.UnmarshalUnsafe(src)
   893  	n.InternalFlags = uint32(hostarch.ByteOrder.Uint32(src[:4]))
   894  	src = src[4:]
   895  	src = n.ErrorNotifierMem.UnmarshalUnsafe(src)
   896  	src = n.ECCErrorNotifierMem.UnmarshalUnsafe(src)
   897  	n.ProcessID = uint32(hostarch.ByteOrder.Uint32(src[:4]))
   898  	src = src[4:]
   899  	n.SubProcessID = uint32(hostarch.ByteOrder.Uint32(src[:4]))
   900  	src = src[4:]
   901  	return src
   902  }
   903  
   904  // Packed implements marshal.Marshallable.Packed.
   905  //
   906  //go:nosplit
   907  func (n *NV_CHANNEL_ALLOC_PARAMS) Packed() bool {
   908  	return n.ECCErrorNotifierMem.Packed() && n.ErrorNotifierMem.Packed() && n.HContextShare.Packed() && n.HObjectBuffer.Packed() && n.HObjectECCError.Packed() && n.HObjectError.Packed() && n.HPhysChannelGroup.Packed() && n.HUserdMemory[0].Packed() && n.HVASpace.Packed() && n.InstanceMem.Packed() && n.MthdbufMem.Packed() && n.RamfcMem.Packed() && n.UserdMem.Packed()
   909  }
   910  
   911  // MarshalUnsafe implements marshal.Marshallable.MarshalUnsafe.
   912  func (n *NV_CHANNEL_ALLOC_PARAMS) MarshalUnsafe(dst []byte) []byte {
   913  	if n.ECCErrorNotifierMem.Packed() && n.ErrorNotifierMem.Packed() && n.HContextShare.Packed() && n.HObjectBuffer.Packed() && n.HObjectECCError.Packed() && n.HObjectError.Packed() && n.HPhysChannelGroup.Packed() && n.HUserdMemory[0].Packed() && n.HVASpace.Packed() && n.InstanceMem.Packed() && n.MthdbufMem.Packed() && n.RamfcMem.Packed() && n.UserdMem.Packed() {
   914  		size := n.SizeBytes()
   915  		gohacks.Memmove(unsafe.Pointer(&dst[0]), unsafe.Pointer(n), uintptr(size))
   916  		return dst[size:]
   917  	}
   918  	// Type NV_CHANNEL_ALLOC_PARAMS doesn't have a packed layout in memory, fallback to MarshalBytes.
   919  	return n.MarshalBytes(dst)
   920  }
   921  
   922  // UnmarshalUnsafe implements marshal.Marshallable.UnmarshalUnsafe.
   923  func (n *NV_CHANNEL_ALLOC_PARAMS) UnmarshalUnsafe(src []byte) []byte {
   924  	if n.ECCErrorNotifierMem.Packed() && n.ErrorNotifierMem.Packed() && n.HContextShare.Packed() && n.HObjectBuffer.Packed() && n.HObjectECCError.Packed() && n.HObjectError.Packed() && n.HPhysChannelGroup.Packed() && n.HUserdMemory[0].Packed() && n.HVASpace.Packed() && n.InstanceMem.Packed() && n.MthdbufMem.Packed() && n.RamfcMem.Packed() && n.UserdMem.Packed() {
   925  		size := n.SizeBytes()
   926  		gohacks.Memmove(unsafe.Pointer(n), unsafe.Pointer(&src[0]), uintptr(size))
   927  		return src[size:]
   928  	}
   929  	// Type NV_CHANNEL_ALLOC_PARAMS doesn't have a packed layout in memory, fallback to UnmarshalBytes.
   930  	return n.UnmarshalBytes(src)
   931  }
   932  
   933  // CopyOutN implements marshal.Marshallable.CopyOutN.
   934  func (n *NV_CHANNEL_ALLOC_PARAMS) CopyOutN(cc marshal.CopyContext, addr hostarch.Addr, limit int) (int, error) {
   935  	if !n.ECCErrorNotifierMem.Packed() && n.ErrorNotifierMem.Packed() && n.HContextShare.Packed() && n.HObjectBuffer.Packed() && n.HObjectECCError.Packed() && n.HObjectError.Packed() && n.HPhysChannelGroup.Packed() && n.HUserdMemory[0].Packed() && n.HVASpace.Packed() && n.InstanceMem.Packed() && n.MthdbufMem.Packed() && n.RamfcMem.Packed() && n.UserdMem.Packed() {
   936  		// Type NV_CHANNEL_ALLOC_PARAMS doesn't have a packed layout in memory, fall back to MarshalBytes.
   937  		buf := cc.CopyScratchBuffer(n.SizeBytes()) // escapes: okay.
   938  		n.MarshalBytes(buf)                        // escapes: fallback.
   939  		return cc.CopyOutBytes(addr, buf[:limit])  // escapes: okay.
   940  	}
   941  
   942  	// Construct a slice backed by dst's underlying memory.
   943  	var buf []byte
   944  	hdr := (*reflect.SliceHeader)(unsafe.Pointer(&buf))
   945  	hdr.Data = uintptr(gohacks.Noescape(unsafe.Pointer(n)))
   946  	hdr.Len = n.SizeBytes()
   947  	hdr.Cap = n.SizeBytes()
   948  
   949  	length, err := cc.CopyOutBytes(addr, buf[:limit]) // escapes: okay.
   950  	// Since we bypassed the compiler's escape analysis, indicate that n
   951  	// must live until the use above.
   952  	runtime.KeepAlive(n) // escapes: replaced by intrinsic.
   953  	return length, err
   954  }
   955  
   956  // CopyOut implements marshal.Marshallable.CopyOut.
   957  func (n *NV_CHANNEL_ALLOC_PARAMS) CopyOut(cc marshal.CopyContext, addr hostarch.Addr) (int, error) {
   958  	return n.CopyOutN(cc, addr, n.SizeBytes())
   959  }
   960  
   961  // CopyIn implements marshal.Marshallable.CopyIn.
   962  func (n *NV_CHANNEL_ALLOC_PARAMS) CopyIn(cc marshal.CopyContext, addr hostarch.Addr) (int, error) {
   963  	if !n.ECCErrorNotifierMem.Packed() && n.ErrorNotifierMem.Packed() && n.HContextShare.Packed() && n.HObjectBuffer.Packed() && n.HObjectECCError.Packed() && n.HObjectError.Packed() && n.HPhysChannelGroup.Packed() && n.HUserdMemory[0].Packed() && n.HVASpace.Packed() && n.InstanceMem.Packed() && n.MthdbufMem.Packed() && n.RamfcMem.Packed() && n.UserdMem.Packed() {
   964  		// Type NV_CHANNEL_ALLOC_PARAMS doesn't have a packed layout in memory, fall back to UnmarshalBytes.
   965  		buf := cc.CopyScratchBuffer(n.SizeBytes()) // escapes: okay.
   966  		length, err := cc.CopyInBytes(addr, buf)   // escapes: okay.
   967  		// Unmarshal unconditionally. If we had a short copy-in, this results in a
   968  		// partially unmarshalled struct.
   969  		n.UnmarshalBytes(buf) // escapes: fallback.
   970  		return length, err
   971  	}
   972  
   973  	// Construct a slice backed by dst's underlying memory.
   974  	var buf []byte
   975  	hdr := (*reflect.SliceHeader)(unsafe.Pointer(&buf))
   976  	hdr.Data = uintptr(gohacks.Noescape(unsafe.Pointer(n)))
   977  	hdr.Len = n.SizeBytes()
   978  	hdr.Cap = n.SizeBytes()
   979  
   980  	length, err := cc.CopyInBytes(addr, buf) // escapes: okay.
   981  	// Since we bypassed the compiler's escape analysis, indicate that n
   982  	// must live until the use above.
   983  	runtime.KeepAlive(n) // escapes: replaced by intrinsic.
   984  	return length, err
   985  }
   986  
   987  // WriteTo implements io.WriterTo.WriteTo.
   988  func (n *NV_CHANNEL_ALLOC_PARAMS) WriteTo(writer io.Writer) (int64, error) {
   989  	if !n.ECCErrorNotifierMem.Packed() && n.ErrorNotifierMem.Packed() && n.HContextShare.Packed() && n.HObjectBuffer.Packed() && n.HObjectECCError.Packed() && n.HObjectError.Packed() && n.HPhysChannelGroup.Packed() && n.HUserdMemory[0].Packed() && n.HVASpace.Packed() && n.InstanceMem.Packed() && n.MthdbufMem.Packed() && n.RamfcMem.Packed() && n.UserdMem.Packed() {
   990  		// Type NV_CHANNEL_ALLOC_PARAMS doesn't have a packed layout in memory, fall back to MarshalBytes.
   991  		buf := make([]byte, n.SizeBytes())
   992  		n.MarshalBytes(buf)
   993  		length, err := writer.Write(buf)
   994  		return int64(length), err
   995  	}
   996  
   997  	// Construct a slice backed by dst's underlying memory.
   998  	var buf []byte
   999  	hdr := (*reflect.SliceHeader)(unsafe.Pointer(&buf))
  1000  	hdr.Data = uintptr(gohacks.Noescape(unsafe.Pointer(n)))
  1001  	hdr.Len = n.SizeBytes()
  1002  	hdr.Cap = n.SizeBytes()
  1003  
  1004  	length, err := writer.Write(buf)
  1005  	// Since we bypassed the compiler's escape analysis, indicate that n
  1006  	// must live until the use above.
  1007  	runtime.KeepAlive(n) // escapes: replaced by intrinsic.
  1008  	return int64(length), err
  1009  }
  1010  
  1011  // SizeBytes implements marshal.Marshallable.SizeBytes.
  1012  func (n *NV_CHANNEL_GROUP_ALLOCATION_PARAMETERS) SizeBytes() int {
  1013  	return 5 +
  1014  		(*Handle)(nil).SizeBytes() +
  1015  		(*Handle)(nil).SizeBytes() +
  1016  		(*Handle)(nil).SizeBytes() +
  1017  		1*3
  1018  }
  1019  
  1020  // MarshalBytes implements marshal.Marshallable.MarshalBytes.
  1021  func (n *NV_CHANNEL_GROUP_ALLOCATION_PARAMETERS) MarshalBytes(dst []byte) []byte {
  1022  	dst = n.HObjectError.MarshalUnsafe(dst)
  1023  	dst = n.HObjectECCError.MarshalUnsafe(dst)
  1024  	dst = n.HVASpace.MarshalUnsafe(dst)
  1025  	hostarch.ByteOrder.PutUint32(dst[:4], uint32(n.EngineType))
  1026  	dst = dst[4:]
  1027  	dst[0] = byte(n.BIsCallingContextVgpuPlugin)
  1028  	dst = dst[1:]
  1029  	for idx := 0; idx < 3; idx++ {
  1030  		dst[0] = byte(n.Pad0[idx])
  1031  		dst = dst[1:]
  1032  	}
  1033  	return dst
  1034  }
  1035  
  1036  // UnmarshalBytes implements marshal.Marshallable.UnmarshalBytes.
  1037  func (n *NV_CHANNEL_GROUP_ALLOCATION_PARAMETERS) UnmarshalBytes(src []byte) []byte {
  1038  	src = n.HObjectError.UnmarshalUnsafe(src)
  1039  	src = n.HObjectECCError.UnmarshalUnsafe(src)
  1040  	src = n.HVASpace.UnmarshalUnsafe(src)
  1041  	n.EngineType = uint32(hostarch.ByteOrder.Uint32(src[:4]))
  1042  	src = src[4:]
  1043  	n.BIsCallingContextVgpuPlugin = uint8(src[0])
  1044  	src = src[1:]
  1045  	for idx := 0; idx < 3; idx++ {
  1046  		n.Pad0[idx] = src[0]
  1047  		src = src[1:]
  1048  	}
  1049  	return src
  1050  }
  1051  
  1052  // Packed implements marshal.Marshallable.Packed.
  1053  //
  1054  //go:nosplit
  1055  func (n *NV_CHANNEL_GROUP_ALLOCATION_PARAMETERS) Packed() bool {
  1056  	return n.HObjectECCError.Packed() && n.HObjectError.Packed() && n.HVASpace.Packed()
  1057  }
  1058  
  1059  // MarshalUnsafe implements marshal.Marshallable.MarshalUnsafe.
  1060  func (n *NV_CHANNEL_GROUP_ALLOCATION_PARAMETERS) MarshalUnsafe(dst []byte) []byte {
  1061  	if n.HObjectECCError.Packed() && n.HObjectError.Packed() && n.HVASpace.Packed() {
  1062  		size := n.SizeBytes()
  1063  		gohacks.Memmove(unsafe.Pointer(&dst[0]), unsafe.Pointer(n), uintptr(size))
  1064  		return dst[size:]
  1065  	}
  1066  	// Type NV_CHANNEL_GROUP_ALLOCATION_PARAMETERS doesn't have a packed layout in memory, fallback to MarshalBytes.
  1067  	return n.MarshalBytes(dst)
  1068  }
  1069  
  1070  // UnmarshalUnsafe implements marshal.Marshallable.UnmarshalUnsafe.
  1071  func (n *NV_CHANNEL_GROUP_ALLOCATION_PARAMETERS) UnmarshalUnsafe(src []byte) []byte {
  1072  	if n.HObjectECCError.Packed() && n.HObjectError.Packed() && n.HVASpace.Packed() {
  1073  		size := n.SizeBytes()
  1074  		gohacks.Memmove(unsafe.Pointer(n), unsafe.Pointer(&src[0]), uintptr(size))
  1075  		return src[size:]
  1076  	}
  1077  	// Type NV_CHANNEL_GROUP_ALLOCATION_PARAMETERS doesn't have a packed layout in memory, fallback to UnmarshalBytes.
  1078  	return n.UnmarshalBytes(src)
  1079  }
  1080  
  1081  // CopyOutN implements marshal.Marshallable.CopyOutN.
  1082  func (n *NV_CHANNEL_GROUP_ALLOCATION_PARAMETERS) CopyOutN(cc marshal.CopyContext, addr hostarch.Addr, limit int) (int, error) {
  1083  	if !n.HObjectECCError.Packed() && n.HObjectError.Packed() && n.HVASpace.Packed() {
  1084  		// Type NV_CHANNEL_GROUP_ALLOCATION_PARAMETERS doesn't have a packed layout in memory, fall back to MarshalBytes.
  1085  		buf := cc.CopyScratchBuffer(n.SizeBytes()) // escapes: okay.
  1086  		n.MarshalBytes(buf)                        // escapes: fallback.
  1087  		return cc.CopyOutBytes(addr, buf[:limit])  // escapes: okay.
  1088  	}
  1089  
  1090  	// Construct a slice backed by dst's underlying memory.
  1091  	var buf []byte
  1092  	hdr := (*reflect.SliceHeader)(unsafe.Pointer(&buf))
  1093  	hdr.Data = uintptr(gohacks.Noescape(unsafe.Pointer(n)))
  1094  	hdr.Len = n.SizeBytes()
  1095  	hdr.Cap = n.SizeBytes()
  1096  
  1097  	length, err := cc.CopyOutBytes(addr, buf[:limit]) // escapes: okay.
  1098  	// Since we bypassed the compiler's escape analysis, indicate that n
  1099  	// must live until the use above.
  1100  	runtime.KeepAlive(n) // escapes: replaced by intrinsic.
  1101  	return length, err
  1102  }
  1103  
  1104  // CopyOut implements marshal.Marshallable.CopyOut.
  1105  func (n *NV_CHANNEL_GROUP_ALLOCATION_PARAMETERS) CopyOut(cc marshal.CopyContext, addr hostarch.Addr) (int, error) {
  1106  	return n.CopyOutN(cc, addr, n.SizeBytes())
  1107  }
  1108  
  1109  // CopyIn implements marshal.Marshallable.CopyIn.
  1110  func (n *NV_CHANNEL_GROUP_ALLOCATION_PARAMETERS) CopyIn(cc marshal.CopyContext, addr hostarch.Addr) (int, error) {
  1111  	if !n.HObjectECCError.Packed() && n.HObjectError.Packed() && n.HVASpace.Packed() {
  1112  		// Type NV_CHANNEL_GROUP_ALLOCATION_PARAMETERS doesn't have a packed layout in memory, fall back to UnmarshalBytes.
  1113  		buf := cc.CopyScratchBuffer(n.SizeBytes()) // escapes: okay.
  1114  		length, err := cc.CopyInBytes(addr, buf)   // escapes: okay.
  1115  		// Unmarshal unconditionally. If we had a short copy-in, this results in a
  1116  		// partially unmarshalled struct.
  1117  		n.UnmarshalBytes(buf) // escapes: fallback.
  1118  		return length, err
  1119  	}
  1120  
  1121  	// Construct a slice backed by dst's underlying memory.
  1122  	var buf []byte
  1123  	hdr := (*reflect.SliceHeader)(unsafe.Pointer(&buf))
  1124  	hdr.Data = uintptr(gohacks.Noescape(unsafe.Pointer(n)))
  1125  	hdr.Len = n.SizeBytes()
  1126  	hdr.Cap = n.SizeBytes()
  1127  
  1128  	length, err := cc.CopyInBytes(addr, buf) // escapes: okay.
  1129  	// Since we bypassed the compiler's escape analysis, indicate that n
  1130  	// must live until the use above.
  1131  	runtime.KeepAlive(n) // escapes: replaced by intrinsic.
  1132  	return length, err
  1133  }
  1134  
  1135  // WriteTo implements io.WriterTo.WriteTo.
  1136  func (n *NV_CHANNEL_GROUP_ALLOCATION_PARAMETERS) WriteTo(writer io.Writer) (int64, error) {
  1137  	if !n.HObjectECCError.Packed() && n.HObjectError.Packed() && n.HVASpace.Packed() {
  1138  		// Type NV_CHANNEL_GROUP_ALLOCATION_PARAMETERS doesn't have a packed layout in memory, fall back to MarshalBytes.
  1139  		buf := make([]byte, n.SizeBytes())
  1140  		n.MarshalBytes(buf)
  1141  		length, err := writer.Write(buf)
  1142  		return int64(length), err
  1143  	}
  1144  
  1145  	// Construct a slice backed by dst's underlying memory.
  1146  	var buf []byte
  1147  	hdr := (*reflect.SliceHeader)(unsafe.Pointer(&buf))
  1148  	hdr.Data = uintptr(gohacks.Noescape(unsafe.Pointer(n)))
  1149  	hdr.Len = n.SizeBytes()
  1150  	hdr.Cap = n.SizeBytes()
  1151  
  1152  	length, err := writer.Write(buf)
  1153  	// Since we bypassed the compiler's escape analysis, indicate that n
  1154  	// must live until the use above.
  1155  	runtime.KeepAlive(n) // escapes: replaced by intrinsic.
  1156  	return int64(length), err
  1157  }
  1158  
  1159  // SizeBytes implements marshal.Marshallable.SizeBytes.
  1160  func (n *NV_CTXSHARE_ALLOCATION_PARAMETERS) SizeBytes() int {
  1161  	return 8 +
  1162  		(*Handle)(nil).SizeBytes()
  1163  }
  1164  
  1165  // MarshalBytes implements marshal.Marshallable.MarshalBytes.
  1166  func (n *NV_CTXSHARE_ALLOCATION_PARAMETERS) MarshalBytes(dst []byte) []byte {
  1167  	dst = n.HVASpace.MarshalUnsafe(dst)
  1168  	hostarch.ByteOrder.PutUint32(dst[:4], uint32(n.Flags))
  1169  	dst = dst[4:]
  1170  	hostarch.ByteOrder.PutUint32(dst[:4], uint32(n.SubctxID))
  1171  	dst = dst[4:]
  1172  	return dst
  1173  }
  1174  
  1175  // UnmarshalBytes implements marshal.Marshallable.UnmarshalBytes.
  1176  func (n *NV_CTXSHARE_ALLOCATION_PARAMETERS) UnmarshalBytes(src []byte) []byte {
  1177  	src = n.HVASpace.UnmarshalUnsafe(src)
  1178  	n.Flags = uint32(hostarch.ByteOrder.Uint32(src[:4]))
  1179  	src = src[4:]
  1180  	n.SubctxID = uint32(hostarch.ByteOrder.Uint32(src[:4]))
  1181  	src = src[4:]
  1182  	return src
  1183  }
  1184  
  1185  // Packed implements marshal.Marshallable.Packed.
  1186  //
  1187  //go:nosplit
  1188  func (n *NV_CTXSHARE_ALLOCATION_PARAMETERS) Packed() bool {
  1189  	return n.HVASpace.Packed()
  1190  }
  1191  
  1192  // MarshalUnsafe implements marshal.Marshallable.MarshalUnsafe.
  1193  func (n *NV_CTXSHARE_ALLOCATION_PARAMETERS) MarshalUnsafe(dst []byte) []byte {
  1194  	if n.HVASpace.Packed() {
  1195  		size := n.SizeBytes()
  1196  		gohacks.Memmove(unsafe.Pointer(&dst[0]), unsafe.Pointer(n), uintptr(size))
  1197  		return dst[size:]
  1198  	}
  1199  	// Type NV_CTXSHARE_ALLOCATION_PARAMETERS doesn't have a packed layout in memory, fallback to MarshalBytes.
  1200  	return n.MarshalBytes(dst)
  1201  }
  1202  
  1203  // UnmarshalUnsafe implements marshal.Marshallable.UnmarshalUnsafe.
  1204  func (n *NV_CTXSHARE_ALLOCATION_PARAMETERS) UnmarshalUnsafe(src []byte) []byte {
  1205  	if n.HVASpace.Packed() {
  1206  		size := n.SizeBytes()
  1207  		gohacks.Memmove(unsafe.Pointer(n), unsafe.Pointer(&src[0]), uintptr(size))
  1208  		return src[size:]
  1209  	}
  1210  	// Type NV_CTXSHARE_ALLOCATION_PARAMETERS doesn't have a packed layout in memory, fallback to UnmarshalBytes.
  1211  	return n.UnmarshalBytes(src)
  1212  }
  1213  
  1214  // CopyOutN implements marshal.Marshallable.CopyOutN.
  1215  func (n *NV_CTXSHARE_ALLOCATION_PARAMETERS) CopyOutN(cc marshal.CopyContext, addr hostarch.Addr, limit int) (int, error) {
  1216  	if !n.HVASpace.Packed() {
  1217  		// Type NV_CTXSHARE_ALLOCATION_PARAMETERS doesn't have a packed layout in memory, fall back to MarshalBytes.
  1218  		buf := cc.CopyScratchBuffer(n.SizeBytes()) // escapes: okay.
  1219  		n.MarshalBytes(buf)                        // escapes: fallback.
  1220  		return cc.CopyOutBytes(addr, buf[:limit])  // escapes: okay.
  1221  	}
  1222  
  1223  	// Construct a slice backed by dst's underlying memory.
  1224  	var buf []byte
  1225  	hdr := (*reflect.SliceHeader)(unsafe.Pointer(&buf))
  1226  	hdr.Data = uintptr(gohacks.Noescape(unsafe.Pointer(n)))
  1227  	hdr.Len = n.SizeBytes()
  1228  	hdr.Cap = n.SizeBytes()
  1229  
  1230  	length, err := cc.CopyOutBytes(addr, buf[:limit]) // escapes: okay.
  1231  	// Since we bypassed the compiler's escape analysis, indicate that n
  1232  	// must live until the use above.
  1233  	runtime.KeepAlive(n) // escapes: replaced by intrinsic.
  1234  	return length, err
  1235  }
  1236  
  1237  // CopyOut implements marshal.Marshallable.CopyOut.
  1238  func (n *NV_CTXSHARE_ALLOCATION_PARAMETERS) CopyOut(cc marshal.CopyContext, addr hostarch.Addr) (int, error) {
  1239  	return n.CopyOutN(cc, addr, n.SizeBytes())
  1240  }
  1241  
  1242  // CopyIn implements marshal.Marshallable.CopyIn.
  1243  func (n *NV_CTXSHARE_ALLOCATION_PARAMETERS) CopyIn(cc marshal.CopyContext, addr hostarch.Addr) (int, error) {
  1244  	if !n.HVASpace.Packed() {
  1245  		// Type NV_CTXSHARE_ALLOCATION_PARAMETERS doesn't have a packed layout in memory, fall back to UnmarshalBytes.
  1246  		buf := cc.CopyScratchBuffer(n.SizeBytes()) // escapes: okay.
  1247  		length, err := cc.CopyInBytes(addr, buf)   // escapes: okay.
  1248  		// Unmarshal unconditionally. If we had a short copy-in, this results in a
  1249  		// partially unmarshalled struct.
  1250  		n.UnmarshalBytes(buf) // escapes: fallback.
  1251  		return length, err
  1252  	}
  1253  
  1254  	// Construct a slice backed by dst's underlying memory.
  1255  	var buf []byte
  1256  	hdr := (*reflect.SliceHeader)(unsafe.Pointer(&buf))
  1257  	hdr.Data = uintptr(gohacks.Noescape(unsafe.Pointer(n)))
  1258  	hdr.Len = n.SizeBytes()
  1259  	hdr.Cap = n.SizeBytes()
  1260  
  1261  	length, err := cc.CopyInBytes(addr, buf) // escapes: okay.
  1262  	// Since we bypassed the compiler's escape analysis, indicate that n
  1263  	// must live until the use above.
  1264  	runtime.KeepAlive(n) // escapes: replaced by intrinsic.
  1265  	return length, err
  1266  }
  1267  
  1268  // WriteTo implements io.WriterTo.WriteTo.
  1269  func (n *NV_CTXSHARE_ALLOCATION_PARAMETERS) WriteTo(writer io.Writer) (int64, error) {
  1270  	if !n.HVASpace.Packed() {
  1271  		// Type NV_CTXSHARE_ALLOCATION_PARAMETERS doesn't have a packed layout in memory, fall back to MarshalBytes.
  1272  		buf := make([]byte, n.SizeBytes())
  1273  		n.MarshalBytes(buf)
  1274  		length, err := writer.Write(buf)
  1275  		return int64(length), err
  1276  	}
  1277  
  1278  	// Construct a slice backed by dst's underlying memory.
  1279  	var buf []byte
  1280  	hdr := (*reflect.SliceHeader)(unsafe.Pointer(&buf))
  1281  	hdr.Data = uintptr(gohacks.Noescape(unsafe.Pointer(n)))
  1282  	hdr.Len = n.SizeBytes()
  1283  	hdr.Cap = n.SizeBytes()
  1284  
  1285  	length, err := writer.Write(buf)
  1286  	// Since we bypassed the compiler's escape analysis, indicate that n
  1287  	// must live until the use above.
  1288  	runtime.KeepAlive(n) // escapes: replaced by intrinsic.
  1289  	return int64(length), err
  1290  }
  1291  
  1292  // SizeBytes implements marshal.Marshallable.SizeBytes.
  1293  func (n *NV_GR_ALLOCATION_PARAMETERS) SizeBytes() int {
  1294  	return 16
  1295  }
  1296  
  1297  // MarshalBytes implements marshal.Marshallable.MarshalBytes.
  1298  func (n *NV_GR_ALLOCATION_PARAMETERS) MarshalBytes(dst []byte) []byte {
  1299  	hostarch.ByteOrder.PutUint32(dst[:4], uint32(n.Version))
  1300  	dst = dst[4:]
  1301  	hostarch.ByteOrder.PutUint32(dst[:4], uint32(n.Flags))
  1302  	dst = dst[4:]
  1303  	hostarch.ByteOrder.PutUint32(dst[:4], uint32(n.Size))
  1304  	dst = dst[4:]
  1305  	hostarch.ByteOrder.PutUint32(dst[:4], uint32(n.Caps))
  1306  	dst = dst[4:]
  1307  	return dst
  1308  }
  1309  
  1310  // UnmarshalBytes implements marshal.Marshallable.UnmarshalBytes.
  1311  func (n *NV_GR_ALLOCATION_PARAMETERS) UnmarshalBytes(src []byte) []byte {
  1312  	n.Version = uint32(hostarch.ByteOrder.Uint32(src[:4]))
  1313  	src = src[4:]
  1314  	n.Flags = uint32(hostarch.ByteOrder.Uint32(src[:4]))
  1315  	src = src[4:]
  1316  	n.Size = uint32(hostarch.ByteOrder.Uint32(src[:4]))
  1317  	src = src[4:]
  1318  	n.Caps = uint32(hostarch.ByteOrder.Uint32(src[:4]))
  1319  	src = src[4:]
  1320  	return src
  1321  }
  1322  
  1323  // Packed implements marshal.Marshallable.Packed.
  1324  //
  1325  //go:nosplit
  1326  func (n *NV_GR_ALLOCATION_PARAMETERS) Packed() bool {
  1327  	return true
  1328  }
  1329  
  1330  // MarshalUnsafe implements marshal.Marshallable.MarshalUnsafe.
  1331  func (n *NV_GR_ALLOCATION_PARAMETERS) MarshalUnsafe(dst []byte) []byte {
  1332  	size := n.SizeBytes()
  1333  	gohacks.Memmove(unsafe.Pointer(&dst[0]), unsafe.Pointer(n), uintptr(size))
  1334  	return dst[size:]
  1335  }
  1336  
  1337  // UnmarshalUnsafe implements marshal.Marshallable.UnmarshalUnsafe.
  1338  func (n *NV_GR_ALLOCATION_PARAMETERS) UnmarshalUnsafe(src []byte) []byte {
  1339  	size := n.SizeBytes()
  1340  	gohacks.Memmove(unsafe.Pointer(n), unsafe.Pointer(&src[0]), uintptr(size))
  1341  	return src[size:]
  1342  }
  1343  
  1344  // CopyOutN implements marshal.Marshallable.CopyOutN.
  1345  func (n *NV_GR_ALLOCATION_PARAMETERS) CopyOutN(cc marshal.CopyContext, addr hostarch.Addr, limit int) (int, error) {
  1346  	// Construct a slice backed by dst's underlying memory.
  1347  	var buf []byte
  1348  	hdr := (*reflect.SliceHeader)(unsafe.Pointer(&buf))
  1349  	hdr.Data = uintptr(gohacks.Noescape(unsafe.Pointer(n)))
  1350  	hdr.Len = n.SizeBytes()
  1351  	hdr.Cap = n.SizeBytes()
  1352  
  1353  	length, err := cc.CopyOutBytes(addr, buf[:limit]) // escapes: okay.
  1354  	// Since we bypassed the compiler's escape analysis, indicate that n
  1355  	// must live until the use above.
  1356  	runtime.KeepAlive(n) // escapes: replaced by intrinsic.
  1357  	return length, err
  1358  }
  1359  
  1360  // CopyOut implements marshal.Marshallable.CopyOut.
  1361  func (n *NV_GR_ALLOCATION_PARAMETERS) CopyOut(cc marshal.CopyContext, addr hostarch.Addr) (int, error) {
  1362  	return n.CopyOutN(cc, addr, n.SizeBytes())
  1363  }
  1364  
  1365  // CopyIn implements marshal.Marshallable.CopyIn.
  1366  func (n *NV_GR_ALLOCATION_PARAMETERS) CopyIn(cc marshal.CopyContext, addr hostarch.Addr) (int, error) {
  1367  	// Construct a slice backed by dst's underlying memory.
  1368  	var buf []byte
  1369  	hdr := (*reflect.SliceHeader)(unsafe.Pointer(&buf))
  1370  	hdr.Data = uintptr(gohacks.Noescape(unsafe.Pointer(n)))
  1371  	hdr.Len = n.SizeBytes()
  1372  	hdr.Cap = n.SizeBytes()
  1373  
  1374  	length, err := cc.CopyInBytes(addr, buf) // escapes: okay.
  1375  	// Since we bypassed the compiler's escape analysis, indicate that n
  1376  	// must live until the use above.
  1377  	runtime.KeepAlive(n) // escapes: replaced by intrinsic.
  1378  	return length, err
  1379  }
  1380  
  1381  // WriteTo implements io.WriterTo.WriteTo.
  1382  func (n *NV_GR_ALLOCATION_PARAMETERS) WriteTo(writer io.Writer) (int64, error) {
  1383  	// Construct a slice backed by dst's underlying memory.
  1384  	var buf []byte
  1385  	hdr := (*reflect.SliceHeader)(unsafe.Pointer(&buf))
  1386  	hdr.Data = uintptr(gohacks.Noescape(unsafe.Pointer(n)))
  1387  	hdr.Len = n.SizeBytes()
  1388  	hdr.Cap = n.SizeBytes()
  1389  
  1390  	length, err := writer.Write(buf)
  1391  	// Since we bypassed the compiler's escape analysis, indicate that n
  1392  	// must live until the use above.
  1393  	runtime.KeepAlive(n) // escapes: replaced by intrinsic.
  1394  	return int64(length), err
  1395  }
  1396  
  1397  // SizeBytes implements marshal.Marshallable.SizeBytes.
  1398  func (n *NV_HOPPER_USERMODE_A_PARAMS) SizeBytes() int {
  1399  	return 2
  1400  }
  1401  
  1402  // MarshalBytes implements marshal.Marshallable.MarshalBytes.
  1403  func (n *NV_HOPPER_USERMODE_A_PARAMS) MarshalBytes(dst []byte) []byte {
  1404  	dst[0] = byte(n.Bar1Mapping)
  1405  	dst = dst[1:]
  1406  	dst[0] = byte(n.Priv)
  1407  	dst = dst[1:]
  1408  	return dst
  1409  }
  1410  
  1411  // UnmarshalBytes implements marshal.Marshallable.UnmarshalBytes.
  1412  func (n *NV_HOPPER_USERMODE_A_PARAMS) UnmarshalBytes(src []byte) []byte {
  1413  	n.Bar1Mapping = uint8(src[0])
  1414  	src = src[1:]
  1415  	n.Priv = uint8(src[0])
  1416  	src = src[1:]
  1417  	return src
  1418  }
  1419  
  1420  // Packed implements marshal.Marshallable.Packed.
  1421  //
  1422  //go:nosplit
  1423  func (n *NV_HOPPER_USERMODE_A_PARAMS) Packed() bool {
  1424  	return true
  1425  }
  1426  
  1427  // MarshalUnsafe implements marshal.Marshallable.MarshalUnsafe.
  1428  func (n *NV_HOPPER_USERMODE_A_PARAMS) MarshalUnsafe(dst []byte) []byte {
  1429  	size := n.SizeBytes()
  1430  	gohacks.Memmove(unsafe.Pointer(&dst[0]), unsafe.Pointer(n), uintptr(size))
  1431  	return dst[size:]
  1432  }
  1433  
  1434  // UnmarshalUnsafe implements marshal.Marshallable.UnmarshalUnsafe.
  1435  func (n *NV_HOPPER_USERMODE_A_PARAMS) UnmarshalUnsafe(src []byte) []byte {
  1436  	size := n.SizeBytes()
  1437  	gohacks.Memmove(unsafe.Pointer(n), unsafe.Pointer(&src[0]), uintptr(size))
  1438  	return src[size:]
  1439  }
  1440  
  1441  // CopyOutN implements marshal.Marshallable.CopyOutN.
  1442  func (n *NV_HOPPER_USERMODE_A_PARAMS) CopyOutN(cc marshal.CopyContext, addr hostarch.Addr, limit int) (int, error) {
  1443  	// Construct a slice backed by dst's underlying memory.
  1444  	var buf []byte
  1445  	hdr := (*reflect.SliceHeader)(unsafe.Pointer(&buf))
  1446  	hdr.Data = uintptr(gohacks.Noescape(unsafe.Pointer(n)))
  1447  	hdr.Len = n.SizeBytes()
  1448  	hdr.Cap = n.SizeBytes()
  1449  
  1450  	length, err := cc.CopyOutBytes(addr, buf[:limit]) // escapes: okay.
  1451  	// Since we bypassed the compiler's escape analysis, indicate that n
  1452  	// must live until the use above.
  1453  	runtime.KeepAlive(n) // escapes: replaced by intrinsic.
  1454  	return length, err
  1455  }
  1456  
  1457  // CopyOut implements marshal.Marshallable.CopyOut.
  1458  func (n *NV_HOPPER_USERMODE_A_PARAMS) CopyOut(cc marshal.CopyContext, addr hostarch.Addr) (int, error) {
  1459  	return n.CopyOutN(cc, addr, n.SizeBytes())
  1460  }
  1461  
  1462  // CopyIn implements marshal.Marshallable.CopyIn.
  1463  func (n *NV_HOPPER_USERMODE_A_PARAMS) CopyIn(cc marshal.CopyContext, addr hostarch.Addr) (int, error) {
  1464  	// Construct a slice backed by dst's underlying memory.
  1465  	var buf []byte
  1466  	hdr := (*reflect.SliceHeader)(unsafe.Pointer(&buf))
  1467  	hdr.Data = uintptr(gohacks.Noescape(unsafe.Pointer(n)))
  1468  	hdr.Len = n.SizeBytes()
  1469  	hdr.Cap = n.SizeBytes()
  1470  
  1471  	length, err := cc.CopyInBytes(addr, buf) // escapes: okay.
  1472  	// Since we bypassed the compiler's escape analysis, indicate that n
  1473  	// must live until the use above.
  1474  	runtime.KeepAlive(n) // escapes: replaced by intrinsic.
  1475  	return length, err
  1476  }
  1477  
  1478  // WriteTo implements io.WriterTo.WriteTo.
  1479  func (n *NV_HOPPER_USERMODE_A_PARAMS) WriteTo(writer io.Writer) (int64, error) {
  1480  	// Construct a slice backed by dst's underlying memory.
  1481  	var buf []byte
  1482  	hdr := (*reflect.SliceHeader)(unsafe.Pointer(&buf))
  1483  	hdr.Data = uintptr(gohacks.Noescape(unsafe.Pointer(n)))
  1484  	hdr.Len = n.SizeBytes()
  1485  	hdr.Cap = n.SizeBytes()
  1486  
  1487  	length, err := writer.Write(buf)
  1488  	// Since we bypassed the compiler's escape analysis, indicate that n
  1489  	// must live until the use above.
  1490  	runtime.KeepAlive(n) // escapes: replaced by intrinsic.
  1491  	return int64(length), err
  1492  }
  1493  
  1494  // SizeBytes implements marshal.Marshallable.SizeBytes.
  1495  func (n *NV_MEMORY_DESC_PARAMS) SizeBytes() int {
  1496  	return 24
  1497  }
  1498  
  1499  // MarshalBytes implements marshal.Marshallable.MarshalBytes.
  1500  func (n *NV_MEMORY_DESC_PARAMS) MarshalBytes(dst []byte) []byte {
  1501  	hostarch.ByteOrder.PutUint64(dst[:8], uint64(n.Base))
  1502  	dst = dst[8:]
  1503  	hostarch.ByteOrder.PutUint64(dst[:8], uint64(n.Size))
  1504  	dst = dst[8:]
  1505  	hostarch.ByteOrder.PutUint32(dst[:4], uint32(n.AddressSpace))
  1506  	dst = dst[4:]
  1507  	hostarch.ByteOrder.PutUint32(dst[:4], uint32(n.CacheAttrib))
  1508  	dst = dst[4:]
  1509  	return dst
  1510  }
  1511  
  1512  // UnmarshalBytes implements marshal.Marshallable.UnmarshalBytes.
  1513  func (n *NV_MEMORY_DESC_PARAMS) UnmarshalBytes(src []byte) []byte {
  1514  	n.Base = uint64(hostarch.ByteOrder.Uint64(src[:8]))
  1515  	src = src[8:]
  1516  	n.Size = uint64(hostarch.ByteOrder.Uint64(src[:8]))
  1517  	src = src[8:]
  1518  	n.AddressSpace = uint32(hostarch.ByteOrder.Uint32(src[:4]))
  1519  	src = src[4:]
  1520  	n.CacheAttrib = uint32(hostarch.ByteOrder.Uint32(src[:4]))
  1521  	src = src[4:]
  1522  	return src
  1523  }
  1524  
  1525  // Packed implements marshal.Marshallable.Packed.
  1526  //
  1527  //go:nosplit
  1528  func (n *NV_MEMORY_DESC_PARAMS) Packed() bool {
  1529  	return true
  1530  }
  1531  
  1532  // MarshalUnsafe implements marshal.Marshallable.MarshalUnsafe.
  1533  func (n *NV_MEMORY_DESC_PARAMS) MarshalUnsafe(dst []byte) []byte {
  1534  	size := n.SizeBytes()
  1535  	gohacks.Memmove(unsafe.Pointer(&dst[0]), unsafe.Pointer(n), uintptr(size))
  1536  	return dst[size:]
  1537  }
  1538  
  1539  // UnmarshalUnsafe implements marshal.Marshallable.UnmarshalUnsafe.
  1540  func (n *NV_MEMORY_DESC_PARAMS) UnmarshalUnsafe(src []byte) []byte {
  1541  	size := n.SizeBytes()
  1542  	gohacks.Memmove(unsafe.Pointer(n), unsafe.Pointer(&src[0]), uintptr(size))
  1543  	return src[size:]
  1544  }
  1545  
  1546  // CopyOutN implements marshal.Marshallable.CopyOutN.
  1547  func (n *NV_MEMORY_DESC_PARAMS) CopyOutN(cc marshal.CopyContext, addr hostarch.Addr, limit int) (int, error) {
  1548  	// Construct a slice backed by dst's underlying memory.
  1549  	var buf []byte
  1550  	hdr := (*reflect.SliceHeader)(unsafe.Pointer(&buf))
  1551  	hdr.Data = uintptr(gohacks.Noescape(unsafe.Pointer(n)))
  1552  	hdr.Len = n.SizeBytes()
  1553  	hdr.Cap = n.SizeBytes()
  1554  
  1555  	length, err := cc.CopyOutBytes(addr, buf[:limit]) // escapes: okay.
  1556  	// Since we bypassed the compiler's escape analysis, indicate that n
  1557  	// must live until the use above.
  1558  	runtime.KeepAlive(n) // escapes: replaced by intrinsic.
  1559  	return length, err
  1560  }
  1561  
  1562  // CopyOut implements marshal.Marshallable.CopyOut.
  1563  func (n *NV_MEMORY_DESC_PARAMS) CopyOut(cc marshal.CopyContext, addr hostarch.Addr) (int, error) {
  1564  	return n.CopyOutN(cc, addr, n.SizeBytes())
  1565  }
  1566  
  1567  // CopyIn implements marshal.Marshallable.CopyIn.
  1568  func (n *NV_MEMORY_DESC_PARAMS) CopyIn(cc marshal.CopyContext, addr hostarch.Addr) (int, error) {
  1569  	// Construct a slice backed by dst's underlying memory.
  1570  	var buf []byte
  1571  	hdr := (*reflect.SliceHeader)(unsafe.Pointer(&buf))
  1572  	hdr.Data = uintptr(gohacks.Noescape(unsafe.Pointer(n)))
  1573  	hdr.Len = n.SizeBytes()
  1574  	hdr.Cap = n.SizeBytes()
  1575  
  1576  	length, err := cc.CopyInBytes(addr, buf) // escapes: okay.
  1577  	// Since we bypassed the compiler's escape analysis, indicate that n
  1578  	// must live until the use above.
  1579  	runtime.KeepAlive(n) // escapes: replaced by intrinsic.
  1580  	return length, err
  1581  }
  1582  
  1583  // WriteTo implements io.WriterTo.WriteTo.
  1584  func (n *NV_MEMORY_DESC_PARAMS) WriteTo(writer io.Writer) (int64, error) {
  1585  	// Construct a slice backed by dst's underlying memory.
  1586  	var buf []byte
  1587  	hdr := (*reflect.SliceHeader)(unsafe.Pointer(&buf))
  1588  	hdr.Data = uintptr(gohacks.Noescape(unsafe.Pointer(n)))
  1589  	hdr.Len = n.SizeBytes()
  1590  	hdr.Cap = n.SizeBytes()
  1591  
  1592  	length, err := writer.Write(buf)
  1593  	// Since we bypassed the compiler's escape analysis, indicate that n
  1594  	// must live until the use above.
  1595  	runtime.KeepAlive(n) // escapes: replaced by intrinsic.
  1596  	return int64(length), err
  1597  }
  1598  
  1599  // SizeBytes implements marshal.Marshallable.SizeBytes.
  1600  func (n *NV_VASPACE_ALLOCATION_PARAMETERS) SizeBytes() int {
  1601  	return 44 +
  1602  		1*4
  1603  }
  1604  
  1605  // MarshalBytes implements marshal.Marshallable.MarshalBytes.
  1606  func (n *NV_VASPACE_ALLOCATION_PARAMETERS) MarshalBytes(dst []byte) []byte {
  1607  	hostarch.ByteOrder.PutUint32(dst[:4], uint32(n.Index))
  1608  	dst = dst[4:]
  1609  	hostarch.ByteOrder.PutUint32(dst[:4], uint32(n.Flags))
  1610  	dst = dst[4:]
  1611  	hostarch.ByteOrder.PutUint64(dst[:8], uint64(n.VASize))
  1612  	dst = dst[8:]
  1613  	hostarch.ByteOrder.PutUint64(dst[:8], uint64(n.VAStartInternal))
  1614  	dst = dst[8:]
  1615  	hostarch.ByteOrder.PutUint64(dst[:8], uint64(n.VALimitInternal))
  1616  	dst = dst[8:]
  1617  	hostarch.ByteOrder.PutUint32(dst[:4], uint32(n.BigPageSize))
  1618  	dst = dst[4:]
  1619  	for idx := 0; idx < 4; idx++ {
  1620  		dst[0] = byte(n.Pad0[idx])
  1621  		dst = dst[1:]
  1622  	}
  1623  	hostarch.ByteOrder.PutUint64(dst[:8], uint64(n.VABase))
  1624  	dst = dst[8:]
  1625  	return dst
  1626  }
  1627  
  1628  // UnmarshalBytes implements marshal.Marshallable.UnmarshalBytes.
  1629  func (n *NV_VASPACE_ALLOCATION_PARAMETERS) UnmarshalBytes(src []byte) []byte {
  1630  	n.Index = uint32(hostarch.ByteOrder.Uint32(src[:4]))
  1631  	src = src[4:]
  1632  	n.Flags = uint32(hostarch.ByteOrder.Uint32(src[:4]))
  1633  	src = src[4:]
  1634  	n.VASize = uint64(hostarch.ByteOrder.Uint64(src[:8]))
  1635  	src = src[8:]
  1636  	n.VAStartInternal = uint64(hostarch.ByteOrder.Uint64(src[:8]))
  1637  	src = src[8:]
  1638  	n.VALimitInternal = uint64(hostarch.ByteOrder.Uint64(src[:8]))
  1639  	src = src[8:]
  1640  	n.BigPageSize = uint32(hostarch.ByteOrder.Uint32(src[:4]))
  1641  	src = src[4:]
  1642  	for idx := 0; idx < 4; idx++ {
  1643  		n.Pad0[idx] = src[0]
  1644  		src = src[1:]
  1645  	}
  1646  	n.VABase = uint64(hostarch.ByteOrder.Uint64(src[:8]))
  1647  	src = src[8:]
  1648  	return src
  1649  }
  1650  
  1651  // Packed implements marshal.Marshallable.Packed.
  1652  //
  1653  //go:nosplit
  1654  func (n *NV_VASPACE_ALLOCATION_PARAMETERS) Packed() bool {
  1655  	return true
  1656  }
  1657  
  1658  // MarshalUnsafe implements marshal.Marshallable.MarshalUnsafe.
  1659  func (n *NV_VASPACE_ALLOCATION_PARAMETERS) MarshalUnsafe(dst []byte) []byte {
  1660  	size := n.SizeBytes()
  1661  	gohacks.Memmove(unsafe.Pointer(&dst[0]), unsafe.Pointer(n), uintptr(size))
  1662  	return dst[size:]
  1663  }
  1664  
  1665  // UnmarshalUnsafe implements marshal.Marshallable.UnmarshalUnsafe.
  1666  func (n *NV_VASPACE_ALLOCATION_PARAMETERS) UnmarshalUnsafe(src []byte) []byte {
  1667  	size := n.SizeBytes()
  1668  	gohacks.Memmove(unsafe.Pointer(n), unsafe.Pointer(&src[0]), uintptr(size))
  1669  	return src[size:]
  1670  }
  1671  
  1672  // CopyOutN implements marshal.Marshallable.CopyOutN.
  1673  func (n *NV_VASPACE_ALLOCATION_PARAMETERS) CopyOutN(cc marshal.CopyContext, addr hostarch.Addr, limit int) (int, error) {
  1674  	// Construct a slice backed by dst's underlying memory.
  1675  	var buf []byte
  1676  	hdr := (*reflect.SliceHeader)(unsafe.Pointer(&buf))
  1677  	hdr.Data = uintptr(gohacks.Noescape(unsafe.Pointer(n)))
  1678  	hdr.Len = n.SizeBytes()
  1679  	hdr.Cap = n.SizeBytes()
  1680  
  1681  	length, err := cc.CopyOutBytes(addr, buf[:limit]) // escapes: okay.
  1682  	// Since we bypassed the compiler's escape analysis, indicate that n
  1683  	// must live until the use above.
  1684  	runtime.KeepAlive(n) // escapes: replaced by intrinsic.
  1685  	return length, err
  1686  }
  1687  
  1688  // CopyOut implements marshal.Marshallable.CopyOut.
  1689  func (n *NV_VASPACE_ALLOCATION_PARAMETERS) CopyOut(cc marshal.CopyContext, addr hostarch.Addr) (int, error) {
  1690  	return n.CopyOutN(cc, addr, n.SizeBytes())
  1691  }
  1692  
  1693  // CopyIn implements marshal.Marshallable.CopyIn.
  1694  func (n *NV_VASPACE_ALLOCATION_PARAMETERS) CopyIn(cc marshal.CopyContext, addr hostarch.Addr) (int, error) {
  1695  	// Construct a slice backed by dst's underlying memory.
  1696  	var buf []byte
  1697  	hdr := (*reflect.SliceHeader)(unsafe.Pointer(&buf))
  1698  	hdr.Data = uintptr(gohacks.Noescape(unsafe.Pointer(n)))
  1699  	hdr.Len = n.SizeBytes()
  1700  	hdr.Cap = n.SizeBytes()
  1701  
  1702  	length, err := cc.CopyInBytes(addr, buf) // escapes: okay.
  1703  	// Since we bypassed the compiler's escape analysis, indicate that n
  1704  	// must live until the use above.
  1705  	runtime.KeepAlive(n) // escapes: replaced by intrinsic.
  1706  	return length, err
  1707  }
  1708  
  1709  // WriteTo implements io.WriterTo.WriteTo.
  1710  func (n *NV_VASPACE_ALLOCATION_PARAMETERS) WriteTo(writer io.Writer) (int64, error) {
  1711  	// Construct a slice backed by dst's underlying memory.
  1712  	var buf []byte
  1713  	hdr := (*reflect.SliceHeader)(unsafe.Pointer(&buf))
  1714  	hdr.Data = uintptr(gohacks.Noescape(unsafe.Pointer(n)))
  1715  	hdr.Len = n.SizeBytes()
  1716  	hdr.Cap = n.SizeBytes()
  1717  
  1718  	length, err := writer.Write(buf)
  1719  	// Since we bypassed the compiler's escape analysis, indicate that n
  1720  	// must live until the use above.
  1721  	runtime.KeepAlive(n) // escapes: replaced by intrinsic.
  1722  	return int64(length), err
  1723  }
  1724  
  1725  // SizeBytes implements marshal.Marshallable.SizeBytes.
  1726  func (n *NV0000_CTRL_SYSTEM_GET_BUILD_VERSION_PARAMS) SizeBytes() int {
  1727  	return 12 +
  1728  		1*4 +
  1729  		(*P64)(nil).SizeBytes() +
  1730  		(*P64)(nil).SizeBytes() +
  1731  		(*P64)(nil).SizeBytes()
  1732  }
  1733  
  1734  // MarshalBytes implements marshal.Marshallable.MarshalBytes.
  1735  func (n *NV0000_CTRL_SYSTEM_GET_BUILD_VERSION_PARAMS) MarshalBytes(dst []byte) []byte {
  1736  	hostarch.ByteOrder.PutUint32(dst[:4], uint32(n.SizeOfStrings))
  1737  	dst = dst[4:]
  1738  	for idx := 0; idx < 4; idx++ {
  1739  		dst[0] = byte(n.Pad[idx])
  1740  		dst = dst[1:]
  1741  	}
  1742  	dst = n.PDriverVersionBuffer.MarshalUnsafe(dst)
  1743  	dst = n.PVersionBuffer.MarshalUnsafe(dst)
  1744  	dst = n.PTitleBuffer.MarshalUnsafe(dst)
  1745  	hostarch.ByteOrder.PutUint32(dst[:4], uint32(n.ChangelistNumber))
  1746  	dst = dst[4:]
  1747  	hostarch.ByteOrder.PutUint32(dst[:4], uint32(n.OfficialChangelistNumber))
  1748  	dst = dst[4:]
  1749  	return dst
  1750  }
  1751  
  1752  // UnmarshalBytes implements marshal.Marshallable.UnmarshalBytes.
  1753  func (n *NV0000_CTRL_SYSTEM_GET_BUILD_VERSION_PARAMS) UnmarshalBytes(src []byte) []byte {
  1754  	n.SizeOfStrings = uint32(hostarch.ByteOrder.Uint32(src[:4]))
  1755  	src = src[4:]
  1756  	for idx := 0; idx < 4; idx++ {
  1757  		n.Pad[idx] = src[0]
  1758  		src = src[1:]
  1759  	}
  1760  	src = n.PDriverVersionBuffer.UnmarshalUnsafe(src)
  1761  	src = n.PVersionBuffer.UnmarshalUnsafe(src)
  1762  	src = n.PTitleBuffer.UnmarshalUnsafe(src)
  1763  	n.ChangelistNumber = uint32(hostarch.ByteOrder.Uint32(src[:4]))
  1764  	src = src[4:]
  1765  	n.OfficialChangelistNumber = uint32(hostarch.ByteOrder.Uint32(src[:4]))
  1766  	src = src[4:]
  1767  	return src
  1768  }
  1769  
  1770  // Packed implements marshal.Marshallable.Packed.
  1771  //
  1772  //go:nosplit
  1773  func (n *NV0000_CTRL_SYSTEM_GET_BUILD_VERSION_PARAMS) Packed() bool {
  1774  	return n.PDriverVersionBuffer.Packed() && n.PTitleBuffer.Packed() && n.PVersionBuffer.Packed()
  1775  }
  1776  
  1777  // MarshalUnsafe implements marshal.Marshallable.MarshalUnsafe.
  1778  func (n *NV0000_CTRL_SYSTEM_GET_BUILD_VERSION_PARAMS) MarshalUnsafe(dst []byte) []byte {
  1779  	if n.PDriverVersionBuffer.Packed() && n.PTitleBuffer.Packed() && n.PVersionBuffer.Packed() {
  1780  		size := n.SizeBytes()
  1781  		gohacks.Memmove(unsafe.Pointer(&dst[0]), unsafe.Pointer(n), uintptr(size))
  1782  		return dst[size:]
  1783  	}
  1784  	// Type NV0000_CTRL_SYSTEM_GET_BUILD_VERSION_PARAMS doesn't have a packed layout in memory, fallback to MarshalBytes.
  1785  	return n.MarshalBytes(dst)
  1786  }
  1787  
  1788  // UnmarshalUnsafe implements marshal.Marshallable.UnmarshalUnsafe.
  1789  func (n *NV0000_CTRL_SYSTEM_GET_BUILD_VERSION_PARAMS) UnmarshalUnsafe(src []byte) []byte {
  1790  	if n.PDriverVersionBuffer.Packed() && n.PTitleBuffer.Packed() && n.PVersionBuffer.Packed() {
  1791  		size := n.SizeBytes()
  1792  		gohacks.Memmove(unsafe.Pointer(n), unsafe.Pointer(&src[0]), uintptr(size))
  1793  		return src[size:]
  1794  	}
  1795  	// Type NV0000_CTRL_SYSTEM_GET_BUILD_VERSION_PARAMS doesn't have a packed layout in memory, fallback to UnmarshalBytes.
  1796  	return n.UnmarshalBytes(src)
  1797  }
  1798  
  1799  // CopyOutN implements marshal.Marshallable.CopyOutN.
  1800  func (n *NV0000_CTRL_SYSTEM_GET_BUILD_VERSION_PARAMS) CopyOutN(cc marshal.CopyContext, addr hostarch.Addr, limit int) (int, error) {
  1801  	if !n.PDriverVersionBuffer.Packed() && n.PTitleBuffer.Packed() && n.PVersionBuffer.Packed() {
  1802  		// Type NV0000_CTRL_SYSTEM_GET_BUILD_VERSION_PARAMS doesn't have a packed layout in memory, fall back to MarshalBytes.
  1803  		buf := cc.CopyScratchBuffer(n.SizeBytes()) // escapes: okay.
  1804  		n.MarshalBytes(buf)                        // escapes: fallback.
  1805  		return cc.CopyOutBytes(addr, buf[:limit])  // escapes: okay.
  1806  	}
  1807  
  1808  	// Construct a slice backed by dst's underlying memory.
  1809  	var buf []byte
  1810  	hdr := (*reflect.SliceHeader)(unsafe.Pointer(&buf))
  1811  	hdr.Data = uintptr(gohacks.Noescape(unsafe.Pointer(n)))
  1812  	hdr.Len = n.SizeBytes()
  1813  	hdr.Cap = n.SizeBytes()
  1814  
  1815  	length, err := cc.CopyOutBytes(addr, buf[:limit]) // escapes: okay.
  1816  	// Since we bypassed the compiler's escape analysis, indicate that n
  1817  	// must live until the use above.
  1818  	runtime.KeepAlive(n) // escapes: replaced by intrinsic.
  1819  	return length, err
  1820  }
  1821  
  1822  // CopyOut implements marshal.Marshallable.CopyOut.
  1823  func (n *NV0000_CTRL_SYSTEM_GET_BUILD_VERSION_PARAMS) CopyOut(cc marshal.CopyContext, addr hostarch.Addr) (int, error) {
  1824  	return n.CopyOutN(cc, addr, n.SizeBytes())
  1825  }
  1826  
  1827  // CopyIn implements marshal.Marshallable.CopyIn.
  1828  func (n *NV0000_CTRL_SYSTEM_GET_BUILD_VERSION_PARAMS) CopyIn(cc marshal.CopyContext, addr hostarch.Addr) (int, error) {
  1829  	if !n.PDriverVersionBuffer.Packed() && n.PTitleBuffer.Packed() && n.PVersionBuffer.Packed() {
  1830  		// Type NV0000_CTRL_SYSTEM_GET_BUILD_VERSION_PARAMS doesn't have a packed layout in memory, fall back to UnmarshalBytes.
  1831  		buf := cc.CopyScratchBuffer(n.SizeBytes()) // escapes: okay.
  1832  		length, err := cc.CopyInBytes(addr, buf)   // escapes: okay.
  1833  		// Unmarshal unconditionally. If we had a short copy-in, this results in a
  1834  		// partially unmarshalled struct.
  1835  		n.UnmarshalBytes(buf) // escapes: fallback.
  1836  		return length, err
  1837  	}
  1838  
  1839  	// Construct a slice backed by dst's underlying memory.
  1840  	var buf []byte
  1841  	hdr := (*reflect.SliceHeader)(unsafe.Pointer(&buf))
  1842  	hdr.Data = uintptr(gohacks.Noescape(unsafe.Pointer(n)))
  1843  	hdr.Len = n.SizeBytes()
  1844  	hdr.Cap = n.SizeBytes()
  1845  
  1846  	length, err := cc.CopyInBytes(addr, buf) // escapes: okay.
  1847  	// Since we bypassed the compiler's escape analysis, indicate that n
  1848  	// must live until the use above.
  1849  	runtime.KeepAlive(n) // escapes: replaced by intrinsic.
  1850  	return length, err
  1851  }
  1852  
  1853  // WriteTo implements io.WriterTo.WriteTo.
  1854  func (n *NV0000_CTRL_SYSTEM_GET_BUILD_VERSION_PARAMS) WriteTo(writer io.Writer) (int64, error) {
  1855  	if !n.PDriverVersionBuffer.Packed() && n.PTitleBuffer.Packed() && n.PVersionBuffer.Packed() {
  1856  		// Type NV0000_CTRL_SYSTEM_GET_BUILD_VERSION_PARAMS doesn't have a packed layout in memory, fall back to MarshalBytes.
  1857  		buf := make([]byte, n.SizeBytes())
  1858  		n.MarshalBytes(buf)
  1859  		length, err := writer.Write(buf)
  1860  		return int64(length), err
  1861  	}
  1862  
  1863  	// Construct a slice backed by dst's underlying memory.
  1864  	var buf []byte
  1865  	hdr := (*reflect.SliceHeader)(unsafe.Pointer(&buf))
  1866  	hdr.Data = uintptr(gohacks.Noescape(unsafe.Pointer(n)))
  1867  	hdr.Len = n.SizeBytes()
  1868  	hdr.Cap = n.SizeBytes()
  1869  
  1870  	length, err := writer.Write(buf)
  1871  	// Since we bypassed the compiler's escape analysis, indicate that n
  1872  	// must live until the use above.
  1873  	runtime.KeepAlive(n) // escapes: replaced by intrinsic.
  1874  	return int64(length), err
  1875  }
  1876  
  1877  // SizeBytes implements marshal.Marshallable.SizeBytes.
  1878  func (n *NV0080_CTRL_FIFO_GET_CHANNELLIST_PARAMS) SizeBytes() int {
  1879  	return 4 +
  1880  		1*4 +
  1881  		(*P64)(nil).SizeBytes() +
  1882  		(*P64)(nil).SizeBytes()
  1883  }
  1884  
  1885  // MarshalBytes implements marshal.Marshallable.MarshalBytes.
  1886  func (n *NV0080_CTRL_FIFO_GET_CHANNELLIST_PARAMS) MarshalBytes(dst []byte) []byte {
  1887  	hostarch.ByteOrder.PutUint32(dst[:4], uint32(n.NumChannels))
  1888  	dst = dst[4:]
  1889  	for idx := 0; idx < 4; idx++ {
  1890  		dst[0] = byte(n.Pad[idx])
  1891  		dst = dst[1:]
  1892  	}
  1893  	dst = n.PChannelHandleList.MarshalUnsafe(dst)
  1894  	dst = n.PChannelList.MarshalUnsafe(dst)
  1895  	return dst
  1896  }
  1897  
  1898  // UnmarshalBytes implements marshal.Marshallable.UnmarshalBytes.
  1899  func (n *NV0080_CTRL_FIFO_GET_CHANNELLIST_PARAMS) UnmarshalBytes(src []byte) []byte {
  1900  	n.NumChannels = uint32(hostarch.ByteOrder.Uint32(src[:4]))
  1901  	src = src[4:]
  1902  	for idx := 0; idx < 4; idx++ {
  1903  		n.Pad[idx] = src[0]
  1904  		src = src[1:]
  1905  	}
  1906  	src = n.PChannelHandleList.UnmarshalUnsafe(src)
  1907  	src = n.PChannelList.UnmarshalUnsafe(src)
  1908  	return src
  1909  }
  1910  
  1911  // Packed implements marshal.Marshallable.Packed.
  1912  //
  1913  //go:nosplit
  1914  func (n *NV0080_CTRL_FIFO_GET_CHANNELLIST_PARAMS) Packed() bool {
  1915  	return n.PChannelHandleList.Packed() && n.PChannelList.Packed()
  1916  }
  1917  
  1918  // MarshalUnsafe implements marshal.Marshallable.MarshalUnsafe.
  1919  func (n *NV0080_CTRL_FIFO_GET_CHANNELLIST_PARAMS) MarshalUnsafe(dst []byte) []byte {
  1920  	if n.PChannelHandleList.Packed() && n.PChannelList.Packed() {
  1921  		size := n.SizeBytes()
  1922  		gohacks.Memmove(unsafe.Pointer(&dst[0]), unsafe.Pointer(n), uintptr(size))
  1923  		return dst[size:]
  1924  	}
  1925  	// Type NV0080_CTRL_FIFO_GET_CHANNELLIST_PARAMS doesn't have a packed layout in memory, fallback to MarshalBytes.
  1926  	return n.MarshalBytes(dst)
  1927  }
  1928  
  1929  // UnmarshalUnsafe implements marshal.Marshallable.UnmarshalUnsafe.
  1930  func (n *NV0080_CTRL_FIFO_GET_CHANNELLIST_PARAMS) UnmarshalUnsafe(src []byte) []byte {
  1931  	if n.PChannelHandleList.Packed() && n.PChannelList.Packed() {
  1932  		size := n.SizeBytes()
  1933  		gohacks.Memmove(unsafe.Pointer(n), unsafe.Pointer(&src[0]), uintptr(size))
  1934  		return src[size:]
  1935  	}
  1936  	// Type NV0080_CTRL_FIFO_GET_CHANNELLIST_PARAMS doesn't have a packed layout in memory, fallback to UnmarshalBytes.
  1937  	return n.UnmarshalBytes(src)
  1938  }
  1939  
  1940  // CopyOutN implements marshal.Marshallable.CopyOutN.
  1941  func (n *NV0080_CTRL_FIFO_GET_CHANNELLIST_PARAMS) CopyOutN(cc marshal.CopyContext, addr hostarch.Addr, limit int) (int, error) {
  1942  	if !n.PChannelHandleList.Packed() && n.PChannelList.Packed() {
  1943  		// Type NV0080_CTRL_FIFO_GET_CHANNELLIST_PARAMS doesn't have a packed layout in memory, fall back to MarshalBytes.
  1944  		buf := cc.CopyScratchBuffer(n.SizeBytes()) // escapes: okay.
  1945  		n.MarshalBytes(buf)                        // escapes: fallback.
  1946  		return cc.CopyOutBytes(addr, buf[:limit])  // escapes: okay.
  1947  	}
  1948  
  1949  	// Construct a slice backed by dst's underlying memory.
  1950  	var buf []byte
  1951  	hdr := (*reflect.SliceHeader)(unsafe.Pointer(&buf))
  1952  	hdr.Data = uintptr(gohacks.Noescape(unsafe.Pointer(n)))
  1953  	hdr.Len = n.SizeBytes()
  1954  	hdr.Cap = n.SizeBytes()
  1955  
  1956  	length, err := cc.CopyOutBytes(addr, buf[:limit]) // escapes: okay.
  1957  	// Since we bypassed the compiler's escape analysis, indicate that n
  1958  	// must live until the use above.
  1959  	runtime.KeepAlive(n) // escapes: replaced by intrinsic.
  1960  	return length, err
  1961  }
  1962  
  1963  // CopyOut implements marshal.Marshallable.CopyOut.
  1964  func (n *NV0080_CTRL_FIFO_GET_CHANNELLIST_PARAMS) CopyOut(cc marshal.CopyContext, addr hostarch.Addr) (int, error) {
  1965  	return n.CopyOutN(cc, addr, n.SizeBytes())
  1966  }
  1967  
  1968  // CopyIn implements marshal.Marshallable.CopyIn.
  1969  func (n *NV0080_CTRL_FIFO_GET_CHANNELLIST_PARAMS) CopyIn(cc marshal.CopyContext, addr hostarch.Addr) (int, error) {
  1970  	if !n.PChannelHandleList.Packed() && n.PChannelList.Packed() {
  1971  		// Type NV0080_CTRL_FIFO_GET_CHANNELLIST_PARAMS doesn't have a packed layout in memory, fall back to UnmarshalBytes.
  1972  		buf := cc.CopyScratchBuffer(n.SizeBytes()) // escapes: okay.
  1973  		length, err := cc.CopyInBytes(addr, buf)   // escapes: okay.
  1974  		// Unmarshal unconditionally. If we had a short copy-in, this results in a
  1975  		// partially unmarshalled struct.
  1976  		n.UnmarshalBytes(buf) // escapes: fallback.
  1977  		return length, err
  1978  	}
  1979  
  1980  	// Construct a slice backed by dst's underlying memory.
  1981  	var buf []byte
  1982  	hdr := (*reflect.SliceHeader)(unsafe.Pointer(&buf))
  1983  	hdr.Data = uintptr(gohacks.Noescape(unsafe.Pointer(n)))
  1984  	hdr.Len = n.SizeBytes()
  1985  	hdr.Cap = n.SizeBytes()
  1986  
  1987  	length, err := cc.CopyInBytes(addr, buf) // escapes: okay.
  1988  	// Since we bypassed the compiler's escape analysis, indicate that n
  1989  	// must live until the use above.
  1990  	runtime.KeepAlive(n) // escapes: replaced by intrinsic.
  1991  	return length, err
  1992  }
  1993  
  1994  // WriteTo implements io.WriterTo.WriteTo.
  1995  func (n *NV0080_CTRL_FIFO_GET_CHANNELLIST_PARAMS) WriteTo(writer io.Writer) (int64, error) {
  1996  	if !n.PChannelHandleList.Packed() && n.PChannelList.Packed() {
  1997  		// Type NV0080_CTRL_FIFO_GET_CHANNELLIST_PARAMS doesn't have a packed layout in memory, fall back to MarshalBytes.
  1998  		buf := make([]byte, n.SizeBytes())
  1999  		n.MarshalBytes(buf)
  2000  		length, err := writer.Write(buf)
  2001  		return int64(length), err
  2002  	}
  2003  
  2004  	// Construct a slice backed by dst's underlying memory.
  2005  	var buf []byte
  2006  	hdr := (*reflect.SliceHeader)(unsafe.Pointer(&buf))
  2007  	hdr.Data = uintptr(gohacks.Noescape(unsafe.Pointer(n)))
  2008  	hdr.Len = n.SizeBytes()
  2009  	hdr.Cap = n.SizeBytes()
  2010  
  2011  	length, err := writer.Write(buf)
  2012  	// Since we bypassed the compiler's escape analysis, indicate that n
  2013  	// must live until the use above.
  2014  	runtime.KeepAlive(n) // escapes: replaced by intrinsic.
  2015  	return int64(length), err
  2016  }
  2017  
  2018  // SizeBytes implements marshal.Marshallable.SizeBytes.
  2019  func (n *NV0080_CTRL_GR_ROUTE_INFO) SizeBytes() int {
  2020  	return 12 +
  2021  		1*4
  2022  }
  2023  
  2024  // MarshalBytes implements marshal.Marshallable.MarshalBytes.
  2025  func (n *NV0080_CTRL_GR_ROUTE_INFO) MarshalBytes(dst []byte) []byte {
  2026  	hostarch.ByteOrder.PutUint32(dst[:4], uint32(n.Flags))
  2027  	dst = dst[4:]
  2028  	for idx := 0; idx < 4; idx++ {
  2029  		dst[0] = byte(n.Pad[idx])
  2030  		dst = dst[1:]
  2031  	}
  2032  	hostarch.ByteOrder.PutUint64(dst[:8], uint64(n.Route))
  2033  	dst = dst[8:]
  2034  	return dst
  2035  }
  2036  
  2037  // UnmarshalBytes implements marshal.Marshallable.UnmarshalBytes.
  2038  func (n *NV0080_CTRL_GR_ROUTE_INFO) UnmarshalBytes(src []byte) []byte {
  2039  	n.Flags = uint32(hostarch.ByteOrder.Uint32(src[:4]))
  2040  	src = src[4:]
  2041  	for idx := 0; idx < 4; idx++ {
  2042  		n.Pad[idx] = src[0]
  2043  		src = src[1:]
  2044  	}
  2045  	n.Route = uint64(hostarch.ByteOrder.Uint64(src[:8]))
  2046  	src = src[8:]
  2047  	return src
  2048  }
  2049  
  2050  // Packed implements marshal.Marshallable.Packed.
  2051  //
  2052  //go:nosplit
  2053  func (n *NV0080_CTRL_GR_ROUTE_INFO) Packed() bool {
  2054  	return true
  2055  }
  2056  
  2057  // MarshalUnsafe implements marshal.Marshallable.MarshalUnsafe.
  2058  func (n *NV0080_CTRL_GR_ROUTE_INFO) MarshalUnsafe(dst []byte) []byte {
  2059  	size := n.SizeBytes()
  2060  	gohacks.Memmove(unsafe.Pointer(&dst[0]), unsafe.Pointer(n), uintptr(size))
  2061  	return dst[size:]
  2062  }
  2063  
  2064  // UnmarshalUnsafe implements marshal.Marshallable.UnmarshalUnsafe.
  2065  func (n *NV0080_CTRL_GR_ROUTE_INFO) UnmarshalUnsafe(src []byte) []byte {
  2066  	size := n.SizeBytes()
  2067  	gohacks.Memmove(unsafe.Pointer(n), unsafe.Pointer(&src[0]), uintptr(size))
  2068  	return src[size:]
  2069  }
  2070  
  2071  // CopyOutN implements marshal.Marshallable.CopyOutN.
  2072  func (n *NV0080_CTRL_GR_ROUTE_INFO) CopyOutN(cc marshal.CopyContext, addr hostarch.Addr, limit int) (int, error) {
  2073  	// Construct a slice backed by dst's underlying memory.
  2074  	var buf []byte
  2075  	hdr := (*reflect.SliceHeader)(unsafe.Pointer(&buf))
  2076  	hdr.Data = uintptr(gohacks.Noescape(unsafe.Pointer(n)))
  2077  	hdr.Len = n.SizeBytes()
  2078  	hdr.Cap = n.SizeBytes()
  2079  
  2080  	length, err := cc.CopyOutBytes(addr, buf[:limit]) // escapes: okay.
  2081  	// Since we bypassed the compiler's escape analysis, indicate that n
  2082  	// must live until the use above.
  2083  	runtime.KeepAlive(n) // escapes: replaced by intrinsic.
  2084  	return length, err
  2085  }
  2086  
  2087  // CopyOut implements marshal.Marshallable.CopyOut.
  2088  func (n *NV0080_CTRL_GR_ROUTE_INFO) CopyOut(cc marshal.CopyContext, addr hostarch.Addr) (int, error) {
  2089  	return n.CopyOutN(cc, addr, n.SizeBytes())
  2090  }
  2091  
  2092  // CopyIn implements marshal.Marshallable.CopyIn.
  2093  func (n *NV0080_CTRL_GR_ROUTE_INFO) CopyIn(cc marshal.CopyContext, addr hostarch.Addr) (int, error) {
  2094  	// Construct a slice backed by dst's underlying memory.
  2095  	var buf []byte
  2096  	hdr := (*reflect.SliceHeader)(unsafe.Pointer(&buf))
  2097  	hdr.Data = uintptr(gohacks.Noescape(unsafe.Pointer(n)))
  2098  	hdr.Len = n.SizeBytes()
  2099  	hdr.Cap = n.SizeBytes()
  2100  
  2101  	length, err := cc.CopyInBytes(addr, buf) // escapes: okay.
  2102  	// Since we bypassed the compiler's escape analysis, indicate that n
  2103  	// must live until the use above.
  2104  	runtime.KeepAlive(n) // escapes: replaced by intrinsic.
  2105  	return length, err
  2106  }
  2107  
  2108  // WriteTo implements io.WriterTo.WriteTo.
  2109  func (n *NV0080_CTRL_GR_ROUTE_INFO) WriteTo(writer io.Writer) (int64, error) {
  2110  	// Construct a slice backed by dst's underlying memory.
  2111  	var buf []byte
  2112  	hdr := (*reflect.SliceHeader)(unsafe.Pointer(&buf))
  2113  	hdr.Data = uintptr(gohacks.Noescape(unsafe.Pointer(n)))
  2114  	hdr.Len = n.SizeBytes()
  2115  	hdr.Cap = n.SizeBytes()
  2116  
  2117  	length, err := writer.Write(buf)
  2118  	// Since we bypassed the compiler's escape analysis, indicate that n
  2119  	// must live until the use above.
  2120  	runtime.KeepAlive(n) // escapes: replaced by intrinsic.
  2121  	return int64(length), err
  2122  }
  2123  
  2124  // SizeBytes implements marshal.Marshallable.SizeBytes.
  2125  func (n *NV2080_CTRL_FIFO_DISABLE_CHANNELS_PARAMS) SizeBytes() int {
  2126  	return 7 +
  2127  		1*3 +
  2128  		1*6 +
  2129  		(*P64)(nil).SizeBytes() +
  2130  		(*Handle)(nil).SizeBytes()*NV2080_CTRL_FIFO_DISABLE_CHANNELS_MAX_ENTRIES +
  2131  		(*Handle)(nil).SizeBytes()*NV2080_CTRL_FIFO_DISABLE_CHANNELS_MAX_ENTRIES
  2132  }
  2133  
  2134  // MarshalBytes implements marshal.Marshallable.MarshalBytes.
  2135  func (n *NV2080_CTRL_FIFO_DISABLE_CHANNELS_PARAMS) MarshalBytes(dst []byte) []byte {
  2136  	dst[0] = byte(n.BDisable)
  2137  	dst = dst[1:]
  2138  	for idx := 0; idx < 3; idx++ {
  2139  		dst[0] = byte(n.Pad1[idx])
  2140  		dst = dst[1:]
  2141  	}
  2142  	hostarch.ByteOrder.PutUint32(dst[:4], uint32(n.NumChannels))
  2143  	dst = dst[4:]
  2144  	dst[0] = byte(n.BOnlyDisableScheduling)
  2145  	dst = dst[1:]
  2146  	dst[0] = byte(n.BRewindGpPut)
  2147  	dst = dst[1:]
  2148  	for idx := 0; idx < 6; idx++ {
  2149  		dst[0] = byte(n.Pad2[idx])
  2150  		dst = dst[1:]
  2151  	}
  2152  	dst = n.PRunlistPreemptEvent.MarshalUnsafe(dst)
  2153  	for idx := 0; idx < NV2080_CTRL_FIFO_DISABLE_CHANNELS_MAX_ENTRIES; idx++ {
  2154  		dst = n.HClientList[idx].MarshalUnsafe(dst)
  2155  	}
  2156  	for idx := 0; idx < NV2080_CTRL_FIFO_DISABLE_CHANNELS_MAX_ENTRIES; idx++ {
  2157  		dst = n.HChannelList[idx].MarshalUnsafe(dst)
  2158  	}
  2159  	return dst
  2160  }
  2161  
  2162  // UnmarshalBytes implements marshal.Marshallable.UnmarshalBytes.
  2163  func (n *NV2080_CTRL_FIFO_DISABLE_CHANNELS_PARAMS) UnmarshalBytes(src []byte) []byte {
  2164  	n.BDisable = uint8(src[0])
  2165  	src = src[1:]
  2166  	for idx := 0; idx < 3; idx++ {
  2167  		n.Pad1[idx] = src[0]
  2168  		src = src[1:]
  2169  	}
  2170  	n.NumChannels = uint32(hostarch.ByteOrder.Uint32(src[:4]))
  2171  	src = src[4:]
  2172  	n.BOnlyDisableScheduling = uint8(src[0])
  2173  	src = src[1:]
  2174  	n.BRewindGpPut = uint8(src[0])
  2175  	src = src[1:]
  2176  	for idx := 0; idx < 6; idx++ {
  2177  		n.Pad2[idx] = src[0]
  2178  		src = src[1:]
  2179  	}
  2180  	src = n.PRunlistPreemptEvent.UnmarshalUnsafe(src)
  2181  	for idx := 0; idx < NV2080_CTRL_FIFO_DISABLE_CHANNELS_MAX_ENTRIES; idx++ {
  2182  		src = n.HClientList[idx].UnmarshalUnsafe(src)
  2183  	}
  2184  	for idx := 0; idx < NV2080_CTRL_FIFO_DISABLE_CHANNELS_MAX_ENTRIES; idx++ {
  2185  		src = n.HChannelList[idx].UnmarshalUnsafe(src)
  2186  	}
  2187  	return src
  2188  }
  2189  
  2190  // Packed implements marshal.Marshallable.Packed.
  2191  //
  2192  //go:nosplit
  2193  func (n *NV2080_CTRL_FIFO_DISABLE_CHANNELS_PARAMS) Packed() bool {
  2194  	return n.HChannelList[0].Packed() && n.HClientList[0].Packed() && n.PRunlistPreemptEvent.Packed()
  2195  }
  2196  
  2197  // MarshalUnsafe implements marshal.Marshallable.MarshalUnsafe.
  2198  func (n *NV2080_CTRL_FIFO_DISABLE_CHANNELS_PARAMS) MarshalUnsafe(dst []byte) []byte {
  2199  	if n.HChannelList[0].Packed() && n.HClientList[0].Packed() && n.PRunlistPreemptEvent.Packed() {
  2200  		size := n.SizeBytes()
  2201  		gohacks.Memmove(unsafe.Pointer(&dst[0]), unsafe.Pointer(n), uintptr(size))
  2202  		return dst[size:]
  2203  	}
  2204  	// Type NV2080_CTRL_FIFO_DISABLE_CHANNELS_PARAMS doesn't have a packed layout in memory, fallback to MarshalBytes.
  2205  	return n.MarshalBytes(dst)
  2206  }
  2207  
  2208  // UnmarshalUnsafe implements marshal.Marshallable.UnmarshalUnsafe.
  2209  func (n *NV2080_CTRL_FIFO_DISABLE_CHANNELS_PARAMS) UnmarshalUnsafe(src []byte) []byte {
  2210  	if n.HChannelList[0].Packed() && n.HClientList[0].Packed() && n.PRunlistPreemptEvent.Packed() {
  2211  		size := n.SizeBytes()
  2212  		gohacks.Memmove(unsafe.Pointer(n), unsafe.Pointer(&src[0]), uintptr(size))
  2213  		return src[size:]
  2214  	}
  2215  	// Type NV2080_CTRL_FIFO_DISABLE_CHANNELS_PARAMS doesn't have a packed layout in memory, fallback to UnmarshalBytes.
  2216  	return n.UnmarshalBytes(src)
  2217  }
  2218  
  2219  // CopyOutN implements marshal.Marshallable.CopyOutN.
  2220  func (n *NV2080_CTRL_FIFO_DISABLE_CHANNELS_PARAMS) CopyOutN(cc marshal.CopyContext, addr hostarch.Addr, limit int) (int, error) {
  2221  	if !n.HChannelList[0].Packed() && n.HClientList[0].Packed() && n.PRunlistPreemptEvent.Packed() {
  2222  		// Type NV2080_CTRL_FIFO_DISABLE_CHANNELS_PARAMS doesn't have a packed layout in memory, fall back to MarshalBytes.
  2223  		buf := cc.CopyScratchBuffer(n.SizeBytes()) // escapes: okay.
  2224  		n.MarshalBytes(buf)                        // escapes: fallback.
  2225  		return cc.CopyOutBytes(addr, buf[:limit])  // escapes: okay.
  2226  	}
  2227  
  2228  	// Construct a slice backed by dst's underlying memory.
  2229  	var buf []byte
  2230  	hdr := (*reflect.SliceHeader)(unsafe.Pointer(&buf))
  2231  	hdr.Data = uintptr(gohacks.Noescape(unsafe.Pointer(n)))
  2232  	hdr.Len = n.SizeBytes()
  2233  	hdr.Cap = n.SizeBytes()
  2234  
  2235  	length, err := cc.CopyOutBytes(addr, buf[:limit]) // escapes: okay.
  2236  	// Since we bypassed the compiler's escape analysis, indicate that n
  2237  	// must live until the use above.
  2238  	runtime.KeepAlive(n) // escapes: replaced by intrinsic.
  2239  	return length, err
  2240  }
  2241  
  2242  // CopyOut implements marshal.Marshallable.CopyOut.
  2243  func (n *NV2080_CTRL_FIFO_DISABLE_CHANNELS_PARAMS) CopyOut(cc marshal.CopyContext, addr hostarch.Addr) (int, error) {
  2244  	return n.CopyOutN(cc, addr, n.SizeBytes())
  2245  }
  2246  
  2247  // CopyIn implements marshal.Marshallable.CopyIn.
  2248  func (n *NV2080_CTRL_FIFO_DISABLE_CHANNELS_PARAMS) CopyIn(cc marshal.CopyContext, addr hostarch.Addr) (int, error) {
  2249  	if !n.HChannelList[0].Packed() && n.HClientList[0].Packed() && n.PRunlistPreemptEvent.Packed() {
  2250  		// Type NV2080_CTRL_FIFO_DISABLE_CHANNELS_PARAMS doesn't have a packed layout in memory, fall back to UnmarshalBytes.
  2251  		buf := cc.CopyScratchBuffer(n.SizeBytes()) // escapes: okay.
  2252  		length, err := cc.CopyInBytes(addr, buf)   // escapes: okay.
  2253  		// Unmarshal unconditionally. If we had a short copy-in, this results in a
  2254  		// partially unmarshalled struct.
  2255  		n.UnmarshalBytes(buf) // escapes: fallback.
  2256  		return length, err
  2257  	}
  2258  
  2259  	// Construct a slice backed by dst's underlying memory.
  2260  	var buf []byte
  2261  	hdr := (*reflect.SliceHeader)(unsafe.Pointer(&buf))
  2262  	hdr.Data = uintptr(gohacks.Noescape(unsafe.Pointer(n)))
  2263  	hdr.Len = n.SizeBytes()
  2264  	hdr.Cap = n.SizeBytes()
  2265  
  2266  	length, err := cc.CopyInBytes(addr, buf) // escapes: okay.
  2267  	// Since we bypassed the compiler's escape analysis, indicate that n
  2268  	// must live until the use above.
  2269  	runtime.KeepAlive(n) // escapes: replaced by intrinsic.
  2270  	return length, err
  2271  }
  2272  
  2273  // WriteTo implements io.WriterTo.WriteTo.
  2274  func (n *NV2080_CTRL_FIFO_DISABLE_CHANNELS_PARAMS) WriteTo(writer io.Writer) (int64, error) {
  2275  	if !n.HChannelList[0].Packed() && n.HClientList[0].Packed() && n.PRunlistPreemptEvent.Packed() {
  2276  		// Type NV2080_CTRL_FIFO_DISABLE_CHANNELS_PARAMS doesn't have a packed layout in memory, fall back to MarshalBytes.
  2277  		buf := make([]byte, n.SizeBytes())
  2278  		n.MarshalBytes(buf)
  2279  		length, err := writer.Write(buf)
  2280  		return int64(length), err
  2281  	}
  2282  
  2283  	// Construct a slice backed by dst's underlying memory.
  2284  	var buf []byte
  2285  	hdr := (*reflect.SliceHeader)(unsafe.Pointer(&buf))
  2286  	hdr.Data = uintptr(gohacks.Noescape(unsafe.Pointer(n)))
  2287  	hdr.Len = n.SizeBytes()
  2288  	hdr.Cap = n.SizeBytes()
  2289  
  2290  	length, err := writer.Write(buf)
  2291  	// Since we bypassed the compiler's escape analysis, indicate that n
  2292  	// must live until the use above.
  2293  	runtime.KeepAlive(n) // escapes: replaced by intrinsic.
  2294  	return int64(length), err
  2295  }
  2296  
  2297  // SizeBytes implements marshal.Marshallable.SizeBytes.
  2298  func (n *NV2080_CTRL_GR_GET_INFO_PARAMS) SizeBytes() int {
  2299  	return 4 +
  2300  		1*4 +
  2301  		(*P64)(nil).SizeBytes() +
  2302  		(*NV0080_CTRL_GR_ROUTE_INFO)(nil).SizeBytes()
  2303  }
  2304  
  2305  // MarshalBytes implements marshal.Marshallable.MarshalBytes.
  2306  func (n *NV2080_CTRL_GR_GET_INFO_PARAMS) MarshalBytes(dst []byte) []byte {
  2307  	hostarch.ByteOrder.PutUint32(dst[:4], uint32(n.GRInfoListSize))
  2308  	dst = dst[4:]
  2309  	for idx := 0; idx < 4; idx++ {
  2310  		dst[0] = byte(n.Pad[idx])
  2311  		dst = dst[1:]
  2312  	}
  2313  	dst = n.GRInfoList.MarshalUnsafe(dst)
  2314  	dst = n.GRRouteInfo.MarshalUnsafe(dst)
  2315  	return dst
  2316  }
  2317  
  2318  // UnmarshalBytes implements marshal.Marshallable.UnmarshalBytes.
  2319  func (n *NV2080_CTRL_GR_GET_INFO_PARAMS) UnmarshalBytes(src []byte) []byte {
  2320  	n.GRInfoListSize = uint32(hostarch.ByteOrder.Uint32(src[:4]))
  2321  	src = src[4:]
  2322  	for idx := 0; idx < 4; idx++ {
  2323  		n.Pad[idx] = src[0]
  2324  		src = src[1:]
  2325  	}
  2326  	src = n.GRInfoList.UnmarshalUnsafe(src)
  2327  	src = n.GRRouteInfo.UnmarshalUnsafe(src)
  2328  	return src
  2329  }
  2330  
  2331  // Packed implements marshal.Marshallable.Packed.
  2332  //
  2333  //go:nosplit
  2334  func (n *NV2080_CTRL_GR_GET_INFO_PARAMS) Packed() bool {
  2335  	return n.GRInfoList.Packed() && n.GRRouteInfo.Packed()
  2336  }
  2337  
  2338  // MarshalUnsafe implements marshal.Marshallable.MarshalUnsafe.
  2339  func (n *NV2080_CTRL_GR_GET_INFO_PARAMS) MarshalUnsafe(dst []byte) []byte {
  2340  	if n.GRInfoList.Packed() && n.GRRouteInfo.Packed() {
  2341  		size := n.SizeBytes()
  2342  		gohacks.Memmove(unsafe.Pointer(&dst[0]), unsafe.Pointer(n), uintptr(size))
  2343  		return dst[size:]
  2344  	}
  2345  	// Type NV2080_CTRL_GR_GET_INFO_PARAMS doesn't have a packed layout in memory, fallback to MarshalBytes.
  2346  	return n.MarshalBytes(dst)
  2347  }
  2348  
  2349  // UnmarshalUnsafe implements marshal.Marshallable.UnmarshalUnsafe.
  2350  func (n *NV2080_CTRL_GR_GET_INFO_PARAMS) UnmarshalUnsafe(src []byte) []byte {
  2351  	if n.GRInfoList.Packed() && n.GRRouteInfo.Packed() {
  2352  		size := n.SizeBytes()
  2353  		gohacks.Memmove(unsafe.Pointer(n), unsafe.Pointer(&src[0]), uintptr(size))
  2354  		return src[size:]
  2355  	}
  2356  	// Type NV2080_CTRL_GR_GET_INFO_PARAMS doesn't have a packed layout in memory, fallback to UnmarshalBytes.
  2357  	return n.UnmarshalBytes(src)
  2358  }
  2359  
  2360  // CopyOutN implements marshal.Marshallable.CopyOutN.
  2361  func (n *NV2080_CTRL_GR_GET_INFO_PARAMS) CopyOutN(cc marshal.CopyContext, addr hostarch.Addr, limit int) (int, error) {
  2362  	if !n.GRInfoList.Packed() && n.GRRouteInfo.Packed() {
  2363  		// Type NV2080_CTRL_GR_GET_INFO_PARAMS doesn't have a packed layout in memory, fall back to MarshalBytes.
  2364  		buf := cc.CopyScratchBuffer(n.SizeBytes()) // escapes: okay.
  2365  		n.MarshalBytes(buf)                        // escapes: fallback.
  2366  		return cc.CopyOutBytes(addr, buf[:limit])  // escapes: okay.
  2367  	}
  2368  
  2369  	// Construct a slice backed by dst's underlying memory.
  2370  	var buf []byte
  2371  	hdr := (*reflect.SliceHeader)(unsafe.Pointer(&buf))
  2372  	hdr.Data = uintptr(gohacks.Noescape(unsafe.Pointer(n)))
  2373  	hdr.Len = n.SizeBytes()
  2374  	hdr.Cap = n.SizeBytes()
  2375  
  2376  	length, err := cc.CopyOutBytes(addr, buf[:limit]) // escapes: okay.
  2377  	// Since we bypassed the compiler's escape analysis, indicate that n
  2378  	// must live until the use above.
  2379  	runtime.KeepAlive(n) // escapes: replaced by intrinsic.
  2380  	return length, err
  2381  }
  2382  
  2383  // CopyOut implements marshal.Marshallable.CopyOut.
  2384  func (n *NV2080_CTRL_GR_GET_INFO_PARAMS) CopyOut(cc marshal.CopyContext, addr hostarch.Addr) (int, error) {
  2385  	return n.CopyOutN(cc, addr, n.SizeBytes())
  2386  }
  2387  
  2388  // CopyIn implements marshal.Marshallable.CopyIn.
  2389  func (n *NV2080_CTRL_GR_GET_INFO_PARAMS) CopyIn(cc marshal.CopyContext, addr hostarch.Addr) (int, error) {
  2390  	if !n.GRInfoList.Packed() && n.GRRouteInfo.Packed() {
  2391  		// Type NV2080_CTRL_GR_GET_INFO_PARAMS doesn't have a packed layout in memory, fall back to UnmarshalBytes.
  2392  		buf := cc.CopyScratchBuffer(n.SizeBytes()) // escapes: okay.
  2393  		length, err := cc.CopyInBytes(addr, buf)   // escapes: okay.
  2394  		// Unmarshal unconditionally. If we had a short copy-in, this results in a
  2395  		// partially unmarshalled struct.
  2396  		n.UnmarshalBytes(buf) // escapes: fallback.
  2397  		return length, err
  2398  	}
  2399  
  2400  	// Construct a slice backed by dst's underlying memory.
  2401  	var buf []byte
  2402  	hdr := (*reflect.SliceHeader)(unsafe.Pointer(&buf))
  2403  	hdr.Data = uintptr(gohacks.Noescape(unsafe.Pointer(n)))
  2404  	hdr.Len = n.SizeBytes()
  2405  	hdr.Cap = n.SizeBytes()
  2406  
  2407  	length, err := cc.CopyInBytes(addr, buf) // escapes: okay.
  2408  	// Since we bypassed the compiler's escape analysis, indicate that n
  2409  	// must live until the use above.
  2410  	runtime.KeepAlive(n) // escapes: replaced by intrinsic.
  2411  	return length, err
  2412  }
  2413  
  2414  // WriteTo implements io.WriterTo.WriteTo.
  2415  func (n *NV2080_CTRL_GR_GET_INFO_PARAMS) WriteTo(writer io.Writer) (int64, error) {
  2416  	if !n.GRInfoList.Packed() && n.GRRouteInfo.Packed() {
  2417  		// Type NV2080_CTRL_GR_GET_INFO_PARAMS doesn't have a packed layout in memory, fall back to MarshalBytes.
  2418  		buf := make([]byte, n.SizeBytes())
  2419  		n.MarshalBytes(buf)
  2420  		length, err := writer.Write(buf)
  2421  		return int64(length), err
  2422  	}
  2423  
  2424  	// Construct a slice backed by dst's underlying memory.
  2425  	var buf []byte
  2426  	hdr := (*reflect.SliceHeader)(unsafe.Pointer(&buf))
  2427  	hdr.Data = uintptr(gohacks.Noescape(unsafe.Pointer(n)))
  2428  	hdr.Len = n.SizeBytes()
  2429  	hdr.Cap = n.SizeBytes()
  2430  
  2431  	length, err := writer.Write(buf)
  2432  	// Since we bypassed the compiler's escape analysis, indicate that n
  2433  	// must live until the use above.
  2434  	runtime.KeepAlive(n) // escapes: replaced by intrinsic.
  2435  	return int64(length), err
  2436  }
  2437  
  2438  // SizeBytes implements marshal.Marshallable.SizeBytes.
  2439  func (n *NVXXXX_CTRL_XXX_INFO) SizeBytes() int {
  2440  	return 8
  2441  }
  2442  
  2443  // MarshalBytes implements marshal.Marshallable.MarshalBytes.
  2444  func (n *NVXXXX_CTRL_XXX_INFO) MarshalBytes(dst []byte) []byte {
  2445  	hostarch.ByteOrder.PutUint32(dst[:4], uint32(n.Index))
  2446  	dst = dst[4:]
  2447  	hostarch.ByteOrder.PutUint32(dst[:4], uint32(n.Data))
  2448  	dst = dst[4:]
  2449  	return dst
  2450  }
  2451  
  2452  // UnmarshalBytes implements marshal.Marshallable.UnmarshalBytes.
  2453  func (n *NVXXXX_CTRL_XXX_INFO) UnmarshalBytes(src []byte) []byte {
  2454  	n.Index = uint32(hostarch.ByteOrder.Uint32(src[:4]))
  2455  	src = src[4:]
  2456  	n.Data = uint32(hostarch.ByteOrder.Uint32(src[:4]))
  2457  	src = src[4:]
  2458  	return src
  2459  }
  2460  
  2461  // Packed implements marshal.Marshallable.Packed.
  2462  //
  2463  //go:nosplit
  2464  func (n *NVXXXX_CTRL_XXX_INFO) Packed() bool {
  2465  	return true
  2466  }
  2467  
  2468  // MarshalUnsafe implements marshal.Marshallable.MarshalUnsafe.
  2469  func (n *NVXXXX_CTRL_XXX_INFO) MarshalUnsafe(dst []byte) []byte {
  2470  	size := n.SizeBytes()
  2471  	gohacks.Memmove(unsafe.Pointer(&dst[0]), unsafe.Pointer(n), uintptr(size))
  2472  	return dst[size:]
  2473  }
  2474  
  2475  // UnmarshalUnsafe implements marshal.Marshallable.UnmarshalUnsafe.
  2476  func (n *NVXXXX_CTRL_XXX_INFO) UnmarshalUnsafe(src []byte) []byte {
  2477  	size := n.SizeBytes()
  2478  	gohacks.Memmove(unsafe.Pointer(n), unsafe.Pointer(&src[0]), uintptr(size))
  2479  	return src[size:]
  2480  }
  2481  
  2482  // CopyOutN implements marshal.Marshallable.CopyOutN.
  2483  func (n *NVXXXX_CTRL_XXX_INFO) CopyOutN(cc marshal.CopyContext, addr hostarch.Addr, limit int) (int, error) {
  2484  	// Construct a slice backed by dst's underlying memory.
  2485  	var buf []byte
  2486  	hdr := (*reflect.SliceHeader)(unsafe.Pointer(&buf))
  2487  	hdr.Data = uintptr(gohacks.Noescape(unsafe.Pointer(n)))
  2488  	hdr.Len = n.SizeBytes()
  2489  	hdr.Cap = n.SizeBytes()
  2490  
  2491  	length, err := cc.CopyOutBytes(addr, buf[:limit]) // escapes: okay.
  2492  	// Since we bypassed the compiler's escape analysis, indicate that n
  2493  	// must live until the use above.
  2494  	runtime.KeepAlive(n) // escapes: replaced by intrinsic.
  2495  	return length, err
  2496  }
  2497  
  2498  // CopyOut implements marshal.Marshallable.CopyOut.
  2499  func (n *NVXXXX_CTRL_XXX_INFO) CopyOut(cc marshal.CopyContext, addr hostarch.Addr) (int, error) {
  2500  	return n.CopyOutN(cc, addr, n.SizeBytes())
  2501  }
  2502  
  2503  // CopyIn implements marshal.Marshallable.CopyIn.
  2504  func (n *NVXXXX_CTRL_XXX_INFO) CopyIn(cc marshal.CopyContext, addr hostarch.Addr) (int, error) {
  2505  	// Construct a slice backed by dst's underlying memory.
  2506  	var buf []byte
  2507  	hdr := (*reflect.SliceHeader)(unsafe.Pointer(&buf))
  2508  	hdr.Data = uintptr(gohacks.Noescape(unsafe.Pointer(n)))
  2509  	hdr.Len = n.SizeBytes()
  2510  	hdr.Cap = n.SizeBytes()
  2511  
  2512  	length, err := cc.CopyInBytes(addr, buf) // escapes: okay.
  2513  	// Since we bypassed the compiler's escape analysis, indicate that n
  2514  	// must live until the use above.
  2515  	runtime.KeepAlive(n) // escapes: replaced by intrinsic.
  2516  	return length, err
  2517  }
  2518  
  2519  // WriteTo implements io.WriterTo.WriteTo.
  2520  func (n *NVXXXX_CTRL_XXX_INFO) WriteTo(writer io.Writer) (int64, error) {
  2521  	// Construct a slice backed by dst's underlying memory.
  2522  	var buf []byte
  2523  	hdr := (*reflect.SliceHeader)(unsafe.Pointer(&buf))
  2524  	hdr.Data = uintptr(gohacks.Noescape(unsafe.Pointer(n)))
  2525  	hdr.Len = n.SizeBytes()
  2526  	hdr.Cap = n.SizeBytes()
  2527  
  2528  	length, err := writer.Write(buf)
  2529  	// Since we bypassed the compiler's escape analysis, indicate that n
  2530  	// must live until the use above.
  2531  	runtime.KeepAlive(n) // escapes: replaced by intrinsic.
  2532  	return int64(length), err
  2533  }
  2534  
  2535  // SizeBytes implements marshal.Marshallable.SizeBytes.
  2536  func (i *IoctlAllocOSEvent) SizeBytes() int {
  2537  	return 8 +
  2538  		(*Handle)(nil).SizeBytes() +
  2539  		(*Handle)(nil).SizeBytes()
  2540  }
  2541  
  2542  // MarshalBytes implements marshal.Marshallable.MarshalBytes.
  2543  func (i *IoctlAllocOSEvent) MarshalBytes(dst []byte) []byte {
  2544  	dst = i.HClient.MarshalUnsafe(dst)
  2545  	dst = i.HDevice.MarshalUnsafe(dst)
  2546  	hostarch.ByteOrder.PutUint32(dst[:4], uint32(i.FD))
  2547  	dst = dst[4:]
  2548  	hostarch.ByteOrder.PutUint32(dst[:4], uint32(i.Status))
  2549  	dst = dst[4:]
  2550  	return dst
  2551  }
  2552  
  2553  // UnmarshalBytes implements marshal.Marshallable.UnmarshalBytes.
  2554  func (i *IoctlAllocOSEvent) UnmarshalBytes(src []byte) []byte {
  2555  	src = i.HClient.UnmarshalUnsafe(src)
  2556  	src = i.HDevice.UnmarshalUnsafe(src)
  2557  	i.FD = uint32(hostarch.ByteOrder.Uint32(src[:4]))
  2558  	src = src[4:]
  2559  	i.Status = uint32(hostarch.ByteOrder.Uint32(src[:4]))
  2560  	src = src[4:]
  2561  	return src
  2562  }
  2563  
  2564  // Packed implements marshal.Marshallable.Packed.
  2565  //
  2566  //go:nosplit
  2567  func (i *IoctlAllocOSEvent) Packed() bool {
  2568  	return i.HClient.Packed() && i.HDevice.Packed()
  2569  }
  2570  
  2571  // MarshalUnsafe implements marshal.Marshallable.MarshalUnsafe.
  2572  func (i *IoctlAllocOSEvent) MarshalUnsafe(dst []byte) []byte {
  2573  	if i.HClient.Packed() && i.HDevice.Packed() {
  2574  		size := i.SizeBytes()
  2575  		gohacks.Memmove(unsafe.Pointer(&dst[0]), unsafe.Pointer(i), uintptr(size))
  2576  		return dst[size:]
  2577  	}
  2578  	// Type IoctlAllocOSEvent doesn't have a packed layout in memory, fallback to MarshalBytes.
  2579  	return i.MarshalBytes(dst)
  2580  }
  2581  
  2582  // UnmarshalUnsafe implements marshal.Marshallable.UnmarshalUnsafe.
  2583  func (i *IoctlAllocOSEvent) UnmarshalUnsafe(src []byte) []byte {
  2584  	if i.HClient.Packed() && i.HDevice.Packed() {
  2585  		size := i.SizeBytes()
  2586  		gohacks.Memmove(unsafe.Pointer(i), unsafe.Pointer(&src[0]), uintptr(size))
  2587  		return src[size:]
  2588  	}
  2589  	// Type IoctlAllocOSEvent doesn't have a packed layout in memory, fallback to UnmarshalBytes.
  2590  	return i.UnmarshalBytes(src)
  2591  }
  2592  
  2593  // CopyOutN implements marshal.Marshallable.CopyOutN.
  2594  func (i *IoctlAllocOSEvent) CopyOutN(cc marshal.CopyContext, addr hostarch.Addr, limit int) (int, error) {
  2595  	if !i.HClient.Packed() && i.HDevice.Packed() {
  2596  		// Type IoctlAllocOSEvent doesn't have a packed layout in memory, fall back to MarshalBytes.
  2597  		buf := cc.CopyScratchBuffer(i.SizeBytes()) // escapes: okay.
  2598  		i.MarshalBytes(buf)                        // escapes: fallback.
  2599  		return cc.CopyOutBytes(addr, buf[:limit])  // escapes: okay.
  2600  	}
  2601  
  2602  	// Construct a slice backed by dst's underlying memory.
  2603  	var buf []byte
  2604  	hdr := (*reflect.SliceHeader)(unsafe.Pointer(&buf))
  2605  	hdr.Data = uintptr(gohacks.Noescape(unsafe.Pointer(i)))
  2606  	hdr.Len = i.SizeBytes()
  2607  	hdr.Cap = i.SizeBytes()
  2608  
  2609  	length, err := cc.CopyOutBytes(addr, buf[:limit]) // escapes: okay.
  2610  	// Since we bypassed the compiler's escape analysis, indicate that i
  2611  	// must live until the use above.
  2612  	runtime.KeepAlive(i) // escapes: replaced by intrinsic.
  2613  	return length, err
  2614  }
  2615  
  2616  // CopyOut implements marshal.Marshallable.CopyOut.
  2617  func (i *IoctlAllocOSEvent) CopyOut(cc marshal.CopyContext, addr hostarch.Addr) (int, error) {
  2618  	return i.CopyOutN(cc, addr, i.SizeBytes())
  2619  }
  2620  
  2621  // CopyIn implements marshal.Marshallable.CopyIn.
  2622  func (i *IoctlAllocOSEvent) CopyIn(cc marshal.CopyContext, addr hostarch.Addr) (int, error) {
  2623  	if !i.HClient.Packed() && i.HDevice.Packed() {
  2624  		// Type IoctlAllocOSEvent doesn't have a packed layout in memory, fall back to UnmarshalBytes.
  2625  		buf := cc.CopyScratchBuffer(i.SizeBytes()) // escapes: okay.
  2626  		length, err := cc.CopyInBytes(addr, buf)   // escapes: okay.
  2627  		// Unmarshal unconditionally. If we had a short copy-in, this results in a
  2628  		// partially unmarshalled struct.
  2629  		i.UnmarshalBytes(buf) // escapes: fallback.
  2630  		return length, err
  2631  	}
  2632  
  2633  	// Construct a slice backed by dst's underlying memory.
  2634  	var buf []byte
  2635  	hdr := (*reflect.SliceHeader)(unsafe.Pointer(&buf))
  2636  	hdr.Data = uintptr(gohacks.Noescape(unsafe.Pointer(i)))
  2637  	hdr.Len = i.SizeBytes()
  2638  	hdr.Cap = i.SizeBytes()
  2639  
  2640  	length, err := cc.CopyInBytes(addr, buf) // escapes: okay.
  2641  	// Since we bypassed the compiler's escape analysis, indicate that i
  2642  	// must live until the use above.
  2643  	runtime.KeepAlive(i) // escapes: replaced by intrinsic.
  2644  	return length, err
  2645  }
  2646  
  2647  // WriteTo implements io.WriterTo.WriteTo.
  2648  func (i *IoctlAllocOSEvent) WriteTo(writer io.Writer) (int64, error) {
  2649  	if !i.HClient.Packed() && i.HDevice.Packed() {
  2650  		// Type IoctlAllocOSEvent doesn't have a packed layout in memory, fall back to MarshalBytes.
  2651  		buf := make([]byte, i.SizeBytes())
  2652  		i.MarshalBytes(buf)
  2653  		length, err := writer.Write(buf)
  2654  		return int64(length), err
  2655  	}
  2656  
  2657  	// Construct a slice backed by dst's underlying memory.
  2658  	var buf []byte
  2659  	hdr := (*reflect.SliceHeader)(unsafe.Pointer(&buf))
  2660  	hdr.Data = uintptr(gohacks.Noescape(unsafe.Pointer(i)))
  2661  	hdr.Len = i.SizeBytes()
  2662  	hdr.Cap = i.SizeBytes()
  2663  
  2664  	length, err := writer.Write(buf)
  2665  	// Since we bypassed the compiler's escape analysis, indicate that i
  2666  	// must live until the use above.
  2667  	runtime.KeepAlive(i) // escapes: replaced by intrinsic.
  2668  	return int64(length), err
  2669  }
  2670  
  2671  // SizeBytes implements marshal.Marshallable.SizeBytes.
  2672  func (i *IoctlFreeOSEvent) SizeBytes() int {
  2673  	return 8 +
  2674  		(*Handle)(nil).SizeBytes() +
  2675  		(*Handle)(nil).SizeBytes()
  2676  }
  2677  
  2678  // MarshalBytes implements marshal.Marshallable.MarshalBytes.
  2679  func (i *IoctlFreeOSEvent) MarshalBytes(dst []byte) []byte {
  2680  	dst = i.HClient.MarshalUnsafe(dst)
  2681  	dst = i.HDevice.MarshalUnsafe(dst)
  2682  	hostarch.ByteOrder.PutUint32(dst[:4], uint32(i.FD))
  2683  	dst = dst[4:]
  2684  	hostarch.ByteOrder.PutUint32(dst[:4], uint32(i.Status))
  2685  	dst = dst[4:]
  2686  	return dst
  2687  }
  2688  
  2689  // UnmarshalBytes implements marshal.Marshallable.UnmarshalBytes.
  2690  func (i *IoctlFreeOSEvent) UnmarshalBytes(src []byte) []byte {
  2691  	src = i.HClient.UnmarshalUnsafe(src)
  2692  	src = i.HDevice.UnmarshalUnsafe(src)
  2693  	i.FD = uint32(hostarch.ByteOrder.Uint32(src[:4]))
  2694  	src = src[4:]
  2695  	i.Status = uint32(hostarch.ByteOrder.Uint32(src[:4]))
  2696  	src = src[4:]
  2697  	return src
  2698  }
  2699  
  2700  // Packed implements marshal.Marshallable.Packed.
  2701  //
  2702  //go:nosplit
  2703  func (i *IoctlFreeOSEvent) Packed() bool {
  2704  	return i.HClient.Packed() && i.HDevice.Packed()
  2705  }
  2706  
  2707  // MarshalUnsafe implements marshal.Marshallable.MarshalUnsafe.
  2708  func (i *IoctlFreeOSEvent) MarshalUnsafe(dst []byte) []byte {
  2709  	if i.HClient.Packed() && i.HDevice.Packed() {
  2710  		size := i.SizeBytes()
  2711  		gohacks.Memmove(unsafe.Pointer(&dst[0]), unsafe.Pointer(i), uintptr(size))
  2712  		return dst[size:]
  2713  	}
  2714  	// Type IoctlFreeOSEvent doesn't have a packed layout in memory, fallback to MarshalBytes.
  2715  	return i.MarshalBytes(dst)
  2716  }
  2717  
  2718  // UnmarshalUnsafe implements marshal.Marshallable.UnmarshalUnsafe.
  2719  func (i *IoctlFreeOSEvent) UnmarshalUnsafe(src []byte) []byte {
  2720  	if i.HClient.Packed() && i.HDevice.Packed() {
  2721  		size := i.SizeBytes()
  2722  		gohacks.Memmove(unsafe.Pointer(i), unsafe.Pointer(&src[0]), uintptr(size))
  2723  		return src[size:]
  2724  	}
  2725  	// Type IoctlFreeOSEvent doesn't have a packed layout in memory, fallback to UnmarshalBytes.
  2726  	return i.UnmarshalBytes(src)
  2727  }
  2728  
  2729  // CopyOutN implements marshal.Marshallable.CopyOutN.
  2730  func (i *IoctlFreeOSEvent) CopyOutN(cc marshal.CopyContext, addr hostarch.Addr, limit int) (int, error) {
  2731  	if !i.HClient.Packed() && i.HDevice.Packed() {
  2732  		// Type IoctlFreeOSEvent doesn't have a packed layout in memory, fall back to MarshalBytes.
  2733  		buf := cc.CopyScratchBuffer(i.SizeBytes()) // escapes: okay.
  2734  		i.MarshalBytes(buf)                        // escapes: fallback.
  2735  		return cc.CopyOutBytes(addr, buf[:limit])  // escapes: okay.
  2736  	}
  2737  
  2738  	// Construct a slice backed by dst's underlying memory.
  2739  	var buf []byte
  2740  	hdr := (*reflect.SliceHeader)(unsafe.Pointer(&buf))
  2741  	hdr.Data = uintptr(gohacks.Noescape(unsafe.Pointer(i)))
  2742  	hdr.Len = i.SizeBytes()
  2743  	hdr.Cap = i.SizeBytes()
  2744  
  2745  	length, err := cc.CopyOutBytes(addr, buf[:limit]) // escapes: okay.
  2746  	// Since we bypassed the compiler's escape analysis, indicate that i
  2747  	// must live until the use above.
  2748  	runtime.KeepAlive(i) // escapes: replaced by intrinsic.
  2749  	return length, err
  2750  }
  2751  
  2752  // CopyOut implements marshal.Marshallable.CopyOut.
  2753  func (i *IoctlFreeOSEvent) CopyOut(cc marshal.CopyContext, addr hostarch.Addr) (int, error) {
  2754  	return i.CopyOutN(cc, addr, i.SizeBytes())
  2755  }
  2756  
  2757  // CopyIn implements marshal.Marshallable.CopyIn.
  2758  func (i *IoctlFreeOSEvent) CopyIn(cc marshal.CopyContext, addr hostarch.Addr) (int, error) {
  2759  	if !i.HClient.Packed() && i.HDevice.Packed() {
  2760  		// Type IoctlFreeOSEvent doesn't have a packed layout in memory, fall back to UnmarshalBytes.
  2761  		buf := cc.CopyScratchBuffer(i.SizeBytes()) // escapes: okay.
  2762  		length, err := cc.CopyInBytes(addr, buf)   // escapes: okay.
  2763  		// Unmarshal unconditionally. If we had a short copy-in, this results in a
  2764  		// partially unmarshalled struct.
  2765  		i.UnmarshalBytes(buf) // escapes: fallback.
  2766  		return length, err
  2767  	}
  2768  
  2769  	// Construct a slice backed by dst's underlying memory.
  2770  	var buf []byte
  2771  	hdr := (*reflect.SliceHeader)(unsafe.Pointer(&buf))
  2772  	hdr.Data = uintptr(gohacks.Noescape(unsafe.Pointer(i)))
  2773  	hdr.Len = i.SizeBytes()
  2774  	hdr.Cap = i.SizeBytes()
  2775  
  2776  	length, err := cc.CopyInBytes(addr, buf) // escapes: okay.
  2777  	// Since we bypassed the compiler's escape analysis, indicate that i
  2778  	// must live until the use above.
  2779  	runtime.KeepAlive(i) // escapes: replaced by intrinsic.
  2780  	return length, err
  2781  }
  2782  
  2783  // WriteTo implements io.WriterTo.WriteTo.
  2784  func (i *IoctlFreeOSEvent) WriteTo(writer io.Writer) (int64, error) {
  2785  	if !i.HClient.Packed() && i.HDevice.Packed() {
  2786  		// Type IoctlFreeOSEvent doesn't have a packed layout in memory, fall back to MarshalBytes.
  2787  		buf := make([]byte, i.SizeBytes())
  2788  		i.MarshalBytes(buf)
  2789  		length, err := writer.Write(buf)
  2790  		return int64(length), err
  2791  	}
  2792  
  2793  	// Construct a slice backed by dst's underlying memory.
  2794  	var buf []byte
  2795  	hdr := (*reflect.SliceHeader)(unsafe.Pointer(&buf))
  2796  	hdr.Data = uintptr(gohacks.Noescape(unsafe.Pointer(i)))
  2797  	hdr.Len = i.SizeBytes()
  2798  	hdr.Cap = i.SizeBytes()
  2799  
  2800  	length, err := writer.Write(buf)
  2801  	// Since we bypassed the compiler's escape analysis, indicate that i
  2802  	// must live until the use above.
  2803  	runtime.KeepAlive(i) // escapes: replaced by intrinsic.
  2804  	return int64(length), err
  2805  }
  2806  
  2807  // SizeBytes implements marshal.Marshallable.SizeBytes.
  2808  func (i *IoctlNVOS02ParametersWithFD) SizeBytes() int {
  2809  	return 4 +
  2810  		(*NVOS02Parameters)(nil).SizeBytes() +
  2811  		1*4
  2812  }
  2813  
  2814  // MarshalBytes implements marshal.Marshallable.MarshalBytes.
  2815  func (i *IoctlNVOS02ParametersWithFD) MarshalBytes(dst []byte) []byte {
  2816  	dst = i.Params.MarshalUnsafe(dst)
  2817  	hostarch.ByteOrder.PutUint32(dst[:4], uint32(i.FD))
  2818  	dst = dst[4:]
  2819  	for idx := 0; idx < 4; idx++ {
  2820  		dst[0] = byte(i.Pad0[idx])
  2821  		dst = dst[1:]
  2822  	}
  2823  	return dst
  2824  }
  2825  
  2826  // UnmarshalBytes implements marshal.Marshallable.UnmarshalBytes.
  2827  func (i *IoctlNVOS02ParametersWithFD) UnmarshalBytes(src []byte) []byte {
  2828  	src = i.Params.UnmarshalUnsafe(src)
  2829  	i.FD = int32(hostarch.ByteOrder.Uint32(src[:4]))
  2830  	src = src[4:]
  2831  	for idx := 0; idx < 4; idx++ {
  2832  		i.Pad0[idx] = src[0]
  2833  		src = src[1:]
  2834  	}
  2835  	return src
  2836  }
  2837  
  2838  // Packed implements marshal.Marshallable.Packed.
  2839  //
  2840  //go:nosplit
  2841  func (i *IoctlNVOS02ParametersWithFD) Packed() bool {
  2842  	return i.Params.Packed()
  2843  }
  2844  
  2845  // MarshalUnsafe implements marshal.Marshallable.MarshalUnsafe.
  2846  func (i *IoctlNVOS02ParametersWithFD) MarshalUnsafe(dst []byte) []byte {
  2847  	if i.Params.Packed() {
  2848  		size := i.SizeBytes()
  2849  		gohacks.Memmove(unsafe.Pointer(&dst[0]), unsafe.Pointer(i), uintptr(size))
  2850  		return dst[size:]
  2851  	}
  2852  	// Type IoctlNVOS02ParametersWithFD doesn't have a packed layout in memory, fallback to MarshalBytes.
  2853  	return i.MarshalBytes(dst)
  2854  }
  2855  
  2856  // UnmarshalUnsafe implements marshal.Marshallable.UnmarshalUnsafe.
  2857  func (i *IoctlNVOS02ParametersWithFD) UnmarshalUnsafe(src []byte) []byte {
  2858  	if i.Params.Packed() {
  2859  		size := i.SizeBytes()
  2860  		gohacks.Memmove(unsafe.Pointer(i), unsafe.Pointer(&src[0]), uintptr(size))
  2861  		return src[size:]
  2862  	}
  2863  	// Type IoctlNVOS02ParametersWithFD doesn't have a packed layout in memory, fallback to UnmarshalBytes.
  2864  	return i.UnmarshalBytes(src)
  2865  }
  2866  
  2867  // CopyOutN implements marshal.Marshallable.CopyOutN.
  2868  func (i *IoctlNVOS02ParametersWithFD) CopyOutN(cc marshal.CopyContext, addr hostarch.Addr, limit int) (int, error) {
  2869  	if !i.Params.Packed() {
  2870  		// Type IoctlNVOS02ParametersWithFD doesn't have a packed layout in memory, fall back to MarshalBytes.
  2871  		buf := cc.CopyScratchBuffer(i.SizeBytes()) // escapes: okay.
  2872  		i.MarshalBytes(buf)                        // escapes: fallback.
  2873  		return cc.CopyOutBytes(addr, buf[:limit])  // escapes: okay.
  2874  	}
  2875  
  2876  	// Construct a slice backed by dst's underlying memory.
  2877  	var buf []byte
  2878  	hdr := (*reflect.SliceHeader)(unsafe.Pointer(&buf))
  2879  	hdr.Data = uintptr(gohacks.Noescape(unsafe.Pointer(i)))
  2880  	hdr.Len = i.SizeBytes()
  2881  	hdr.Cap = i.SizeBytes()
  2882  
  2883  	length, err := cc.CopyOutBytes(addr, buf[:limit]) // escapes: okay.
  2884  	// Since we bypassed the compiler's escape analysis, indicate that i
  2885  	// must live until the use above.
  2886  	runtime.KeepAlive(i) // escapes: replaced by intrinsic.
  2887  	return length, err
  2888  }
  2889  
  2890  // CopyOut implements marshal.Marshallable.CopyOut.
  2891  func (i *IoctlNVOS02ParametersWithFD) CopyOut(cc marshal.CopyContext, addr hostarch.Addr) (int, error) {
  2892  	return i.CopyOutN(cc, addr, i.SizeBytes())
  2893  }
  2894  
  2895  // CopyIn implements marshal.Marshallable.CopyIn.
  2896  func (i *IoctlNVOS02ParametersWithFD) CopyIn(cc marshal.CopyContext, addr hostarch.Addr) (int, error) {
  2897  	if !i.Params.Packed() {
  2898  		// Type IoctlNVOS02ParametersWithFD doesn't have a packed layout in memory, fall back to UnmarshalBytes.
  2899  		buf := cc.CopyScratchBuffer(i.SizeBytes()) // escapes: okay.
  2900  		length, err := cc.CopyInBytes(addr, buf)   // escapes: okay.
  2901  		// Unmarshal unconditionally. If we had a short copy-in, this results in a
  2902  		// partially unmarshalled struct.
  2903  		i.UnmarshalBytes(buf) // escapes: fallback.
  2904  		return length, err
  2905  	}
  2906  
  2907  	// Construct a slice backed by dst's underlying memory.
  2908  	var buf []byte
  2909  	hdr := (*reflect.SliceHeader)(unsafe.Pointer(&buf))
  2910  	hdr.Data = uintptr(gohacks.Noescape(unsafe.Pointer(i)))
  2911  	hdr.Len = i.SizeBytes()
  2912  	hdr.Cap = i.SizeBytes()
  2913  
  2914  	length, err := cc.CopyInBytes(addr, buf) // escapes: okay.
  2915  	// Since we bypassed the compiler's escape analysis, indicate that i
  2916  	// must live until the use above.
  2917  	runtime.KeepAlive(i) // escapes: replaced by intrinsic.
  2918  	return length, err
  2919  }
  2920  
  2921  // WriteTo implements io.WriterTo.WriteTo.
  2922  func (i *IoctlNVOS02ParametersWithFD) WriteTo(writer io.Writer) (int64, error) {
  2923  	if !i.Params.Packed() {
  2924  		// Type IoctlNVOS02ParametersWithFD doesn't have a packed layout in memory, fall back to MarshalBytes.
  2925  		buf := make([]byte, i.SizeBytes())
  2926  		i.MarshalBytes(buf)
  2927  		length, err := writer.Write(buf)
  2928  		return int64(length), err
  2929  	}
  2930  
  2931  	// Construct a slice backed by dst's underlying memory.
  2932  	var buf []byte
  2933  	hdr := (*reflect.SliceHeader)(unsafe.Pointer(&buf))
  2934  	hdr.Data = uintptr(gohacks.Noescape(unsafe.Pointer(i)))
  2935  	hdr.Len = i.SizeBytes()
  2936  	hdr.Cap = i.SizeBytes()
  2937  
  2938  	length, err := writer.Write(buf)
  2939  	// Since we bypassed the compiler's escape analysis, indicate that i
  2940  	// must live until the use above.
  2941  	runtime.KeepAlive(i) // escapes: replaced by intrinsic.
  2942  	return int64(length), err
  2943  }
  2944  
  2945  // SizeBytes implements marshal.Marshallable.SizeBytes.
  2946  func (i *IoctlNVOS33ParametersWithFD) SizeBytes() int {
  2947  	return 4 +
  2948  		(*NVOS33Parameters)(nil).SizeBytes() +
  2949  		1*4
  2950  }
  2951  
  2952  // MarshalBytes implements marshal.Marshallable.MarshalBytes.
  2953  func (i *IoctlNVOS33ParametersWithFD) MarshalBytes(dst []byte) []byte {
  2954  	dst = i.Params.MarshalUnsafe(dst)
  2955  	hostarch.ByteOrder.PutUint32(dst[:4], uint32(i.FD))
  2956  	dst = dst[4:]
  2957  	for idx := 0; idx < 4; idx++ {
  2958  		dst[0] = byte(i.Pad0[idx])
  2959  		dst = dst[1:]
  2960  	}
  2961  	return dst
  2962  }
  2963  
  2964  // UnmarshalBytes implements marshal.Marshallable.UnmarshalBytes.
  2965  func (i *IoctlNVOS33ParametersWithFD) UnmarshalBytes(src []byte) []byte {
  2966  	src = i.Params.UnmarshalUnsafe(src)
  2967  	i.FD = int32(hostarch.ByteOrder.Uint32(src[:4]))
  2968  	src = src[4:]
  2969  	for idx := 0; idx < 4; idx++ {
  2970  		i.Pad0[idx] = src[0]
  2971  		src = src[1:]
  2972  	}
  2973  	return src
  2974  }
  2975  
  2976  // Packed implements marshal.Marshallable.Packed.
  2977  //
  2978  //go:nosplit
  2979  func (i *IoctlNVOS33ParametersWithFD) Packed() bool {
  2980  	return i.Params.Packed()
  2981  }
  2982  
  2983  // MarshalUnsafe implements marshal.Marshallable.MarshalUnsafe.
  2984  func (i *IoctlNVOS33ParametersWithFD) MarshalUnsafe(dst []byte) []byte {
  2985  	if i.Params.Packed() {
  2986  		size := i.SizeBytes()
  2987  		gohacks.Memmove(unsafe.Pointer(&dst[0]), unsafe.Pointer(i), uintptr(size))
  2988  		return dst[size:]
  2989  	}
  2990  	// Type IoctlNVOS33ParametersWithFD doesn't have a packed layout in memory, fallback to MarshalBytes.
  2991  	return i.MarshalBytes(dst)
  2992  }
  2993  
  2994  // UnmarshalUnsafe implements marshal.Marshallable.UnmarshalUnsafe.
  2995  func (i *IoctlNVOS33ParametersWithFD) UnmarshalUnsafe(src []byte) []byte {
  2996  	if i.Params.Packed() {
  2997  		size := i.SizeBytes()
  2998  		gohacks.Memmove(unsafe.Pointer(i), unsafe.Pointer(&src[0]), uintptr(size))
  2999  		return src[size:]
  3000  	}
  3001  	// Type IoctlNVOS33ParametersWithFD doesn't have a packed layout in memory, fallback to UnmarshalBytes.
  3002  	return i.UnmarshalBytes(src)
  3003  }
  3004  
  3005  // CopyOutN implements marshal.Marshallable.CopyOutN.
  3006  func (i *IoctlNVOS33ParametersWithFD) CopyOutN(cc marshal.CopyContext, addr hostarch.Addr, limit int) (int, error) {
  3007  	if !i.Params.Packed() {
  3008  		// Type IoctlNVOS33ParametersWithFD doesn't have a packed layout in memory, fall back to MarshalBytes.
  3009  		buf := cc.CopyScratchBuffer(i.SizeBytes()) // escapes: okay.
  3010  		i.MarshalBytes(buf)                        // escapes: fallback.
  3011  		return cc.CopyOutBytes(addr, buf[:limit])  // escapes: okay.
  3012  	}
  3013  
  3014  	// Construct a slice backed by dst's underlying memory.
  3015  	var buf []byte
  3016  	hdr := (*reflect.SliceHeader)(unsafe.Pointer(&buf))
  3017  	hdr.Data = uintptr(gohacks.Noescape(unsafe.Pointer(i)))
  3018  	hdr.Len = i.SizeBytes()
  3019  	hdr.Cap = i.SizeBytes()
  3020  
  3021  	length, err := cc.CopyOutBytes(addr, buf[:limit]) // escapes: okay.
  3022  	// Since we bypassed the compiler's escape analysis, indicate that i
  3023  	// must live until the use above.
  3024  	runtime.KeepAlive(i) // escapes: replaced by intrinsic.
  3025  	return length, err
  3026  }
  3027  
  3028  // CopyOut implements marshal.Marshallable.CopyOut.
  3029  func (i *IoctlNVOS33ParametersWithFD) CopyOut(cc marshal.CopyContext, addr hostarch.Addr) (int, error) {
  3030  	return i.CopyOutN(cc, addr, i.SizeBytes())
  3031  }
  3032  
  3033  // CopyIn implements marshal.Marshallable.CopyIn.
  3034  func (i *IoctlNVOS33ParametersWithFD) CopyIn(cc marshal.CopyContext, addr hostarch.Addr) (int, error) {
  3035  	if !i.Params.Packed() {
  3036  		// Type IoctlNVOS33ParametersWithFD doesn't have a packed layout in memory, fall back to UnmarshalBytes.
  3037  		buf := cc.CopyScratchBuffer(i.SizeBytes()) // escapes: okay.
  3038  		length, err := cc.CopyInBytes(addr, buf)   // escapes: okay.
  3039  		// Unmarshal unconditionally. If we had a short copy-in, this results in a
  3040  		// partially unmarshalled struct.
  3041  		i.UnmarshalBytes(buf) // escapes: fallback.
  3042  		return length, err
  3043  	}
  3044  
  3045  	// Construct a slice backed by dst's underlying memory.
  3046  	var buf []byte
  3047  	hdr := (*reflect.SliceHeader)(unsafe.Pointer(&buf))
  3048  	hdr.Data = uintptr(gohacks.Noescape(unsafe.Pointer(i)))
  3049  	hdr.Len = i.SizeBytes()
  3050  	hdr.Cap = i.SizeBytes()
  3051  
  3052  	length, err := cc.CopyInBytes(addr, buf) // escapes: okay.
  3053  	// Since we bypassed the compiler's escape analysis, indicate that i
  3054  	// must live until the use above.
  3055  	runtime.KeepAlive(i) // escapes: replaced by intrinsic.
  3056  	return length, err
  3057  }
  3058  
  3059  // WriteTo implements io.WriterTo.WriteTo.
  3060  func (i *IoctlNVOS33ParametersWithFD) WriteTo(writer io.Writer) (int64, error) {
  3061  	if !i.Params.Packed() {
  3062  		// Type IoctlNVOS33ParametersWithFD doesn't have a packed layout in memory, fall back to MarshalBytes.
  3063  		buf := make([]byte, i.SizeBytes())
  3064  		i.MarshalBytes(buf)
  3065  		length, err := writer.Write(buf)
  3066  		return int64(length), err
  3067  	}
  3068  
  3069  	// Construct a slice backed by dst's underlying memory.
  3070  	var buf []byte
  3071  	hdr := (*reflect.SliceHeader)(unsafe.Pointer(&buf))
  3072  	hdr.Data = uintptr(gohacks.Noescape(unsafe.Pointer(i)))
  3073  	hdr.Len = i.SizeBytes()
  3074  	hdr.Cap = i.SizeBytes()
  3075  
  3076  	length, err := writer.Write(buf)
  3077  	// Since we bypassed the compiler's escape analysis, indicate that i
  3078  	// must live until the use above.
  3079  	runtime.KeepAlive(i) // escapes: replaced by intrinsic.
  3080  	return int64(length), err
  3081  }
  3082  
  3083  // SizeBytes implements marshal.Marshallable.SizeBytes.
  3084  func (i *IoctlRegisterFD) SizeBytes() int {
  3085  	return 4
  3086  }
  3087  
  3088  // MarshalBytes implements marshal.Marshallable.MarshalBytes.
  3089  func (i *IoctlRegisterFD) MarshalBytes(dst []byte) []byte {
  3090  	hostarch.ByteOrder.PutUint32(dst[:4], uint32(i.CtlFD))
  3091  	dst = dst[4:]
  3092  	return dst
  3093  }
  3094  
  3095  // UnmarshalBytes implements marshal.Marshallable.UnmarshalBytes.
  3096  func (i *IoctlRegisterFD) UnmarshalBytes(src []byte) []byte {
  3097  	i.CtlFD = int32(hostarch.ByteOrder.Uint32(src[:4]))
  3098  	src = src[4:]
  3099  	return src
  3100  }
  3101  
  3102  // Packed implements marshal.Marshallable.Packed.
  3103  //
  3104  //go:nosplit
  3105  func (i *IoctlRegisterFD) Packed() bool {
  3106  	return true
  3107  }
  3108  
  3109  // MarshalUnsafe implements marshal.Marshallable.MarshalUnsafe.
  3110  func (i *IoctlRegisterFD) MarshalUnsafe(dst []byte) []byte {
  3111  	size := i.SizeBytes()
  3112  	gohacks.Memmove(unsafe.Pointer(&dst[0]), unsafe.Pointer(i), uintptr(size))
  3113  	return dst[size:]
  3114  }
  3115  
  3116  // UnmarshalUnsafe implements marshal.Marshallable.UnmarshalUnsafe.
  3117  func (i *IoctlRegisterFD) UnmarshalUnsafe(src []byte) []byte {
  3118  	size := i.SizeBytes()
  3119  	gohacks.Memmove(unsafe.Pointer(i), unsafe.Pointer(&src[0]), uintptr(size))
  3120  	return src[size:]
  3121  }
  3122  
  3123  // CopyOutN implements marshal.Marshallable.CopyOutN.
  3124  func (i *IoctlRegisterFD) CopyOutN(cc marshal.CopyContext, addr hostarch.Addr, limit int) (int, error) {
  3125  	// Construct a slice backed by dst's underlying memory.
  3126  	var buf []byte
  3127  	hdr := (*reflect.SliceHeader)(unsafe.Pointer(&buf))
  3128  	hdr.Data = uintptr(gohacks.Noescape(unsafe.Pointer(i)))
  3129  	hdr.Len = i.SizeBytes()
  3130  	hdr.Cap = i.SizeBytes()
  3131  
  3132  	length, err := cc.CopyOutBytes(addr, buf[:limit]) // escapes: okay.
  3133  	// Since we bypassed the compiler's escape analysis, indicate that i
  3134  	// must live until the use above.
  3135  	runtime.KeepAlive(i) // escapes: replaced by intrinsic.
  3136  	return length, err
  3137  }
  3138  
  3139  // CopyOut implements marshal.Marshallable.CopyOut.
  3140  func (i *IoctlRegisterFD) CopyOut(cc marshal.CopyContext, addr hostarch.Addr) (int, error) {
  3141  	return i.CopyOutN(cc, addr, i.SizeBytes())
  3142  }
  3143  
  3144  // CopyIn implements marshal.Marshallable.CopyIn.
  3145  func (i *IoctlRegisterFD) CopyIn(cc marshal.CopyContext, addr hostarch.Addr) (int, error) {
  3146  	// Construct a slice backed by dst's underlying memory.
  3147  	var buf []byte
  3148  	hdr := (*reflect.SliceHeader)(unsafe.Pointer(&buf))
  3149  	hdr.Data = uintptr(gohacks.Noescape(unsafe.Pointer(i)))
  3150  	hdr.Len = i.SizeBytes()
  3151  	hdr.Cap = i.SizeBytes()
  3152  
  3153  	length, err := cc.CopyInBytes(addr, buf) // escapes: okay.
  3154  	// Since we bypassed the compiler's escape analysis, indicate that i
  3155  	// must live until the use above.
  3156  	runtime.KeepAlive(i) // escapes: replaced by intrinsic.
  3157  	return length, err
  3158  }
  3159  
  3160  // WriteTo implements io.WriterTo.WriteTo.
  3161  func (i *IoctlRegisterFD) WriteTo(writer io.Writer) (int64, error) {
  3162  	// Construct a slice backed by dst's underlying memory.
  3163  	var buf []byte
  3164  	hdr := (*reflect.SliceHeader)(unsafe.Pointer(&buf))
  3165  	hdr.Data = uintptr(gohacks.Noescape(unsafe.Pointer(i)))
  3166  	hdr.Len = i.SizeBytes()
  3167  	hdr.Cap = i.SizeBytes()
  3168  
  3169  	length, err := writer.Write(buf)
  3170  	// Since we bypassed the compiler's escape analysis, indicate that i
  3171  	// must live until the use above.
  3172  	runtime.KeepAlive(i) // escapes: replaced by intrinsic.
  3173  	return int64(length), err
  3174  }
  3175  
  3176  // SizeBytes implements marshal.Marshallable.SizeBytes.
  3177  func (i *IoctlSysParams) SizeBytes() int {
  3178  	return 8
  3179  }
  3180  
  3181  // MarshalBytes implements marshal.Marshallable.MarshalBytes.
  3182  func (i *IoctlSysParams) MarshalBytes(dst []byte) []byte {
  3183  	hostarch.ByteOrder.PutUint64(dst[:8], uint64(i.MemblockSize))
  3184  	dst = dst[8:]
  3185  	return dst
  3186  }
  3187  
  3188  // UnmarshalBytes implements marshal.Marshallable.UnmarshalBytes.
  3189  func (i *IoctlSysParams) UnmarshalBytes(src []byte) []byte {
  3190  	i.MemblockSize = uint64(hostarch.ByteOrder.Uint64(src[:8]))
  3191  	src = src[8:]
  3192  	return src
  3193  }
  3194  
  3195  // Packed implements marshal.Marshallable.Packed.
  3196  //
  3197  //go:nosplit
  3198  func (i *IoctlSysParams) Packed() bool {
  3199  	return true
  3200  }
  3201  
  3202  // MarshalUnsafe implements marshal.Marshallable.MarshalUnsafe.
  3203  func (i *IoctlSysParams) MarshalUnsafe(dst []byte) []byte {
  3204  	size := i.SizeBytes()
  3205  	gohacks.Memmove(unsafe.Pointer(&dst[0]), unsafe.Pointer(i), uintptr(size))
  3206  	return dst[size:]
  3207  }
  3208  
  3209  // UnmarshalUnsafe implements marshal.Marshallable.UnmarshalUnsafe.
  3210  func (i *IoctlSysParams) UnmarshalUnsafe(src []byte) []byte {
  3211  	size := i.SizeBytes()
  3212  	gohacks.Memmove(unsafe.Pointer(i), unsafe.Pointer(&src[0]), uintptr(size))
  3213  	return src[size:]
  3214  }
  3215  
  3216  // CopyOutN implements marshal.Marshallable.CopyOutN.
  3217  func (i *IoctlSysParams) CopyOutN(cc marshal.CopyContext, addr hostarch.Addr, limit int) (int, error) {
  3218  	// Construct a slice backed by dst's underlying memory.
  3219  	var buf []byte
  3220  	hdr := (*reflect.SliceHeader)(unsafe.Pointer(&buf))
  3221  	hdr.Data = uintptr(gohacks.Noescape(unsafe.Pointer(i)))
  3222  	hdr.Len = i.SizeBytes()
  3223  	hdr.Cap = i.SizeBytes()
  3224  
  3225  	length, err := cc.CopyOutBytes(addr, buf[:limit]) // escapes: okay.
  3226  	// Since we bypassed the compiler's escape analysis, indicate that i
  3227  	// must live until the use above.
  3228  	runtime.KeepAlive(i) // escapes: replaced by intrinsic.
  3229  	return length, err
  3230  }
  3231  
  3232  // CopyOut implements marshal.Marshallable.CopyOut.
  3233  func (i *IoctlSysParams) CopyOut(cc marshal.CopyContext, addr hostarch.Addr) (int, error) {
  3234  	return i.CopyOutN(cc, addr, i.SizeBytes())
  3235  }
  3236  
  3237  // CopyIn implements marshal.Marshallable.CopyIn.
  3238  func (i *IoctlSysParams) CopyIn(cc marshal.CopyContext, addr hostarch.Addr) (int, error) {
  3239  	// Construct a slice backed by dst's underlying memory.
  3240  	var buf []byte
  3241  	hdr := (*reflect.SliceHeader)(unsafe.Pointer(&buf))
  3242  	hdr.Data = uintptr(gohacks.Noescape(unsafe.Pointer(i)))
  3243  	hdr.Len = i.SizeBytes()
  3244  	hdr.Cap = i.SizeBytes()
  3245  
  3246  	length, err := cc.CopyInBytes(addr, buf) // escapes: okay.
  3247  	// Since we bypassed the compiler's escape analysis, indicate that i
  3248  	// must live until the use above.
  3249  	runtime.KeepAlive(i) // escapes: replaced by intrinsic.
  3250  	return length, err
  3251  }
  3252  
  3253  // WriteTo implements io.WriterTo.WriteTo.
  3254  func (i *IoctlSysParams) WriteTo(writer io.Writer) (int64, error) {
  3255  	// Construct a slice backed by dst's underlying memory.
  3256  	var buf []byte
  3257  	hdr := (*reflect.SliceHeader)(unsafe.Pointer(&buf))
  3258  	hdr.Data = uintptr(gohacks.Noescape(unsafe.Pointer(i)))
  3259  	hdr.Len = i.SizeBytes()
  3260  	hdr.Cap = i.SizeBytes()
  3261  
  3262  	length, err := writer.Write(buf)
  3263  	// Since we bypassed the compiler's escape analysis, indicate that i
  3264  	// must live until the use above.
  3265  	runtime.KeepAlive(i) // escapes: replaced by intrinsic.
  3266  	return int64(length), err
  3267  }
  3268  
  3269  // SizeBytes implements marshal.Marshallable.SizeBytes.
  3270  func (n *NVOS00Parameters) SizeBytes() int {
  3271  	return 4 +
  3272  		(*Handle)(nil).SizeBytes() +
  3273  		(*Handle)(nil).SizeBytes() +
  3274  		(*Handle)(nil).SizeBytes()
  3275  }
  3276  
  3277  // MarshalBytes implements marshal.Marshallable.MarshalBytes.
  3278  func (n *NVOS00Parameters) MarshalBytes(dst []byte) []byte {
  3279  	dst = n.HRoot.MarshalUnsafe(dst)
  3280  	dst = n.HObjectParent.MarshalUnsafe(dst)
  3281  	dst = n.HObjectOld.MarshalUnsafe(dst)
  3282  	hostarch.ByteOrder.PutUint32(dst[:4], uint32(n.Status))
  3283  	dst = dst[4:]
  3284  	return dst
  3285  }
  3286  
  3287  // UnmarshalBytes implements marshal.Marshallable.UnmarshalBytes.
  3288  func (n *NVOS00Parameters) UnmarshalBytes(src []byte) []byte {
  3289  	src = n.HRoot.UnmarshalUnsafe(src)
  3290  	src = n.HObjectParent.UnmarshalUnsafe(src)
  3291  	src = n.HObjectOld.UnmarshalUnsafe(src)
  3292  	n.Status = uint32(hostarch.ByteOrder.Uint32(src[:4]))
  3293  	src = src[4:]
  3294  	return src
  3295  }
  3296  
  3297  // Packed implements marshal.Marshallable.Packed.
  3298  //
  3299  //go:nosplit
  3300  func (n *NVOS00Parameters) Packed() bool {
  3301  	return n.HObjectOld.Packed() && n.HObjectParent.Packed() && n.HRoot.Packed()
  3302  }
  3303  
  3304  // MarshalUnsafe implements marshal.Marshallable.MarshalUnsafe.
  3305  func (n *NVOS00Parameters) MarshalUnsafe(dst []byte) []byte {
  3306  	if n.HObjectOld.Packed() && n.HObjectParent.Packed() && n.HRoot.Packed() {
  3307  		size := n.SizeBytes()
  3308  		gohacks.Memmove(unsafe.Pointer(&dst[0]), unsafe.Pointer(n), uintptr(size))
  3309  		return dst[size:]
  3310  	}
  3311  	// Type NVOS00Parameters doesn't have a packed layout in memory, fallback to MarshalBytes.
  3312  	return n.MarshalBytes(dst)
  3313  }
  3314  
  3315  // UnmarshalUnsafe implements marshal.Marshallable.UnmarshalUnsafe.
  3316  func (n *NVOS00Parameters) UnmarshalUnsafe(src []byte) []byte {
  3317  	if n.HObjectOld.Packed() && n.HObjectParent.Packed() && n.HRoot.Packed() {
  3318  		size := n.SizeBytes()
  3319  		gohacks.Memmove(unsafe.Pointer(n), unsafe.Pointer(&src[0]), uintptr(size))
  3320  		return src[size:]
  3321  	}
  3322  	// Type NVOS00Parameters doesn't have a packed layout in memory, fallback to UnmarshalBytes.
  3323  	return n.UnmarshalBytes(src)
  3324  }
  3325  
  3326  // CopyOutN implements marshal.Marshallable.CopyOutN.
  3327  func (n *NVOS00Parameters) CopyOutN(cc marshal.CopyContext, addr hostarch.Addr, limit int) (int, error) {
  3328  	if !n.HObjectOld.Packed() && n.HObjectParent.Packed() && n.HRoot.Packed() {
  3329  		// Type NVOS00Parameters doesn't have a packed layout in memory, fall back to MarshalBytes.
  3330  		buf := cc.CopyScratchBuffer(n.SizeBytes()) // escapes: okay.
  3331  		n.MarshalBytes(buf)                        // escapes: fallback.
  3332  		return cc.CopyOutBytes(addr, buf[:limit])  // escapes: okay.
  3333  	}
  3334  
  3335  	// Construct a slice backed by dst's underlying memory.
  3336  	var buf []byte
  3337  	hdr := (*reflect.SliceHeader)(unsafe.Pointer(&buf))
  3338  	hdr.Data = uintptr(gohacks.Noescape(unsafe.Pointer(n)))
  3339  	hdr.Len = n.SizeBytes()
  3340  	hdr.Cap = n.SizeBytes()
  3341  
  3342  	length, err := cc.CopyOutBytes(addr, buf[:limit]) // escapes: okay.
  3343  	// Since we bypassed the compiler's escape analysis, indicate that n
  3344  	// must live until the use above.
  3345  	runtime.KeepAlive(n) // escapes: replaced by intrinsic.
  3346  	return length, err
  3347  }
  3348  
  3349  // CopyOut implements marshal.Marshallable.CopyOut.
  3350  func (n *NVOS00Parameters) CopyOut(cc marshal.CopyContext, addr hostarch.Addr) (int, error) {
  3351  	return n.CopyOutN(cc, addr, n.SizeBytes())
  3352  }
  3353  
  3354  // CopyIn implements marshal.Marshallable.CopyIn.
  3355  func (n *NVOS00Parameters) CopyIn(cc marshal.CopyContext, addr hostarch.Addr) (int, error) {
  3356  	if !n.HObjectOld.Packed() && n.HObjectParent.Packed() && n.HRoot.Packed() {
  3357  		// Type NVOS00Parameters doesn't have a packed layout in memory, fall back to UnmarshalBytes.
  3358  		buf := cc.CopyScratchBuffer(n.SizeBytes()) // escapes: okay.
  3359  		length, err := cc.CopyInBytes(addr, buf)   // escapes: okay.
  3360  		// Unmarshal unconditionally. If we had a short copy-in, this results in a
  3361  		// partially unmarshalled struct.
  3362  		n.UnmarshalBytes(buf) // escapes: fallback.
  3363  		return length, err
  3364  	}
  3365  
  3366  	// Construct a slice backed by dst's underlying memory.
  3367  	var buf []byte
  3368  	hdr := (*reflect.SliceHeader)(unsafe.Pointer(&buf))
  3369  	hdr.Data = uintptr(gohacks.Noescape(unsafe.Pointer(n)))
  3370  	hdr.Len = n.SizeBytes()
  3371  	hdr.Cap = n.SizeBytes()
  3372  
  3373  	length, err := cc.CopyInBytes(addr, buf) // escapes: okay.
  3374  	// Since we bypassed the compiler's escape analysis, indicate that n
  3375  	// must live until the use above.
  3376  	runtime.KeepAlive(n) // escapes: replaced by intrinsic.
  3377  	return length, err
  3378  }
  3379  
  3380  // WriteTo implements io.WriterTo.WriteTo.
  3381  func (n *NVOS00Parameters) WriteTo(writer io.Writer) (int64, error) {
  3382  	if !n.HObjectOld.Packed() && n.HObjectParent.Packed() && n.HRoot.Packed() {
  3383  		// Type NVOS00Parameters doesn't have a packed layout in memory, fall back to MarshalBytes.
  3384  		buf := make([]byte, n.SizeBytes())
  3385  		n.MarshalBytes(buf)
  3386  		length, err := writer.Write(buf)
  3387  		return int64(length), err
  3388  	}
  3389  
  3390  	// Construct a slice backed by dst's underlying memory.
  3391  	var buf []byte
  3392  	hdr := (*reflect.SliceHeader)(unsafe.Pointer(&buf))
  3393  	hdr.Data = uintptr(gohacks.Noescape(unsafe.Pointer(n)))
  3394  	hdr.Len = n.SizeBytes()
  3395  	hdr.Cap = n.SizeBytes()
  3396  
  3397  	length, err := writer.Write(buf)
  3398  	// Since we bypassed the compiler's escape analysis, indicate that n
  3399  	// must live until the use above.
  3400  	runtime.KeepAlive(n) // escapes: replaced by intrinsic.
  3401  	return int64(length), err
  3402  }
  3403  
  3404  // SizeBytes implements marshal.Marshallable.SizeBytes.
  3405  func (n *NVOS02Parameters) SizeBytes() int {
  3406  	return 20 +
  3407  		(*Handle)(nil).SizeBytes() +
  3408  		(*Handle)(nil).SizeBytes() +
  3409  		(*Handle)(nil).SizeBytes() +
  3410  		1*4 +
  3411  		(*P64)(nil).SizeBytes() +
  3412  		1*4
  3413  }
  3414  
  3415  // MarshalBytes implements marshal.Marshallable.MarshalBytes.
  3416  func (n *NVOS02Parameters) MarshalBytes(dst []byte) []byte {
  3417  	dst = n.HRoot.MarshalUnsafe(dst)
  3418  	dst = n.HObjectParent.MarshalUnsafe(dst)
  3419  	dst = n.HObjectNew.MarshalUnsafe(dst)
  3420  	hostarch.ByteOrder.PutUint32(dst[:4], uint32(n.HClass))
  3421  	dst = dst[4:]
  3422  	hostarch.ByteOrder.PutUint32(dst[:4], uint32(n.Flags))
  3423  	dst = dst[4:]
  3424  	for idx := 0; idx < 4; idx++ {
  3425  		dst[0] = byte(n.Pad0[idx])
  3426  		dst = dst[1:]
  3427  	}
  3428  	dst = n.PMemory.MarshalUnsafe(dst)
  3429  	hostarch.ByteOrder.PutUint64(dst[:8], uint64(n.Limit))
  3430  	dst = dst[8:]
  3431  	hostarch.ByteOrder.PutUint32(dst[:4], uint32(n.Status))
  3432  	dst = dst[4:]
  3433  	for idx := 0; idx < 4; idx++ {
  3434  		dst[0] = byte(n.Pad1[idx])
  3435  		dst = dst[1:]
  3436  	}
  3437  	return dst
  3438  }
  3439  
  3440  // UnmarshalBytes implements marshal.Marshallable.UnmarshalBytes.
  3441  func (n *NVOS02Parameters) UnmarshalBytes(src []byte) []byte {
  3442  	src = n.HRoot.UnmarshalUnsafe(src)
  3443  	src = n.HObjectParent.UnmarshalUnsafe(src)
  3444  	src = n.HObjectNew.UnmarshalUnsafe(src)
  3445  	n.HClass = uint32(hostarch.ByteOrder.Uint32(src[:4]))
  3446  	src = src[4:]
  3447  	n.Flags = uint32(hostarch.ByteOrder.Uint32(src[:4]))
  3448  	src = src[4:]
  3449  	for idx := 0; idx < 4; idx++ {
  3450  		n.Pad0[idx] = src[0]
  3451  		src = src[1:]
  3452  	}
  3453  	src = n.PMemory.UnmarshalUnsafe(src)
  3454  	n.Limit = uint64(hostarch.ByteOrder.Uint64(src[:8]))
  3455  	src = src[8:]
  3456  	n.Status = uint32(hostarch.ByteOrder.Uint32(src[:4]))
  3457  	src = src[4:]
  3458  	for idx := 0; idx < 4; idx++ {
  3459  		n.Pad1[idx] = src[0]
  3460  		src = src[1:]
  3461  	}
  3462  	return src
  3463  }
  3464  
  3465  // Packed implements marshal.Marshallable.Packed.
  3466  //
  3467  //go:nosplit
  3468  func (n *NVOS02Parameters) Packed() bool {
  3469  	return n.HObjectNew.Packed() && n.HObjectParent.Packed() && n.HRoot.Packed() && n.PMemory.Packed()
  3470  }
  3471  
  3472  // MarshalUnsafe implements marshal.Marshallable.MarshalUnsafe.
  3473  func (n *NVOS02Parameters) MarshalUnsafe(dst []byte) []byte {
  3474  	if n.HObjectNew.Packed() && n.HObjectParent.Packed() && n.HRoot.Packed() && n.PMemory.Packed() {
  3475  		size := n.SizeBytes()
  3476  		gohacks.Memmove(unsafe.Pointer(&dst[0]), unsafe.Pointer(n), uintptr(size))
  3477  		return dst[size:]
  3478  	}
  3479  	// Type NVOS02Parameters doesn't have a packed layout in memory, fallback to MarshalBytes.
  3480  	return n.MarshalBytes(dst)
  3481  }
  3482  
  3483  // UnmarshalUnsafe implements marshal.Marshallable.UnmarshalUnsafe.
  3484  func (n *NVOS02Parameters) UnmarshalUnsafe(src []byte) []byte {
  3485  	if n.HObjectNew.Packed() && n.HObjectParent.Packed() && n.HRoot.Packed() && n.PMemory.Packed() {
  3486  		size := n.SizeBytes()
  3487  		gohacks.Memmove(unsafe.Pointer(n), unsafe.Pointer(&src[0]), uintptr(size))
  3488  		return src[size:]
  3489  	}
  3490  	// Type NVOS02Parameters doesn't have a packed layout in memory, fallback to UnmarshalBytes.
  3491  	return n.UnmarshalBytes(src)
  3492  }
  3493  
  3494  // CopyOutN implements marshal.Marshallable.CopyOutN.
  3495  func (n *NVOS02Parameters) CopyOutN(cc marshal.CopyContext, addr hostarch.Addr, limit int) (int, error) {
  3496  	if !n.HObjectNew.Packed() && n.HObjectParent.Packed() && n.HRoot.Packed() && n.PMemory.Packed() {
  3497  		// Type NVOS02Parameters doesn't have a packed layout in memory, fall back to MarshalBytes.
  3498  		buf := cc.CopyScratchBuffer(n.SizeBytes()) // escapes: okay.
  3499  		n.MarshalBytes(buf)                        // escapes: fallback.
  3500  		return cc.CopyOutBytes(addr, buf[:limit])  // escapes: okay.
  3501  	}
  3502  
  3503  	// Construct a slice backed by dst's underlying memory.
  3504  	var buf []byte
  3505  	hdr := (*reflect.SliceHeader)(unsafe.Pointer(&buf))
  3506  	hdr.Data = uintptr(gohacks.Noescape(unsafe.Pointer(n)))
  3507  	hdr.Len = n.SizeBytes()
  3508  	hdr.Cap = n.SizeBytes()
  3509  
  3510  	length, err := cc.CopyOutBytes(addr, buf[:limit]) // escapes: okay.
  3511  	// Since we bypassed the compiler's escape analysis, indicate that n
  3512  	// must live until the use above.
  3513  	runtime.KeepAlive(n) // escapes: replaced by intrinsic.
  3514  	return length, err
  3515  }
  3516  
  3517  // CopyOut implements marshal.Marshallable.CopyOut.
  3518  func (n *NVOS02Parameters) CopyOut(cc marshal.CopyContext, addr hostarch.Addr) (int, error) {
  3519  	return n.CopyOutN(cc, addr, n.SizeBytes())
  3520  }
  3521  
  3522  // CopyIn implements marshal.Marshallable.CopyIn.
  3523  func (n *NVOS02Parameters) CopyIn(cc marshal.CopyContext, addr hostarch.Addr) (int, error) {
  3524  	if !n.HObjectNew.Packed() && n.HObjectParent.Packed() && n.HRoot.Packed() && n.PMemory.Packed() {
  3525  		// Type NVOS02Parameters doesn't have a packed layout in memory, fall back to UnmarshalBytes.
  3526  		buf := cc.CopyScratchBuffer(n.SizeBytes()) // escapes: okay.
  3527  		length, err := cc.CopyInBytes(addr, buf)   // escapes: okay.
  3528  		// Unmarshal unconditionally. If we had a short copy-in, this results in a
  3529  		// partially unmarshalled struct.
  3530  		n.UnmarshalBytes(buf) // escapes: fallback.
  3531  		return length, err
  3532  	}
  3533  
  3534  	// Construct a slice backed by dst's underlying memory.
  3535  	var buf []byte
  3536  	hdr := (*reflect.SliceHeader)(unsafe.Pointer(&buf))
  3537  	hdr.Data = uintptr(gohacks.Noescape(unsafe.Pointer(n)))
  3538  	hdr.Len = n.SizeBytes()
  3539  	hdr.Cap = n.SizeBytes()
  3540  
  3541  	length, err := cc.CopyInBytes(addr, buf) // escapes: okay.
  3542  	// Since we bypassed the compiler's escape analysis, indicate that n
  3543  	// must live until the use above.
  3544  	runtime.KeepAlive(n) // escapes: replaced by intrinsic.
  3545  	return length, err
  3546  }
  3547  
  3548  // WriteTo implements io.WriterTo.WriteTo.
  3549  func (n *NVOS02Parameters) WriteTo(writer io.Writer) (int64, error) {
  3550  	if !n.HObjectNew.Packed() && n.HObjectParent.Packed() && n.HRoot.Packed() && n.PMemory.Packed() {
  3551  		// Type NVOS02Parameters doesn't have a packed layout in memory, fall back to MarshalBytes.
  3552  		buf := make([]byte, n.SizeBytes())
  3553  		n.MarshalBytes(buf)
  3554  		length, err := writer.Write(buf)
  3555  		return int64(length), err
  3556  	}
  3557  
  3558  	// Construct a slice backed by dst's underlying memory.
  3559  	var buf []byte
  3560  	hdr := (*reflect.SliceHeader)(unsafe.Pointer(&buf))
  3561  	hdr.Data = uintptr(gohacks.Noescape(unsafe.Pointer(n)))
  3562  	hdr.Len = n.SizeBytes()
  3563  	hdr.Cap = n.SizeBytes()
  3564  
  3565  	length, err := writer.Write(buf)
  3566  	// Since we bypassed the compiler's escape analysis, indicate that n
  3567  	// must live until the use above.
  3568  	runtime.KeepAlive(n) // escapes: replaced by intrinsic.
  3569  	return int64(length), err
  3570  }
  3571  
  3572  // SizeBytes implements marshal.Marshallable.SizeBytes.
  3573  func (n *NVOS21Parameters) SizeBytes() int {
  3574  	return 8 +
  3575  		(*Handle)(nil).SizeBytes() +
  3576  		(*Handle)(nil).SizeBytes() +
  3577  		(*Handle)(nil).SizeBytes() +
  3578  		(*P64)(nil).SizeBytes() +
  3579  		1*4
  3580  }
  3581  
  3582  // MarshalBytes implements marshal.Marshallable.MarshalBytes.
  3583  func (n *NVOS21Parameters) MarshalBytes(dst []byte) []byte {
  3584  	dst = n.HRoot.MarshalUnsafe(dst)
  3585  	dst = n.HObjectParent.MarshalUnsafe(dst)
  3586  	dst = n.HObjectNew.MarshalUnsafe(dst)
  3587  	hostarch.ByteOrder.PutUint32(dst[:4], uint32(n.HClass))
  3588  	dst = dst[4:]
  3589  	dst = n.PAllocParms.MarshalUnsafe(dst)
  3590  	hostarch.ByteOrder.PutUint32(dst[:4], uint32(n.Status))
  3591  	dst = dst[4:]
  3592  	for idx := 0; idx < 4; idx++ {
  3593  		dst[0] = byte(n.Pad0[idx])
  3594  		dst = dst[1:]
  3595  	}
  3596  	return dst
  3597  }
  3598  
  3599  // UnmarshalBytes implements marshal.Marshallable.UnmarshalBytes.
  3600  func (n *NVOS21Parameters) UnmarshalBytes(src []byte) []byte {
  3601  	src = n.HRoot.UnmarshalUnsafe(src)
  3602  	src = n.HObjectParent.UnmarshalUnsafe(src)
  3603  	src = n.HObjectNew.UnmarshalUnsafe(src)
  3604  	n.HClass = uint32(hostarch.ByteOrder.Uint32(src[:4]))
  3605  	src = src[4:]
  3606  	src = n.PAllocParms.UnmarshalUnsafe(src)
  3607  	n.Status = uint32(hostarch.ByteOrder.Uint32(src[:4]))
  3608  	src = src[4:]
  3609  	for idx := 0; idx < 4; idx++ {
  3610  		n.Pad0[idx] = src[0]
  3611  		src = src[1:]
  3612  	}
  3613  	return src
  3614  }
  3615  
  3616  // Packed implements marshal.Marshallable.Packed.
  3617  //
  3618  //go:nosplit
  3619  func (n *NVOS21Parameters) Packed() bool {
  3620  	return n.HObjectNew.Packed() && n.HObjectParent.Packed() && n.HRoot.Packed() && n.PAllocParms.Packed()
  3621  }
  3622  
  3623  // MarshalUnsafe implements marshal.Marshallable.MarshalUnsafe.
  3624  func (n *NVOS21Parameters) MarshalUnsafe(dst []byte) []byte {
  3625  	if n.HObjectNew.Packed() && n.HObjectParent.Packed() && n.HRoot.Packed() && n.PAllocParms.Packed() {
  3626  		size := n.SizeBytes()
  3627  		gohacks.Memmove(unsafe.Pointer(&dst[0]), unsafe.Pointer(n), uintptr(size))
  3628  		return dst[size:]
  3629  	}
  3630  	// Type NVOS21Parameters doesn't have a packed layout in memory, fallback to MarshalBytes.
  3631  	return n.MarshalBytes(dst)
  3632  }
  3633  
  3634  // UnmarshalUnsafe implements marshal.Marshallable.UnmarshalUnsafe.
  3635  func (n *NVOS21Parameters) UnmarshalUnsafe(src []byte) []byte {
  3636  	if n.HObjectNew.Packed() && n.HObjectParent.Packed() && n.HRoot.Packed() && n.PAllocParms.Packed() {
  3637  		size := n.SizeBytes()
  3638  		gohacks.Memmove(unsafe.Pointer(n), unsafe.Pointer(&src[0]), uintptr(size))
  3639  		return src[size:]
  3640  	}
  3641  	// Type NVOS21Parameters doesn't have a packed layout in memory, fallback to UnmarshalBytes.
  3642  	return n.UnmarshalBytes(src)
  3643  }
  3644  
  3645  // CopyOutN implements marshal.Marshallable.CopyOutN.
  3646  func (n *NVOS21Parameters) CopyOutN(cc marshal.CopyContext, addr hostarch.Addr, limit int) (int, error) {
  3647  	if !n.HObjectNew.Packed() && n.HObjectParent.Packed() && n.HRoot.Packed() && n.PAllocParms.Packed() {
  3648  		// Type NVOS21Parameters doesn't have a packed layout in memory, fall back to MarshalBytes.
  3649  		buf := cc.CopyScratchBuffer(n.SizeBytes()) // escapes: okay.
  3650  		n.MarshalBytes(buf)                        // escapes: fallback.
  3651  		return cc.CopyOutBytes(addr, buf[:limit])  // escapes: okay.
  3652  	}
  3653  
  3654  	// Construct a slice backed by dst's underlying memory.
  3655  	var buf []byte
  3656  	hdr := (*reflect.SliceHeader)(unsafe.Pointer(&buf))
  3657  	hdr.Data = uintptr(gohacks.Noescape(unsafe.Pointer(n)))
  3658  	hdr.Len = n.SizeBytes()
  3659  	hdr.Cap = n.SizeBytes()
  3660  
  3661  	length, err := cc.CopyOutBytes(addr, buf[:limit]) // escapes: okay.
  3662  	// Since we bypassed the compiler's escape analysis, indicate that n
  3663  	// must live until the use above.
  3664  	runtime.KeepAlive(n) // escapes: replaced by intrinsic.
  3665  	return length, err
  3666  }
  3667  
  3668  // CopyOut implements marshal.Marshallable.CopyOut.
  3669  func (n *NVOS21Parameters) CopyOut(cc marshal.CopyContext, addr hostarch.Addr) (int, error) {
  3670  	return n.CopyOutN(cc, addr, n.SizeBytes())
  3671  }
  3672  
  3673  // CopyIn implements marshal.Marshallable.CopyIn.
  3674  func (n *NVOS21Parameters) CopyIn(cc marshal.CopyContext, addr hostarch.Addr) (int, error) {
  3675  	if !n.HObjectNew.Packed() && n.HObjectParent.Packed() && n.HRoot.Packed() && n.PAllocParms.Packed() {
  3676  		// Type NVOS21Parameters doesn't have a packed layout in memory, fall back to UnmarshalBytes.
  3677  		buf := cc.CopyScratchBuffer(n.SizeBytes()) // escapes: okay.
  3678  		length, err := cc.CopyInBytes(addr, buf)   // escapes: okay.
  3679  		// Unmarshal unconditionally. If we had a short copy-in, this results in a
  3680  		// partially unmarshalled struct.
  3681  		n.UnmarshalBytes(buf) // escapes: fallback.
  3682  		return length, err
  3683  	}
  3684  
  3685  	// Construct a slice backed by dst's underlying memory.
  3686  	var buf []byte
  3687  	hdr := (*reflect.SliceHeader)(unsafe.Pointer(&buf))
  3688  	hdr.Data = uintptr(gohacks.Noescape(unsafe.Pointer(n)))
  3689  	hdr.Len = n.SizeBytes()
  3690  	hdr.Cap = n.SizeBytes()
  3691  
  3692  	length, err := cc.CopyInBytes(addr, buf) // escapes: okay.
  3693  	// Since we bypassed the compiler's escape analysis, indicate that n
  3694  	// must live until the use above.
  3695  	runtime.KeepAlive(n) // escapes: replaced by intrinsic.
  3696  	return length, err
  3697  }
  3698  
  3699  // WriteTo implements io.WriterTo.WriteTo.
  3700  func (n *NVOS21Parameters) WriteTo(writer io.Writer) (int64, error) {
  3701  	if !n.HObjectNew.Packed() && n.HObjectParent.Packed() && n.HRoot.Packed() && n.PAllocParms.Packed() {
  3702  		// Type NVOS21Parameters doesn't have a packed layout in memory, fall back to MarshalBytes.
  3703  		buf := make([]byte, n.SizeBytes())
  3704  		n.MarshalBytes(buf)
  3705  		length, err := writer.Write(buf)
  3706  		return int64(length), err
  3707  	}
  3708  
  3709  	// Construct a slice backed by dst's underlying memory.
  3710  	var buf []byte
  3711  	hdr := (*reflect.SliceHeader)(unsafe.Pointer(&buf))
  3712  	hdr.Data = uintptr(gohacks.Noescape(unsafe.Pointer(n)))
  3713  	hdr.Len = n.SizeBytes()
  3714  	hdr.Cap = n.SizeBytes()
  3715  
  3716  	length, err := writer.Write(buf)
  3717  	// Since we bypassed the compiler's escape analysis, indicate that n
  3718  	// must live until the use above.
  3719  	runtime.KeepAlive(n) // escapes: replaced by intrinsic.
  3720  	return int64(length), err
  3721  }
  3722  
  3723  // SizeBytes implements marshal.Marshallable.SizeBytes.
  3724  func (n *NVOS32Parameters) SizeBytes() int {
  3725  	return 26 +
  3726  		(*Handle)(nil).SizeBytes() +
  3727  		(*Handle)(nil).SizeBytes() +
  3728  		(*Handle)(nil).SizeBytes() +
  3729  		1*2 +
  3730  		1*144
  3731  }
  3732  
  3733  // MarshalBytes implements marshal.Marshallable.MarshalBytes.
  3734  func (n *NVOS32Parameters) MarshalBytes(dst []byte) []byte {
  3735  	dst = n.HRoot.MarshalUnsafe(dst)
  3736  	dst = n.HObjectParent.MarshalUnsafe(dst)
  3737  	hostarch.ByteOrder.PutUint32(dst[:4], uint32(n.Function))
  3738  	dst = dst[4:]
  3739  	dst = n.HVASpace.MarshalUnsafe(dst)
  3740  	hostarch.ByteOrder.PutUint16(dst[:2], uint16(n.IVCHeapNumber))
  3741  	dst = dst[2:]
  3742  	for idx := 0; idx < 2; idx++ {
  3743  		dst[0] = byte(n.Pad[idx])
  3744  		dst = dst[1:]
  3745  	}
  3746  	hostarch.ByteOrder.PutUint32(dst[:4], uint32(n.Status))
  3747  	dst = dst[4:]
  3748  	hostarch.ByteOrder.PutUint64(dst[:8], uint64(n.Total))
  3749  	dst = dst[8:]
  3750  	hostarch.ByteOrder.PutUint64(dst[:8], uint64(n.Free))
  3751  	dst = dst[8:]
  3752  	for idx := 0; idx < 144; idx++ {
  3753  		dst[0] = byte(n.Data[idx])
  3754  		dst = dst[1:]
  3755  	}
  3756  	return dst
  3757  }
  3758  
  3759  // UnmarshalBytes implements marshal.Marshallable.UnmarshalBytes.
  3760  func (n *NVOS32Parameters) UnmarshalBytes(src []byte) []byte {
  3761  	src = n.HRoot.UnmarshalUnsafe(src)
  3762  	src = n.HObjectParent.UnmarshalUnsafe(src)
  3763  	n.Function = uint32(hostarch.ByteOrder.Uint32(src[:4]))
  3764  	src = src[4:]
  3765  	src = n.HVASpace.UnmarshalUnsafe(src)
  3766  	n.IVCHeapNumber = int16(hostarch.ByteOrder.Uint16(src[:2]))
  3767  	src = src[2:]
  3768  	for idx := 0; idx < 2; idx++ {
  3769  		n.Pad[idx] = src[0]
  3770  		src = src[1:]
  3771  	}
  3772  	n.Status = uint32(hostarch.ByteOrder.Uint32(src[:4]))
  3773  	src = src[4:]
  3774  	n.Total = uint64(hostarch.ByteOrder.Uint64(src[:8]))
  3775  	src = src[8:]
  3776  	n.Free = uint64(hostarch.ByteOrder.Uint64(src[:8]))
  3777  	src = src[8:]
  3778  	for idx := 0; idx < 144; idx++ {
  3779  		n.Data[idx] = src[0]
  3780  		src = src[1:]
  3781  	}
  3782  	return src
  3783  }
  3784  
  3785  // Packed implements marshal.Marshallable.Packed.
  3786  //
  3787  //go:nosplit
  3788  func (n *NVOS32Parameters) Packed() bool {
  3789  	return n.HObjectParent.Packed() && n.HRoot.Packed() && n.HVASpace.Packed()
  3790  }
  3791  
  3792  // MarshalUnsafe implements marshal.Marshallable.MarshalUnsafe.
  3793  func (n *NVOS32Parameters) MarshalUnsafe(dst []byte) []byte {
  3794  	if n.HObjectParent.Packed() && n.HRoot.Packed() && n.HVASpace.Packed() {
  3795  		size := n.SizeBytes()
  3796  		gohacks.Memmove(unsafe.Pointer(&dst[0]), unsafe.Pointer(n), uintptr(size))
  3797  		return dst[size:]
  3798  	}
  3799  	// Type NVOS32Parameters doesn't have a packed layout in memory, fallback to MarshalBytes.
  3800  	return n.MarshalBytes(dst)
  3801  }
  3802  
  3803  // UnmarshalUnsafe implements marshal.Marshallable.UnmarshalUnsafe.
  3804  func (n *NVOS32Parameters) UnmarshalUnsafe(src []byte) []byte {
  3805  	if n.HObjectParent.Packed() && n.HRoot.Packed() && n.HVASpace.Packed() {
  3806  		size := n.SizeBytes()
  3807  		gohacks.Memmove(unsafe.Pointer(n), unsafe.Pointer(&src[0]), uintptr(size))
  3808  		return src[size:]
  3809  	}
  3810  	// Type NVOS32Parameters doesn't have a packed layout in memory, fallback to UnmarshalBytes.
  3811  	return n.UnmarshalBytes(src)
  3812  }
  3813  
  3814  // CopyOutN implements marshal.Marshallable.CopyOutN.
  3815  func (n *NVOS32Parameters) CopyOutN(cc marshal.CopyContext, addr hostarch.Addr, limit int) (int, error) {
  3816  	if !n.HObjectParent.Packed() && n.HRoot.Packed() && n.HVASpace.Packed() {
  3817  		// Type NVOS32Parameters doesn't have a packed layout in memory, fall back to MarshalBytes.
  3818  		buf := cc.CopyScratchBuffer(n.SizeBytes()) // escapes: okay.
  3819  		n.MarshalBytes(buf)                        // escapes: fallback.
  3820  		return cc.CopyOutBytes(addr, buf[:limit])  // escapes: okay.
  3821  	}
  3822  
  3823  	// Construct a slice backed by dst's underlying memory.
  3824  	var buf []byte
  3825  	hdr := (*reflect.SliceHeader)(unsafe.Pointer(&buf))
  3826  	hdr.Data = uintptr(gohacks.Noescape(unsafe.Pointer(n)))
  3827  	hdr.Len = n.SizeBytes()
  3828  	hdr.Cap = n.SizeBytes()
  3829  
  3830  	length, err := cc.CopyOutBytes(addr, buf[:limit]) // escapes: okay.
  3831  	// Since we bypassed the compiler's escape analysis, indicate that n
  3832  	// must live until the use above.
  3833  	runtime.KeepAlive(n) // escapes: replaced by intrinsic.
  3834  	return length, err
  3835  }
  3836  
  3837  // CopyOut implements marshal.Marshallable.CopyOut.
  3838  func (n *NVOS32Parameters) CopyOut(cc marshal.CopyContext, addr hostarch.Addr) (int, error) {
  3839  	return n.CopyOutN(cc, addr, n.SizeBytes())
  3840  }
  3841  
  3842  // CopyIn implements marshal.Marshallable.CopyIn.
  3843  func (n *NVOS32Parameters) CopyIn(cc marshal.CopyContext, addr hostarch.Addr) (int, error) {
  3844  	if !n.HObjectParent.Packed() && n.HRoot.Packed() && n.HVASpace.Packed() {
  3845  		// Type NVOS32Parameters doesn't have a packed layout in memory, fall back to UnmarshalBytes.
  3846  		buf := cc.CopyScratchBuffer(n.SizeBytes()) // escapes: okay.
  3847  		length, err := cc.CopyInBytes(addr, buf)   // escapes: okay.
  3848  		// Unmarshal unconditionally. If we had a short copy-in, this results in a
  3849  		// partially unmarshalled struct.
  3850  		n.UnmarshalBytes(buf) // escapes: fallback.
  3851  		return length, err
  3852  	}
  3853  
  3854  	// Construct a slice backed by dst's underlying memory.
  3855  	var buf []byte
  3856  	hdr := (*reflect.SliceHeader)(unsafe.Pointer(&buf))
  3857  	hdr.Data = uintptr(gohacks.Noescape(unsafe.Pointer(n)))
  3858  	hdr.Len = n.SizeBytes()
  3859  	hdr.Cap = n.SizeBytes()
  3860  
  3861  	length, err := cc.CopyInBytes(addr, buf) // escapes: okay.
  3862  	// Since we bypassed the compiler's escape analysis, indicate that n
  3863  	// must live until the use above.
  3864  	runtime.KeepAlive(n) // escapes: replaced by intrinsic.
  3865  	return length, err
  3866  }
  3867  
  3868  // WriteTo implements io.WriterTo.WriteTo.
  3869  func (n *NVOS32Parameters) WriteTo(writer io.Writer) (int64, error) {
  3870  	if !n.HObjectParent.Packed() && n.HRoot.Packed() && n.HVASpace.Packed() {
  3871  		// Type NVOS32Parameters doesn't have a packed layout in memory, fall back to MarshalBytes.
  3872  		buf := make([]byte, n.SizeBytes())
  3873  		n.MarshalBytes(buf)
  3874  		length, err := writer.Write(buf)
  3875  		return int64(length), err
  3876  	}
  3877  
  3878  	// Construct a slice backed by dst's underlying memory.
  3879  	var buf []byte
  3880  	hdr := (*reflect.SliceHeader)(unsafe.Pointer(&buf))
  3881  	hdr.Data = uintptr(gohacks.Noescape(unsafe.Pointer(n)))
  3882  	hdr.Len = n.SizeBytes()
  3883  	hdr.Cap = n.SizeBytes()
  3884  
  3885  	length, err := writer.Write(buf)
  3886  	// Since we bypassed the compiler's escape analysis, indicate that n
  3887  	// must live until the use above.
  3888  	runtime.KeepAlive(n) // escapes: replaced by intrinsic.
  3889  	return int64(length), err
  3890  }
  3891  
  3892  // SizeBytes implements marshal.Marshallable.SizeBytes.
  3893  func (n *NVOS33Parameters) SizeBytes() int {
  3894  	return 24 +
  3895  		(*Handle)(nil).SizeBytes() +
  3896  		(*Handle)(nil).SizeBytes() +
  3897  		(*Handle)(nil).SizeBytes() +
  3898  		1*4 +
  3899  		(*P64)(nil).SizeBytes()
  3900  }
  3901  
  3902  // MarshalBytes implements marshal.Marshallable.MarshalBytes.
  3903  func (n *NVOS33Parameters) MarshalBytes(dst []byte) []byte {
  3904  	dst = n.HClient.MarshalUnsafe(dst)
  3905  	dst = n.HDevice.MarshalUnsafe(dst)
  3906  	dst = n.HMemory.MarshalUnsafe(dst)
  3907  	for idx := 0; idx < 4; idx++ {
  3908  		dst[0] = byte(n.Pad0[idx])
  3909  		dst = dst[1:]
  3910  	}
  3911  	hostarch.ByteOrder.PutUint64(dst[:8], uint64(n.Offset))
  3912  	dst = dst[8:]
  3913  	hostarch.ByteOrder.PutUint64(dst[:8], uint64(n.Length))
  3914  	dst = dst[8:]
  3915  	dst = n.PLinearAddress.MarshalUnsafe(dst)
  3916  	hostarch.ByteOrder.PutUint32(dst[:4], uint32(n.Status))
  3917  	dst = dst[4:]
  3918  	hostarch.ByteOrder.PutUint32(dst[:4], uint32(n.Flags))
  3919  	dst = dst[4:]
  3920  	return dst
  3921  }
  3922  
  3923  // UnmarshalBytes implements marshal.Marshallable.UnmarshalBytes.
  3924  func (n *NVOS33Parameters) UnmarshalBytes(src []byte) []byte {
  3925  	src = n.HClient.UnmarshalUnsafe(src)
  3926  	src = n.HDevice.UnmarshalUnsafe(src)
  3927  	src = n.HMemory.UnmarshalUnsafe(src)
  3928  	for idx := 0; idx < 4; idx++ {
  3929  		n.Pad0[idx] = src[0]
  3930  		src = src[1:]
  3931  	}
  3932  	n.Offset = uint64(hostarch.ByteOrder.Uint64(src[:8]))
  3933  	src = src[8:]
  3934  	n.Length = uint64(hostarch.ByteOrder.Uint64(src[:8]))
  3935  	src = src[8:]
  3936  	src = n.PLinearAddress.UnmarshalUnsafe(src)
  3937  	n.Status = uint32(hostarch.ByteOrder.Uint32(src[:4]))
  3938  	src = src[4:]
  3939  	n.Flags = uint32(hostarch.ByteOrder.Uint32(src[:4]))
  3940  	src = src[4:]
  3941  	return src
  3942  }
  3943  
  3944  // Packed implements marshal.Marshallable.Packed.
  3945  //
  3946  //go:nosplit
  3947  func (n *NVOS33Parameters) Packed() bool {
  3948  	return n.HClient.Packed() && n.HDevice.Packed() && n.HMemory.Packed() && n.PLinearAddress.Packed()
  3949  }
  3950  
  3951  // MarshalUnsafe implements marshal.Marshallable.MarshalUnsafe.
  3952  func (n *NVOS33Parameters) MarshalUnsafe(dst []byte) []byte {
  3953  	if n.HClient.Packed() && n.HDevice.Packed() && n.HMemory.Packed() && n.PLinearAddress.Packed() {
  3954  		size := n.SizeBytes()
  3955  		gohacks.Memmove(unsafe.Pointer(&dst[0]), unsafe.Pointer(n), uintptr(size))
  3956  		return dst[size:]
  3957  	}
  3958  	// Type NVOS33Parameters doesn't have a packed layout in memory, fallback to MarshalBytes.
  3959  	return n.MarshalBytes(dst)
  3960  }
  3961  
  3962  // UnmarshalUnsafe implements marshal.Marshallable.UnmarshalUnsafe.
  3963  func (n *NVOS33Parameters) UnmarshalUnsafe(src []byte) []byte {
  3964  	if n.HClient.Packed() && n.HDevice.Packed() && n.HMemory.Packed() && n.PLinearAddress.Packed() {
  3965  		size := n.SizeBytes()
  3966  		gohacks.Memmove(unsafe.Pointer(n), unsafe.Pointer(&src[0]), uintptr(size))
  3967  		return src[size:]
  3968  	}
  3969  	// Type NVOS33Parameters doesn't have a packed layout in memory, fallback to UnmarshalBytes.
  3970  	return n.UnmarshalBytes(src)
  3971  }
  3972  
  3973  // CopyOutN implements marshal.Marshallable.CopyOutN.
  3974  func (n *NVOS33Parameters) CopyOutN(cc marshal.CopyContext, addr hostarch.Addr, limit int) (int, error) {
  3975  	if !n.HClient.Packed() && n.HDevice.Packed() && n.HMemory.Packed() && n.PLinearAddress.Packed() {
  3976  		// Type NVOS33Parameters doesn't have a packed layout in memory, fall back to MarshalBytes.
  3977  		buf := cc.CopyScratchBuffer(n.SizeBytes()) // escapes: okay.
  3978  		n.MarshalBytes(buf)                        // escapes: fallback.
  3979  		return cc.CopyOutBytes(addr, buf[:limit])  // escapes: okay.
  3980  	}
  3981  
  3982  	// Construct a slice backed by dst's underlying memory.
  3983  	var buf []byte
  3984  	hdr := (*reflect.SliceHeader)(unsafe.Pointer(&buf))
  3985  	hdr.Data = uintptr(gohacks.Noescape(unsafe.Pointer(n)))
  3986  	hdr.Len = n.SizeBytes()
  3987  	hdr.Cap = n.SizeBytes()
  3988  
  3989  	length, err := cc.CopyOutBytes(addr, buf[:limit]) // escapes: okay.
  3990  	// Since we bypassed the compiler's escape analysis, indicate that n
  3991  	// must live until the use above.
  3992  	runtime.KeepAlive(n) // escapes: replaced by intrinsic.
  3993  	return length, err
  3994  }
  3995  
  3996  // CopyOut implements marshal.Marshallable.CopyOut.
  3997  func (n *NVOS33Parameters) CopyOut(cc marshal.CopyContext, addr hostarch.Addr) (int, error) {
  3998  	return n.CopyOutN(cc, addr, n.SizeBytes())
  3999  }
  4000  
  4001  // CopyIn implements marshal.Marshallable.CopyIn.
  4002  func (n *NVOS33Parameters) CopyIn(cc marshal.CopyContext, addr hostarch.Addr) (int, error) {
  4003  	if !n.HClient.Packed() && n.HDevice.Packed() && n.HMemory.Packed() && n.PLinearAddress.Packed() {
  4004  		// Type NVOS33Parameters doesn't have a packed layout in memory, fall back to UnmarshalBytes.
  4005  		buf := cc.CopyScratchBuffer(n.SizeBytes()) // escapes: okay.
  4006  		length, err := cc.CopyInBytes(addr, buf)   // escapes: okay.
  4007  		// Unmarshal unconditionally. If we had a short copy-in, this results in a
  4008  		// partially unmarshalled struct.
  4009  		n.UnmarshalBytes(buf) // escapes: fallback.
  4010  		return length, err
  4011  	}
  4012  
  4013  	// Construct a slice backed by dst's underlying memory.
  4014  	var buf []byte
  4015  	hdr := (*reflect.SliceHeader)(unsafe.Pointer(&buf))
  4016  	hdr.Data = uintptr(gohacks.Noescape(unsafe.Pointer(n)))
  4017  	hdr.Len = n.SizeBytes()
  4018  	hdr.Cap = n.SizeBytes()
  4019  
  4020  	length, err := cc.CopyInBytes(addr, buf) // escapes: okay.
  4021  	// Since we bypassed the compiler's escape analysis, indicate that n
  4022  	// must live until the use above.
  4023  	runtime.KeepAlive(n) // escapes: replaced by intrinsic.
  4024  	return length, err
  4025  }
  4026  
  4027  // WriteTo implements io.WriterTo.WriteTo.
  4028  func (n *NVOS33Parameters) WriteTo(writer io.Writer) (int64, error) {
  4029  	if !n.HClient.Packed() && n.HDevice.Packed() && n.HMemory.Packed() && n.PLinearAddress.Packed() {
  4030  		// Type NVOS33Parameters doesn't have a packed layout in memory, fall back to MarshalBytes.
  4031  		buf := make([]byte, n.SizeBytes())
  4032  		n.MarshalBytes(buf)
  4033  		length, err := writer.Write(buf)
  4034  		return int64(length), err
  4035  	}
  4036  
  4037  	// Construct a slice backed by dst's underlying memory.
  4038  	var buf []byte
  4039  	hdr := (*reflect.SliceHeader)(unsafe.Pointer(&buf))
  4040  	hdr.Data = uintptr(gohacks.Noescape(unsafe.Pointer(n)))
  4041  	hdr.Len = n.SizeBytes()
  4042  	hdr.Cap = n.SizeBytes()
  4043  
  4044  	length, err := writer.Write(buf)
  4045  	// Since we bypassed the compiler's escape analysis, indicate that n
  4046  	// must live until the use above.
  4047  	runtime.KeepAlive(n) // escapes: replaced by intrinsic.
  4048  	return int64(length), err
  4049  }
  4050  
  4051  // SizeBytes implements marshal.Marshallable.SizeBytes.
  4052  func (n *NVOS34Parameters) SizeBytes() int {
  4053  	return 8 +
  4054  		(*Handle)(nil).SizeBytes() +
  4055  		(*Handle)(nil).SizeBytes() +
  4056  		(*Handle)(nil).SizeBytes() +
  4057  		1*4 +
  4058  		(*P64)(nil).SizeBytes()
  4059  }
  4060  
  4061  // MarshalBytes implements marshal.Marshallable.MarshalBytes.
  4062  func (n *NVOS34Parameters) MarshalBytes(dst []byte) []byte {
  4063  	dst = n.HClient.MarshalUnsafe(dst)
  4064  	dst = n.HDevice.MarshalUnsafe(dst)
  4065  	dst = n.HMemory.MarshalUnsafe(dst)
  4066  	for idx := 0; idx < 4; idx++ {
  4067  		dst[0] = byte(n.Pad0[idx])
  4068  		dst = dst[1:]
  4069  	}
  4070  	dst = n.PLinearAddress.MarshalUnsafe(dst)
  4071  	hostarch.ByteOrder.PutUint32(dst[:4], uint32(n.Status))
  4072  	dst = dst[4:]
  4073  	hostarch.ByteOrder.PutUint32(dst[:4], uint32(n.Flags))
  4074  	dst = dst[4:]
  4075  	return dst
  4076  }
  4077  
  4078  // UnmarshalBytes implements marshal.Marshallable.UnmarshalBytes.
  4079  func (n *NVOS34Parameters) UnmarshalBytes(src []byte) []byte {
  4080  	src = n.HClient.UnmarshalUnsafe(src)
  4081  	src = n.HDevice.UnmarshalUnsafe(src)
  4082  	src = n.HMemory.UnmarshalUnsafe(src)
  4083  	for idx := 0; idx < 4; idx++ {
  4084  		n.Pad0[idx] = src[0]
  4085  		src = src[1:]
  4086  	}
  4087  	src = n.PLinearAddress.UnmarshalUnsafe(src)
  4088  	n.Status = uint32(hostarch.ByteOrder.Uint32(src[:4]))
  4089  	src = src[4:]
  4090  	n.Flags = uint32(hostarch.ByteOrder.Uint32(src[:4]))
  4091  	src = src[4:]
  4092  	return src
  4093  }
  4094  
  4095  // Packed implements marshal.Marshallable.Packed.
  4096  //
  4097  //go:nosplit
  4098  func (n *NVOS34Parameters) Packed() bool {
  4099  	return n.HClient.Packed() && n.HDevice.Packed() && n.HMemory.Packed() && n.PLinearAddress.Packed()
  4100  }
  4101  
  4102  // MarshalUnsafe implements marshal.Marshallable.MarshalUnsafe.
  4103  func (n *NVOS34Parameters) MarshalUnsafe(dst []byte) []byte {
  4104  	if n.HClient.Packed() && n.HDevice.Packed() && n.HMemory.Packed() && n.PLinearAddress.Packed() {
  4105  		size := n.SizeBytes()
  4106  		gohacks.Memmove(unsafe.Pointer(&dst[0]), unsafe.Pointer(n), uintptr(size))
  4107  		return dst[size:]
  4108  	}
  4109  	// Type NVOS34Parameters doesn't have a packed layout in memory, fallback to MarshalBytes.
  4110  	return n.MarshalBytes(dst)
  4111  }
  4112  
  4113  // UnmarshalUnsafe implements marshal.Marshallable.UnmarshalUnsafe.
  4114  func (n *NVOS34Parameters) UnmarshalUnsafe(src []byte) []byte {
  4115  	if n.HClient.Packed() && n.HDevice.Packed() && n.HMemory.Packed() && n.PLinearAddress.Packed() {
  4116  		size := n.SizeBytes()
  4117  		gohacks.Memmove(unsafe.Pointer(n), unsafe.Pointer(&src[0]), uintptr(size))
  4118  		return src[size:]
  4119  	}
  4120  	// Type NVOS34Parameters doesn't have a packed layout in memory, fallback to UnmarshalBytes.
  4121  	return n.UnmarshalBytes(src)
  4122  }
  4123  
  4124  // CopyOutN implements marshal.Marshallable.CopyOutN.
  4125  func (n *NVOS34Parameters) CopyOutN(cc marshal.CopyContext, addr hostarch.Addr, limit int) (int, error) {
  4126  	if !n.HClient.Packed() && n.HDevice.Packed() && n.HMemory.Packed() && n.PLinearAddress.Packed() {
  4127  		// Type NVOS34Parameters doesn't have a packed layout in memory, fall back to MarshalBytes.
  4128  		buf := cc.CopyScratchBuffer(n.SizeBytes()) // escapes: okay.
  4129  		n.MarshalBytes(buf)                        // escapes: fallback.
  4130  		return cc.CopyOutBytes(addr, buf[:limit])  // escapes: okay.
  4131  	}
  4132  
  4133  	// Construct a slice backed by dst's underlying memory.
  4134  	var buf []byte
  4135  	hdr := (*reflect.SliceHeader)(unsafe.Pointer(&buf))
  4136  	hdr.Data = uintptr(gohacks.Noescape(unsafe.Pointer(n)))
  4137  	hdr.Len = n.SizeBytes()
  4138  	hdr.Cap = n.SizeBytes()
  4139  
  4140  	length, err := cc.CopyOutBytes(addr, buf[:limit]) // escapes: okay.
  4141  	// Since we bypassed the compiler's escape analysis, indicate that n
  4142  	// must live until the use above.
  4143  	runtime.KeepAlive(n) // escapes: replaced by intrinsic.
  4144  	return length, err
  4145  }
  4146  
  4147  // CopyOut implements marshal.Marshallable.CopyOut.
  4148  func (n *NVOS34Parameters) CopyOut(cc marshal.CopyContext, addr hostarch.Addr) (int, error) {
  4149  	return n.CopyOutN(cc, addr, n.SizeBytes())
  4150  }
  4151  
  4152  // CopyIn implements marshal.Marshallable.CopyIn.
  4153  func (n *NVOS34Parameters) CopyIn(cc marshal.CopyContext, addr hostarch.Addr) (int, error) {
  4154  	if !n.HClient.Packed() && n.HDevice.Packed() && n.HMemory.Packed() && n.PLinearAddress.Packed() {
  4155  		// Type NVOS34Parameters doesn't have a packed layout in memory, fall back to UnmarshalBytes.
  4156  		buf := cc.CopyScratchBuffer(n.SizeBytes()) // escapes: okay.
  4157  		length, err := cc.CopyInBytes(addr, buf)   // escapes: okay.
  4158  		// Unmarshal unconditionally. If we had a short copy-in, this results in a
  4159  		// partially unmarshalled struct.
  4160  		n.UnmarshalBytes(buf) // escapes: fallback.
  4161  		return length, err
  4162  	}
  4163  
  4164  	// Construct a slice backed by dst's underlying memory.
  4165  	var buf []byte
  4166  	hdr := (*reflect.SliceHeader)(unsafe.Pointer(&buf))
  4167  	hdr.Data = uintptr(gohacks.Noescape(unsafe.Pointer(n)))
  4168  	hdr.Len = n.SizeBytes()
  4169  	hdr.Cap = n.SizeBytes()
  4170  
  4171  	length, err := cc.CopyInBytes(addr, buf) // escapes: okay.
  4172  	// Since we bypassed the compiler's escape analysis, indicate that n
  4173  	// must live until the use above.
  4174  	runtime.KeepAlive(n) // escapes: replaced by intrinsic.
  4175  	return length, err
  4176  }
  4177  
  4178  // WriteTo implements io.WriterTo.WriteTo.
  4179  func (n *NVOS34Parameters) WriteTo(writer io.Writer) (int64, error) {
  4180  	if !n.HClient.Packed() && n.HDevice.Packed() && n.HMemory.Packed() && n.PLinearAddress.Packed() {
  4181  		// Type NVOS34Parameters doesn't have a packed layout in memory, fall back to MarshalBytes.
  4182  		buf := make([]byte, n.SizeBytes())
  4183  		n.MarshalBytes(buf)
  4184  		length, err := writer.Write(buf)
  4185  		return int64(length), err
  4186  	}
  4187  
  4188  	// Construct a slice backed by dst's underlying memory.
  4189  	var buf []byte
  4190  	hdr := (*reflect.SliceHeader)(unsafe.Pointer(&buf))
  4191  	hdr.Data = uintptr(gohacks.Noescape(unsafe.Pointer(n)))
  4192  	hdr.Len = n.SizeBytes()
  4193  	hdr.Cap = n.SizeBytes()
  4194  
  4195  	length, err := writer.Write(buf)
  4196  	// Since we bypassed the compiler's escape analysis, indicate that n
  4197  	// must live until the use above.
  4198  	runtime.KeepAlive(n) // escapes: replaced by intrinsic.
  4199  	return int64(length), err
  4200  }
  4201  
  4202  // SizeBytes implements marshal.Marshallable.SizeBytes.
  4203  func (n *NVOS54Parameters) SizeBytes() int {
  4204  	return 16 +
  4205  		(*Handle)(nil).SizeBytes() +
  4206  		(*Handle)(nil).SizeBytes() +
  4207  		(*P64)(nil).SizeBytes()
  4208  }
  4209  
  4210  // MarshalBytes implements marshal.Marshallable.MarshalBytes.
  4211  func (n *NVOS54Parameters) MarshalBytes(dst []byte) []byte {
  4212  	dst = n.HClient.MarshalUnsafe(dst)
  4213  	dst = n.HObject.MarshalUnsafe(dst)
  4214  	hostarch.ByteOrder.PutUint32(dst[:4], uint32(n.Cmd))
  4215  	dst = dst[4:]
  4216  	hostarch.ByteOrder.PutUint32(dst[:4], uint32(n.Flags))
  4217  	dst = dst[4:]
  4218  	dst = n.Params.MarshalUnsafe(dst)
  4219  	hostarch.ByteOrder.PutUint32(dst[:4], uint32(n.ParamsSize))
  4220  	dst = dst[4:]
  4221  	hostarch.ByteOrder.PutUint32(dst[:4], uint32(n.Status))
  4222  	dst = dst[4:]
  4223  	return dst
  4224  }
  4225  
  4226  // UnmarshalBytes implements marshal.Marshallable.UnmarshalBytes.
  4227  func (n *NVOS54Parameters) UnmarshalBytes(src []byte) []byte {
  4228  	src = n.HClient.UnmarshalUnsafe(src)
  4229  	src = n.HObject.UnmarshalUnsafe(src)
  4230  	n.Cmd = uint32(hostarch.ByteOrder.Uint32(src[:4]))
  4231  	src = src[4:]
  4232  	n.Flags = uint32(hostarch.ByteOrder.Uint32(src[:4]))
  4233  	src = src[4:]
  4234  	src = n.Params.UnmarshalUnsafe(src)
  4235  	n.ParamsSize = uint32(hostarch.ByteOrder.Uint32(src[:4]))
  4236  	src = src[4:]
  4237  	n.Status = uint32(hostarch.ByteOrder.Uint32(src[:4]))
  4238  	src = src[4:]
  4239  	return src
  4240  }
  4241  
  4242  // Packed implements marshal.Marshallable.Packed.
  4243  //
  4244  //go:nosplit
  4245  func (n *NVOS54Parameters) Packed() bool {
  4246  	return n.HClient.Packed() && n.HObject.Packed() && n.Params.Packed()
  4247  }
  4248  
  4249  // MarshalUnsafe implements marshal.Marshallable.MarshalUnsafe.
  4250  func (n *NVOS54Parameters) MarshalUnsafe(dst []byte) []byte {
  4251  	if n.HClient.Packed() && n.HObject.Packed() && n.Params.Packed() {
  4252  		size := n.SizeBytes()
  4253  		gohacks.Memmove(unsafe.Pointer(&dst[0]), unsafe.Pointer(n), uintptr(size))
  4254  		return dst[size:]
  4255  	}
  4256  	// Type NVOS54Parameters doesn't have a packed layout in memory, fallback to MarshalBytes.
  4257  	return n.MarshalBytes(dst)
  4258  }
  4259  
  4260  // UnmarshalUnsafe implements marshal.Marshallable.UnmarshalUnsafe.
  4261  func (n *NVOS54Parameters) UnmarshalUnsafe(src []byte) []byte {
  4262  	if n.HClient.Packed() && n.HObject.Packed() && n.Params.Packed() {
  4263  		size := n.SizeBytes()
  4264  		gohacks.Memmove(unsafe.Pointer(n), unsafe.Pointer(&src[0]), uintptr(size))
  4265  		return src[size:]
  4266  	}
  4267  	// Type NVOS54Parameters doesn't have a packed layout in memory, fallback to UnmarshalBytes.
  4268  	return n.UnmarshalBytes(src)
  4269  }
  4270  
  4271  // CopyOutN implements marshal.Marshallable.CopyOutN.
  4272  func (n *NVOS54Parameters) CopyOutN(cc marshal.CopyContext, addr hostarch.Addr, limit int) (int, error) {
  4273  	if !n.HClient.Packed() && n.HObject.Packed() && n.Params.Packed() {
  4274  		// Type NVOS54Parameters doesn't have a packed layout in memory, fall back to MarshalBytes.
  4275  		buf := cc.CopyScratchBuffer(n.SizeBytes()) // escapes: okay.
  4276  		n.MarshalBytes(buf)                        // escapes: fallback.
  4277  		return cc.CopyOutBytes(addr, buf[:limit])  // escapes: okay.
  4278  	}
  4279  
  4280  	// Construct a slice backed by dst's underlying memory.
  4281  	var buf []byte
  4282  	hdr := (*reflect.SliceHeader)(unsafe.Pointer(&buf))
  4283  	hdr.Data = uintptr(gohacks.Noescape(unsafe.Pointer(n)))
  4284  	hdr.Len = n.SizeBytes()
  4285  	hdr.Cap = n.SizeBytes()
  4286  
  4287  	length, err := cc.CopyOutBytes(addr, buf[:limit]) // escapes: okay.
  4288  	// Since we bypassed the compiler's escape analysis, indicate that n
  4289  	// must live until the use above.
  4290  	runtime.KeepAlive(n) // escapes: replaced by intrinsic.
  4291  	return length, err
  4292  }
  4293  
  4294  // CopyOut implements marshal.Marshallable.CopyOut.
  4295  func (n *NVOS54Parameters) CopyOut(cc marshal.CopyContext, addr hostarch.Addr) (int, error) {
  4296  	return n.CopyOutN(cc, addr, n.SizeBytes())
  4297  }
  4298  
  4299  // CopyIn implements marshal.Marshallable.CopyIn.
  4300  func (n *NVOS54Parameters) CopyIn(cc marshal.CopyContext, addr hostarch.Addr) (int, error) {
  4301  	if !n.HClient.Packed() && n.HObject.Packed() && n.Params.Packed() {
  4302  		// Type NVOS54Parameters doesn't have a packed layout in memory, fall back to UnmarshalBytes.
  4303  		buf := cc.CopyScratchBuffer(n.SizeBytes()) // escapes: okay.
  4304  		length, err := cc.CopyInBytes(addr, buf)   // escapes: okay.
  4305  		// Unmarshal unconditionally. If we had a short copy-in, this results in a
  4306  		// partially unmarshalled struct.
  4307  		n.UnmarshalBytes(buf) // escapes: fallback.
  4308  		return length, err
  4309  	}
  4310  
  4311  	// Construct a slice backed by dst's underlying memory.
  4312  	var buf []byte
  4313  	hdr := (*reflect.SliceHeader)(unsafe.Pointer(&buf))
  4314  	hdr.Data = uintptr(gohacks.Noescape(unsafe.Pointer(n)))
  4315  	hdr.Len = n.SizeBytes()
  4316  	hdr.Cap = n.SizeBytes()
  4317  
  4318  	length, err := cc.CopyInBytes(addr, buf) // escapes: okay.
  4319  	// Since we bypassed the compiler's escape analysis, indicate that n
  4320  	// must live until the use above.
  4321  	runtime.KeepAlive(n) // escapes: replaced by intrinsic.
  4322  	return length, err
  4323  }
  4324  
  4325  // WriteTo implements io.WriterTo.WriteTo.
  4326  func (n *NVOS54Parameters) WriteTo(writer io.Writer) (int64, error) {
  4327  	if !n.HClient.Packed() && n.HObject.Packed() && n.Params.Packed() {
  4328  		// Type NVOS54Parameters doesn't have a packed layout in memory, fall back to MarshalBytes.
  4329  		buf := make([]byte, n.SizeBytes())
  4330  		n.MarshalBytes(buf)
  4331  		length, err := writer.Write(buf)
  4332  		return int64(length), err
  4333  	}
  4334  
  4335  	// Construct a slice backed by dst's underlying memory.
  4336  	var buf []byte
  4337  	hdr := (*reflect.SliceHeader)(unsafe.Pointer(&buf))
  4338  	hdr.Data = uintptr(gohacks.Noescape(unsafe.Pointer(n)))
  4339  	hdr.Len = n.SizeBytes()
  4340  	hdr.Cap = n.SizeBytes()
  4341  
  4342  	length, err := writer.Write(buf)
  4343  	// Since we bypassed the compiler's escape analysis, indicate that n
  4344  	// must live until the use above.
  4345  	runtime.KeepAlive(n) // escapes: replaced by intrinsic.
  4346  	return int64(length), err
  4347  }
  4348  
  4349  // SizeBytes implements marshal.Marshallable.SizeBytes.
  4350  func (n *NVOS55Parameters) SizeBytes() int {
  4351  	return 8 +
  4352  		(*Handle)(nil).SizeBytes() +
  4353  		(*Handle)(nil).SizeBytes() +
  4354  		(*Handle)(nil).SizeBytes() +
  4355  		(*Handle)(nil).SizeBytes() +
  4356  		(*Handle)(nil).SizeBytes()
  4357  }
  4358  
  4359  // MarshalBytes implements marshal.Marshallable.MarshalBytes.
  4360  func (n *NVOS55Parameters) MarshalBytes(dst []byte) []byte {
  4361  	dst = n.HClient.MarshalUnsafe(dst)
  4362  	dst = n.HParent.MarshalUnsafe(dst)
  4363  	dst = n.HObject.MarshalUnsafe(dst)
  4364  	dst = n.HClientSrc.MarshalUnsafe(dst)
  4365  	dst = n.HObjectSrc.MarshalUnsafe(dst)
  4366  	hostarch.ByteOrder.PutUint32(dst[:4], uint32(n.Flags))
  4367  	dst = dst[4:]
  4368  	hostarch.ByteOrder.PutUint32(dst[:4], uint32(n.Status))
  4369  	dst = dst[4:]
  4370  	return dst
  4371  }
  4372  
  4373  // UnmarshalBytes implements marshal.Marshallable.UnmarshalBytes.
  4374  func (n *NVOS55Parameters) UnmarshalBytes(src []byte) []byte {
  4375  	src = n.HClient.UnmarshalUnsafe(src)
  4376  	src = n.HParent.UnmarshalUnsafe(src)
  4377  	src = n.HObject.UnmarshalUnsafe(src)
  4378  	src = n.HClientSrc.UnmarshalUnsafe(src)
  4379  	src = n.HObjectSrc.UnmarshalUnsafe(src)
  4380  	n.Flags = uint32(hostarch.ByteOrder.Uint32(src[:4]))
  4381  	src = src[4:]
  4382  	n.Status = uint32(hostarch.ByteOrder.Uint32(src[:4]))
  4383  	src = src[4:]
  4384  	return src
  4385  }
  4386  
  4387  // Packed implements marshal.Marshallable.Packed.
  4388  //
  4389  //go:nosplit
  4390  func (n *NVOS55Parameters) Packed() bool {
  4391  	return n.HClient.Packed() && n.HClientSrc.Packed() && n.HObject.Packed() && n.HObjectSrc.Packed() && n.HParent.Packed()
  4392  }
  4393  
  4394  // MarshalUnsafe implements marshal.Marshallable.MarshalUnsafe.
  4395  func (n *NVOS55Parameters) MarshalUnsafe(dst []byte) []byte {
  4396  	if n.HClient.Packed() && n.HClientSrc.Packed() && n.HObject.Packed() && n.HObjectSrc.Packed() && n.HParent.Packed() {
  4397  		size := n.SizeBytes()
  4398  		gohacks.Memmove(unsafe.Pointer(&dst[0]), unsafe.Pointer(n), uintptr(size))
  4399  		return dst[size:]
  4400  	}
  4401  	// Type NVOS55Parameters doesn't have a packed layout in memory, fallback to MarshalBytes.
  4402  	return n.MarshalBytes(dst)
  4403  }
  4404  
  4405  // UnmarshalUnsafe implements marshal.Marshallable.UnmarshalUnsafe.
  4406  func (n *NVOS55Parameters) UnmarshalUnsafe(src []byte) []byte {
  4407  	if n.HClient.Packed() && n.HClientSrc.Packed() && n.HObject.Packed() && n.HObjectSrc.Packed() && n.HParent.Packed() {
  4408  		size := n.SizeBytes()
  4409  		gohacks.Memmove(unsafe.Pointer(n), unsafe.Pointer(&src[0]), uintptr(size))
  4410  		return src[size:]
  4411  	}
  4412  	// Type NVOS55Parameters doesn't have a packed layout in memory, fallback to UnmarshalBytes.
  4413  	return n.UnmarshalBytes(src)
  4414  }
  4415  
  4416  // CopyOutN implements marshal.Marshallable.CopyOutN.
  4417  func (n *NVOS55Parameters) CopyOutN(cc marshal.CopyContext, addr hostarch.Addr, limit int) (int, error) {
  4418  	if !n.HClient.Packed() && n.HClientSrc.Packed() && n.HObject.Packed() && n.HObjectSrc.Packed() && n.HParent.Packed() {
  4419  		// Type NVOS55Parameters doesn't have a packed layout in memory, fall back to MarshalBytes.
  4420  		buf := cc.CopyScratchBuffer(n.SizeBytes()) // escapes: okay.
  4421  		n.MarshalBytes(buf)                        // escapes: fallback.
  4422  		return cc.CopyOutBytes(addr, buf[:limit])  // escapes: okay.
  4423  	}
  4424  
  4425  	// Construct a slice backed by dst's underlying memory.
  4426  	var buf []byte
  4427  	hdr := (*reflect.SliceHeader)(unsafe.Pointer(&buf))
  4428  	hdr.Data = uintptr(gohacks.Noescape(unsafe.Pointer(n)))
  4429  	hdr.Len = n.SizeBytes()
  4430  	hdr.Cap = n.SizeBytes()
  4431  
  4432  	length, err := cc.CopyOutBytes(addr, buf[:limit]) // escapes: okay.
  4433  	// Since we bypassed the compiler's escape analysis, indicate that n
  4434  	// must live until the use above.
  4435  	runtime.KeepAlive(n) // escapes: replaced by intrinsic.
  4436  	return length, err
  4437  }
  4438  
  4439  // CopyOut implements marshal.Marshallable.CopyOut.
  4440  func (n *NVOS55Parameters) CopyOut(cc marshal.CopyContext, addr hostarch.Addr) (int, error) {
  4441  	return n.CopyOutN(cc, addr, n.SizeBytes())
  4442  }
  4443  
  4444  // CopyIn implements marshal.Marshallable.CopyIn.
  4445  func (n *NVOS55Parameters) CopyIn(cc marshal.CopyContext, addr hostarch.Addr) (int, error) {
  4446  	if !n.HClient.Packed() && n.HClientSrc.Packed() && n.HObject.Packed() && n.HObjectSrc.Packed() && n.HParent.Packed() {
  4447  		// Type NVOS55Parameters doesn't have a packed layout in memory, fall back to UnmarshalBytes.
  4448  		buf := cc.CopyScratchBuffer(n.SizeBytes()) // escapes: okay.
  4449  		length, err := cc.CopyInBytes(addr, buf)   // escapes: okay.
  4450  		// Unmarshal unconditionally. If we had a short copy-in, this results in a
  4451  		// partially unmarshalled struct.
  4452  		n.UnmarshalBytes(buf) // escapes: fallback.
  4453  		return length, err
  4454  	}
  4455  
  4456  	// Construct a slice backed by dst's underlying memory.
  4457  	var buf []byte
  4458  	hdr := (*reflect.SliceHeader)(unsafe.Pointer(&buf))
  4459  	hdr.Data = uintptr(gohacks.Noescape(unsafe.Pointer(n)))
  4460  	hdr.Len = n.SizeBytes()
  4461  	hdr.Cap = n.SizeBytes()
  4462  
  4463  	length, err := cc.CopyInBytes(addr, buf) // escapes: okay.
  4464  	// Since we bypassed the compiler's escape analysis, indicate that n
  4465  	// must live until the use above.
  4466  	runtime.KeepAlive(n) // escapes: replaced by intrinsic.
  4467  	return length, err
  4468  }
  4469  
  4470  // WriteTo implements io.WriterTo.WriteTo.
  4471  func (n *NVOS55Parameters) WriteTo(writer io.Writer) (int64, error) {
  4472  	if !n.HClient.Packed() && n.HClientSrc.Packed() && n.HObject.Packed() && n.HObjectSrc.Packed() && n.HParent.Packed() {
  4473  		// Type NVOS55Parameters doesn't have a packed layout in memory, fall back to MarshalBytes.
  4474  		buf := make([]byte, n.SizeBytes())
  4475  		n.MarshalBytes(buf)
  4476  		length, err := writer.Write(buf)
  4477  		return int64(length), err
  4478  	}
  4479  
  4480  	// Construct a slice backed by dst's underlying memory.
  4481  	var buf []byte
  4482  	hdr := (*reflect.SliceHeader)(unsafe.Pointer(&buf))
  4483  	hdr.Data = uintptr(gohacks.Noescape(unsafe.Pointer(n)))
  4484  	hdr.Len = n.SizeBytes()
  4485  	hdr.Cap = n.SizeBytes()
  4486  
  4487  	length, err := writer.Write(buf)
  4488  	// Since we bypassed the compiler's escape analysis, indicate that n
  4489  	// must live until the use above.
  4490  	runtime.KeepAlive(n) // escapes: replaced by intrinsic.
  4491  	return int64(length), err
  4492  }
  4493  
  4494  // SizeBytes implements marshal.Marshallable.SizeBytes.
  4495  func (n *NVOS56Parameters) SizeBytes() int {
  4496  	return 4 +
  4497  		(*Handle)(nil).SizeBytes() +
  4498  		(*Handle)(nil).SizeBytes() +
  4499  		(*Handle)(nil).SizeBytes() +
  4500  		1*4 +
  4501  		(*P64)(nil).SizeBytes() +
  4502  		(*P64)(nil).SizeBytes() +
  4503  		1*4
  4504  }
  4505  
  4506  // MarshalBytes implements marshal.Marshallable.MarshalBytes.
  4507  func (n *NVOS56Parameters) MarshalBytes(dst []byte) []byte {
  4508  	dst = n.HClient.MarshalUnsafe(dst)
  4509  	dst = n.HDevice.MarshalUnsafe(dst)
  4510  	dst = n.HMemory.MarshalUnsafe(dst)
  4511  	for idx := 0; idx < 4; idx++ {
  4512  		dst[0] = byte(n.Pad0[idx])
  4513  		dst = dst[1:]
  4514  	}
  4515  	dst = n.POldCPUAddress.MarshalUnsafe(dst)
  4516  	dst = n.PNewCPUAddress.MarshalUnsafe(dst)
  4517  	hostarch.ByteOrder.PutUint32(dst[:4], uint32(n.Status))
  4518  	dst = dst[4:]
  4519  	for idx := 0; idx < 4; idx++ {
  4520  		dst[0] = byte(n.Pad1[idx])
  4521  		dst = dst[1:]
  4522  	}
  4523  	return dst
  4524  }
  4525  
  4526  // UnmarshalBytes implements marshal.Marshallable.UnmarshalBytes.
  4527  func (n *NVOS56Parameters) UnmarshalBytes(src []byte) []byte {
  4528  	src = n.HClient.UnmarshalUnsafe(src)
  4529  	src = n.HDevice.UnmarshalUnsafe(src)
  4530  	src = n.HMemory.UnmarshalUnsafe(src)
  4531  	for idx := 0; idx < 4; idx++ {
  4532  		n.Pad0[idx] = src[0]
  4533  		src = src[1:]
  4534  	}
  4535  	src = n.POldCPUAddress.UnmarshalUnsafe(src)
  4536  	src = n.PNewCPUAddress.UnmarshalUnsafe(src)
  4537  	n.Status = uint32(hostarch.ByteOrder.Uint32(src[:4]))
  4538  	src = src[4:]
  4539  	for idx := 0; idx < 4; idx++ {
  4540  		n.Pad1[idx] = src[0]
  4541  		src = src[1:]
  4542  	}
  4543  	return src
  4544  }
  4545  
  4546  // Packed implements marshal.Marshallable.Packed.
  4547  //
  4548  //go:nosplit
  4549  func (n *NVOS56Parameters) Packed() bool {
  4550  	return n.HClient.Packed() && n.HDevice.Packed() && n.HMemory.Packed() && n.PNewCPUAddress.Packed() && n.POldCPUAddress.Packed()
  4551  }
  4552  
  4553  // MarshalUnsafe implements marshal.Marshallable.MarshalUnsafe.
  4554  func (n *NVOS56Parameters) MarshalUnsafe(dst []byte) []byte {
  4555  	if n.HClient.Packed() && n.HDevice.Packed() && n.HMemory.Packed() && n.PNewCPUAddress.Packed() && n.POldCPUAddress.Packed() {
  4556  		size := n.SizeBytes()
  4557  		gohacks.Memmove(unsafe.Pointer(&dst[0]), unsafe.Pointer(n), uintptr(size))
  4558  		return dst[size:]
  4559  	}
  4560  	// Type NVOS56Parameters doesn't have a packed layout in memory, fallback to MarshalBytes.
  4561  	return n.MarshalBytes(dst)
  4562  }
  4563  
  4564  // UnmarshalUnsafe implements marshal.Marshallable.UnmarshalUnsafe.
  4565  func (n *NVOS56Parameters) UnmarshalUnsafe(src []byte) []byte {
  4566  	if n.HClient.Packed() && n.HDevice.Packed() && n.HMemory.Packed() && n.PNewCPUAddress.Packed() && n.POldCPUAddress.Packed() {
  4567  		size := n.SizeBytes()
  4568  		gohacks.Memmove(unsafe.Pointer(n), unsafe.Pointer(&src[0]), uintptr(size))
  4569  		return src[size:]
  4570  	}
  4571  	// Type NVOS56Parameters doesn't have a packed layout in memory, fallback to UnmarshalBytes.
  4572  	return n.UnmarshalBytes(src)
  4573  }
  4574  
  4575  // CopyOutN implements marshal.Marshallable.CopyOutN.
  4576  func (n *NVOS56Parameters) CopyOutN(cc marshal.CopyContext, addr hostarch.Addr, limit int) (int, error) {
  4577  	if !n.HClient.Packed() && n.HDevice.Packed() && n.HMemory.Packed() && n.PNewCPUAddress.Packed() && n.POldCPUAddress.Packed() {
  4578  		// Type NVOS56Parameters doesn't have a packed layout in memory, fall back to MarshalBytes.
  4579  		buf := cc.CopyScratchBuffer(n.SizeBytes()) // escapes: okay.
  4580  		n.MarshalBytes(buf)                        // escapes: fallback.
  4581  		return cc.CopyOutBytes(addr, buf[:limit])  // escapes: okay.
  4582  	}
  4583  
  4584  	// Construct a slice backed by dst's underlying memory.
  4585  	var buf []byte
  4586  	hdr := (*reflect.SliceHeader)(unsafe.Pointer(&buf))
  4587  	hdr.Data = uintptr(gohacks.Noescape(unsafe.Pointer(n)))
  4588  	hdr.Len = n.SizeBytes()
  4589  	hdr.Cap = n.SizeBytes()
  4590  
  4591  	length, err := cc.CopyOutBytes(addr, buf[:limit]) // escapes: okay.
  4592  	// Since we bypassed the compiler's escape analysis, indicate that n
  4593  	// must live until the use above.
  4594  	runtime.KeepAlive(n) // escapes: replaced by intrinsic.
  4595  	return length, err
  4596  }
  4597  
  4598  // CopyOut implements marshal.Marshallable.CopyOut.
  4599  func (n *NVOS56Parameters) CopyOut(cc marshal.CopyContext, addr hostarch.Addr) (int, error) {
  4600  	return n.CopyOutN(cc, addr, n.SizeBytes())
  4601  }
  4602  
  4603  // CopyIn implements marshal.Marshallable.CopyIn.
  4604  func (n *NVOS56Parameters) CopyIn(cc marshal.CopyContext, addr hostarch.Addr) (int, error) {
  4605  	if !n.HClient.Packed() && n.HDevice.Packed() && n.HMemory.Packed() && n.PNewCPUAddress.Packed() && n.POldCPUAddress.Packed() {
  4606  		// Type NVOS56Parameters doesn't have a packed layout in memory, fall back to UnmarshalBytes.
  4607  		buf := cc.CopyScratchBuffer(n.SizeBytes()) // escapes: okay.
  4608  		length, err := cc.CopyInBytes(addr, buf)   // escapes: okay.
  4609  		// Unmarshal unconditionally. If we had a short copy-in, this results in a
  4610  		// partially unmarshalled struct.
  4611  		n.UnmarshalBytes(buf) // escapes: fallback.
  4612  		return length, err
  4613  	}
  4614  
  4615  	// Construct a slice backed by dst's underlying memory.
  4616  	var buf []byte
  4617  	hdr := (*reflect.SliceHeader)(unsafe.Pointer(&buf))
  4618  	hdr.Data = uintptr(gohacks.Noescape(unsafe.Pointer(n)))
  4619  	hdr.Len = n.SizeBytes()
  4620  	hdr.Cap = n.SizeBytes()
  4621  
  4622  	length, err := cc.CopyInBytes(addr, buf) // escapes: okay.
  4623  	// Since we bypassed the compiler's escape analysis, indicate that n
  4624  	// must live until the use above.
  4625  	runtime.KeepAlive(n) // escapes: replaced by intrinsic.
  4626  	return length, err
  4627  }
  4628  
  4629  // WriteTo implements io.WriterTo.WriteTo.
  4630  func (n *NVOS56Parameters) WriteTo(writer io.Writer) (int64, error) {
  4631  	if !n.HClient.Packed() && n.HDevice.Packed() && n.HMemory.Packed() && n.PNewCPUAddress.Packed() && n.POldCPUAddress.Packed() {
  4632  		// Type NVOS56Parameters doesn't have a packed layout in memory, fall back to MarshalBytes.
  4633  		buf := make([]byte, n.SizeBytes())
  4634  		n.MarshalBytes(buf)
  4635  		length, err := writer.Write(buf)
  4636  		return int64(length), err
  4637  	}
  4638  
  4639  	// Construct a slice backed by dst's underlying memory.
  4640  	var buf []byte
  4641  	hdr := (*reflect.SliceHeader)(unsafe.Pointer(&buf))
  4642  	hdr.Data = uintptr(gohacks.Noescape(unsafe.Pointer(n)))
  4643  	hdr.Len = n.SizeBytes()
  4644  	hdr.Cap = n.SizeBytes()
  4645  
  4646  	length, err := writer.Write(buf)
  4647  	// Since we bypassed the compiler's escape analysis, indicate that n
  4648  	// must live until the use above.
  4649  	runtime.KeepAlive(n) // escapes: replaced by intrinsic.
  4650  	return int64(length), err
  4651  }
  4652  
  4653  // SizeBytes implements marshal.Marshallable.SizeBytes.
  4654  func (n *NVOS57Parameters) SizeBytes() int {
  4655  	return 4 +
  4656  		(*Handle)(nil).SizeBytes() +
  4657  		(*Handle)(nil).SizeBytes() +
  4658  		(*RS_SHARE_POLICY)(nil).SizeBytes()
  4659  }
  4660  
  4661  // MarshalBytes implements marshal.Marshallable.MarshalBytes.
  4662  func (n *NVOS57Parameters) MarshalBytes(dst []byte) []byte {
  4663  	dst = n.HClient.MarshalUnsafe(dst)
  4664  	dst = n.HObject.MarshalUnsafe(dst)
  4665  	dst = n.SharePolicy.MarshalUnsafe(dst)
  4666  	hostarch.ByteOrder.PutUint32(dst[:4], uint32(n.Status))
  4667  	dst = dst[4:]
  4668  	return dst
  4669  }
  4670  
  4671  // UnmarshalBytes implements marshal.Marshallable.UnmarshalBytes.
  4672  func (n *NVOS57Parameters) UnmarshalBytes(src []byte) []byte {
  4673  	src = n.HClient.UnmarshalUnsafe(src)
  4674  	src = n.HObject.UnmarshalUnsafe(src)
  4675  	src = n.SharePolicy.UnmarshalUnsafe(src)
  4676  	n.Status = uint32(hostarch.ByteOrder.Uint32(src[:4]))
  4677  	src = src[4:]
  4678  	return src
  4679  }
  4680  
  4681  // Packed implements marshal.Marshallable.Packed.
  4682  //
  4683  //go:nosplit
  4684  func (n *NVOS57Parameters) Packed() bool {
  4685  	return n.HClient.Packed() && n.HObject.Packed() && n.SharePolicy.Packed()
  4686  }
  4687  
  4688  // MarshalUnsafe implements marshal.Marshallable.MarshalUnsafe.
  4689  func (n *NVOS57Parameters) MarshalUnsafe(dst []byte) []byte {
  4690  	if n.HClient.Packed() && n.HObject.Packed() && n.SharePolicy.Packed() {
  4691  		size := n.SizeBytes()
  4692  		gohacks.Memmove(unsafe.Pointer(&dst[0]), unsafe.Pointer(n), uintptr(size))
  4693  		return dst[size:]
  4694  	}
  4695  	// Type NVOS57Parameters doesn't have a packed layout in memory, fallback to MarshalBytes.
  4696  	return n.MarshalBytes(dst)
  4697  }
  4698  
  4699  // UnmarshalUnsafe implements marshal.Marshallable.UnmarshalUnsafe.
  4700  func (n *NVOS57Parameters) UnmarshalUnsafe(src []byte) []byte {
  4701  	if n.HClient.Packed() && n.HObject.Packed() && n.SharePolicy.Packed() {
  4702  		size := n.SizeBytes()
  4703  		gohacks.Memmove(unsafe.Pointer(n), unsafe.Pointer(&src[0]), uintptr(size))
  4704  		return src[size:]
  4705  	}
  4706  	// Type NVOS57Parameters doesn't have a packed layout in memory, fallback to UnmarshalBytes.
  4707  	return n.UnmarshalBytes(src)
  4708  }
  4709  
  4710  // CopyOutN implements marshal.Marshallable.CopyOutN.
  4711  func (n *NVOS57Parameters) CopyOutN(cc marshal.CopyContext, addr hostarch.Addr, limit int) (int, error) {
  4712  	if !n.HClient.Packed() && n.HObject.Packed() && n.SharePolicy.Packed() {
  4713  		// Type NVOS57Parameters doesn't have a packed layout in memory, fall back to MarshalBytes.
  4714  		buf := cc.CopyScratchBuffer(n.SizeBytes()) // escapes: okay.
  4715  		n.MarshalBytes(buf)                        // escapes: fallback.
  4716  		return cc.CopyOutBytes(addr, buf[:limit])  // escapes: okay.
  4717  	}
  4718  
  4719  	// Construct a slice backed by dst's underlying memory.
  4720  	var buf []byte
  4721  	hdr := (*reflect.SliceHeader)(unsafe.Pointer(&buf))
  4722  	hdr.Data = uintptr(gohacks.Noescape(unsafe.Pointer(n)))
  4723  	hdr.Len = n.SizeBytes()
  4724  	hdr.Cap = n.SizeBytes()
  4725  
  4726  	length, err := cc.CopyOutBytes(addr, buf[:limit]) // escapes: okay.
  4727  	// Since we bypassed the compiler's escape analysis, indicate that n
  4728  	// must live until the use above.
  4729  	runtime.KeepAlive(n) // escapes: replaced by intrinsic.
  4730  	return length, err
  4731  }
  4732  
  4733  // CopyOut implements marshal.Marshallable.CopyOut.
  4734  func (n *NVOS57Parameters) CopyOut(cc marshal.CopyContext, addr hostarch.Addr) (int, error) {
  4735  	return n.CopyOutN(cc, addr, n.SizeBytes())
  4736  }
  4737  
  4738  // CopyIn implements marshal.Marshallable.CopyIn.
  4739  func (n *NVOS57Parameters) CopyIn(cc marshal.CopyContext, addr hostarch.Addr) (int, error) {
  4740  	if !n.HClient.Packed() && n.HObject.Packed() && n.SharePolicy.Packed() {
  4741  		// Type NVOS57Parameters doesn't have a packed layout in memory, fall back to UnmarshalBytes.
  4742  		buf := cc.CopyScratchBuffer(n.SizeBytes()) // escapes: okay.
  4743  		length, err := cc.CopyInBytes(addr, buf)   // escapes: okay.
  4744  		// Unmarshal unconditionally. If we had a short copy-in, this results in a
  4745  		// partially unmarshalled struct.
  4746  		n.UnmarshalBytes(buf) // escapes: fallback.
  4747  		return length, err
  4748  	}
  4749  
  4750  	// Construct a slice backed by dst's underlying memory.
  4751  	var buf []byte
  4752  	hdr := (*reflect.SliceHeader)(unsafe.Pointer(&buf))
  4753  	hdr.Data = uintptr(gohacks.Noescape(unsafe.Pointer(n)))
  4754  	hdr.Len = n.SizeBytes()
  4755  	hdr.Cap = n.SizeBytes()
  4756  
  4757  	length, err := cc.CopyInBytes(addr, buf) // escapes: okay.
  4758  	// Since we bypassed the compiler's escape analysis, indicate that n
  4759  	// must live until the use above.
  4760  	runtime.KeepAlive(n) // escapes: replaced by intrinsic.
  4761  	return length, err
  4762  }
  4763  
  4764  // WriteTo implements io.WriterTo.WriteTo.
  4765  func (n *NVOS57Parameters) WriteTo(writer io.Writer) (int64, error) {
  4766  	if !n.HClient.Packed() && n.HObject.Packed() && n.SharePolicy.Packed() {
  4767  		// Type NVOS57Parameters doesn't have a packed layout in memory, fall back to MarshalBytes.
  4768  		buf := make([]byte, n.SizeBytes())
  4769  		n.MarshalBytes(buf)
  4770  		length, err := writer.Write(buf)
  4771  		return int64(length), err
  4772  	}
  4773  
  4774  	// Construct a slice backed by dst's underlying memory.
  4775  	var buf []byte
  4776  	hdr := (*reflect.SliceHeader)(unsafe.Pointer(&buf))
  4777  	hdr.Data = uintptr(gohacks.Noescape(unsafe.Pointer(n)))
  4778  	hdr.Len = n.SizeBytes()
  4779  	hdr.Cap = n.SizeBytes()
  4780  
  4781  	length, err := writer.Write(buf)
  4782  	// Since we bypassed the compiler's escape analysis, indicate that n
  4783  	// must live until the use above.
  4784  	runtime.KeepAlive(n) // escapes: replaced by intrinsic.
  4785  	return int64(length), err
  4786  }
  4787  
  4788  // SizeBytes implements marshal.Marshallable.SizeBytes.
  4789  func (n *NVOS64Parameters) SizeBytes() int {
  4790  	return 12 +
  4791  		(*Handle)(nil).SizeBytes() +
  4792  		(*Handle)(nil).SizeBytes() +
  4793  		(*Handle)(nil).SizeBytes() +
  4794  		(*P64)(nil).SizeBytes() +
  4795  		(*P64)(nil).SizeBytes()
  4796  }
  4797  
  4798  // MarshalBytes implements marshal.Marshallable.MarshalBytes.
  4799  func (n *NVOS64Parameters) MarshalBytes(dst []byte) []byte {
  4800  	dst = n.HRoot.MarshalUnsafe(dst)
  4801  	dst = n.HObjectParent.MarshalUnsafe(dst)
  4802  	dst = n.HObjectNew.MarshalUnsafe(dst)
  4803  	hostarch.ByteOrder.PutUint32(dst[:4], uint32(n.HClass))
  4804  	dst = dst[4:]
  4805  	dst = n.PAllocParms.MarshalUnsafe(dst)
  4806  	dst = n.PRightsRequested.MarshalUnsafe(dst)
  4807  	hostarch.ByteOrder.PutUint32(dst[:4], uint32(n.Flags))
  4808  	dst = dst[4:]
  4809  	hostarch.ByteOrder.PutUint32(dst[:4], uint32(n.Status))
  4810  	dst = dst[4:]
  4811  	return dst
  4812  }
  4813  
  4814  // UnmarshalBytes implements marshal.Marshallable.UnmarshalBytes.
  4815  func (n *NVOS64Parameters) UnmarshalBytes(src []byte) []byte {
  4816  	src = n.HRoot.UnmarshalUnsafe(src)
  4817  	src = n.HObjectParent.UnmarshalUnsafe(src)
  4818  	src = n.HObjectNew.UnmarshalUnsafe(src)
  4819  	n.HClass = uint32(hostarch.ByteOrder.Uint32(src[:4]))
  4820  	src = src[4:]
  4821  	src = n.PAllocParms.UnmarshalUnsafe(src)
  4822  	src = n.PRightsRequested.UnmarshalUnsafe(src)
  4823  	n.Flags = uint32(hostarch.ByteOrder.Uint32(src[:4]))
  4824  	src = src[4:]
  4825  	n.Status = uint32(hostarch.ByteOrder.Uint32(src[:4]))
  4826  	src = src[4:]
  4827  	return src
  4828  }
  4829  
  4830  // Packed implements marshal.Marshallable.Packed.
  4831  //
  4832  //go:nosplit
  4833  func (n *NVOS64Parameters) Packed() bool {
  4834  	return n.HObjectNew.Packed() && n.HObjectParent.Packed() && n.HRoot.Packed() && n.PAllocParms.Packed() && n.PRightsRequested.Packed()
  4835  }
  4836  
  4837  // MarshalUnsafe implements marshal.Marshallable.MarshalUnsafe.
  4838  func (n *NVOS64Parameters) MarshalUnsafe(dst []byte) []byte {
  4839  	if n.HObjectNew.Packed() && n.HObjectParent.Packed() && n.HRoot.Packed() && n.PAllocParms.Packed() && n.PRightsRequested.Packed() {
  4840  		size := n.SizeBytes()
  4841  		gohacks.Memmove(unsafe.Pointer(&dst[0]), unsafe.Pointer(n), uintptr(size))
  4842  		return dst[size:]
  4843  	}
  4844  	// Type NVOS64Parameters doesn't have a packed layout in memory, fallback to MarshalBytes.
  4845  	return n.MarshalBytes(dst)
  4846  }
  4847  
  4848  // UnmarshalUnsafe implements marshal.Marshallable.UnmarshalUnsafe.
  4849  func (n *NVOS64Parameters) UnmarshalUnsafe(src []byte) []byte {
  4850  	if n.HObjectNew.Packed() && n.HObjectParent.Packed() && n.HRoot.Packed() && n.PAllocParms.Packed() && n.PRightsRequested.Packed() {
  4851  		size := n.SizeBytes()
  4852  		gohacks.Memmove(unsafe.Pointer(n), unsafe.Pointer(&src[0]), uintptr(size))
  4853  		return src[size:]
  4854  	}
  4855  	// Type NVOS64Parameters doesn't have a packed layout in memory, fallback to UnmarshalBytes.
  4856  	return n.UnmarshalBytes(src)
  4857  }
  4858  
  4859  // CopyOutN implements marshal.Marshallable.CopyOutN.
  4860  func (n *NVOS64Parameters) CopyOutN(cc marshal.CopyContext, addr hostarch.Addr, limit int) (int, error) {
  4861  	if !n.HObjectNew.Packed() && n.HObjectParent.Packed() && n.HRoot.Packed() && n.PAllocParms.Packed() && n.PRightsRequested.Packed() {
  4862  		// Type NVOS64Parameters doesn't have a packed layout in memory, fall back to MarshalBytes.
  4863  		buf := cc.CopyScratchBuffer(n.SizeBytes()) // escapes: okay.
  4864  		n.MarshalBytes(buf)                        // escapes: fallback.
  4865  		return cc.CopyOutBytes(addr, buf[:limit])  // escapes: okay.
  4866  	}
  4867  
  4868  	// Construct a slice backed by dst's underlying memory.
  4869  	var buf []byte
  4870  	hdr := (*reflect.SliceHeader)(unsafe.Pointer(&buf))
  4871  	hdr.Data = uintptr(gohacks.Noescape(unsafe.Pointer(n)))
  4872  	hdr.Len = n.SizeBytes()
  4873  	hdr.Cap = n.SizeBytes()
  4874  
  4875  	length, err := cc.CopyOutBytes(addr, buf[:limit]) // escapes: okay.
  4876  	// Since we bypassed the compiler's escape analysis, indicate that n
  4877  	// must live until the use above.
  4878  	runtime.KeepAlive(n) // escapes: replaced by intrinsic.
  4879  	return length, err
  4880  }
  4881  
  4882  // CopyOut implements marshal.Marshallable.CopyOut.
  4883  func (n *NVOS64Parameters) CopyOut(cc marshal.CopyContext, addr hostarch.Addr) (int, error) {
  4884  	return n.CopyOutN(cc, addr, n.SizeBytes())
  4885  }
  4886  
  4887  // CopyIn implements marshal.Marshallable.CopyIn.
  4888  func (n *NVOS64Parameters) CopyIn(cc marshal.CopyContext, addr hostarch.Addr) (int, error) {
  4889  	if !n.HObjectNew.Packed() && n.HObjectParent.Packed() && n.HRoot.Packed() && n.PAllocParms.Packed() && n.PRightsRequested.Packed() {
  4890  		// Type NVOS64Parameters doesn't have a packed layout in memory, fall back to UnmarshalBytes.
  4891  		buf := cc.CopyScratchBuffer(n.SizeBytes()) // escapes: okay.
  4892  		length, err := cc.CopyInBytes(addr, buf)   // escapes: okay.
  4893  		// Unmarshal unconditionally. If we had a short copy-in, this results in a
  4894  		// partially unmarshalled struct.
  4895  		n.UnmarshalBytes(buf) // escapes: fallback.
  4896  		return length, err
  4897  	}
  4898  
  4899  	// Construct a slice backed by dst's underlying memory.
  4900  	var buf []byte
  4901  	hdr := (*reflect.SliceHeader)(unsafe.Pointer(&buf))
  4902  	hdr.Data = uintptr(gohacks.Noescape(unsafe.Pointer(n)))
  4903  	hdr.Len = n.SizeBytes()
  4904  	hdr.Cap = n.SizeBytes()
  4905  
  4906  	length, err := cc.CopyInBytes(addr, buf) // escapes: okay.
  4907  	// Since we bypassed the compiler's escape analysis, indicate that n
  4908  	// must live until the use above.
  4909  	runtime.KeepAlive(n) // escapes: replaced by intrinsic.
  4910  	return length, err
  4911  }
  4912  
  4913  // WriteTo implements io.WriterTo.WriteTo.
  4914  func (n *NVOS64Parameters) WriteTo(writer io.Writer) (int64, error) {
  4915  	if !n.HObjectNew.Packed() && n.HObjectParent.Packed() && n.HRoot.Packed() && n.PAllocParms.Packed() && n.PRightsRequested.Packed() {
  4916  		// Type NVOS64Parameters doesn't have a packed layout in memory, fall back to MarshalBytes.
  4917  		buf := make([]byte, n.SizeBytes())
  4918  		n.MarshalBytes(buf)
  4919  		length, err := writer.Write(buf)
  4920  		return int64(length), err
  4921  	}
  4922  
  4923  	// Construct a slice backed by dst's underlying memory.
  4924  	var buf []byte
  4925  	hdr := (*reflect.SliceHeader)(unsafe.Pointer(&buf))
  4926  	hdr.Data = uintptr(gohacks.Noescape(unsafe.Pointer(n)))
  4927  	hdr.Len = n.SizeBytes()
  4928  	hdr.Cap = n.SizeBytes()
  4929  
  4930  	length, err := writer.Write(buf)
  4931  	// Since we bypassed the compiler's escape analysis, indicate that n
  4932  	// must live until the use above.
  4933  	runtime.KeepAlive(n) // escapes: replaced by intrinsic.
  4934  	return int64(length), err
  4935  }
  4936  
  4937  // SizeBytes implements marshal.Marshallable.SizeBytes.
  4938  func (r *RMAPIVersion) SizeBytes() int {
  4939  	return 8 +
  4940  		1*64
  4941  }
  4942  
  4943  // MarshalBytes implements marshal.Marshallable.MarshalBytes.
  4944  func (r *RMAPIVersion) MarshalBytes(dst []byte) []byte {
  4945  	hostarch.ByteOrder.PutUint32(dst[:4], uint32(r.Cmd))
  4946  	dst = dst[4:]
  4947  	hostarch.ByteOrder.PutUint32(dst[:4], uint32(r.Reply))
  4948  	dst = dst[4:]
  4949  	for idx := 0; idx < 64; idx++ {
  4950  		dst[0] = byte(r.VersionString[idx])
  4951  		dst = dst[1:]
  4952  	}
  4953  	return dst
  4954  }
  4955  
  4956  // UnmarshalBytes implements marshal.Marshallable.UnmarshalBytes.
  4957  func (r *RMAPIVersion) UnmarshalBytes(src []byte) []byte {
  4958  	r.Cmd = uint32(hostarch.ByteOrder.Uint32(src[:4]))
  4959  	src = src[4:]
  4960  	r.Reply = uint32(hostarch.ByteOrder.Uint32(src[:4]))
  4961  	src = src[4:]
  4962  	for idx := 0; idx < 64; idx++ {
  4963  		r.VersionString[idx] = src[0]
  4964  		src = src[1:]
  4965  	}
  4966  	return src
  4967  }
  4968  
  4969  // Packed implements marshal.Marshallable.Packed.
  4970  //
  4971  //go:nosplit
  4972  func (r *RMAPIVersion) Packed() bool {
  4973  	return true
  4974  }
  4975  
  4976  // MarshalUnsafe implements marshal.Marshallable.MarshalUnsafe.
  4977  func (r *RMAPIVersion) MarshalUnsafe(dst []byte) []byte {
  4978  	size := r.SizeBytes()
  4979  	gohacks.Memmove(unsafe.Pointer(&dst[0]), unsafe.Pointer(r), uintptr(size))
  4980  	return dst[size:]
  4981  }
  4982  
  4983  // UnmarshalUnsafe implements marshal.Marshallable.UnmarshalUnsafe.
  4984  func (r *RMAPIVersion) UnmarshalUnsafe(src []byte) []byte {
  4985  	size := r.SizeBytes()
  4986  	gohacks.Memmove(unsafe.Pointer(r), unsafe.Pointer(&src[0]), uintptr(size))
  4987  	return src[size:]
  4988  }
  4989  
  4990  // CopyOutN implements marshal.Marshallable.CopyOutN.
  4991  func (r *RMAPIVersion) CopyOutN(cc marshal.CopyContext, addr hostarch.Addr, limit int) (int, error) {
  4992  	// Construct a slice backed by dst's underlying memory.
  4993  	var buf []byte
  4994  	hdr := (*reflect.SliceHeader)(unsafe.Pointer(&buf))
  4995  	hdr.Data = uintptr(gohacks.Noescape(unsafe.Pointer(r)))
  4996  	hdr.Len = r.SizeBytes()
  4997  	hdr.Cap = r.SizeBytes()
  4998  
  4999  	length, err := cc.CopyOutBytes(addr, buf[:limit]) // escapes: okay.
  5000  	// Since we bypassed the compiler's escape analysis, indicate that r
  5001  	// must live until the use above.
  5002  	runtime.KeepAlive(r) // escapes: replaced by intrinsic.
  5003  	return length, err
  5004  }
  5005  
  5006  // CopyOut implements marshal.Marshallable.CopyOut.
  5007  func (r *RMAPIVersion) CopyOut(cc marshal.CopyContext, addr hostarch.Addr) (int, error) {
  5008  	return r.CopyOutN(cc, addr, r.SizeBytes())
  5009  }
  5010  
  5011  // CopyIn implements marshal.Marshallable.CopyIn.
  5012  func (r *RMAPIVersion) CopyIn(cc marshal.CopyContext, addr hostarch.Addr) (int, error) {
  5013  	// Construct a slice backed by dst's underlying memory.
  5014  	var buf []byte
  5015  	hdr := (*reflect.SliceHeader)(unsafe.Pointer(&buf))
  5016  	hdr.Data = uintptr(gohacks.Noescape(unsafe.Pointer(r)))
  5017  	hdr.Len = r.SizeBytes()
  5018  	hdr.Cap = r.SizeBytes()
  5019  
  5020  	length, err := cc.CopyInBytes(addr, buf) // escapes: okay.
  5021  	// Since we bypassed the compiler's escape analysis, indicate that r
  5022  	// must live until the use above.
  5023  	runtime.KeepAlive(r) // escapes: replaced by intrinsic.
  5024  	return length, err
  5025  }
  5026  
  5027  // WriteTo implements io.WriterTo.WriteTo.
  5028  func (r *RMAPIVersion) WriteTo(writer io.Writer) (int64, error) {
  5029  	// Construct a slice backed by dst's underlying memory.
  5030  	var buf []byte
  5031  	hdr := (*reflect.SliceHeader)(unsafe.Pointer(&buf))
  5032  	hdr.Data = uintptr(gohacks.Noescape(unsafe.Pointer(r)))
  5033  	hdr.Len = r.SizeBytes()
  5034  	hdr.Cap = r.SizeBytes()
  5035  
  5036  	length, err := writer.Write(buf)
  5037  	// Since we bypassed the compiler's escape analysis, indicate that r
  5038  	// must live until the use above.
  5039  	runtime.KeepAlive(r) // escapes: replaced by intrinsic.
  5040  	return int64(length), err
  5041  }
  5042  
  5043  // SizeBytes implements marshal.Marshallable.SizeBytes.
  5044  func (h *Handle) SizeBytes() int {
  5045  	return 4
  5046  }
  5047  
  5048  // MarshalBytes implements marshal.Marshallable.MarshalBytes.
  5049  func (h *Handle) MarshalBytes(dst []byte) []byte {
  5050  	hostarch.ByteOrder.PutUint32(dst[:4], uint32(h.Val))
  5051  	dst = dst[4:]
  5052  	return dst
  5053  }
  5054  
  5055  // UnmarshalBytes implements marshal.Marshallable.UnmarshalBytes.
  5056  func (h *Handle) UnmarshalBytes(src []byte) []byte {
  5057  	h.Val = uint32(hostarch.ByteOrder.Uint32(src[:4]))
  5058  	src = src[4:]
  5059  	return src
  5060  }
  5061  
  5062  // Packed implements marshal.Marshallable.Packed.
  5063  //
  5064  //go:nosplit
  5065  func (h *Handle) Packed() bool {
  5066  	return true
  5067  }
  5068  
  5069  // MarshalUnsafe implements marshal.Marshallable.MarshalUnsafe.
  5070  func (h *Handle) MarshalUnsafe(dst []byte) []byte {
  5071  	size := h.SizeBytes()
  5072  	gohacks.Memmove(unsafe.Pointer(&dst[0]), unsafe.Pointer(h), uintptr(size))
  5073  	return dst[size:]
  5074  }
  5075  
  5076  // UnmarshalUnsafe implements marshal.Marshallable.UnmarshalUnsafe.
  5077  func (h *Handle) UnmarshalUnsafe(src []byte) []byte {
  5078  	size := h.SizeBytes()
  5079  	gohacks.Memmove(unsafe.Pointer(h), unsafe.Pointer(&src[0]), uintptr(size))
  5080  	return src[size:]
  5081  }
  5082  
  5083  // CopyOutN implements marshal.Marshallable.CopyOutN.
  5084  func (h *Handle) CopyOutN(cc marshal.CopyContext, addr hostarch.Addr, limit int) (int, error) {
  5085  	// Construct a slice backed by dst's underlying memory.
  5086  	var buf []byte
  5087  	hdr := (*reflect.SliceHeader)(unsafe.Pointer(&buf))
  5088  	hdr.Data = uintptr(gohacks.Noescape(unsafe.Pointer(h)))
  5089  	hdr.Len = h.SizeBytes()
  5090  	hdr.Cap = h.SizeBytes()
  5091  
  5092  	length, err := cc.CopyOutBytes(addr, buf[:limit]) // escapes: okay.
  5093  	// Since we bypassed the compiler's escape analysis, indicate that h
  5094  	// must live until the use above.
  5095  	runtime.KeepAlive(h) // escapes: replaced by intrinsic.
  5096  	return length, err
  5097  }
  5098  
  5099  // CopyOut implements marshal.Marshallable.CopyOut.
  5100  func (h *Handle) CopyOut(cc marshal.CopyContext, addr hostarch.Addr) (int, error) {
  5101  	return h.CopyOutN(cc, addr, h.SizeBytes())
  5102  }
  5103  
  5104  // CopyIn implements marshal.Marshallable.CopyIn.
  5105  func (h *Handle) CopyIn(cc marshal.CopyContext, addr hostarch.Addr) (int, error) {
  5106  	// Construct a slice backed by dst's underlying memory.
  5107  	var buf []byte
  5108  	hdr := (*reflect.SliceHeader)(unsafe.Pointer(&buf))
  5109  	hdr.Data = uintptr(gohacks.Noescape(unsafe.Pointer(h)))
  5110  	hdr.Len = h.SizeBytes()
  5111  	hdr.Cap = h.SizeBytes()
  5112  
  5113  	length, err := cc.CopyInBytes(addr, buf) // escapes: okay.
  5114  	// Since we bypassed the compiler's escape analysis, indicate that h
  5115  	// must live until the use above.
  5116  	runtime.KeepAlive(h) // escapes: replaced by intrinsic.
  5117  	return length, err
  5118  }
  5119  
  5120  // WriteTo implements io.WriterTo.WriteTo.
  5121  func (h *Handle) WriteTo(writer io.Writer) (int64, error) {
  5122  	// Construct a slice backed by dst's underlying memory.
  5123  	var buf []byte
  5124  	hdr := (*reflect.SliceHeader)(unsafe.Pointer(&buf))
  5125  	hdr.Data = uintptr(gohacks.Noescape(unsafe.Pointer(h)))
  5126  	hdr.Len = h.SizeBytes()
  5127  	hdr.Cap = h.SizeBytes()
  5128  
  5129  	length, err := writer.Write(buf)
  5130  	// Since we bypassed the compiler's escape analysis, indicate that h
  5131  	// must live until the use above.
  5132  	runtime.KeepAlive(h) // escapes: replaced by intrinsic.
  5133  	return int64(length), err
  5134  }
  5135  
  5136  // SizeBytes implements marshal.Marshallable.SizeBytes.
  5137  //
  5138  //go:nosplit
  5139  func (p *P64) SizeBytes() int {
  5140  	return 8
  5141  }
  5142  
  5143  // MarshalBytes implements marshal.Marshallable.MarshalBytes.
  5144  func (p *P64) MarshalBytes(dst []byte) []byte {
  5145  	hostarch.ByteOrder.PutUint64(dst[:8], uint64(*p))
  5146  	return dst[8:]
  5147  }
  5148  
  5149  // UnmarshalBytes implements marshal.Marshallable.UnmarshalBytes.
  5150  func (p *P64) UnmarshalBytes(src []byte) []byte {
  5151  	*p = P64(uint64(hostarch.ByteOrder.Uint64(src[:8])))
  5152  	return src[8:]
  5153  }
  5154  
  5155  // Packed implements marshal.Marshallable.Packed.
  5156  //
  5157  //go:nosplit
  5158  func (p *P64) Packed() bool {
  5159  	// Scalar newtypes are always packed.
  5160  	return true
  5161  }
  5162  
  5163  // MarshalUnsafe implements marshal.Marshallable.MarshalUnsafe.
  5164  func (p *P64) MarshalUnsafe(dst []byte) []byte {
  5165  	size := p.SizeBytes()
  5166  	gohacks.Memmove(unsafe.Pointer(&dst[0]), unsafe.Pointer(p), uintptr(size))
  5167  	return dst[size:]
  5168  }
  5169  
  5170  // UnmarshalUnsafe implements marshal.Marshallable.UnmarshalUnsafe.
  5171  func (p *P64) UnmarshalUnsafe(src []byte) []byte {
  5172  	size := p.SizeBytes()
  5173  	gohacks.Memmove(unsafe.Pointer(p), unsafe.Pointer(&src[0]), uintptr(size))
  5174  	return src[size:]
  5175  }
  5176  
  5177  // CopyOutN implements marshal.Marshallable.CopyOutN.
  5178  func (p *P64) CopyOutN(cc marshal.CopyContext, addr hostarch.Addr, limit int) (int, error) {
  5179  	// Construct a slice backed by dst's underlying memory.
  5180  	var buf []byte
  5181  	hdr := (*reflect.SliceHeader)(unsafe.Pointer(&buf))
  5182  	hdr.Data = uintptr(gohacks.Noescape(unsafe.Pointer(p)))
  5183  	hdr.Len = p.SizeBytes()
  5184  	hdr.Cap = p.SizeBytes()
  5185  
  5186  	length, err := cc.CopyOutBytes(addr, buf[:limit]) // escapes: okay.
  5187  	// Since we bypassed the compiler's escape analysis, indicate that p
  5188  	// must live until the use above.
  5189  	runtime.KeepAlive(p) // escapes: replaced by intrinsic.
  5190  	return length, err
  5191  }
  5192  
  5193  // CopyOut implements marshal.Marshallable.CopyOut.
  5194  func (p *P64) CopyOut(cc marshal.CopyContext, addr hostarch.Addr) (int, error) {
  5195  	return p.CopyOutN(cc, addr, p.SizeBytes())
  5196  }
  5197  
  5198  // CopyIn implements marshal.Marshallable.CopyIn.
  5199  func (p *P64) CopyIn(cc marshal.CopyContext, addr hostarch.Addr) (int, error) {
  5200  	// Construct a slice backed by dst's underlying memory.
  5201  	var buf []byte
  5202  	hdr := (*reflect.SliceHeader)(unsafe.Pointer(&buf))
  5203  	hdr.Data = uintptr(gohacks.Noescape(unsafe.Pointer(p)))
  5204  	hdr.Len = p.SizeBytes()
  5205  	hdr.Cap = p.SizeBytes()
  5206  
  5207  	length, err := cc.CopyInBytes(addr, buf) // escapes: okay.
  5208  	// Since we bypassed the compiler's escape analysis, indicate that p
  5209  	// must live until the use above.
  5210  	runtime.KeepAlive(p) // escapes: replaced by intrinsic.
  5211  	return length, err
  5212  }
  5213  
  5214  // WriteTo implements io.WriterTo.WriteTo.
  5215  func (p *P64) WriteTo(writer io.Writer) (int64, error) {
  5216  	// Construct a slice backed by dst's underlying memory.
  5217  	var buf []byte
  5218  	hdr := (*reflect.SliceHeader)(unsafe.Pointer(&buf))
  5219  	hdr.Data = uintptr(gohacks.Noescape(unsafe.Pointer(p)))
  5220  	hdr.Len = p.SizeBytes()
  5221  	hdr.Cap = p.SizeBytes()
  5222  
  5223  	length, err := writer.Write(buf)
  5224  	// Since we bypassed the compiler's escape analysis, indicate that p
  5225  	// must live until the use above.
  5226  	runtime.KeepAlive(p) // escapes: replaced by intrinsic.
  5227  	return int64(length), err
  5228  }
  5229  
  5230  // SizeBytes implements marshal.Marshallable.SizeBytes.
  5231  func (r *RS_ACCESS_MASK) SizeBytes() int {
  5232  	return 0 +
  5233  		4*SDK_RS_ACCESS_MAX_LIMBS
  5234  }
  5235  
  5236  // MarshalBytes implements marshal.Marshallable.MarshalBytes.
  5237  func (r *RS_ACCESS_MASK) MarshalBytes(dst []byte) []byte {
  5238  	for idx := 0; idx < SDK_RS_ACCESS_MAX_LIMBS; idx++ {
  5239  		hostarch.ByteOrder.PutUint32(dst[:4], uint32(r.Limbs[idx]))
  5240  		dst = dst[4:]
  5241  	}
  5242  	return dst
  5243  }
  5244  
  5245  // UnmarshalBytes implements marshal.Marshallable.UnmarshalBytes.
  5246  func (r *RS_ACCESS_MASK) UnmarshalBytes(src []byte) []byte {
  5247  	for idx := 0; idx < SDK_RS_ACCESS_MAX_LIMBS; idx++ {
  5248  		r.Limbs[idx] = uint32(hostarch.ByteOrder.Uint32(src[:4]))
  5249  		src = src[4:]
  5250  	}
  5251  	return src
  5252  }
  5253  
  5254  // Packed implements marshal.Marshallable.Packed.
  5255  //
  5256  //go:nosplit
  5257  func (r *RS_ACCESS_MASK) Packed() bool {
  5258  	return true
  5259  }
  5260  
  5261  // MarshalUnsafe implements marshal.Marshallable.MarshalUnsafe.
  5262  func (r *RS_ACCESS_MASK) MarshalUnsafe(dst []byte) []byte {
  5263  	size := r.SizeBytes()
  5264  	gohacks.Memmove(unsafe.Pointer(&dst[0]), unsafe.Pointer(r), uintptr(size))
  5265  	return dst[size:]
  5266  }
  5267  
  5268  // UnmarshalUnsafe implements marshal.Marshallable.UnmarshalUnsafe.
  5269  func (r *RS_ACCESS_MASK) UnmarshalUnsafe(src []byte) []byte {
  5270  	size := r.SizeBytes()
  5271  	gohacks.Memmove(unsafe.Pointer(r), unsafe.Pointer(&src[0]), uintptr(size))
  5272  	return src[size:]
  5273  }
  5274  
  5275  // CopyOutN implements marshal.Marshallable.CopyOutN.
  5276  func (r *RS_ACCESS_MASK) CopyOutN(cc marshal.CopyContext, addr hostarch.Addr, limit int) (int, error) {
  5277  	// Construct a slice backed by dst's underlying memory.
  5278  	var buf []byte
  5279  	hdr := (*reflect.SliceHeader)(unsafe.Pointer(&buf))
  5280  	hdr.Data = uintptr(gohacks.Noescape(unsafe.Pointer(r)))
  5281  	hdr.Len = r.SizeBytes()
  5282  	hdr.Cap = r.SizeBytes()
  5283  
  5284  	length, err := cc.CopyOutBytes(addr, buf[:limit]) // escapes: okay.
  5285  	// Since we bypassed the compiler's escape analysis, indicate that r
  5286  	// must live until the use above.
  5287  	runtime.KeepAlive(r) // escapes: replaced by intrinsic.
  5288  	return length, err
  5289  }
  5290  
  5291  // CopyOut implements marshal.Marshallable.CopyOut.
  5292  func (r *RS_ACCESS_MASK) CopyOut(cc marshal.CopyContext, addr hostarch.Addr) (int, error) {
  5293  	return r.CopyOutN(cc, addr, r.SizeBytes())
  5294  }
  5295  
  5296  // CopyIn implements marshal.Marshallable.CopyIn.
  5297  func (r *RS_ACCESS_MASK) CopyIn(cc marshal.CopyContext, addr hostarch.Addr) (int, error) {
  5298  	// Construct a slice backed by dst's underlying memory.
  5299  	var buf []byte
  5300  	hdr := (*reflect.SliceHeader)(unsafe.Pointer(&buf))
  5301  	hdr.Data = uintptr(gohacks.Noescape(unsafe.Pointer(r)))
  5302  	hdr.Len = r.SizeBytes()
  5303  	hdr.Cap = r.SizeBytes()
  5304  
  5305  	length, err := cc.CopyInBytes(addr, buf) // escapes: okay.
  5306  	// Since we bypassed the compiler's escape analysis, indicate that r
  5307  	// must live until the use above.
  5308  	runtime.KeepAlive(r) // escapes: replaced by intrinsic.
  5309  	return length, err
  5310  }
  5311  
  5312  // WriteTo implements io.WriterTo.WriteTo.
  5313  func (r *RS_ACCESS_MASK) WriteTo(writer io.Writer) (int64, error) {
  5314  	// Construct a slice backed by dst's underlying memory.
  5315  	var buf []byte
  5316  	hdr := (*reflect.SliceHeader)(unsafe.Pointer(&buf))
  5317  	hdr.Data = uintptr(gohacks.Noescape(unsafe.Pointer(r)))
  5318  	hdr.Len = r.SizeBytes()
  5319  	hdr.Cap = r.SizeBytes()
  5320  
  5321  	length, err := writer.Write(buf)
  5322  	// Since we bypassed the compiler's escape analysis, indicate that r
  5323  	// must live until the use above.
  5324  	runtime.KeepAlive(r) // escapes: replaced by intrinsic.
  5325  	return int64(length), err
  5326  }
  5327  
  5328  // SizeBytes implements marshal.Marshallable.SizeBytes.
  5329  func (r *RS_SHARE_POLICY) SizeBytes() int {
  5330  	return 7 +
  5331  		(*RS_ACCESS_MASK)(nil).SizeBytes() +
  5332  		1*1
  5333  }
  5334  
  5335  // MarshalBytes implements marshal.Marshallable.MarshalBytes.
  5336  func (r *RS_SHARE_POLICY) MarshalBytes(dst []byte) []byte {
  5337  	hostarch.ByteOrder.PutUint32(dst[:4], uint32(r.Target))
  5338  	dst = dst[4:]
  5339  	dst = r.AccessMask.MarshalUnsafe(dst)
  5340  	hostarch.ByteOrder.PutUint16(dst[:2], uint16(r.Type))
  5341  	dst = dst[2:]
  5342  	dst[0] = byte(r.Action)
  5343  	dst = dst[1:]
  5344  	for idx := 0; idx < 1; idx++ {
  5345  		dst[0] = byte(r.Pad[idx])
  5346  		dst = dst[1:]
  5347  	}
  5348  	return dst
  5349  }
  5350  
  5351  // UnmarshalBytes implements marshal.Marshallable.UnmarshalBytes.
  5352  func (r *RS_SHARE_POLICY) UnmarshalBytes(src []byte) []byte {
  5353  	r.Target = uint32(hostarch.ByteOrder.Uint32(src[:4]))
  5354  	src = src[4:]
  5355  	src = r.AccessMask.UnmarshalUnsafe(src)
  5356  	r.Type = uint16(hostarch.ByteOrder.Uint16(src[:2]))
  5357  	src = src[2:]
  5358  	r.Action = uint8(src[0])
  5359  	src = src[1:]
  5360  	for idx := 0; idx < 1; idx++ {
  5361  		r.Pad[idx] = src[0]
  5362  		src = src[1:]
  5363  	}
  5364  	return src
  5365  }
  5366  
  5367  // Packed implements marshal.Marshallable.Packed.
  5368  //
  5369  //go:nosplit
  5370  func (r *RS_SHARE_POLICY) Packed() bool {
  5371  	return r.AccessMask.Packed()
  5372  }
  5373  
  5374  // MarshalUnsafe implements marshal.Marshallable.MarshalUnsafe.
  5375  func (r *RS_SHARE_POLICY) MarshalUnsafe(dst []byte) []byte {
  5376  	if r.AccessMask.Packed() {
  5377  		size := r.SizeBytes()
  5378  		gohacks.Memmove(unsafe.Pointer(&dst[0]), unsafe.Pointer(r), uintptr(size))
  5379  		return dst[size:]
  5380  	}
  5381  	// Type RS_SHARE_POLICY doesn't have a packed layout in memory, fallback to MarshalBytes.
  5382  	return r.MarshalBytes(dst)
  5383  }
  5384  
  5385  // UnmarshalUnsafe implements marshal.Marshallable.UnmarshalUnsafe.
  5386  func (r *RS_SHARE_POLICY) UnmarshalUnsafe(src []byte) []byte {
  5387  	if r.AccessMask.Packed() {
  5388  		size := r.SizeBytes()
  5389  		gohacks.Memmove(unsafe.Pointer(r), unsafe.Pointer(&src[0]), uintptr(size))
  5390  		return src[size:]
  5391  	}
  5392  	// Type RS_SHARE_POLICY doesn't have a packed layout in memory, fallback to UnmarshalBytes.
  5393  	return r.UnmarshalBytes(src)
  5394  }
  5395  
  5396  // CopyOutN implements marshal.Marshallable.CopyOutN.
  5397  func (r *RS_SHARE_POLICY) CopyOutN(cc marshal.CopyContext, addr hostarch.Addr, limit int) (int, error) {
  5398  	if !r.AccessMask.Packed() {
  5399  		// Type RS_SHARE_POLICY doesn't have a packed layout in memory, fall back to MarshalBytes.
  5400  		buf := cc.CopyScratchBuffer(r.SizeBytes()) // escapes: okay.
  5401  		r.MarshalBytes(buf)                        // escapes: fallback.
  5402  		return cc.CopyOutBytes(addr, buf[:limit])  // escapes: okay.
  5403  	}
  5404  
  5405  	// Construct a slice backed by dst's underlying memory.
  5406  	var buf []byte
  5407  	hdr := (*reflect.SliceHeader)(unsafe.Pointer(&buf))
  5408  	hdr.Data = uintptr(gohacks.Noescape(unsafe.Pointer(r)))
  5409  	hdr.Len = r.SizeBytes()
  5410  	hdr.Cap = r.SizeBytes()
  5411  
  5412  	length, err := cc.CopyOutBytes(addr, buf[:limit]) // escapes: okay.
  5413  	// Since we bypassed the compiler's escape analysis, indicate that r
  5414  	// must live until the use above.
  5415  	runtime.KeepAlive(r) // escapes: replaced by intrinsic.
  5416  	return length, err
  5417  }
  5418  
  5419  // CopyOut implements marshal.Marshallable.CopyOut.
  5420  func (r *RS_SHARE_POLICY) CopyOut(cc marshal.CopyContext, addr hostarch.Addr) (int, error) {
  5421  	return r.CopyOutN(cc, addr, r.SizeBytes())
  5422  }
  5423  
  5424  // CopyIn implements marshal.Marshallable.CopyIn.
  5425  func (r *RS_SHARE_POLICY) CopyIn(cc marshal.CopyContext, addr hostarch.Addr) (int, error) {
  5426  	if !r.AccessMask.Packed() {
  5427  		// Type RS_SHARE_POLICY doesn't have a packed layout in memory, fall back to UnmarshalBytes.
  5428  		buf := cc.CopyScratchBuffer(r.SizeBytes()) // escapes: okay.
  5429  		length, err := cc.CopyInBytes(addr, buf)   // escapes: okay.
  5430  		// Unmarshal unconditionally. If we had a short copy-in, this results in a
  5431  		// partially unmarshalled struct.
  5432  		r.UnmarshalBytes(buf) // escapes: fallback.
  5433  		return length, err
  5434  	}
  5435  
  5436  	// Construct a slice backed by dst's underlying memory.
  5437  	var buf []byte
  5438  	hdr := (*reflect.SliceHeader)(unsafe.Pointer(&buf))
  5439  	hdr.Data = uintptr(gohacks.Noescape(unsafe.Pointer(r)))
  5440  	hdr.Len = r.SizeBytes()
  5441  	hdr.Cap = r.SizeBytes()
  5442  
  5443  	length, err := cc.CopyInBytes(addr, buf) // escapes: okay.
  5444  	// Since we bypassed the compiler's escape analysis, indicate that r
  5445  	// must live until the use above.
  5446  	runtime.KeepAlive(r) // escapes: replaced by intrinsic.
  5447  	return length, err
  5448  }
  5449  
  5450  // WriteTo implements io.WriterTo.WriteTo.
  5451  func (r *RS_SHARE_POLICY) WriteTo(writer io.Writer) (int64, error) {
  5452  	if !r.AccessMask.Packed() {
  5453  		// Type RS_SHARE_POLICY doesn't have a packed layout in memory, fall back to MarshalBytes.
  5454  		buf := make([]byte, r.SizeBytes())
  5455  		r.MarshalBytes(buf)
  5456  		length, err := writer.Write(buf)
  5457  		return int64(length), err
  5458  	}
  5459  
  5460  	// Construct a slice backed by dst's underlying memory.
  5461  	var buf []byte
  5462  	hdr := (*reflect.SliceHeader)(unsafe.Pointer(&buf))
  5463  	hdr.Data = uintptr(gohacks.Noescape(unsafe.Pointer(r)))
  5464  	hdr.Len = r.SizeBytes()
  5465  	hdr.Cap = r.SizeBytes()
  5466  
  5467  	length, err := writer.Write(buf)
  5468  	// Since we bypassed the compiler's escape analysis, indicate that r
  5469  	// must live until the use above.
  5470  	runtime.KeepAlive(r) // escapes: replaced by intrinsic.
  5471  	return int64(length), err
  5472  }
  5473  
  5474  // SizeBytes implements marshal.Marshallable.SizeBytes.
  5475  func (u *UVM_ALLOC_SEMAPHORE_POOL_PARAMS) SizeBytes() int {
  5476  	return 28 +
  5477  		(*UvmGpuMappingAttributes)(nil).SizeBytes()*UVM_MAX_GPUS +
  5478  		1*4
  5479  }
  5480  
  5481  // MarshalBytes implements marshal.Marshallable.MarshalBytes.
  5482  func (u *UVM_ALLOC_SEMAPHORE_POOL_PARAMS) MarshalBytes(dst []byte) []byte {
  5483  	hostarch.ByteOrder.PutUint64(dst[:8], uint64(u.Base))
  5484  	dst = dst[8:]
  5485  	hostarch.ByteOrder.PutUint64(dst[:8], uint64(u.Length))
  5486  	dst = dst[8:]
  5487  	for idx := 0; idx < UVM_MAX_GPUS; idx++ {
  5488  		dst = u.PerGPUAttributes[idx].MarshalUnsafe(dst)
  5489  	}
  5490  	hostarch.ByteOrder.PutUint64(dst[:8], uint64(u.GPUAttributesCount))
  5491  	dst = dst[8:]
  5492  	hostarch.ByteOrder.PutUint32(dst[:4], uint32(u.RMStatus))
  5493  	dst = dst[4:]
  5494  	for idx := 0; idx < 4; idx++ {
  5495  		dst[0] = byte(u.Pad0[idx])
  5496  		dst = dst[1:]
  5497  	}
  5498  	return dst
  5499  }
  5500  
  5501  // UnmarshalBytes implements marshal.Marshallable.UnmarshalBytes.
  5502  func (u *UVM_ALLOC_SEMAPHORE_POOL_PARAMS) UnmarshalBytes(src []byte) []byte {
  5503  	u.Base = uint64(hostarch.ByteOrder.Uint64(src[:8]))
  5504  	src = src[8:]
  5505  	u.Length = uint64(hostarch.ByteOrder.Uint64(src[:8]))
  5506  	src = src[8:]
  5507  	for idx := 0; idx < UVM_MAX_GPUS; idx++ {
  5508  		src = u.PerGPUAttributes[idx].UnmarshalUnsafe(src)
  5509  	}
  5510  	u.GPUAttributesCount = uint64(hostarch.ByteOrder.Uint64(src[:8]))
  5511  	src = src[8:]
  5512  	u.RMStatus = uint32(hostarch.ByteOrder.Uint32(src[:4]))
  5513  	src = src[4:]
  5514  	for idx := 0; idx < 4; idx++ {
  5515  		u.Pad0[idx] = src[0]
  5516  		src = src[1:]
  5517  	}
  5518  	return src
  5519  }
  5520  
  5521  // Packed implements marshal.Marshallable.Packed.
  5522  //
  5523  //go:nosplit
  5524  func (u *UVM_ALLOC_SEMAPHORE_POOL_PARAMS) Packed() bool {
  5525  	return u.PerGPUAttributes[0].Packed()
  5526  }
  5527  
  5528  // MarshalUnsafe implements marshal.Marshallable.MarshalUnsafe.
  5529  func (u *UVM_ALLOC_SEMAPHORE_POOL_PARAMS) MarshalUnsafe(dst []byte) []byte {
  5530  	if u.PerGPUAttributes[0].Packed() {
  5531  		size := u.SizeBytes()
  5532  		gohacks.Memmove(unsafe.Pointer(&dst[0]), unsafe.Pointer(u), uintptr(size))
  5533  		return dst[size:]
  5534  	}
  5535  	// Type UVM_ALLOC_SEMAPHORE_POOL_PARAMS doesn't have a packed layout in memory, fallback to MarshalBytes.
  5536  	return u.MarshalBytes(dst)
  5537  }
  5538  
  5539  // UnmarshalUnsafe implements marshal.Marshallable.UnmarshalUnsafe.
  5540  func (u *UVM_ALLOC_SEMAPHORE_POOL_PARAMS) UnmarshalUnsafe(src []byte) []byte {
  5541  	if u.PerGPUAttributes[0].Packed() {
  5542  		size := u.SizeBytes()
  5543  		gohacks.Memmove(unsafe.Pointer(u), unsafe.Pointer(&src[0]), uintptr(size))
  5544  		return src[size:]
  5545  	}
  5546  	// Type UVM_ALLOC_SEMAPHORE_POOL_PARAMS doesn't have a packed layout in memory, fallback to UnmarshalBytes.
  5547  	return u.UnmarshalBytes(src)
  5548  }
  5549  
  5550  // CopyOutN implements marshal.Marshallable.CopyOutN.
  5551  func (u *UVM_ALLOC_SEMAPHORE_POOL_PARAMS) CopyOutN(cc marshal.CopyContext, addr hostarch.Addr, limit int) (int, error) {
  5552  	if !u.PerGPUAttributes[0].Packed() {
  5553  		// Type UVM_ALLOC_SEMAPHORE_POOL_PARAMS doesn't have a packed layout in memory, fall back to MarshalBytes.
  5554  		buf := cc.CopyScratchBuffer(u.SizeBytes()) // escapes: okay.
  5555  		u.MarshalBytes(buf)                        // escapes: fallback.
  5556  		return cc.CopyOutBytes(addr, buf[:limit])  // escapes: okay.
  5557  	}
  5558  
  5559  	// Construct a slice backed by dst's underlying memory.
  5560  	var buf []byte
  5561  	hdr := (*reflect.SliceHeader)(unsafe.Pointer(&buf))
  5562  	hdr.Data = uintptr(gohacks.Noescape(unsafe.Pointer(u)))
  5563  	hdr.Len = u.SizeBytes()
  5564  	hdr.Cap = u.SizeBytes()
  5565  
  5566  	length, err := cc.CopyOutBytes(addr, buf[:limit]) // escapes: okay.
  5567  	// Since we bypassed the compiler's escape analysis, indicate that u
  5568  	// must live until the use above.
  5569  	runtime.KeepAlive(u) // escapes: replaced by intrinsic.
  5570  	return length, err
  5571  }
  5572  
  5573  // CopyOut implements marshal.Marshallable.CopyOut.
  5574  func (u *UVM_ALLOC_SEMAPHORE_POOL_PARAMS) CopyOut(cc marshal.CopyContext, addr hostarch.Addr) (int, error) {
  5575  	return u.CopyOutN(cc, addr, u.SizeBytes())
  5576  }
  5577  
  5578  // CopyIn implements marshal.Marshallable.CopyIn.
  5579  func (u *UVM_ALLOC_SEMAPHORE_POOL_PARAMS) CopyIn(cc marshal.CopyContext, addr hostarch.Addr) (int, error) {
  5580  	if !u.PerGPUAttributes[0].Packed() {
  5581  		// Type UVM_ALLOC_SEMAPHORE_POOL_PARAMS doesn't have a packed layout in memory, fall back to UnmarshalBytes.
  5582  		buf := cc.CopyScratchBuffer(u.SizeBytes()) // escapes: okay.
  5583  		length, err := cc.CopyInBytes(addr, buf)   // escapes: okay.
  5584  		// Unmarshal unconditionally. If we had a short copy-in, this results in a
  5585  		// partially unmarshalled struct.
  5586  		u.UnmarshalBytes(buf) // escapes: fallback.
  5587  		return length, err
  5588  	}
  5589  
  5590  	// Construct a slice backed by dst's underlying memory.
  5591  	var buf []byte
  5592  	hdr := (*reflect.SliceHeader)(unsafe.Pointer(&buf))
  5593  	hdr.Data = uintptr(gohacks.Noescape(unsafe.Pointer(u)))
  5594  	hdr.Len = u.SizeBytes()
  5595  	hdr.Cap = u.SizeBytes()
  5596  
  5597  	length, err := cc.CopyInBytes(addr, buf) // escapes: okay.
  5598  	// Since we bypassed the compiler's escape analysis, indicate that u
  5599  	// must live until the use above.
  5600  	runtime.KeepAlive(u) // escapes: replaced by intrinsic.
  5601  	return length, err
  5602  }
  5603  
  5604  // WriteTo implements io.WriterTo.WriteTo.
  5605  func (u *UVM_ALLOC_SEMAPHORE_POOL_PARAMS) WriteTo(writer io.Writer) (int64, error) {
  5606  	if !u.PerGPUAttributes[0].Packed() {
  5607  		// Type UVM_ALLOC_SEMAPHORE_POOL_PARAMS doesn't have a packed layout in memory, fall back to MarshalBytes.
  5608  		buf := make([]byte, u.SizeBytes())
  5609  		u.MarshalBytes(buf)
  5610  		length, err := writer.Write(buf)
  5611  		return int64(length), err
  5612  	}
  5613  
  5614  	// Construct a slice backed by dst's underlying memory.
  5615  	var buf []byte
  5616  	hdr := (*reflect.SliceHeader)(unsafe.Pointer(&buf))
  5617  	hdr.Data = uintptr(gohacks.Noescape(unsafe.Pointer(u)))
  5618  	hdr.Len = u.SizeBytes()
  5619  	hdr.Cap = u.SizeBytes()
  5620  
  5621  	length, err := writer.Write(buf)
  5622  	// Since we bypassed the compiler's escape analysis, indicate that u
  5623  	// must live until the use above.
  5624  	runtime.KeepAlive(u) // escapes: replaced by intrinsic.
  5625  	return int64(length), err
  5626  }
  5627  
  5628  // SizeBytes implements marshal.Marshallable.SizeBytes.
  5629  func (u *UVM_CREATE_EXTERNAL_RANGE_PARAMS) SizeBytes() int {
  5630  	return 20 +
  5631  		1*4
  5632  }
  5633  
  5634  // MarshalBytes implements marshal.Marshallable.MarshalBytes.
  5635  func (u *UVM_CREATE_EXTERNAL_RANGE_PARAMS) MarshalBytes(dst []byte) []byte {
  5636  	hostarch.ByteOrder.PutUint64(dst[:8], uint64(u.Base))
  5637  	dst = dst[8:]
  5638  	hostarch.ByteOrder.PutUint64(dst[:8], uint64(u.Length))
  5639  	dst = dst[8:]
  5640  	hostarch.ByteOrder.PutUint32(dst[:4], uint32(u.RMStatus))
  5641  	dst = dst[4:]
  5642  	for idx := 0; idx < 4; idx++ {
  5643  		dst[0] = byte(u.Pad0[idx])
  5644  		dst = dst[1:]
  5645  	}
  5646  	return dst
  5647  }
  5648  
  5649  // UnmarshalBytes implements marshal.Marshallable.UnmarshalBytes.
  5650  func (u *UVM_CREATE_EXTERNAL_RANGE_PARAMS) UnmarshalBytes(src []byte) []byte {
  5651  	u.Base = uint64(hostarch.ByteOrder.Uint64(src[:8]))
  5652  	src = src[8:]
  5653  	u.Length = uint64(hostarch.ByteOrder.Uint64(src[:8]))
  5654  	src = src[8:]
  5655  	u.RMStatus = uint32(hostarch.ByteOrder.Uint32(src[:4]))
  5656  	src = src[4:]
  5657  	for idx := 0; idx < 4; idx++ {
  5658  		u.Pad0[idx] = src[0]
  5659  		src = src[1:]
  5660  	}
  5661  	return src
  5662  }
  5663  
  5664  // Packed implements marshal.Marshallable.Packed.
  5665  //
  5666  //go:nosplit
  5667  func (u *UVM_CREATE_EXTERNAL_RANGE_PARAMS) Packed() bool {
  5668  	return true
  5669  }
  5670  
  5671  // MarshalUnsafe implements marshal.Marshallable.MarshalUnsafe.
  5672  func (u *UVM_CREATE_EXTERNAL_RANGE_PARAMS) MarshalUnsafe(dst []byte) []byte {
  5673  	size := u.SizeBytes()
  5674  	gohacks.Memmove(unsafe.Pointer(&dst[0]), unsafe.Pointer(u), uintptr(size))
  5675  	return dst[size:]
  5676  }
  5677  
  5678  // UnmarshalUnsafe implements marshal.Marshallable.UnmarshalUnsafe.
  5679  func (u *UVM_CREATE_EXTERNAL_RANGE_PARAMS) UnmarshalUnsafe(src []byte) []byte {
  5680  	size := u.SizeBytes()
  5681  	gohacks.Memmove(unsafe.Pointer(u), unsafe.Pointer(&src[0]), uintptr(size))
  5682  	return src[size:]
  5683  }
  5684  
  5685  // CopyOutN implements marshal.Marshallable.CopyOutN.
  5686  func (u *UVM_CREATE_EXTERNAL_RANGE_PARAMS) CopyOutN(cc marshal.CopyContext, addr hostarch.Addr, limit int) (int, error) {
  5687  	// Construct a slice backed by dst's underlying memory.
  5688  	var buf []byte
  5689  	hdr := (*reflect.SliceHeader)(unsafe.Pointer(&buf))
  5690  	hdr.Data = uintptr(gohacks.Noescape(unsafe.Pointer(u)))
  5691  	hdr.Len = u.SizeBytes()
  5692  	hdr.Cap = u.SizeBytes()
  5693  
  5694  	length, err := cc.CopyOutBytes(addr, buf[:limit]) // escapes: okay.
  5695  	// Since we bypassed the compiler's escape analysis, indicate that u
  5696  	// must live until the use above.
  5697  	runtime.KeepAlive(u) // escapes: replaced by intrinsic.
  5698  	return length, err
  5699  }
  5700  
  5701  // CopyOut implements marshal.Marshallable.CopyOut.
  5702  func (u *UVM_CREATE_EXTERNAL_RANGE_PARAMS) CopyOut(cc marshal.CopyContext, addr hostarch.Addr) (int, error) {
  5703  	return u.CopyOutN(cc, addr, u.SizeBytes())
  5704  }
  5705  
  5706  // CopyIn implements marshal.Marshallable.CopyIn.
  5707  func (u *UVM_CREATE_EXTERNAL_RANGE_PARAMS) CopyIn(cc marshal.CopyContext, addr hostarch.Addr) (int, error) {
  5708  	// Construct a slice backed by dst's underlying memory.
  5709  	var buf []byte
  5710  	hdr := (*reflect.SliceHeader)(unsafe.Pointer(&buf))
  5711  	hdr.Data = uintptr(gohacks.Noescape(unsafe.Pointer(u)))
  5712  	hdr.Len = u.SizeBytes()
  5713  	hdr.Cap = u.SizeBytes()
  5714  
  5715  	length, err := cc.CopyInBytes(addr, buf) // escapes: okay.
  5716  	// Since we bypassed the compiler's escape analysis, indicate that u
  5717  	// must live until the use above.
  5718  	runtime.KeepAlive(u) // escapes: replaced by intrinsic.
  5719  	return length, err
  5720  }
  5721  
  5722  // WriteTo implements io.WriterTo.WriteTo.
  5723  func (u *UVM_CREATE_EXTERNAL_RANGE_PARAMS) WriteTo(writer io.Writer) (int64, error) {
  5724  	// Construct a slice backed by dst's underlying memory.
  5725  	var buf []byte
  5726  	hdr := (*reflect.SliceHeader)(unsafe.Pointer(&buf))
  5727  	hdr.Data = uintptr(gohacks.Noescape(unsafe.Pointer(u)))
  5728  	hdr.Len = u.SizeBytes()
  5729  	hdr.Cap = u.SizeBytes()
  5730  
  5731  	length, err := writer.Write(buf)
  5732  	// Since we bypassed the compiler's escape analysis, indicate that u
  5733  	// must live until the use above.
  5734  	runtime.KeepAlive(u) // escapes: replaced by intrinsic.
  5735  	return int64(length), err
  5736  }
  5737  
  5738  // SizeBytes implements marshal.Marshallable.SizeBytes.
  5739  func (u *UVM_CREATE_RANGE_GROUP_PARAMS) SizeBytes() int {
  5740  	return 12 +
  5741  		1*4
  5742  }
  5743  
  5744  // MarshalBytes implements marshal.Marshallable.MarshalBytes.
  5745  func (u *UVM_CREATE_RANGE_GROUP_PARAMS) MarshalBytes(dst []byte) []byte {
  5746  	hostarch.ByteOrder.PutUint64(dst[:8], uint64(u.RangeGroupID))
  5747  	dst = dst[8:]
  5748  	hostarch.ByteOrder.PutUint32(dst[:4], uint32(u.RMStatus))
  5749  	dst = dst[4:]
  5750  	for idx := 0; idx < 4; idx++ {
  5751  		dst[0] = byte(u.Pad0[idx])
  5752  		dst = dst[1:]
  5753  	}
  5754  	return dst
  5755  }
  5756  
  5757  // UnmarshalBytes implements marshal.Marshallable.UnmarshalBytes.
  5758  func (u *UVM_CREATE_RANGE_GROUP_PARAMS) UnmarshalBytes(src []byte) []byte {
  5759  	u.RangeGroupID = uint64(hostarch.ByteOrder.Uint64(src[:8]))
  5760  	src = src[8:]
  5761  	u.RMStatus = uint32(hostarch.ByteOrder.Uint32(src[:4]))
  5762  	src = src[4:]
  5763  	for idx := 0; idx < 4; idx++ {
  5764  		u.Pad0[idx] = src[0]
  5765  		src = src[1:]
  5766  	}
  5767  	return src
  5768  }
  5769  
  5770  // Packed implements marshal.Marshallable.Packed.
  5771  //
  5772  //go:nosplit
  5773  func (u *UVM_CREATE_RANGE_GROUP_PARAMS) Packed() bool {
  5774  	return true
  5775  }
  5776  
  5777  // MarshalUnsafe implements marshal.Marshallable.MarshalUnsafe.
  5778  func (u *UVM_CREATE_RANGE_GROUP_PARAMS) MarshalUnsafe(dst []byte) []byte {
  5779  	size := u.SizeBytes()
  5780  	gohacks.Memmove(unsafe.Pointer(&dst[0]), unsafe.Pointer(u), uintptr(size))
  5781  	return dst[size:]
  5782  }
  5783  
  5784  // UnmarshalUnsafe implements marshal.Marshallable.UnmarshalUnsafe.
  5785  func (u *UVM_CREATE_RANGE_GROUP_PARAMS) UnmarshalUnsafe(src []byte) []byte {
  5786  	size := u.SizeBytes()
  5787  	gohacks.Memmove(unsafe.Pointer(u), unsafe.Pointer(&src[0]), uintptr(size))
  5788  	return src[size:]
  5789  }
  5790  
  5791  // CopyOutN implements marshal.Marshallable.CopyOutN.
  5792  func (u *UVM_CREATE_RANGE_GROUP_PARAMS) CopyOutN(cc marshal.CopyContext, addr hostarch.Addr, limit int) (int, error) {
  5793  	// Construct a slice backed by dst's underlying memory.
  5794  	var buf []byte
  5795  	hdr := (*reflect.SliceHeader)(unsafe.Pointer(&buf))
  5796  	hdr.Data = uintptr(gohacks.Noescape(unsafe.Pointer(u)))
  5797  	hdr.Len = u.SizeBytes()
  5798  	hdr.Cap = u.SizeBytes()
  5799  
  5800  	length, err := cc.CopyOutBytes(addr, buf[:limit]) // escapes: okay.
  5801  	// Since we bypassed the compiler's escape analysis, indicate that u
  5802  	// must live until the use above.
  5803  	runtime.KeepAlive(u) // escapes: replaced by intrinsic.
  5804  	return length, err
  5805  }
  5806  
  5807  // CopyOut implements marshal.Marshallable.CopyOut.
  5808  func (u *UVM_CREATE_RANGE_GROUP_PARAMS) CopyOut(cc marshal.CopyContext, addr hostarch.Addr) (int, error) {
  5809  	return u.CopyOutN(cc, addr, u.SizeBytes())
  5810  }
  5811  
  5812  // CopyIn implements marshal.Marshallable.CopyIn.
  5813  func (u *UVM_CREATE_RANGE_GROUP_PARAMS) CopyIn(cc marshal.CopyContext, addr hostarch.Addr) (int, error) {
  5814  	// Construct a slice backed by dst's underlying memory.
  5815  	var buf []byte
  5816  	hdr := (*reflect.SliceHeader)(unsafe.Pointer(&buf))
  5817  	hdr.Data = uintptr(gohacks.Noescape(unsafe.Pointer(u)))
  5818  	hdr.Len = u.SizeBytes()
  5819  	hdr.Cap = u.SizeBytes()
  5820  
  5821  	length, err := cc.CopyInBytes(addr, buf) // escapes: okay.
  5822  	// Since we bypassed the compiler's escape analysis, indicate that u
  5823  	// must live until the use above.
  5824  	runtime.KeepAlive(u) // escapes: replaced by intrinsic.
  5825  	return length, err
  5826  }
  5827  
  5828  // WriteTo implements io.WriterTo.WriteTo.
  5829  func (u *UVM_CREATE_RANGE_GROUP_PARAMS) WriteTo(writer io.Writer) (int64, error) {
  5830  	// Construct a slice backed by dst's underlying memory.
  5831  	var buf []byte
  5832  	hdr := (*reflect.SliceHeader)(unsafe.Pointer(&buf))
  5833  	hdr.Data = uintptr(gohacks.Noescape(unsafe.Pointer(u)))
  5834  	hdr.Len = u.SizeBytes()
  5835  	hdr.Cap = u.SizeBytes()
  5836  
  5837  	length, err := writer.Write(buf)
  5838  	// Since we bypassed the compiler's escape analysis, indicate that u
  5839  	// must live until the use above.
  5840  	runtime.KeepAlive(u) // escapes: replaced by intrinsic.
  5841  	return int64(length), err
  5842  }
  5843  
  5844  // SizeBytes implements marshal.Marshallable.SizeBytes.
  5845  func (u *UVM_DESTROY_RANGE_GROUP_PARAMS) SizeBytes() int {
  5846  	return 12 +
  5847  		1*4
  5848  }
  5849  
  5850  // MarshalBytes implements marshal.Marshallable.MarshalBytes.
  5851  func (u *UVM_DESTROY_RANGE_GROUP_PARAMS) MarshalBytes(dst []byte) []byte {
  5852  	hostarch.ByteOrder.PutUint64(dst[:8], uint64(u.RangeGroupID))
  5853  	dst = dst[8:]
  5854  	hostarch.ByteOrder.PutUint32(dst[:4], uint32(u.RMStatus))
  5855  	dst = dst[4:]
  5856  	for idx := 0; idx < 4; idx++ {
  5857  		dst[0] = byte(u.Pad0[idx])
  5858  		dst = dst[1:]
  5859  	}
  5860  	return dst
  5861  }
  5862  
  5863  // UnmarshalBytes implements marshal.Marshallable.UnmarshalBytes.
  5864  func (u *UVM_DESTROY_RANGE_GROUP_PARAMS) UnmarshalBytes(src []byte) []byte {
  5865  	u.RangeGroupID = uint64(hostarch.ByteOrder.Uint64(src[:8]))
  5866  	src = src[8:]
  5867  	u.RMStatus = uint32(hostarch.ByteOrder.Uint32(src[:4]))
  5868  	src = src[4:]
  5869  	for idx := 0; idx < 4; idx++ {
  5870  		u.Pad0[idx] = src[0]
  5871  		src = src[1:]
  5872  	}
  5873  	return src
  5874  }
  5875  
  5876  // Packed implements marshal.Marshallable.Packed.
  5877  //
  5878  //go:nosplit
  5879  func (u *UVM_DESTROY_RANGE_GROUP_PARAMS) Packed() bool {
  5880  	return true
  5881  }
  5882  
  5883  // MarshalUnsafe implements marshal.Marshallable.MarshalUnsafe.
  5884  func (u *UVM_DESTROY_RANGE_GROUP_PARAMS) MarshalUnsafe(dst []byte) []byte {
  5885  	size := u.SizeBytes()
  5886  	gohacks.Memmove(unsafe.Pointer(&dst[0]), unsafe.Pointer(u), uintptr(size))
  5887  	return dst[size:]
  5888  }
  5889  
  5890  // UnmarshalUnsafe implements marshal.Marshallable.UnmarshalUnsafe.
  5891  func (u *UVM_DESTROY_RANGE_GROUP_PARAMS) UnmarshalUnsafe(src []byte) []byte {
  5892  	size := u.SizeBytes()
  5893  	gohacks.Memmove(unsafe.Pointer(u), unsafe.Pointer(&src[0]), uintptr(size))
  5894  	return src[size:]
  5895  }
  5896  
  5897  // CopyOutN implements marshal.Marshallable.CopyOutN.
  5898  func (u *UVM_DESTROY_RANGE_GROUP_PARAMS) CopyOutN(cc marshal.CopyContext, addr hostarch.Addr, limit int) (int, error) {
  5899  	// Construct a slice backed by dst's underlying memory.
  5900  	var buf []byte
  5901  	hdr := (*reflect.SliceHeader)(unsafe.Pointer(&buf))
  5902  	hdr.Data = uintptr(gohacks.Noescape(unsafe.Pointer(u)))
  5903  	hdr.Len = u.SizeBytes()
  5904  	hdr.Cap = u.SizeBytes()
  5905  
  5906  	length, err := cc.CopyOutBytes(addr, buf[:limit]) // escapes: okay.
  5907  	// Since we bypassed the compiler's escape analysis, indicate that u
  5908  	// must live until the use above.
  5909  	runtime.KeepAlive(u) // escapes: replaced by intrinsic.
  5910  	return length, err
  5911  }
  5912  
  5913  // CopyOut implements marshal.Marshallable.CopyOut.
  5914  func (u *UVM_DESTROY_RANGE_GROUP_PARAMS) CopyOut(cc marshal.CopyContext, addr hostarch.Addr) (int, error) {
  5915  	return u.CopyOutN(cc, addr, u.SizeBytes())
  5916  }
  5917  
  5918  // CopyIn implements marshal.Marshallable.CopyIn.
  5919  func (u *UVM_DESTROY_RANGE_GROUP_PARAMS) CopyIn(cc marshal.CopyContext, addr hostarch.Addr) (int, error) {
  5920  	// Construct a slice backed by dst's underlying memory.
  5921  	var buf []byte
  5922  	hdr := (*reflect.SliceHeader)(unsafe.Pointer(&buf))
  5923  	hdr.Data = uintptr(gohacks.Noescape(unsafe.Pointer(u)))
  5924  	hdr.Len = u.SizeBytes()
  5925  	hdr.Cap = u.SizeBytes()
  5926  
  5927  	length, err := cc.CopyInBytes(addr, buf) // escapes: okay.
  5928  	// Since we bypassed the compiler's escape analysis, indicate that u
  5929  	// must live until the use above.
  5930  	runtime.KeepAlive(u) // escapes: replaced by intrinsic.
  5931  	return length, err
  5932  }
  5933  
  5934  // WriteTo implements io.WriterTo.WriteTo.
  5935  func (u *UVM_DESTROY_RANGE_GROUP_PARAMS) WriteTo(writer io.Writer) (int64, error) {
  5936  	// Construct a slice backed by dst's underlying memory.
  5937  	var buf []byte
  5938  	hdr := (*reflect.SliceHeader)(unsafe.Pointer(&buf))
  5939  	hdr.Data = uintptr(gohacks.Noescape(unsafe.Pointer(u)))
  5940  	hdr.Len = u.SizeBytes()
  5941  	hdr.Cap = u.SizeBytes()
  5942  
  5943  	length, err := writer.Write(buf)
  5944  	// Since we bypassed the compiler's escape analysis, indicate that u
  5945  	// must live until the use above.
  5946  	runtime.KeepAlive(u) // escapes: replaced by intrinsic.
  5947  	return int64(length), err
  5948  }
  5949  
  5950  // SizeBytes implements marshal.Marshallable.SizeBytes.
  5951  func (u *UVM_FREE_PARAMS) SizeBytes() int {
  5952  	return 20 +
  5953  		1*4
  5954  }
  5955  
  5956  // MarshalBytes implements marshal.Marshallable.MarshalBytes.
  5957  func (u *UVM_FREE_PARAMS) MarshalBytes(dst []byte) []byte {
  5958  	hostarch.ByteOrder.PutUint64(dst[:8], uint64(u.Base))
  5959  	dst = dst[8:]
  5960  	hostarch.ByteOrder.PutUint64(dst[:8], uint64(u.Length))
  5961  	dst = dst[8:]
  5962  	hostarch.ByteOrder.PutUint32(dst[:4], uint32(u.RMStatus))
  5963  	dst = dst[4:]
  5964  	for idx := 0; idx < 4; idx++ {
  5965  		dst[0] = byte(u.Pad0[idx])
  5966  		dst = dst[1:]
  5967  	}
  5968  	return dst
  5969  }
  5970  
  5971  // UnmarshalBytes implements marshal.Marshallable.UnmarshalBytes.
  5972  func (u *UVM_FREE_PARAMS) UnmarshalBytes(src []byte) []byte {
  5973  	u.Base = uint64(hostarch.ByteOrder.Uint64(src[:8]))
  5974  	src = src[8:]
  5975  	u.Length = uint64(hostarch.ByteOrder.Uint64(src[:8]))
  5976  	src = src[8:]
  5977  	u.RMStatus = uint32(hostarch.ByteOrder.Uint32(src[:4]))
  5978  	src = src[4:]
  5979  	for idx := 0; idx < 4; idx++ {
  5980  		u.Pad0[idx] = src[0]
  5981  		src = src[1:]
  5982  	}
  5983  	return src
  5984  }
  5985  
  5986  // Packed implements marshal.Marshallable.Packed.
  5987  //
  5988  //go:nosplit
  5989  func (u *UVM_FREE_PARAMS) Packed() bool {
  5990  	return true
  5991  }
  5992  
  5993  // MarshalUnsafe implements marshal.Marshallable.MarshalUnsafe.
  5994  func (u *UVM_FREE_PARAMS) MarshalUnsafe(dst []byte) []byte {
  5995  	size := u.SizeBytes()
  5996  	gohacks.Memmove(unsafe.Pointer(&dst[0]), unsafe.Pointer(u), uintptr(size))
  5997  	return dst[size:]
  5998  }
  5999  
  6000  // UnmarshalUnsafe implements marshal.Marshallable.UnmarshalUnsafe.
  6001  func (u *UVM_FREE_PARAMS) UnmarshalUnsafe(src []byte) []byte {
  6002  	size := u.SizeBytes()
  6003  	gohacks.Memmove(unsafe.Pointer(u), unsafe.Pointer(&src[0]), uintptr(size))
  6004  	return src[size:]
  6005  }
  6006  
  6007  // CopyOutN implements marshal.Marshallable.CopyOutN.
  6008  func (u *UVM_FREE_PARAMS) CopyOutN(cc marshal.CopyContext, addr hostarch.Addr, limit int) (int, error) {
  6009  	// Construct a slice backed by dst's underlying memory.
  6010  	var buf []byte
  6011  	hdr := (*reflect.SliceHeader)(unsafe.Pointer(&buf))
  6012  	hdr.Data = uintptr(gohacks.Noescape(unsafe.Pointer(u)))
  6013  	hdr.Len = u.SizeBytes()
  6014  	hdr.Cap = u.SizeBytes()
  6015  
  6016  	length, err := cc.CopyOutBytes(addr, buf[:limit]) // escapes: okay.
  6017  	// Since we bypassed the compiler's escape analysis, indicate that u
  6018  	// must live until the use above.
  6019  	runtime.KeepAlive(u) // escapes: replaced by intrinsic.
  6020  	return length, err
  6021  }
  6022  
  6023  // CopyOut implements marshal.Marshallable.CopyOut.
  6024  func (u *UVM_FREE_PARAMS) CopyOut(cc marshal.CopyContext, addr hostarch.Addr) (int, error) {
  6025  	return u.CopyOutN(cc, addr, u.SizeBytes())
  6026  }
  6027  
  6028  // CopyIn implements marshal.Marshallable.CopyIn.
  6029  func (u *UVM_FREE_PARAMS) CopyIn(cc marshal.CopyContext, addr hostarch.Addr) (int, error) {
  6030  	// Construct a slice backed by dst's underlying memory.
  6031  	var buf []byte
  6032  	hdr := (*reflect.SliceHeader)(unsafe.Pointer(&buf))
  6033  	hdr.Data = uintptr(gohacks.Noescape(unsafe.Pointer(u)))
  6034  	hdr.Len = u.SizeBytes()
  6035  	hdr.Cap = u.SizeBytes()
  6036  
  6037  	length, err := cc.CopyInBytes(addr, buf) // escapes: okay.
  6038  	// Since we bypassed the compiler's escape analysis, indicate that u
  6039  	// must live until the use above.
  6040  	runtime.KeepAlive(u) // escapes: replaced by intrinsic.
  6041  	return length, err
  6042  }
  6043  
  6044  // WriteTo implements io.WriterTo.WriteTo.
  6045  func (u *UVM_FREE_PARAMS) WriteTo(writer io.Writer) (int64, error) {
  6046  	// Construct a slice backed by dst's underlying memory.
  6047  	var buf []byte
  6048  	hdr := (*reflect.SliceHeader)(unsafe.Pointer(&buf))
  6049  	hdr.Data = uintptr(gohacks.Noescape(unsafe.Pointer(u)))
  6050  	hdr.Len = u.SizeBytes()
  6051  	hdr.Cap = u.SizeBytes()
  6052  
  6053  	length, err := writer.Write(buf)
  6054  	// Since we bypassed the compiler's escape analysis, indicate that u
  6055  	// must live until the use above.
  6056  	runtime.KeepAlive(u) // escapes: replaced by intrinsic.
  6057  	return int64(length), err
  6058  }
  6059  
  6060  // SizeBytes implements marshal.Marshallable.SizeBytes.
  6061  func (u *UVM_INITIALIZE_PARAMS) SizeBytes() int {
  6062  	return 12 +
  6063  		1*4
  6064  }
  6065  
  6066  // MarshalBytes implements marshal.Marshallable.MarshalBytes.
  6067  func (u *UVM_INITIALIZE_PARAMS) MarshalBytes(dst []byte) []byte {
  6068  	hostarch.ByteOrder.PutUint64(dst[:8], uint64(u.Flags))
  6069  	dst = dst[8:]
  6070  	hostarch.ByteOrder.PutUint32(dst[:4], uint32(u.RMStatus))
  6071  	dst = dst[4:]
  6072  	for idx := 0; idx < 4; idx++ {
  6073  		dst[0] = byte(u.Pad0[idx])
  6074  		dst = dst[1:]
  6075  	}
  6076  	return dst
  6077  }
  6078  
  6079  // UnmarshalBytes implements marshal.Marshallable.UnmarshalBytes.
  6080  func (u *UVM_INITIALIZE_PARAMS) UnmarshalBytes(src []byte) []byte {
  6081  	u.Flags = uint64(hostarch.ByteOrder.Uint64(src[:8]))
  6082  	src = src[8:]
  6083  	u.RMStatus = uint32(hostarch.ByteOrder.Uint32(src[:4]))
  6084  	src = src[4:]
  6085  	for idx := 0; idx < 4; idx++ {
  6086  		u.Pad0[idx] = src[0]
  6087  		src = src[1:]
  6088  	}
  6089  	return src
  6090  }
  6091  
  6092  // Packed implements marshal.Marshallable.Packed.
  6093  //
  6094  //go:nosplit
  6095  func (u *UVM_INITIALIZE_PARAMS) Packed() bool {
  6096  	return true
  6097  }
  6098  
  6099  // MarshalUnsafe implements marshal.Marshallable.MarshalUnsafe.
  6100  func (u *UVM_INITIALIZE_PARAMS) MarshalUnsafe(dst []byte) []byte {
  6101  	size := u.SizeBytes()
  6102  	gohacks.Memmove(unsafe.Pointer(&dst[0]), unsafe.Pointer(u), uintptr(size))
  6103  	return dst[size:]
  6104  }
  6105  
  6106  // UnmarshalUnsafe implements marshal.Marshallable.UnmarshalUnsafe.
  6107  func (u *UVM_INITIALIZE_PARAMS) UnmarshalUnsafe(src []byte) []byte {
  6108  	size := u.SizeBytes()
  6109  	gohacks.Memmove(unsafe.Pointer(u), unsafe.Pointer(&src[0]), uintptr(size))
  6110  	return src[size:]
  6111  }
  6112  
  6113  // CopyOutN implements marshal.Marshallable.CopyOutN.
  6114  func (u *UVM_INITIALIZE_PARAMS) CopyOutN(cc marshal.CopyContext, addr hostarch.Addr, limit int) (int, error) {
  6115  	// Construct a slice backed by dst's underlying memory.
  6116  	var buf []byte
  6117  	hdr := (*reflect.SliceHeader)(unsafe.Pointer(&buf))
  6118  	hdr.Data = uintptr(gohacks.Noescape(unsafe.Pointer(u)))
  6119  	hdr.Len = u.SizeBytes()
  6120  	hdr.Cap = u.SizeBytes()
  6121  
  6122  	length, err := cc.CopyOutBytes(addr, buf[:limit]) // escapes: okay.
  6123  	// Since we bypassed the compiler's escape analysis, indicate that u
  6124  	// must live until the use above.
  6125  	runtime.KeepAlive(u) // escapes: replaced by intrinsic.
  6126  	return length, err
  6127  }
  6128  
  6129  // CopyOut implements marshal.Marshallable.CopyOut.
  6130  func (u *UVM_INITIALIZE_PARAMS) CopyOut(cc marshal.CopyContext, addr hostarch.Addr) (int, error) {
  6131  	return u.CopyOutN(cc, addr, u.SizeBytes())
  6132  }
  6133  
  6134  // CopyIn implements marshal.Marshallable.CopyIn.
  6135  func (u *UVM_INITIALIZE_PARAMS) CopyIn(cc marshal.CopyContext, addr hostarch.Addr) (int, error) {
  6136  	// Construct a slice backed by dst's underlying memory.
  6137  	var buf []byte
  6138  	hdr := (*reflect.SliceHeader)(unsafe.Pointer(&buf))
  6139  	hdr.Data = uintptr(gohacks.Noescape(unsafe.Pointer(u)))
  6140  	hdr.Len = u.SizeBytes()
  6141  	hdr.Cap = u.SizeBytes()
  6142  
  6143  	length, err := cc.CopyInBytes(addr, buf) // escapes: okay.
  6144  	// Since we bypassed the compiler's escape analysis, indicate that u
  6145  	// must live until the use above.
  6146  	runtime.KeepAlive(u) // escapes: replaced by intrinsic.
  6147  	return length, err
  6148  }
  6149  
  6150  // WriteTo implements io.WriterTo.WriteTo.
  6151  func (u *UVM_INITIALIZE_PARAMS) WriteTo(writer io.Writer) (int64, error) {
  6152  	// Construct a slice backed by dst's underlying memory.
  6153  	var buf []byte
  6154  	hdr := (*reflect.SliceHeader)(unsafe.Pointer(&buf))
  6155  	hdr.Data = uintptr(gohacks.Noescape(unsafe.Pointer(u)))
  6156  	hdr.Len = u.SizeBytes()
  6157  	hdr.Cap = u.SizeBytes()
  6158  
  6159  	length, err := writer.Write(buf)
  6160  	// Since we bypassed the compiler's escape analysis, indicate that u
  6161  	// must live until the use above.
  6162  	runtime.KeepAlive(u) // escapes: replaced by intrinsic.
  6163  	return int64(length), err
  6164  }
  6165  
  6166  // SizeBytes implements marshal.Marshallable.SizeBytes.
  6167  func (u *UVM_MAP_DYNAMIC_PARALLELISM_REGION_PARAMS) SizeBytes() int {
  6168  	return 20 +
  6169  		1*16 +
  6170  		1*4
  6171  }
  6172  
  6173  // MarshalBytes implements marshal.Marshallable.MarshalBytes.
  6174  func (u *UVM_MAP_DYNAMIC_PARALLELISM_REGION_PARAMS) MarshalBytes(dst []byte) []byte {
  6175  	hostarch.ByteOrder.PutUint64(dst[:8], uint64(u.Base))
  6176  	dst = dst[8:]
  6177  	hostarch.ByteOrder.PutUint64(dst[:8], uint64(u.Length))
  6178  	dst = dst[8:]
  6179  	for idx := 0; idx < 16; idx++ {
  6180  		dst[0] = byte(u.GPUUUID[idx])
  6181  		dst = dst[1:]
  6182  	}
  6183  	hostarch.ByteOrder.PutUint32(dst[:4], uint32(u.RMStatus))
  6184  	dst = dst[4:]
  6185  	for idx := 0; idx < 4; idx++ {
  6186  		dst[0] = byte(u.Pad0[idx])
  6187  		dst = dst[1:]
  6188  	}
  6189  	return dst
  6190  }
  6191  
  6192  // UnmarshalBytes implements marshal.Marshallable.UnmarshalBytes.
  6193  func (u *UVM_MAP_DYNAMIC_PARALLELISM_REGION_PARAMS) UnmarshalBytes(src []byte) []byte {
  6194  	u.Base = uint64(hostarch.ByteOrder.Uint64(src[:8]))
  6195  	src = src[8:]
  6196  	u.Length = uint64(hostarch.ByteOrder.Uint64(src[:8]))
  6197  	src = src[8:]
  6198  	for idx := 0; idx < 16; idx++ {
  6199  		u.GPUUUID[idx] = uint8(src[0])
  6200  		src = src[1:]
  6201  	}
  6202  	u.RMStatus = uint32(hostarch.ByteOrder.Uint32(src[:4]))
  6203  	src = src[4:]
  6204  	for idx := 0; idx < 4; idx++ {
  6205  		u.Pad0[idx] = src[0]
  6206  		src = src[1:]
  6207  	}
  6208  	return src
  6209  }
  6210  
  6211  // Packed implements marshal.Marshallable.Packed.
  6212  //
  6213  //go:nosplit
  6214  func (u *UVM_MAP_DYNAMIC_PARALLELISM_REGION_PARAMS) Packed() bool {
  6215  	return true
  6216  }
  6217  
  6218  // MarshalUnsafe implements marshal.Marshallable.MarshalUnsafe.
  6219  func (u *UVM_MAP_DYNAMIC_PARALLELISM_REGION_PARAMS) MarshalUnsafe(dst []byte) []byte {
  6220  	size := u.SizeBytes()
  6221  	gohacks.Memmove(unsafe.Pointer(&dst[0]), unsafe.Pointer(u), uintptr(size))
  6222  	return dst[size:]
  6223  }
  6224  
  6225  // UnmarshalUnsafe implements marshal.Marshallable.UnmarshalUnsafe.
  6226  func (u *UVM_MAP_DYNAMIC_PARALLELISM_REGION_PARAMS) UnmarshalUnsafe(src []byte) []byte {
  6227  	size := u.SizeBytes()
  6228  	gohacks.Memmove(unsafe.Pointer(u), unsafe.Pointer(&src[0]), uintptr(size))
  6229  	return src[size:]
  6230  }
  6231  
  6232  // CopyOutN implements marshal.Marshallable.CopyOutN.
  6233  func (u *UVM_MAP_DYNAMIC_PARALLELISM_REGION_PARAMS) CopyOutN(cc marshal.CopyContext, addr hostarch.Addr, limit int) (int, error) {
  6234  	// Construct a slice backed by dst's underlying memory.
  6235  	var buf []byte
  6236  	hdr := (*reflect.SliceHeader)(unsafe.Pointer(&buf))
  6237  	hdr.Data = uintptr(gohacks.Noescape(unsafe.Pointer(u)))
  6238  	hdr.Len = u.SizeBytes()
  6239  	hdr.Cap = u.SizeBytes()
  6240  
  6241  	length, err := cc.CopyOutBytes(addr, buf[:limit]) // escapes: okay.
  6242  	// Since we bypassed the compiler's escape analysis, indicate that u
  6243  	// must live until the use above.
  6244  	runtime.KeepAlive(u) // escapes: replaced by intrinsic.
  6245  	return length, err
  6246  }
  6247  
  6248  // CopyOut implements marshal.Marshallable.CopyOut.
  6249  func (u *UVM_MAP_DYNAMIC_PARALLELISM_REGION_PARAMS) CopyOut(cc marshal.CopyContext, addr hostarch.Addr) (int, error) {
  6250  	return u.CopyOutN(cc, addr, u.SizeBytes())
  6251  }
  6252  
  6253  // CopyIn implements marshal.Marshallable.CopyIn.
  6254  func (u *UVM_MAP_DYNAMIC_PARALLELISM_REGION_PARAMS) CopyIn(cc marshal.CopyContext, addr hostarch.Addr) (int, error) {
  6255  	// Construct a slice backed by dst's underlying memory.
  6256  	var buf []byte
  6257  	hdr := (*reflect.SliceHeader)(unsafe.Pointer(&buf))
  6258  	hdr.Data = uintptr(gohacks.Noescape(unsafe.Pointer(u)))
  6259  	hdr.Len = u.SizeBytes()
  6260  	hdr.Cap = u.SizeBytes()
  6261  
  6262  	length, err := cc.CopyInBytes(addr, buf) // escapes: okay.
  6263  	// Since we bypassed the compiler's escape analysis, indicate that u
  6264  	// must live until the use above.
  6265  	runtime.KeepAlive(u) // escapes: replaced by intrinsic.
  6266  	return length, err
  6267  }
  6268  
  6269  // WriteTo implements io.WriterTo.WriteTo.
  6270  func (u *UVM_MAP_DYNAMIC_PARALLELISM_REGION_PARAMS) WriteTo(writer io.Writer) (int64, error) {
  6271  	// Construct a slice backed by dst's underlying memory.
  6272  	var buf []byte
  6273  	hdr := (*reflect.SliceHeader)(unsafe.Pointer(&buf))
  6274  	hdr.Data = uintptr(gohacks.Noescape(unsafe.Pointer(u)))
  6275  	hdr.Len = u.SizeBytes()
  6276  	hdr.Cap = u.SizeBytes()
  6277  
  6278  	length, err := writer.Write(buf)
  6279  	// Since we bypassed the compiler's escape analysis, indicate that u
  6280  	// must live until the use above.
  6281  	runtime.KeepAlive(u) // escapes: replaced by intrinsic.
  6282  	return int64(length), err
  6283  }
  6284  
  6285  // SizeBytes implements marshal.Marshallable.SizeBytes.
  6286  func (p *UVM_MAP_EXTERNAL_ALLOCATION_PARAMS) SizeBytes() int {
  6287  	return 40 +
  6288  		(*UvmGpuMappingAttributes)(nil).SizeBytes()*UVM_MAX_GPUS +
  6289  		(*Handle)(nil).SizeBytes() +
  6290  		(*Handle)(nil).SizeBytes()
  6291  }
  6292  
  6293  // MarshalBytes implements marshal.Marshallable.MarshalBytes.
  6294  func (p *UVM_MAP_EXTERNAL_ALLOCATION_PARAMS) MarshalBytes(dst []byte) []byte {
  6295  	hostarch.ByteOrder.PutUint64(dst[:8], uint64(p.Base))
  6296  	dst = dst[8:]
  6297  	hostarch.ByteOrder.PutUint64(dst[:8], uint64(p.Length))
  6298  	dst = dst[8:]
  6299  	hostarch.ByteOrder.PutUint64(dst[:8], uint64(p.Offset))
  6300  	dst = dst[8:]
  6301  	for idx := 0; idx < UVM_MAX_GPUS; idx++ {
  6302  		dst = p.PerGPUAttributes[idx].MarshalUnsafe(dst)
  6303  	}
  6304  	hostarch.ByteOrder.PutUint64(dst[:8], uint64(p.GPUAttributesCount))
  6305  	dst = dst[8:]
  6306  	hostarch.ByteOrder.PutUint32(dst[:4], uint32(p.RMCtrlFD))
  6307  	dst = dst[4:]
  6308  	dst = p.HClient.MarshalUnsafe(dst)
  6309  	dst = p.HMemory.MarshalUnsafe(dst)
  6310  	hostarch.ByteOrder.PutUint32(dst[:4], uint32(p.RMStatus))
  6311  	dst = dst[4:]
  6312  	return dst
  6313  }
  6314  
  6315  // UnmarshalBytes implements marshal.Marshallable.UnmarshalBytes.
  6316  func (p *UVM_MAP_EXTERNAL_ALLOCATION_PARAMS) UnmarshalBytes(src []byte) []byte {
  6317  	p.Base = uint64(hostarch.ByteOrder.Uint64(src[:8]))
  6318  	src = src[8:]
  6319  	p.Length = uint64(hostarch.ByteOrder.Uint64(src[:8]))
  6320  	src = src[8:]
  6321  	p.Offset = uint64(hostarch.ByteOrder.Uint64(src[:8]))
  6322  	src = src[8:]
  6323  	for idx := 0; idx < UVM_MAX_GPUS; idx++ {
  6324  		src = p.PerGPUAttributes[idx].UnmarshalUnsafe(src)
  6325  	}
  6326  	p.GPUAttributesCount = uint64(hostarch.ByteOrder.Uint64(src[:8]))
  6327  	src = src[8:]
  6328  	p.RMCtrlFD = int32(hostarch.ByteOrder.Uint32(src[:4]))
  6329  	src = src[4:]
  6330  	src = p.HClient.UnmarshalUnsafe(src)
  6331  	src = p.HMemory.UnmarshalUnsafe(src)
  6332  	p.RMStatus = uint32(hostarch.ByteOrder.Uint32(src[:4]))
  6333  	src = src[4:]
  6334  	return src
  6335  }
  6336  
  6337  // Packed implements marshal.Marshallable.Packed.
  6338  //
  6339  //go:nosplit
  6340  func (p *UVM_MAP_EXTERNAL_ALLOCATION_PARAMS) Packed() bool {
  6341  	return p.HClient.Packed() && p.HMemory.Packed() && p.PerGPUAttributes[0].Packed()
  6342  }
  6343  
  6344  // MarshalUnsafe implements marshal.Marshallable.MarshalUnsafe.
  6345  func (p *UVM_MAP_EXTERNAL_ALLOCATION_PARAMS) MarshalUnsafe(dst []byte) []byte {
  6346  	if p.HClient.Packed() && p.HMemory.Packed() && p.PerGPUAttributes[0].Packed() {
  6347  		size := p.SizeBytes()
  6348  		gohacks.Memmove(unsafe.Pointer(&dst[0]), unsafe.Pointer(p), uintptr(size))
  6349  		return dst[size:]
  6350  	}
  6351  	// Type UVM_MAP_EXTERNAL_ALLOCATION_PARAMS doesn't have a packed layout in memory, fallback to MarshalBytes.
  6352  	return p.MarshalBytes(dst)
  6353  }
  6354  
  6355  // UnmarshalUnsafe implements marshal.Marshallable.UnmarshalUnsafe.
  6356  func (p *UVM_MAP_EXTERNAL_ALLOCATION_PARAMS) UnmarshalUnsafe(src []byte) []byte {
  6357  	if p.HClient.Packed() && p.HMemory.Packed() && p.PerGPUAttributes[0].Packed() {
  6358  		size := p.SizeBytes()
  6359  		gohacks.Memmove(unsafe.Pointer(p), unsafe.Pointer(&src[0]), uintptr(size))
  6360  		return src[size:]
  6361  	}
  6362  	// Type UVM_MAP_EXTERNAL_ALLOCATION_PARAMS doesn't have a packed layout in memory, fallback to UnmarshalBytes.
  6363  	return p.UnmarshalBytes(src)
  6364  }
  6365  
  6366  // CopyOutN implements marshal.Marshallable.CopyOutN.
  6367  func (p *UVM_MAP_EXTERNAL_ALLOCATION_PARAMS) CopyOutN(cc marshal.CopyContext, addr hostarch.Addr, limit int) (int, error) {
  6368  	if !p.HClient.Packed() && p.HMemory.Packed() && p.PerGPUAttributes[0].Packed() {
  6369  		// Type UVM_MAP_EXTERNAL_ALLOCATION_PARAMS doesn't have a packed layout in memory, fall back to MarshalBytes.
  6370  		buf := cc.CopyScratchBuffer(p.SizeBytes()) // escapes: okay.
  6371  		p.MarshalBytes(buf)                        // escapes: fallback.
  6372  		return cc.CopyOutBytes(addr, buf[:limit])  // escapes: okay.
  6373  	}
  6374  
  6375  	// Construct a slice backed by dst's underlying memory.
  6376  	var buf []byte
  6377  	hdr := (*reflect.SliceHeader)(unsafe.Pointer(&buf))
  6378  	hdr.Data = uintptr(gohacks.Noescape(unsafe.Pointer(p)))
  6379  	hdr.Len = p.SizeBytes()
  6380  	hdr.Cap = p.SizeBytes()
  6381  
  6382  	length, err := cc.CopyOutBytes(addr, buf[:limit]) // escapes: okay.
  6383  	// Since we bypassed the compiler's escape analysis, indicate that p
  6384  	// must live until the use above.
  6385  	runtime.KeepAlive(p) // escapes: replaced by intrinsic.
  6386  	return length, err
  6387  }
  6388  
  6389  // CopyOut implements marshal.Marshallable.CopyOut.
  6390  func (p *UVM_MAP_EXTERNAL_ALLOCATION_PARAMS) CopyOut(cc marshal.CopyContext, addr hostarch.Addr) (int, error) {
  6391  	return p.CopyOutN(cc, addr, p.SizeBytes())
  6392  }
  6393  
  6394  // CopyIn implements marshal.Marshallable.CopyIn.
  6395  func (p *UVM_MAP_EXTERNAL_ALLOCATION_PARAMS) CopyIn(cc marshal.CopyContext, addr hostarch.Addr) (int, error) {
  6396  	if !p.HClient.Packed() && p.HMemory.Packed() && p.PerGPUAttributes[0].Packed() {
  6397  		// Type UVM_MAP_EXTERNAL_ALLOCATION_PARAMS doesn't have a packed layout in memory, fall back to UnmarshalBytes.
  6398  		buf := cc.CopyScratchBuffer(p.SizeBytes()) // escapes: okay.
  6399  		length, err := cc.CopyInBytes(addr, buf)   // escapes: okay.
  6400  		// Unmarshal unconditionally. If we had a short copy-in, this results in a
  6401  		// partially unmarshalled struct.
  6402  		p.UnmarshalBytes(buf) // escapes: fallback.
  6403  		return length, err
  6404  	}
  6405  
  6406  	// Construct a slice backed by dst's underlying memory.
  6407  	var buf []byte
  6408  	hdr := (*reflect.SliceHeader)(unsafe.Pointer(&buf))
  6409  	hdr.Data = uintptr(gohacks.Noescape(unsafe.Pointer(p)))
  6410  	hdr.Len = p.SizeBytes()
  6411  	hdr.Cap = p.SizeBytes()
  6412  
  6413  	length, err := cc.CopyInBytes(addr, buf) // escapes: okay.
  6414  	// Since we bypassed the compiler's escape analysis, indicate that p
  6415  	// must live until the use above.
  6416  	runtime.KeepAlive(p) // escapes: replaced by intrinsic.
  6417  	return length, err
  6418  }
  6419  
  6420  // WriteTo implements io.WriterTo.WriteTo.
  6421  func (p *UVM_MAP_EXTERNAL_ALLOCATION_PARAMS) WriteTo(writer io.Writer) (int64, error) {
  6422  	if !p.HClient.Packed() && p.HMemory.Packed() && p.PerGPUAttributes[0].Packed() {
  6423  		// Type UVM_MAP_EXTERNAL_ALLOCATION_PARAMS doesn't have a packed layout in memory, fall back to MarshalBytes.
  6424  		buf := make([]byte, p.SizeBytes())
  6425  		p.MarshalBytes(buf)
  6426  		length, err := writer.Write(buf)
  6427  		return int64(length), err
  6428  	}
  6429  
  6430  	// Construct a slice backed by dst's underlying memory.
  6431  	var buf []byte
  6432  	hdr := (*reflect.SliceHeader)(unsafe.Pointer(&buf))
  6433  	hdr.Data = uintptr(gohacks.Noescape(unsafe.Pointer(p)))
  6434  	hdr.Len = p.SizeBytes()
  6435  	hdr.Cap = p.SizeBytes()
  6436  
  6437  	length, err := writer.Write(buf)
  6438  	// Since we bypassed the compiler's escape analysis, indicate that p
  6439  	// must live until the use above.
  6440  	runtime.KeepAlive(p) // escapes: replaced by intrinsic.
  6441  	return int64(length), err
  6442  }
  6443  
  6444  // SizeBytes implements marshal.Marshallable.SizeBytes.
  6445  func (u *UVM_PAGEABLE_MEM_ACCESS_PARAMS) SizeBytes() int {
  6446  	return 5 +
  6447  		1*3
  6448  }
  6449  
  6450  // MarshalBytes implements marshal.Marshallable.MarshalBytes.
  6451  func (u *UVM_PAGEABLE_MEM_ACCESS_PARAMS) MarshalBytes(dst []byte) []byte {
  6452  	dst[0] = byte(u.PageableMemAccess)
  6453  	dst = dst[1:]
  6454  	for idx := 0; idx < 3; idx++ {
  6455  		dst[0] = byte(u.Pad[idx])
  6456  		dst = dst[1:]
  6457  	}
  6458  	hostarch.ByteOrder.PutUint32(dst[:4], uint32(u.RMStatus))
  6459  	dst = dst[4:]
  6460  	return dst
  6461  }
  6462  
  6463  // UnmarshalBytes implements marshal.Marshallable.UnmarshalBytes.
  6464  func (u *UVM_PAGEABLE_MEM_ACCESS_PARAMS) UnmarshalBytes(src []byte) []byte {
  6465  	u.PageableMemAccess = uint8(src[0])
  6466  	src = src[1:]
  6467  	for idx := 0; idx < 3; idx++ {
  6468  		u.Pad[idx] = src[0]
  6469  		src = src[1:]
  6470  	}
  6471  	u.RMStatus = uint32(hostarch.ByteOrder.Uint32(src[:4]))
  6472  	src = src[4:]
  6473  	return src
  6474  }
  6475  
  6476  // Packed implements marshal.Marshallable.Packed.
  6477  //
  6478  //go:nosplit
  6479  func (u *UVM_PAGEABLE_MEM_ACCESS_PARAMS) Packed() bool {
  6480  	return true
  6481  }
  6482  
  6483  // MarshalUnsafe implements marshal.Marshallable.MarshalUnsafe.
  6484  func (u *UVM_PAGEABLE_MEM_ACCESS_PARAMS) MarshalUnsafe(dst []byte) []byte {
  6485  	size := u.SizeBytes()
  6486  	gohacks.Memmove(unsafe.Pointer(&dst[0]), unsafe.Pointer(u), uintptr(size))
  6487  	return dst[size:]
  6488  }
  6489  
  6490  // UnmarshalUnsafe implements marshal.Marshallable.UnmarshalUnsafe.
  6491  func (u *UVM_PAGEABLE_MEM_ACCESS_PARAMS) UnmarshalUnsafe(src []byte) []byte {
  6492  	size := u.SizeBytes()
  6493  	gohacks.Memmove(unsafe.Pointer(u), unsafe.Pointer(&src[0]), uintptr(size))
  6494  	return src[size:]
  6495  }
  6496  
  6497  // CopyOutN implements marshal.Marshallable.CopyOutN.
  6498  func (u *UVM_PAGEABLE_MEM_ACCESS_PARAMS) CopyOutN(cc marshal.CopyContext, addr hostarch.Addr, limit int) (int, error) {
  6499  	// Construct a slice backed by dst's underlying memory.
  6500  	var buf []byte
  6501  	hdr := (*reflect.SliceHeader)(unsafe.Pointer(&buf))
  6502  	hdr.Data = uintptr(gohacks.Noescape(unsafe.Pointer(u)))
  6503  	hdr.Len = u.SizeBytes()
  6504  	hdr.Cap = u.SizeBytes()
  6505  
  6506  	length, err := cc.CopyOutBytes(addr, buf[:limit]) // escapes: okay.
  6507  	// Since we bypassed the compiler's escape analysis, indicate that u
  6508  	// must live until the use above.
  6509  	runtime.KeepAlive(u) // escapes: replaced by intrinsic.
  6510  	return length, err
  6511  }
  6512  
  6513  // CopyOut implements marshal.Marshallable.CopyOut.
  6514  func (u *UVM_PAGEABLE_MEM_ACCESS_PARAMS) CopyOut(cc marshal.CopyContext, addr hostarch.Addr) (int, error) {
  6515  	return u.CopyOutN(cc, addr, u.SizeBytes())
  6516  }
  6517  
  6518  // CopyIn implements marshal.Marshallable.CopyIn.
  6519  func (u *UVM_PAGEABLE_MEM_ACCESS_PARAMS) CopyIn(cc marshal.CopyContext, addr hostarch.Addr) (int, error) {
  6520  	// Construct a slice backed by dst's underlying memory.
  6521  	var buf []byte
  6522  	hdr := (*reflect.SliceHeader)(unsafe.Pointer(&buf))
  6523  	hdr.Data = uintptr(gohacks.Noescape(unsafe.Pointer(u)))
  6524  	hdr.Len = u.SizeBytes()
  6525  	hdr.Cap = u.SizeBytes()
  6526  
  6527  	length, err := cc.CopyInBytes(addr, buf) // escapes: okay.
  6528  	// Since we bypassed the compiler's escape analysis, indicate that u
  6529  	// must live until the use above.
  6530  	runtime.KeepAlive(u) // escapes: replaced by intrinsic.
  6531  	return length, err
  6532  }
  6533  
  6534  // WriteTo implements io.WriterTo.WriteTo.
  6535  func (u *UVM_PAGEABLE_MEM_ACCESS_PARAMS) WriteTo(writer io.Writer) (int64, error) {
  6536  	// Construct a slice backed by dst's underlying memory.
  6537  	var buf []byte
  6538  	hdr := (*reflect.SliceHeader)(unsafe.Pointer(&buf))
  6539  	hdr.Data = uintptr(gohacks.Noescape(unsafe.Pointer(u)))
  6540  	hdr.Len = u.SizeBytes()
  6541  	hdr.Cap = u.SizeBytes()
  6542  
  6543  	length, err := writer.Write(buf)
  6544  	// Since we bypassed the compiler's escape analysis, indicate that u
  6545  	// must live until the use above.
  6546  	runtime.KeepAlive(u) // escapes: replaced by intrinsic.
  6547  	return int64(length), err
  6548  }
  6549  
  6550  // SizeBytes implements marshal.Marshallable.SizeBytes.
  6551  func (p *UVM_REGISTER_CHANNEL_PARAMS) SizeBytes() int {
  6552  	return 24 +
  6553  		1*16 +
  6554  		(*Handle)(nil).SizeBytes() +
  6555  		(*Handle)(nil).SizeBytes() +
  6556  		1*4 +
  6557  		1*4
  6558  }
  6559  
  6560  // MarshalBytes implements marshal.Marshallable.MarshalBytes.
  6561  func (p *UVM_REGISTER_CHANNEL_PARAMS) MarshalBytes(dst []byte) []byte {
  6562  	for idx := 0; idx < 16; idx++ {
  6563  		dst[0] = byte(p.GPUUUID[idx])
  6564  		dst = dst[1:]
  6565  	}
  6566  	hostarch.ByteOrder.PutUint32(dst[:4], uint32(p.RMCtrlFD))
  6567  	dst = dst[4:]
  6568  	dst = p.HClient.MarshalUnsafe(dst)
  6569  	dst = p.HChannel.MarshalUnsafe(dst)
  6570  	for idx := 0; idx < 4; idx++ {
  6571  		dst[0] = byte(p.Pad[idx])
  6572  		dst = dst[1:]
  6573  	}
  6574  	hostarch.ByteOrder.PutUint64(dst[:8], uint64(p.Base))
  6575  	dst = dst[8:]
  6576  	hostarch.ByteOrder.PutUint64(dst[:8], uint64(p.Length))
  6577  	dst = dst[8:]
  6578  	hostarch.ByteOrder.PutUint32(dst[:4], uint32(p.RMStatus))
  6579  	dst = dst[4:]
  6580  	for idx := 0; idx < 4; idx++ {
  6581  		dst[0] = byte(p.Pad0[idx])
  6582  		dst = dst[1:]
  6583  	}
  6584  	return dst
  6585  }
  6586  
  6587  // UnmarshalBytes implements marshal.Marshallable.UnmarshalBytes.
  6588  func (p *UVM_REGISTER_CHANNEL_PARAMS) UnmarshalBytes(src []byte) []byte {
  6589  	for idx := 0; idx < 16; idx++ {
  6590  		p.GPUUUID[idx] = uint8(src[0])
  6591  		src = src[1:]
  6592  	}
  6593  	p.RMCtrlFD = int32(hostarch.ByteOrder.Uint32(src[:4]))
  6594  	src = src[4:]
  6595  	src = p.HClient.UnmarshalUnsafe(src)
  6596  	src = p.HChannel.UnmarshalUnsafe(src)
  6597  	for idx := 0; idx < 4; idx++ {
  6598  		p.Pad[idx] = src[0]
  6599  		src = src[1:]
  6600  	}
  6601  	p.Base = uint64(hostarch.ByteOrder.Uint64(src[:8]))
  6602  	src = src[8:]
  6603  	p.Length = uint64(hostarch.ByteOrder.Uint64(src[:8]))
  6604  	src = src[8:]
  6605  	p.RMStatus = uint32(hostarch.ByteOrder.Uint32(src[:4]))
  6606  	src = src[4:]
  6607  	for idx := 0; idx < 4; idx++ {
  6608  		p.Pad0[idx] = src[0]
  6609  		src = src[1:]
  6610  	}
  6611  	return src
  6612  }
  6613  
  6614  // Packed implements marshal.Marshallable.Packed.
  6615  //
  6616  //go:nosplit
  6617  func (p *UVM_REGISTER_CHANNEL_PARAMS) Packed() bool {
  6618  	return p.HChannel.Packed() && p.HClient.Packed()
  6619  }
  6620  
  6621  // MarshalUnsafe implements marshal.Marshallable.MarshalUnsafe.
  6622  func (p *UVM_REGISTER_CHANNEL_PARAMS) MarshalUnsafe(dst []byte) []byte {
  6623  	if p.HChannel.Packed() && p.HClient.Packed() {
  6624  		size := p.SizeBytes()
  6625  		gohacks.Memmove(unsafe.Pointer(&dst[0]), unsafe.Pointer(p), uintptr(size))
  6626  		return dst[size:]
  6627  	}
  6628  	// Type UVM_REGISTER_CHANNEL_PARAMS doesn't have a packed layout in memory, fallback to MarshalBytes.
  6629  	return p.MarshalBytes(dst)
  6630  }
  6631  
  6632  // UnmarshalUnsafe implements marshal.Marshallable.UnmarshalUnsafe.
  6633  func (p *UVM_REGISTER_CHANNEL_PARAMS) UnmarshalUnsafe(src []byte) []byte {
  6634  	if p.HChannel.Packed() && p.HClient.Packed() {
  6635  		size := p.SizeBytes()
  6636  		gohacks.Memmove(unsafe.Pointer(p), unsafe.Pointer(&src[0]), uintptr(size))
  6637  		return src[size:]
  6638  	}
  6639  	// Type UVM_REGISTER_CHANNEL_PARAMS doesn't have a packed layout in memory, fallback to UnmarshalBytes.
  6640  	return p.UnmarshalBytes(src)
  6641  }
  6642  
  6643  // CopyOutN implements marshal.Marshallable.CopyOutN.
  6644  func (p *UVM_REGISTER_CHANNEL_PARAMS) CopyOutN(cc marshal.CopyContext, addr hostarch.Addr, limit int) (int, error) {
  6645  	if !p.HChannel.Packed() && p.HClient.Packed() {
  6646  		// Type UVM_REGISTER_CHANNEL_PARAMS doesn't have a packed layout in memory, fall back to MarshalBytes.
  6647  		buf := cc.CopyScratchBuffer(p.SizeBytes()) // escapes: okay.
  6648  		p.MarshalBytes(buf)                        // escapes: fallback.
  6649  		return cc.CopyOutBytes(addr, buf[:limit])  // escapes: okay.
  6650  	}
  6651  
  6652  	// Construct a slice backed by dst's underlying memory.
  6653  	var buf []byte
  6654  	hdr := (*reflect.SliceHeader)(unsafe.Pointer(&buf))
  6655  	hdr.Data = uintptr(gohacks.Noescape(unsafe.Pointer(p)))
  6656  	hdr.Len = p.SizeBytes()
  6657  	hdr.Cap = p.SizeBytes()
  6658  
  6659  	length, err := cc.CopyOutBytes(addr, buf[:limit]) // escapes: okay.
  6660  	// Since we bypassed the compiler's escape analysis, indicate that p
  6661  	// must live until the use above.
  6662  	runtime.KeepAlive(p) // escapes: replaced by intrinsic.
  6663  	return length, err
  6664  }
  6665  
  6666  // CopyOut implements marshal.Marshallable.CopyOut.
  6667  func (p *UVM_REGISTER_CHANNEL_PARAMS) CopyOut(cc marshal.CopyContext, addr hostarch.Addr) (int, error) {
  6668  	return p.CopyOutN(cc, addr, p.SizeBytes())
  6669  }
  6670  
  6671  // CopyIn implements marshal.Marshallable.CopyIn.
  6672  func (p *UVM_REGISTER_CHANNEL_PARAMS) CopyIn(cc marshal.CopyContext, addr hostarch.Addr) (int, error) {
  6673  	if !p.HChannel.Packed() && p.HClient.Packed() {
  6674  		// Type UVM_REGISTER_CHANNEL_PARAMS doesn't have a packed layout in memory, fall back to UnmarshalBytes.
  6675  		buf := cc.CopyScratchBuffer(p.SizeBytes()) // escapes: okay.
  6676  		length, err := cc.CopyInBytes(addr, buf)   // escapes: okay.
  6677  		// Unmarshal unconditionally. If we had a short copy-in, this results in a
  6678  		// partially unmarshalled struct.
  6679  		p.UnmarshalBytes(buf) // escapes: fallback.
  6680  		return length, err
  6681  	}
  6682  
  6683  	// Construct a slice backed by dst's underlying memory.
  6684  	var buf []byte
  6685  	hdr := (*reflect.SliceHeader)(unsafe.Pointer(&buf))
  6686  	hdr.Data = uintptr(gohacks.Noescape(unsafe.Pointer(p)))
  6687  	hdr.Len = p.SizeBytes()
  6688  	hdr.Cap = p.SizeBytes()
  6689  
  6690  	length, err := cc.CopyInBytes(addr, buf) // escapes: okay.
  6691  	// Since we bypassed the compiler's escape analysis, indicate that p
  6692  	// must live until the use above.
  6693  	runtime.KeepAlive(p) // escapes: replaced by intrinsic.
  6694  	return length, err
  6695  }
  6696  
  6697  // WriteTo implements io.WriterTo.WriteTo.
  6698  func (p *UVM_REGISTER_CHANNEL_PARAMS) WriteTo(writer io.Writer) (int64, error) {
  6699  	if !p.HChannel.Packed() && p.HClient.Packed() {
  6700  		// Type UVM_REGISTER_CHANNEL_PARAMS doesn't have a packed layout in memory, fall back to MarshalBytes.
  6701  		buf := make([]byte, p.SizeBytes())
  6702  		p.MarshalBytes(buf)
  6703  		length, err := writer.Write(buf)
  6704  		return int64(length), err
  6705  	}
  6706  
  6707  	// Construct a slice backed by dst's underlying memory.
  6708  	var buf []byte
  6709  	hdr := (*reflect.SliceHeader)(unsafe.Pointer(&buf))
  6710  	hdr.Data = uintptr(gohacks.Noescape(unsafe.Pointer(p)))
  6711  	hdr.Len = p.SizeBytes()
  6712  	hdr.Cap = p.SizeBytes()
  6713  
  6714  	length, err := writer.Write(buf)
  6715  	// Since we bypassed the compiler's escape analysis, indicate that p
  6716  	// must live until the use above.
  6717  	runtime.KeepAlive(p) // escapes: replaced by intrinsic.
  6718  	return int64(length), err
  6719  }
  6720  
  6721  // SizeBytes implements marshal.Marshallable.SizeBytes.
  6722  func (p *UVM_REGISTER_GPU_PARAMS) SizeBytes() int {
  6723  	return 13 +
  6724  		1*16 +
  6725  		1*3 +
  6726  		(*Handle)(nil).SizeBytes() +
  6727  		(*Handle)(nil).SizeBytes()
  6728  }
  6729  
  6730  // MarshalBytes implements marshal.Marshallable.MarshalBytes.
  6731  func (p *UVM_REGISTER_GPU_PARAMS) MarshalBytes(dst []byte) []byte {
  6732  	for idx := 0; idx < 16; idx++ {
  6733  		dst[0] = byte(p.GPUUUID[idx])
  6734  		dst = dst[1:]
  6735  	}
  6736  	dst[0] = byte(p.NumaEnabled)
  6737  	dst = dst[1:]
  6738  	for idx := 0; idx < 3; idx++ {
  6739  		dst[0] = byte(p.Pad[idx])
  6740  		dst = dst[1:]
  6741  	}
  6742  	hostarch.ByteOrder.PutUint32(dst[:4], uint32(p.NumaNodeID))
  6743  	dst = dst[4:]
  6744  	hostarch.ByteOrder.PutUint32(dst[:4], uint32(p.RMCtrlFD))
  6745  	dst = dst[4:]
  6746  	dst = p.HClient.MarshalUnsafe(dst)
  6747  	dst = p.HSMCPartRef.MarshalUnsafe(dst)
  6748  	hostarch.ByteOrder.PutUint32(dst[:4], uint32(p.RMStatus))
  6749  	dst = dst[4:]
  6750  	return dst
  6751  }
  6752  
  6753  // UnmarshalBytes implements marshal.Marshallable.UnmarshalBytes.
  6754  func (p *UVM_REGISTER_GPU_PARAMS) UnmarshalBytes(src []byte) []byte {
  6755  	for idx := 0; idx < 16; idx++ {
  6756  		p.GPUUUID[idx] = uint8(src[0])
  6757  		src = src[1:]
  6758  	}
  6759  	p.NumaEnabled = uint8(src[0])
  6760  	src = src[1:]
  6761  	for idx := 0; idx < 3; idx++ {
  6762  		p.Pad[idx] = src[0]
  6763  		src = src[1:]
  6764  	}
  6765  	p.NumaNodeID = int32(hostarch.ByteOrder.Uint32(src[:4]))
  6766  	src = src[4:]
  6767  	p.RMCtrlFD = int32(hostarch.ByteOrder.Uint32(src[:4]))
  6768  	src = src[4:]
  6769  	src = p.HClient.UnmarshalUnsafe(src)
  6770  	src = p.HSMCPartRef.UnmarshalUnsafe(src)
  6771  	p.RMStatus = uint32(hostarch.ByteOrder.Uint32(src[:4]))
  6772  	src = src[4:]
  6773  	return src
  6774  }
  6775  
  6776  // Packed implements marshal.Marshallable.Packed.
  6777  //
  6778  //go:nosplit
  6779  func (p *UVM_REGISTER_GPU_PARAMS) Packed() bool {
  6780  	return p.HClient.Packed() && p.HSMCPartRef.Packed()
  6781  }
  6782  
  6783  // MarshalUnsafe implements marshal.Marshallable.MarshalUnsafe.
  6784  func (p *UVM_REGISTER_GPU_PARAMS) MarshalUnsafe(dst []byte) []byte {
  6785  	if p.HClient.Packed() && p.HSMCPartRef.Packed() {
  6786  		size := p.SizeBytes()
  6787  		gohacks.Memmove(unsafe.Pointer(&dst[0]), unsafe.Pointer(p), uintptr(size))
  6788  		return dst[size:]
  6789  	}
  6790  	// Type UVM_REGISTER_GPU_PARAMS doesn't have a packed layout in memory, fallback to MarshalBytes.
  6791  	return p.MarshalBytes(dst)
  6792  }
  6793  
  6794  // UnmarshalUnsafe implements marshal.Marshallable.UnmarshalUnsafe.
  6795  func (p *UVM_REGISTER_GPU_PARAMS) UnmarshalUnsafe(src []byte) []byte {
  6796  	if p.HClient.Packed() && p.HSMCPartRef.Packed() {
  6797  		size := p.SizeBytes()
  6798  		gohacks.Memmove(unsafe.Pointer(p), unsafe.Pointer(&src[0]), uintptr(size))
  6799  		return src[size:]
  6800  	}
  6801  	// Type UVM_REGISTER_GPU_PARAMS doesn't have a packed layout in memory, fallback to UnmarshalBytes.
  6802  	return p.UnmarshalBytes(src)
  6803  }
  6804  
  6805  // CopyOutN implements marshal.Marshallable.CopyOutN.
  6806  func (p *UVM_REGISTER_GPU_PARAMS) CopyOutN(cc marshal.CopyContext, addr hostarch.Addr, limit int) (int, error) {
  6807  	if !p.HClient.Packed() && p.HSMCPartRef.Packed() {
  6808  		// Type UVM_REGISTER_GPU_PARAMS doesn't have a packed layout in memory, fall back to MarshalBytes.
  6809  		buf := cc.CopyScratchBuffer(p.SizeBytes()) // escapes: okay.
  6810  		p.MarshalBytes(buf)                        // escapes: fallback.
  6811  		return cc.CopyOutBytes(addr, buf[:limit])  // escapes: okay.
  6812  	}
  6813  
  6814  	// Construct a slice backed by dst's underlying memory.
  6815  	var buf []byte
  6816  	hdr := (*reflect.SliceHeader)(unsafe.Pointer(&buf))
  6817  	hdr.Data = uintptr(gohacks.Noescape(unsafe.Pointer(p)))
  6818  	hdr.Len = p.SizeBytes()
  6819  	hdr.Cap = p.SizeBytes()
  6820  
  6821  	length, err := cc.CopyOutBytes(addr, buf[:limit]) // escapes: okay.
  6822  	// Since we bypassed the compiler's escape analysis, indicate that p
  6823  	// must live until the use above.
  6824  	runtime.KeepAlive(p) // escapes: replaced by intrinsic.
  6825  	return length, err
  6826  }
  6827  
  6828  // CopyOut implements marshal.Marshallable.CopyOut.
  6829  func (p *UVM_REGISTER_GPU_PARAMS) CopyOut(cc marshal.CopyContext, addr hostarch.Addr) (int, error) {
  6830  	return p.CopyOutN(cc, addr, p.SizeBytes())
  6831  }
  6832  
  6833  // CopyIn implements marshal.Marshallable.CopyIn.
  6834  func (p *UVM_REGISTER_GPU_PARAMS) CopyIn(cc marshal.CopyContext, addr hostarch.Addr) (int, error) {
  6835  	if !p.HClient.Packed() && p.HSMCPartRef.Packed() {
  6836  		// Type UVM_REGISTER_GPU_PARAMS doesn't have a packed layout in memory, fall back to UnmarshalBytes.
  6837  		buf := cc.CopyScratchBuffer(p.SizeBytes()) // escapes: okay.
  6838  		length, err := cc.CopyInBytes(addr, buf)   // escapes: okay.
  6839  		// Unmarshal unconditionally. If we had a short copy-in, this results in a
  6840  		// partially unmarshalled struct.
  6841  		p.UnmarshalBytes(buf) // escapes: fallback.
  6842  		return length, err
  6843  	}
  6844  
  6845  	// Construct a slice backed by dst's underlying memory.
  6846  	var buf []byte
  6847  	hdr := (*reflect.SliceHeader)(unsafe.Pointer(&buf))
  6848  	hdr.Data = uintptr(gohacks.Noescape(unsafe.Pointer(p)))
  6849  	hdr.Len = p.SizeBytes()
  6850  	hdr.Cap = p.SizeBytes()
  6851  
  6852  	length, err := cc.CopyInBytes(addr, buf) // escapes: okay.
  6853  	// Since we bypassed the compiler's escape analysis, indicate that p
  6854  	// must live until the use above.
  6855  	runtime.KeepAlive(p) // escapes: replaced by intrinsic.
  6856  	return length, err
  6857  }
  6858  
  6859  // WriteTo implements io.WriterTo.WriteTo.
  6860  func (p *UVM_REGISTER_GPU_PARAMS) WriteTo(writer io.Writer) (int64, error) {
  6861  	if !p.HClient.Packed() && p.HSMCPartRef.Packed() {
  6862  		// Type UVM_REGISTER_GPU_PARAMS doesn't have a packed layout in memory, fall back to MarshalBytes.
  6863  		buf := make([]byte, p.SizeBytes())
  6864  		p.MarshalBytes(buf)
  6865  		length, err := writer.Write(buf)
  6866  		return int64(length), err
  6867  	}
  6868  
  6869  	// Construct a slice backed by dst's underlying memory.
  6870  	var buf []byte
  6871  	hdr := (*reflect.SliceHeader)(unsafe.Pointer(&buf))
  6872  	hdr.Data = uintptr(gohacks.Noescape(unsafe.Pointer(p)))
  6873  	hdr.Len = p.SizeBytes()
  6874  	hdr.Cap = p.SizeBytes()
  6875  
  6876  	length, err := writer.Write(buf)
  6877  	// Since we bypassed the compiler's escape analysis, indicate that p
  6878  	// must live until the use above.
  6879  	runtime.KeepAlive(p) // escapes: replaced by intrinsic.
  6880  	return int64(length), err
  6881  }
  6882  
  6883  // SizeBytes implements marshal.Marshallable.SizeBytes.
  6884  func (p *UVM_REGISTER_GPU_VASPACE_PARAMS) SizeBytes() int {
  6885  	return 8 +
  6886  		1*16 +
  6887  		(*Handle)(nil).SizeBytes() +
  6888  		(*Handle)(nil).SizeBytes()
  6889  }
  6890  
  6891  // MarshalBytes implements marshal.Marshallable.MarshalBytes.
  6892  func (p *UVM_REGISTER_GPU_VASPACE_PARAMS) MarshalBytes(dst []byte) []byte {
  6893  	for idx := 0; idx < 16; idx++ {
  6894  		dst[0] = byte(p.GPUUUID[idx])
  6895  		dst = dst[1:]
  6896  	}
  6897  	hostarch.ByteOrder.PutUint32(dst[:4], uint32(p.RMCtrlFD))
  6898  	dst = dst[4:]
  6899  	dst = p.HClient.MarshalUnsafe(dst)
  6900  	dst = p.HVASpace.MarshalUnsafe(dst)
  6901  	hostarch.ByteOrder.PutUint32(dst[:4], uint32(p.RMStatus))
  6902  	dst = dst[4:]
  6903  	return dst
  6904  }
  6905  
  6906  // UnmarshalBytes implements marshal.Marshallable.UnmarshalBytes.
  6907  func (p *UVM_REGISTER_GPU_VASPACE_PARAMS) UnmarshalBytes(src []byte) []byte {
  6908  	for idx := 0; idx < 16; idx++ {
  6909  		p.GPUUUID[idx] = uint8(src[0])
  6910  		src = src[1:]
  6911  	}
  6912  	p.RMCtrlFD = int32(hostarch.ByteOrder.Uint32(src[:4]))
  6913  	src = src[4:]
  6914  	src = p.HClient.UnmarshalUnsafe(src)
  6915  	src = p.HVASpace.UnmarshalUnsafe(src)
  6916  	p.RMStatus = uint32(hostarch.ByteOrder.Uint32(src[:4]))
  6917  	src = src[4:]
  6918  	return src
  6919  }
  6920  
  6921  // Packed implements marshal.Marshallable.Packed.
  6922  //
  6923  //go:nosplit
  6924  func (p *UVM_REGISTER_GPU_VASPACE_PARAMS) Packed() bool {
  6925  	return p.HClient.Packed() && p.HVASpace.Packed()
  6926  }
  6927  
  6928  // MarshalUnsafe implements marshal.Marshallable.MarshalUnsafe.
  6929  func (p *UVM_REGISTER_GPU_VASPACE_PARAMS) MarshalUnsafe(dst []byte) []byte {
  6930  	if p.HClient.Packed() && p.HVASpace.Packed() {
  6931  		size := p.SizeBytes()
  6932  		gohacks.Memmove(unsafe.Pointer(&dst[0]), unsafe.Pointer(p), uintptr(size))
  6933  		return dst[size:]
  6934  	}
  6935  	// Type UVM_REGISTER_GPU_VASPACE_PARAMS doesn't have a packed layout in memory, fallback to MarshalBytes.
  6936  	return p.MarshalBytes(dst)
  6937  }
  6938  
  6939  // UnmarshalUnsafe implements marshal.Marshallable.UnmarshalUnsafe.
  6940  func (p *UVM_REGISTER_GPU_VASPACE_PARAMS) UnmarshalUnsafe(src []byte) []byte {
  6941  	if p.HClient.Packed() && p.HVASpace.Packed() {
  6942  		size := p.SizeBytes()
  6943  		gohacks.Memmove(unsafe.Pointer(p), unsafe.Pointer(&src[0]), uintptr(size))
  6944  		return src[size:]
  6945  	}
  6946  	// Type UVM_REGISTER_GPU_VASPACE_PARAMS doesn't have a packed layout in memory, fallback to UnmarshalBytes.
  6947  	return p.UnmarshalBytes(src)
  6948  }
  6949  
  6950  // CopyOutN implements marshal.Marshallable.CopyOutN.
  6951  func (p *UVM_REGISTER_GPU_VASPACE_PARAMS) CopyOutN(cc marshal.CopyContext, addr hostarch.Addr, limit int) (int, error) {
  6952  	if !p.HClient.Packed() && p.HVASpace.Packed() {
  6953  		// Type UVM_REGISTER_GPU_VASPACE_PARAMS doesn't have a packed layout in memory, fall back to MarshalBytes.
  6954  		buf := cc.CopyScratchBuffer(p.SizeBytes()) // escapes: okay.
  6955  		p.MarshalBytes(buf)                        // escapes: fallback.
  6956  		return cc.CopyOutBytes(addr, buf[:limit])  // escapes: okay.
  6957  	}
  6958  
  6959  	// Construct a slice backed by dst's underlying memory.
  6960  	var buf []byte
  6961  	hdr := (*reflect.SliceHeader)(unsafe.Pointer(&buf))
  6962  	hdr.Data = uintptr(gohacks.Noescape(unsafe.Pointer(p)))
  6963  	hdr.Len = p.SizeBytes()
  6964  	hdr.Cap = p.SizeBytes()
  6965  
  6966  	length, err := cc.CopyOutBytes(addr, buf[:limit]) // escapes: okay.
  6967  	// Since we bypassed the compiler's escape analysis, indicate that p
  6968  	// must live until the use above.
  6969  	runtime.KeepAlive(p) // escapes: replaced by intrinsic.
  6970  	return length, err
  6971  }
  6972  
  6973  // CopyOut implements marshal.Marshallable.CopyOut.
  6974  func (p *UVM_REGISTER_GPU_VASPACE_PARAMS) CopyOut(cc marshal.CopyContext, addr hostarch.Addr) (int, error) {
  6975  	return p.CopyOutN(cc, addr, p.SizeBytes())
  6976  }
  6977  
  6978  // CopyIn implements marshal.Marshallable.CopyIn.
  6979  func (p *UVM_REGISTER_GPU_VASPACE_PARAMS) CopyIn(cc marshal.CopyContext, addr hostarch.Addr) (int, error) {
  6980  	if !p.HClient.Packed() && p.HVASpace.Packed() {
  6981  		// Type UVM_REGISTER_GPU_VASPACE_PARAMS doesn't have a packed layout in memory, fall back to UnmarshalBytes.
  6982  		buf := cc.CopyScratchBuffer(p.SizeBytes()) // escapes: okay.
  6983  		length, err := cc.CopyInBytes(addr, buf)   // escapes: okay.
  6984  		// Unmarshal unconditionally. If we had a short copy-in, this results in a
  6985  		// partially unmarshalled struct.
  6986  		p.UnmarshalBytes(buf) // escapes: fallback.
  6987  		return length, err
  6988  	}
  6989  
  6990  	// Construct a slice backed by dst's underlying memory.
  6991  	var buf []byte
  6992  	hdr := (*reflect.SliceHeader)(unsafe.Pointer(&buf))
  6993  	hdr.Data = uintptr(gohacks.Noescape(unsafe.Pointer(p)))
  6994  	hdr.Len = p.SizeBytes()
  6995  	hdr.Cap = p.SizeBytes()
  6996  
  6997  	length, err := cc.CopyInBytes(addr, buf) // escapes: okay.
  6998  	// Since we bypassed the compiler's escape analysis, indicate that p
  6999  	// must live until the use above.
  7000  	runtime.KeepAlive(p) // escapes: replaced by intrinsic.
  7001  	return length, err
  7002  }
  7003  
  7004  // WriteTo implements io.WriterTo.WriteTo.
  7005  func (p *UVM_REGISTER_GPU_VASPACE_PARAMS) WriteTo(writer io.Writer) (int64, error) {
  7006  	if !p.HClient.Packed() && p.HVASpace.Packed() {
  7007  		// Type UVM_REGISTER_GPU_VASPACE_PARAMS doesn't have a packed layout in memory, fall back to MarshalBytes.
  7008  		buf := make([]byte, p.SizeBytes())
  7009  		p.MarshalBytes(buf)
  7010  		length, err := writer.Write(buf)
  7011  		return int64(length), err
  7012  	}
  7013  
  7014  	// Construct a slice backed by dst's underlying memory.
  7015  	var buf []byte
  7016  	hdr := (*reflect.SliceHeader)(unsafe.Pointer(&buf))
  7017  	hdr.Data = uintptr(gohacks.Noescape(unsafe.Pointer(p)))
  7018  	hdr.Len = p.SizeBytes()
  7019  	hdr.Cap = p.SizeBytes()
  7020  
  7021  	length, err := writer.Write(buf)
  7022  	// Since we bypassed the compiler's escape analysis, indicate that p
  7023  	// must live until the use above.
  7024  	runtime.KeepAlive(p) // escapes: replaced by intrinsic.
  7025  	return int64(length), err
  7026  }
  7027  
  7028  // SizeBytes implements marshal.Marshallable.SizeBytes.
  7029  func (u *UVM_UNREGISTER_CHANNEL_PARAMS) SizeBytes() int {
  7030  	return 4 +
  7031  		1*16 +
  7032  		(*Handle)(nil).SizeBytes() +
  7033  		(*Handle)(nil).SizeBytes()
  7034  }
  7035  
  7036  // MarshalBytes implements marshal.Marshallable.MarshalBytes.
  7037  func (u *UVM_UNREGISTER_CHANNEL_PARAMS) MarshalBytes(dst []byte) []byte {
  7038  	for idx := 0; idx < 16; idx++ {
  7039  		dst[0] = byte(u.GPUUUID[idx])
  7040  		dst = dst[1:]
  7041  	}
  7042  	dst = u.HClient.MarshalUnsafe(dst)
  7043  	dst = u.HChannel.MarshalUnsafe(dst)
  7044  	hostarch.ByteOrder.PutUint32(dst[:4], uint32(u.RMStatus))
  7045  	dst = dst[4:]
  7046  	return dst
  7047  }
  7048  
  7049  // UnmarshalBytes implements marshal.Marshallable.UnmarshalBytes.
  7050  func (u *UVM_UNREGISTER_CHANNEL_PARAMS) UnmarshalBytes(src []byte) []byte {
  7051  	for idx := 0; idx < 16; idx++ {
  7052  		u.GPUUUID[idx] = uint8(src[0])
  7053  		src = src[1:]
  7054  	}
  7055  	src = u.HClient.UnmarshalUnsafe(src)
  7056  	src = u.HChannel.UnmarshalUnsafe(src)
  7057  	u.RMStatus = uint32(hostarch.ByteOrder.Uint32(src[:4]))
  7058  	src = src[4:]
  7059  	return src
  7060  }
  7061  
  7062  // Packed implements marshal.Marshallable.Packed.
  7063  //
  7064  //go:nosplit
  7065  func (u *UVM_UNREGISTER_CHANNEL_PARAMS) Packed() bool {
  7066  	return u.HChannel.Packed() && u.HClient.Packed()
  7067  }
  7068  
  7069  // MarshalUnsafe implements marshal.Marshallable.MarshalUnsafe.
  7070  func (u *UVM_UNREGISTER_CHANNEL_PARAMS) MarshalUnsafe(dst []byte) []byte {
  7071  	if u.HChannel.Packed() && u.HClient.Packed() {
  7072  		size := u.SizeBytes()
  7073  		gohacks.Memmove(unsafe.Pointer(&dst[0]), unsafe.Pointer(u), uintptr(size))
  7074  		return dst[size:]
  7075  	}
  7076  	// Type UVM_UNREGISTER_CHANNEL_PARAMS doesn't have a packed layout in memory, fallback to MarshalBytes.
  7077  	return u.MarshalBytes(dst)
  7078  }
  7079  
  7080  // UnmarshalUnsafe implements marshal.Marshallable.UnmarshalUnsafe.
  7081  func (u *UVM_UNREGISTER_CHANNEL_PARAMS) UnmarshalUnsafe(src []byte) []byte {
  7082  	if u.HChannel.Packed() && u.HClient.Packed() {
  7083  		size := u.SizeBytes()
  7084  		gohacks.Memmove(unsafe.Pointer(u), unsafe.Pointer(&src[0]), uintptr(size))
  7085  		return src[size:]
  7086  	}
  7087  	// Type UVM_UNREGISTER_CHANNEL_PARAMS doesn't have a packed layout in memory, fallback to UnmarshalBytes.
  7088  	return u.UnmarshalBytes(src)
  7089  }
  7090  
  7091  // CopyOutN implements marshal.Marshallable.CopyOutN.
  7092  func (u *UVM_UNREGISTER_CHANNEL_PARAMS) CopyOutN(cc marshal.CopyContext, addr hostarch.Addr, limit int) (int, error) {
  7093  	if !u.HChannel.Packed() && u.HClient.Packed() {
  7094  		// Type UVM_UNREGISTER_CHANNEL_PARAMS doesn't have a packed layout in memory, fall back to MarshalBytes.
  7095  		buf := cc.CopyScratchBuffer(u.SizeBytes()) // escapes: okay.
  7096  		u.MarshalBytes(buf)                        // escapes: fallback.
  7097  		return cc.CopyOutBytes(addr, buf[:limit])  // escapes: okay.
  7098  	}
  7099  
  7100  	// Construct a slice backed by dst's underlying memory.
  7101  	var buf []byte
  7102  	hdr := (*reflect.SliceHeader)(unsafe.Pointer(&buf))
  7103  	hdr.Data = uintptr(gohacks.Noescape(unsafe.Pointer(u)))
  7104  	hdr.Len = u.SizeBytes()
  7105  	hdr.Cap = u.SizeBytes()
  7106  
  7107  	length, err := cc.CopyOutBytes(addr, buf[:limit]) // escapes: okay.
  7108  	// Since we bypassed the compiler's escape analysis, indicate that u
  7109  	// must live until the use above.
  7110  	runtime.KeepAlive(u) // escapes: replaced by intrinsic.
  7111  	return length, err
  7112  }
  7113  
  7114  // CopyOut implements marshal.Marshallable.CopyOut.
  7115  func (u *UVM_UNREGISTER_CHANNEL_PARAMS) CopyOut(cc marshal.CopyContext, addr hostarch.Addr) (int, error) {
  7116  	return u.CopyOutN(cc, addr, u.SizeBytes())
  7117  }
  7118  
  7119  // CopyIn implements marshal.Marshallable.CopyIn.
  7120  func (u *UVM_UNREGISTER_CHANNEL_PARAMS) CopyIn(cc marshal.CopyContext, addr hostarch.Addr) (int, error) {
  7121  	if !u.HChannel.Packed() && u.HClient.Packed() {
  7122  		// Type UVM_UNREGISTER_CHANNEL_PARAMS doesn't have a packed layout in memory, fall back to UnmarshalBytes.
  7123  		buf := cc.CopyScratchBuffer(u.SizeBytes()) // escapes: okay.
  7124  		length, err := cc.CopyInBytes(addr, buf)   // escapes: okay.
  7125  		// Unmarshal unconditionally. If we had a short copy-in, this results in a
  7126  		// partially unmarshalled struct.
  7127  		u.UnmarshalBytes(buf) // escapes: fallback.
  7128  		return length, err
  7129  	}
  7130  
  7131  	// Construct a slice backed by dst's underlying memory.
  7132  	var buf []byte
  7133  	hdr := (*reflect.SliceHeader)(unsafe.Pointer(&buf))
  7134  	hdr.Data = uintptr(gohacks.Noescape(unsafe.Pointer(u)))
  7135  	hdr.Len = u.SizeBytes()
  7136  	hdr.Cap = u.SizeBytes()
  7137  
  7138  	length, err := cc.CopyInBytes(addr, buf) // escapes: okay.
  7139  	// Since we bypassed the compiler's escape analysis, indicate that u
  7140  	// must live until the use above.
  7141  	runtime.KeepAlive(u) // escapes: replaced by intrinsic.
  7142  	return length, err
  7143  }
  7144  
  7145  // WriteTo implements io.WriterTo.WriteTo.
  7146  func (u *UVM_UNREGISTER_CHANNEL_PARAMS) WriteTo(writer io.Writer) (int64, error) {
  7147  	if !u.HChannel.Packed() && u.HClient.Packed() {
  7148  		// Type UVM_UNREGISTER_CHANNEL_PARAMS doesn't have a packed layout in memory, fall back to MarshalBytes.
  7149  		buf := make([]byte, u.SizeBytes())
  7150  		u.MarshalBytes(buf)
  7151  		length, err := writer.Write(buf)
  7152  		return int64(length), err
  7153  	}
  7154  
  7155  	// Construct a slice backed by dst's underlying memory.
  7156  	var buf []byte
  7157  	hdr := (*reflect.SliceHeader)(unsafe.Pointer(&buf))
  7158  	hdr.Data = uintptr(gohacks.Noescape(unsafe.Pointer(u)))
  7159  	hdr.Len = u.SizeBytes()
  7160  	hdr.Cap = u.SizeBytes()
  7161  
  7162  	length, err := writer.Write(buf)
  7163  	// Since we bypassed the compiler's escape analysis, indicate that u
  7164  	// must live until the use above.
  7165  	runtime.KeepAlive(u) // escapes: replaced by intrinsic.
  7166  	return int64(length), err
  7167  }
  7168  
  7169  // SizeBytes implements marshal.Marshallable.SizeBytes.
  7170  func (u *UVM_UNREGISTER_GPU_PARAMS) SizeBytes() int {
  7171  	return 4 +
  7172  		1*16
  7173  }
  7174  
  7175  // MarshalBytes implements marshal.Marshallable.MarshalBytes.
  7176  func (u *UVM_UNREGISTER_GPU_PARAMS) MarshalBytes(dst []byte) []byte {
  7177  	for idx := 0; idx < 16; idx++ {
  7178  		dst[0] = byte(u.GPUUUID[idx])
  7179  		dst = dst[1:]
  7180  	}
  7181  	hostarch.ByteOrder.PutUint32(dst[:4], uint32(u.RMStatus))
  7182  	dst = dst[4:]
  7183  	return dst
  7184  }
  7185  
  7186  // UnmarshalBytes implements marshal.Marshallable.UnmarshalBytes.
  7187  func (u *UVM_UNREGISTER_GPU_PARAMS) UnmarshalBytes(src []byte) []byte {
  7188  	for idx := 0; idx < 16; idx++ {
  7189  		u.GPUUUID[idx] = uint8(src[0])
  7190  		src = src[1:]
  7191  	}
  7192  	u.RMStatus = uint32(hostarch.ByteOrder.Uint32(src[:4]))
  7193  	src = src[4:]
  7194  	return src
  7195  }
  7196  
  7197  // Packed implements marshal.Marshallable.Packed.
  7198  //
  7199  //go:nosplit
  7200  func (u *UVM_UNREGISTER_GPU_PARAMS) Packed() bool {
  7201  	return true
  7202  }
  7203  
  7204  // MarshalUnsafe implements marshal.Marshallable.MarshalUnsafe.
  7205  func (u *UVM_UNREGISTER_GPU_PARAMS) MarshalUnsafe(dst []byte) []byte {
  7206  	size := u.SizeBytes()
  7207  	gohacks.Memmove(unsafe.Pointer(&dst[0]), unsafe.Pointer(u), uintptr(size))
  7208  	return dst[size:]
  7209  }
  7210  
  7211  // UnmarshalUnsafe implements marshal.Marshallable.UnmarshalUnsafe.
  7212  func (u *UVM_UNREGISTER_GPU_PARAMS) UnmarshalUnsafe(src []byte) []byte {
  7213  	size := u.SizeBytes()
  7214  	gohacks.Memmove(unsafe.Pointer(u), unsafe.Pointer(&src[0]), uintptr(size))
  7215  	return src[size:]
  7216  }
  7217  
  7218  // CopyOutN implements marshal.Marshallable.CopyOutN.
  7219  func (u *UVM_UNREGISTER_GPU_PARAMS) CopyOutN(cc marshal.CopyContext, addr hostarch.Addr, limit int) (int, error) {
  7220  	// Construct a slice backed by dst's underlying memory.
  7221  	var buf []byte
  7222  	hdr := (*reflect.SliceHeader)(unsafe.Pointer(&buf))
  7223  	hdr.Data = uintptr(gohacks.Noescape(unsafe.Pointer(u)))
  7224  	hdr.Len = u.SizeBytes()
  7225  	hdr.Cap = u.SizeBytes()
  7226  
  7227  	length, err := cc.CopyOutBytes(addr, buf[:limit]) // escapes: okay.
  7228  	// Since we bypassed the compiler's escape analysis, indicate that u
  7229  	// must live until the use above.
  7230  	runtime.KeepAlive(u) // escapes: replaced by intrinsic.
  7231  	return length, err
  7232  }
  7233  
  7234  // CopyOut implements marshal.Marshallable.CopyOut.
  7235  func (u *UVM_UNREGISTER_GPU_PARAMS) CopyOut(cc marshal.CopyContext, addr hostarch.Addr) (int, error) {
  7236  	return u.CopyOutN(cc, addr, u.SizeBytes())
  7237  }
  7238  
  7239  // CopyIn implements marshal.Marshallable.CopyIn.
  7240  func (u *UVM_UNREGISTER_GPU_PARAMS) CopyIn(cc marshal.CopyContext, addr hostarch.Addr) (int, error) {
  7241  	// Construct a slice backed by dst's underlying memory.
  7242  	var buf []byte
  7243  	hdr := (*reflect.SliceHeader)(unsafe.Pointer(&buf))
  7244  	hdr.Data = uintptr(gohacks.Noescape(unsafe.Pointer(u)))
  7245  	hdr.Len = u.SizeBytes()
  7246  	hdr.Cap = u.SizeBytes()
  7247  
  7248  	length, err := cc.CopyInBytes(addr, buf) // escapes: okay.
  7249  	// Since we bypassed the compiler's escape analysis, indicate that u
  7250  	// must live until the use above.
  7251  	runtime.KeepAlive(u) // escapes: replaced by intrinsic.
  7252  	return length, err
  7253  }
  7254  
  7255  // WriteTo implements io.WriterTo.WriteTo.
  7256  func (u *UVM_UNREGISTER_GPU_PARAMS) WriteTo(writer io.Writer) (int64, error) {
  7257  	// Construct a slice backed by dst's underlying memory.
  7258  	var buf []byte
  7259  	hdr := (*reflect.SliceHeader)(unsafe.Pointer(&buf))
  7260  	hdr.Data = uintptr(gohacks.Noescape(unsafe.Pointer(u)))
  7261  	hdr.Len = u.SizeBytes()
  7262  	hdr.Cap = u.SizeBytes()
  7263  
  7264  	length, err := writer.Write(buf)
  7265  	// Since we bypassed the compiler's escape analysis, indicate that u
  7266  	// must live until the use above.
  7267  	runtime.KeepAlive(u) // escapes: replaced by intrinsic.
  7268  	return int64(length), err
  7269  }
  7270  
  7271  // SizeBytes implements marshal.Marshallable.SizeBytes.
  7272  func (u *UVM_UNREGISTER_GPU_VASPACE_PARAMS) SizeBytes() int {
  7273  	return 4 +
  7274  		1*16
  7275  }
  7276  
  7277  // MarshalBytes implements marshal.Marshallable.MarshalBytes.
  7278  func (u *UVM_UNREGISTER_GPU_VASPACE_PARAMS) MarshalBytes(dst []byte) []byte {
  7279  	for idx := 0; idx < 16; idx++ {
  7280  		dst[0] = byte(u.GPUUUID[idx])
  7281  		dst = dst[1:]
  7282  	}
  7283  	hostarch.ByteOrder.PutUint32(dst[:4], uint32(u.RMStatus))
  7284  	dst = dst[4:]
  7285  	return dst
  7286  }
  7287  
  7288  // UnmarshalBytes implements marshal.Marshallable.UnmarshalBytes.
  7289  func (u *UVM_UNREGISTER_GPU_VASPACE_PARAMS) UnmarshalBytes(src []byte) []byte {
  7290  	for idx := 0; idx < 16; idx++ {
  7291  		u.GPUUUID[idx] = uint8(src[0])
  7292  		src = src[1:]
  7293  	}
  7294  	u.RMStatus = uint32(hostarch.ByteOrder.Uint32(src[:4]))
  7295  	src = src[4:]
  7296  	return src
  7297  }
  7298  
  7299  // Packed implements marshal.Marshallable.Packed.
  7300  //
  7301  //go:nosplit
  7302  func (u *UVM_UNREGISTER_GPU_VASPACE_PARAMS) Packed() bool {
  7303  	return true
  7304  }
  7305  
  7306  // MarshalUnsafe implements marshal.Marshallable.MarshalUnsafe.
  7307  func (u *UVM_UNREGISTER_GPU_VASPACE_PARAMS) MarshalUnsafe(dst []byte) []byte {
  7308  	size := u.SizeBytes()
  7309  	gohacks.Memmove(unsafe.Pointer(&dst[0]), unsafe.Pointer(u), uintptr(size))
  7310  	return dst[size:]
  7311  }
  7312  
  7313  // UnmarshalUnsafe implements marshal.Marshallable.UnmarshalUnsafe.
  7314  func (u *UVM_UNREGISTER_GPU_VASPACE_PARAMS) UnmarshalUnsafe(src []byte) []byte {
  7315  	size := u.SizeBytes()
  7316  	gohacks.Memmove(unsafe.Pointer(u), unsafe.Pointer(&src[0]), uintptr(size))
  7317  	return src[size:]
  7318  }
  7319  
  7320  // CopyOutN implements marshal.Marshallable.CopyOutN.
  7321  func (u *UVM_UNREGISTER_GPU_VASPACE_PARAMS) CopyOutN(cc marshal.CopyContext, addr hostarch.Addr, limit int) (int, error) {
  7322  	// Construct a slice backed by dst's underlying memory.
  7323  	var buf []byte
  7324  	hdr := (*reflect.SliceHeader)(unsafe.Pointer(&buf))
  7325  	hdr.Data = uintptr(gohacks.Noescape(unsafe.Pointer(u)))
  7326  	hdr.Len = u.SizeBytes()
  7327  	hdr.Cap = u.SizeBytes()
  7328  
  7329  	length, err := cc.CopyOutBytes(addr, buf[:limit]) // escapes: okay.
  7330  	// Since we bypassed the compiler's escape analysis, indicate that u
  7331  	// must live until the use above.
  7332  	runtime.KeepAlive(u) // escapes: replaced by intrinsic.
  7333  	return length, err
  7334  }
  7335  
  7336  // CopyOut implements marshal.Marshallable.CopyOut.
  7337  func (u *UVM_UNREGISTER_GPU_VASPACE_PARAMS) CopyOut(cc marshal.CopyContext, addr hostarch.Addr) (int, error) {
  7338  	return u.CopyOutN(cc, addr, u.SizeBytes())
  7339  }
  7340  
  7341  // CopyIn implements marshal.Marshallable.CopyIn.
  7342  func (u *UVM_UNREGISTER_GPU_VASPACE_PARAMS) CopyIn(cc marshal.CopyContext, addr hostarch.Addr) (int, error) {
  7343  	// Construct a slice backed by dst's underlying memory.
  7344  	var buf []byte
  7345  	hdr := (*reflect.SliceHeader)(unsafe.Pointer(&buf))
  7346  	hdr.Data = uintptr(gohacks.Noescape(unsafe.Pointer(u)))
  7347  	hdr.Len = u.SizeBytes()
  7348  	hdr.Cap = u.SizeBytes()
  7349  
  7350  	length, err := cc.CopyInBytes(addr, buf) // escapes: okay.
  7351  	// Since we bypassed the compiler's escape analysis, indicate that u
  7352  	// must live until the use above.
  7353  	runtime.KeepAlive(u) // escapes: replaced by intrinsic.
  7354  	return length, err
  7355  }
  7356  
  7357  // WriteTo implements io.WriterTo.WriteTo.
  7358  func (u *UVM_UNREGISTER_GPU_VASPACE_PARAMS) WriteTo(writer io.Writer) (int64, error) {
  7359  	// Construct a slice backed by dst's underlying memory.
  7360  	var buf []byte
  7361  	hdr := (*reflect.SliceHeader)(unsafe.Pointer(&buf))
  7362  	hdr.Data = uintptr(gohacks.Noescape(unsafe.Pointer(u)))
  7363  	hdr.Len = u.SizeBytes()
  7364  	hdr.Cap = u.SizeBytes()
  7365  
  7366  	length, err := writer.Write(buf)
  7367  	// Since we bypassed the compiler's escape analysis, indicate that u
  7368  	// must live until the use above.
  7369  	runtime.KeepAlive(u) // escapes: replaced by intrinsic.
  7370  	return int64(length), err
  7371  }
  7372  
  7373  // SizeBytes implements marshal.Marshallable.SizeBytes.
  7374  func (u *UVM_VALIDATE_VA_RANGE_PARAMS) SizeBytes() int {
  7375  	return 20 +
  7376  		1*4
  7377  }
  7378  
  7379  // MarshalBytes implements marshal.Marshallable.MarshalBytes.
  7380  func (u *UVM_VALIDATE_VA_RANGE_PARAMS) MarshalBytes(dst []byte) []byte {
  7381  	hostarch.ByteOrder.PutUint64(dst[:8], uint64(u.Base))
  7382  	dst = dst[8:]
  7383  	hostarch.ByteOrder.PutUint64(dst[:8], uint64(u.Length))
  7384  	dst = dst[8:]
  7385  	hostarch.ByteOrder.PutUint32(dst[:4], uint32(u.RMStatus))
  7386  	dst = dst[4:]
  7387  	for idx := 0; idx < 4; idx++ {
  7388  		dst[0] = byte(u.Pad0[idx])
  7389  		dst = dst[1:]
  7390  	}
  7391  	return dst
  7392  }
  7393  
  7394  // UnmarshalBytes implements marshal.Marshallable.UnmarshalBytes.
  7395  func (u *UVM_VALIDATE_VA_RANGE_PARAMS) UnmarshalBytes(src []byte) []byte {
  7396  	u.Base = uint64(hostarch.ByteOrder.Uint64(src[:8]))
  7397  	src = src[8:]
  7398  	u.Length = uint64(hostarch.ByteOrder.Uint64(src[:8]))
  7399  	src = src[8:]
  7400  	u.RMStatus = uint32(hostarch.ByteOrder.Uint32(src[:4]))
  7401  	src = src[4:]
  7402  	for idx := 0; idx < 4; idx++ {
  7403  		u.Pad0[idx] = src[0]
  7404  		src = src[1:]
  7405  	}
  7406  	return src
  7407  }
  7408  
  7409  // Packed implements marshal.Marshallable.Packed.
  7410  //
  7411  //go:nosplit
  7412  func (u *UVM_VALIDATE_VA_RANGE_PARAMS) Packed() bool {
  7413  	return true
  7414  }
  7415  
  7416  // MarshalUnsafe implements marshal.Marshallable.MarshalUnsafe.
  7417  func (u *UVM_VALIDATE_VA_RANGE_PARAMS) MarshalUnsafe(dst []byte) []byte {
  7418  	size := u.SizeBytes()
  7419  	gohacks.Memmove(unsafe.Pointer(&dst[0]), unsafe.Pointer(u), uintptr(size))
  7420  	return dst[size:]
  7421  }
  7422  
  7423  // UnmarshalUnsafe implements marshal.Marshallable.UnmarshalUnsafe.
  7424  func (u *UVM_VALIDATE_VA_RANGE_PARAMS) UnmarshalUnsafe(src []byte) []byte {
  7425  	size := u.SizeBytes()
  7426  	gohacks.Memmove(unsafe.Pointer(u), unsafe.Pointer(&src[0]), uintptr(size))
  7427  	return src[size:]
  7428  }
  7429  
  7430  // CopyOutN implements marshal.Marshallable.CopyOutN.
  7431  func (u *UVM_VALIDATE_VA_RANGE_PARAMS) CopyOutN(cc marshal.CopyContext, addr hostarch.Addr, limit int) (int, error) {
  7432  	// Construct a slice backed by dst's underlying memory.
  7433  	var buf []byte
  7434  	hdr := (*reflect.SliceHeader)(unsafe.Pointer(&buf))
  7435  	hdr.Data = uintptr(gohacks.Noescape(unsafe.Pointer(u)))
  7436  	hdr.Len = u.SizeBytes()
  7437  	hdr.Cap = u.SizeBytes()
  7438  
  7439  	length, err := cc.CopyOutBytes(addr, buf[:limit]) // escapes: okay.
  7440  	// Since we bypassed the compiler's escape analysis, indicate that u
  7441  	// must live until the use above.
  7442  	runtime.KeepAlive(u) // escapes: replaced by intrinsic.
  7443  	return length, err
  7444  }
  7445  
  7446  // CopyOut implements marshal.Marshallable.CopyOut.
  7447  func (u *UVM_VALIDATE_VA_RANGE_PARAMS) CopyOut(cc marshal.CopyContext, addr hostarch.Addr) (int, error) {
  7448  	return u.CopyOutN(cc, addr, u.SizeBytes())
  7449  }
  7450  
  7451  // CopyIn implements marshal.Marshallable.CopyIn.
  7452  func (u *UVM_VALIDATE_VA_RANGE_PARAMS) CopyIn(cc marshal.CopyContext, addr hostarch.Addr) (int, error) {
  7453  	// Construct a slice backed by dst's underlying memory.
  7454  	var buf []byte
  7455  	hdr := (*reflect.SliceHeader)(unsafe.Pointer(&buf))
  7456  	hdr.Data = uintptr(gohacks.Noescape(unsafe.Pointer(u)))
  7457  	hdr.Len = u.SizeBytes()
  7458  	hdr.Cap = u.SizeBytes()
  7459  
  7460  	length, err := cc.CopyInBytes(addr, buf) // escapes: okay.
  7461  	// Since we bypassed the compiler's escape analysis, indicate that u
  7462  	// must live until the use above.
  7463  	runtime.KeepAlive(u) // escapes: replaced by intrinsic.
  7464  	return length, err
  7465  }
  7466  
  7467  // WriteTo implements io.WriterTo.WriteTo.
  7468  func (u *UVM_VALIDATE_VA_RANGE_PARAMS) WriteTo(writer io.Writer) (int64, error) {
  7469  	// Construct a slice backed by dst's underlying memory.
  7470  	var buf []byte
  7471  	hdr := (*reflect.SliceHeader)(unsafe.Pointer(&buf))
  7472  	hdr.Data = uintptr(gohacks.Noescape(unsafe.Pointer(u)))
  7473  	hdr.Len = u.SizeBytes()
  7474  	hdr.Cap = u.SizeBytes()
  7475  
  7476  	length, err := writer.Write(buf)
  7477  	// Since we bypassed the compiler's escape analysis, indicate that u
  7478  	// must live until the use above.
  7479  	runtime.KeepAlive(u) // escapes: replaced by intrinsic.
  7480  	return int64(length), err
  7481  }
  7482  
  7483  // SizeBytes implements marshal.Marshallable.SizeBytes.
  7484  func (u *UvmGpuMappingAttributes) SizeBytes() int {
  7485  	return 20 +
  7486  		1*16
  7487  }
  7488  
  7489  // MarshalBytes implements marshal.Marshallable.MarshalBytes.
  7490  func (u *UvmGpuMappingAttributes) MarshalBytes(dst []byte) []byte {
  7491  	for idx := 0; idx < 16; idx++ {
  7492  		dst[0] = byte(u.GPUUUID[idx])
  7493  		dst = dst[1:]
  7494  	}
  7495  	hostarch.ByteOrder.PutUint32(dst[:4], uint32(u.GPUMappingType))
  7496  	dst = dst[4:]
  7497  	hostarch.ByteOrder.PutUint32(dst[:4], uint32(u.GPUCachingType))
  7498  	dst = dst[4:]
  7499  	hostarch.ByteOrder.PutUint32(dst[:4], uint32(u.GPUFormatType))
  7500  	dst = dst[4:]
  7501  	hostarch.ByteOrder.PutUint32(dst[:4], uint32(u.GPUElementBits))
  7502  	dst = dst[4:]
  7503  	hostarch.ByteOrder.PutUint32(dst[:4], uint32(u.GPUCompressionType))
  7504  	dst = dst[4:]
  7505  	return dst
  7506  }
  7507  
  7508  // UnmarshalBytes implements marshal.Marshallable.UnmarshalBytes.
  7509  func (u *UvmGpuMappingAttributes) UnmarshalBytes(src []byte) []byte {
  7510  	for idx := 0; idx < 16; idx++ {
  7511  		u.GPUUUID[idx] = src[0]
  7512  		src = src[1:]
  7513  	}
  7514  	u.GPUMappingType = uint32(hostarch.ByteOrder.Uint32(src[:4]))
  7515  	src = src[4:]
  7516  	u.GPUCachingType = uint32(hostarch.ByteOrder.Uint32(src[:4]))
  7517  	src = src[4:]
  7518  	u.GPUFormatType = uint32(hostarch.ByteOrder.Uint32(src[:4]))
  7519  	src = src[4:]
  7520  	u.GPUElementBits = uint32(hostarch.ByteOrder.Uint32(src[:4]))
  7521  	src = src[4:]
  7522  	u.GPUCompressionType = uint32(hostarch.ByteOrder.Uint32(src[:4]))
  7523  	src = src[4:]
  7524  	return src
  7525  }
  7526  
  7527  // Packed implements marshal.Marshallable.Packed.
  7528  //
  7529  //go:nosplit
  7530  func (u *UvmGpuMappingAttributes) Packed() bool {
  7531  	return true
  7532  }
  7533  
  7534  // MarshalUnsafe implements marshal.Marshallable.MarshalUnsafe.
  7535  func (u *UvmGpuMappingAttributes) MarshalUnsafe(dst []byte) []byte {
  7536  	size := u.SizeBytes()
  7537  	gohacks.Memmove(unsafe.Pointer(&dst[0]), unsafe.Pointer(u), uintptr(size))
  7538  	return dst[size:]
  7539  }
  7540  
  7541  // UnmarshalUnsafe implements marshal.Marshallable.UnmarshalUnsafe.
  7542  func (u *UvmGpuMappingAttributes) UnmarshalUnsafe(src []byte) []byte {
  7543  	size := u.SizeBytes()
  7544  	gohacks.Memmove(unsafe.Pointer(u), unsafe.Pointer(&src[0]), uintptr(size))
  7545  	return src[size:]
  7546  }
  7547  
  7548  // CopyOutN implements marshal.Marshallable.CopyOutN.
  7549  func (u *UvmGpuMappingAttributes) CopyOutN(cc marshal.CopyContext, addr hostarch.Addr, limit int) (int, error) {
  7550  	// Construct a slice backed by dst's underlying memory.
  7551  	var buf []byte
  7552  	hdr := (*reflect.SliceHeader)(unsafe.Pointer(&buf))
  7553  	hdr.Data = uintptr(gohacks.Noescape(unsafe.Pointer(u)))
  7554  	hdr.Len = u.SizeBytes()
  7555  	hdr.Cap = u.SizeBytes()
  7556  
  7557  	length, err := cc.CopyOutBytes(addr, buf[:limit]) // escapes: okay.
  7558  	// Since we bypassed the compiler's escape analysis, indicate that u
  7559  	// must live until the use above.
  7560  	runtime.KeepAlive(u) // escapes: replaced by intrinsic.
  7561  	return length, err
  7562  }
  7563  
  7564  // CopyOut implements marshal.Marshallable.CopyOut.
  7565  func (u *UvmGpuMappingAttributes) CopyOut(cc marshal.CopyContext, addr hostarch.Addr) (int, error) {
  7566  	return u.CopyOutN(cc, addr, u.SizeBytes())
  7567  }
  7568  
  7569  // CopyIn implements marshal.Marshallable.CopyIn.
  7570  func (u *UvmGpuMappingAttributes) CopyIn(cc marshal.CopyContext, addr hostarch.Addr) (int, error) {
  7571  	// Construct a slice backed by dst's underlying memory.
  7572  	var buf []byte
  7573  	hdr := (*reflect.SliceHeader)(unsafe.Pointer(&buf))
  7574  	hdr.Data = uintptr(gohacks.Noescape(unsafe.Pointer(u)))
  7575  	hdr.Len = u.SizeBytes()
  7576  	hdr.Cap = u.SizeBytes()
  7577  
  7578  	length, err := cc.CopyInBytes(addr, buf) // escapes: okay.
  7579  	// Since we bypassed the compiler's escape analysis, indicate that u
  7580  	// must live until the use above.
  7581  	runtime.KeepAlive(u) // escapes: replaced by intrinsic.
  7582  	return length, err
  7583  }
  7584  
  7585  // WriteTo implements io.WriterTo.WriteTo.
  7586  func (u *UvmGpuMappingAttributes) WriteTo(writer io.Writer) (int64, error) {
  7587  	// Construct a slice backed by dst's underlying memory.
  7588  	var buf []byte
  7589  	hdr := (*reflect.SliceHeader)(unsafe.Pointer(&buf))
  7590  	hdr.Data = uintptr(gohacks.Noescape(unsafe.Pointer(u)))
  7591  	hdr.Len = u.SizeBytes()
  7592  	hdr.Cap = u.SizeBytes()
  7593  
  7594  	length, err := writer.Write(buf)
  7595  	// Since we bypassed the compiler's escape analysis, indicate that u
  7596  	// must live until the use above.
  7597  	runtime.KeepAlive(u) // escapes: replaced by intrinsic.
  7598  	return int64(length), err
  7599  }