// Generated by Fuzzlyn v1.5 on 2022-09-28 20:12:22
// Run on Arm64 Windows
// Seed: 2515290859567534747
// Reduced from 46.0 KiB to 1.5 KiB in 00:02:39
// Hits JIT assert in Release:
// Assertion failed '!op1->isUsedFromMemory()' in 'Program:M11(C0,short)' during 'Generate code' (IL size 87; hash 0xb0dcda0a; FullOpts)
//
//     File: D:\a\_work\1\s\src\coreclr\jit\codegenarm64.cpp Line: 4543
//

using Xunit;
public class C0
{
    public int F0;
    public bool F1;
}

public class Program
{
    public static IRuntime s_rt = new Runtime();
    public static ulong s_3;

    [Fact]
    public static void TestEntryPoint()
    {
        CollectibleALC alc = new CollectibleALC();

        System.Reflection.Assembly asm = alc.LoadFromAssemblyPath(System.Reflection.Assembly.GetExecutingAssembly().Location);
        System.Reflection.MethodInfo mi = asm.GetType(typeof(Program).FullName).GetMethod(nameof(MainInner));
        System.Type runtimeTy = asm.GetType(typeof(Runtime).FullName);

        mi.Invoke(null, new object[]{System.Activator.CreateInstance(runtimeTy)});
    }

// Allow reflection lookup on public method
#pragma warning disable xUnit1013
    public static void MainInner(IRuntime rt)
    {
        var vr2 = new C0();
        M11(vr2, 1);
    }
#pragma warning restore xUnit1013

    internal static void M11(C0 argThis, short arg0)
    {
        short var0 = default(short);

        for (int var1 = 0; var1 < 2; var1++)
        {
            short var2 = var0++;

            argThis.F1 = (byte)(argThis.F0 ^ arg0) > (ushort)(s_3 % 1);
            s_rt.WriteLine("c_68", var2);

            int var3 = argThis.F0;
            s_rt.WriteLine("c_72", var3);
        }
    }
}

public interface IRuntime
{
    void WriteLine<T>(string site, T value);
}

public class Runtime : IRuntime
{
    public void WriteLine<T>(string site, T value) => System.Console.WriteLine(value);
}

public class CollectibleALC : System.Runtime.Loader.AssemblyLoadContext
{
    public CollectibleALC(): base(true)
    {
    }
}
