File: LibraryImports.g.cs
Project: src\src\coreclr\System.Private.CoreLib\System.Private.CoreLib.csproj (System.Private.CoreLib)
// <auto-generated/>
namespace Internal
{
    internal static unsafe partial class VersionResilientHashCode
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "VersionResilientHashCode_TypeHashCode", ExactSpelling = true)]
        private static extern partial int TypeHashCode(global::System.Runtime.CompilerServices.QCallTypeHandle typeHandle);
    }
}
namespace Internal.Runtime.CompilerHelpers
{
    internal static unsafe partial class ThrowHelpers
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "ExceptionNative_ThrowAmbiguousResolutionException", ExactSpelling = true)]
        private static extern partial void ThrowAmbiguousResolutionException(global::System.Runtime.CompilerServices.MethodTable* targetType, global::System.Runtime.CompilerServices.MethodTable* interfaceType, void* methodDesc);
    }
}
namespace Internal.Runtime.CompilerHelpers
{
    internal static unsafe partial class ThrowHelpers
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "ExceptionNative_ThrowEntryPointNotFoundException", ExactSpelling = true)]
        private static extern partial void ThrowEntryPointNotFoundException(global::System.Runtime.CompilerServices.MethodTable* targetType, global::System.Runtime.CompilerServices.MethodTable* interfaceType, void* methodDesc);
    }
}
namespace Internal.Runtime.CompilerHelpers
{
    internal static unsafe partial class ThrowHelpers
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "ExceptionNative_ThrowMethodAccessException", ExactSpelling = true)]
        private static extern partial void ThrowMethodAccessExceptionInternal(void* caller, void* callee);
    }
}
namespace Internal.Runtime.CompilerHelpers
{
    internal static unsafe partial class ThrowHelpers
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "ExceptionNative_ThrowFieldAccessException", ExactSpelling = true)]
        private static extern partial void ThrowFieldAccessExceptionInternal(void* caller, void* callee);
    }
}
namespace Internal.Runtime.CompilerHelpers
{
    internal static unsafe partial class ThrowHelpers
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "ExceptionNative_ThrowClassAccessException", ExactSpelling = true)]
        private static extern partial void ThrowClassAccessExceptionInternal(void* caller, void* callee);
    }
}
namespace System
{
    public abstract unsafe partial class Array
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        private static unsafe partial void InternalCreate(global::System.Runtime.CompilerServices.QCallTypeHandle type, int rank, int* pLengths, int* pLowerBounds, bool fromArrayType, global::System.Runtime.CompilerServices.ObjectHandleOnStack retArray)
        {
            int __fromArrayType_native;
            // Marshal - Convert managed data to native data.
            __fromArrayType_native = (int)(fromArrayType ? 1 : 0);
            {
                __PInvoke(type, rank, pLengths, pLowerBounds, __fromArrayType_native, retArray);
            }
 
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "Array_CreateInstance", ExactSpelling = true)]
            static extern unsafe void __PInvoke(global::System.Runtime.CompilerServices.QCallTypeHandle __type_native, int __rank_native, int* __pLengths_native, int* __pLowerBounds_native, int __fromArrayType_native, global::System.Runtime.CompilerServices.ObjectHandleOnStack __retArray_native);
        }
    }
}
namespace System
{
    public abstract unsafe partial class Array
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "Array_CreateInstanceMDArray", ExactSpelling = true)]
        private static unsafe extern partial void CreateInstanceMDArray(nint typeHandle, uint dwNumArgs, void* pArgList, global::System.Runtime.CompilerServices.ObjectHandleOnStack retArray);
    }
}
namespace System
{
    public abstract unsafe partial class Array
    {
        internal sealed unsafe partial class ArrayInitializeCache
        {
            [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "Array_GetElementConstructorEntrypoint", ExactSpelling = true)]
            private static extern partial delegate*<ref byte, void> GetElementConstructorEntrypoint(global::System.Runtime.CompilerServices.QCallTypeHandle arrayType);
        }
    }
}
namespace System
{
    public unsafe partial class Buffer
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "Buffer_Clear", ExactSpelling = true)]
        private static unsafe extern partial void ZeroMemoryInternal(void* b, nuint byteLength);
    }
}
namespace System
{
    public unsafe partial class Buffer
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "Buffer_MemMove", ExactSpelling = true)]
        private static unsafe extern partial void MemmoveInternal(byte* dest, byte* src, nuint len);
    }
}
namespace System
{
    internal static unsafe partial class CLRConfig
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        private static partial bool GetConfigBoolValue(string configSwitchName, out bool exist)
        {
            exist = default;
            int __exist_native;
            bool __retVal;
            int __retVal_native;
            // Pin - Pin data in preparation for calling the P/Invoke.
            fixed (void* __configSwitchName_native = &global::System.Runtime.InteropServices.Marshalling.Utf16StringMarshaller.GetPinnableReference(configSwitchName))
            {
                __retVal_native = __PInvoke((ushort*)__configSwitchName_native, &__exist_native);
            }
 
            // Unmarshal - Convert native data to managed data.
            __retVal = __retVal_native != 0;
            exist = __exist_native != 0;
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "ClrConfig_GetConfigBoolValue", ExactSpelling = true)]
            static extern unsafe int __PInvoke(ushort* __configSwitchName_native, int* __exist_native);
        }
    }
}
namespace System
{
    internal sealed unsafe partial class ComAwareWeakReference
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "ComWeakRefToObject", ExactSpelling = true)]
        private static extern partial void ComWeakRefToObject(nint pComWeakRef, global::System.Runtime.CompilerServices.ObjectHandleOnStack retRcw);
    }
}
namespace System
{
    internal sealed unsafe partial class ComAwareWeakReference
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "ObjectToComWeakRef", ExactSpelling = true)]
        private static extern partial nint ObjectToComWeakRef(global::System.Runtime.CompilerServices.ObjectHandleOnStack retRcw);
    }
}
namespace System
{
    public abstract unsafe partial class Delegate
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        private static partial bool BindToMethodName(global::System.Runtime.CompilerServices.ObjectHandleOnStack d, global::System.Runtime.CompilerServices.ObjectHandleOnStack target, global::System.Runtime.CompilerServices.QCallTypeHandle methodType, string method, global::System.DelegateBindingFlags flags)
        {
            byte* __method_native = default;
            bool __retVal = default;
            int __retVal_native = default;
            // Setup - Perform required setup.
            scoped global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.ManagedToUnmanagedIn __method_native__marshaller = new();
            try
            {
                // Marshal - Convert managed data to native data.
                __method_native__marshaller.FromManaged(method, stackalloc byte[global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.ManagedToUnmanagedIn.BufferSize]);
                {
                    // PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
                    __method_native = __method_native__marshaller.ToUnmanaged();
                    __retVal_native = __PInvoke(d, target, methodType, __method_native, flags);
                }
 
                // Unmarshal - Convert native data to managed data.
                __retVal = __retVal_native != 0;
            }
            finally
            {
                // CleanupCallerAllocated - Perform cleanup of caller allocated resources.
                __method_native__marshaller.Free();
            }
 
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "Delegate_BindToMethodName", ExactSpelling = true)]
            static extern unsafe int __PInvoke(global::System.Runtime.CompilerServices.ObjectHandleOnStack __d_native, global::System.Runtime.CompilerServices.ObjectHandleOnStack __target_native, global::System.Runtime.CompilerServices.QCallTypeHandle __methodType_native, byte* __method_native, global::System.DelegateBindingFlags __flags_native);
        }
    }
}
namespace System
{
    public abstract unsafe partial class Delegate
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        private static partial bool BindToMethodInfo(global::System.Runtime.CompilerServices.ObjectHandleOnStack d, global::System.Runtime.CompilerServices.ObjectHandleOnStack target, global::System.RuntimeMethodHandleInternal method, global::System.Runtime.CompilerServices.QCallTypeHandle methodType, global::System.DelegateBindingFlags flags)
        {
            bool __retVal;
            int __retVal_native;
            {
                __retVal_native = __PInvoke(d, target, method, methodType, flags);
            }
 
            // Unmarshal - Convert native data to managed data.
            __retVal = __retVal_native != 0;
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "Delegate_BindToMethodInfo", ExactSpelling = true)]
            static extern unsafe int __PInvoke(global::System.Runtime.CompilerServices.ObjectHandleOnStack __d_native, global::System.Runtime.CompilerServices.ObjectHandleOnStack __target_native, global::System.RuntimeMethodHandleInternal __method_native, global::System.Runtime.CompilerServices.QCallTypeHandle __methodType_native, global::System.DelegateBindingFlags __flags_native);
        }
    }
}
namespace System
{
    public abstract unsafe partial class Delegate
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "Delegate_Construct", ExactSpelling = true)]
        private static extern partial void Construct(global::System.Runtime.CompilerServices.ObjectHandleOnStack _this, global::System.Runtime.CompilerServices.ObjectHandleOnStack target, nint method);
    }
}
namespace System
{
    public abstract unsafe partial class Delegate
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "Delegate_GetMulticastInvokeSlow", ExactSpelling = true)]
        private static unsafe extern partial void* GetMulticastInvokeSlow(global::System.Runtime.CompilerServices.MethodTable* pMT);
    }
}
namespace System
{
    public abstract unsafe partial class Delegate
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "Delegate_FindMethodHandle", ExactSpelling = true)]
        private static extern partial void FindMethodHandle(global::System.Runtime.CompilerServices.ObjectHandleOnStack d, global::System.Runtime.CompilerServices.ObjectHandleOnStack retMethodInfo);
    }
}
namespace System
{
    public abstract unsafe partial class Delegate
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        private static partial bool InternalEqualMethodHandles(global::System.Runtime.CompilerServices.ObjectHandleOnStack left, global::System.Runtime.CompilerServices.ObjectHandleOnStack right)
        {
            bool __retVal;
            int __retVal_native;
            {
                __retVal_native = __PInvoke(left, right);
            }
 
            // Unmarshal - Convert native data to managed data.
            __retVal = __retVal_native != 0;
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "Delegate_InternalEqualMethodHandles", ExactSpelling = true)]
            static extern unsafe int __PInvoke(global::System.Runtime.CompilerServices.ObjectHandleOnStack __left_native, global::System.Runtime.CompilerServices.ObjectHandleOnStack __right_native);
        }
    }
}
namespace System
{
    public abstract unsafe partial class Delegate
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "Delegate_AdjustTarget", ExactSpelling = true)]
        private static extern partial nint AdjustTarget(global::System.Runtime.CompilerServices.ObjectHandleOnStack target, nint methodPtr);
    }
}
namespace System
{
    public abstract unsafe partial class Delegate
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "Delegate_InitializeVirtualCallStub", ExactSpelling = true)]
        private static extern partial void InitializeVirtualCallStub(global::System.Runtime.CompilerServices.ObjectHandleOnStack d, nint methodPtr);
    }
}
namespace System.Diagnostics
{
    public static unsafe partial class Debugger
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "DebugDebugger_Break", ExactSpelling = true)]
        private static extern partial void BreakInternal();
    }
}
namespace System.Diagnostics
{
    public static unsafe partial class Debugger
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        private static partial bool LaunchInternal()
        {
            bool __retVal;
            int __retVal_native;
            {
                __retVal_native = __PInvoke();
            }
 
            // Unmarshal - Convert native data to managed data.
            __retVal = __retVal_native != 0;
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "DebugDebugger_Launch", ExactSpelling = true)]
            static extern unsafe int __PInvoke();
        }
    }
}
namespace System.Diagnostics
{
    public static unsafe partial class Debugger
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "DebugDebugger_IsManagedDebuggerAttached", ExactSpelling = true)]
        private static extern partial int IsManagedDebuggerAttached();
    }
}
namespace System.Diagnostics
{
    public static unsafe partial class Debugger
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        private static partial void LogInternal(int level, string category, string message)
        {
            // Pin - Pin data in preparation for calling the P/Invoke.
            fixed (void* __message_native = &global::System.Runtime.InteropServices.Marshalling.Utf16StringMarshaller.GetPinnableReference(message))
            fixed (void* __category_native = &global::System.Runtime.InteropServices.Marshalling.Utf16StringMarshaller.GetPinnableReference(category))
            {
                __PInvoke(level, (ushort*)__category_native, (ushort*)__message_native);
            }
 
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "DebugDebugger_Log", ExactSpelling = true)]
            static extern unsafe void __PInvoke(int __level_native, ushort* __category_native, ushort* __message_native);
        }
    }
}
namespace System.Diagnostics
{
    public static unsafe partial class Debugger
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "DebugDebugger_IsLoggingHelper", ExactSpelling = true)]
        private static extern partial int IsLoggingInternal();
    }
}
namespace System.Diagnostics
{
    public static unsafe partial class Debugger
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "DebugDebugger_CustomNotification", ExactSpelling = true)]
        private static extern partial void CustomNotification(global::System.Runtime.CompilerServices.ObjectHandleOnStack data);
    }
}
namespace System.Diagnostics
{
    public unsafe partial class StackFrame
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "StackFrame_GetMethodDescFromNativeIP", ExactSpelling = true)]
        private static extern partial global::System.RuntimeMethodHandleInternal GetMethodDescFromNativeIP(nint ip);
    }
}
namespace System.Diagnostics
{
    public unsafe partial class StackTrace
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        private static partial void GetStackFramesInternal(global::System.Runtime.CompilerServices.ObjectHandleOnStack sfh, bool fNeedFileInfo, global::System.Runtime.CompilerServices.ObjectHandleOnStack e)
        {
            int __fNeedFileInfo_native;
            // Marshal - Convert managed data to native data.
            __fNeedFileInfo_native = (int)(fNeedFileInfo ? 1 : 0);
            {
                __PInvoke(sfh, __fNeedFileInfo_native, e);
            }
 
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "StackTrace_GetStackFramesInternal", ExactSpelling = true)]
            static extern unsafe void __PInvoke(global::System.Runtime.CompilerServices.ObjectHandleOnStack __sfh_native, int __fNeedFileInfo_native, global::System.Runtime.CompilerServices.ObjectHandleOnStack __e_native);
        }
    }
}
namespace System
{
    public abstract unsafe partial class Enum
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "Enum_GetValuesAndNames", ExactSpelling = true)]
        private static extern partial void GetEnumValuesAndNames(global::System.Runtime.CompilerServices.QCallTypeHandle enumType, global::System.Runtime.CompilerServices.ObjectHandleOnStack values, global::System.Runtime.CompilerServices.ObjectHandleOnStack names, global::Interop.BOOL getNames);
    }
}
namespace System
{
    public static unsafe partial class Environment
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "Environment_Exit", ExactSpelling = true)]
        private static extern partial void _Exit(int exitCode);
    }
}
namespace System
{
    public static unsafe partial class Environment
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        private static partial void FailFast(global::System.Runtime.CompilerServices.StackCrawlMarkHandle mark, string message, global::System.Runtime.CompilerServices.ObjectHandleOnStack exception, string errorMessage)
        {
            // Pin - Pin data in preparation for calling the P/Invoke.
            fixed (void* __errorMessage_native = &global::System.Runtime.InteropServices.Marshalling.Utf16StringMarshaller.GetPinnableReference(errorMessage))
            fixed (void* __message_native = &global::System.Runtime.InteropServices.Marshalling.Utf16StringMarshaller.GetPinnableReference(message))
            {
                __PInvoke(mark, (ushort*)__message_native, exception, (ushort*)__errorMessage_native);
            }
 
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "Environment_FailFast", ExactSpelling = true)]
            static extern unsafe void __PInvoke(global::System.Runtime.CompilerServices.StackCrawlMarkHandle __mark_native, ushort* __message_native, global::System.Runtime.CompilerServices.ObjectHandleOnStack __exception_native, ushort* __errorMessage_native);
        }
    }
}
namespace System
{
    public static unsafe partial class Environment
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "Environment_GetProcessorCount", ExactSpelling = true)]
        private static extern partial int GetProcessorCount();
    }
}
namespace System
{
    public unsafe partial class Exception
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "ExceptionNative_GetMethodFromStackTrace", ExactSpelling = true)]
        private static extern partial void GetMethodFromStackTrace(global::System.Runtime.CompilerServices.ObjectHandleOnStack stackTrace, global::System.Runtime.CompilerServices.ObjectHandleOnStack method);
    }
}
namespace System
{
    public unsafe partial class Exception
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "ExceptionNative_GetMessageFromNativeResources", ExactSpelling = true)]
        private static extern partial void GetMessageFromNativeResources(global::System.Exception.ExceptionMessageKind kind, global::System.Runtime.CompilerServices.StringHandleOnStack retMesg);
    }
}
namespace System
{
    public unsafe partial class Exception
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "ExceptionNative_GetFrozenStackTrace", ExactSpelling = true)]
        private static extern partial void GetFrozenStackTrace(global::System.Runtime.CompilerServices.ObjectHandleOnStack exception, global::System.Runtime.CompilerServices.ObjectHandleOnStack stackTrace);
    }
}
namespace System
{
    public static unsafe partial class GC
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        internal static partial int _StartNoGCRegion(long totalSize, bool lohSizeKnown, long lohSize, bool disallowFullBlockingGC)
        {
            int __lohSizeKnown_native;
            int __disallowFullBlockingGC_native;
            int __retVal;
            // Marshal - Convert managed data to native data.
            __disallowFullBlockingGC_native = (int)(disallowFullBlockingGC ? 1 : 0);
            __lohSizeKnown_native = (int)(lohSizeKnown ? 1 : 0);
            {
                __retVal = __PInvoke(totalSize, __lohSizeKnown_native, lohSize, __disallowFullBlockingGC_native);
            }
 
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "GCInterface_StartNoGCRegion", ExactSpelling = true)]
            static extern unsafe int __PInvoke(long __totalSize_native, int __lohSizeKnown_native, long __lohSize_native, int __disallowFullBlockingGC_native);
        }
    }
}
namespace System
{
    public static unsafe partial class GC
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "GCInterface_EndNoGCRegion", ExactSpelling = true)]
        internal static extern partial int _EndNoGCRegion();
    }
}
namespace System
{
    public static unsafe partial class GC
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "GCInterface_AllocateNewArray", ExactSpelling = true)]
        private static extern partial void AllocateNewArray(nint typeHandlePtr, int length, global::System.GC.GC_ALLOC_FLAGS flags, global::System.Runtime.CompilerServices.ObjectHandleOnStack ret);
    }
}
namespace System
{
    public static unsafe partial class GC
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "GCInterface_GetTotalMemory", ExactSpelling = true)]
        private static extern partial long GetTotalMemory();
    }
}
namespace System
{
    public static unsafe partial class GC
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        private static partial void _Collect(int generation, int mode, bool lowMemoryPressure)
        {
            byte __lowMemoryPressure_native;
            // Marshal - Convert managed data to native data.
            __lowMemoryPressure_native = (byte)(lowMemoryPressure ? 1 : 0);
            {
                __PInvoke(generation, mode, __lowMemoryPressure_native);
            }
 
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "GCInterface_Collect", ExactSpelling = true)]
            static extern unsafe void __PInvoke(int __generation_native, int __mode_native, byte __lowMemoryPressure_native);
        }
    }
}
namespace System
{
    public static unsafe partial class GC
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "GCInterface_AddMemoryPressure", ExactSpelling = true)]
        private static extern partial void _AddMemoryPressure(ulong bytesAllocated);
    }
}
namespace System
{
    public static unsafe partial class GC
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "GCInterface_RemoveMemoryPressure", ExactSpelling = true)]
        private static extern partial void _RemoveMemoryPressure(ulong bytesAllocated);
    }
}
namespace System
{
    public static unsafe partial class GC
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "GCInterface_GetNextFinalizableObject", ExactSpelling = true)]
        private static unsafe extern partial void* GetNextFinalizeableObject(global::System.Runtime.CompilerServices.ObjectHandleOnStack target);
    }
}
namespace System
{
    public static unsafe partial class GC
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "GCInterface_WaitForPendingFinalizers", ExactSpelling = true)]
        private static extern partial void _WaitForPendingFinalizers();
    }
}
namespace System
{
    public static unsafe partial class GC
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "GCInterface_ReRegisterForFinalize", ExactSpelling = true)]
        private static extern partial void ReRegisterForFinalize(global::System.Runtime.CompilerServices.ObjectHandleOnStack o);
    }
}
namespace System
{
    public static unsafe partial class GC
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "GCInterface_RegisterFrozenSegment", ExactSpelling = true)]
        private static extern partial nint _RegisterFrozenSegment(nint sectionAddress, nint sectionSize);
    }
}
namespace System
{
    public static unsafe partial class GC
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "GCInterface_UnregisterFrozenSegment", ExactSpelling = true)]
        private static extern partial void _UnregisterFrozenSegment(nint segmentHandle);
    }
}
namespace System
{
    public static unsafe partial class GC
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "GCInterface_GetTotalAllocatedBytesPrecise", ExactSpelling = true)]
        private static extern partial long GetTotalAllocatedBytesPrecise();
    }
}
namespace System
{
    public static unsafe partial class GC
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "GCInterface_WaitForFullGCApproach", ExactSpelling = true)]
        private static extern partial int _WaitForFullGCApproach(int millisecondsTimeout);
    }
}
namespace System
{
    public static unsafe partial class GC
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "GCInterface_WaitForFullGCComplete", ExactSpelling = true)]
        private static extern partial int _WaitForFullGCComplete(int millisecondsTimeout);
    }
}
namespace System
{
    public static unsafe partial class GC
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "GCInterface_EnableNoGCRegionCallback", ExactSpelling = true)]
        private static unsafe extern partial global::System.GC.EnableNoGCRegionCallbackStatus _EnableNoGCRegionCallback(global::System.GC.NoGCRegionCallbackFinalizerWorkItem* callback, long totalSize);
    }
}
namespace System
{
    public static unsafe partial class GC
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "GCInterface_GetGenerationBudget", ExactSpelling = true)]
        internal static extern partial long _GetGenerationBudget(int generation);
    }
}
namespace System
{
    public static unsafe partial class GC
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "GCInterface_EnumerateConfigurationValues", ExactSpelling = true)]
        internal static unsafe extern partial void _EnumerateConfigurationValues(void* configurationDictionary, delegate* unmanaged<void*, byte*, byte*, global::System.GC.GCConfigurationType, long, void> callback);
    }
}
namespace System
{
    public static unsafe partial class GC
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "GCInterface_RefreshMemoryLimit", ExactSpelling = true)]
        internal static extern partial int _RefreshMemoryLimit(global::System.GC.GCHeapHardLimitInfo heapHardLimitInfo);
    }
}
namespace System.IO
{
    public unsafe partial class FileLoadException
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "GetFileLoadExceptionMessage", ExactSpelling = true)]
        private static extern partial void GetFileLoadExceptionMessage(int hResult, global::System.Runtime.CompilerServices.StringHandleOnStack retString);
    }
}
namespace System.IO
{
    public unsafe partial class FileLoadException
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "FileLoadException_GetMessageForHR", ExactSpelling = true)]
        private static extern partial void GetMessageForHR(int hresult, global::System.Runtime.CompilerServices.StringHandleOnStack retString);
    }
}
namespace System.IO
{
    public abstract unsafe partial class Stream
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        private static partial bool HasOverriddenSlow(global::System.Runtime.CompilerServices.MethodTable* pMT, bool isRead)
        {
            int __isRead_native;
            bool __retVal;
            int __retVal_native;
            // Marshal - Convert managed data to native data.
            __isRead_native = (int)(isRead ? 1 : 0);
            {
                __retVal_native = __PInvoke(pMT, __isRead_native);
            }
 
            // Unmarshal - Convert native data to managed data.
            __retVal = __retVal_native != 0;
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "Stream_HasOverriddenSlow", ExactSpelling = true)]
            static extern unsafe int __PInvoke(global::System.Runtime.CompilerServices.MethodTable* __pMT_native, int __isRead_native);
        }
    }
}
namespace System.Reflection
{
    public abstract unsafe partial class Assembly
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "AssemblyNative_GetExecutingAssembly", ExactSpelling = true)]
        private static extern partial void GetExecutingAssemblyNative(global::System.Runtime.CompilerServices.StackCrawlMarkHandle stackMark, global::System.Runtime.CompilerServices.ObjectHandleOnStack retAssembly);
    }
}
namespace System.Reflection
{
    public abstract unsafe partial class Assembly
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "AssemblyNative_GetEntryAssembly", ExactSpelling = true)]
        private static extern partial void GetEntryAssemblyNative(global::System.Runtime.CompilerServices.ObjectHandleOnStack retAssembly);
    }
}
namespace System.Reflection
{
    public abstract unsafe partial class Assembly
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "AssemblyNative_GetAssemblyCount", ExactSpelling = true)]
        internal static extern partial uint GetAssemblyCount();
    }
}
namespace System.Reflection
{
    public sealed unsafe partial class AssemblyName
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "AssemblyName_InitializeAssemblySpec", ExactSpelling = true)]
        private static unsafe extern partial void InitializeAssemblySpec(global::System.Reflection.NativeAssemblyNameParts* pAssemblyNameParts, void* pAssemblySpec);
    }
}
namespace System.Reflection.Emit
{
    internal sealed unsafe partial class RuntimeAssemblyBuilder
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "AppDomain_CreateDynamicAssembly", ExactSpelling = true)]
        private static unsafe extern partial void CreateDynamicAssembly(global::System.Runtime.CompilerServices.ObjectHandleOnStack assemblyLoadContext, global::System.Reflection.NativeAssemblyNameParts* pAssemblyName, global::System.Configuration.Assemblies.AssemblyHashAlgorithm hashAlgId, global::System.Reflection.Emit.AssemblyBuilderAccess access, global::System.Runtime.CompilerServices.ObjectHandleOnStack retAssembly);
    }
}
namespace System.Reflection.Emit
{
    internal sealed unsafe partial class RuntimeModuleBuilder
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        private static partial int GetTypeRef(global::System.Runtime.CompilerServices.QCallModule module, string strFullName, global::System.Runtime.CompilerServices.QCallModule refedModule, int tkResolution)
        {
            int __retVal;
            // Pin - Pin data in preparation for calling the P/Invoke.
            fixed (void* __strFullName_native = &global::System.Runtime.InteropServices.Marshalling.Utf16StringMarshaller.GetPinnableReference(strFullName))
            {
                __retVal = __PInvoke(module, (ushort*)__strFullName_native, refedModule, tkResolution);
            }
 
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "ModuleBuilder_GetTypeRef", ExactSpelling = true)]
            static extern unsafe int __PInvoke(global::System.Runtime.CompilerServices.QCallModule __module_native, ushort* __strFullName_native, global::System.Runtime.CompilerServices.QCallModule __refedModule_native, int __tkResolution_native);
        }
    }
}
namespace System.Reflection.Emit
{
    internal sealed unsafe partial class RuntimeModuleBuilder
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "ModuleBuilder_GetMemberRef", ExactSpelling = true)]
        private static extern partial int GetMemberRef(global::System.Runtime.CompilerServices.QCallModule module, global::System.Runtime.CompilerServices.QCallModule refedModule, int tr, int defToken);
    }
}
namespace System.Reflection.Emit
{
    internal sealed unsafe partial class RuntimeModuleBuilder
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        private static partial int GetMemberRefFromSignature(global::System.Runtime.CompilerServices.QCallModule module, int tr, string methodName, byte[] signature, int length)
        {
            int __retVal;
            // Pin - Pin data in preparation for calling the P/Invoke.
            fixed (void* __signature_native = &global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<byte, byte>.ManagedToUnmanagedIn.GetPinnableReference(signature))
            fixed (void* __methodName_native = &global::System.Runtime.InteropServices.Marshalling.Utf16StringMarshaller.GetPinnableReference(methodName))
            {
                __retVal = __PInvoke(module, tr, (ushort*)__methodName_native, (byte*)__signature_native, length);
            }
 
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "ModuleBuilder_GetMemberRefFromSignature", ExactSpelling = true)]
            static extern unsafe int __PInvoke(global::System.Runtime.CompilerServices.QCallModule __module_native, int __tr_native, ushort* __methodName_native, byte* __signature_native, int __length_native);
        }
    }
}
namespace System.Reflection.Emit
{
    internal sealed unsafe partial class RuntimeModuleBuilder
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "ModuleBuilder_GetMemberRefOfMethodInfo", ExactSpelling = true)]
        private static extern partial int GetMemberRefOfMethodInfo(global::System.Runtime.CompilerServices.QCallModule module, int tr, global::System.RuntimeMethodHandleInternal method);
    }
}
namespace System.Reflection.Emit
{
    internal sealed unsafe partial class RuntimeModuleBuilder
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "ModuleBuilder_GetMemberRefOfFieldInfo", ExactSpelling = true)]
        private static extern partial int GetMemberRefOfFieldInfo(global::System.Runtime.CompilerServices.QCallModule module, int tkType, global::System.Runtime.CompilerServices.QCallTypeHandle declaringType, int tkField);
    }
}
namespace System.Reflection.Emit
{
    internal sealed unsafe partial class RuntimeModuleBuilder
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        private static partial int GetTokenFromTypeSpec(global::System.Runtime.CompilerServices.QCallModule pModule, byte[] signature, int length)
        {
            int __retVal;
            // Pin - Pin data in preparation for calling the P/Invoke.
            fixed (void* __signature_native = &global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<byte, byte>.ManagedToUnmanagedIn.GetPinnableReference(signature))
            {
                __retVal = __PInvoke(pModule, (byte*)__signature_native, length);
            }
 
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "ModuleBuilder_GetTokenFromTypeSpec", ExactSpelling = true)]
            static extern unsafe int __PInvoke(global::System.Runtime.CompilerServices.QCallModule __pModule_native, byte* __signature_native, int __length_native);
        }
    }
}
namespace System.Reflection.Emit
{
    internal sealed unsafe partial class RuntimeModuleBuilder
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        private static partial int GetArrayMethodToken(global::System.Runtime.CompilerServices.QCallModule module, int tkTypeSpec, string methodName, byte[] signature, int sigLength)
        {
            int __retVal;
            // Pin - Pin data in preparation for calling the P/Invoke.
            fixed (void* __signature_native = &global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<byte, byte>.ManagedToUnmanagedIn.GetPinnableReference(signature))
            fixed (void* __methodName_native = &global::System.Runtime.InteropServices.Marshalling.Utf16StringMarshaller.GetPinnableReference(methodName))
            {
                __retVal = __PInvoke(module, tkTypeSpec, (ushort*)__methodName_native, (byte*)__signature_native, sigLength);
            }
 
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "ModuleBuilder_GetArrayMethodToken", ExactSpelling = true)]
            static extern unsafe int __PInvoke(global::System.Runtime.CompilerServices.QCallModule __module_native, int __tkTypeSpec_native, ushort* __methodName_native, byte* __signature_native, int __sigLength_native);
        }
    }
}
namespace System.Reflection.Emit
{
    internal sealed unsafe partial class RuntimeModuleBuilder
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        private static partial int GetStringConstant(global::System.Runtime.CompilerServices.QCallModule module, string str, int length)
        {
            int __retVal;
            // Pin - Pin data in preparation for calling the P/Invoke.
            fixed (void* __str_native = &global::System.Runtime.InteropServices.Marshalling.Utf16StringMarshaller.GetPinnableReference(str))
            {
                __retVal = __PInvoke(module, (ushort*)__str_native, length);
            }
 
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "ModuleBuilder_GetStringConstant", ExactSpelling = true)]
            static extern unsafe int __PInvoke(global::System.Runtime.CompilerServices.QCallModule __module_native, ushort* __str_native, int __length_native);
        }
    }
}
namespace System.Reflection.Emit
{
    internal sealed unsafe partial class RuntimeModuleBuilder
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        internal static partial void SetFieldRVAContent(global::System.Runtime.CompilerServices.QCallModule module, int fdToken, byte[] data, int length)
        {
            // Pin - Pin data in preparation for calling the P/Invoke.
            fixed (void* __data_native = &global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<byte, byte>.ManagedToUnmanagedIn.GetPinnableReference(data))
            {
                __PInvoke(module, fdToken, (byte*)__data_native, length);
            }
 
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "ModuleBuilder_SetFieldRVAContent", ExactSpelling = true)]
            static extern unsafe void __PInvoke(global::System.Runtime.CompilerServices.QCallModule __module_native, int __fdToken_native, byte* __data_native, int __length_native);
        }
    }
}
namespace System.Reflection.Emit
{
    internal sealed unsafe partial class RuntimeTypeBuilder
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "TypeBuilder_SetParentType", ExactSpelling = true)]
        private static extern partial void SetParentType(global::System.Runtime.CompilerServices.QCallModule module, int tdTypeDef, int tkParent);
    }
}
namespace System.Reflection.Emit
{
    internal sealed unsafe partial class RuntimeTypeBuilder
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "TypeBuilder_AddInterfaceImpl", ExactSpelling = true)]
        private static extern partial void AddInterfaceImpl(global::System.Runtime.CompilerServices.QCallModule module, int tdTypeDef, int tkInterface);
    }
}
namespace System.Reflection.Emit
{
    internal sealed unsafe partial class RuntimeTypeBuilder
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        internal static partial int DefineMethod(global::System.Runtime.CompilerServices.QCallModule module, int tkParent, string name, byte[] signature, int sigLength, global::System.Reflection.MethodAttributes attributes)
        {
            int __retVal;
            // Pin - Pin data in preparation for calling the P/Invoke.
            fixed (void* __signature_native = &global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<byte, byte>.ManagedToUnmanagedIn.GetPinnableReference(signature))
            fixed (void* __name_native = &global::System.Runtime.InteropServices.Marshalling.Utf16StringMarshaller.GetPinnableReference(name))
            {
                __retVal = __PInvoke(module, tkParent, (ushort*)__name_native, (byte*)__signature_native, sigLength, attributes);
            }
 
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "TypeBuilder_DefineMethod", ExactSpelling = true)]
            static extern unsafe int __PInvoke(global::System.Runtime.CompilerServices.QCallModule __module_native, int __tkParent_native, ushort* __name_native, byte* __signature_native, int __sigLength_native, global::System.Reflection.MethodAttributes __attributes_native);
        }
    }
}
namespace System.Reflection.Emit
{
    internal sealed unsafe partial class RuntimeTypeBuilder
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        internal static partial int DefineMethodSpec(global::System.Runtime.CompilerServices.QCallModule module, int tkParent, byte[] signature, int sigLength)
        {
            int __retVal;
            // Pin - Pin data in preparation for calling the P/Invoke.
            fixed (void* __signature_native = &global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<byte, byte>.ManagedToUnmanagedIn.GetPinnableReference(signature))
            {
                __retVal = __PInvoke(module, tkParent, (byte*)__signature_native, sigLength);
            }
 
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "TypeBuilder_DefineMethodSpec", ExactSpelling = true)]
            static extern unsafe int __PInvoke(global::System.Runtime.CompilerServices.QCallModule __module_native, int __tkParent_native, byte* __signature_native, int __sigLength_native);
        }
    }
}
namespace System.Reflection.Emit
{
    internal sealed unsafe partial class RuntimeTypeBuilder
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        internal static partial int DefineField(global::System.Runtime.CompilerServices.QCallModule module, int tkParent, string name, byte[] signature, int sigLength, global::System.Reflection.FieldAttributes attributes)
        {
            int __retVal;
            // Pin - Pin data in preparation for calling the P/Invoke.
            fixed (void* __signature_native = &global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<byte, byte>.ManagedToUnmanagedIn.GetPinnableReference(signature))
            fixed (void* __name_native = &global::System.Runtime.InteropServices.Marshalling.Utf16StringMarshaller.GetPinnableReference(name))
            {
                __retVal = __PInvoke(module, tkParent, (ushort*)__name_native, (byte*)__signature_native, sigLength, attributes);
            }
 
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "TypeBuilder_DefineField", ExactSpelling = true)]
            static extern unsafe int __PInvoke(global::System.Runtime.CompilerServices.QCallModule __module_native, int __tkParent_native, ushort* __name_native, byte* __signature_native, int __sigLength_native, global::System.Reflection.FieldAttributes __attributes_native);
        }
    }
}
namespace System.Reflection.Emit
{
    internal sealed unsafe partial class RuntimeTypeBuilder
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        private static partial void SetMethodIL(global::System.Runtime.CompilerServices.QCallModule module, int tk, bool isInitLocals, byte[] body, int bodyLength, byte[] LocalSig, int sigLength, int maxStackSize, global::System.Reflection.Emit.ExceptionHandler[] exceptions, int numExceptions, int[] tokenFixups, int numTokenFixups)
        {
            int __isInitLocals_native;
            // Marshal - Convert managed data to native data.
            __isInitLocals_native = (int)(isInitLocals ? 1 : 0);
            // Pin - Pin data in preparation for calling the P/Invoke.
            fixed (void* __tokenFixups_native = &global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<int, int>.ManagedToUnmanagedIn.GetPinnableReference(tokenFixups))
            fixed (void* __exceptions_native = &global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<global::System.Reflection.Emit.ExceptionHandler, global::System.Reflection.Emit.ExceptionHandler>.ManagedToUnmanagedIn.GetPinnableReference(exceptions))
            fixed (void* __LocalSig_native = &global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<byte, byte>.ManagedToUnmanagedIn.GetPinnableReference(LocalSig))
            fixed (void* __body_native = &global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<byte, byte>.ManagedToUnmanagedIn.GetPinnableReference(body))
            {
                __PInvoke(module, tk, __isInitLocals_native, (byte*)__body_native, bodyLength, (byte*)__LocalSig_native, sigLength, maxStackSize, (global::System.Reflection.Emit.ExceptionHandler*)__exceptions_native, numExceptions, (int*)__tokenFixups_native, numTokenFixups);
            }
 
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "TypeBuilder_SetMethodIL", ExactSpelling = true)]
            static extern unsafe void __PInvoke(global::System.Runtime.CompilerServices.QCallModule __module_native, int __tk_native, int __isInitLocals_native, byte* __body_native, int __bodyLength_native, byte* __LocalSig_native, int __sigLength_native, int __maxStackSize_native, global::System.Reflection.Emit.ExceptionHandler* __exceptions_native, int __numExceptions_native, int* __tokenFixups_native, int __numTokenFixups_native);
        }
    }
}
namespace System.Reflection.Emit
{
    internal sealed unsafe partial class RuntimeTypeBuilder
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        private static partial void DefineCustomAttribute(global::System.Runtime.CompilerServices.QCallModule module, int tkAssociate, int tkConstructor, global::System.ReadOnlySpan<byte> attr, int attrLength)
        {
            // Pin - Pin data in preparation for calling the P/Invoke.
            fixed (void* __attr_native = &global::System.Runtime.InteropServices.Marshalling.ReadOnlySpanMarshaller<byte, byte>.ManagedToUnmanagedIn.GetPinnableReference(attr))
            {
                __PInvoke(module, tkAssociate, tkConstructor, (byte*)__attr_native, attrLength);
            }
 
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "TypeBuilder_DefineCustomAttribute", ExactSpelling = true)]
            static extern unsafe void __PInvoke(global::System.Runtime.CompilerServices.QCallModule __module_native, int __tkAssociate_native, int __tkConstructor_native, byte* __attr_native, int __attrLength_native);
        }
    }
}
namespace System.Reflection.Emit
{
    internal sealed unsafe partial class RuntimeTypeBuilder
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        internal static partial int DefineProperty(global::System.Runtime.CompilerServices.QCallModule module, int tkParent, string name, global::System.Reflection.PropertyAttributes attributes, byte[] signature, int sigLength)
        {
            int __retVal;
            // Pin - Pin data in preparation for calling the P/Invoke.
            fixed (void* __signature_native = &global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<byte, byte>.ManagedToUnmanagedIn.GetPinnableReference(signature))
            fixed (void* __name_native = &global::System.Runtime.InteropServices.Marshalling.Utf16StringMarshaller.GetPinnableReference(name))
            {
                __retVal = __PInvoke(module, tkParent, (ushort*)__name_native, attributes, (byte*)__signature_native, sigLength);
            }
 
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "TypeBuilder_DefineProperty", ExactSpelling = true)]
            static extern unsafe int __PInvoke(global::System.Runtime.CompilerServices.QCallModule __module_native, int __tkParent_native, ushort* __name_native, global::System.Reflection.PropertyAttributes __attributes_native, byte* __signature_native, int __sigLength_native);
        }
    }
}
namespace System.Reflection.Emit
{
    internal sealed unsafe partial class RuntimeTypeBuilder
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        internal static partial int DefineEvent(global::System.Runtime.CompilerServices.QCallModule module, int tkParent, string name, global::System.Reflection.EventAttributes attributes, int tkEventType)
        {
            int __retVal;
            // Pin - Pin data in preparation for calling the P/Invoke.
            fixed (void* __name_native = &global::System.Runtime.InteropServices.Marshalling.Utf16StringMarshaller.GetPinnableReference(name))
            {
                __retVal = __PInvoke(module, tkParent, (ushort*)__name_native, attributes, tkEventType);
            }
 
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "TypeBuilder_DefineEvent", ExactSpelling = true)]
            static extern unsafe int __PInvoke(global::System.Runtime.CompilerServices.QCallModule __module_native, int __tkParent_native, ushort* __name_native, global::System.Reflection.EventAttributes __attributes_native, int __tkEventType_native);
        }
    }
}
namespace System.Reflection.Emit
{
    internal sealed unsafe partial class RuntimeTypeBuilder
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "TypeBuilder_DefineMethodSemantics", ExactSpelling = true)]
        internal static extern partial void DefineMethodSemantics(global::System.Runtime.CompilerServices.QCallModule module, int tkAssociation, global::System.Reflection.MethodSemanticsAttributes semantics, int tkMethod);
    }
}
namespace System.Reflection.Emit
{
    internal sealed unsafe partial class RuntimeTypeBuilder
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "TypeBuilder_DefineMethodImpl", ExactSpelling = true)]
        internal static extern partial void DefineMethodImpl(global::System.Runtime.CompilerServices.QCallModule module, int tkType, int tkBody, int tkDecl);
    }
}
namespace System.Reflection.Emit
{
    internal sealed unsafe partial class RuntimeTypeBuilder
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "TypeBuilder_SetMethodImpl", ExactSpelling = true)]
        internal static extern partial void SetMethodImpl(global::System.Runtime.CompilerServices.QCallModule module, int tkMethod, global::System.Reflection.MethodImplAttributes MethodImplAttributes);
    }
}
namespace System.Reflection.Emit
{
    internal sealed unsafe partial class RuntimeTypeBuilder
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        internal static partial int SetParamInfo(global::System.Runtime.CompilerServices.QCallModule module, int tkMethod, int iSequence, global::System.Reflection.ParameterAttributes iParamAttributes, string strParamName)
        {
            int __retVal;
            // Pin - Pin data in preparation for calling the P/Invoke.
            fixed (void* __strParamName_native = &global::System.Runtime.InteropServices.Marshalling.Utf16StringMarshaller.GetPinnableReference(strParamName))
            {
                __retVal = __PInvoke(module, tkMethod, iSequence, iParamAttributes, (ushort*)__strParamName_native);
            }
 
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "TypeBuilder_SetParamInfo", ExactSpelling = true)]
            static extern unsafe int __PInvoke(global::System.Runtime.CompilerServices.QCallModule __module_native, int __tkMethod_native, int __iSequence_native, global::System.Reflection.ParameterAttributes __iParamAttributes_native, ushort* __strParamName_native);
        }
    }
}
namespace System.Reflection.Emit
{
    internal sealed unsafe partial class RuntimeTypeBuilder
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        internal static partial int GetTokenFromSig(global::System.Runtime.CompilerServices.QCallModule module, byte[] signature, int sigLength)
        {
            int __retVal;
            // Pin - Pin data in preparation for calling the P/Invoke.
            fixed (void* __signature_native = &global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<byte, byte>.ManagedToUnmanagedIn.GetPinnableReference(signature))
            {
                __retVal = __PInvoke(module, (byte*)__signature_native, sigLength);
            }
 
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "TypeBuilder_GetTokenFromSig", ExactSpelling = true)]
            static extern unsafe int __PInvoke(global::System.Runtime.CompilerServices.QCallModule __module_native, byte* __signature_native, int __sigLength_native);
        }
    }
}
namespace System.Reflection.Emit
{
    internal sealed unsafe partial class RuntimeTypeBuilder
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "TypeBuilder_SetFieldLayoutOffset", ExactSpelling = true)]
        internal static extern partial void SetFieldLayoutOffset(global::System.Runtime.CompilerServices.QCallModule module, int fdToken, int iOffset);
    }
}
namespace System.Reflection.Emit
{
    internal sealed unsafe partial class RuntimeTypeBuilder
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "TypeBuilder_SetClassLayout", ExactSpelling = true)]
        internal static extern partial void SetClassLayout(global::System.Runtime.CompilerServices.QCallModule module, int tk, global::System.Reflection.Emit.PackingSize iPackingSize, int iTypeSize);
    }
}
namespace System.Reflection.Emit
{
    internal sealed unsafe partial class RuntimeTypeBuilder
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "TypeBuilder_SetConstantValue", ExactSpelling = true)]
        private static unsafe extern partial void SetConstantValue(global::System.Runtime.CompilerServices.QCallModule module, int tk, int corType, void* pValue);
    }
}
namespace System.Reflection.Emit
{
    internal sealed unsafe partial class RuntimeTypeBuilder
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        private static partial void SetPInvokeData(global::System.Runtime.CompilerServices.QCallModule module, string DllName, string name, int token, int linkFlags)
        {
            // Pin - Pin data in preparation for calling the P/Invoke.
            fixed (void* __name_native = &global::System.Runtime.InteropServices.Marshalling.Utf16StringMarshaller.GetPinnableReference(name))
            fixed (void* __DllName_native = &global::System.Runtime.InteropServices.Marshalling.Utf16StringMarshaller.GetPinnableReference(DllName))
            {
                __PInvoke(module, (ushort*)__DllName_native, (ushort*)__name_native, token, linkFlags);
            }
 
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "TypeBuilder_SetPInvokeData", ExactSpelling = true)]
            static extern unsafe void __PInvoke(global::System.Runtime.CompilerServices.QCallModule __module_native, ushort* __DllName_native, ushort* __name_native, int __token_native, int __linkFlags_native);
        }
    }
}
namespace System.Reflection.Emit
{
    internal sealed unsafe partial class RuntimeTypeBuilder
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        private static partial int DefineType(global::System.Runtime.CompilerServices.QCallModule module, string fullname, int tkParent, global::System.Reflection.TypeAttributes attributes, int tkEnclosingType, int[] interfaceTokens)
        {
            int __retVal;
            // Pin - Pin data in preparation for calling the P/Invoke.
            fixed (void* __interfaceTokens_native = &global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<int, int>.ManagedToUnmanagedIn.GetPinnableReference(interfaceTokens))
            fixed (void* __fullname_native = &global::System.Runtime.InteropServices.Marshalling.Utf16StringMarshaller.GetPinnableReference(fullname))
            {
                __retVal = __PInvoke(module, (ushort*)__fullname_native, tkParent, attributes, tkEnclosingType, (int*)__interfaceTokens_native);
            }
 
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "TypeBuilder_DefineType", ExactSpelling = true)]
            static extern unsafe int __PInvoke(global::System.Runtime.CompilerServices.QCallModule __module_native, ushort* __fullname_native, int __tkParent_native, global::System.Reflection.TypeAttributes __attributes_native, int __tkEnclosingType_native, int* __interfaceTokens_native);
        }
    }
}
namespace System.Reflection.Emit
{
    internal sealed unsafe partial class RuntimeTypeBuilder
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        private static partial int DefineGenericParam(global::System.Runtime.CompilerServices.QCallModule module, string name, int tkParent, global::System.Reflection.GenericParameterAttributes attributes, int position, int[] constraints)
        {
            int __retVal;
            // Pin - Pin data in preparation for calling the P/Invoke.
            fixed (void* __constraints_native = &global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<int, int>.ManagedToUnmanagedIn.GetPinnableReference(constraints))
            fixed (void* __name_native = &global::System.Runtime.InteropServices.Marshalling.Utf16StringMarshaller.GetPinnableReference(name))
            {
                __retVal = __PInvoke(module, (ushort*)__name_native, tkParent, attributes, position, (int*)__constraints_native);
            }
 
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "TypeBuilder_DefineGenericParam", ExactSpelling = true)]
            static extern unsafe int __PInvoke(global::System.Runtime.CompilerServices.QCallModule __module_native, ushort* __name_native, int __tkParent_native, global::System.Reflection.GenericParameterAttributes __attributes_native, int __position_native, int* __constraints_native);
        }
    }
}
namespace System.Reflection.Emit
{
    internal sealed unsafe partial class RuntimeTypeBuilder
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "TypeBuilder_TermCreateClass", ExactSpelling = true)]
        private static extern partial void TermCreateClass(global::System.Runtime.CompilerServices.QCallModule module, int tk, global::System.Runtime.CompilerServices.ObjectHandleOnStack type);
    }
}
namespace System.Reflection
{
    internal sealed unsafe partial class LoaderAllocatorScout
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        private static partial bool Destroy(nint nativeLoaderAllocator)
        {
            bool __retVal;
            int __retVal_native;
            {
                __retVal_native = __PInvoke(nativeLoaderAllocator);
            }
 
            // Unmarshal - Convert native data to managed data.
            __retVal = __retVal_native != 0;
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "LoaderAllocator_Destroy", ExactSpelling = true)]
            static extern unsafe int __PInvoke(nint __nativeLoaderAllocator_native);
        }
    }
}
namespace System.Reflection
{
    internal readonly unsafe partial struct MetadataImport
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        private static unsafe partial void Enum(nint scope, int type, int parent, ref int length, int* shortResult, global::System.Runtime.CompilerServices.ObjectHandleOnStack longResult)
        {
            // Pin - Pin data in preparation for calling the P/Invoke.
            fixed (int* __length_native = &length)
            {
                __PInvoke(scope, type, parent, __length_native, shortResult, longResult);
            }
 
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "MetadataImport_Enum", ExactSpelling = true)]
            static extern unsafe void __PInvoke(nint __scope_native, int __type_native, int __parent_native, int* __length_native, int* __shortResult_native, global::System.Runtime.CompilerServices.ObjectHandleOnStack __longResult_native);
        }
    }
}
namespace System.Reflection.Metadata
{
    public static unsafe partial class AssemblyExtensions
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        private static unsafe partial bool InternalTryGetRawMetadata(global::System.Runtime.CompilerServices.QCallAssembly assembly, ref byte* blob, ref int length)
        {
            bool __retVal;
            int __retVal_native;
            // Pin - Pin data in preparation for calling the P/Invoke.
            fixed (int* __length_native = &length)
            fixed (byte** __blob_native = &blob)
            {
                __retVal_native = __PInvoke(assembly, __blob_native, __length_native);
            }
 
            // Unmarshal - Convert native data to managed data.
            __retVal = __retVal_native != 0;
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "AssemblyNative_InternalTryGetRawMetadata", ExactSpelling = true)]
            static extern unsafe int __PInvoke(global::System.Runtime.CompilerServices.QCallAssembly __assembly_native, byte** __blob_native, int* __length_native);
        }
    }
}
namespace System.Reflection.Metadata
{
    public static unsafe partial class MetadataUpdater
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "AssemblyNative_ApplyUpdate", ExactSpelling = true)]
        private static unsafe extern partial void ApplyUpdate(global::System.Runtime.CompilerServices.QCallAssembly assembly, byte* metadataDelta, int metadataDeltaLength, byte* ilDelta, int ilDeltaLength, byte* pdbDelta, int pdbDeltaLength);
    }
}
namespace System.Reflection.Metadata
{
    public static unsafe partial class MetadataUpdater
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        private static unsafe partial bool IsApplyUpdateSupported()
        {
            bool __retVal;
            int __retVal_native;
            {
                __retVal_native = __PInvoke();
            }
 
            // Unmarshal - Convert native data to managed data.
            __retVal = __retVal_native != 0;
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "AssemblyNative_IsApplyUpdateSupported", ExactSpelling = true)]
            static extern unsafe int __PInvoke();
        }
    }
}
namespace System.Reflection
{
    public abstract unsafe partial class MethodBase
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "MethodBase_GetCurrentMethod", ExactSpelling = true)]
        private static extern partial global::System.RuntimeMethodHandleInternal GetCurrentMethod(global::System.Runtime.CompilerServices.StackCrawlMarkHandle stackMark);
    }
}
namespace System.Reflection
{
    internal sealed unsafe partial class RuntimeAssembly
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        private static partial bool GetCodeBase(global::System.Runtime.CompilerServices.QCallAssembly assembly, global::System.Runtime.CompilerServices.StringHandleOnStack retString)
        {
            bool __retVal;
            int __retVal_native;
            {
                __retVal_native = __PInvoke(assembly, retString);
            }
 
            // Unmarshal - Convert native data to managed data.
            __retVal = __retVal_native != 0;
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "AssemblyNative_GetCodeBase", ExactSpelling = true)]
            static extern unsafe int __PInvoke(global::System.Runtime.CompilerServices.QCallAssembly __assembly_native, global::System.Runtime.CompilerServices.StringHandleOnStack __retString_native);
        }
    }
}
namespace System.Reflection
{
    internal sealed unsafe partial class RuntimeAssembly
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "AssemblyNative_GetFullName", ExactSpelling = true)]
        private static extern partial void GetFullName(global::System.Runtime.CompilerServices.QCallAssembly assembly, global::System.Runtime.CompilerServices.StringHandleOnStack retString);
    }
}
namespace System.Reflection
{
    internal sealed unsafe partial class RuntimeAssembly
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "AssemblyNative_GetEntryPoint", ExactSpelling = true)]
        private static extern partial void GetEntryPoint(global::System.Runtime.CompilerServices.QCallAssembly assembly, global::System.Runtime.CompilerServices.ObjectHandleOnStack retMethod);
    }
}
namespace System.Reflection
{
    internal sealed unsafe partial class RuntimeAssembly
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        private static partial void GetTypeCore(global::System.Runtime.CompilerServices.QCallAssembly assembly, string typeName, global::System.ReadOnlySpan<string> nestedTypeNames, int nestedTypeNamesLength, global::System.Runtime.CompilerServices.ObjectHandleOnStack retType)
        {
            bool __invokeSucceeded = default;
            byte* __typeName_native = default;
            global::System.IntPtr* __nestedTypeNames_native = default;
            // Setup - Perform required setup.
            scoped global::System.Runtime.InteropServices.Marshalling.ReadOnlySpanMarshaller<string, global::System.IntPtr>.ManagedToUnmanagedIn __nestedTypeNames_native__marshaller = new();
            int __nestedTypeNames_native__lastIndexMarshalled = 0;
            scoped global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.ManagedToUnmanagedIn __typeName_native__marshaller = new();
            try
            {
                // Marshal - Convert managed data to native data.
                __nestedTypeNames_native__marshaller.FromManaged(nestedTypeNames, stackalloc global::System.IntPtr[global::System.Runtime.InteropServices.Marshalling.ReadOnlySpanMarshaller<string, global::System.IntPtr>.ManagedToUnmanagedIn.BufferSize]);
                {
                    global::System.ReadOnlySpan<string> __nestedTypeNames_native__managedSpan = __nestedTypeNames_native__marshaller.GetManagedValuesSource();
                    global::System.Span<global::System.IntPtr> __nestedTypeNames_native__nativeSpan = __nestedTypeNames_native__marshaller.GetUnmanagedValuesDestination();
                    for (int __i0 = 0; __i0 < __nestedTypeNames_native__managedSpan.Length; ++__i0, ++__nestedTypeNames_native__lastIndexMarshalled)
                    {
                        byte* __nestedTypeNames_native__nativeSpan____i0_exactType = (byte*)__nestedTypeNames_native__nativeSpan[__i0];
                        __nestedTypeNames_native__nativeSpan____i0_exactType = (byte*)global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.ConvertToUnmanaged(__nestedTypeNames_native__managedSpan[__i0]);
                        __nestedTypeNames_native__nativeSpan[__i0] = (global::System.IntPtr)__nestedTypeNames_native__nativeSpan____i0_exactType;
                    }
                }
 
                __typeName_native__marshaller.FromManaged(typeName, stackalloc byte[global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.ManagedToUnmanagedIn.BufferSize]);
                // Pin - Pin data in preparation for calling the P/Invoke.
                fixed (void* __nestedTypeNames_native__unused = __nestedTypeNames_native__marshaller)
                {
                    // PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
                    __nestedTypeNames_native = __nestedTypeNames_native__marshaller.ToUnmanaged();
                    __typeName_native = __typeName_native__marshaller.ToUnmanaged();
                    __PInvoke(assembly, __typeName_native, __nestedTypeNames_native, nestedTypeNamesLength, retType);
                }
 
                __invokeSucceeded = true;
            }
            finally
            {
                if (__invokeSucceeded)
                {
                    // CleanupCalleeAllocated - Perform cleanup of callee allocated resources.
                    _ = __nestedTypeNames_native__lastIndexMarshalled;
                }
 
                // CleanupCallerAllocated - Perform cleanup of caller allocated resources.
                {
                    global::System.ReadOnlySpan<global::System.IntPtr> __nestedTypeNames_native__nativeSpan = __nestedTypeNames_native__marshaller.GetUnmanagedValuesDestination();
                    for (int __i0 = 0; __i0 < __nestedTypeNames_native__lastIndexMarshalled; ++__i0)
                    {
                        byte* __nestedTypeNames_native__nativeSpan____i0_exactType = (byte*)__nestedTypeNames_native__nativeSpan[__i0];
                        global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.Free(__nestedTypeNames_native__nativeSpan____i0_exactType);
                    }
                }
 
                __nestedTypeNames_native__marshaller.Free();
                __typeName_native__marshaller.Free();
            }
 
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "AssemblyNative_GetTypeCore", ExactSpelling = true)]
            static extern unsafe void __PInvoke(global::System.Runtime.CompilerServices.QCallAssembly __assembly_native, byte* __typeName_native, global::System.IntPtr* __nestedTypeNames_native, int __nestedTypeNamesLength_native, global::System.Runtime.CompilerServices.ObjectHandleOnStack __retType_native);
        }
    }
}
namespace System.Reflection
{
    internal sealed unsafe partial class RuntimeAssembly
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        private static partial void GetTypeCoreIgnoreCase(global::System.Runtime.CompilerServices.QCallAssembly assembly, string typeName, global::System.ReadOnlySpan<string> nestedTypeNames, int nestedTypeNamesLength, global::System.Runtime.CompilerServices.ObjectHandleOnStack retType)
        {
            bool __invokeSucceeded = default;
            global::System.IntPtr* __nestedTypeNames_native = default;
            // Setup - Perform required setup.
            scoped global::System.Runtime.InteropServices.Marshalling.ReadOnlySpanMarshaller<string, global::System.IntPtr>.ManagedToUnmanagedIn __nestedTypeNames_native__marshaller = new();
            int __nestedTypeNames_native__lastIndexMarshalled = 0;
            try
            {
                // Marshal - Convert managed data to native data.
                __nestedTypeNames_native__marshaller.FromManaged(nestedTypeNames, stackalloc global::System.IntPtr[global::System.Runtime.InteropServices.Marshalling.ReadOnlySpanMarshaller<string, global::System.IntPtr>.ManagedToUnmanagedIn.BufferSize]);
                {
                    global::System.ReadOnlySpan<string> __nestedTypeNames_native__managedSpan = __nestedTypeNames_native__marshaller.GetManagedValuesSource();
                    global::System.Span<global::System.IntPtr> __nestedTypeNames_native__nativeSpan = __nestedTypeNames_native__marshaller.GetUnmanagedValuesDestination();
                    for (int __i0 = 0; __i0 < __nestedTypeNames_native__managedSpan.Length; ++__i0, ++__nestedTypeNames_native__lastIndexMarshalled)
                    {
                        ushort* __nestedTypeNames_native__nativeSpan____i0_exactType = (ushort*)__nestedTypeNames_native__nativeSpan[__i0];
                        __nestedTypeNames_native__nativeSpan____i0_exactType = (ushort*)global::System.Runtime.InteropServices.Marshalling.Utf16StringMarshaller.ConvertToUnmanaged(__nestedTypeNames_native__managedSpan[__i0]);
                        __nestedTypeNames_native__nativeSpan[__i0] = (global::System.IntPtr)__nestedTypeNames_native__nativeSpan____i0_exactType;
                    }
                }
 
                // Pin - Pin data in preparation for calling the P/Invoke.
                fixed (void* __nestedTypeNames_native__unused = __nestedTypeNames_native__marshaller)
                fixed (void* __typeName_native = &global::System.Runtime.InteropServices.Marshalling.Utf16StringMarshaller.GetPinnableReference(typeName))
                {
                    // PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
                    __nestedTypeNames_native = __nestedTypeNames_native__marshaller.ToUnmanaged();
                    __PInvoke(assembly, (ushort*)__typeName_native, __nestedTypeNames_native, nestedTypeNamesLength, retType);
                }
 
                __invokeSucceeded = true;
            }
            finally
            {
                if (__invokeSucceeded)
                {
                    // CleanupCalleeAllocated - Perform cleanup of callee allocated resources.
                    _ = __nestedTypeNames_native__lastIndexMarshalled;
                }
 
                // CleanupCallerAllocated - Perform cleanup of caller allocated resources.
                {
                    global::System.ReadOnlySpan<global::System.IntPtr> __nestedTypeNames_native__nativeSpan = __nestedTypeNames_native__marshaller.GetUnmanagedValuesDestination();
                    for (int __i0 = 0; __i0 < __nestedTypeNames_native__lastIndexMarshalled; ++__i0)
                    {
                        ushort* __nestedTypeNames_native__nativeSpan____i0_exactType = (ushort*)__nestedTypeNames_native__nativeSpan[__i0];
                        global::System.Runtime.InteropServices.Marshalling.Utf16StringMarshaller.Free(__nestedTypeNames_native__nativeSpan____i0_exactType);
                    }
                }
 
                __nestedTypeNames_native__marshaller.Free();
            }
 
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "AssemblyNative_GetTypeCoreIgnoreCase", ExactSpelling = true)]
            static extern unsafe void __PInvoke(global::System.Runtime.CompilerServices.QCallAssembly __assembly_native, ushort* __typeName_native, global::System.IntPtr* __nestedTypeNames_native, int __nestedTypeNamesLength_native, global::System.Runtime.CompilerServices.ObjectHandleOnStack __retType_native);
        }
    }
}
namespace System.Reflection
{
    internal sealed unsafe partial class RuntimeAssembly
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "AssemblyNative_GetExportedTypes", ExactSpelling = true)]
        private static extern partial void GetExportedTypes(global::System.Runtime.CompilerServices.QCallAssembly assembly, global::System.Runtime.CompilerServices.ObjectHandleOnStack retTypes);
    }
}
namespace System.Reflection
{
    internal sealed unsafe partial class RuntimeAssembly
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "AssemblyNative_GetIsCollectible", ExactSpelling = true)]
        internal static extern partial global::Interop.BOOL GetIsCollectible(global::System.Runtime.CompilerServices.QCallAssembly assembly);
    }
}
namespace System.Reflection
{
    internal sealed unsafe partial class RuntimeAssembly
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        private static unsafe partial byte* GetResource(global::System.Runtime.CompilerServices.QCallAssembly assembly, string resourceName, out uint length)
        {
            length = default;
            byte* __retVal;
            // Pin - Pin data in preparation for calling the P/Invoke.
            fixed (uint* __length_native = &length)
            fixed (void* __resourceName_native = &global::System.Runtime.InteropServices.Marshalling.Utf16StringMarshaller.GetPinnableReference(resourceName))
            {
                __retVal = __PInvoke(assembly, (ushort*)__resourceName_native, __length_native);
            }
 
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "AssemblyNative_GetResource", ExactSpelling = true)]
            static extern unsafe byte* __PInvoke(global::System.Runtime.CompilerServices.QCallAssembly __assembly_native, ushort* __resourceName_native, uint* __length_native);
        }
    }
}
namespace System.Reflection
{
    internal sealed unsafe partial class RuntimeAssembly
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        private static unsafe partial void InternalLoad(global::System.Reflection.NativeAssemblyNameParts* pAssemblyNameParts, global::System.Runtime.CompilerServices.ObjectHandleOnStack requestingAssembly, global::System.Runtime.CompilerServices.StackCrawlMarkHandle stackMark, bool throwOnFileNotFound, global::System.Runtime.CompilerServices.ObjectHandleOnStack assemblyLoadContext, global::System.Runtime.CompilerServices.ObjectHandleOnStack retAssembly)
        {
            int __throwOnFileNotFound_native;
            // Marshal - Convert managed data to native data.
            __throwOnFileNotFound_native = (int)(throwOnFileNotFound ? 1 : 0);
            {
                __PInvoke(pAssemblyNameParts, requestingAssembly, stackMark, __throwOnFileNotFound_native, assemblyLoadContext, retAssembly);
            }
 
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "AssemblyNative_InternalLoad", ExactSpelling = true)]
            static extern unsafe void __PInvoke(global::System.Reflection.NativeAssemblyNameParts* __pAssemblyNameParts_native, global::System.Runtime.CompilerServices.ObjectHandleOnStack __requestingAssembly_native, global::System.Runtime.CompilerServices.StackCrawlMarkHandle __stackMark_native, int __throwOnFileNotFound_native, global::System.Runtime.CompilerServices.ObjectHandleOnStack __assemblyLoadContext_native, global::System.Runtime.CompilerServices.ObjectHandleOnStack __retAssembly_native);
        }
    }
}
namespace System.Reflection
{
    internal sealed unsafe partial class RuntimeAssembly
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        private static partial void GetModule(global::System.Runtime.CompilerServices.QCallAssembly assembly, string name, global::System.Runtime.CompilerServices.ObjectHandleOnStack retModule)
        {
            // Pin - Pin data in preparation for calling the P/Invoke.
            fixed (void* __name_native = &global::System.Runtime.InteropServices.Marshalling.Utf16StringMarshaller.GetPinnableReference(name))
            {
                __PInvoke(assembly, (ushort*)__name_native, retModule);
            }
 
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "AssemblyNative_GetModule", ExactSpelling = true)]
            static extern unsafe void __PInvoke(global::System.Runtime.CompilerServices.QCallAssembly __assembly_native, ushort* __name_native, global::System.Runtime.CompilerServices.ObjectHandleOnStack __retModule_native);
        }
    }
}
namespace System.Reflection
{
    internal sealed unsafe partial class RuntimeAssembly
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "AssemblyNative_GetManifestResourceNames", ExactSpelling = true)]
        private static extern partial void GetManifestResourceNames(global::System.Runtime.CompilerServices.QCallAssembly assembly, global::System.Runtime.CompilerServices.ObjectHandleOnStack retResourceNames);
    }
}
namespace System.Reflection
{
    internal sealed unsafe partial class RuntimeAssembly
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "AssemblyNative_GetReferencedAssemblies", ExactSpelling = true)]
        private static extern partial void GetReferencedAssemblies(global::System.Runtime.CompilerServices.QCallAssembly assembly, global::System.Runtime.CompilerServices.ObjectHandleOnStack retReferencedAssemblies);
    }
}
namespace System.Reflection
{
    internal sealed unsafe partial class RuntimeAssembly
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        private static partial int GetManifestResourceInfo(global::System.Runtime.CompilerServices.QCallAssembly assembly, string resourceName, global::System.Runtime.CompilerServices.ObjectHandleOnStack assemblyRef, global::System.Runtime.CompilerServices.StringHandleOnStack retFileName)
        {
            int __retVal;
            // Pin - Pin data in preparation for calling the P/Invoke.
            fixed (void* __resourceName_native = &global::System.Runtime.InteropServices.Marshalling.Utf16StringMarshaller.GetPinnableReference(resourceName))
            {
                __retVal = __PInvoke(assembly, (ushort*)__resourceName_native, assemblyRef, retFileName);
            }
 
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "AssemblyNative_GetManifestResourceInfo", ExactSpelling = true)]
            static extern unsafe int __PInvoke(global::System.Runtime.CompilerServices.QCallAssembly __assembly_native, ushort* __resourceName_native, global::System.Runtime.CompilerServices.ObjectHandleOnStack __assemblyRef_native, global::System.Runtime.CompilerServices.StringHandleOnStack __retFileName_native);
        }
    }
}
namespace System.Reflection
{
    internal sealed unsafe partial class RuntimeAssembly
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "AssemblyNative_GetLocation", ExactSpelling = true)]
        private static extern partial void GetLocation(global::System.Runtime.CompilerServices.QCallAssembly assembly, global::System.Runtime.CompilerServices.StringHandleOnStack retString);
    }
}
namespace System.Reflection
{
    internal sealed unsafe partial class RuntimeAssembly
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "AssemblyNative_GetImageRuntimeVersion", ExactSpelling = true)]
        private static extern partial void GetImageRuntimeVersion(global::System.Runtime.CompilerServices.QCallAssembly assembly, global::System.Runtime.CompilerServices.StringHandleOnStack retString);
    }
}
namespace System.Reflection
{
    internal sealed unsafe partial class RuntimeAssembly
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        private static partial void GetVersion(global::System.Runtime.CompilerServices.QCallAssembly assembly, out int majVer, out int minVer, out int buildNum, out int revNum)
        {
            majVer = default;
            minVer = default;
            buildNum = default;
            revNum = default;
            // Pin - Pin data in preparation for calling the P/Invoke.
            fixed (int* __revNum_native = &revNum)
            fixed (int* __buildNum_native = &buildNum)
            fixed (int* __minVer_native = &minVer)
            fixed (int* __majVer_native = &majVer)
            {
                __PInvoke(assembly, __majVer_native, __minVer_native, __buildNum_native, __revNum_native);
            }
 
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "AssemblyNative_GetVersion", ExactSpelling = true)]
            static extern unsafe void __PInvoke(global::System.Runtime.CompilerServices.QCallAssembly __assembly_native, int* __majVer_native, int* __minVer_native, int* __buildNum_native, int* __revNum_native);
        }
    }
}
namespace System.Reflection
{
    internal sealed unsafe partial class RuntimeAssembly
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "AssemblyNative_GetLocale", ExactSpelling = true)]
        private static extern partial void GetLocale(global::System.Runtime.CompilerServices.QCallAssembly assembly, global::System.Runtime.CompilerServices.StringHandleOnStack retString);
    }
}
namespace System.Reflection
{
    internal sealed unsafe partial class RuntimeAssembly
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "AssemblyNative_GetSimpleName", ExactSpelling = true)]
        private static extern partial void GetSimpleName(global::System.Runtime.CompilerServices.QCallAssembly assembly, global::System.Runtime.CompilerServices.StringHandleOnStack retSimpleName);
    }
}
namespace System.Reflection
{
    internal sealed unsafe partial class RuntimeAssembly
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "AssemblyNative_GetHashAlgorithm", ExactSpelling = true)]
        private static extern partial global::System.Configuration.Assemblies.AssemblyHashAlgorithm GetHashAlgorithm(global::System.Runtime.CompilerServices.QCallAssembly assembly);
    }
}
namespace System.Reflection
{
    internal sealed unsafe partial class RuntimeAssembly
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "AssemblyNative_GetFlags", ExactSpelling = true)]
        private static extern partial global::System.Reflection.AssemblyNameFlags GetFlags(global::System.Runtime.CompilerServices.QCallAssembly assembly);
    }
}
namespace System.Reflection
{
    internal sealed unsafe partial class RuntimeAssembly
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "AssemblyNative_GetPublicKey", ExactSpelling = true)]
        private static extern partial void GetPublicKey(global::System.Runtime.CompilerServices.QCallAssembly assembly, global::System.Runtime.CompilerServices.ObjectHandleOnStack retPublicKey);
    }
}
namespace System.Reflection
{
    internal sealed unsafe partial class RuntimeAssembly
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        private static partial void GetModules(global::System.Runtime.CompilerServices.QCallAssembly assembly, bool loadIfNotFound, bool getResourceModules, global::System.Runtime.CompilerServices.ObjectHandleOnStack retModuleHandles)
        {
            int __loadIfNotFound_native;
            int __getResourceModules_native;
            // Marshal - Convert managed data to native data.
            __getResourceModules_native = (int)(getResourceModules ? 1 : 0);
            __loadIfNotFound_native = (int)(loadIfNotFound ? 1 : 0);
            {
                __PInvoke(assembly, __loadIfNotFound_native, __getResourceModules_native, retModuleHandles);
            }
 
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "AssemblyNative_GetModules", ExactSpelling = true)]
            static extern unsafe void __PInvoke(global::System.Runtime.CompilerServices.QCallAssembly __assembly_native, int __loadIfNotFound_native, int __getResourceModules_native, global::System.Runtime.CompilerServices.ObjectHandleOnStack __retModuleHandles_native);
        }
    }
}
namespace System.Reflection
{
    internal sealed unsafe partial class RuntimeAssembly
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "AssemblyHandle_GetManifestModuleSlow", ExactSpelling = true)]
        private static extern partial void GetManifestModuleSlow(global::System.Runtime.CompilerServices.ObjectHandleOnStack assembly, global::System.Runtime.CompilerServices.ObjectHandleOnStack module);
    }
}
namespace System.Reflection
{
    internal sealed unsafe partial class RuntimeAssembly
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "AssemblyNative_GetForwardedType", ExactSpelling = true)]
        private static extern partial void GetForwardedType(global::System.Runtime.CompilerServices.QCallAssembly assembly, global::System.Reflection.MetadataToken mdtExternalType, global::System.Runtime.CompilerServices.ObjectHandleOnStack type);
    }
}
namespace System.Reflection
{
    internal static unsafe partial class CustomAttribute
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "CustomAttribute_ParseAttributeUsageAttribute", ExactSpelling = true)]
        private static extern partial int ParseAttributeUsageAttribute(nint pData, int cData, int* pTargets, int* pAllowMultiple, int* pInherited);
    }
}
namespace System.Reflection
{
    internal static unsafe partial class CustomAttribute
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        private static partial void CreateCustomAttributeInstance(global::System.Runtime.CompilerServices.QCallModule pModule, global::System.Runtime.CompilerServices.ObjectHandleOnStack type, global::System.Runtime.CompilerServices.ObjectHandleOnStack pCtor, ref nint ppBlob, nint pEndBlob, out int pcNamedArgs, global::System.Runtime.CompilerServices.ObjectHandleOnStack instance)
        {
            pcNamedArgs = default;
            // Pin - Pin data in preparation for calling the P/Invoke.
            fixed (int* __pcNamedArgs_native = &pcNamedArgs)
            fixed (nint* __ppBlob_native = &ppBlob)
            {
                __PInvoke(pModule, type, pCtor, __ppBlob_native, pEndBlob, __pcNamedArgs_native, instance);
            }
 
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "CustomAttribute_CreateCustomAttributeInstance", ExactSpelling = true)]
            static extern unsafe void __PInvoke(global::System.Runtime.CompilerServices.QCallModule __pModule_native, global::System.Runtime.CompilerServices.ObjectHandleOnStack __type_native, global::System.Runtime.CompilerServices.ObjectHandleOnStack __pCtor_native, nint* __ppBlob_native, nint __pEndBlob_native, int* __pcNamedArgs_native, global::System.Runtime.CompilerServices.ObjectHandleOnStack __instance_native);
        }
    }
}
namespace System.Reflection
{
    internal static unsafe partial class CustomAttribute
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        private static partial void CreatePropertyOrFieldData(global::System.Runtime.CompilerServices.QCallModule pModule, ref nint ppBlobStart, nint pBlobEnd, global::System.Runtime.CompilerServices.StringHandleOnStack name, out bool bIsProperty, global::System.Runtime.CompilerServices.ObjectHandleOnStack type, global::System.Runtime.CompilerServices.ObjectHandleOnStack value)
        {
            bIsProperty = default;
            int __bIsProperty_native;
            // Pin - Pin data in preparation for calling the P/Invoke.
            fixed (nint* __ppBlobStart_native = &ppBlobStart)
            {
                __PInvoke(pModule, __ppBlobStart_native, pBlobEnd, name, &__bIsProperty_native, type, value);
            }
 
            // Unmarshal - Convert native data to managed data.
            bIsProperty = __bIsProperty_native != 0;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "CustomAttribute_CreatePropertyOrFieldData", ExactSpelling = true)]
            static extern unsafe void __PInvoke(global::System.Runtime.CompilerServices.QCallModule __pModule_native, nint* __ppBlobStart_native, nint __pBlobEnd_native, global::System.Runtime.CompilerServices.StringHandleOnStack __name_native, int* __bIsProperty_native, global::System.Runtime.CompilerServices.ObjectHandleOnStack __type_native, global::System.Runtime.CompilerServices.ObjectHandleOnStack __value_native);
        }
    }
}
namespace System.Reflection
{
    internal sealed unsafe partial class RuntimeModule
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "RuntimeModule_GetFullyQualifiedName", ExactSpelling = true)]
        private static extern partial void GetFullyQualifiedName(global::System.Runtime.CompilerServices.QCallModule module, global::System.Runtime.CompilerServices.StringHandleOnStack retString);
    }
}
namespace System.Reflection
{
    internal sealed unsafe partial class RuntimeModule
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "RuntimeModule_GetTypes", ExactSpelling = true)]
        private static extern partial void GetTypes(global::System.Runtime.CompilerServices.QCallModule module, global::System.Runtime.CompilerServices.ObjectHandleOnStack retTypes);
    }
}
namespace System.Reflection
{
    internal sealed unsafe partial class RuntimeModule
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "RuntimeModule_GetScopeName", ExactSpelling = true)]
        private static extern partial void GetScopeName(global::System.Runtime.CompilerServices.QCallModule module, global::System.Runtime.CompilerServices.StringHandleOnStack retString);
    }
}
namespace System.Reflection
{
    internal unsafe partial struct TypeNameResolver
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        private static partial nint ResolveGenericParamToTypeHandle(nint unsafeAccessorMethod, bool isMethodParam, uint paramIndex)
        {
            int __isMethodParam_native;
            nint __retVal;
            // Marshal - Convert managed data to native data.
            __isMethodParam_native = (int)(isMethodParam ? 1 : 0);
            {
                __retVal = __PInvoke(unsafeAccessorMethod, __isMethodParam_native, paramIndex);
            }
 
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "UnsafeAccessors_ResolveGenericParamToTypeHandle", ExactSpelling = true)]
            static extern unsafe nint __PInvoke(nint __unsafeAccessorMethod_native, int __isMethodParam_native, uint __paramIndex_native);
        }
    }
}
namespace System.Runtime.CompilerServices
{
    internal static unsafe partial class CastHelpers
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "ThrowInvalidCastException", ExactSpelling = true)]
        private static extern partial void ThrowInvalidCastExceptionInternal(void* fromTypeHnd, void* toTypeHnd);
    }
}
namespace System.Runtime.CompilerServices
{
    internal static unsafe partial class CastHelpers
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        private static partial bool IsInstanceOf_NoCacheLookup(void* toTypeHnd, bool throwCastException, global::System.Runtime.CompilerServices.ObjectHandleOnStack obj)
        {
            int __throwCastException_native;
            bool __retVal;
            int __retVal_native;
            // Marshal - Convert managed data to native data.
            __throwCastException_native = (int)(throwCastException ? 1 : 0);
            {
                __retVal_native = __PInvoke(toTypeHnd, __throwCastException_native, obj);
            }
 
            // Unmarshal - Convert native data to managed data.
            __retVal = __retVal_native != 0;
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "IsInstanceOf_NoCacheLookup", ExactSpelling = true)]
            static extern unsafe int __PInvoke(void* __toTypeHnd_native, int __throwCastException_native, global::System.Runtime.CompilerServices.ObjectHandleOnStack __obj_native);
        }
    }
}
namespace System.Runtime.CompilerServices
{
    internal static unsafe partial class GenericsHelpers
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "GenericHandleWorker", ExactSpelling = true)]
        private static extern partial nint GenericHandleWorker(nint pMD, nint pMT, nint signature, uint dictionaryIndexAndSlot, nint pModule);
    }
}
namespace System.Runtime.CompilerServices
{
    internal static unsafe partial class InitHelpers
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "InitClassHelper", ExactSpelling = true)]
        private static extern partial void InitClassHelper(global::System.Runtime.CompilerServices.MethodTable* mt);
    }
}
namespace System.Runtime.CompilerServices
{
    public static unsafe partial class RuntimeHelpers
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "ReflectionInvocation_RunClassConstructor", ExactSpelling = true)]
        private static extern partial void RunClassConstructor(global::System.Runtime.CompilerServices.QCallTypeHandle type);
    }
}
namespace System.Runtime.CompilerServices
{
    public static unsafe partial class RuntimeHelpers
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "ReflectionInvocation_RunModuleConstructor", ExactSpelling = true)]
        private static extern partial void RunModuleConstructor(global::System.Runtime.CompilerServices.QCallModule module);
    }
}
namespace System.Runtime.CompilerServices
{
    public static unsafe partial class RuntimeHelpers
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "ReflectionInvocation_CompileMethod", ExactSpelling = true)]
        internal static extern partial void CompileMethod(global::System.RuntimeMethodHandleInternal method);
    }
}
namespace System.Runtime.CompilerServices
{
    public static unsafe partial class RuntimeHelpers
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "ReflectionInvocation_PrepareMethod", ExactSpelling = true)]
        private static unsafe extern partial void PrepareMethod(global::System.RuntimeMethodHandleInternal method, nint* pInstantiation, int cInstantiation);
    }
}
namespace System.Runtime.CompilerServices
{
    public static unsafe partial class RuntimeHelpers
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "ReflectionInvocation_PrepareDelegate", ExactSpelling = true)]
        private static extern partial void PrepareDelegate(global::System.Runtime.CompilerServices.ObjectHandleOnStack d);
    }
}
namespace System.Runtime.CompilerServices
{
    public static unsafe partial class RuntimeHelpers
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "ObjectNative_GetHashCodeSlow", ExactSpelling = true)]
        private static extern partial int GetHashCodeSlow(global::System.Runtime.CompilerServices.ObjectHandleOnStack o);
    }
}
namespace System.Runtime.CompilerServices
{
    public static unsafe partial class RuntimeHelpers
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "ObjectNative_AllocateUninitializedClone", ExactSpelling = true)]
        internal static extern partial void AllocateUninitializedClone(global::System.Runtime.CompilerServices.ObjectHandleOnStack objHandle);
    }
}
namespace System.Runtime.CompilerServices
{
    public static unsafe partial class RuntimeHelpers
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        internal static unsafe partial bool AreTypesEquivalent(global::System.Runtime.CompilerServices.MethodTable* pMTa, global::System.Runtime.CompilerServices.MethodTable* pMTb)
        {
            bool __retVal;
            int __retVal_native;
            {
                __retVal_native = __PInvoke(pMTa, pMTb);
            }
 
            // Unmarshal - Convert native data to managed data.
            __retVal = __retVal_native != 0;
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "MethodTable_AreTypesEquivalent", ExactSpelling = true)]
            static extern unsafe int __PInvoke(global::System.Runtime.CompilerServices.MethodTable* __pMTa_native, global::System.Runtime.CompilerServices.MethodTable* __pMTb_native);
        }
    }
}
namespace System.Runtime.CompilerServices
{
    public static unsafe partial class RuntimeHelpers
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "RuntimeTypeHandle_AllocateTypeAssociatedMemory", ExactSpelling = true)]
        private static extern partial nint AllocateTypeAssociatedMemory(global::System.Runtime.CompilerServices.QCallTypeHandle type, uint size);
    }
}
namespace System.Runtime.CompilerServices
{
    public static unsafe partial class RuntimeHelpers
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "TailCallHelp_AllocTailCallArgBufferInternal", ExactSpelling = true)]
        private static unsafe extern partial global::System.Runtime.CompilerServices.TailCallArgBuffer* AllocTailCallArgBufferInternal(int size);
    }
}
namespace System.Runtime.CompilerServices
{
    public static unsafe partial class RuntimeHelpers
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "ReflectionInvocation_SizeOf", ExactSpelling = true)]
        private static extern partial int SizeOf(global::System.Runtime.CompilerServices.QCallTypeHandle handle);
    }
}
namespace System.Runtime.CompilerServices
{
    internal readonly unsafe partial struct TypeHandle
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "TypeHandle_CanCastTo_NoCacheLookup", ExactSpelling = true)]
        private static extern partial global::Interop.BOOL CanCastTo_NoCacheLookup(void* fromTypeHnd, void* toTypeHnd);
    }
}
namespace System.Runtime.CompilerServices
{
    internal readonly unsafe partial struct TypeHandle
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "TypeHandle_GetCorElementType", ExactSpelling = true)]
        private static extern partial int GetCorElementType(void* typeHnd);
    }
}
namespace System.Runtime.CompilerServices
{
    internal static unsafe partial class StaticsHelpers
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        private static partial void GetThreadStaticsByIndex(global::System.Runtime.CompilerServices.ByteRefOnStack result, int index, bool gcStatics)
        {
            int __gcStatics_native;
            // Marshal - Convert managed data to native data.
            __gcStatics_native = (int)(gcStatics ? 1 : 0);
            {
                __PInvoke(result, index, __gcStatics_native);
            }
 
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "GetThreadStaticsByIndex", ExactSpelling = true)]
            static extern unsafe void __PInvoke(global::System.Runtime.CompilerServices.ByteRefOnStack __result_native, int __index_native, int __gcStatics_native);
        }
    }
}
namespace System.Runtime.CompilerServices
{
    internal static unsafe partial class StaticsHelpers
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        private static partial void GetThreadStaticsByMethodTable(global::System.Runtime.CompilerServices.ByteRefOnStack result, global::System.Runtime.CompilerServices.MethodTable* pMT, bool gcStatics)
        {
            int __gcStatics_native;
            // Marshal - Convert managed data to native data.
            __gcStatics_native = (int)(gcStatics ? 1 : 0);
            {
                __PInvoke(result, pMT, __gcStatics_native);
            }
 
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "GetThreadStaticsByMethodTable", ExactSpelling = true)]
            static extern unsafe void __PInvoke(global::System.Runtime.CompilerServices.ByteRefOnStack __result_native, global::System.Runtime.CompilerServices.MethodTable* __pMT_native, int __gcStatics_native);
        }
    }
}
namespace System.Runtime.CompilerServices
{
    internal static unsafe partial class VirtualDispatchHelpers
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "ResolveVirtualFunctionPointer", ExactSpelling = true)]
        private static unsafe extern partial nint ResolveVirtualFunctionPointer(global::System.Runtime.CompilerServices.ObjectHandleOnStack obj, nint classHandle, nint methodHandle);
    }
}
namespace System.Runtime
{
    public static unsafe partial class ControlledExecution
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "ThreadNative_Abort", ExactSpelling = true)]
        private static extern partial void AbortThread(global::System.Threading.ThreadHandle thread);
    }
}
namespace System.Runtime
{
    public static unsafe partial class ControlledExecution
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "ThreadNative_ResetAbort", ExactSpelling = true)]
        private static extern partial void ResetAbortThread();
    }
}
namespace System.Runtime
{
    public unsafe partial struct DependentHandle
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "DependentHandle_InternalAllocWithGCTransition", ExactSpelling = true)]
        private static extern partial nint _InternalAllocWithGCTransition(global::System.Runtime.CompilerServices.ObjectHandleOnStack target, global::System.Runtime.CompilerServices.ObjectHandleOnStack dependent);
    }
}
namespace System.Runtime
{
    public unsafe partial struct DependentHandle
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "DependentHandle_InternalFreeWithGCTransition", ExactSpelling = true)]
        private static extern partial void _InternalFreeWithGCTransition(nint dependentHandle);
    }
}
namespace System.Runtime.ExceptionServices
{
    internal static unsafe partial class InternalCalls
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        internal static unsafe partial bool RhpSfiInit(ref global::System.Runtime.StackFrameIterator pThis, void* pStackwalkCtx, bool instructionFault, bool* fIsExceptionIntercepted)
        {
            byte __instructionFault_native;
            bool __retVal;
            byte __retVal_native;
            // Marshal - Convert managed data to native data.
            __instructionFault_native = (byte)(instructionFault ? 1 : 0);
            // Pin - Pin data in preparation for calling the P/Invoke.
            fixed (global::System.Runtime.StackFrameIterator* __pThis_native = &pThis)
            {
                __retVal_native = __PInvoke(__pThis_native, pStackwalkCtx, __instructionFault_native, fIsExceptionIntercepted);
            }
 
            // Unmarshal - Convert native data to managed data.
            __retVal = __retVal_native != 0;
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "SfiInit", ExactSpelling = true)]
            static extern unsafe byte __PInvoke(global::System.Runtime.StackFrameIterator* __pThis_native, void* __pStackwalkCtx_native, byte __instructionFault_native, bool* __fIsExceptionIntercepted_native);
        }
    }
}
namespace System.Runtime.ExceptionServices
{
    internal static unsafe partial class InternalCalls
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        internal static unsafe partial bool RhpSfiNext(ref global::System.Runtime.StackFrameIterator pThis, uint* uExCollideClauseIdx, bool* fUnwoundReversePInvoke, bool* fIsExceptionIntercepted)
        {
            bool __retVal;
            byte __retVal_native;
            // Pin - Pin data in preparation for calling the P/Invoke.
            fixed (global::System.Runtime.StackFrameIterator* __pThis_native = &pThis)
            {
                __retVal_native = __PInvoke(__pThis_native, uExCollideClauseIdx, fUnwoundReversePInvoke, fIsExceptionIntercepted);
            }
 
            // Unmarshal - Convert native data to managed data.
            __retVal = __retVal_native != 0;
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "SfiNext", ExactSpelling = true)]
            static extern unsafe byte __PInvoke(global::System.Runtime.StackFrameIterator* __pThis_native, uint* __uExCollideClauseIdx_native, bool* __fUnwoundReversePInvoke_native, bool* __fIsExceptionIntercepted_native);
        }
    }
}
namespace System.Runtime.ExceptionServices
{
    internal static unsafe partial class InternalCalls
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "ResumeAtInterceptionLocation", ExactSpelling = true)]
        internal static unsafe extern partial void ResumeAtInterceptionLocation(void* pvRegDisplay);
    }
}
namespace System.Runtime.ExceptionServices
{
    internal static unsafe partial class InternalCalls
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "CallCatchFunclet", ExactSpelling = true)]
        internal static unsafe extern partial nint RhpCallCatchFunclet(global::System.Runtime.CompilerServices.ObjectHandleOnStack exceptionObj, byte* pHandlerIP, void* pvRegDisplay, global::System.Runtime.EH.ExInfo* exInfo);
    }
}
namespace System.Runtime.ExceptionServices
{
    internal static unsafe partial class InternalCalls
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "CallFinallyFunclet", ExactSpelling = true)]
        internal static unsafe extern partial void RhpCallFinallyFunclet(byte* pHandlerIP, void* pvRegDisplay, global::System.Runtime.EH.ExInfo* exInfo);
    }
}
namespace System.Runtime.ExceptionServices
{
    internal static unsafe partial class InternalCalls
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        internal static unsafe partial bool RhpCallFilterFunclet(global::System.Runtime.CompilerServices.ObjectHandleOnStack exceptionObj, byte* pFilterIP, void* pvRegDisplay)
        {
            bool __retVal;
            byte __retVal_native;
            {
                __retVal_native = __PInvoke(exceptionObj, pFilterIP, pvRegDisplay);
            }
 
            // Unmarshal - Convert native data to managed data.
            __retVal = __retVal_native != 0;
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "CallFilterFunclet", ExactSpelling = true)]
            static extern unsafe byte __PInvoke(global::System.Runtime.CompilerServices.ObjectHandleOnStack __exceptionObj_native, byte* __pFilterIP_native, void* __pvRegDisplay_native);
        }
    }
}
namespace System.Runtime.ExceptionServices
{
    internal static unsafe partial class InternalCalls
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "AppendExceptionStackFrame", ExactSpelling = true)]
        internal static unsafe extern partial void RhpAppendExceptionStackFrame(global::System.Runtime.CompilerServices.ObjectHandleOnStack exceptionObj, nint ip, nuint sp, int flags, global::System.Runtime.EH.ExInfo* exInfo);
    }
}
namespace System.Runtime.ExceptionServices
{
    internal static unsafe partial class InternalCalls
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        internal static unsafe partial bool RhpEHEnumInitFromStackFrameIterator(ref global::System.Runtime.StackFrameIterator pFrameIter, out global::System.Runtime.EH.MethodRegionInfo pMethodRegionInfo, void* pEHEnum)
        {
            pMethodRegionInfo = default;
            bool __retVal;
            byte __retVal_native;
            // Pin - Pin data in preparation for calling the P/Invoke.
            fixed (global::System.Runtime.EH.MethodRegionInfo* __pMethodRegionInfo_native = &pMethodRegionInfo)
            fixed (global::System.Runtime.StackFrameIterator* __pFrameIter_native = &pFrameIter)
            {
                __retVal_native = __PInvoke(__pFrameIter_native, __pMethodRegionInfo_native, pEHEnum);
            }
 
            // Unmarshal - Convert native data to managed data.
            __retVal = __retVal_native != 0;
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "EHEnumInitFromStackFrameIterator", ExactSpelling = true)]
            [global::System.Runtime.InteropServices.SuppressGCTransitionAttribute]
            static extern unsafe byte __PInvoke(global::System.Runtime.StackFrameIterator* __pFrameIter_native, global::System.Runtime.EH.MethodRegionInfo* __pMethodRegionInfo_native, void* __pEHEnum_native);
        }
    }
}
namespace System.Runtime.ExceptionServices
{
    internal static unsafe partial class InternalCalls
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        internal static unsafe partial bool RhpEHEnumNext(void* pEHEnum, void* pEHClause)
        {
            bool __retVal;
            byte __retVal_native;
            {
                __retVal_native = __PInvoke(pEHEnum, pEHClause);
            }
 
            // Unmarshal - Convert native data to managed data.
            __retVal = __retVal_native != 0;
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "EHEnumNext", ExactSpelling = true)]
            static extern unsafe byte __PInvoke(void* __pEHEnum_native, void* __pEHClause_native);
        }
    }
}
namespace System.Runtime.InteropServices
{
    public unsafe partial struct GCHandle
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "GCHandle_InternalAllocWithGCTransition", ExactSpelling = true)]
        private static extern partial nint _InternalAllocWithGCTransition(global::System.Runtime.CompilerServices.ObjectHandleOnStack value, global::System.Runtime.InteropServices.GCHandleType type);
    }
}
namespace System.Runtime.InteropServices
{
    public unsafe partial struct GCHandle
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "GCHandle_InternalFreeWithGCTransition", ExactSpelling = true)]
        private static extern partial void _InternalFreeWithGCTransition(nint dependentHandle);
    }
}
namespace System.Runtime.InteropServices
{
    public unsafe partial struct GCHandle
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "GCHandle_InternalGetBridgeWait", ExactSpelling = true)]
        private static extern partial void InternalGetBridgeWait(nint handle, global::System.Runtime.CompilerServices.ObjectHandleOnStack result);
    }
}
namespace System.Runtime.InteropServices
{
    public static unsafe partial class Marshal
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        private static partial int SizeOfHelper(global::System.Runtime.CompilerServices.QCallTypeHandle t, bool throwIfNotMarshalable)
        {
            int __throwIfNotMarshalable_native;
            int __retVal;
            // Marshal - Convert managed data to native data.
            __throwIfNotMarshalable_native = (int)(throwIfNotMarshalable ? 1 : 0);
            {
                __retVal = __PInvoke(t, __throwIfNotMarshalable_native);
            }
 
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "MarshalNative_SizeOfHelper", ExactSpelling = true)]
            static extern unsafe int __PInvoke(global::System.Runtime.CompilerServices.QCallTypeHandle __t_native, int __throwIfNotMarshalable_native);
        }
    }
}
namespace System.Runtime.InteropServices
{
    public static unsafe partial class Marshal
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "MarshalNative_OffsetOf", ExactSpelling = true)]
        private static extern partial nint OffsetOf(nint pFD);
    }
}
namespace System.Runtime.InteropServices
{
    public static unsafe partial class Marshal
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "MarshalNative_Prelink", ExactSpelling = true)]
        private static extern partial void InternalPrelink(global::System.RuntimeMethodHandleInternal m);
    }
}
namespace System.Runtime.InteropServices
{
    public static unsafe partial class Marshal
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        internal static unsafe partial bool TryGetStructMarshalStub(nint th, delegate*<ref byte, byte*, int, ref global::System.StubHelpers.CleanupWorkListElement, void> * structMarshalStub, nuint* size)
        {
            bool __retVal;
            int __retVal_native;
            {
                __retVal_native = __PInvoke(th, structMarshalStub, size);
            }
 
            // Unmarshal - Convert native data to managed data.
            __retVal = __retVal_native != 0;
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "MarshalNative_TryGetStructMarshalStub", ExactSpelling = true)]
            static extern unsafe int __PInvoke(nint __th_native, delegate*<ref byte, byte*, int, ref global::System.StubHelpers.CleanupWorkListElement, void> * __structMarshalStub_native, nuint* __size_native);
        }
    }
}
namespace System.Runtime.InteropServices
{
    public static unsafe partial class Marshal
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "MarshalNative_GetExceptionForHR", ExactSpelling = true)]
        private static extern partial void GetExceptionForHRInternal(int errorCode, nint errorInfo, global::System.Runtime.CompilerServices.ObjectHandleOnStack exception);
    }
}
namespace System.Runtime.InteropServices
{
    public static unsafe partial class Marshal
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "MarshalNative_GetDelegateForFunctionPointerInternal", ExactSpelling = true)]
        private static extern partial void GetDelegateForFunctionPointerInternal(nint ptr, global::System.Runtime.CompilerServices.QCallTypeHandle t, global::System.Runtime.CompilerServices.ObjectHandleOnStack retDelegate);
    }
}
namespace System.Runtime.InteropServices
{
    public static unsafe partial class Marshal
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "MarshalNative_GetFunctionPointerForDelegateInternal", ExactSpelling = true)]
        private static extern partial nint GetFunctionPointerForDelegateInternal(global::System.Runtime.CompilerServices.ObjectHandleOnStack d);
    }
}
namespace System.Runtime.InteropServices
{
    public static unsafe partial class Marshal
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "MarshalNative_GetIsInCooperativeGCModeFunctionPointer", ExactSpelling = true)]
        internal static unsafe extern partial delegate* unmanaged<int> GetIsInCooperativeGCModeFunctionPointer();
    }
}
namespace System.Runtime.InteropServices
{
    public static unsafe partial class NativeLibrary
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        internal static partial nint LoadFromPath(string libraryName, bool throwOnError)
        {
            int __throwOnError_native;
            nint __retVal;
            // Marshal - Convert managed data to native data.
            __throwOnError_native = (int)(throwOnError ? 1 : 0);
            // Pin - Pin data in preparation for calling the P/Invoke.
            fixed (void* __libraryName_native = &global::System.Runtime.InteropServices.Marshalling.Utf16StringMarshaller.GetPinnableReference(libraryName))
            {
                __retVal = __PInvoke((ushort*)__libraryName_native, __throwOnError_native);
            }
 
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "NativeLibrary_LoadFromPath", ExactSpelling = true)]
            static extern unsafe nint __PInvoke(ushort* __libraryName_native, int __throwOnError_native);
        }
    }
}
namespace System.Runtime.InteropServices
{
    public static unsafe partial class NativeLibrary
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        internal static partial nint LoadByName(string libraryName, global::System.Runtime.CompilerServices.QCallAssembly callingAssembly, bool hasDllImportSearchPathFlag, uint dllImportSearchPathFlag, bool throwOnError)
        {
            int __hasDllImportSearchPathFlag_native;
            int __throwOnError_native;
            nint __retVal;
            // Marshal - Convert managed data to native data.
            __throwOnError_native = (int)(throwOnError ? 1 : 0);
            __hasDllImportSearchPathFlag_native = (int)(hasDllImportSearchPathFlag ? 1 : 0);
            // Pin - Pin data in preparation for calling the P/Invoke.
            fixed (void* __libraryName_native = &global::System.Runtime.InteropServices.Marshalling.Utf16StringMarshaller.GetPinnableReference(libraryName))
            {
                __retVal = __PInvoke((ushort*)__libraryName_native, callingAssembly, __hasDllImportSearchPathFlag_native, dllImportSearchPathFlag, __throwOnError_native);
            }
 
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "NativeLibrary_LoadByName", ExactSpelling = true)]
            static extern unsafe nint __PInvoke(ushort* __libraryName_native, global::System.Runtime.CompilerServices.QCallAssembly __callingAssembly_native, int __hasDllImportSearchPathFlag_native, uint __dllImportSearchPathFlag_native, int __throwOnError_native);
        }
    }
}
namespace System.Runtime.InteropServices
{
    public static unsafe partial class NativeLibrary
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "NativeLibrary_FreeLib", ExactSpelling = true)]
        internal static extern partial void FreeLib(nint handle);
    }
}
namespace System.Runtime.InteropServices
{
    public static unsafe partial class NativeLibrary
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        internal static partial nint GetSymbol(nint handle, string symbolName, bool throwOnError)
        {
            int __throwOnError_native;
            nint __retVal;
            // Marshal - Convert managed data to native data.
            __throwOnError_native = (int)(throwOnError ? 1 : 0);
            // Pin - Pin data in preparation for calling the P/Invoke.
            fixed (void* __symbolName_native = &global::System.Runtime.InteropServices.Marshalling.Utf16StringMarshaller.GetPinnableReference(symbolName))
            {
                __retVal = __PInvoke(handle, (ushort*)__symbolName_native, __throwOnError_native);
            }
 
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "NativeLibrary_GetSymbol", ExactSpelling = true)]
            static extern unsafe nint __PInvoke(nint __handle_native, ushort* __symbolName_native, int __throwOnError_native);
        }
    }
}
namespace System.Runtime.InteropServices.Java
{
    public static unsafe partial class JavaMarshal
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        private static partial bool InitializeInternal(nint callback)
        {
            bool __retVal;
            int __retVal_native;
            {
                __retVal_native = __PInvoke(callback);
            }
 
            // Unmarshal - Convert native data to managed data.
            __retVal = __retVal_native != 0;
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "JavaMarshal_Initialize", ExactSpelling = true)]
            static extern unsafe int __PInvoke(nint __callback_native);
        }
    }
}
namespace System.Runtime.InteropServices.Java
{
    public static unsafe partial class JavaMarshal
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "JavaMarshal_CreateReferenceTrackingHandle", ExactSpelling = true)]
        private static unsafe extern partial nint CreateReferenceTrackingHandleInternal(global::System.Runtime.CompilerServices.ObjectHandleOnStack obj, void* context);
    }
}
namespace System.Runtime.InteropServices.Java
{
    public static unsafe partial class JavaMarshal
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "JavaMarshal_FinishCrossReferenceProcessing", ExactSpelling = true)]
        private static unsafe extern partial void FinishCrossReferenceProcessing(global::System.Runtime.InteropServices.Java.MarkCrossReferencesArgs* crossReferences, nuint length, void* unreachableObjectHandles);
    }
}
namespace System.Runtime.InteropServices.Java
{
    public static unsafe partial class JavaMarshal
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        private static unsafe partial bool GetContextInternal(nint handle, out void* context)
        {
            context = default;
            bool __retVal;
            int __retVal_native;
            // Pin - Pin data in preparation for calling the P/Invoke.
            fixed (void** __context_native = &context)
            {
                __retVal_native = __PInvoke(handle, __context_native);
            }
 
            // Unmarshal - Convert native data to managed data.
            __retVal = __retVal_native != 0;
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "JavaMarshal_GetContext", ExactSpelling = true)]
            [global::System.Runtime.InteropServices.SuppressGCTransitionAttribute]
            static extern unsafe int __PInvoke(nint __handle_native, void** __context_native);
        }
    }
}
namespace System.Runtime.Intrinsics.X86
{
    public abstract unsafe partial class X86Base
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "X86BaseCpuId", ExactSpelling = true)]
        private static unsafe extern partial void __cpuidex(int* cpuInfo, int functionId, int subFunctionId);
    }
}
namespace System.Runtime.Loader
{
    public unsafe partial class AssemblyLoadContext
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        private static partial nint InitializeAssemblyLoadContext(nint ptrAssemblyLoadContext, bool fRepresentsTPALoadContext, bool isCollectible)
        {
            int __fRepresentsTPALoadContext_native;
            int __isCollectible_native;
            nint __retVal;
            // Marshal - Convert managed data to native data.
            __isCollectible_native = (int)(isCollectible ? 1 : 0);
            __fRepresentsTPALoadContext_native = (int)(fRepresentsTPALoadContext ? 1 : 0);
            {
                __retVal = __PInvoke(ptrAssemblyLoadContext, __fRepresentsTPALoadContext_native, __isCollectible_native);
            }
 
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "AssemblyNative_InitializeAssemblyLoadContext", ExactSpelling = true)]
            static extern unsafe nint __PInvoke(nint __ptrAssemblyLoadContext_native, int __fRepresentsTPALoadContext_native, int __isCollectible_native);
        }
    }
}
namespace System.Runtime.Loader
{
    public unsafe partial class AssemblyLoadContext
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "AssemblyNative_PrepareForAssemblyLoadContextRelease", ExactSpelling = true)]
        private static extern partial void PrepareForAssemblyLoadContextRelease(nint ptrNativeAssemblyBinder, nint ptrAssemblyLoadContextStrong);
    }
}
namespace System.Runtime.Loader
{
    public unsafe partial class AssemblyLoadContext
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "AssemblyNative_LoadFromStream", ExactSpelling = true)]
        private static extern partial void LoadFromStream(nint ptrNativeAssemblyBinder, nint ptrAssemblyArray, int iAssemblyArrayLen, nint ptrSymbols, int iSymbolArrayLen, global::System.Runtime.CompilerServices.ObjectHandleOnStack retAssembly);
    }
}
namespace System.Runtime.Loader
{
    public unsafe partial class AssemblyLoadContext
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        internal static partial void InternalSetProfileRoot(string directoryPath)
        {
            // Pin - Pin data in preparation for calling the P/Invoke.
            fixed (void* __directoryPath_native = &global::System.Runtime.InteropServices.Marshalling.Utf16StringMarshaller.GetPinnableReference(directoryPath))
            {
                __PInvoke((ushort*)__directoryPath_native);
            }
 
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "MultiCoreJIT_InternalSetProfileRoot", ExactSpelling = true)]
            static extern unsafe void __PInvoke(ushort* __directoryPath_native);
        }
    }
}
namespace System.Runtime.Loader
{
    public unsafe partial class AssemblyLoadContext
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        internal static partial void InternalStartProfile(string profile, nint ptrNativeAssemblyBinder)
        {
            // Pin - Pin data in preparation for calling the P/Invoke.
            fixed (void* __profile_native = &global::System.Runtime.InteropServices.Marshalling.Utf16StringMarshaller.GetPinnableReference(profile))
            {
                __PInvoke((ushort*)__profile_native, ptrNativeAssemblyBinder);
            }
 
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "MultiCoreJIT_InternalStartProfile", ExactSpelling = true)]
            static extern unsafe void __PInvoke(ushort* __profile_native, nint __ptrNativeAssemblyBinder_native);
        }
    }
}
namespace System.Runtime.Loader
{
    public unsafe partial class AssemblyLoadContext
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        private static partial void LoadFromPath(nint ptrNativeAssemblyBinder, string ilPath, string niPath, global::System.Runtime.CompilerServices.ObjectHandleOnStack retAssembly)
        {
            // Pin - Pin data in preparation for calling the P/Invoke.
            fixed (void* __niPath_native = &global::System.Runtime.InteropServices.Marshalling.Utf16StringMarshaller.GetPinnableReference(niPath))
            fixed (void* __ilPath_native = &global::System.Runtime.InteropServices.Marshalling.Utf16StringMarshaller.GetPinnableReference(ilPath))
            {
                __PInvoke(ptrNativeAssemblyBinder, (ushort*)__ilPath_native, (ushort*)__niPath_native, retAssembly);
            }
 
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "AssemblyNative_LoadFromPath", ExactSpelling = true)]
            static extern unsafe void __PInvoke(nint __ptrNativeAssemblyBinder_native, ushort* __ilPath_native, ushort* __niPath_native, global::System.Runtime.CompilerServices.ObjectHandleOnStack __retAssembly_native);
        }
    }
}
namespace System.Runtime.Loader
{
    public unsafe partial class AssemblyLoadContext
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "AssemblyNative_GetLoadedAssemblies", ExactSpelling = true)]
        private static extern partial void GetLoadedAssemblies(global::System.Runtime.CompilerServices.ObjectHandleOnStack retAssemblies);
    }
}
namespace System.Runtime.Loader
{
    public unsafe partial class AssemblyLoadContext
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        internal static partial bool TraceResolvingHandlerInvoked(string assemblyName, string handlerName, string alcName, string resultAssemblyName, string resultAssemblyPath)
        {
            bool __retVal;
            int __retVal_native;
            // Pin - Pin data in preparation for calling the P/Invoke.
            fixed (void* __resultAssemblyPath_native = &global::System.Runtime.InteropServices.Marshalling.Utf16StringMarshaller.GetPinnableReference(resultAssemblyPath))
            fixed (void* __resultAssemblyName_native = &global::System.Runtime.InteropServices.Marshalling.Utf16StringMarshaller.GetPinnableReference(resultAssemblyName))
            fixed (void* __alcName_native = &global::System.Runtime.InteropServices.Marshalling.Utf16StringMarshaller.GetPinnableReference(alcName))
            fixed (void* __handlerName_native = &global::System.Runtime.InteropServices.Marshalling.Utf16StringMarshaller.GetPinnableReference(handlerName))
            fixed (void* __assemblyName_native = &global::System.Runtime.InteropServices.Marshalling.Utf16StringMarshaller.GetPinnableReference(assemblyName))
            {
                __retVal_native = __PInvoke((ushort*)__assemblyName_native, (ushort*)__handlerName_native, (ushort*)__alcName_native, (ushort*)__resultAssemblyName_native, (ushort*)__resultAssemblyPath_native);
            }
 
            // Unmarshal - Convert native data to managed data.
            __retVal = __retVal_native != 0;
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "AssemblyNative_TraceResolvingHandlerInvoked", ExactSpelling = true)]
            static extern unsafe int __PInvoke(ushort* __assemblyName_native, ushort* __handlerName_native, ushort* __alcName_native, ushort* __resultAssemblyName_native, ushort* __resultAssemblyPath_native);
        }
    }
}
namespace System.Runtime.Loader
{
    public unsafe partial class AssemblyLoadContext
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        internal static partial bool TraceAssemblyResolveHandlerInvoked(string assemblyName, string handlerName, string resultAssemblyName, string resultAssemblyPath)
        {
            bool __retVal;
            int __retVal_native;
            // Pin - Pin data in preparation for calling the P/Invoke.
            fixed (void* __resultAssemblyPath_native = &global::System.Runtime.InteropServices.Marshalling.Utf16StringMarshaller.GetPinnableReference(resultAssemblyPath))
            fixed (void* __resultAssemblyName_native = &global::System.Runtime.InteropServices.Marshalling.Utf16StringMarshaller.GetPinnableReference(resultAssemblyName))
            fixed (void* __handlerName_native = &global::System.Runtime.InteropServices.Marshalling.Utf16StringMarshaller.GetPinnableReference(handlerName))
            fixed (void* __assemblyName_native = &global::System.Runtime.InteropServices.Marshalling.Utf16StringMarshaller.GetPinnableReference(assemblyName))
            {
                __retVal_native = __PInvoke((ushort*)__assemblyName_native, (ushort*)__handlerName_native, (ushort*)__resultAssemblyName_native, (ushort*)__resultAssemblyPath_native);
            }
 
            // Unmarshal - Convert native data to managed data.
            __retVal = __retVal_native != 0;
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "AssemblyNative_TraceAssemblyResolveHandlerInvoked", ExactSpelling = true)]
            static extern unsafe int __PInvoke(ushort* __assemblyName_native, ushort* __handlerName_native, ushort* __resultAssemblyName_native, ushort* __resultAssemblyPath_native);
        }
    }
}
namespace System.Runtime.Loader
{
    public unsafe partial class AssemblyLoadContext
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        internal static partial bool TraceAssemblyLoadFromResolveHandlerInvoked(string assemblyName, bool isTrackedAssembly, string requestingAssemblyPath, string requestedAssemblyPath)
        {
            int __isTrackedAssembly_native;
            bool __retVal;
            int __retVal_native;
            // Marshal - Convert managed data to native data.
            __isTrackedAssembly_native = (int)(isTrackedAssembly ? 1 : 0);
            // Pin - Pin data in preparation for calling the P/Invoke.
            fixed (void* __requestedAssemblyPath_native = &global::System.Runtime.InteropServices.Marshalling.Utf16StringMarshaller.GetPinnableReference(requestedAssemblyPath))
            fixed (void* __requestingAssemblyPath_native = &global::System.Runtime.InteropServices.Marshalling.Utf16StringMarshaller.GetPinnableReference(requestingAssemblyPath))
            fixed (void* __assemblyName_native = &global::System.Runtime.InteropServices.Marshalling.Utf16StringMarshaller.GetPinnableReference(assemblyName))
            {
                __retVal_native = __PInvoke((ushort*)__assemblyName_native, __isTrackedAssembly_native, (ushort*)__requestingAssemblyPath_native, (ushort*)__requestedAssemblyPath_native);
            }
 
            // Unmarshal - Convert native data to managed data.
            __retVal = __retVal_native != 0;
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "AssemblyNative_TraceAssemblyLoadFromResolveHandlerInvoked", ExactSpelling = true)]
            static extern unsafe int __PInvoke(ushort* __assemblyName_native, int __isTrackedAssembly_native, ushort* __requestingAssemblyPath_native, ushort* __requestedAssemblyPath_native);
        }
    }
}
namespace System.Runtime.Loader
{
    public unsafe partial class AssemblyLoadContext
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        internal static partial bool TraceSatelliteSubdirectoryPathProbed(string filePath, int hResult)
        {
            bool __retVal;
            int __retVal_native;
            // Pin - Pin data in preparation for calling the P/Invoke.
            fixed (void* __filePath_native = &global::System.Runtime.InteropServices.Marshalling.Utf16StringMarshaller.GetPinnableReference(filePath))
            {
                __retVal_native = __PInvoke((ushort*)__filePath_native, hResult);
            }
 
            // Unmarshal - Convert native data to managed data.
            __retVal = __retVal_native != 0;
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "AssemblyNative_TraceSatelliteSubdirectoryPathProbed", ExactSpelling = true)]
            static extern unsafe int __PInvoke(ushort* __filePath_native, int __hResult_native);
        }
    }
}
namespace System.Runtime.Loader
{
    public unsafe partial class AssemblyLoadContext
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "AssemblyNative_GetLoadContextForAssembly", ExactSpelling = true)]
        private static extern partial nint GetLoadContextForAssembly(global::System.Runtime.CompilerServices.QCallAssembly assembly);
    }
}
namespace System
{
    public unsafe partial struct RuntimeTypeHandle
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "RuntimeTypeHandle_GetRuntimeTypeFromHandleSlow", ExactSpelling = true)]
        private static extern partial void GetRuntimeTypeFromHandleSlow(nint handle, global::System.Runtime.CompilerServices.ObjectHandleOnStack typeObject);
    }
}
namespace System
{
    public unsafe partial struct RuntimeTypeHandle
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "RuntimeTypeHandle_CreateInstanceForAnotherGenericParameter", ExactSpelling = true)]
        private static extern partial void CreateInstanceForAnotherGenericParameter(global::System.Runtime.CompilerServices.QCallTypeHandle baseType, nint* pTypeHandles, int cTypeHandles, global::System.Runtime.CompilerServices.ObjectHandleOnStack instantiatedObject);
    }
}
namespace System
{
    public unsafe partial struct RuntimeTypeHandle
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "RuntimeTypeHandle_InternalAlloc", ExactSpelling = true)]
        private static unsafe extern partial void InternalAlloc(global::System.Runtime.CompilerServices.MethodTable* pMT, global::System.Runtime.CompilerServices.ObjectHandleOnStack result);
    }
}
namespace System
{
    public unsafe partial struct RuntimeTypeHandle
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "RuntimeTypeHandle_InternalAllocNoChecks", ExactSpelling = true)]
        private static unsafe extern partial void InternalAllocNoChecks(global::System.Runtime.CompilerServices.MethodTable* pMT, global::System.Runtime.CompilerServices.ObjectHandleOnStack result);
    }
}
namespace System
{
    public unsafe partial struct RuntimeTypeHandle
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "RuntimeTypeHandle_GetActivationInfo", ExactSpelling = true)]
        private static extern partial void GetActivationInfo(global::System.Runtime.CompilerServices.ObjectHandleOnStack pRuntimeType, delegate*<void*, object> * ppfnAllocator, void** pvAllocatorFirstArg, delegate*<object, void> * ppfnRefCtor, delegate*<ref byte, void> * ppfnValueCtor, global::Interop.BOOL* pfCtorIsPublic);
    }
}
namespace System
{
    public unsafe partial struct RuntimeTypeHandle
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "RuntimeTypeHandle_GetAssemblySlow", ExactSpelling = true)]
        private static extern partial void GetAssemblySlow(global::System.Runtime.CompilerServices.ObjectHandleOnStack type, global::System.Runtime.CompilerServices.ObjectHandleOnStack assembly);
    }
}
namespace System
{
    public unsafe partial struct RuntimeTypeHandle
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "RuntimeTypeHandle_GetModuleSlow", ExactSpelling = true)]
        private static extern partial void GetModuleSlow(global::System.Runtime.CompilerServices.ObjectHandleOnStack type, global::System.Runtime.CompilerServices.ObjectHandleOnStack module);
    }
}
namespace System
{
    public unsafe partial struct RuntimeTypeHandle
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "RuntimeTypeHandle_GetMethodAt", ExactSpelling = true)]
        private static unsafe extern partial nint GetMethodAt(global::System.Runtime.CompilerServices.MethodTable* pMT, int slot);
    }
}
namespace System
{
    public unsafe partial struct RuntimeTypeHandle
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "RuntimeTypeHandle_GetArgumentTypesFromFunctionPointer", ExactSpelling = true)]
        private static extern partial void GetArgumentTypesFromFunctionPointer(global::System.Runtime.CompilerServices.QCallTypeHandle type, global::System.Runtime.CompilerServices.ObjectHandleOnStack argTypes);
    }
}
namespace System
{
    public unsafe partial struct RuntimeTypeHandle
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        private static partial global::Interop.BOOL GetFields(global::System.Runtime.CompilerServices.MethodTable* pMT, global::System.Span<nint> data, ref int usedCount)
        {
            global::Interop.BOOL __retVal;
            // Pin - Pin data in preparation for calling the P/Invoke.
            fixed (int* __usedCount_native = &usedCount)
            fixed (void* __data_native = &global::System.Runtime.InteropServices.Marshalling.SpanMarshaller<nint, nint>.ManagedToUnmanagedIn.GetPinnableReference(data))
            {
                __retVal = __PInvoke(pMT, (nint*)__data_native, __usedCount_native);
            }
 
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "RuntimeTypeHandle_GetFields", ExactSpelling = true)]
            static extern unsafe global::Interop.BOOL __PInvoke(global::System.Runtime.CompilerServices.MethodTable* __pMT_native, nint* __data_native, int* __usedCount_native);
        }
    }
}
namespace System
{
    public unsafe partial struct RuntimeTypeHandle
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "RuntimeTypeHandle_GetInterfaces", ExactSpelling = true)]
        private static unsafe extern partial void GetInterfaces(global::System.Runtime.CompilerServices.MethodTable* pMT, global::System.Runtime.CompilerServices.ObjectHandleOnStack result);
    }
}
namespace System
{
    public unsafe partial struct RuntimeTypeHandle
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "RuntimeTypeHandle_GetConstraints", ExactSpelling = true)]
        private static extern partial void GetConstraints(global::System.Runtime.CompilerServices.QCallTypeHandle handle, global::System.Runtime.CompilerServices.ObjectHandleOnStack types);
    }
}
namespace System
{
    public unsafe partial struct RuntimeTypeHandle
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "QCall_GetGCHandleForTypeHandle", ExactSpelling = true)]
        private static extern partial nint GetGCHandle(global::System.Runtime.CompilerServices.QCallTypeHandle handle, global::System.Runtime.InteropServices.GCHandleType type);
    }
}
namespace System
{
    public unsafe partial struct RuntimeTypeHandle
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "QCall_FreeGCHandleForTypeHandle", ExactSpelling = true)]
        private static extern partial nint FreeGCHandle(global::System.Runtime.CompilerServices.QCallTypeHandle typeHandle, nint objHandle);
    }
}
namespace System
{
    public unsafe partial struct RuntimeTypeHandle
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "RuntimeTypeHandle_GetNumVirtualsAndStaticVirtuals", ExactSpelling = true)]
        private static extern partial int GetNumVirtualsAndStaticVirtuals(global::System.Runtime.CompilerServices.QCallTypeHandle type);
    }
}
namespace System
{
    public unsafe partial struct RuntimeTypeHandle
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "RuntimeTypeHandle_VerifyInterfaceIsImplemented", ExactSpelling = true)]
        private static extern partial void VerifyInterfaceIsImplemented(global::System.Runtime.CompilerServices.QCallTypeHandle handle, global::System.Runtime.CompilerServices.QCallTypeHandle interfaceHandle);
    }
}
namespace System
{
    public unsafe partial struct RuntimeTypeHandle
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "RuntimeTypeHandle_GetInterfaceMethodImplementation", ExactSpelling = true)]
        private static extern partial global::System.RuntimeMethodHandleInternal GetInterfaceMethodImplementation(global::System.Runtime.CompilerServices.QCallTypeHandle handle, global::System.Runtime.CompilerServices.QCallTypeHandle interfaceHandle, global::System.RuntimeMethodHandleInternal interfaceMethodHandle);
    }
}
namespace System
{
    public unsafe partial struct RuntimeTypeHandle
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        private static partial bool _IsVisible(global::System.Runtime.CompilerServices.QCallTypeHandle typeHandle)
        {
            bool __retVal;
            int __retVal_native;
            {
                __retVal_native = __PInvoke(typeHandle);
            }
 
            // Unmarshal - Convert native data to managed data.
            __retVal = __retVal_native != 0;
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "RuntimeTypeHandle_IsVisible", ExactSpelling = true)]
            static extern unsafe int __PInvoke(global::System.Runtime.CompilerServices.QCallTypeHandle __typeHandle_native);
        }
    }
}
namespace System
{
    public unsafe partial struct RuntimeTypeHandle
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "RuntimeTypeHandle_ConstructName", ExactSpelling = true)]
        private static extern partial void ConstructName(global::System.Runtime.CompilerServices.QCallTypeHandle handle, global::System.TypeNameFormatFlags formatFlags, global::System.Runtime.CompilerServices.StringHandleOnStack retString);
    }
}
namespace System
{
    public unsafe partial struct RuntimeTypeHandle
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "RuntimeTypeHandle_GetDeclaringTypeHandleForGenericVariable", ExactSpelling = true)]
        private static extern partial nint GetDeclaringTypeHandleForGenericVariable(nint typeHandle);
    }
}
namespace System
{
    public unsafe partial struct RuntimeTypeHandle
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "RuntimeTypeHandle_GetDeclaringTypeHandle", ExactSpelling = true)]
        private static extern partial nint GetDeclaringTypeHandle(nint typeHandle);
    }
}
namespace System
{
    public unsafe partial struct RuntimeTypeHandle
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "RuntimeTypeHandle_GetDeclaringMethodForGenericParameter", ExactSpelling = true)]
        private static extern partial void GetDeclaringMethodForGenericParameter(global::System.Runtime.CompilerServices.QCallTypeHandle typeHandle, global::System.Runtime.CompilerServices.ObjectHandleOnStack result);
    }
}
namespace System
{
    public unsafe partial struct RuntimeTypeHandle
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "RuntimeTypeHandle_GetInstantiation", ExactSpelling = true)]
        internal static extern partial void GetInstantiation(global::System.Runtime.CompilerServices.QCallTypeHandle type, global::System.Runtime.CompilerServices.ObjectHandleOnStack types, global::Interop.BOOL fAsRuntimeTypeArray);
    }
}
namespace System
{
    public unsafe partial struct RuntimeTypeHandle
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "RuntimeTypeHandle_Instantiate", ExactSpelling = true)]
        private static extern partial void Instantiate(global::System.Runtime.CompilerServices.QCallTypeHandle handle, nint* pInst, int numGenericArgs, global::System.Runtime.CompilerServices.ObjectHandleOnStack type);
    }
}
namespace System
{
    public unsafe partial struct RuntimeTypeHandle
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "RuntimeTypeHandle_MakeArray", ExactSpelling = true)]
        private static extern partial void MakeArray(global::System.Runtime.CompilerServices.QCallTypeHandle handle, int rank, global::System.Runtime.CompilerServices.ObjectHandleOnStack type);
    }
}
namespace System
{
    public unsafe partial struct RuntimeTypeHandle
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "RuntimeTypeHandle_MakeSZArray", ExactSpelling = true)]
        private static extern partial void MakeSZArray(global::System.Runtime.CompilerServices.QCallTypeHandle handle, global::System.Runtime.CompilerServices.ObjectHandleOnStack type);
    }
}
namespace System
{
    public unsafe partial struct RuntimeTypeHandle
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "RuntimeTypeHandle_MakeByRef", ExactSpelling = true)]
        private static extern partial void MakeByRef(global::System.Runtime.CompilerServices.QCallTypeHandle handle, global::System.Runtime.CompilerServices.ObjectHandleOnStack type);
    }
}
namespace System
{
    public unsafe partial struct RuntimeTypeHandle
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "RuntimeTypeHandle_MakePointer", ExactSpelling = true)]
        private static extern partial void MakePointer(global::System.Runtime.CompilerServices.QCallTypeHandle handle, global::System.Runtime.CompilerServices.ObjectHandleOnStack type);
    }
}
namespace System
{
    public unsafe partial struct RuntimeTypeHandle
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "RuntimeTypeHandle_IsCollectible", ExactSpelling = true)]
        internal static extern partial global::Interop.BOOL IsCollectible(global::System.Runtime.CompilerServices.QCallTypeHandle handle);
    }
}
namespace System
{
    public unsafe partial struct RuntimeTypeHandle
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "RuntimeTypeHandle_GetGenericTypeDefinition", ExactSpelling = true)]
        internal static extern partial void GetGenericTypeDefinition(global::System.Runtime.CompilerServices.QCallTypeHandle type, global::System.Runtime.CompilerServices.ObjectHandleOnStack retType);
    }
}
namespace System
{
    public unsafe partial struct RuntimeTypeHandle
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "RuntimeTypeHandle_SatisfiesConstraints", ExactSpelling = true)]
        private static extern partial global::Interop.BOOL SatisfiesConstraints(global::System.Runtime.CompilerServices.QCallTypeHandle paramType, global::System.Runtime.CompilerServices.QCallTypeHandle pTypeContext, global::System.RuntimeMethodHandleInternal pMethodContext, global::System.Runtime.CompilerServices.QCallTypeHandle toType);
    }
}
namespace System
{
    public unsafe partial struct RuntimeTypeHandle
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "RuntimeTypeHandle_RegisterCollectibleTypeDependency", ExactSpelling = true)]
        private static extern partial void RegisterCollectibleTypeDependency(global::System.Runtime.CompilerServices.QCallTypeHandle type, global::System.Runtime.CompilerServices.QCallAssembly assembly);
    }
}
namespace System
{
    public unsafe partial struct RuntimeMethodHandle
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "RuntimeMethodHandle_GetFunctionPointer", ExactSpelling = true)]
        internal static extern partial nint GetFunctionPointer(global::System.RuntimeMethodHandleInternal handle);
    }
}
namespace System
{
    public unsafe partial struct RuntimeMethodHandle
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "RuntimeMethodHandle_GetIsCollectible", ExactSpelling = true)]
        internal static extern partial global::Interop.BOOL GetIsCollectible(global::System.RuntimeMethodHandleInternal handle);
    }
}
namespace System
{
    public unsafe partial struct RuntimeMethodHandle
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "RuntimeMethodHandle_IsCAVisibleFromDecoratedType", ExactSpelling = true)]
        internal static extern partial global::Interop.BOOL IsCAVisibleFromDecoratedType(global::System.Runtime.CompilerServices.QCallTypeHandle attrTypeHandle, global::System.RuntimeMethodHandleInternal attrCtor, global::System.Runtime.CompilerServices.QCallTypeHandle sourceTypeHandle, global::System.Runtime.CompilerServices.QCallModule sourceModule);
    }
}
namespace System
{
    public unsafe partial struct RuntimeMethodHandle
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "RuntimeMethodHandle_ConstructInstantiation", ExactSpelling = true)]
        private static extern partial void ConstructInstantiation(global::System.RuntimeMethodHandleInternal method, global::System.TypeNameFormatFlags format, global::System.Runtime.CompilerServices.StringHandleOnStack retString);
    }
}
namespace System
{
    public unsafe partial struct RuntimeMethodHandle
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "RuntimeMethodHandle_InvokeMethod", ExactSpelling = true)]
        private static extern partial void InvokeMethod(global::System.Runtime.CompilerServices.ObjectHandleOnStack target, void** arguments, global::System.Runtime.CompilerServices.ObjectHandleOnStack sig, global::Interop.BOOL isConstructor, global::System.Runtime.CompilerServices.ObjectHandleOnStack result);
    }
}
namespace System
{
    public unsafe partial struct RuntimeMethodHandle
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "RuntimeMethodHandle_GetMethodInstantiation", ExactSpelling = true)]
        private static extern partial void GetMethodInstantiation(global::System.RuntimeMethodHandleInternal method, global::System.Runtime.CompilerServices.ObjectHandleOnStack types, global::Interop.BOOL fAsRuntimeTypeArray);
    }
}
namespace System
{
    public unsafe partial struct RuntimeMethodHandle
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "RuntimeMethodHandle_GetStubIfNeededSlow", ExactSpelling = true)]
        private static extern partial global::System.RuntimeMethodHandleInternal GetStubIfNeededSlow(global::System.RuntimeMethodHandleInternal method, global::System.Runtime.CompilerServices.QCallTypeHandle declaringTypeHandle, global::System.Runtime.CompilerServices.ObjectHandleOnStack methodInstantiation);
    }
}
namespace System
{
    public unsafe partial struct RuntimeMethodHandle
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "RuntimeMethodHandle_GetTypicalMethodDefinition", ExactSpelling = true)]
        private static extern partial void GetTypicalMethodDefinition(global::System.RuntimeMethodHandleInternal method, global::System.Runtime.CompilerServices.ObjectHandleOnStack outMethod);
    }
}
namespace System
{
    public unsafe partial struct RuntimeMethodHandle
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "RuntimeMethodHandle_StripMethodInstantiation", ExactSpelling = true)]
        private static extern partial void StripMethodInstantiation(global::System.RuntimeMethodHandleInternal method, global::System.Runtime.CompilerServices.ObjectHandleOnStack outMethod);
    }
}
namespace System
{
    public unsafe partial struct RuntimeMethodHandle
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "RuntimeMethodHandle_Destroy", ExactSpelling = true)]
        internal static extern partial void Destroy(global::System.RuntimeMethodHandleInternal method);
    }
}
namespace System
{
    public unsafe partial struct RuntimeMethodHandle
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "RuntimeMethodHandle_GetMethodBody", ExactSpelling = true)]
        private static extern partial void GetMethodBody(global::System.RuntimeMethodHandleInternal method, global::System.Runtime.CompilerServices.QCallTypeHandle declaringType, global::System.Runtime.CompilerServices.ObjectHandleOnStack result);
    }
}
namespace System
{
    public unsafe partial struct RuntimeFieldHandle
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        internal static partial bool GetRVAFieldInfo(global::System.RuntimeFieldHandleInternal field, out void* address, out uint size)
        {
            address = default;
            size = default;
            bool __retVal;
            int __retVal_native;
            // Pin - Pin data in preparation for calling the P/Invoke.
            fixed (uint* __size_native = &size)
            fixed (void** __address_native = &address)
            {
                __retVal_native = __PInvoke(field, __address_native, __size_native);
            }
 
            // Unmarshal - Convert native data to managed data.
            __retVal = __retVal_native != 0;
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "RuntimeFieldHandle_GetRVAFieldInfo", ExactSpelling = true)]
            static extern unsafe int __PInvoke(global::System.RuntimeFieldHandleInternal __field_native, void** __address_native, uint* __size_native);
        }
    }
}
namespace System
{
    public unsafe partial struct RuntimeFieldHandle
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "RuntimeFieldHandle_GetFieldDataReference", ExactSpelling = true)]
        private static unsafe extern partial void GetFieldDataReference(nint fieldDesc, global::System.Runtime.CompilerServices.ObjectHandleOnStack target, global::System.Runtime.CompilerServices.ByteRefOnStack fieldDataRef);
    }
}
namespace System
{
    public unsafe partial struct RuntimeFieldHandle
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        private static partial void GetValue(nint fieldDesc, global::System.Runtime.CompilerServices.ObjectHandleOnStack instance, global::System.Runtime.CompilerServices.QCallTypeHandle fieldType, global::System.Runtime.CompilerServices.QCallTypeHandle declaringType, ref bool isClassInitialized, global::System.Runtime.CompilerServices.ObjectHandleOnStack result)
        {
            int __isClassInitialized_native;
            // Marshal - Convert managed data to native data.
            __isClassInitialized_native = (int)(isClassInitialized ? 1 : 0);
            {
                __PInvoke(fieldDesc, instance, fieldType, declaringType, &__isClassInitialized_native, result);
            }
 
            // Unmarshal - Convert native data to managed data.
            isClassInitialized = __isClassInitialized_native != 0;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "RuntimeFieldHandle_GetValue", ExactSpelling = true)]
            static extern unsafe void __PInvoke(nint __fieldDesc_native, global::System.Runtime.CompilerServices.ObjectHandleOnStack __instance_native, global::System.Runtime.CompilerServices.QCallTypeHandle __fieldType_native, global::System.Runtime.CompilerServices.QCallTypeHandle __declaringType_native, int* __isClassInitialized_native, global::System.Runtime.CompilerServices.ObjectHandleOnStack __result_native);
        }
    }
}
namespace System
{
    public unsafe partial struct RuntimeFieldHandle
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "RuntimeFieldHandle_GetValueDirect", ExactSpelling = true)]
        private static extern partial void GetValueDirect(nint fieldDesc, void* pTypedRef, global::System.Runtime.CompilerServices.QCallTypeHandle fieldType, global::System.Runtime.CompilerServices.QCallTypeHandle declaringType, global::System.Runtime.CompilerServices.ObjectHandleOnStack result);
    }
}
namespace System
{
    public unsafe partial struct RuntimeFieldHandle
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        private static partial void SetValue(nint fieldDesc, global::System.Runtime.CompilerServices.ObjectHandleOnStack instance, global::System.Runtime.CompilerServices.ObjectHandleOnStack value, global::System.Runtime.CompilerServices.QCallTypeHandle fieldType, global::System.Runtime.CompilerServices.QCallTypeHandle declaringType, ref bool isClassInitialized)
        {
            int __isClassInitialized_native;
            // Marshal - Convert managed data to native data.
            __isClassInitialized_native = (int)(isClassInitialized ? 1 : 0);
            {
                __PInvoke(fieldDesc, instance, value, fieldType, declaringType, &__isClassInitialized_native);
            }
 
            // Unmarshal - Convert native data to managed data.
            isClassInitialized = __isClassInitialized_native != 0;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "RuntimeFieldHandle_SetValue", ExactSpelling = true)]
            static extern unsafe void __PInvoke(nint __fieldDesc_native, global::System.Runtime.CompilerServices.ObjectHandleOnStack __instance_native, global::System.Runtime.CompilerServices.ObjectHandleOnStack __value_native, global::System.Runtime.CompilerServices.QCallTypeHandle __fieldType_native, global::System.Runtime.CompilerServices.QCallTypeHandle __declaringType_native, int* __isClassInitialized_native);
        }
    }
}
namespace System
{
    public unsafe partial struct RuntimeFieldHandle
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "RuntimeFieldHandle_SetValueDirect", ExactSpelling = true)]
        private static extern partial void SetValueDirect(nint fieldDesc, void* pTypedRef, global::System.Runtime.CompilerServices.ObjectHandleOnStack value, global::System.Runtime.CompilerServices.QCallTypeHandle fieldType, global::System.Runtime.CompilerServices.QCallTypeHandle declaringType);
    }
}
namespace System
{
    public unsafe partial struct RuntimeFieldHandle
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "RuntimeFieldHandle_GetEnCFieldAddr", ExactSpelling = true)]
        private static extern partial void* GetEnCFieldAddr(global::System.Runtime.CompilerServices.ObjectHandleOnStack tgt, void* pFD);
    }
}
namespace System
{
    public unsafe partial struct ModuleHandle
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        private static partial void GetDynamicMethod(global::System.Runtime.CompilerServices.QCallModule module, string name, byte[] sig, int sigLen, global::System.Runtime.CompilerServices.ObjectHandleOnStack resolver, global::System.Runtime.CompilerServices.ObjectHandleOnStack result)
        {
            byte* __name_native = default;
            // Setup - Perform required setup.
            scoped global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.ManagedToUnmanagedIn __name_native__marshaller = new();
            try
            {
                // Marshal - Convert managed data to native data.
                __name_native__marshaller.FromManaged(name, stackalloc byte[global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.ManagedToUnmanagedIn.BufferSize]);
                // Pin - Pin data in preparation for calling the P/Invoke.
                fixed (void* __sig_native = &global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<byte, byte>.ManagedToUnmanagedIn.GetPinnableReference(sig))
                {
                    // PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
                    __name_native = __name_native__marshaller.ToUnmanaged();
                    __PInvoke(module, __name_native, (byte*)__sig_native, sigLen, resolver, result);
                }
            }
            finally
            {
                // CleanupCallerAllocated - Perform cleanup of caller allocated resources.
                __name_native__marshaller.Free();
            }
 
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "ModuleHandle_GetDynamicMethod", ExactSpelling = true)]
            static extern unsafe void __PInvoke(global::System.Runtime.CompilerServices.QCallModule __module_native, byte* __name_native, byte* __sig_native, int __sigLen_native, global::System.Runtime.CompilerServices.ObjectHandleOnStack __resolver_native, global::System.Runtime.CompilerServices.ObjectHandleOnStack __result_native);
        }
    }
}
namespace System
{
    public unsafe partial struct ModuleHandle
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "ModuleHandle_GetToken", ExactSpelling = true)]
        private static extern partial int GetToken(global::System.Runtime.CompilerServices.QCallModule module);
    }
}
namespace System
{
    public unsafe partial struct ModuleHandle
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "ModuleHandle_ResolveType", ExactSpelling = true)]
        private static extern partial void ResolveType(global::System.Runtime.CompilerServices.QCallModule module, int typeToken, nint* typeInstArgs, int typeInstCount, nint* methodInstArgs, int methodInstCount, global::System.Runtime.CompilerServices.ObjectHandleOnStack type);
    }
}
namespace System
{
    public unsafe partial struct ModuleHandle
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "ModuleHandle_ResolveMethod", ExactSpelling = true)]
        private static extern partial global::System.RuntimeMethodHandleInternal ResolveMethod(global::System.Runtime.CompilerServices.QCallModule module, int methodToken, nint* typeInstArgs, int typeInstCount, nint* methodInstArgs, int methodInstCount);
    }
}
namespace System
{
    public unsafe partial struct ModuleHandle
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "ModuleHandle_ResolveField", ExactSpelling = true)]
        private static extern partial void ResolveField(global::System.Runtime.CompilerServices.QCallModule module, int fieldToken, nint* typeInstArgs, int typeInstCount, nint* methodInstArgs, int methodInstCount, global::System.Runtime.CompilerServices.ObjectHandleOnStack retField);
    }
}
namespace System
{
    public unsafe partial struct ModuleHandle
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "ModuleHandle_GetModuleType", ExactSpelling = true)]
        internal static extern partial void GetModuleType(global::System.Runtime.CompilerServices.QCallModule handle, global::System.Runtime.CompilerServices.ObjectHandleOnStack type);
    }
}
namespace System
{
    public unsafe partial struct ModuleHandle
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "ModuleHandle_GetPEKind", ExactSpelling = true)]
        private static extern partial void GetPEKind(global::System.Runtime.CompilerServices.QCallModule handle, int* peKind, int* machine);
    }
}
namespace System
{
    public unsafe partial struct ModuleHandle
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "ModuleHandle_GetMDStreamVersion", ExactSpelling = true)]
        private static extern partial int GetMDStreamVersion(global::System.Runtime.CompilerServices.QCallModule module);
    }
}
namespace System
{
    internal sealed unsafe partial class Signature
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "Signature_Init", ExactSpelling = true)]
        private static extern partial void Init(global::System.Runtime.CompilerServices.ObjectHandleOnStack _this, void* pCorSig, int cCorSig, global::System.RuntimeFieldHandleInternal fieldHandle, global::System.RuntimeMethodHandleInternal methodHandle);
    }
}
namespace System
{
    internal sealed unsafe partial class Signature
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "Signature_AreEqual", ExactSpelling = true)]
        private static extern partial global::Interop.BOOL AreEqual(void* sig1, int csig1, global::System.Runtime.CompilerServices.QCallTypeHandle type1, void* sig2, int csig2, global::System.Runtime.CompilerServices.QCallTypeHandle type2);
    }
}
namespace System
{
    internal sealed unsafe partial class Signature
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "Signature_GetCustomModifiersAtOffset", ExactSpelling = true)]
        private static extern partial void GetCustomModifiersAtOffset(global::System.Runtime.CompilerServices.ObjectHandleOnStack sigObj, int offset, global::Interop.BOOL required, global::System.Runtime.CompilerServices.ObjectHandleOnStack result);
    }
}
namespace System
{
    internal sealed unsafe partial class RuntimeType
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "ReflectionInvocation_GetGuid", ExactSpelling = true)]
        private static unsafe extern partial void GetGuid(global::System.Runtime.CompilerServices.MethodTable* pMT, global::System.Guid* result);
    }
}
namespace System
{
    internal readonly unsafe partial struct MdUtf8String
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        private static partial bool EqualsCaseInsensitive(void* szLhs, void* szRhs, int cSz)
        {
            bool __retVal;
            int __retVal_native;
            {
                __retVal_native = __PInvoke(szLhs, szRhs, cSz);
            }
 
            // Unmarshal - Convert native data to managed data.
            __retVal = __retVal_native != 0;
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "MdUtf8String_EqualsCaseInsensitive", ExactSpelling = true)]
            static extern unsafe int __PInvoke(void* __szLhs_native, void* __szRhs_native, int __cSz_native);
        }
    }
}
namespace System
{
    public unsafe partial class String
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "String_StrCns", ExactSpelling = true)]
        private static unsafe extern partial string* StrCnsInternal(uint rid, nint scopeHandle);
    }
}
namespace System
{
    public unsafe partial class String
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "String_Intern", ExactSpelling = true)]
        private static extern partial void Intern(global::System.Runtime.CompilerServices.StringHandleOnStack src);
    }
}
namespace System
{
    public unsafe partial class String
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "String_IsInterned", ExactSpelling = true)]
        private static extern partial void IsInterned(global::System.Runtime.CompilerServices.StringHandleOnStack src);
    }
}
namespace System.StubHelpers
{
    internal static unsafe partial class MngdNativeArrayMarshaler
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "MngdNativeArrayMarshaler_ConvertSpaceToNative", ExactSpelling = true)]
        private static extern partial void ConvertSpaceToNative(nint pMarshalState, global::System.Runtime.CompilerServices.ObjectHandleOnStack pManagedHome, nint pNativeHome);
    }
}
namespace System.StubHelpers
{
    internal static unsafe partial class MngdNativeArrayMarshaler
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "MngdNativeArrayMarshaler_ConvertContentsToNative", ExactSpelling = true)]
        private static extern partial void ConvertContentsToNative(nint pMarshalState, global::System.Runtime.CompilerServices.ObjectHandleOnStack pManagedHome, nint pNativeHome);
    }
}
namespace System.StubHelpers
{
    internal static unsafe partial class MngdNativeArrayMarshaler
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "MngdNativeArrayMarshaler_ConvertSpaceToManaged", ExactSpelling = true)]
        private static extern partial void ConvertSpaceToManaged(nint pMarshalState, global::System.Runtime.CompilerServices.ObjectHandleOnStack pManagedHome, nint pNativeHome, int cElements);
    }
}
namespace System.StubHelpers
{
    internal static unsafe partial class MngdNativeArrayMarshaler
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "MngdNativeArrayMarshaler_ConvertContentsToManaged", ExactSpelling = true)]
        private static extern partial void ConvertContentsToManaged(nint pMarshalState, global::System.Runtime.CompilerServices.ObjectHandleOnStack pManagedHome, nint pNativeHome);
    }
}
namespace System.StubHelpers
{
    internal static unsafe partial class MngdNativeArrayMarshaler
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "MngdNativeArrayMarshaler_ClearNativeContents", ExactSpelling = true)]
        internal static extern partial void ClearNativeContents(nint pMarshalState, nint pNativeHome, int cElements);
    }
}
namespace System.StubHelpers
{
    internal static unsafe partial class MngdFixedArrayMarshaler
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "MngdFixedArrayMarshaler_ConvertContentsToNative", ExactSpelling = true)]
        private static extern partial void ConvertContentsToNative(nint pMarshalState, global::System.Runtime.CompilerServices.ObjectHandleOnStack pManagedHome, nint pNativeHome);
    }
}
namespace System.StubHelpers
{
    internal static unsafe partial class MngdFixedArrayMarshaler
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "MngdFixedArrayMarshaler_ConvertSpaceToManaged", ExactSpelling = true)]
        private static extern partial void ConvertSpaceToManaged(nint pMarshalState, global::System.Runtime.CompilerServices.ObjectHandleOnStack pManagedHome, nint pNativeHome);
    }
}
namespace System.StubHelpers
{
    internal static unsafe partial class MngdFixedArrayMarshaler
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "MngdFixedArrayMarshaler_ConvertContentsToManaged", ExactSpelling = true)]
        private static extern partial void ConvertContentsToManaged(nint pMarshalState, global::System.Runtime.CompilerServices.ObjectHandleOnStack pManagedHome, nint pNativeHome);
    }
}
namespace System.StubHelpers
{
    internal static unsafe partial class MngdFixedArrayMarshaler
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "MngdFixedArrayMarshaler_ClearNativeContents", ExactSpelling = true)]
        private static extern partial void ClearNativeContents(nint pMarshalState, nint pNativeHome);
    }
}
namespace System.StubHelpers
{
    internal static unsafe partial class StubHelpers
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "StubHelpers_ThrowInteropParamException", ExactSpelling = true)]
        internal static extern partial void ThrowInteropParamException(int resID, int paramIdx);
    }
}
namespace System.StubHelpers
{
    internal static unsafe partial class StubHelpers
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "StubHelpers_CreateCustomMarshaler", ExactSpelling = true)]
        internal static extern partial void CreateCustomMarshaler(nint pMD, int paramToken, nint hndManagedType, global::System.Runtime.CompilerServices.ObjectHandleOnStack customMarshaler);
    }
}
namespace System.StubHelpers
{
    internal static unsafe partial class StubHelpers
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "StubHelpers_ProfilerBeginTransitionCallback", ExactSpelling = true)]
        internal static unsafe extern partial void* ProfilerBeginTransitionCallback(void* pTargetMD);
    }
}
namespace System.StubHelpers
{
    internal static unsafe partial class StubHelpers
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "StubHelpers_ProfilerEndTransitionCallback", ExactSpelling = true)]
        internal static unsafe extern partial void ProfilerEndTransitionCallback(void* pTargetMD);
    }
}
namespace System.StubHelpers
{
    internal static unsafe partial class StubHelpers
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "StubHelpers_SetStringTrailByte", ExactSpelling = true)]
        private static extern partial void SetStringTrailByte(global::System.Runtime.CompilerServices.StringHandleOnStack str, byte data);
    }
}
namespace System.StubHelpers
{
    internal static unsafe partial class StubHelpers
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "StubHelpers_MarshalToManagedVaList", ExactSpelling = true)]
        internal static extern partial void MarshalToManagedVaList(nint va_list, nint pArgIterator);
    }
}
namespace System.StubHelpers
{
    internal static unsafe partial class StubHelpers
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "StubHelpers_MarshalToUnmanagedVaList", ExactSpelling = true)]
        internal static extern partial void MarshalToUnmanagedVaList(nint va_list, uint vaListSize, nint pArgIterator);
    }
}
namespace System.StubHelpers
{
    internal static unsafe partial class StubHelpers
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "StubHelpers_ValidateObject", ExactSpelling = true)]
        private static extern partial void ValidateObject(global::System.Runtime.CompilerServices.ObjectHandleOnStack obj, nint pMD);
    }
}
namespace System.StubHelpers
{
    internal static unsafe partial class StubHelpers
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "StubHelpers_ValidateByref", ExactSpelling = true)]
        internal static extern partial void ValidateByref(nint byref, nint pMD);
    }
}
namespace System.StubHelpers
{
    internal static unsafe partial class StubHelpers
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "StubHelpers_MulticastDebuggerTraceHelper", ExactSpelling = true)]
        private static extern partial void MulticastDebuggerTraceHelperQCall(global::System.Runtime.CompilerServices.ObjectHandleOnStack obj, int count);
    }
}
namespace System.Threading
{
    public static unsafe partial class Interlocked
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "Interlocked_MemoryBarrierProcessWide", ExactSpelling = true)]
        private static extern partial void _MemoryBarrierProcessWide();
    }
}
namespace System.Threading
{
    public static unsafe partial class Monitor
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "Monitor_Enter_Slowpath", ExactSpelling = true)]
        private static extern partial void Enter_Slowpath(global::System.Runtime.CompilerServices.ObjectHandleOnStack obj);
    }
}
namespace System.Threading
{
    public static unsafe partial class Monitor
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "Monitor_TryEnter_Slowpath", ExactSpelling = true)]
        private static extern partial int TryEnter_Slowpath(global::System.Runtime.CompilerServices.ObjectHandleOnStack obj, int timeout);
    }
}
namespace System.Threading
{
    public static unsafe partial class Monitor
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "Monitor_Exit_Slowpath", ExactSpelling = true)]
        private static extern partial void Exit_Slowpath(global::System.Runtime.CompilerServices.ObjectHandleOnStack obj, global::System.Threading.Monitor.LeaveHelperAction exitBehavior);
    }
}
namespace System.Threading
{
    public static unsafe partial class Monitor
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        private static partial bool Wait(global::System.Runtime.CompilerServices.ObjectHandleOnStack obj, int millisecondsTimeout)
        {
            bool __retVal;
            int __retVal_native;
            {
                __retVal_native = __PInvoke(obj, millisecondsTimeout);
            }
 
            // Unmarshal - Convert native data to managed data.
            __retVal = __retVal_native != 0;
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "Monitor_Wait", ExactSpelling = true)]
            static extern unsafe int __PInvoke(global::System.Runtime.CompilerServices.ObjectHandleOnStack __obj_native, int __millisecondsTimeout_native);
        }
    }
}
namespace System.Threading
{
    public static unsafe partial class Monitor
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "Monitor_Pulse", ExactSpelling = true)]
        private static extern partial void Pulse(global::System.Runtime.CompilerServices.ObjectHandleOnStack obj);
    }
}
namespace System.Threading
{
    public static unsafe partial class Monitor
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "Monitor_PulseAll", ExactSpelling = true)]
        private static extern partial void PulseAll(global::System.Runtime.CompilerServices.ObjectHandleOnStack obj);
    }
}
namespace System.Threading
{
    public static unsafe partial class Monitor
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "Monitor_GetLockContentionCount", ExactSpelling = true)]
        private static extern partial long GetLockContentionCount();
    }
}
namespace System.Threading
{
    public sealed unsafe partial class Thread
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "ThreadNative_Start", ExactSpelling = true)]
        private static unsafe extern partial void StartInternal(global::System.Threading.ThreadHandle t, int stackSize, int priority, global::Interop.BOOL isThreadPool, char* pThreadName);
    }
}
namespace System.Threading
{
    public sealed unsafe partial class Thread
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "ThreadNative_Sleep", ExactSpelling = true)]
        private static extern partial void SleepInternal(int millisecondsTimeout);
    }
}
namespace System.Threading
{
    public sealed unsafe partial class Thread
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "ThreadNative_SpinWait", ExactSpelling = true)]
        private static extern partial void SpinWaitInternal(int iterations);
    }
}
namespace System.Threading
{
    public sealed unsafe partial class Thread
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "ThreadNative_SpinWait", ExactSpelling = true)]
        private static extern partial void LongSpinWaitInternal(int iterations);
    }
}
namespace System.Threading
{
    public sealed unsafe partial class Thread
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "ThreadNative_YieldThread", ExactSpelling = true)]
        private static extern partial global::Interop.BOOL YieldInternal();
    }
}
namespace System.Threading
{
    public sealed unsafe partial class Thread
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "ThreadNative_GetCurrentThread", ExactSpelling = true)]
        private static extern partial void GetCurrentThread(global::System.Runtime.CompilerServices.ObjectHandleOnStack thread);
    }
}
namespace System.Threading
{
    public sealed unsafe partial class Thread
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "ThreadNative_Initialize", ExactSpelling = true)]
        private static extern partial void Initialize(global::System.Runtime.CompilerServices.ObjectHandleOnStack thread);
    }
}
namespace System.Threading
{
    public sealed unsafe partial class Thread
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        private static partial void InformThreadNameChange(global::System.Threading.ThreadHandle t, string name, int len)
        {
            // Pin - Pin data in preparation for calling the P/Invoke.
            fixed (void* __name_native = &global::System.Runtime.InteropServices.Marshalling.Utf16StringMarshaller.GetPinnableReference(name))
            {
                __PInvoke(t, (ushort*)__name_native, len);
            }
 
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "ThreadNative_InformThreadNameChange", ExactSpelling = true)]
            static extern unsafe void __PInvoke(global::System.Threading.ThreadHandle __t_native, ushort* __name_native, int __len_native);
        }
    }
}
namespace System.Threading
{
    public sealed unsafe partial class Thread
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "ThreadNative_GetIsBackground", ExactSpelling = true)]
        private static extern partial global::Interop.BOOL GetIsBackground(global::System.Threading.ThreadHandle t);
    }
}
namespace System.Threading
{
    public sealed unsafe partial class Thread
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "ThreadNative_SetIsBackground", ExactSpelling = true)]
        private static extern partial void SetIsBackground(global::System.Threading.ThreadHandle t, global::Interop.BOOL value);
    }
}
namespace System.Threading
{
    public sealed unsafe partial class Thread
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "ThreadNative_SetPriority", ExactSpelling = true)]
        private static extern partial void SetPriority(global::System.Runtime.CompilerServices.ObjectHandleOnStack thread, int priority);
    }
}
namespace System.Threading
{
    public sealed unsafe partial class Thread
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "ThreadNative_GetCurrentOSThreadId", ExactSpelling = true)]
        private static extern partial ulong GetCurrentOSThreadId();
    }
}
namespace System.Threading
{
    public sealed unsafe partial class Thread
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "ThreadNative_GetThreadState", ExactSpelling = true)]
        private static extern partial int GetThreadState(global::System.Threading.ThreadHandle t);
    }
}
namespace System.Threading
{
    public sealed unsafe partial class Thread
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "ThreadNative_Interrupt", ExactSpelling = true)]
        private static extern partial void Interrupt(global::System.Threading.ThreadHandle t);
    }
}
namespace System.Threading
{
    public sealed unsafe partial class Thread
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        private static partial bool Join(global::System.Runtime.CompilerServices.ObjectHandleOnStack thread, int millisecondsTimeout)
        {
            bool __retVal;
            int __retVal_native;
            {
                __retVal_native = __PInvoke(thread, millisecondsTimeout);
            }
 
            // Unmarshal - Convert native data to managed data.
            __retVal = __retVal_native != 0;
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "ThreadNative_Join", ExactSpelling = true)]
            static extern unsafe int __PInvoke(global::System.Runtime.CompilerServices.ObjectHandleOnStack __thread_native, int __millisecondsTimeout_native);
        }
    }
}
namespace System.Threading
{
    public sealed unsafe partial class Thread
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "ThreadNative_PollGC", ExactSpelling = true)]
        private static extern partial void PollGCInternal();
    }
}
namespace System.Threading
{
    public abstract unsafe partial class WaitHandle
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        private static partial int WaitOneCore(nint waitHandle, int millisecondsTimeout, bool useTrivialWaits)
        {
            int __useTrivialWaits_native;
            int __retVal;
            // Marshal - Convert managed data to native data.
            __useTrivialWaits_native = (int)(useTrivialWaits ? 1 : 0);
            {
                __retVal = __PInvoke(waitHandle, millisecondsTimeout, __useTrivialWaits_native);
            }
 
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "WaitHandle_WaitOneCore", ExactSpelling = true)]
            static extern unsafe int __PInvoke(nint __waitHandle_native, int __millisecondsTimeout_native, int __useTrivialWaits_native);
        }
    }
}
namespace System.Threading
{
    public abstract unsafe partial class WaitHandle
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        private static partial int WaitMultipleIgnoringSyncContext(global::System.ReadOnlySpan<nint> waitHandles, int numHandles, bool waitAll, int millisecondsTimeout)
        {
            int __waitAll_native;
            int __retVal;
            // Marshal - Convert managed data to native data.
            __waitAll_native = (int)(waitAll ? 1 : 0);
            // Pin - Pin data in preparation for calling the P/Invoke.
            fixed (void* __waitHandles_native = &global::System.Runtime.InteropServices.Marshalling.ReadOnlySpanMarshaller<nint, nint>.ManagedToUnmanagedIn.GetPinnableReference(waitHandles))
            {
                __retVal = __PInvoke((nint*)__waitHandles_native, numHandles, __waitAll_native, millisecondsTimeout);
            }
 
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "WaitHandle_WaitMultipleIgnoringSyncContext", ExactSpelling = true)]
            static extern unsafe int __PInvoke(nint* __waitHandles_native, int __numHandles_native, int __waitAll_native, int __millisecondsTimeout_native);
        }
    }
}
namespace System.Threading
{
    public abstract unsafe partial class WaitHandle
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "WaitHandle_SignalAndWait", ExactSpelling = true)]
        private static extern partial int SignalAndWait(nint waitHandleToSignal, nint waitHandleToWaitOn, int millisecondsTimeout);
    }
}
namespace System
{
    public unsafe partial class TypeLoadException
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "GetTypeLoadExceptionMessage", ExactSpelling = true)]
        private static extern partial void GetTypeLoadExceptionMessage(int resourceId, global::System.Runtime.CompilerServices.StringHandleOnStack retString);
    }
}
namespace System
{
    public abstract unsafe partial class ValueType
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        private static unsafe partial bool CanCompareBitsOrUseFastGetHashCodeHelper(global::System.Runtime.CompilerServices.MethodTable* pMT)
        {
            bool __retVal;
            int __retVal_native;
            {
                __retVal_native = __PInvoke(pMT);
            }
 
            // Unmarshal - Convert native data to managed data.
            __retVal = __retVal_native != 0;
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "MethodTable_CanCompareBitsOrUseFastGetHashCode", ExactSpelling = true)]
            static extern unsafe int __PInvoke(global::System.Runtime.CompilerServices.MethodTable* __pMT_native);
        }
    }
}
namespace System
{
    public abstract unsafe partial class ValueType
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        private static unsafe partial global::System.ValueType.ValueTypeHashCodeStrategy GetHashCodeStrategy(global::System.Runtime.CompilerServices.MethodTable* pMT, global::System.Runtime.CompilerServices.ObjectHandleOnStack objHandle, out uint fieldOffset, out uint fieldSize, out global::System.Runtime.CompilerServices.MethodTable* fieldMT)
        {
            fieldOffset = default;
            fieldSize = default;
            fieldMT = default;
            global::System.ValueType.ValueTypeHashCodeStrategy __retVal;
            // Pin - Pin data in preparation for calling the P/Invoke.
            fixed (global::System.Runtime.CompilerServices.MethodTable** __fieldMT_native = &fieldMT)
            fixed (uint* __fieldSize_native = &fieldSize)
            fixed (uint* __fieldOffset_native = &fieldOffset)
            {
                __retVal = __PInvoke(pMT, objHandle, __fieldOffset_native, __fieldSize_native, __fieldMT_native);
            }
 
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "ValueType_GetHashCodeStrategy", ExactSpelling = true)]
            static extern unsafe global::System.ValueType.ValueTypeHashCodeStrategy __PInvoke(global::System.Runtime.CompilerServices.MethodTable* __pMT_native, global::System.Runtime.CompilerServices.ObjectHandleOnStack __objHandle_native, uint* __fieldOffset_native, uint* __fieldSize_native, global::System.Runtime.CompilerServices.MethodTable** __fieldMT_native);
        }
    }
}
namespace System
{
    internal sealed unsafe partial class RuntimeType
    {
        internal sealed unsafe partial class BoxCache
        {
            [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "ReflectionInvocation_GetBoxInfo", ExactSpelling = true)]
            private static extern partial void GetBoxInfo(global::System.Runtime.CompilerServices.QCallTypeHandle type, delegate*<void*, object> * ppfnAllocator, void** pvAllocatorFirstArg, int* pNullableValueOffset, uint* pValueTypeSize);
        }
    }
}
namespace System
{
    internal sealed unsafe partial class RuntimeType
    {
        internal sealed unsafe partial class CreateUninitializedCache
        {
            [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "ReflectionSerialization_GetCreateUninitializedObjectInfo", ExactSpelling = true)]
            private static extern partial void GetCreateUninitializedInfo(global::System.Runtime.CompilerServices.QCallTypeHandle type, delegate*<void*, object> * ppfnAllocator, void** pvAllocatorFirstArg);
        }
    }
}
namespace System.Runtime.InteropServices
{
    public abstract unsafe partial class ComWrappers
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        private static partial void GetIUnknownImplInternal(out nint fpQueryInterface, out nint fpAddRef, out nint fpRelease)
        {
            fpQueryInterface = default;
            fpAddRef = default;
            fpRelease = default;
            // Pin - Pin data in preparation for calling the P/Invoke.
            fixed (nint* __fpRelease_native = &fpRelease)
            fixed (nint* __fpAddRef_native = &fpAddRef)
            fixed (nint* __fpQueryInterface_native = &fpQueryInterface)
            {
                __PInvoke(__fpQueryInterface_native, __fpAddRef_native, __fpRelease_native);
            }
 
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "ComWrappers_GetIUnknownImpl", ExactSpelling = true)]
            [global::System.Runtime.InteropServices.SuppressGCTransitionAttribute]
            static extern unsafe void __PInvoke(nint* __fpQueryInterface_native, nint* __fpAddRef_native, nint* __fpRelease_native);
        }
    }
}
namespace System.Runtime.InteropServices
{
    public abstract unsafe partial class ComWrappers
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "ComWrappers_GetUntrackedAddRefRelease", ExactSpelling = true)]
        private static unsafe extern partial delegate* unmanaged[MemberFunction]<nint, uint> GetUntrackedAddRefRelease();
    }
}
namespace System.Runtime.InteropServices
{
    public abstract unsafe partial class ComWrappers
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "ComWrappers_GetIReferenceTrackerTargetVftbl", ExactSpelling = true)]
        private static extern partial nint GetDefaultIReferenceTrackerTargetVftbl();
    }
}
namespace System.Runtime.InteropServices
{
    public abstract unsafe partial class ComWrappers
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "ComWrappers_GetTaggedImpl", ExactSpelling = true)]
        private static extern partial nint GetTaggedImpl();
    }
}
namespace System.Runtime.InteropServices
{
    public abstract unsafe partial class ComWrappers
    {
        internal sealed unsafe partial class ManagedObjectWrapperHolder
        {
            [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "ComWrappers_RegisterIsRootedCallback", ExactSpelling = true)]
            private static extern partial void RegisterIsRootedCallback();
        }
    }
}
namespace System.Runtime.InteropServices
{
    public abstract unsafe partial class ComWrappers
    {
        internal sealed unsafe partial class ManagedObjectWrapperHolder
        {
            [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "ComWrappers_AllocateRefCountedHandle", ExactSpelling = true)]
            private static extern partial nint AllocateRefCountedHandle(global::System.Runtime.CompilerServices.ObjectHandleOnStack obj);
        }
    }
}
namespace System.Runtime.InteropServices
{
    internal static unsafe partial class TrackerObjectManager
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        private static partial bool HasReferenceTrackerManagerInternal()
        {
            bool __retVal;
            byte __retVal_native;
            {
                __retVal_native = __PInvoke();
            }
 
            // Unmarshal - Convert native data to managed data.
            __retVal = __retVal_native != 0;
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "TrackerObjectManager_HasReferenceTrackerManager", ExactSpelling = true)]
            [global::System.Runtime.InteropServices.SuppressGCTransitionAttribute]
            static extern unsafe byte __PInvoke();
        }
    }
}
namespace System.Runtime.InteropServices
{
    internal static unsafe partial class TrackerObjectManager
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        private static partial bool TryRegisterReferenceTrackerManager(nint referenceTrackerManager)
        {
            bool __retVal;
            byte __retVal_native;
            {
                __retVal_native = __PInvoke(referenceTrackerManager);
            }
 
            // Unmarshal - Convert native data to managed data.
            __retVal = __retVal_native != 0;
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "TrackerObjectManager_TryRegisterReferenceTrackerManager", ExactSpelling = true)]
            [global::System.Runtime.InteropServices.SuppressGCTransitionAttribute]
            static extern unsafe byte __PInvoke(nint __referenceTrackerManager_native);
        }
    }
}
namespace System.Runtime.InteropServices
{
    internal static unsafe partial class TrackerObjectManager
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        private static partial bool IsGlobalPeggingEnabledInternal()
        {
            bool __retVal;
            byte __retVal_native;
            {
                __retVal_native = __PInvoke();
            }
 
            // Unmarshal - Convert native data to managed data.
            __retVal = __retVal_native != 0;
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "TrackerObjectManager_IsGlobalPeggingEnabled", ExactSpelling = true)]
            [global::System.Runtime.InteropServices.SuppressGCTransitionAttribute]
            static extern unsafe byte __PInvoke();
        }
    }
}
namespace System.Runtime.InteropServices
{
    internal static unsafe partial class TrackerObjectManager
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "TrackerObjectManager_RegisterNativeObjectWrapperCache", ExactSpelling = true)]
        private static extern partial void RegisterNativeObjectWrapperCache(global::System.Runtime.CompilerServices.ObjectHandleOnStack nativeObjectWrapperCache);
    }
}
namespace System.Threading
{
    internal sealed unsafe partial class LowLevelLifoSemaphore
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        private static partial int WaitNative(global::Microsoft.Win32.SafeHandles.SafeWaitHandle handle, int timeoutMs)
        {
            nint __handle_native = default;
            int __retVal = default;
            // Setup - Perform required setup.
            global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Microsoft.Win32.SafeHandles.SafeWaitHandle>.ManagedToUnmanagedIn __handle_native__marshaller = new();
            try
            {
                // Marshal - Convert managed data to native data.
                __handle_native__marshaller.FromManaged(handle);
                {
                    // PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
                    __handle_native = __handle_native__marshaller.ToUnmanaged();
                    __retVal = __PInvoke(__handle_native, timeoutMs);
                }
            }
            finally
            {
                // CleanupCallerAllocated - Perform cleanup of caller allocated resources.
                __handle_native__marshaller.Free();
            }
 
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "WaitHandle_WaitOnePrioritized", ExactSpelling = true)]
            static extern unsafe int __PInvoke(nint __handle_native, int __timeoutMs_native);
        }
    }
}
namespace System.Threading
{
    public sealed unsafe partial class Mutex
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        private static unsafe partial global::Microsoft.Win32.SafeHandles.SafeWaitHandle CreateMutex(bool initialOwner, string name, bool currentUserOnly, byte* systemCallErrors, uint systemCallErrorsBufferSize)
        {
            int __lastError;
            bool __invokeSucceeded = default;
            int __initialOwner_native = default;
            int __currentUserOnly_native = default;
            global::Microsoft.Win32.SafeHandles.SafeWaitHandle __retVal = default;
            nint __retVal_native = default;
            // Setup - Perform required setup.
            global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Microsoft.Win32.SafeHandles.SafeWaitHandle>.ManagedToUnmanagedOut __retVal_native__marshaller = new();
            try
            {
                // Marshal - Convert managed data to native data.
                __currentUserOnly_native = (int)(currentUserOnly ? 1 : 0);
                __initialOwner_native = (int)(initialOwner ? 1 : 0);
                // Pin - Pin data in preparation for calling the P/Invoke.
                fixed (void* __name_native = &global::System.Runtime.InteropServices.Marshalling.Utf16StringMarshaller.GetPinnableReference(name))
                {
                    global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
                    __retVal_native = __PInvoke(__initialOwner_native, (ushort*)__name_native, __currentUserOnly_native, systemCallErrors, systemCallErrorsBufferSize);
                    __lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
                }
 
                __invokeSucceeded = true;
                // UnmarshalCapture - Capture the native data into marshaller instances in case conversion to managed data throws an exception.
                __retVal_native__marshaller.FromUnmanaged(__retVal_native);
                // Unmarshal - Convert native data to managed data.
                __retVal = __retVal_native__marshaller.ToManaged();
            }
            finally
            {
                if (__invokeSucceeded)
                {
                    // CleanupCalleeAllocated - Perform cleanup of callee allocated resources.
                    __retVal_native__marshaller.Free();
                }
            }
 
            global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "PAL_CreateMutexW", ExactSpelling = true)]
            static extern unsafe nint __PInvoke(int __initialOwner_native, ushort* __name_native, int __currentUserOnly_native, byte* __systemCallErrors_native, uint __systemCallErrorsBufferSize_native);
        }
    }
}
namespace System.Threading
{
    public sealed unsafe partial class Mutex
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        private static unsafe partial global::Microsoft.Win32.SafeHandles.SafeWaitHandle OpenMutex(string name, bool currentUserOnly, byte* systemCallErrors, uint systemCallErrorsBufferSize)
        {
            int __lastError;
            bool __invokeSucceeded = default;
            int __currentUserOnly_native = default;
            global::Microsoft.Win32.SafeHandles.SafeWaitHandle __retVal = default;
            nint __retVal_native = default;
            // Setup - Perform required setup.
            global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Microsoft.Win32.SafeHandles.SafeWaitHandle>.ManagedToUnmanagedOut __retVal_native__marshaller = new();
            try
            {
                // Marshal - Convert managed data to native data.
                __currentUserOnly_native = (int)(currentUserOnly ? 1 : 0);
                // Pin - Pin data in preparation for calling the P/Invoke.
                fixed (void* __name_native = &global::System.Runtime.InteropServices.Marshalling.Utf16StringMarshaller.GetPinnableReference(name))
                {
                    global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
                    __retVal_native = __PInvoke((ushort*)__name_native, __currentUserOnly_native, systemCallErrors, systemCallErrorsBufferSize);
                    __lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
                }
 
                __invokeSucceeded = true;
                // UnmarshalCapture - Capture the native data into marshaller instances in case conversion to managed data throws an exception.
                __retVal_native__marshaller.FromUnmanaged(__retVal_native);
                // Unmarshal - Convert native data to managed data.
                __retVal = __retVal_native__marshaller.ToManaged();
            }
            finally
            {
                if (__invokeSucceeded)
                {
                    // CleanupCalleeAllocated - Perform cleanup of callee allocated resources.
                    __retVal_native__marshaller.Free();
                }
            }
 
            global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "PAL_OpenMutexW", ExactSpelling = true)]
            static extern unsafe nint __PInvoke(ushort* __name_native, int __currentUserOnly_native, byte* __systemCallErrors_native, uint __systemCallErrorsBufferSize_native);
        }
    }
}
namespace System.Runtime.InteropServices
{
    internal static unsafe partial class TypeMapLazyDictionary
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "TypeMapLazyDictionary_ProcessAttributes", ExactSpelling = true)]
        private static unsafe extern partial void ProcessAttributes(global::System.Runtime.CompilerServices.QCallAssembly assembly, global::System.Runtime.CompilerServices.QCallTypeHandle groupType, delegate* unmanaged<global::System.Runtime.InteropServices.TypeMapLazyDictionary.CallbackContext*, global::System.Runtime.InteropServices.TypeMapLazyDictionary.ProcessAttributesCallbackArg*, global::Interop.BOOL> newExternalTypeEntry, delegate* unmanaged<global::System.Runtime.InteropServices.TypeMapLazyDictionary.CallbackContext*, global::System.Runtime.InteropServices.TypeMapLazyDictionary.ProcessAttributesCallbackArg*, global::Interop.BOOL> newProxyTypeEntry, global::System.Runtime.InteropServices.TypeMapLazyDictionary.CallbackContext* context);
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Globalization
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        internal static partial int GetCalendars(string localeName, global::System.Globalization.CalendarId[] calendars, int calendarsCapacity)
        {
            int __retVal;
            // Pin - Pin data in preparation for calling the P/Invoke.
            fixed (void* __calendars_native = &global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<global::System.Globalization.CalendarId, global::System.Globalization.CalendarId>.ManagedToUnmanagedIn.GetPinnableReference(calendars))
            fixed (void* __localeName_native = &global::System.Runtime.InteropServices.Marshalling.Utf16StringMarshaller.GetPinnableReference(localeName))
            {
                __retVal = __PInvoke((ushort*)__localeName_native, (global::System.Globalization.CalendarId*)__calendars_native, calendarsCapacity);
            }
 
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Globalization.Native", EntryPoint = "GlobalizationNative_GetCalendars", ExactSpelling = true)]
            static extern unsafe int __PInvoke(ushort* __localeName_native, global::System.Globalization.CalendarId* __calendars_native, int __calendarsCapacity_native);
        }
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Globalization
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        internal static unsafe partial global::Interop.Globalization.ResultCode GetCalendarInfo(string localeName, global::System.Globalization.CalendarId calendarId, global::System.Globalization.CalendarDataType calendarDataType, char* result, int resultCapacity)
        {
            global::Interop.Globalization.ResultCode __retVal;
            // Pin - Pin data in preparation for calling the P/Invoke.
            fixed (void* __localeName_native = &global::System.Runtime.InteropServices.Marshalling.Utf16StringMarshaller.GetPinnableReference(localeName))
            {
                __retVal = __PInvoke((ushort*)__localeName_native, calendarId, calendarDataType, result, resultCapacity);
            }
 
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Globalization.Native", EntryPoint = "GlobalizationNative_GetCalendarInfo", ExactSpelling = true)]
            static extern unsafe global::Interop.Globalization.ResultCode __PInvoke(ushort* __localeName_native, global::System.Globalization.CalendarId __calendarId_native, global::System.Globalization.CalendarDataType __calendarDataType_native, char* __result_native, int __resultCapacity_native);
        }
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Globalization
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        private static unsafe partial bool EnumCalendarInfo(nint callback, string localeName, global::System.Globalization.CalendarId calendarId, global::System.Globalization.CalendarDataType calendarDataType, nint context)
        {
            bool __retVal;
            int __retVal_native;
            // Pin - Pin data in preparation for calling the P/Invoke.
            fixed (void* __localeName_native = &global::System.Runtime.InteropServices.Marshalling.Utf16StringMarshaller.GetPinnableReference(localeName))
            {
                __retVal_native = __PInvoke(callback, (ushort*)__localeName_native, calendarId, calendarDataType, context);
            }
 
            // Unmarshal - Convert native data to managed data.
            __retVal = __retVal_native != 0;
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Globalization.Native", EntryPoint = "GlobalizationNative_EnumCalendarInfo", ExactSpelling = true)]
            static extern unsafe int __PInvoke(nint __callback_native, ushort* __localeName_native, global::System.Globalization.CalendarId __calendarId_native, global::System.Globalization.CalendarDataType __calendarDataType_native, nint __context_native);
        }
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Globalization
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Globalization.Native", EntryPoint = "GlobalizationNative_GetLatestJapaneseEra", ExactSpelling = true)]
        internal static extern partial int GetLatestJapaneseEra();
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Globalization
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        internal static partial bool GetJapaneseEraStartDate(int era, out int startYear, out int startMonth, out int startDay)
        {
            startYear = default;
            startMonth = default;
            startDay = default;
            bool __retVal;
            int __retVal_native;
            // Pin - Pin data in preparation for calling the P/Invoke.
            fixed (int* __startDay_native = &startDay)
            fixed (int* __startMonth_native = &startMonth)
            fixed (int* __startYear_native = &startYear)
            {
                __retVal_native = __PInvoke(era, __startYear_native, __startMonth_native, __startDay_native);
            }
 
            // Unmarshal - Convert native data to managed data.
            __retVal = __retVal_native != 0;
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Globalization.Native", EntryPoint = "GlobalizationNative_GetJapaneseEraStartDate", ExactSpelling = true)]
            static extern unsafe int __PInvoke(int __era_native, int* __startYear_native, int* __startMonth_native, int* __startDay_native);
        }
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Globalization
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        internal static unsafe partial void ChangeCase(char* src, int srcLen, char* dstBuffer, int dstBufferCapacity, bool bToUpper)
        {
            int __bToUpper_native;
            // Marshal - Convert managed data to native data.
            __bToUpper_native = (int)(bToUpper ? 1 : 0);
            {
                __PInvoke(src, srcLen, dstBuffer, dstBufferCapacity, __bToUpper_native);
            }
 
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Globalization.Native", EntryPoint = "GlobalizationNative_ChangeCase", ExactSpelling = true)]
            [return: System.Runtime.InteropServices.MarshalAsAttribute((global::System.Runtime.InteropServices.UnmanagedType)2)]
            static extern unsafe void __PInvoke(char* __src_native, int __srcLen_native, char* __dstBuffer_native, int __dstBufferCapacity_native, int __bToUpper_native);
        }
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Globalization
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        internal static unsafe partial void ChangeCaseInvariant(char* src, int srcLen, char* dstBuffer, int dstBufferCapacity, bool bToUpper)
        {
            int __bToUpper_native;
            // Marshal - Convert managed data to native data.
            __bToUpper_native = (int)(bToUpper ? 1 : 0);
            {
                __PInvoke(src, srcLen, dstBuffer, dstBufferCapacity, __bToUpper_native);
            }
 
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Globalization.Native", EntryPoint = "GlobalizationNative_ChangeCaseInvariant", ExactSpelling = true)]
            [return: System.Runtime.InteropServices.MarshalAsAttribute((global::System.Runtime.InteropServices.UnmanagedType)2)]
            static extern unsafe void __PInvoke(char* __src_native, int __srcLen_native, char* __dstBuffer_native, int __dstBufferCapacity_native, int __bToUpper_native);
        }
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Globalization
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        internal static unsafe partial void ChangeCaseTurkish(char* src, int srcLen, char* dstBuffer, int dstBufferCapacity, bool bToUpper)
        {
            int __bToUpper_native;
            // Marshal - Convert managed data to native data.
            __bToUpper_native = (int)(bToUpper ? 1 : 0);
            {
                __PInvoke(src, srcLen, dstBuffer, dstBufferCapacity, __bToUpper_native);
            }
 
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Globalization.Native", EntryPoint = "GlobalizationNative_ChangeCaseTurkish", ExactSpelling = true)]
            [return: System.Runtime.InteropServices.MarshalAsAttribute((global::System.Runtime.InteropServices.UnmanagedType)2)]
            static extern unsafe void __PInvoke(char* __src_native, int __srcLen_native, char* __dstBuffer_native, int __dstBufferCapacity_native, int __bToUpper_native);
        }
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Globalization
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Globalization.Native", EntryPoint = "GlobalizationNative_InitOrdinalCasingPage", ExactSpelling = true, CharSet = global::System.Runtime.InteropServices.CharSet.Unicode)]
        internal static unsafe extern partial void InitOrdinalCasingPage(int pageNumber, char* pTarget);
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Globalization
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        internal static unsafe partial global::Interop.Globalization.ResultCode GetSortHandle(string localeName, out nint sortHandle)
        {
            sortHandle = default;
            byte* __localeName_native = default;
            global::Interop.Globalization.ResultCode __retVal = default;
            // Setup - Perform required setup.
            scoped global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.ManagedToUnmanagedIn __localeName_native__marshaller = new();
            try
            {
                // Marshal - Convert managed data to native data.
                __localeName_native__marshaller.FromManaged(localeName, stackalloc byte[global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.ManagedToUnmanagedIn.BufferSize]);
                // Pin - Pin data in preparation for calling the P/Invoke.
                fixed (nint* __sortHandle_native = &sortHandle)
                {
                    // PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
                    __localeName_native = __localeName_native__marshaller.ToUnmanaged();
                    __retVal = __PInvoke(__localeName_native, __sortHandle_native);
                }
            }
            finally
            {
                // CleanupCallerAllocated - Perform cleanup of caller allocated resources.
                __localeName_native__marshaller.Free();
            }
 
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Globalization.Native", EntryPoint = "GlobalizationNative_GetSortHandle", ExactSpelling = true)]
            static extern unsafe global::Interop.Globalization.ResultCode __PInvoke(byte* __localeName_native, nint* __sortHandle_native);
        }
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Globalization
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Globalization.Native", EntryPoint = "GlobalizationNative_CloseSortHandle", ExactSpelling = true)]
        internal static extern partial void CloseSortHandle(nint handle);
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Globalization
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Globalization.Native", EntryPoint = "GlobalizationNative_CompareString", ExactSpelling = true, CharSet = global::System.Runtime.InteropServices.CharSet.Unicode)]
        internal static unsafe extern partial int CompareString(nint sortHandle, char* lpStr1, int cwStr1Len, char* lpStr2, int cwStr2Len, global::System.Globalization.CompareOptions options);
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Globalization
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Globalization.Native", EntryPoint = "GlobalizationNative_IndexOf", ExactSpelling = true, CharSet = global::System.Runtime.InteropServices.CharSet.Unicode)]
        internal static unsafe extern partial int IndexOf(nint sortHandle, char* target, int cwTargetLength, char* pSource, int cwSourceLength, global::System.Globalization.CompareOptions options, int* matchLengthPtr);
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Globalization
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Globalization.Native", EntryPoint = "GlobalizationNative_LastIndexOf", ExactSpelling = true, CharSet = global::System.Runtime.InteropServices.CharSet.Unicode)]
        internal static unsafe extern partial int LastIndexOf(nint sortHandle, char* target, int cwTargetLength, char* pSource, int cwSourceLength, global::System.Globalization.CompareOptions options, int* matchLengthPtr);
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Globalization
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        internal static unsafe partial bool StartsWith(nint sortHandle, char* target, int cwTargetLength, char* source, int cwSourceLength, global::System.Globalization.CompareOptions options, int* matchedLength)
        {
            bool __retVal;
            int __retVal_native;
            {
                __retVal_native = __PInvoke(sortHandle, target, cwTargetLength, source, cwSourceLength, options, matchedLength);
            }
 
            // Unmarshal - Convert native data to managed data.
            __retVal = __retVal_native != 0;
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Globalization.Native", EntryPoint = "GlobalizationNative_StartsWith", ExactSpelling = true)]
            static extern unsafe int __PInvoke(nint __sortHandle_native, char* __target_native, int __cwTargetLength_native, char* __source_native, int __cwSourceLength_native, global::System.Globalization.CompareOptions __options_native, int* __matchedLength_native);
        }
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Globalization
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        internal static unsafe partial bool EndsWith(nint sortHandle, char* target, int cwTargetLength, char* source, int cwSourceLength, global::System.Globalization.CompareOptions options, int* matchedLength)
        {
            bool __retVal;
            int __retVal_native;
            {
                __retVal_native = __PInvoke(sortHandle, target, cwTargetLength, source, cwSourceLength, options, matchedLength);
            }
 
            // Unmarshal - Convert native data to managed data.
            __retVal = __retVal_native != 0;
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Globalization.Native", EntryPoint = "GlobalizationNative_EndsWith", ExactSpelling = true)]
            static extern unsafe int __PInvoke(nint __sortHandle_native, char* __target_native, int __cwTargetLength_native, char* __source_native, int __cwSourceLength_native, global::System.Globalization.CompareOptions __options_native, int* __matchedLength_native);
        }
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Globalization
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        internal static partial bool StartsWith(nint sortHandle, string target, int cwTargetLength, string source, int cwSourceLength, global::System.Globalization.CompareOptions options)
        {
            bool __retVal;
            int __retVal_native;
            // Pin - Pin data in preparation for calling the P/Invoke.
            fixed (void* __source_native = &global::System.Runtime.InteropServices.Marshalling.Utf16StringMarshaller.GetPinnableReference(source))
            fixed (void* __target_native = &global::System.Runtime.InteropServices.Marshalling.Utf16StringMarshaller.GetPinnableReference(target))
            {
                __retVal_native = __PInvoke(sortHandle, (ushort*)__target_native, cwTargetLength, (ushort*)__source_native, cwSourceLength, options);
            }
 
            // Unmarshal - Convert native data to managed data.
            __retVal = __retVal_native != 0;
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Globalization.Native", EntryPoint = "GlobalizationNative_StartsWith", ExactSpelling = true)]
            static extern unsafe int __PInvoke(nint __sortHandle_native, ushort* __target_native, int __cwTargetLength_native, ushort* __source_native, int __cwSourceLength_native, global::System.Globalization.CompareOptions __options_native);
        }
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Globalization
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        internal static partial bool EndsWith(nint sortHandle, string target, int cwTargetLength, string source, int cwSourceLength, global::System.Globalization.CompareOptions options)
        {
            bool __retVal;
            int __retVal_native;
            // Pin - Pin data in preparation for calling the P/Invoke.
            fixed (void* __source_native = &global::System.Runtime.InteropServices.Marshalling.Utf16StringMarshaller.GetPinnableReference(source))
            fixed (void* __target_native = &global::System.Runtime.InteropServices.Marshalling.Utf16StringMarshaller.GetPinnableReference(target))
            {
                __retVal_native = __PInvoke(sortHandle, (ushort*)__target_native, cwTargetLength, (ushort*)__source_native, cwSourceLength, options);
            }
 
            // Unmarshal - Convert native data to managed data.
            __retVal = __retVal_native != 0;
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Globalization.Native", EntryPoint = "GlobalizationNative_EndsWith", ExactSpelling = true)]
            static extern unsafe int __PInvoke(nint __sortHandle_native, ushort* __target_native, int __cwTargetLength_native, ushort* __source_native, int __cwSourceLength_native, global::System.Globalization.CompareOptions __options_native);
        }
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Globalization
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Globalization.Native", EntryPoint = "GlobalizationNative_GetSortKey", ExactSpelling = true, CharSet = global::System.Runtime.InteropServices.CharSet.Unicode)]
        internal static unsafe extern partial int GetSortKey(nint sortHandle, char* str, int strLength, byte* sortKey, int sortKeyLength, global::System.Globalization.CompareOptions options);
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Globalization
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Globalization.Native", EntryPoint = "GlobalizationNative_GetSortVersion", ExactSpelling = true)]
        internal static extern partial int GetSortVersion(nint sortHandle);
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Globalization
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Globalization.Native", EntryPoint = "GlobalizationNative_LoadICU", ExactSpelling = true)]
        internal static extern partial int LoadICU();
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Globalization
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        internal static partial void InitICUFunctions(nint icuuc, nint icuin, string version, string suffix)
        {
            byte* __version_native = default;
            byte* __suffix_native = default;
            // Setup - Perform required setup.
            scoped global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.ManagedToUnmanagedIn __suffix_native__marshaller = new();
            scoped global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.ManagedToUnmanagedIn __version_native__marshaller = new();
            try
            {
                // Marshal - Convert managed data to native data.
                __suffix_native__marshaller.FromManaged(suffix, stackalloc byte[global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.ManagedToUnmanagedIn.BufferSize]);
                __version_native__marshaller.FromManaged(version, stackalloc byte[global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.ManagedToUnmanagedIn.BufferSize]);
                {
                    // PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
                    __suffix_native = __suffix_native__marshaller.ToUnmanaged();
                    __version_native = __version_native__marshaller.ToUnmanaged();
                    __PInvoke(icuuc, icuin, __version_native, __suffix_native);
                }
            }
            finally
            {
                // CleanupCallerAllocated - Perform cleanup of caller allocated resources.
                __suffix_native__marshaller.Free();
                __version_native__marshaller.Free();
            }
 
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Globalization.Native", EntryPoint = "GlobalizationNative_InitICUFunctions", ExactSpelling = true)]
            static extern unsafe void __PInvoke(nint __icuuc_native, nint __icuin_native, byte* __version_native, byte* __suffix_native);
        }
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Globalization
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Globalization.Native", EntryPoint = "GlobalizationNative_GetICUVersion", ExactSpelling = true)]
        internal static extern partial int GetICUVersion();
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Globalization
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Globalization.Native", EntryPoint = "GlobalizationNative_ToAscii", ExactSpelling = true, CharSet = global::System.Runtime.InteropServices.CharSet.Unicode)]
        internal static unsafe extern partial int ToAscii(uint flags, char* src, int srcLen, char* dstBuffer, int dstBufferCapacity);
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Globalization
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Globalization.Native", EntryPoint = "GlobalizationNative_ToUnicode", ExactSpelling = true, CharSet = global::System.Runtime.InteropServices.CharSet.Unicode)]
        internal static unsafe extern partial int ToUnicode(uint flags, char* src, int srcLen, char* dstBuffer, int dstBufferCapacity);
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Globalization
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        internal static unsafe partial bool GetLocaleName(string localeName, char* value, int valueLength)
        {
            bool __retVal;
            int __retVal_native;
            // Pin - Pin data in preparation for calling the P/Invoke.
            fixed (void* __localeName_native = &global::System.Runtime.InteropServices.Marshalling.Utf16StringMarshaller.GetPinnableReference(localeName))
            {
                __retVal_native = __PInvoke((ushort*)__localeName_native, value, valueLength);
            }
 
            // Unmarshal - Convert native data to managed data.
            __retVal = __retVal_native != 0;
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Globalization.Native", EntryPoint = "GlobalizationNative_GetLocaleName", ExactSpelling = true)]
            static extern unsafe int __PInvoke(ushort* __localeName_native, char* __value_native, int __valueLength_native);
        }
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Globalization
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        internal static unsafe partial bool GetLocaleInfoString(string localeName, uint localeStringData, char* value, int valueLength, string uiLocaleName)
        {
            bool __retVal;
            int __retVal_native;
            // Pin - Pin data in preparation for calling the P/Invoke.
            fixed (void* __uiLocaleName_native = &global::System.Runtime.InteropServices.Marshalling.Utf16StringMarshaller.GetPinnableReference(uiLocaleName))
            fixed (void* __localeName_native = &global::System.Runtime.InteropServices.Marshalling.Utf16StringMarshaller.GetPinnableReference(localeName))
            {
                __retVal_native = __PInvoke((ushort*)__localeName_native, localeStringData, value, valueLength, (ushort*)__uiLocaleName_native);
            }
 
            // Unmarshal - Convert native data to managed data.
            __retVal = __retVal_native != 0;
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Globalization.Native", EntryPoint = "GlobalizationNative_GetLocaleInfoString", ExactSpelling = true)]
            static extern unsafe int __PInvoke(ushort* __localeName_native, uint __localeStringData_native, char* __value_native, int __valueLength_native, ushort* __uiLocaleName_native);
        }
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Globalization
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        internal static unsafe partial bool GetDefaultLocaleName(char* value, int valueLength)
        {
            bool __retVal;
            int __retVal_native;
            {
                __retVal_native = __PInvoke(value, valueLength);
            }
 
            // Unmarshal - Convert native data to managed data.
            __retVal = __retVal_native != 0;
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Globalization.Native", EntryPoint = "GlobalizationNative_GetDefaultLocaleName", ExactSpelling = true)]
            static extern unsafe int __PInvoke(char* __value_native, int __valueLength_native);
        }
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Globalization
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        internal static partial bool IsPredefinedLocale(string localeName)
        {
            bool __retVal;
            int __retVal_native;
            // Pin - Pin data in preparation for calling the P/Invoke.
            fixed (void* __localeName_native = &global::System.Runtime.InteropServices.Marshalling.Utf16StringMarshaller.GetPinnableReference(localeName))
            {
                __retVal_native = __PInvoke((ushort*)__localeName_native);
            }
 
            // Unmarshal - Convert native data to managed data.
            __retVal = __retVal_native != 0;
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Globalization.Native", EntryPoint = "GlobalizationNative_IsPredefinedLocale", ExactSpelling = true)]
            static extern unsafe int __PInvoke(ushort* __localeName_native);
        }
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Globalization
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        internal static unsafe partial bool GetLocaleTimeFormat(string localeName, bool shortFormat, char* value, int valueLength)
        {
            int __shortFormat_native;
            bool __retVal;
            int __retVal_native;
            // Marshal - Convert managed data to native data.
            __shortFormat_native = (int)(shortFormat ? 1 : 0);
            // Pin - Pin data in preparation for calling the P/Invoke.
            fixed (void* __localeName_native = &global::System.Runtime.InteropServices.Marshalling.Utf16StringMarshaller.GetPinnableReference(localeName))
            {
                __retVal_native = __PInvoke((ushort*)__localeName_native, __shortFormat_native, value, valueLength);
            }
 
            // Unmarshal - Convert native data to managed data.
            __retVal = __retVal_native != 0;
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Globalization.Native", EntryPoint = "GlobalizationNative_GetLocaleTimeFormat", ExactSpelling = true)]
            static extern unsafe int __PInvoke(ushort* __localeName_native, int __shortFormat_native, char* __value_native, int __valueLength_native);
        }
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Globalization
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        internal static partial bool GetLocaleInfoInt(string localeName, uint localeNumberData, ref int value)
        {
            bool __retVal;
            int __retVal_native;
            // Pin - Pin data in preparation for calling the P/Invoke.
            fixed (int* __value_native = &value)
            fixed (void* __localeName_native = &global::System.Runtime.InteropServices.Marshalling.Utf16StringMarshaller.GetPinnableReference(localeName))
            {
                __retVal_native = __PInvoke((ushort*)__localeName_native, localeNumberData, __value_native);
            }
 
            // Unmarshal - Convert native data to managed data.
            __retVal = __retVal_native != 0;
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Globalization.Native", EntryPoint = "GlobalizationNative_GetLocaleInfoInt", ExactSpelling = true)]
            static extern unsafe int __PInvoke(ushort* __localeName_native, uint __localeNumberData_native, int* __value_native);
        }
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Globalization
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        internal static partial bool GetLocaleInfoGroupingSizes(string localeName, uint localeGroupingData, ref int primaryGroupSize, ref int secondaryGroupSize)
        {
            bool __retVal;
            int __retVal_native;
            // Pin - Pin data in preparation for calling the P/Invoke.
            fixed (int* __secondaryGroupSize_native = &secondaryGroupSize)
            fixed (int* __primaryGroupSize_native = &primaryGroupSize)
            fixed (void* __localeName_native = &global::System.Runtime.InteropServices.Marshalling.Utf16StringMarshaller.GetPinnableReference(localeName))
            {
                __retVal_native = __PInvoke((ushort*)__localeName_native, localeGroupingData, __primaryGroupSize_native, __secondaryGroupSize_native);
            }
 
            // Unmarshal - Convert native data to managed data.
            __retVal = __retVal_native != 0;
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Globalization.Native", EntryPoint = "GlobalizationNative_GetLocaleInfoGroupingSizes", ExactSpelling = true)]
            static extern unsafe int __PInvoke(ushort* __localeName_native, uint __localeGroupingData_native, int* __primaryGroupSize_native, int* __secondaryGroupSize_native);
        }
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Globalization
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        internal static partial int GetLocales(char[] value, int valueLength)
        {
            int __retVal;
            // Pin - Pin data in preparation for calling the P/Invoke.
            fixed (void* __value_native = &global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<char, char>.ManagedToUnmanagedIn.GetPinnableReference(value))
            {
                __retVal = __PInvoke((char*)__value_native, valueLength);
            }
 
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Globalization.Native", EntryPoint = "GlobalizationNative_GetLocales", ExactSpelling = true)]
            static extern unsafe int __PInvoke(char* __value_native, int __valueLength_native);
        }
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Globalization
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Globalization.Native", EntryPoint = "GlobalizationNative_IsNormalized", ExactSpelling = true, CharSet = global::System.Runtime.InteropServices.CharSet.Unicode)]
        internal static unsafe extern partial int IsNormalized(global::System.Text.NormalizationForm normalizationForm, char* src, int srcLen);
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Globalization
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Globalization.Native", EntryPoint = "GlobalizationNative_NormalizeString", ExactSpelling = true, CharSet = global::System.Runtime.InteropServices.CharSet.Unicode)]
        internal static unsafe extern partial int NormalizeString(global::System.Text.NormalizationForm normalizationForm, char* src, int srcLen, char* dstBuffer, int dstBufferCapacity);
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Globalization
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        internal static unsafe partial global::Interop.Globalization.ResultCode GetTimeZoneDisplayName(string localeName, string timeZoneId, global::Interop.Globalization.TimeZoneDisplayNameType type, char* result, int resultLength)
        {
            global::Interop.Globalization.ResultCode __retVal;
            // Pin - Pin data in preparation for calling the P/Invoke.
            fixed (void* __timeZoneId_native = &global::System.Runtime.InteropServices.Marshalling.Utf16StringMarshaller.GetPinnableReference(timeZoneId))
            fixed (void* __localeName_native = &global::System.Runtime.InteropServices.Marshalling.Utf16StringMarshaller.GetPinnableReference(localeName))
            {
                __retVal = __PInvoke((ushort*)__localeName_native, (ushort*)__timeZoneId_native, type, result, resultLength);
            }
 
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Globalization.Native", EntryPoint = "GlobalizationNative_GetTimeZoneDisplayName", ExactSpelling = true)]
            static extern unsafe global::Interop.Globalization.ResultCode __PInvoke(ushort* __localeName_native, ushort* __timeZoneId_native, global::Interop.Globalization.TimeZoneDisplayNameType __type_native, char* __result_native, int __resultLength_native);
        }
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Globalization
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        internal static unsafe partial int WindowsIdToIanaId(string windowsId, nint region, char* ianaId, int ianaIdLength)
        {
            int __retVal;
            // Pin - Pin data in preparation for calling the P/Invoke.
            fixed (void* __windowsId_native = &global::System.Runtime.InteropServices.Marshalling.Utf16StringMarshaller.GetPinnableReference(windowsId))
            {
                __retVal = __PInvoke((ushort*)__windowsId_native, region, ianaId, ianaIdLength);
            }
 
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Globalization.Native", EntryPoint = "GlobalizationNative_WindowsIdToIanaId", ExactSpelling = true)]
            static extern unsafe int __PInvoke(ushort* __windowsId_native, nint __region_native, char* __ianaId_native, int __ianaIdLength_native);
        }
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Globalization
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        internal static unsafe partial int IanaIdToWindowsId(string ianaId, char* windowsId, int windowsIdLength)
        {
            int __retVal;
            // Pin - Pin data in preparation for calling the P/Invoke.
            fixed (void* __ianaId_native = &global::System.Runtime.InteropServices.Marshalling.Utf16StringMarshaller.GetPinnableReference(ianaId))
            {
                __retVal = __PInvoke((ushort*)__ianaId_native, windowsId, windowsIdLength);
            }
 
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Globalization.Native", EntryPoint = "GlobalizationNative_IanaIdToWindowsId", ExactSpelling = true)]
            static extern unsafe int __PInvoke(ushort* __ianaId_native, char* __windowsId_native, int __windowsIdLength_native);
        }
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Kernel32
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("kernel32.dll", EntryPoint = "LCIDToLocaleName", ExactSpelling = true, CharSet = global::System.Runtime.InteropServices.CharSet.Unicode)]
        internal static unsafe extern partial int LCIDToLocaleName(int locale, char* pLocaleName, int cchName, uint dwFlags);
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Kernel32
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        internal static partial int LocaleNameToLCID(string lpName, uint dwFlags)
        {
            int __retVal;
            // Pin - Pin data in preparation for calling the P/Invoke.
            fixed (void* __lpName_native = &global::System.Runtime.InteropServices.Marshalling.Utf16StringMarshaller.GetPinnableReference(lpName))
            {
                __retVal = __PInvoke((ushort*)__lpName_native, dwFlags);
            }
 
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("kernel32.dll", EntryPoint = "LocaleNameToLCID", ExactSpelling = true)]
            static extern unsafe int __PInvoke(ushort* __lpName_native, uint __dwFlags_native);
        }
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Kernel32
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        internal static unsafe partial int LCMapStringEx(string lpLocaleName, uint dwMapFlags, char* lpSrcStr, int cchSrc, void* lpDestStr, int cchDest, void* lpVersionInformation, void* lpReserved, nint sortHandle)
        {
            int __lastError;
            int __retVal;
            // Pin - Pin data in preparation for calling the P/Invoke.
            fixed (void* __lpLocaleName_native = &global::System.Runtime.InteropServices.Marshalling.Utf16StringMarshaller.GetPinnableReference(lpLocaleName))
            {
                global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
                __retVal = __PInvoke((ushort*)__lpLocaleName_native, dwMapFlags, lpSrcStr, cchSrc, lpDestStr, cchDest, lpVersionInformation, lpReserved, sortHandle);
                __lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
            }
 
            global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("kernel32.dll", EntryPoint = "LCMapStringEx", ExactSpelling = true)]
            static extern unsafe int __PInvoke(ushort* __lpLocaleName_native, uint __dwMapFlags_native, char* __lpSrcStr_native, int __cchSrc_native, void* __lpDestStr_native, int __cchDest_native, void* __lpVersionInformation_native, void* __lpReserved_native, nint __sortHandle_native);
        }
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Kernel32
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        internal static unsafe partial int FindNLSStringEx(char* lpLocaleName, uint dwFindNLSStringFlags, char* lpStringSource, int cchSource, char* lpStringValue, int cchValue, int* pcchFound, void* lpVersionInformation, void* lpReserved, nint sortHandle)
        {
            int __lastError;
            int __retVal;
            {
                global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
                __retVal = __PInvoke(lpLocaleName, dwFindNLSStringFlags, lpStringSource, cchSource, lpStringValue, cchValue, pcchFound, lpVersionInformation, lpReserved, sortHandle);
                __lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
            }
 
            global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("kernel32.dll", EntryPoint = "FindNLSStringEx", ExactSpelling = true)]
            static extern unsafe int __PInvoke(char* __lpLocaleName_native, uint __dwFindNLSStringFlags_native, char* __lpStringSource_native, int __cchSource_native, char* __lpStringValue_native, int __cchValue_native, int* __pcchFound_native, void* __lpVersionInformation_native, void* __lpReserved_native, nint __sortHandle_native);
        }
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Kernel32
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("kernel32.dll", EntryPoint = "CompareStringEx", ExactSpelling = true)]
        internal static unsafe extern partial int CompareStringEx(char* lpLocaleName, uint dwCmpFlags, char* lpString1, int cchCount1, char* lpString2, int cchCount2, void* lpVersionInformation, void* lpReserved, nint lParam);
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Kernel32
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        internal static unsafe partial int CompareStringOrdinal(char* lpString1, int cchCount1, char* lpString2, int cchCount2, bool bIgnoreCase)
        {
            int __bIgnoreCase_native;
            int __retVal;
            // Marshal - Convert managed data to native data.
            __bIgnoreCase_native = (int)(bIgnoreCase ? 1 : 0);
            {
                __retVal = __PInvoke(lpString1, cchCount1, lpString2, cchCount2, __bIgnoreCase_native);
            }
 
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("kernel32.dll", EntryPoint = "CompareStringOrdinal", ExactSpelling = true)]
            static extern unsafe int __PInvoke(char* __lpString1_native, int __cchCount1_native, char* __lpString2_native, int __cchCount2_native, int __bIgnoreCase_native);
        }
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Kernel32
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        internal static unsafe partial int FindStringOrdinal(uint dwFindStringOrdinalFlags, char* lpStringSource, int cchSource, char* lpStringValue, int cchValue, global::Interop.BOOL bIgnoreCase)
        {
            int __lastError;
            int __retVal;
            {
                global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
                __retVal = __PInvoke(dwFindStringOrdinalFlags, lpStringSource, cchSource, lpStringValue, cchValue, bIgnoreCase);
                __lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
            }
 
            global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("kernel32.dll", EntryPoint = "FindStringOrdinal", ExactSpelling = true)]
            static extern unsafe int __PInvoke(uint __dwFindStringOrdinalFlags_native, char* __lpStringSource_native, int __cchSource_native, char* __lpStringValue_native, int __cchValue_native, global::Interop.BOOL __bIgnoreCase_native);
        }
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Kernel32
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        internal static unsafe partial bool IsNLSDefinedString(int Function, uint dwFlags, nint lpVersionInformation, char* lpString, int cchStr)
        {
            bool __retVal;
            int __retVal_native;
            {
                __retVal_native = __PInvoke(Function, dwFlags, lpVersionInformation, lpString, cchStr);
            }
 
            // Unmarshal - Convert native data to managed data.
            __retVal = __retVal_native != 0;
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("kernel32.dll", EntryPoint = "IsNLSDefinedString", ExactSpelling = true)]
            static extern unsafe int __PInvoke(int __Function_native, uint __dwFlags_native, nint __lpVersionInformation_native, char* __lpString_native, int __cchStr_native);
        }
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Kernel32
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("kernel32.dll", EntryPoint = "GetUserPreferredUILanguages", ExactSpelling = true)]
        internal static unsafe extern partial global::Interop.BOOL GetUserPreferredUILanguages(uint dwFlags, uint* pulNumLanguages, char* pwszLanguagesBuffer, uint* pcchLanguagesBuffer);
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Kernel32
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        internal static unsafe partial int GetLocaleInfoEx(string lpLocaleName, uint LCType, void* lpLCData, int cchData)
        {
            int __retVal;
            // Pin - Pin data in preparation for calling the P/Invoke.
            fixed (void* __lpLocaleName_native = &global::System.Runtime.InteropServices.Marshalling.Utf16StringMarshaller.GetPinnableReference(lpLocaleName))
            {
                __retVal = __PInvoke((ushort*)__lpLocaleName_native, LCType, lpLCData, cchData);
            }
 
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("kernel32.dll", EntryPoint = "GetLocaleInfoEx", ExactSpelling = true)]
            static extern unsafe int __PInvoke(ushort* __lpLocaleName_native, uint __LCType_native, void* __lpLCData_native, int __cchData_native);
        }
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Kernel32
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        internal static unsafe partial bool EnumSystemLocalesEx(delegate* unmanaged<char*, uint, void*, global::Interop.BOOL> lpLocaleEnumProcEx, uint dwFlags, void* lParam, nint reserved)
        {
            bool __retVal;
            int __retVal_native;
            {
                __retVal_native = __PInvoke(lpLocaleEnumProcEx, dwFlags, lParam, reserved);
            }
 
            // Unmarshal - Convert native data to managed data.
            __retVal = __retVal_native != 0;
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("kernel32.dll", EntryPoint = "EnumSystemLocalesEx", ExactSpelling = true)]
            static extern unsafe int __PInvoke(delegate* unmanaged<char*, uint, void*, global::Interop.BOOL> __lpLocaleEnumProcEx_native, uint __dwFlags_native, void* __lParam_native, nint __reserved_native);
        }
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Kernel32
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        internal static unsafe partial bool EnumTimeFormatsEx(delegate* unmanaged<char*, void*, global::Interop.BOOL> lpTimeFmtEnumProcEx, string lpLocaleName, uint dwFlags, void* lParam)
        {
            bool __retVal;
            int __retVal_native;
            // Pin - Pin data in preparation for calling the P/Invoke.
            fixed (void* __lpLocaleName_native = &global::System.Runtime.InteropServices.Marshalling.Utf16StringMarshaller.GetPinnableReference(lpLocaleName))
            {
                __retVal_native = __PInvoke(lpTimeFmtEnumProcEx, (ushort*)__lpLocaleName_native, dwFlags, lParam);
            }
 
            // Unmarshal - Convert native data to managed data.
            __retVal = __retVal_native != 0;
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("kernel32.dll", EntryPoint = "EnumTimeFormatsEx", ExactSpelling = true)]
            static extern unsafe int __PInvoke(delegate* unmanaged<char*, void*, global::Interop.BOOL> __lpTimeFmtEnumProcEx_native, ushort* __lpLocaleName_native, uint __dwFlags_native, void* __lParam_native);
        }
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Kernel32
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        internal static partial int GetCalendarInfoEx(string lpLocaleName, uint Calendar, nint lpReserved, uint CalType, nint lpCalData, int cchData, out int lpValue)
        {
            lpValue = default;
            int __retVal;
            // Pin - Pin data in preparation for calling the P/Invoke.
            fixed (int* __lpValue_native = &lpValue)
            fixed (void* __lpLocaleName_native = &global::System.Runtime.InteropServices.Marshalling.Utf16StringMarshaller.GetPinnableReference(lpLocaleName))
            {
                __retVal = __PInvoke((ushort*)__lpLocaleName_native, Calendar, lpReserved, CalType, lpCalData, cchData, __lpValue_native);
            }
 
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("kernel32.dll", EntryPoint = "GetCalendarInfoEx", ExactSpelling = true)]
            static extern unsafe int __PInvoke(ushort* __lpLocaleName_native, uint __Calendar_native, nint __lpReserved_native, uint __CalType_native, nint __lpCalData_native, int __cchData_native, int* __lpValue_native);
        }
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Kernel32
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        internal static partial int GetCalendarInfoEx(string lpLocaleName, uint Calendar, nint lpReserved, uint CalType, nint lpCalData, int cchData, nint lpValue)
        {
            int __retVal;
            // Pin - Pin data in preparation for calling the P/Invoke.
            fixed (void* __lpLocaleName_native = &global::System.Runtime.InteropServices.Marshalling.Utf16StringMarshaller.GetPinnableReference(lpLocaleName))
            {
                __retVal = __PInvoke((ushort*)__lpLocaleName_native, Calendar, lpReserved, CalType, lpCalData, cchData, lpValue);
            }
 
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("kernel32.dll", EntryPoint = "GetCalendarInfoEx", ExactSpelling = true)]
            static extern unsafe int __PInvoke(ushort* __lpLocaleName_native, uint __Calendar_native, nint __lpReserved_native, uint __CalType_native, nint __lpCalData_native, int __cchData_native, nint __lpValue_native);
        }
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Kernel32
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("kernel32.dll", EntryPoint = "GetUserGeoID", ExactSpelling = true)]
        internal static extern partial int GetUserGeoID(int geoClass);
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Kernel32
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("kernel32.dll", EntryPoint = "GetGeoInfoW", ExactSpelling = true)]
        internal static unsafe extern partial int GetGeoInfo(int location, int geoType, char* lpGeoData, int cchData, int LangId);
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Kernel32
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        internal static unsafe partial bool EnumCalendarInfoExEx(delegate* unmanaged<char*, uint, nint, void*, global::Interop.BOOL> pCalInfoEnumProcExEx, string lpLocaleName, uint Calendar, string lpReserved, uint CalType, void* lParam)
        {
            bool __retVal;
            int __retVal_native;
            // Pin - Pin data in preparation for calling the P/Invoke.
            fixed (void* __lpReserved_native = &global::System.Runtime.InteropServices.Marshalling.Utf16StringMarshaller.GetPinnableReference(lpReserved))
            fixed (void* __lpLocaleName_native = &global::System.Runtime.InteropServices.Marshalling.Utf16StringMarshaller.GetPinnableReference(lpLocaleName))
            {
                __retVal_native = __PInvoke(pCalInfoEnumProcExEx, (ushort*)__lpLocaleName_native, Calendar, (ushort*)__lpReserved_native, CalType, lParam);
            }
 
            // Unmarshal - Convert native data to managed data.
            __retVal = __retVal_native != 0;
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("kernel32.dll", EntryPoint = "EnumCalendarInfoExEx", ExactSpelling = true)]
            static extern unsafe int __PInvoke(delegate* unmanaged<char*, uint, nint, void*, global::Interop.BOOL> __pCalInfoEnumProcExEx_native, ushort* __lpLocaleName_native, uint __Calendar_native, ushort* __lpReserved_native, uint __CalType_native, void* __lParam_native);
        }
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Kernel32
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        internal static unsafe partial bool GetNLSVersionEx(int function, string localeName, global::Interop.Kernel32.NlsVersionInfoEx* lpVersionInformation)
        {
            bool __retVal;
            int __retVal_native;
            // Pin - Pin data in preparation for calling the P/Invoke.
            fixed (void* __localeName_native = &global::System.Runtime.InteropServices.Marshalling.Utf16StringMarshaller.GetPinnableReference(localeName))
            {
                __retVal_native = __PInvoke(function, (ushort*)__localeName_native, lpVersionInformation);
            }
 
            // Unmarshal - Convert native data to managed data.
            __retVal = __retVal_native != 0;
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("kernel32.dll", EntryPoint = "GetNLSVersionEx", ExactSpelling = true)]
            static extern unsafe int __PInvoke(int __function_native, ushort* __localeName_native, global::Interop.Kernel32.NlsVersionInfoEx* __lpVersionInformation_native);
        }
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Kernel32
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        internal static partial int ResolveLocaleName(string lpNameToResolve, char* lpLocaleName, int cchLocaleName)
        {
            int __retVal;
            // Pin - Pin data in preparation for calling the P/Invoke.
            fixed (void* __lpNameToResolve_native = &global::System.Runtime.InteropServices.Marshalling.Utf16StringMarshaller.GetPinnableReference(lpNameToResolve))
            {
                __retVal = __PInvoke((ushort*)__lpNameToResolve_native, lpLocaleName, cchLocaleName);
            }
 
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("kernel32.dll", EntryPoint = "ResolveLocaleName", ExactSpelling = true)]
            static extern unsafe int __PInvoke(ushort* __lpNameToResolve_native, char* __lpLocaleName_native, int __cchLocaleName_native);
        }
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Normaliz
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        internal static unsafe partial int IdnToAscii(uint dwFlags, char* lpUnicodeCharStr, int cchUnicodeChar, char* lpASCIICharStr, int cchASCIIChar)
        {
            int __lastError;
            int __retVal;
            {
                global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
                __retVal = __PInvoke(dwFlags, lpUnicodeCharStr, cchUnicodeChar, lpASCIICharStr, cchASCIIChar);
                __lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
            }
 
            global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("Normaliz.dll", EntryPoint = "IdnToAscii", ExactSpelling = true)]
            static extern unsafe int __PInvoke(uint __dwFlags_native, char* __lpUnicodeCharStr_native, int __cchUnicodeChar_native, char* __lpASCIICharStr_native, int __cchASCIIChar_native);
        }
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Normaliz
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        internal static unsafe partial int IdnToUnicode(uint dwFlags, char* lpASCIICharStr, int cchASCIIChar, char* lpUnicodeCharStr, int cchUnicodeChar)
        {
            int __lastError;
            int __retVal;
            {
                global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
                __retVal = __PInvoke(dwFlags, lpASCIICharStr, cchASCIIChar, lpUnicodeCharStr, cchUnicodeChar);
                __lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
            }
 
            global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("Normaliz.dll", EntryPoint = "IdnToUnicode", ExactSpelling = true)]
            static extern unsafe int __PInvoke(uint __dwFlags_native, char* __lpASCIICharStr_native, int __cchASCIIChar_native, char* __lpUnicodeCharStr_native, int __cchUnicodeChar_native);
        }
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Normaliz
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        internal static unsafe partial global::Interop.BOOL IsNormalizedString(global::System.Text.NormalizationForm normForm, char* source, int length)
        {
            int __lastError;
            global::Interop.BOOL __retVal;
            {
                global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
                __retVal = __PInvoke(normForm, source, length);
                __lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
            }
 
            global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("Normaliz.dll", EntryPoint = "IsNormalizedString", ExactSpelling = true)]
            static extern unsafe global::Interop.BOOL __PInvoke(global::System.Text.NormalizationForm __normForm_native, char* __source_native, int __length_native);
        }
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Normaliz
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        internal static unsafe partial int NormalizeString(global::System.Text.NormalizationForm normForm, char* source, int sourceLength, char* destination, int destinationLength)
        {
            int __lastError;
            int __retVal;
            {
                global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
                __retVal = __PInvoke(normForm, source, sourceLength, destination, destinationLength);
                __lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
            }
 
            global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("Normaliz.dll", EntryPoint = "NormalizeString", ExactSpelling = true)]
            static extern unsafe int __PInvoke(global::System.Text.NormalizationForm __normForm_native, char* __source_native, int __sourceLength_native, char* __destination_native, int __destinationLength_native);
        }
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class HostPolicy
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        internal static partial int corehost_resolve_component_dependencies(string componentMainAssemblyPath, global::Interop.HostPolicy.corehost_resolve_component_dependencies_result_fn result)
        {
            byte* __componentMainAssemblyPath_native = default;
            nint __result_native = default;
            int __retVal = default;
            // Setup - Perform required setup.
            scoped global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.ManagedToUnmanagedIn __componentMainAssemblyPath_native__marshaller = new();
            try
            {
                // Marshal - Convert managed data to native data.
                __result_native = result != null ? global::System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(result) : default;
                __componentMainAssemblyPath_native__marshaller.FromManaged(componentMainAssemblyPath, stackalloc byte[global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.ManagedToUnmanagedIn.BufferSize]);
                {
                    // PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
                    __componentMainAssemblyPath_native = __componentMainAssemblyPath_native__marshaller.ToUnmanaged();
                    __retVal = __PInvoke(__componentMainAssemblyPath_native, __result_native);
                }
 
                // NotifyForSuccessfulInvoke - Keep alive any managed objects that need to stay alive across the call.
                global::System.GC.KeepAlive(result);
            }
            finally
            {
                // CleanupCallerAllocated - Perform cleanup of caller allocated resources.
                __componentMainAssemblyPath_native__marshaller.Free();
            }
 
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("libhostpolicy", EntryPoint = "corehost_resolve_component_dependencies", ExactSpelling = true)]
            [global::System.Runtime.InteropServices.UnmanagedCallConvAttribute(CallConvs = new global::System.Type[] { typeof(global::System.Runtime.CompilerServices.CallConvCdecl) })]
            static extern unsafe int __PInvoke(byte* __componentMainAssemblyPath_native, nint __result_native);
        }
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class HostPolicy
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("libhostpolicy", EntryPoint = "corehost_set_error_writer", ExactSpelling = true)]
        internal static extern partial nint corehost_set_error_writer(nint errorWriter);
    }
}
namespace System.Diagnostics.Tracing
{
    internal static unsafe partial class EventPipeInternal
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "EventPipeInternal_Enable", ExactSpelling = true)]
        private static unsafe extern partial ulong Enable(char* outputFile, global::System.Diagnostics.Tracing.EventPipeSerializationFormat format, uint circularBufferSizeInMB, global::System.Diagnostics.Tracing.EventPipeInternal.EventPipeProviderConfigurationNative* providers, uint numProviders);
    }
}
namespace System.Diagnostics.Tracing
{
    internal static unsafe partial class EventPipeInternal
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "EventPipeInternal_Disable", ExactSpelling = true)]
        internal static extern partial void Disable(ulong sessionID);
    }
}
namespace System.Diagnostics.Tracing
{
    internal static unsafe partial class EventPipeInternal
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        internal static unsafe partial nint CreateProvider(string providerName, delegate* unmanaged<byte*, int, byte, long, long, global::Interop.Advapi32.EVENT_FILTER_DESCRIPTOR*, void*, void> callbackFunc, void* callbackContext)
        {
            nint __retVal;
            // Pin - Pin data in preparation for calling the P/Invoke.
            fixed (void* __providerName_native = &global::System.Runtime.InteropServices.Marshalling.Utf16StringMarshaller.GetPinnableReference(providerName))
            {
                __retVal = __PInvoke((ushort*)__providerName_native, callbackFunc, callbackContext);
            }
 
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "EventPipeInternal_CreateProvider", ExactSpelling = true)]
            static extern unsafe nint __PInvoke(ushort* __providerName_native, delegate* unmanaged<byte*, int, byte, long, long, global::Interop.Advapi32.EVENT_FILTER_DESCRIPTOR*, void*, void> __callbackFunc_native, void* __callbackContext_native);
        }
    }
}
namespace System.Diagnostics.Tracing
{
    internal static unsafe partial class EventPipeInternal
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "EventPipeInternal_DefineEvent", ExactSpelling = true)]
        internal static unsafe extern partial nint DefineEvent(nint provHandle, uint eventID, long keywords, uint eventVersion, uint level, void* pMetadata, uint metadataLength);
    }
}
namespace System.Diagnostics.Tracing
{
    internal static unsafe partial class EventPipeInternal
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        internal static partial nint GetProvider(string providerName)
        {
            nint __retVal;
            // Pin - Pin data in preparation for calling the P/Invoke.
            fixed (void* __providerName_native = &global::System.Runtime.InteropServices.Marshalling.Utf16StringMarshaller.GetPinnableReference(providerName))
            {
                __retVal = __PInvoke((ushort*)__providerName_native);
            }
 
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "EventPipeInternal_GetProvider", ExactSpelling = true)]
            static extern unsafe nint __PInvoke(ushort* __providerName_native);
        }
    }
}
namespace System.Diagnostics.Tracing
{
    internal static unsafe partial class EventPipeInternal
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "EventPipeInternal_DeleteProvider", ExactSpelling = true)]
        internal static extern partial void DeleteProvider(nint provHandle);
    }
}
namespace System.Diagnostics.Tracing
{
    internal static unsafe partial class EventPipeInternal
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        internal static partial int EventActivityIdControl(uint controlCode, ref global::System.Guid activityId)
        {
            int __retVal;
            // Pin - Pin data in preparation for calling the P/Invoke.
            fixed (global::System.Guid* __activityId_native = &activityId)
            {
                __retVal = __PInvoke(controlCode, __activityId_native);
            }
 
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "EventPipeInternal_EventActivityIdControl", ExactSpelling = true)]
            static extern unsafe int __PInvoke(uint __controlCode_native, global::System.Guid* __activityId_native);
        }
    }
}
namespace System.Diagnostics.Tracing
{
    internal static unsafe partial class EventPipeInternal
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "EventPipeInternal_WriteEventData", ExactSpelling = true)]
        internal static unsafe extern partial void WriteEventData(nint eventHandle, global::System.Diagnostics.Tracing.EventProvider.EventData* pEventData, uint dataCount, global::System.Guid* activityId, global::System.Guid* relatedActivityId);
    }
}
namespace System.Diagnostics.Tracing
{
    internal static unsafe partial class EventPipeInternal
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        internal static unsafe partial bool GetSessionInfo(ulong sessionID, global::System.Diagnostics.Tracing.EventPipeSessionInfo* pSessionInfo)
        {
            bool __retVal;
            int __retVal_native;
            {
                __retVal_native = __PInvoke(sessionID, pSessionInfo);
            }
 
            // Unmarshal - Convert native data to managed data.
            __retVal = __retVal_native != 0;
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "EventPipeInternal_GetSessionInfo", ExactSpelling = true)]
            static extern unsafe int __PInvoke(ulong __sessionID_native, global::System.Diagnostics.Tracing.EventPipeSessionInfo* __pSessionInfo_native);
        }
    }
}
namespace System.Diagnostics.Tracing
{
    internal static unsafe partial class EventPipeInternal
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        internal static unsafe partial bool GetNextEvent(ulong sessionID, global::System.Diagnostics.Tracing.EventPipeEventInstanceData* pInstance)
        {
            bool __retVal;
            int __retVal_native;
            {
                __retVal_native = __PInvoke(sessionID, pInstance);
            }
 
            // Unmarshal - Convert native data to managed data.
            __retVal = __retVal_native != 0;
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "EventPipeInternal_GetNextEvent", ExactSpelling = true)]
            static extern unsafe int __PInvoke(ulong __sessionID_native, global::System.Diagnostics.Tracing.EventPipeEventInstanceData* __pInstance_native);
        }
    }
}
namespace System.Diagnostics.Tracing
{
    internal static unsafe partial class EventPipeInternal
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        internal static unsafe partial bool SignalSession(ulong sessionID)
        {
            bool __retVal;
            int __retVal_native;
            {
                __retVal_native = __PInvoke(sessionID);
            }
 
            // Unmarshal - Convert native data to managed data.
            __retVal = __retVal_native != 0;
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "EventPipeInternal_SignalSession", ExactSpelling = true)]
            static extern unsafe int __PInvoke(ulong __sessionID_native);
        }
    }
}
namespace System.Diagnostics.Tracing
{
    internal static unsafe partial class EventPipeInternal
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        internal static unsafe partial bool WaitForSessionSignal(ulong sessionID, int timeoutMs)
        {
            bool __retVal;
            int __retVal_native;
            {
                __retVal_native = __PInvoke(sessionID, timeoutMs);
            }
 
            // Unmarshal - Convert native data to managed data.
            __retVal = __retVal_native != 0;
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "EventPipeInternal_WaitForSessionSignal", ExactSpelling = true)]
            static extern unsafe int __PInvoke(ulong __sessionID_native, int __timeoutMs_native);
        }
    }
}
namespace System.Diagnostics.Tracing
{
    internal sealed unsafe partial class NativeRuntimeEventSource
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "NativeRuntimeEventSource_LogContentionLockCreated", ExactSpelling = true)]
        private static extern partial void LogContentionLockCreated(nint LockID, nint AssociatedObjectID, ushort ClrInstanceID);
    }
}
namespace System.Diagnostics.Tracing
{
    internal sealed unsafe partial class NativeRuntimeEventSource
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "NativeRuntimeEventSource_LogContentionStart", ExactSpelling = true)]
        private static extern partial void LogContentionStart(global::System.Diagnostics.Tracing.NativeRuntimeEventSource.ContentionFlagsMap ContentionFlags, ushort ClrInstanceID, nint LockID, nint AssociatedObjectID, ulong LockOwnerThreadID);
    }
}
namespace System.Diagnostics.Tracing
{
    internal sealed unsafe partial class NativeRuntimeEventSource
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "NativeRuntimeEventSource_LogContentionStop", ExactSpelling = true)]
        private static extern partial void LogContentionStop(global::System.Diagnostics.Tracing.NativeRuntimeEventSource.ContentionFlagsMap ContentionFlags, ushort ClrInstanceID, double DurationNs);
    }
}
namespace System.Diagnostics.Tracing
{
    internal sealed unsafe partial class NativeRuntimeEventSource
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "NativeRuntimeEventSource_LogThreadPoolWorkerThreadStart", ExactSpelling = true)]
        private static extern partial void LogThreadPoolWorkerThreadStart(uint ActiveWorkerThreadCount, uint RetiredWorkerThreadCount, ushort ClrInstanceID);
    }
}
namespace System.Diagnostics.Tracing
{
    internal sealed unsafe partial class NativeRuntimeEventSource
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "NativeRuntimeEventSource_LogThreadPoolWorkerThreadStop", ExactSpelling = true)]
        private static extern partial void LogThreadPoolWorkerThreadStop(uint ActiveWorkerThreadCount, uint RetiredWorkerThreadCount, ushort ClrInstanceID);
    }
}
namespace System.Diagnostics.Tracing
{
    internal sealed unsafe partial class NativeRuntimeEventSource
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "NativeRuntimeEventSource_LogThreadPoolWorkerThreadWait", ExactSpelling = true)]
        private static extern partial void LogThreadPoolWorkerThreadWait(uint ActiveWorkerThreadCount, uint RetiredWorkerThreadCount, ushort ClrInstanceID);
    }
}
namespace System.Diagnostics.Tracing
{
    internal sealed unsafe partial class NativeRuntimeEventSource
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "NativeRuntimeEventSource_LogThreadPoolMinMaxThreads", ExactSpelling = true)]
        private static extern partial void LogThreadPoolMinMaxThreads(ushort MinWorkerThreads, ushort MaxWorkerThreads, ushort MinIOCompletionThreads, ushort MaxIOCompletionThreads, ushort ClrInstanceID);
    }
}
namespace System.Diagnostics.Tracing
{
    internal sealed unsafe partial class NativeRuntimeEventSource
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "NativeRuntimeEventSource_LogThreadPoolWorkerThreadAdjustmentSample", ExactSpelling = true)]
        private static extern partial void LogThreadPoolWorkerThreadAdjustmentSample(double Throughput, ushort ClrInstanceID);
    }
}
namespace System.Diagnostics.Tracing
{
    internal sealed unsafe partial class NativeRuntimeEventSource
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "NativeRuntimeEventSource_LogThreadPoolWorkerThreadAdjustmentAdjustment", ExactSpelling = true)]
        private static extern partial void LogThreadPoolWorkerThreadAdjustmentAdjustment(double AverageThroughput, uint NewWorkerThreadCount, global::System.Diagnostics.Tracing.NativeRuntimeEventSource.ThreadAdjustmentReasonMap Reason, ushort ClrInstanceID);
    }
}
namespace System.Diagnostics.Tracing
{
    internal sealed unsafe partial class NativeRuntimeEventSource
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "NativeRuntimeEventSource_LogThreadPoolWorkerThreadAdjustmentStats", ExactSpelling = true)]
        private static extern partial void LogThreadPoolWorkerThreadAdjustmentStats(double Duration, double Throughput, double ThreadPoolWorkerThreadWait, double ThroughputWave, double ThroughputErrorEstimate, double AverageThroughputErrorEstimate, double ThroughputRatio, double Confidence, double NewControlSetting, ushort NewThreadWaveMagnitude, ushort ClrInstanceID);
    }
}
namespace System.Diagnostics.Tracing
{
    internal sealed unsafe partial class NativeRuntimeEventSource
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        private static partial void LogThreadPoolIOEnqueue(nint NativeOverlapped, nint Overlapped, bool MultiDequeues, ushort ClrInstanceID)
        {
            int __MultiDequeues_native;
            // Marshal - Convert managed data to native data.
            __MultiDequeues_native = (int)(MultiDequeues ? 1 : 0);
            {
                __PInvoke(NativeOverlapped, Overlapped, __MultiDequeues_native, ClrInstanceID);
            }
 
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "NativeRuntimeEventSource_LogThreadPoolIOEnqueue", ExactSpelling = true)]
            static extern unsafe void __PInvoke(nint __NativeOverlapped_native, nint __Overlapped_native, int __MultiDequeues_native, ushort __ClrInstanceID_native);
        }
    }
}
namespace System.Diagnostics.Tracing
{
    internal sealed unsafe partial class NativeRuntimeEventSource
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "NativeRuntimeEventSource_LogThreadPoolIODequeue", ExactSpelling = true)]
        private static extern partial void LogThreadPoolIODequeue(nint NativeOverlapped, nint Overlapped, ushort ClrInstanceID);
    }
}
namespace System.Diagnostics.Tracing
{
    internal sealed unsafe partial class NativeRuntimeEventSource
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "NativeRuntimeEventSource_LogThreadPoolWorkingThreadCount", ExactSpelling = true)]
        private static extern partial void LogThreadPoolWorkingThreadCount(uint Count, ushort ClrInstanceID);
    }
}
namespace System.Diagnostics.Tracing
{
    internal sealed unsafe partial class NativeRuntimeEventSource
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "NativeRuntimeEventSource_LogThreadPoolIOPack", ExactSpelling = true)]
        private static extern partial void LogThreadPoolIOPack(nint NativeOverlapped, nint Overlapped, ushort ClrInstanceID);
    }
}
namespace System.Diagnostics.Tracing
{
    internal sealed unsafe partial class NativeRuntimeEventSource
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "NativeRuntimeEventSource_LogWaitHandleWaitStart", ExactSpelling = true)]
        private static extern partial void LogWaitHandleWaitStart(global::System.Diagnostics.Tracing.NativeRuntimeEventSource.WaitHandleWaitSourceMap WaitSource, nint AssociatedObjectID, ushort ClrInstanceID);
    }
}
namespace System.Diagnostics.Tracing
{
    internal sealed unsafe partial class NativeRuntimeEventSource
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "NativeRuntimeEventSource_LogWaitHandleWaitStop", ExactSpelling = true)]
        private static extern partial void LogWaitHandleWaitStop(ushort ClrInstanceID);
    }
}
namespace System.Diagnostics.Tracing
{
    internal sealed unsafe partial class XplatEventLogger
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        private static unsafe partial char* EventSource_GetClrConfig(string configName)
        {
            char* __retVal;
            // Pin - Pin data in preparation for calling the P/Invoke.
            fixed (void* __configName_native = &global::System.Runtime.InteropServices.Marshalling.Utf16StringMarshaller.GetPinnableReference(configName))
            {
                __retVal = __PInvoke((ushort*)__configName_native);
            }
 
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "EventSource_GetClrConfig", ExactSpelling = true)]
            static extern unsafe char* __PInvoke(ushort* __configName_native);
        }
    }
}
namespace System.Diagnostics.Tracing
{
    internal sealed unsafe partial class XplatEventLogger
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        private static partial bool IsEventSourceLoggingEnabled()
        {
            bool __retVal;
            int __retVal_native;
            {
                __retVal_native = __PInvoke();
            }
 
            // Unmarshal - Convert native data to managed data.
            __retVal = __retVal_native != 0;
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "IsEventSourceLoggingEnabled", ExactSpelling = true)]
            static extern unsafe int __PInvoke();
        }
    }
}
namespace System.Diagnostics.Tracing
{
    internal sealed unsafe partial class XplatEventLogger
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        private static partial void LogEventSource(int eventID, string eventName, string eventSourceName, string payload)
        {
            // Pin - Pin data in preparation for calling the P/Invoke.
            fixed (void* __payload_native = &global::System.Runtime.InteropServices.Marshalling.Utf16StringMarshaller.GetPinnableReference(payload))
            fixed (void* __eventSourceName_native = &global::System.Runtime.InteropServices.Marshalling.Utf16StringMarshaller.GetPinnableReference(eventSourceName))
            fixed (void* __eventName_native = &global::System.Runtime.InteropServices.Marshalling.Utf16StringMarshaller.GetPinnableReference(eventName))
            {
                __PInvoke(eventID, (ushort*)__eventName_native, (ushort*)__eventSourceName_native, (ushort*)__payload_native);
            }
 
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "LogEventSource", ExactSpelling = true)]
            static extern unsafe void __PInvoke(int __eventID_native, ushort* __eventName_native, ushort* __eventSourceName_native, ushort* __payload_native);
        }
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Kernel32
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        internal static partial bool CloseHandle(nint handle)
        {
            int __lastError;
            bool __retVal;
            int __retVal_native;
            {
                global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
                __retVal_native = __PInvoke(handle);
                __lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
            }
 
            // Unmarshal - Convert native data to managed data.
            __retVal = __retVal_native != 0;
            global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "CloseHandle", ExactSpelling = true)]
            static extern unsafe int __PInvoke(nint __handle_native);
        }
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Kernel32
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        internal static partial bool SetEvent(global::Microsoft.Win32.SafeHandles.SafeWaitHandle handle)
        {
            int __lastError;
            nint __handle_native = default;
            bool __retVal = default;
            int __retVal_native = default;
            // Setup - Perform required setup.
            global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Microsoft.Win32.SafeHandles.SafeWaitHandle>.ManagedToUnmanagedIn __handle_native__marshaller = new();
            try
            {
                // Marshal - Convert managed data to native data.
                __handle_native__marshaller.FromManaged(handle);
                {
                    // PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
                    __handle_native = __handle_native__marshaller.ToUnmanaged();
                    global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
                    __retVal_native = __PInvoke(__handle_native);
                    __lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
                }
 
                // Unmarshal - Convert native data to managed data.
                __retVal = __retVal_native != 0;
            }
            finally
            {
                // CleanupCallerAllocated - Perform cleanup of caller allocated resources.
                __handle_native__marshaller.Free();
            }
 
            global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "SetEvent", ExactSpelling = true)]
            static extern unsafe int __PInvoke(nint __handle_native);
        }
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Kernel32
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        internal static partial bool ResetEvent(global::Microsoft.Win32.SafeHandles.SafeWaitHandle handle)
        {
            int __lastError;
            nint __handle_native = default;
            bool __retVal = default;
            int __retVal_native = default;
            // Setup - Perform required setup.
            global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Microsoft.Win32.SafeHandles.SafeWaitHandle>.ManagedToUnmanagedIn __handle_native__marshaller = new();
            try
            {
                // Marshal - Convert managed data to native data.
                __handle_native__marshaller.FromManaged(handle);
                {
                    // PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
                    __handle_native = __handle_native__marshaller.ToUnmanaged();
                    global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
                    __retVal_native = __PInvoke(__handle_native);
                    __lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
                }
 
                // Unmarshal - Convert native data to managed data.
                __retVal = __retVal_native != 0;
            }
            finally
            {
                // CleanupCallerAllocated - Perform cleanup of caller allocated resources.
                __handle_native__marshaller.Free();
            }
 
            global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "ResetEvent", ExactSpelling = true)]
            static extern unsafe int __PInvoke(nint __handle_native);
        }
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Kernel32
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        internal static partial global::Microsoft.Win32.SafeHandles.SafeWaitHandle CreateEventEx(nint lpSecurityAttributes, string name, uint flags, uint desiredAccess)
        {
            int __lastError;
            bool __invokeSucceeded = default;
            global::Microsoft.Win32.SafeHandles.SafeWaitHandle __retVal = default;
            nint __retVal_native = default;
            // Setup - Perform required setup.
            global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Microsoft.Win32.SafeHandles.SafeWaitHandle>.ManagedToUnmanagedOut __retVal_native__marshaller = new();
            try
            {
                // Pin - Pin data in preparation for calling the P/Invoke.
                fixed (void* __name_native = &global::System.Runtime.InteropServices.Marshalling.Utf16StringMarshaller.GetPinnableReference(name))
                {
                    global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
                    __retVal_native = __PInvoke(lpSecurityAttributes, (ushort*)__name_native, flags, desiredAccess);
                    __lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
                }
 
                __invokeSucceeded = true;
                // UnmarshalCapture - Capture the native data into marshaller instances in case conversion to managed data throws an exception.
                __retVal_native__marshaller.FromUnmanaged(__retVal_native);
                // Unmarshal - Convert native data to managed data.
                __retVal = __retVal_native__marshaller.ToManaged();
            }
            finally
            {
                if (__invokeSucceeded)
                {
                    // CleanupCalleeAllocated - Perform cleanup of callee allocated resources.
                    __retVal_native__marshaller.Free();
                }
            }
 
            global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "CreateEventExW", ExactSpelling = true)]
            static extern unsafe nint __PInvoke(nint __lpSecurityAttributes_native, ushort* __name_native, uint __flags_native, uint __desiredAccess_native);
        }
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Kernel32
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        internal static partial global::Microsoft.Win32.SafeHandles.SafeWaitHandle OpenEvent(uint desiredAccess, bool inheritHandle, string name)
        {
            int __lastError;
            bool __invokeSucceeded = default;
            int __inheritHandle_native = default;
            global::Microsoft.Win32.SafeHandles.SafeWaitHandle __retVal = default;
            nint __retVal_native = default;
            // Setup - Perform required setup.
            global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Microsoft.Win32.SafeHandles.SafeWaitHandle>.ManagedToUnmanagedOut __retVal_native__marshaller = new();
            try
            {
                // Marshal - Convert managed data to native data.
                __inheritHandle_native = (int)(inheritHandle ? 1 : 0);
                // Pin - Pin data in preparation for calling the P/Invoke.
                fixed (void* __name_native = &global::System.Runtime.InteropServices.Marshalling.Utf16StringMarshaller.GetPinnableReference(name))
                {
                    global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
                    __retVal_native = __PInvoke(desiredAccess, __inheritHandle_native, (ushort*)__name_native);
                    __lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
                }
 
                __invokeSucceeded = true;
                // UnmarshalCapture - Capture the native data into marshaller instances in case conversion to managed data throws an exception.
                __retVal_native__marshaller.FromUnmanaged(__retVal_native);
                // Unmarshal - Convert native data to managed data.
                __retVal = __retVal_native__marshaller.ToManaged();
            }
            finally
            {
                if (__invokeSucceeded)
                {
                    // CleanupCalleeAllocated - Perform cleanup of callee allocated resources.
                    __retVal_native__marshaller.Free();
                }
            }
 
            global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "OpenEventW", ExactSpelling = true)]
            static extern unsafe nint __PInvoke(uint __desiredAccess_native, int __inheritHandle_native, ushort* __name_native);
        }
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Kernel32
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        internal static partial uint GetEnvironmentVariable(string lpName, ref char lpBuffer, uint nSize)
        {
            int __lastError;
            uint __retVal;
            // Pin - Pin data in preparation for calling the P/Invoke.
            fixed (char* __lpBuffer_native = &lpBuffer)
            fixed (void* __lpName_native = &global::System.Runtime.InteropServices.Marshalling.Utf16StringMarshaller.GetPinnableReference(lpName))
            {
                global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
                __retVal = __PInvoke((ushort*)__lpName_native, __lpBuffer_native, nSize);
                __lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
            }
 
            global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "GetEnvironmentVariableW", ExactSpelling = true)]
            static extern unsafe uint __PInvoke(ushort* __lpName_native, char* __lpBuffer_native, uint __nSize_native);
        }
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Kernel32
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "GetEnvironmentStringsW", ExactSpelling = true)]
        internal static unsafe extern partial char* GetEnvironmentStringsW();
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Kernel32
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "FreeEnvironmentStringsW", ExactSpelling = true)]
        internal static unsafe extern partial global::Interop.BOOL FreeEnvironmentStringsW(char* lpszEnvironmentBlock);
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Kernel32
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        private static unsafe partial int FormatMessage(int dwFlags, nint lpSource, uint dwMessageId, int dwLanguageId, void* lpBuffer, int nSize, nint arguments)
        {
            int __lastError;
            int __retVal;
            {
                global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
                __retVal = __PInvoke(dwFlags, lpSource, dwMessageId, dwLanguageId, lpBuffer, nSize, arguments);
                __lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
            }
 
            global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "FormatMessageW", ExactSpelling = true)]
            static extern unsafe int __PInvoke(int __dwFlags_native, nint __lpSource_native, uint __dwMessageId_native, int __dwLanguageId_native, void* __lpBuffer_native, int __nSize_native, nint __arguments_native);
        }
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Kernel32
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        internal static partial global::Microsoft.Win32.SafeHandles.SafeWaitHandle OpenMutex(uint desiredAccess, bool inheritHandle, string name)
        {
            int __lastError;
            bool __invokeSucceeded = default;
            int __inheritHandle_native = default;
            global::Microsoft.Win32.SafeHandles.SafeWaitHandle __retVal = default;
            nint __retVal_native = default;
            // Setup - Perform required setup.
            global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Microsoft.Win32.SafeHandles.SafeWaitHandle>.ManagedToUnmanagedOut __retVal_native__marshaller = new();
            try
            {
                // Marshal - Convert managed data to native data.
                __inheritHandle_native = (int)(inheritHandle ? 1 : 0);
                // Pin - Pin data in preparation for calling the P/Invoke.
                fixed (void* __name_native = &global::System.Runtime.InteropServices.Marshalling.Utf16StringMarshaller.GetPinnableReference(name))
                {
                    global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
                    __retVal_native = __PInvoke(desiredAccess, __inheritHandle_native, (ushort*)__name_native);
                    __lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
                }
 
                __invokeSucceeded = true;
                // UnmarshalCapture - Capture the native data into marshaller instances in case conversion to managed data throws an exception.
                __retVal_native__marshaller.FromUnmanaged(__retVal_native);
                // Unmarshal - Convert native data to managed data.
                __retVal = __retVal_native__marshaller.ToManaged();
            }
            finally
            {
                if (__invokeSucceeded)
                {
                    // CleanupCalleeAllocated - Perform cleanup of callee allocated resources.
                    __retVal_native__marshaller.Free();
                }
            }
 
            global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "OpenMutexW", ExactSpelling = true)]
            static extern unsafe nint __PInvoke(uint __desiredAccess_native, int __inheritHandle_native, ushort* __name_native);
        }
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Kernel32
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        internal static partial global::Microsoft.Win32.SafeHandles.SafeWaitHandle CreateMutexEx(nint lpMutexAttributes, string name, uint flags, uint desiredAccess)
        {
            int __lastError;
            bool __invokeSucceeded = default;
            global::Microsoft.Win32.SafeHandles.SafeWaitHandle __retVal = default;
            nint __retVal_native = default;
            // Setup - Perform required setup.
            global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Microsoft.Win32.SafeHandles.SafeWaitHandle>.ManagedToUnmanagedOut __retVal_native__marshaller = new();
            try
            {
                // Pin - Pin data in preparation for calling the P/Invoke.
                fixed (void* __name_native = &global::System.Runtime.InteropServices.Marshalling.Utf16StringMarshaller.GetPinnableReference(name))
                {
                    global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
                    __retVal_native = __PInvoke(lpMutexAttributes, (ushort*)__name_native, flags, desiredAccess);
                    __lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
                }
 
                __invokeSucceeded = true;
                // UnmarshalCapture - Capture the native data into marshaller instances in case conversion to managed data throws an exception.
                __retVal_native__marshaller.FromUnmanaged(__retVal_native);
                // Unmarshal - Convert native data to managed data.
                __retVal = __retVal_native__marshaller.ToManaged();
            }
            finally
            {
                if (__invokeSucceeded)
                {
                    // CleanupCalleeAllocated - Perform cleanup of callee allocated resources.
                    __retVal_native__marshaller.Free();
                }
            }
 
            global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "CreateMutexExW", ExactSpelling = true)]
            static extern unsafe nint __PInvoke(nint __lpMutexAttributes_native, ushort* __name_native, uint __flags_native, uint __desiredAccess_native);
        }
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Kernel32
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        internal static partial bool ReleaseMutex(global::Microsoft.Win32.SafeHandles.SafeWaitHandle handle)
        {
            int __lastError;
            nint __handle_native = default;
            bool __retVal = default;
            int __retVal_native = default;
            // Setup - Perform required setup.
            global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Microsoft.Win32.SafeHandles.SafeWaitHandle>.ManagedToUnmanagedIn __handle_native__marshaller = new();
            try
            {
                // Marshal - Convert managed data to native data.
                __handle_native__marshaller.FromManaged(handle);
                {
                    // PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
                    __handle_native = __handle_native__marshaller.ToUnmanaged();
                    global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
                    __retVal_native = __PInvoke(__handle_native);
                    __lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
                }
 
                // Unmarshal - Convert native data to managed data.
                __retVal = __retVal_native != 0;
            }
            finally
            {
                // CleanupCallerAllocated - Perform cleanup of caller allocated resources.
                __handle_native__marshaller.Free();
            }
 
            global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "ReleaseMutex", ExactSpelling = true)]
            static extern unsafe int __PInvoke(nint __handle_native);
        }
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Kernel32
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        internal static partial global::Microsoft.Win32.SafeHandles.SafeWaitHandle OpenSemaphore(uint desiredAccess, bool inheritHandle, string name)
        {
            int __lastError;
            bool __invokeSucceeded = default;
            int __inheritHandle_native = default;
            global::Microsoft.Win32.SafeHandles.SafeWaitHandle __retVal = default;
            nint __retVal_native = default;
            // Setup - Perform required setup.
            global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Microsoft.Win32.SafeHandles.SafeWaitHandle>.ManagedToUnmanagedOut __retVal_native__marshaller = new();
            try
            {
                // Marshal - Convert managed data to native data.
                __inheritHandle_native = (int)(inheritHandle ? 1 : 0);
                // Pin - Pin data in preparation for calling the P/Invoke.
                fixed (void* __name_native = &global::System.Runtime.InteropServices.Marshalling.Utf16StringMarshaller.GetPinnableReference(name))
                {
                    global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
                    __retVal_native = __PInvoke(desiredAccess, __inheritHandle_native, (ushort*)__name_native);
                    __lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
                }
 
                __invokeSucceeded = true;
                // UnmarshalCapture - Capture the native data into marshaller instances in case conversion to managed data throws an exception.
                __retVal_native__marshaller.FromUnmanaged(__retVal_native);
                // Unmarshal - Convert native data to managed data.
                __retVal = __retVal_native__marshaller.ToManaged();
            }
            finally
            {
                if (__invokeSucceeded)
                {
                    // CleanupCalleeAllocated - Perform cleanup of callee allocated resources.
                    __retVal_native__marshaller.Free();
                }
            }
 
            global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "OpenSemaphoreW", ExactSpelling = true)]
            static extern unsafe nint __PInvoke(uint __desiredAccess_native, int __inheritHandle_native, ushort* __name_native);
        }
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Kernel32
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        internal static partial global::Microsoft.Win32.SafeHandles.SafeWaitHandle CreateSemaphoreEx(nint lpSecurityAttributes, int initialCount, int maximumCount, string name, uint flags, uint desiredAccess)
        {
            int __lastError;
            bool __invokeSucceeded = default;
            global::Microsoft.Win32.SafeHandles.SafeWaitHandle __retVal = default;
            nint __retVal_native = default;
            // Setup - Perform required setup.
            global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Microsoft.Win32.SafeHandles.SafeWaitHandle>.ManagedToUnmanagedOut __retVal_native__marshaller = new();
            try
            {
                // Pin - Pin data in preparation for calling the P/Invoke.
                fixed (void* __name_native = &global::System.Runtime.InteropServices.Marshalling.Utf16StringMarshaller.GetPinnableReference(name))
                {
                    global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
                    __retVal_native = __PInvoke(lpSecurityAttributes, initialCount, maximumCount, (ushort*)__name_native, flags, desiredAccess);
                    __lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
                }
 
                __invokeSucceeded = true;
                // UnmarshalCapture - Capture the native data into marshaller instances in case conversion to managed data throws an exception.
                __retVal_native__marshaller.FromUnmanaged(__retVal_native);
                // Unmarshal - Convert native data to managed data.
                __retVal = __retVal_native__marshaller.ToManaged();
            }
            finally
            {
                if (__invokeSucceeded)
                {
                    // CleanupCalleeAllocated - Perform cleanup of callee allocated resources.
                    __retVal_native__marshaller.Free();
                }
            }
 
            global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "CreateSemaphoreExW", ExactSpelling = true)]
            static extern unsafe nint __PInvoke(nint __lpSecurityAttributes_native, int __initialCount_native, int __maximumCount_native, ushort* __name_native, uint __flags_native, uint __desiredAccess_native);
        }
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Kernel32
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        internal static partial bool ReleaseSemaphore(global::Microsoft.Win32.SafeHandles.SafeWaitHandle handle, int releaseCount, out int previousCount)
        {
            int __lastError;
            previousCount = default;
            nint __handle_native = default;
            bool __retVal = default;
            int __retVal_native = default;
            // Setup - Perform required setup.
            global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Microsoft.Win32.SafeHandles.SafeWaitHandle>.ManagedToUnmanagedIn __handle_native__marshaller = new();
            try
            {
                // Marshal - Convert managed data to native data.
                __handle_native__marshaller.FromManaged(handle);
                // Pin - Pin data in preparation for calling the P/Invoke.
                fixed (int* __previousCount_native = &previousCount)
                {
                    // PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
                    __handle_native = __handle_native__marshaller.ToUnmanaged();
                    global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
                    __retVal_native = __PInvoke(__handle_native, releaseCount, __previousCount_native);
                    __lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
                }
 
                // Unmarshal - Convert native data to managed data.
                __retVal = __retVal_native != 0;
            }
            finally
            {
                // CleanupCallerAllocated - Perform cleanup of caller allocated resources.
                __handle_native__marshaller.Free();
            }
 
            global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "ReleaseSemaphore", ExactSpelling = true)]
            static extern unsafe int __PInvoke(nint __handle_native, int __releaseCount_native, int* __previousCount_native);
        }
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Kernel32
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        internal static partial bool SetEnvironmentVariable(string lpName, string lpValue)
        {
            int __lastError;
            bool __retVal;
            int __retVal_native;
            // Pin - Pin data in preparation for calling the P/Invoke.
            fixed (void* __lpValue_native = &global::System.Runtime.InteropServices.Marshalling.Utf16StringMarshaller.GetPinnableReference(lpValue))
            fixed (void* __lpName_native = &global::System.Runtime.InteropServices.Marshalling.Utf16StringMarshaller.GetPinnableReference(lpName))
            {
                global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
                __retVal_native = __PInvoke((ushort*)__lpName_native, (ushort*)__lpValue_native);
                __lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
            }
 
            // Unmarshal - Convert native data to managed data.
            __retVal = __retVal_native != 0;
            global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("QCall", EntryPoint = "SetEnvironmentVariableW", ExactSpelling = true)]
            static extern unsafe int __PInvoke(ushort* __lpName_native, ushort* __lpValue_native);
        }
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Sys
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_ConvertErrorPlatformToPal", ExactSpelling = true)]
        internal static extern partial global::Interop.Error ConvertErrorPlatformToPal(int platformErrno);
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Sys
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_ConvertErrorPalToPlatform", ExactSpelling = true)]
        internal static extern partial int ConvertErrorPalToPlatform(global::Interop.Error error);
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Sys
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_StrErrorR", ExactSpelling = true)]
        private static unsafe extern partial byte* StrErrorR(int platformErrno, byte* buffer, int bufferSize);
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Sys
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        internal static partial int Access(string path, global::Interop.Sys.AccessMode mode)
        {
            int __lastError;
            byte* __path_native = default;
            int __retVal = default;
            // Setup - Perform required setup.
            scoped global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.ManagedToUnmanagedIn __path_native__marshaller = new();
            try
            {
                // Marshal - Convert managed data to native data.
                __path_native__marshaller.FromManaged(path, stackalloc byte[global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.ManagedToUnmanagedIn.BufferSize]);
                {
                    // PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
                    __path_native = __path_native__marshaller.ToUnmanaged();
                    global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
                    __retVal = __PInvoke(__path_native, mode);
                    __lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
                }
            }
            finally
            {
                // CleanupCallerAllocated - Perform cleanup of caller allocated resources.
                __path_native__marshaller.Free();
            }
 
            global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_Access", ExactSpelling = true)]
            static extern unsafe int __PInvoke(byte* __path_native, global::Interop.Sys.AccessMode __mode_native);
        }
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Sys
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        internal static partial int ChDir(string path)
        {
            int __lastError;
            byte* __path_native = default;
            int __retVal = default;
            // Setup - Perform required setup.
            scoped global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.ManagedToUnmanagedIn __path_native__marshaller = new();
            try
            {
                // Marshal - Convert managed data to native data.
                __path_native__marshaller.FromManaged(path, stackalloc byte[global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.ManagedToUnmanagedIn.BufferSize]);
                {
                    // PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
                    __path_native = __path_native__marshaller.ToUnmanaged();
                    global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
                    __retVal = __PInvoke(__path_native);
                    __lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
                }
            }
            finally
            {
                // CleanupCallerAllocated - Perform cleanup of caller allocated resources.
                __path_native__marshaller.Free();
            }
 
            global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_ChDir", ExactSpelling = true)]
            static extern unsafe int __PInvoke(byte* __path_native);
        }
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Sys
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        internal static partial int ChMod(string path, int mode)
        {
            int __lastError;
            byte* __path_native = default;
            int __retVal = default;
            // Setup - Perform required setup.
            scoped global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.ManagedToUnmanagedIn __path_native__marshaller = new();
            try
            {
                // Marshal - Convert managed data to native data.
                __path_native__marshaller.FromManaged(path, stackalloc byte[global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.ManagedToUnmanagedIn.BufferSize]);
                {
                    // PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
                    __path_native = __path_native__marshaller.ToUnmanaged();
                    global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
                    __retVal = __PInvoke(__path_native, mode);
                    __lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
                }
            }
            finally
            {
                // CleanupCallerAllocated - Perform cleanup of caller allocated resources.
                __path_native__marshaller.Free();
            }
 
            global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_ChMod", ExactSpelling = true)]
            static extern unsafe int __PInvoke(byte* __path_native, int __mode_native);
        }
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Sys
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        internal static partial int FChMod(global::Microsoft.Win32.SafeHandles.SafeFileHandle fd, int mode)
        {
            int __lastError;
            nint __fd_native = default;
            int __retVal = default;
            // Setup - Perform required setup.
            global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Microsoft.Win32.SafeHandles.SafeFileHandle>.ManagedToUnmanagedIn __fd_native__marshaller = new();
            try
            {
                // Marshal - Convert managed data to native data.
                __fd_native__marshaller.FromManaged(fd);
                {
                    // PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
                    __fd_native = __fd_native__marshaller.ToUnmanaged();
                    global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
                    __retVal = __PInvoke(__fd_native, mode);
                    __lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
                }
            }
            finally
            {
                // CleanupCallerAllocated - Perform cleanup of caller allocated resources.
                __fd_native__marshaller.Free();
            }
 
            global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_FChMod", ExactSpelling = true)]
            static extern unsafe int __PInvoke(nint __fd_native, int __mode_native);
        }
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Sys
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        internal static partial int Close(nint fd)
        {
            int __lastError;
            int __retVal;
            {
                global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
                __retVal = __PInvoke(fd);
                __lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
            }
 
            global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_Close", ExactSpelling = true)]
            static extern unsafe int __PInvoke(nint __fd_native);
        }
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Sys
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        internal static partial int CopyFile(global::Microsoft.Win32.SafeHandles.SafeFileHandle source, global::Microsoft.Win32.SafeHandles.SafeFileHandle destination, long sourceLength)
        {
            int __lastError;
            nint __source_native = default;
            nint __destination_native = default;
            int __retVal = default;
            // Setup - Perform required setup.
            global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Microsoft.Win32.SafeHandles.SafeFileHandle>.ManagedToUnmanagedIn __destination_native__marshaller = new();
            global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Microsoft.Win32.SafeHandles.SafeFileHandle>.ManagedToUnmanagedIn __source_native__marshaller = new();
            try
            {
                // Marshal - Convert managed data to native data.
                __destination_native__marshaller.FromManaged(destination);
                __source_native__marshaller.FromManaged(source);
                {
                    // PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
                    __destination_native = __destination_native__marshaller.ToUnmanaged();
                    __source_native = __source_native__marshaller.ToUnmanaged();
                    global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
                    __retVal = __PInvoke(__source_native, __destination_native, sourceLength);
                    __lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
                }
            }
            finally
            {
                // CleanupCallerAllocated - Perform cleanup of caller allocated resources.
                __destination_native__marshaller.Free();
                __source_native__marshaller.Free();
            }
 
            global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_CopyFile", ExactSpelling = true)]
            static extern unsafe int __PInvoke(nint __source_native, nint __destination_native, long __sourceLength_native);
        }
    }
}
internal static unsafe partial class Interop
{
    internal unsafe partial class Sys
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        internal static partial nint LoadLibrary(string filename)
        {
            byte* __filename_native = default;
            nint __retVal = default;
            // Setup - Perform required setup.
            scoped global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.ManagedToUnmanagedIn __filename_native__marshaller = new();
            try
            {
                // Marshal - Convert managed data to native data.
                __filename_native__marshaller.FromManaged(filename, stackalloc byte[global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.ManagedToUnmanagedIn.BufferSize]);
                {
                    // PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
                    __filename_native = __filename_native__marshaller.ToUnmanaged();
                    __retVal = __PInvoke(__filename_native);
                }
            }
            finally
            {
                // CleanupCallerAllocated - Perform cleanup of caller allocated resources.
                __filename_native__marshaller.Free();
            }
 
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_LoadLibrary", ExactSpelling = true)]
            static extern unsafe nint __PInvoke(byte* __filename_native);
        }
    }
}
internal static unsafe partial class Interop
{
    internal unsafe partial class Sys
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_GetLoadLibraryError", ExactSpelling = true)]
        internal static extern partial nint GetLoadLibraryError();
    }
}
internal static unsafe partial class Interop
{
    internal unsafe partial class Sys
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_GetProcAddress", ExactSpelling = true)]
        internal static extern partial nint GetProcAddress(nint handle, byte* symbol);
    }
}
internal static unsafe partial class Interop
{
    internal unsafe partial class Sys
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        internal static partial nint GetProcAddress(nint handle, string symbol)
        {
            byte* __symbol_native = default;
            nint __retVal = default;
            // Setup - Perform required setup.
            scoped global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.ManagedToUnmanagedIn __symbol_native__marshaller = new();
            try
            {
                // Marshal - Convert managed data to native data.
                __symbol_native__marshaller.FromManaged(symbol, stackalloc byte[global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.ManagedToUnmanagedIn.BufferSize]);
                {
                    // PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
                    __symbol_native = __symbol_native__marshaller.ToUnmanaged();
                    __retVal = __PInvoke(handle, __symbol_native);
                }
            }
            finally
            {
                // CleanupCallerAllocated - Perform cleanup of caller allocated resources.
                __symbol_native__marshaller.Free();
            }
 
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_GetProcAddress", ExactSpelling = true)]
            static extern unsafe nint __PInvoke(nint __handle_native, byte* __symbol_native);
        }
    }
}
internal static unsafe partial class Interop
{
    internal unsafe partial class Sys
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_FreeLibrary", ExactSpelling = true)]
        internal static extern partial void FreeLibrary(nint handle);
    }
}
internal static unsafe partial class Interop
{
    internal unsafe partial class Sys
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        internal static partial nint GetDefaultSearchOrderPseudoHandle()
        {
            int __lastError;
            nint __retVal;
            {
                global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
                __retVal = __PInvoke();
                __lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
            }
 
            global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_GetDefaultSearchOrderPseudoHandle", ExactSpelling = true)]
            static extern unsafe nint __PInvoke();
        }
    }
}
internal static unsafe partial class Interop
{
    internal unsafe partial class Sys
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_GetErrNo", ExactSpelling = true)]
        internal static extern partial int GetErrNo();
    }
}
internal static unsafe partial class Interop
{
    internal unsafe partial class Sys
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_SetErrNo", ExactSpelling = true)]
        internal static extern partial void SetErrNo(int errorCode);
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Sys
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        private static partial uint GetFileSystemType(global::Microsoft.Win32.SafeHandles.SafeFileHandle fd)
        {
            nint __fd_native = default;
            uint __retVal = default;
            // Setup - Perform required setup.
            global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Microsoft.Win32.SafeHandles.SafeFileHandle>.ManagedToUnmanagedIn __fd_native__marshaller = new();
            try
            {
                // Marshal - Convert managed data to native data.
                __fd_native__marshaller.FromManaged(fd);
                {
                    // PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
                    __fd_native = __fd_native__marshaller.ToUnmanaged();
                    __retVal = __PInvoke(__fd_native);
                }
            }
            finally
            {
                // CleanupCallerAllocated - Perform cleanup of caller allocated resources.
                __fd_native__marshaller.Free();
            }
 
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_GetFileSystemType", ExactSpelling = true)]
            static extern unsafe uint __PInvoke(nint __fd_native);
        }
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Sys
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        internal static partial int FLock(global::Microsoft.Win32.SafeHandles.SafeFileHandle fd, global::Interop.Sys.LockOperations operation)
        {
            int __lastError;
            nint __fd_native = default;
            int __retVal = default;
            // Setup - Perform required setup.
            global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Microsoft.Win32.SafeHandles.SafeFileHandle>.ManagedToUnmanagedIn __fd_native__marshaller = new();
            try
            {
                // Marshal - Convert managed data to native data.
                __fd_native__marshaller.FromManaged(fd);
                {
                    // PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
                    __fd_native = __fd_native__marshaller.ToUnmanaged();
                    global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
                    __retVal = __PInvoke(__fd_native, operation);
                    __lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
                }
            }
            finally
            {
                // CleanupCallerAllocated - Perform cleanup of caller allocated resources.
                __fd_native__marshaller.Free();
            }
 
            global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_FLock", ExactSpelling = true)]
            static extern unsafe int __PInvoke(nint __fd_native, global::Interop.Sys.LockOperations __operation_native);
        }
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Sys
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        internal static partial int FLock(nint fd, global::Interop.Sys.LockOperations operation)
        {
            int __lastError;
            int __retVal;
            {
                global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
                __retVal = __PInvoke(fd, operation);
                __lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
            }
 
            global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_FLock", ExactSpelling = true)]
            static extern unsafe int __PInvoke(nint __fd_native, global::Interop.Sys.LockOperations __operation_native);
        }
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Sys
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        internal static partial int FSync(global::Microsoft.Win32.SafeHandles.SafeFileHandle fd)
        {
            int __lastError;
            nint __fd_native = default;
            int __retVal = default;
            // Setup - Perform required setup.
            global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Microsoft.Win32.SafeHandles.SafeFileHandle>.ManagedToUnmanagedIn __fd_native__marshaller = new();
            try
            {
                // Marshal - Convert managed data to native data.
                __fd_native__marshaller.FromManaged(fd);
                {
                    // PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
                    __fd_native = __fd_native__marshaller.ToUnmanaged();
                    global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
                    __retVal = __PInvoke(__fd_native);
                    __lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
                }
            }
            finally
            {
                // CleanupCallerAllocated - Perform cleanup of caller allocated resources.
                __fd_native__marshaller.Free();
            }
 
            global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_FSync", ExactSpelling = true)]
            static extern unsafe int __PInvoke(nint __fd_native);
        }
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Sys
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        internal static partial int FTruncate(global::Microsoft.Win32.SafeHandles.SafeFileHandle fd, long length)
        {
            int __lastError;
            nint __fd_native = default;
            int __retVal = default;
            // Setup - Perform required setup.
            global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Microsoft.Win32.SafeHandles.SafeFileHandle>.ManagedToUnmanagedIn __fd_native__marshaller = new();
            try
            {
                // Marshal - Convert managed data to native data.
                __fd_native__marshaller.FromManaged(fd);
                {
                    // PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
                    __fd_native = __fd_native__marshaller.ToUnmanaged();
                    global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
                    __retVal = __PInvoke(__fd_native, length);
                    __lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
                }
            }
            finally
            {
                // CleanupCallerAllocated - Perform cleanup of caller allocated resources.
                __fd_native__marshaller.Free();
            }
 
            global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_FTruncate", ExactSpelling = true)]
            static extern unsafe int __PInvoke(nint __fd_native, long __length_native);
        }
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Sys
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        internal static partial double GetCpuUtilization(ref global::Interop.Sys.ProcessCpuInformation previousCpuInfo)
        {
            double __retVal;
            // Pin - Pin data in preparation for calling the P/Invoke.
            fixed (global::Interop.Sys.ProcessCpuInformation* __previousCpuInfo_native = &previousCpuInfo)
            {
                __retVal = __PInvoke(__previousCpuInfo_native);
            }
 
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_GetCpuUtilization", ExactSpelling = true)]
            static extern unsafe double __PInvoke(global::Interop.Sys.ProcessCpuInformation* __previousCpuInfo_native);
        }
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Sys
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        private static unsafe partial byte* GetCwd(byte* buffer, int bufferLength)
        {
            int __lastError;
            byte* __retVal;
            {
                global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
                __retVal = __PInvoke(buffer, bufferLength);
                __lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
            }
 
            global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_GetCwd", ExactSpelling = true)]
            static extern unsafe byte* __PInvoke(byte* __buffer_native, int __bufferLength_native);
        }
    }
}
internal static unsafe partial class Interop
{
    internal unsafe partial class Sys
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        internal static unsafe partial byte* GetEnv(string name)
        {
            byte* __name_native = default;
            byte* __retVal = default;
            // Setup - Perform required setup.
            scoped global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.ManagedToUnmanagedIn __name_native__marshaller = new();
            try
            {
                // Marshal - Convert managed data to native data.
                __name_native__marshaller.FromManaged(name, stackalloc byte[global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.ManagedToUnmanagedIn.BufferSize]);
                {
                    // PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
                    __name_native = __name_native__marshaller.ToUnmanaged();
                    __retVal = __PInvoke(__name_native);
                }
            }
            finally
            {
                // CleanupCallerAllocated - Perform cleanup of caller allocated resources.
                __name_native__marshaller.Free();
            }
 
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_GetEnv", ExactSpelling = true)]
            static extern unsafe byte* __PInvoke(byte* __name_native);
        }
    }
}
internal static unsafe partial class Interop
{
    internal unsafe partial class Sys
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_GetEnviron", ExactSpelling = true)]
        internal static unsafe extern partial byte** GetEnviron();
    }
}
internal static unsafe partial class Interop
{
    internal unsafe partial class Sys
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_FreeEnviron", ExactSpelling = true)]
        internal static unsafe extern partial void FreeEnviron(byte** environ);
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Sys
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        private static unsafe partial int GetHostName(byte* name, int nameLength)
        {
            int __lastError;
            int __retVal;
            {
                global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
                __retVal = __PInvoke(name, nameLength);
                __lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
            }
 
            global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_GetHostName", ExactSpelling = true)]
            static extern unsafe int __PInvoke(byte* __name_native, int __nameLength_native);
        }
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Sys
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_GetOSArchitecture", ExactSpelling = true)]
        internal static extern partial int GetOSArchitecture();
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Sys
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        internal static partial string GetProcessPath()
        {
            int __lastError;
            bool __invokeSucceeded = default;
            string __retVal = default;
            byte* __retVal_native = default;
            try
            {
                {
                    global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
                    __retVal_native = __PInvoke();
                    __lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
                }
 
                __invokeSucceeded = true;
                // Unmarshal - Convert native data to managed data.
                __retVal = global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.ConvertToManaged(__retVal_native);
            }
            finally
            {
                if (__invokeSucceeded)
                {
                    // CleanupCalleeAllocated - Perform cleanup of callee allocated resources.
                    global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.Free(__retVal_native);
                }
            }
 
            global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_GetProcessPath", ExactSpelling = true)]
            static extern unsafe byte* __PInvoke();
        }
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Sys
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_GetNonCryptographicallySecureRandomBytes", ExactSpelling = true)]
        internal static unsafe extern partial void GetNonCryptographicallySecureRandomBytes(byte* buffer, int length);
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Sys
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_GetCryptographicallySecureRandomBytes", ExactSpelling = true)]
        internal static unsafe extern partial int GetCryptographicallySecureRandomBytes(byte* buffer, int length);
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Sys
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_GetSystemTimeAsTicks", ExactSpelling = true)]
        internal static extern partial long GetSystemTimeAsTicks();
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Sys
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_GetLowResolutionTimestamp", ExactSpelling = true)]
        internal static extern partial long GetLowResolutionTimestamp();
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Sys
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_GetTimestamp", ExactSpelling = true)]
        internal static extern partial long GetTimestamp();
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Sys
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        private static partial int GetUnixVersion(byte[] version, ref int capacity)
        {
            int __lastError;
            int __retVal;
            // Pin - Pin data in preparation for calling the P/Invoke.
            fixed (int* __capacity_native = &capacity)
            fixed (void* __version_native = &global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<byte, byte>.ManagedToUnmanagedIn.GetPinnableReference(version))
            {
                global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
                __retVal = __PInvoke((byte*)__version_native, __capacity_native);
                __lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
            }
 
            global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_GetUnixVersion", ExactSpelling = true)]
            static extern unsafe int __PInvoke(byte* __version_native, int* __capacity_native);
        }
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Sys
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        public static partial string GetUnixRelease()
        {
            int __lastError;
            bool __invokeSucceeded = default;
            string __retVal = default;
            byte* __retVal_native = default;
            try
            {
                {
                    global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
                    __retVal_native = __PInvoke();
                    __lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
                }
 
                __invokeSucceeded = true;
                // Unmarshal - Convert native data to managed data.
                __retVal = global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.ConvertToManaged(__retVal_native);
            }
            finally
            {
                if (__invokeSucceeded)
                {
                    // CleanupCalleeAllocated - Perform cleanup of callee allocated resources.
                    global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.Free(__retVal_native);
                }
            }
 
            global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_GetUnixRelease", ExactSpelling = true)]
            static extern unsafe byte* __PInvoke();
        }
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Sys
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        internal static partial int LChflags(string path, uint flags)
        {
            int __lastError;
            byte* __path_native = default;
            int __retVal = default;
            // Setup - Perform required setup.
            scoped global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.ManagedToUnmanagedIn __path_native__marshaller = new();
            try
            {
                // Marshal - Convert managed data to native data.
                __path_native__marshaller.FromManaged(path, stackalloc byte[global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.ManagedToUnmanagedIn.BufferSize]);
                {
                    // PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
                    __path_native = __path_native__marshaller.ToUnmanaged();
                    global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
                    __retVal = __PInvoke(__path_native, flags);
                    __lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
                }
            }
            finally
            {
                // CleanupCallerAllocated - Perform cleanup of caller allocated resources.
                __path_native__marshaller.Free();
            }
 
            global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_LChflags", ExactSpelling = true)]
            static extern unsafe int __PInvoke(byte* __path_native, uint __flags_native);
        }
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Sys
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        internal static partial int FChflags(global::System.Runtime.InteropServices.SafeHandle fd, uint flags)
        {
            int __lastError;
            nint __fd_native = default;
            int __retVal = default;
            // Setup - Perform required setup.
            global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Runtime.InteropServices.SafeHandle>.ManagedToUnmanagedIn __fd_native__marshaller = new();
            try
            {
                // Marshal - Convert managed data to native data.
                __fd_native__marshaller.FromManaged(fd);
                {
                    // PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
                    __fd_native = __fd_native__marshaller.ToUnmanaged();
                    global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
                    __retVal = __PInvoke(__fd_native, flags);
                    __lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
                }
            }
            finally
            {
                // CleanupCallerAllocated - Perform cleanup of caller allocated resources.
                __fd_native__marshaller.Free();
            }
 
            global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_FChflags", ExactSpelling = true)]
            static extern unsafe int __PInvoke(nint __fd_native, uint __flags_native);
        }
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Sys
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_LChflagsCanSetHiddenFlag", ExactSpelling = true)]
        private static extern partial int LChflagsCanSetHiddenFlag();
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Sys
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_CanGetHiddenFlag", ExactSpelling = true)]
        private static extern partial int CanGetHiddenFlag();
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Sys
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        internal static partial int Link(string source, string link)
        {
            int __lastError;
            byte* __source_native = default;
            byte* __link_native = default;
            int __retVal = default;
            // Setup - Perform required setup.
            scoped global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.ManagedToUnmanagedIn __link_native__marshaller = new();
            scoped global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.ManagedToUnmanagedIn __source_native__marshaller = new();
            try
            {
                // Marshal - Convert managed data to native data.
                __link_native__marshaller.FromManaged(link, stackalloc byte[global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.ManagedToUnmanagedIn.BufferSize]);
                __source_native__marshaller.FromManaged(source, stackalloc byte[global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.ManagedToUnmanagedIn.BufferSize]);
                {
                    // PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
                    __link_native = __link_native__marshaller.ToUnmanaged();
                    __source_native = __source_native__marshaller.ToUnmanaged();
                    global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
                    __retVal = __PInvoke(__source_native, __link_native);
                    __lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
                }
            }
            finally
            {
                // CleanupCallerAllocated - Perform cleanup of caller allocated resources.
                __link_native__marshaller.Free();
                __source_native__marshaller.Free();
            }
 
            global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_Link", ExactSpelling = true)]
            static extern unsafe int __PInvoke(byte* __source_native, byte* __link_native);
        }
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Sys
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        internal static partial int LockFileRegion(global::System.Runtime.InteropServices.SafeHandle fd, long offset, long length, global::Interop.Sys.LockType lockType)
        {
            int __lastError;
            nint __fd_native = default;
            int __retVal = default;
            // Setup - Perform required setup.
            global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Runtime.InteropServices.SafeHandle>.ManagedToUnmanagedIn __fd_native__marshaller = new();
            try
            {
                // Marshal - Convert managed data to native data.
                __fd_native__marshaller.FromManaged(fd);
                {
                    // PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
                    __fd_native = __fd_native__marshaller.ToUnmanaged();
                    global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
                    __retVal = __PInvoke(__fd_native, offset, length, lockType);
                    __lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
                }
            }
            finally
            {
                // CleanupCallerAllocated - Perform cleanup of caller allocated resources.
                __fd_native__marshaller.Free();
            }
 
            global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_LockFileRegion", ExactSpelling = true)]
            static extern unsafe int __PInvoke(nint __fd_native, long __offset_native, long __length_native, global::Interop.Sys.LockType __lockType_native);
        }
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Sys
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_Log", ExactSpelling = true)]
        internal static unsafe extern partial void Log(byte* buffer, int count);
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Sys
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_LogError", ExactSpelling = true)]
        internal static unsafe extern partial void LogError(byte* buffer, int count);
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Sys
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_LowLevelMonitor_Create", ExactSpelling = true)]
        internal static extern partial nint LowLevelMonitor_Create();
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Sys
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_LowLevelMonitor_Destroy", ExactSpelling = true)]
        internal static extern partial void LowLevelMonitor_Destroy(nint monitor);
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Sys
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_LowLevelMonitor_Acquire", ExactSpelling = true)]
        internal static extern partial void LowLevelMonitor_Acquire(nint monitor);
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Sys
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_LowLevelMonitor_Release", ExactSpelling = true)]
        internal static extern partial void LowLevelMonitor_Release(nint monitor);
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Sys
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_LowLevelMonitor_Wait", ExactSpelling = true)]
        internal static extern partial void LowLevelMonitor_Wait(nint monitor);
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Sys
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        internal static partial bool LowLevelMonitor_TimedWait(nint monitor, int timeoutMilliseconds)
        {
            bool __retVal;
            int __retVal_native;
            {
                __retVal_native = __PInvoke(monitor, timeoutMilliseconds);
            }
 
            // Unmarshal - Convert native data to managed data.
            __retVal = __retVal_native != 0;
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_LowLevelMonitor_TimedWait", ExactSpelling = true)]
            static extern unsafe int __PInvoke(nint __monitor_native, int __timeoutMilliseconds_native);
        }
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Sys
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_LowLevelMonitor_Signal_Release", ExactSpelling = true)]
        internal static extern partial void LowLevelMonitor_Signal_Release(nint monitor);
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Sys
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        internal static partial long LSeek(global::Microsoft.Win32.SafeHandles.SafeFileHandle fd, long offset, global::Interop.Sys.SeekWhence whence)
        {
            int __lastError;
            nint __fd_native = default;
            long __retVal = default;
            // Setup - Perform required setup.
            global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Microsoft.Win32.SafeHandles.SafeFileHandle>.ManagedToUnmanagedIn __fd_native__marshaller = new();
            try
            {
                // Marshal - Convert managed data to native data.
                __fd_native__marshaller.FromManaged(fd);
                {
                    // PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
                    __fd_native = __fd_native__marshaller.ToUnmanaged();
                    global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
                    __retVal = __PInvoke(__fd_native, offset, whence);
                    __lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
                }
            }
            finally
            {
                // CleanupCallerAllocated - Perform cleanup of caller allocated resources.
                __fd_native__marshaller.Free();
            }
 
            global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_LSeek", ExactSpelling = true)]
            static extern unsafe long __PInvoke(nint __fd_native, long __offset_native, global::Interop.Sys.SeekWhence __whence_native);
        }
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Sys
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_AlignedAlloc", ExactSpelling = true)]
        internal static extern partial void* AlignedAlloc(nuint alignment, nuint size);
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Sys
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_AlignedFree", ExactSpelling = true)]
        internal static extern partial void AlignedFree(void* ptr);
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Sys
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_AlignedRealloc", ExactSpelling = true)]
        internal static extern partial void* AlignedRealloc(void* ptr, nuint alignment, nuint new_size);
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Sys
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_Calloc", ExactSpelling = true)]
        internal static extern partial void* Calloc(nuint num, nuint size);
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Sys
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_Free", ExactSpelling = true)]
        internal static extern partial void Free(void* ptr);
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Sys
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_Malloc", ExactSpelling = true)]
        internal static extern partial void* Malloc(nuint size);
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Sys
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_Realloc", ExactSpelling = true)]
        internal static extern partial void* Realloc(void* ptr, nuint new_size);
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Sys
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        private static partial int MkDir(ref byte path, int mode)
        {
            int __lastError;
            int __retVal;
            // Pin - Pin data in preparation for calling the P/Invoke.
            fixed (byte* __path_native = &path)
            {
                global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
                __retVal = __PInvoke(__path_native, mode);
                __lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
            }
 
            global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_MkDir", ExactSpelling = true)]
            static extern unsafe int __PInvoke(byte* __path_native, int __mode_native);
        }
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Sys
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        internal static unsafe partial byte* MkdTemp(byte* template)
        {
            int __lastError;
            byte* __retVal;
            {
                global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
                __retVal = __PInvoke(template);
                __lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
            }
 
            global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_MkdTemp", ExactSpelling = true)]
            static extern unsafe byte* __PInvoke(byte* __template_native);
        }
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Sys
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        internal static unsafe partial nint MksTemps(byte* template, int suffixlen)
        {
            int __lastError;
            nint __retVal;
            {
                global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
                __retVal = __PInvoke(template, suffixlen);
                __lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
            }
 
            global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_MksTemps", ExactSpelling = true)]
            static extern unsafe nint __PInvoke(byte* __template_native, int __suffixlen_native);
        }
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Sys
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        internal static partial nint MMap(nint addr, ulong len, global::Interop.Sys.MemoryMappedProtections prot, global::Interop.Sys.MemoryMappedFlags flags, global::Microsoft.Win32.SafeHandles.SafeFileHandle fd, long offset)
        {
            int __lastError;
            nint __fd_native = default;
            nint __retVal = default;
            // Setup - Perform required setup.
            global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Microsoft.Win32.SafeHandles.SafeFileHandle>.ManagedToUnmanagedIn __fd_native__marshaller = new();
            try
            {
                // Marshal - Convert managed data to native data.
                __fd_native__marshaller.FromManaged(fd);
                {
                    // PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
                    __fd_native = __fd_native__marshaller.ToUnmanaged();
                    global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
                    __retVal = __PInvoke(addr, len, prot, flags, __fd_native, offset);
                    __lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
                }
            }
            finally
            {
                // CleanupCallerAllocated - Perform cleanup of caller allocated resources.
                __fd_native__marshaller.Free();
            }
 
            global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_MMap", ExactSpelling = true)]
            static extern unsafe nint __PInvoke(nint __addr_native, ulong __len_native, global::Interop.Sys.MemoryMappedProtections __prot_native, global::Interop.Sys.MemoryMappedFlags __flags_native, nint __fd_native, long __offset_native);
        }
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Sys
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        internal static partial nint MMap(nint addr, ulong len, global::Interop.Sys.MemoryMappedProtections prot, global::Interop.Sys.MemoryMappedFlags flags, nint fd, long offset)
        {
            int __lastError;
            nint __retVal;
            {
                global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
                __retVal = __PInvoke(addr, len, prot, flags, fd, offset);
                __lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
            }
 
            global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_MMap", ExactSpelling = true)]
            static extern unsafe nint __PInvoke(nint __addr_native, ulong __len_native, global::Interop.Sys.MemoryMappedProtections __prot_native, global::Interop.Sys.MemoryMappedFlags __flags_native, nint __fd_native, long __offset_native);
        }
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Sys
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        internal static partial int MUnmap(nint addr, ulong len)
        {
            int __lastError;
            int __retVal;
            {
                global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
                __retVal = __PInvoke(addr, len);
                __lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
            }
 
            global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_MUnmap", ExactSpelling = true)]
            static extern unsafe int __PInvoke(nint __addr_native, ulong __len_native);
        }
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Sys
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_GetAllMountPoints", ExactSpelling = true)]
        private static unsafe extern partial int GetAllMountPoints(delegate* unmanaged<void*, byte*, void> onFound, void* context);
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Sys
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        internal static partial global::Microsoft.Win32.SafeHandles.SafeFileHandle Open(string filename, global::Interop.Sys.OpenFlags flags, int mode)
        {
            int __lastError;
            bool __invokeSucceeded = default;
            byte* __filename_native = default;
            global::Microsoft.Win32.SafeHandles.SafeFileHandle __retVal = default;
            nint __retVal_native = default;
            // Setup - Perform required setup.
            global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Microsoft.Win32.SafeHandles.SafeFileHandle>.ManagedToUnmanagedOut __retVal_native__marshaller = new();
            scoped global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.ManagedToUnmanagedIn __filename_native__marshaller = new();
            try
            {
                // Marshal - Convert managed data to native data.
                __filename_native__marshaller.FromManaged(filename, stackalloc byte[global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.ManagedToUnmanagedIn.BufferSize]);
                {
                    // PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
                    __filename_native = __filename_native__marshaller.ToUnmanaged();
                    global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
                    __retVal_native = __PInvoke(__filename_native, flags, mode);
                    __lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
                }
 
                __invokeSucceeded = true;
                // UnmarshalCapture - Capture the native data into marshaller instances in case conversion to managed data throws an exception.
                __retVal_native__marshaller.FromUnmanaged(__retVal_native);
                // Unmarshal - Convert native data to managed data.
                __retVal = __retVal_native__marshaller.ToManaged();
            }
            finally
            {
                if (__invokeSucceeded)
                {
                    // CleanupCalleeAllocated - Perform cleanup of callee allocated resources.
                    __retVal_native__marshaller.Free();
                }
 
                // CleanupCallerAllocated - Perform cleanup of caller allocated resources.
                __filename_native__marshaller.Free();
            }
 
            global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_Open", ExactSpelling = true)]
            static extern unsafe nint __PInvoke(byte* __filename_native, global::Interop.Sys.OpenFlags __flags_native, int __mode_native);
        }
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Sys
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        private static partial int PathConf(string path, global::Interop.Sys.PathConfName name)
        {
            int __lastError;
            byte* __path_native = default;
            int __retVal = default;
            // Setup - Perform required setup.
            scoped global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.ManagedToUnmanagedIn __path_native__marshaller = new();
            try
            {
                // Marshal - Convert managed data to native data.
                __path_native__marshaller.FromManaged(path, stackalloc byte[global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.ManagedToUnmanagedIn.BufferSize]);
                {
                    // PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
                    __path_native = __path_native__marshaller.ToUnmanaged();
                    global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
                    __retVal = __PInvoke(__path_native, name);
                    __lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
                }
            }
            finally
            {
                // CleanupCallerAllocated - Perform cleanup of caller allocated resources.
                __path_native__marshaller.Free();
            }
 
            global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_PathConf", ExactSpelling = true)]
            static extern unsafe int __PInvoke(byte* __path_native, global::Interop.Sys.PathConfName __name_native);
        }
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Sys
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        internal static partial int PosixFAdvise(global::Microsoft.Win32.SafeHandles.SafeFileHandle fd, long offset, long length, global::Interop.Sys.FileAdvice advice)
        {
            nint __fd_native = default;
            int __retVal = default;
            // Setup - Perform required setup.
            global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Microsoft.Win32.SafeHandles.SafeFileHandle>.ManagedToUnmanagedIn __fd_native__marshaller = new();
            try
            {
                // Marshal - Convert managed data to native data.
                __fd_native__marshaller.FromManaged(fd);
                {
                    // PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
                    __fd_native = __fd_native__marshaller.ToUnmanaged();
                    __retVal = __PInvoke(__fd_native, offset, length, advice);
                }
            }
            finally
            {
                // CleanupCallerAllocated - Perform cleanup of caller allocated resources.
                __fd_native__marshaller.Free();
            }
 
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_PosixFAdvise", ExactSpelling = true)]
            static extern unsafe int __PInvoke(nint __fd_native, long __offset_native, long __length_native, global::Interop.Sys.FileAdvice __advice_native);
        }
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Sys
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        internal static partial int FAllocate(global::Microsoft.Win32.SafeHandles.SafeFileHandle fd, long offset, long length)
        {
            int __lastError;
            nint __fd_native = default;
            int __retVal = default;
            // Setup - Perform required setup.
            global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Microsoft.Win32.SafeHandles.SafeFileHandle>.ManagedToUnmanagedIn __fd_native__marshaller = new();
            try
            {
                // Marshal - Convert managed data to native data.
                __fd_native__marshaller.FromManaged(fd);
                {
                    // PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
                    __fd_native = __fd_native__marshaller.ToUnmanaged();
                    global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
                    __retVal = __PInvoke(__fd_native, offset, length);
                    __lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
                }
            }
            finally
            {
                // CleanupCallerAllocated - Perform cleanup of caller allocated resources.
                __fd_native__marshaller.Free();
            }
 
            global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_FAllocate", ExactSpelling = true)]
            static extern unsafe int __PInvoke(nint __fd_native, long __offset_native, long __length_native);
        }
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Sys
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        internal static unsafe partial int PRead(global::System.Runtime.InteropServices.SafeHandle fd, byte* buffer, int bufferSize, long fileOffset)
        {
            int __lastError;
            nint __fd_native = default;
            int __retVal = default;
            // Setup - Perform required setup.
            global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Runtime.InteropServices.SafeHandle>.ManagedToUnmanagedIn __fd_native__marshaller = new();
            try
            {
                // Marshal - Convert managed data to native data.
                __fd_native__marshaller.FromManaged(fd);
                {
                    // PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
                    __fd_native = __fd_native__marshaller.ToUnmanaged();
                    global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
                    __retVal = __PInvoke(__fd_native, buffer, bufferSize, fileOffset);
                    __lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
                }
            }
            finally
            {
                // CleanupCallerAllocated - Perform cleanup of caller allocated resources.
                __fd_native__marshaller.Free();
            }
 
            global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_PRead", ExactSpelling = true)]
            static extern unsafe int __PInvoke(nint __fd_native, byte* __buffer_native, int __bufferSize_native, long __fileOffset_native);
        }
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Sys
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        internal static unsafe partial long PReadV(global::System.Runtime.InteropServices.SafeHandle fd, global::Interop.Sys.IOVector* vectors, int vectorCount, long fileOffset)
        {
            int __lastError;
            nint __fd_native = default;
            long __retVal = default;
            // Setup - Perform required setup.
            global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Runtime.InteropServices.SafeHandle>.ManagedToUnmanagedIn __fd_native__marshaller = new();
            try
            {
                // Marshal - Convert managed data to native data.
                __fd_native__marshaller.FromManaged(fd);
                {
                    // PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
                    __fd_native = __fd_native__marshaller.ToUnmanaged();
                    global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
                    __retVal = __PInvoke(__fd_native, vectors, vectorCount, fileOffset);
                    __lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
                }
            }
            finally
            {
                // CleanupCallerAllocated - Perform cleanup of caller allocated resources.
                __fd_native__marshaller.Free();
            }
 
            global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_PReadV", ExactSpelling = true)]
            static extern unsafe long __PInvoke(nint __fd_native, global::Interop.Sys.IOVector* __vectors_native, int __vectorCount_native, long __fileOffset_native);
        }
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Sys
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        internal static unsafe partial int PWrite(global::System.Runtime.InteropServices.SafeHandle fd, byte* buffer, int bufferSize, long fileOffset)
        {
            int __lastError;
            nint __fd_native = default;
            int __retVal = default;
            // Setup - Perform required setup.
            global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Runtime.InteropServices.SafeHandle>.ManagedToUnmanagedIn __fd_native__marshaller = new();
            try
            {
                // Marshal - Convert managed data to native data.
                __fd_native__marshaller.FromManaged(fd);
                {
                    // PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
                    __fd_native = __fd_native__marshaller.ToUnmanaged();
                    global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
                    __retVal = __PInvoke(__fd_native, buffer, bufferSize, fileOffset);
                    __lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
                }
            }
            finally
            {
                // CleanupCallerAllocated - Perform cleanup of caller allocated resources.
                __fd_native__marshaller.Free();
            }
 
            global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_PWrite", ExactSpelling = true)]
            static extern unsafe int __PInvoke(nint __fd_native, byte* __buffer_native, int __bufferSize_native, long __fileOffset_native);
        }
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Sys
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        internal static unsafe partial long PWriteV(global::System.Runtime.InteropServices.SafeHandle fd, global::Interop.Sys.IOVector* vectors, int vectorCount, long fileOffset)
        {
            int __lastError;
            nint __fd_native = default;
            long __retVal = default;
            // Setup - Perform required setup.
            global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Runtime.InteropServices.SafeHandle>.ManagedToUnmanagedIn __fd_native__marshaller = new();
            try
            {
                // Marshal - Convert managed data to native data.
                __fd_native__marshaller.FromManaged(fd);
                {
                    // PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
                    __fd_native = __fd_native__marshaller.ToUnmanaged();
                    global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
                    __retVal = __PInvoke(__fd_native, vectors, vectorCount, fileOffset);
                    __lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
                }
            }
            finally
            {
                // CleanupCallerAllocated - Perform cleanup of caller allocated resources.
                __fd_native__marshaller.Free();
            }
 
            global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_PWriteV", ExactSpelling = true)]
            static extern unsafe long __PInvoke(nint __fd_native, global::Interop.Sys.IOVector* __vectors_native, int __vectorCount_native, long __fileOffset_native);
        }
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Sys
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        internal static unsafe partial int Read(global::System.Runtime.InteropServices.SafeHandle fd, byte* buffer, int count)
        {
            int __lastError;
            nint __fd_native = default;
            int __retVal = default;
            // Setup - Perform required setup.
            global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Runtime.InteropServices.SafeHandle>.ManagedToUnmanagedIn __fd_native__marshaller = new();
            try
            {
                // Marshal - Convert managed data to native data.
                __fd_native__marshaller.FromManaged(fd);
                {
                    // PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
                    __fd_native = __fd_native__marshaller.ToUnmanaged();
                    global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
                    __retVal = __PInvoke(__fd_native, buffer, count);
                    __lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
                }
            }
            finally
            {
                // CleanupCallerAllocated - Perform cleanup of caller allocated resources.
                __fd_native__marshaller.Free();
            }
 
            global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_Read", ExactSpelling = true)]
            static extern unsafe int __PInvoke(nint __fd_native, byte* __buffer_native, int __count_native);
        }
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Sys
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        internal static partial nint OpenDir(string path)
        {
            int __lastError;
            byte* __path_native = default;
            nint __retVal = default;
            // Setup - Perform required setup.
            scoped global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.ManagedToUnmanagedIn __path_native__marshaller = new();
            try
            {
                // Marshal - Convert managed data to native data.
                __path_native__marshaller.FromManaged(path, stackalloc byte[global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.ManagedToUnmanagedIn.BufferSize]);
                {
                    // PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
                    __path_native = __path_native__marshaller.ToUnmanaged();
                    global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
                    __retVal = __PInvoke(__path_native);
                    __lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
                }
            }
            finally
            {
                // CleanupCallerAllocated - Perform cleanup of caller allocated resources.
                __path_native__marshaller.Free();
            }
 
            global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_OpenDir", ExactSpelling = true)]
            static extern unsafe nint __PInvoke(byte* __path_native);
        }
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Sys
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_ReadDir", ExactSpelling = true)]
        internal static unsafe extern partial int ReadDir(nint dir, global::Interop.Sys.DirectoryEntry* outputEntry);
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Sys
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        internal static partial int CloseDir(nint dir)
        {
            int __lastError;
            int __retVal;
            {
                global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
                __retVal = __PInvoke(dir);
                __lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
            }
 
            global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_CloseDir", ExactSpelling = true)]
            static extern unsafe int __PInvoke(nint __dir_native);
        }
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Sys
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        private static partial int ReadLink(ref byte path, ref byte buffer, int bufferSize)
        {
            int __lastError;
            int __retVal;
            // Pin - Pin data in preparation for calling the P/Invoke.
            fixed (byte* __buffer_native = &buffer)
            fixed (byte* __path_native = &path)
            {
                global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
                __retVal = __PInvoke(__path_native, __buffer_native, bufferSize);
                __lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
            }
 
            global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_ReadLink", ExactSpelling = true)]
            static extern unsafe int __PInvoke(byte* __path_native, byte* __buffer_native, int __bufferSize_native);
        }
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Sys
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        internal static partial int Rename(string oldPath, string newPath)
        {
            int __lastError;
            byte* __oldPath_native = default;
            byte* __newPath_native = default;
            int __retVal = default;
            // Setup - Perform required setup.
            scoped global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.ManagedToUnmanagedIn __newPath_native__marshaller = new();
            scoped global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.ManagedToUnmanagedIn __oldPath_native__marshaller = new();
            try
            {
                // Marshal - Convert managed data to native data.
                __newPath_native__marshaller.FromManaged(newPath, stackalloc byte[global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.ManagedToUnmanagedIn.BufferSize]);
                __oldPath_native__marshaller.FromManaged(oldPath, stackalloc byte[global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.ManagedToUnmanagedIn.BufferSize]);
                {
                    // PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
                    __newPath_native = __newPath_native__marshaller.ToUnmanaged();
                    __oldPath_native = __oldPath_native__marshaller.ToUnmanaged();
                    global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
                    __retVal = __PInvoke(__oldPath_native, __newPath_native);
                    __lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
                }
            }
            finally
            {
                // CleanupCallerAllocated - Perform cleanup of caller allocated resources.
                __newPath_native__marshaller.Free();
                __oldPath_native__marshaller.Free();
            }
 
            global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_Rename", ExactSpelling = true)]
            static extern unsafe int __PInvoke(byte* __oldPath_native, byte* __newPath_native);
        }
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Sys
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        internal static partial int Rename(ref byte oldPath, ref byte newPath)
        {
            int __lastError;
            int __retVal;
            // Pin - Pin data in preparation for calling the P/Invoke.
            fixed (byte* __newPath_native = &newPath)
            fixed (byte* __oldPath_native = &oldPath)
            {
                global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
                __retVal = __PInvoke(__oldPath_native, __newPath_native);
                __lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
            }
 
            global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_Rename", ExactSpelling = true)]
            static extern unsafe int __PInvoke(byte* __oldPath_native, byte* __newPath_native);
        }
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Sys
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        internal static partial int RmDir(string path)
        {
            int __lastError;
            byte* __path_native = default;
            int __retVal = default;
            // Setup - Perform required setup.
            scoped global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.ManagedToUnmanagedIn __path_native__marshaller = new();
            try
            {
                // Marshal - Convert managed data to native data.
                __path_native__marshaller.FromManaged(path, stackalloc byte[global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.ManagedToUnmanagedIn.BufferSize]);
                {
                    // PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
                    __path_native = __path_native__marshaller.ToUnmanaged();
                    global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
                    __retVal = __PInvoke(__path_native);
                    __lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
                }
            }
            finally
            {
                // CleanupCallerAllocated - Perform cleanup of caller allocated resources.
                __path_native__marshaller.Free();
            }
 
            global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_RmDir", ExactSpelling = true)]
            static extern unsafe int __PInvoke(byte* __path_native);
        }
    }
}
internal static unsafe partial class Interop
{
    internal unsafe partial class Sys
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_SchedGetCpu", ExactSpelling = true)]
        internal static extern partial int SchedGetCpu();
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Sys
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        internal static partial int FStat(global::System.Runtime.InteropServices.SafeHandle fd, out global::Interop.Sys.FileStatus output)
        {
            int __lastError;
            output = default;
            nint __fd_native = default;
            int __retVal = default;
            // Setup - Perform required setup.
            global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Runtime.InteropServices.SafeHandle>.ManagedToUnmanagedIn __fd_native__marshaller = new();
            try
            {
                // Marshal - Convert managed data to native data.
                __fd_native__marshaller.FromManaged(fd);
                // Pin - Pin data in preparation for calling the P/Invoke.
                fixed (global::Interop.Sys.FileStatus* __output_native = &output)
                {
                    // PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
                    __fd_native = __fd_native__marshaller.ToUnmanaged();
                    global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
                    __retVal = __PInvoke(__fd_native, __output_native);
                    __lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
                }
            }
            finally
            {
                // CleanupCallerAllocated - Perform cleanup of caller allocated resources.
                __fd_native__marshaller.Free();
            }
 
            global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_FStat", ExactSpelling = true)]
            static extern unsafe int __PInvoke(nint __fd_native, global::Interop.Sys.FileStatus* __output_native);
        }
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Sys
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        internal static partial int Stat(string path, out global::Interop.Sys.FileStatus output)
        {
            int __lastError;
            output = default;
            byte* __path_native = default;
            int __retVal = default;
            // Setup - Perform required setup.
            scoped global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.ManagedToUnmanagedIn __path_native__marshaller = new();
            try
            {
                // Marshal - Convert managed data to native data.
                __path_native__marshaller.FromManaged(path, stackalloc byte[global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.ManagedToUnmanagedIn.BufferSize]);
                // Pin - Pin data in preparation for calling the P/Invoke.
                fixed (global::Interop.Sys.FileStatus* __output_native = &output)
                {
                    // PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
                    __path_native = __path_native__marshaller.ToUnmanaged();
                    global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
                    __retVal = __PInvoke(__path_native, __output_native);
                    __lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
                }
            }
            finally
            {
                // CleanupCallerAllocated - Perform cleanup of caller allocated resources.
                __path_native__marshaller.Free();
            }
 
            global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_Stat", ExactSpelling = true)]
            static extern unsafe int __PInvoke(byte* __path_native, global::Interop.Sys.FileStatus* __output_native);
        }
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Sys
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        internal static partial int LStat(string path, out global::Interop.Sys.FileStatus output)
        {
            int __lastError;
            output = default;
            byte* __path_native = default;
            int __retVal = default;
            // Setup - Perform required setup.
            scoped global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.ManagedToUnmanagedIn __path_native__marshaller = new();
            try
            {
                // Marshal - Convert managed data to native data.
                __path_native__marshaller.FromManaged(path, stackalloc byte[global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.ManagedToUnmanagedIn.BufferSize]);
                // Pin - Pin data in preparation for calling the P/Invoke.
                fixed (global::Interop.Sys.FileStatus* __output_native = &output)
                {
                    // PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
                    __path_native = __path_native__marshaller.ToUnmanaged();
                    global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
                    __retVal = __PInvoke(__path_native, __output_native);
                    __lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
                }
            }
            finally
            {
                // CleanupCallerAllocated - Perform cleanup of caller allocated resources.
                __path_native__marshaller.Free();
            }
 
            global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_LStat", ExactSpelling = true)]
            static extern unsafe int __PInvoke(byte* __path_native, global::Interop.Sys.FileStatus* __output_native);
        }
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Sys
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        internal static partial int Stat(ref byte path, out global::Interop.Sys.FileStatus output)
        {
            int __lastError;
            output = default;
            int __retVal;
            // Pin - Pin data in preparation for calling the P/Invoke.
            fixed (global::Interop.Sys.FileStatus* __output_native = &output)
            fixed (byte* __path_native = &path)
            {
                global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
                __retVal = __PInvoke(__path_native, __output_native);
                __lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
            }
 
            global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_Stat", ExactSpelling = true)]
            static extern unsafe int __PInvoke(byte* __path_native, global::Interop.Sys.FileStatus* __output_native);
        }
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Sys
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        internal static partial int LStat(ref byte path, out global::Interop.Sys.FileStatus output)
        {
            int __lastError;
            output = default;
            int __retVal;
            // Pin - Pin data in preparation for calling the P/Invoke.
            fixed (global::Interop.Sys.FileStatus* __output_native = &output)
            fixed (byte* __path_native = &path)
            {
                global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
                __retVal = __PInvoke(__path_native, __output_native);
                __lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
            }
 
            global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_LStat", ExactSpelling = true)]
            static extern unsafe int __PInvoke(byte* __path_native, global::Interop.Sys.FileStatus* __output_native);
        }
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Sys
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        internal static partial int SymLink(string target, string linkPath)
        {
            int __lastError;
            byte* __target_native = default;
            byte* __linkPath_native = default;
            int __retVal = default;
            // Setup - Perform required setup.
            scoped global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.ManagedToUnmanagedIn __linkPath_native__marshaller = new();
            scoped global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.ManagedToUnmanagedIn __target_native__marshaller = new();
            try
            {
                // Marshal - Convert managed data to native data.
                __linkPath_native__marshaller.FromManaged(linkPath, stackalloc byte[global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.ManagedToUnmanagedIn.BufferSize]);
                __target_native__marshaller.FromManaged(target, stackalloc byte[global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.ManagedToUnmanagedIn.BufferSize]);
                {
                    // PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
                    __linkPath_native = __linkPath_native__marshaller.ToUnmanaged();
                    __target_native = __target_native__marshaller.ToUnmanaged();
                    global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
                    __retVal = __PInvoke(__target_native, __linkPath_native);
                    __lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
                }
            }
            finally
            {
                // CleanupCallerAllocated - Perform cleanup of caller allocated resources.
                __linkPath_native__marshaller.Free();
                __target_native__marshaller.Free();
            }
 
            global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_SymLink", ExactSpelling = true)]
            static extern unsafe int __PInvoke(byte* __target_native, byte* __linkPath_native);
        }
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Sys
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        internal static partial long SysConf(global::Interop.Sys.SysConfName name)
        {
            int __lastError;
            long __retVal;
            {
                global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
                __retVal = __PInvoke(name);
                __lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
            }
 
            global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_SysConf", ExactSpelling = true)]
            static extern unsafe long __PInvoke(global::Interop.Sys.SysConfName __name_native);
        }
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Sys
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        internal static partial void SysLog(global::Interop.Sys.SysLogPriority priority, string message, string arg1)
        {
            byte* __message_native = default;
            byte* __arg1_native = default;
            // Setup - Perform required setup.
            scoped global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.ManagedToUnmanagedIn __arg1_native__marshaller = new();
            scoped global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.ManagedToUnmanagedIn __message_native__marshaller = new();
            try
            {
                // Marshal - Convert managed data to native data.
                __arg1_native__marshaller.FromManaged(arg1, stackalloc byte[global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.ManagedToUnmanagedIn.BufferSize]);
                __message_native__marshaller.FromManaged(message, stackalloc byte[global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.ManagedToUnmanagedIn.BufferSize]);
                {
                    // PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
                    __arg1_native = __arg1_native__marshaller.ToUnmanaged();
                    __message_native = __message_native__marshaller.ToUnmanaged();
                    __PInvoke(priority, __message_native, __arg1_native);
                }
            }
            finally
            {
                // CleanupCallerAllocated - Perform cleanup of caller allocated resources.
                __arg1_native__marshaller.Free();
                __message_native__marshaller.Free();
            }
 
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_SysLog", ExactSpelling = true)]
            static extern unsafe void __PInvoke(global::Interop.Sys.SysLogPriority __priority_native, byte* __message_native, byte* __arg1_native);
        }
    }
}
internal static unsafe partial class Interop
{
    internal unsafe partial class Sys
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        internal static unsafe partial bool CreateThread(nint stackSize, delegate* unmanaged<nint, nint> startAddress, nint parameter)
        {
            bool __retVal;
            int __retVal_native;
            {
                __retVal_native = __PInvoke(stackSize, startAddress, parameter);
            }
 
            // Unmarshal - Convert native data to managed data.
            __retVal = __retVal_native != 0;
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_CreateThread", ExactSpelling = true)]
            static extern unsafe int __PInvoke(nint __stackSize_native, delegate* unmanaged<nint, nint> __startAddress_native, nint __parameter_native);
        }
    }
}
internal static unsafe partial class Interop
{
    internal unsafe partial class Sys
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_TryGetUInt32OSThreadId", ExactSpelling = true)]
        internal static unsafe extern partial uint TryGetUInt32OSThreadId();
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Sys
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        internal static partial int Unlink(string pathname)
        {
            int __lastError;
            byte* __pathname_native = default;
            int __retVal = default;
            // Setup - Perform required setup.
            scoped global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.ManagedToUnmanagedIn __pathname_native__marshaller = new();
            try
            {
                // Marshal - Convert managed data to native data.
                __pathname_native__marshaller.FromManaged(pathname, stackalloc byte[global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.ManagedToUnmanagedIn.BufferSize]);
                {
                    // PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
                    __pathname_native = __pathname_native__marshaller.ToUnmanaged();
                    global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
                    __retVal = __PInvoke(__pathname_native);
                    __lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
                }
            }
            finally
            {
                // CleanupCallerAllocated - Perform cleanup of caller allocated resources.
                __pathname_native__marshaller.Free();
            }
 
            global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_Unlink", ExactSpelling = true)]
            static extern unsafe int __PInvoke(byte* __pathname_native);
        }
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Sys
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        internal static unsafe partial int UTimensat(string path, global::Interop.Sys.TimeSpec* times)
        {
            int __lastError;
            byte* __path_native = default;
            int __retVal = default;
            // Setup - Perform required setup.
            scoped global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.ManagedToUnmanagedIn __path_native__marshaller = new();
            try
            {
                // Marshal - Convert managed data to native data.
                __path_native__marshaller.FromManaged(path, stackalloc byte[global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.ManagedToUnmanagedIn.BufferSize]);
                {
                    // PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
                    __path_native = __path_native__marshaller.ToUnmanaged();
                    global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
                    __retVal = __PInvoke(__path_native, times);
                    __lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
                }
            }
            finally
            {
                // CleanupCallerAllocated - Perform cleanup of caller allocated resources.
                __path_native__marshaller.Free();
            }
 
            global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_UTimensat", ExactSpelling = true)]
            static extern unsafe int __PInvoke(byte* __path_native, global::Interop.Sys.TimeSpec* __times_native);
        }
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Sys
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        internal static unsafe partial int FUTimens(global::System.Runtime.InteropServices.SafeHandle fd, global::Interop.Sys.TimeSpec* times)
        {
            int __lastError;
            nint __fd_native = default;
            int __retVal = default;
            // Setup - Perform required setup.
            global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Runtime.InteropServices.SafeHandle>.ManagedToUnmanagedIn __fd_native__marshaller = new();
            try
            {
                // Marshal - Convert managed data to native data.
                __fd_native__marshaller.FromManaged(fd);
                {
                    // PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
                    __fd_native = __fd_native__marshaller.ToUnmanaged();
                    global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
                    __retVal = __PInvoke(__fd_native, times);
                    __lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
                }
            }
            finally
            {
                // CleanupCallerAllocated - Perform cleanup of caller allocated resources.
                __fd_native__marshaller.Free();
            }
 
            global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_FUTimens", ExactSpelling = true)]
            static extern unsafe int __PInvoke(nint __fd_native, global::Interop.Sys.TimeSpec* __times_native);
        }
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Sys
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        internal static unsafe partial int Write(global::System.Runtime.InteropServices.SafeHandle fd, byte* buffer, int bufferSize)
        {
            int __lastError;
            nint __fd_native = default;
            int __retVal = default;
            // Setup - Perform required setup.
            global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Runtime.InteropServices.SafeHandle>.ManagedToUnmanagedIn __fd_native__marshaller = new();
            try
            {
                // Marshal - Convert managed data to native data.
                __fd_native__marshaller.FromManaged(fd);
                {
                    // PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
                    __fd_native = __fd_native__marshaller.ToUnmanaged();
                    global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
                    __retVal = __PInvoke(__fd_native, buffer, bufferSize);
                    __lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
                }
            }
            finally
            {
                // CleanupCallerAllocated - Perform cleanup of caller allocated resources.
                __fd_native__marshaller.Free();
            }
 
            global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_Write", ExactSpelling = true)]
            static extern unsafe int __PInvoke(nint __fd_native, byte* __buffer_native, int __bufferSize_native);
        }
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Sys
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        internal static unsafe partial int Write(nint fd, byte* buffer, int bufferSize)
        {
            int __lastError;
            int __retVal;
            {
                global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
                __retVal = __PInvoke(fd, buffer, bufferSize);
                __lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
            }
 
            global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_Write", ExactSpelling = true)]
            static extern unsafe int __PInvoke(nint __fd_native, byte* __buffer_native, int __bufferSize_native);
        }
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Sys
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_GetEUid", ExactSpelling = true)]
        internal static extern partial uint GetEUid();
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Sys
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_GetEGid", ExactSpelling = true)]
        private static extern partial uint GetEGid();
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Sys
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        private static unsafe partial int GetGroups(int ngroups, uint* groups)
        {
            int __lastError;
            int __retVal;
            {
                global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
                __retVal = __PInvoke(ngroups, groups);
                __lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
            }
 
            global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_GetGroups", ExactSpelling = true)]
            static extern unsafe int __PInvoke(int __ngroups_native, uint* __groups_native);
        }
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Sys
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        internal static unsafe partial int GetPwUidR(uint uid, out global::Interop.Sys.Passwd pwd, byte* buf, int bufLen)
        {
            pwd = default;
            int __retVal;
            // Pin - Pin data in preparation for calling the P/Invoke.
            fixed (global::Interop.Sys.Passwd* __pwd_native = &pwd)
            {
                __retVal = __PInvoke(uid, __pwd_native, buf, bufLen);
            }
 
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_GetPwUidR", ExactSpelling = true)]
            static extern unsafe int __PInvoke(uint __uid_native, global::Interop.Sys.Passwd* __pwd_native, byte* __buf_native, int __bufLen_native);
        }
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Sys
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        internal static unsafe partial int GetPwNamR(string name, out global::Interop.Sys.Passwd pwd, byte* buf, int bufLen)
        {
            pwd = default;
            byte* __name_native = default;
            int __retVal = default;
            // Setup - Perform required setup.
            scoped global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.ManagedToUnmanagedIn __name_native__marshaller = new();
            try
            {
                // Marshal - Convert managed data to native data.
                __name_native__marshaller.FromManaged(name, stackalloc byte[global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.ManagedToUnmanagedIn.BufferSize]);
                // Pin - Pin data in preparation for calling the P/Invoke.
                fixed (global::Interop.Sys.Passwd* __pwd_native = &pwd)
                {
                    // PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
                    __name_native = __name_native__marshaller.ToUnmanaged();
                    __retVal = __PInvoke(__name_native, __pwd_native, buf, bufLen);
                }
            }
            finally
            {
                // CleanupCallerAllocated - Perform cleanup of caller allocated resources.
                __name_native__marshaller.Free();
            }
 
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_GetPwNamR", ExactSpelling = true)]
            static extern unsafe int __PInvoke(byte* __name_native, global::Interop.Sys.Passwd* __pwd_native, byte* __buf_native, int __bufLen_native);
        }
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Sys
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_GetPid", ExactSpelling = true)]
        internal static extern partial int GetPid();
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Sys
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_GetSid", ExactSpelling = true)]
        internal static extern partial int GetSid(int pid);
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Sys
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        internal static partial bool InitializeTerminalAndSignalHandling()
        {
            int __lastError;
            bool __retVal;
            int __retVal_native;
            {
                global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
                __retVal_native = __PInvoke();
                __lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
            }
 
            // Unmarshal - Convert native data to managed data.
            __retVal = __retVal_native != 0;
            global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_InitializeTerminalAndSignalHandling", ExactSpelling = true)]
            static extern unsafe int __PInvoke();
        }
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Sys
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        internal static partial void SetKeypadXmit(global::Microsoft.Win32.SafeHandles.SafeFileHandle terminalHandle, string terminfoString)
        {
            nint __terminalHandle_native = default;
            byte* __terminfoString_native = default;
            // Setup - Perform required setup.
            scoped global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.ManagedToUnmanagedIn __terminfoString_native__marshaller = new();
            global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Microsoft.Win32.SafeHandles.SafeFileHandle>.ManagedToUnmanagedIn __terminalHandle_native__marshaller = new();
            try
            {
                // Marshal - Convert managed data to native data.
                __terminfoString_native__marshaller.FromManaged(terminfoString, stackalloc byte[global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.ManagedToUnmanagedIn.BufferSize]);
                __terminalHandle_native__marshaller.FromManaged(terminalHandle);
                {
                    // PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
                    __terminfoString_native = __terminfoString_native__marshaller.ToUnmanaged();
                    __terminalHandle_native = __terminalHandle_native__marshaller.ToUnmanaged();
                    __PInvoke(__terminalHandle_native, __terminfoString_native);
                }
            }
            finally
            {
                // CleanupCallerAllocated - Perform cleanup of caller allocated resources.
                __terminfoString_native__marshaller.Free();
                __terminalHandle_native__marshaller.Free();
            }
 
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_SetKeypadXmit", ExactSpelling = true)]
            static extern unsafe void __PInvoke(nint __terminalHandle_native, byte* __terminfoString_native);
        }
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Sys
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_UninitializeTerminal", ExactSpelling = true)]
        internal static extern partial void UninitializeTerminal();
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Sys
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_SetPosixSignalHandler", ExactSpelling = true)]
        internal static unsafe extern partial void SetPosixSignalHandler(delegate* unmanaged<int, global::System.Runtime.InteropServices.PosixSignal, int> handler);
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Sys
    {
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "42.42.42.42")]
        internal static partial bool EnablePosixSignalHandling(int signal)
        {
            int __lastError;
            bool __retVal;
            int __retVal_native;
            {
                global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
                __retVal_native = __PInvoke(signal);
                __lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
            }
 
            // Unmarshal - Convert native data to managed data.
            __retVal = __retVal_native != 0;
            global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
            return __retVal;
            // Local P/Invoke
            [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_EnablePosixSignalHandling", ExactSpelling = true)]
            static extern unsafe int __PInvoke(int __signal_native);
        }
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Sys
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_DisablePosixSignalHandling", ExactSpelling = true)]
        internal static extern partial void DisablePosixSignalHandling(int signal);
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Sys
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_HandleNonCanceledPosixSignal", ExactSpelling = true)]
        internal static extern partial void HandleNonCanceledPosixSignal(int signal);
    }
}
internal static unsafe partial class Interop
{
    internal static unsafe partial class Sys
    {
        [global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_GetPlatformSignalNumber", ExactSpelling = true)]
        internal static extern partial int GetPlatformSignalNumber(global::System.Runtime.InteropServices.PosixSignal signal);
    }
}