|
| 1 | +// Licensed to the .NET Foundation under one or more agreements. |
| 2 | +// The .NET Foundation licenses this file to you under the MIT license. |
| 3 | + |
| 4 | +using Xunit; |
| 5 | + |
| 6 | +// Generated by Fuzzlyn v1.5 on 2023-08-05 16:08:41 |
| 7 | +// Run on X86 Windows |
| 8 | +// Seed: 7610693270284065118 |
| 9 | +// Reduced from 12.0 KiB to 2.2 KiB in 00:01:06 |
| 10 | +// Debug: Outputs 1 |
| 11 | +// Release: Outputs 2 |
| 12 | +public interface I0 |
| 13 | +{ |
| 14 | +} |
| 15 | + |
| 16 | +public class C0 : I0 |
| 17 | +{ |
| 18 | + public ulong F0; |
| 19 | + public uint F4; |
| 20 | + public C0(ulong f0, uint f4) |
| 21 | + { |
| 22 | + F0 = f0; |
| 23 | + F4 = f4; |
| 24 | + } |
| 25 | +} |
| 26 | + |
| 27 | +public class Runtime_90219 |
| 28 | +{ |
| 29 | + public static IRuntime s_rt; |
| 30 | + public static I0 s_1; |
| 31 | + public static uint s_2; |
| 32 | + public static byte[] s_4 = new byte[]{0}; |
| 33 | + public static byte Result; |
| 34 | + |
| 35 | + [Fact] |
| 36 | + public static int TestEntryPoint() |
| 37 | + { |
| 38 | + CollectibleALC alc = new CollectibleALC(); |
| 39 | + System.Reflection.Assembly asm = alc.LoadFromAssemblyPath(System.Reflection.Assembly.GetExecutingAssembly().Location); |
| 40 | + System.Reflection.MethodInfo mi = asm.GetType(typeof(Runtime_90219).FullName).GetMethod(nameof(MainInner)); |
| 41 | + System.Type runtimeTy = asm.GetType(typeof(Runtime).FullName); |
| 42 | + return (int)mi.Invoke(null, new object[]{System.Activator.CreateInstance(runtimeTy)}); |
| 43 | + } |
| 44 | + |
| 45 | + public static int MainInner(IRuntime rt) |
| 46 | + { |
| 47 | + s_rt = rt; |
| 48 | + var vr8 = new C0(0, 0); |
| 49 | + var vr12 = s_4[0]; |
| 50 | + vr8.F0 *= M2(vr12); |
| 51 | + long[] vr9 = new long[]{0}; |
| 52 | + bool vr10 = (int)M2(0) <= vr9[0]; |
| 53 | + return Result == 1 ? 100 : 101; |
| 54 | + } |
| 55 | + |
| 56 | + public static ulong M2(byte arg0) |
| 57 | + { |
| 58 | + for (int var0 = 0; var0 < 2; var0++) |
| 59 | + { |
| 60 | + var vr1 = new C0(0, 0); |
| 61 | + var vr3 = new C0(0, 0); |
| 62 | + uint vr14 = s_2; |
| 63 | + s_rt.WriteLine("c_0", vr14); |
| 64 | + uint vr15 = vr3.F4; |
| 65 | + s_2 = M3(vr1, vr15); |
| 66 | + s_1 = s_1; |
| 67 | + s_1 = new C0(0, 0); |
| 68 | + s_rt.WriteLine("c_6", var0); |
| 69 | + } |
| 70 | + |
| 71 | + var vr5 = new C0(0, 1); |
| 72 | + uint vr18 = vr5.F4; |
| 73 | + arg0 = (byte)vr18; |
| 74 | + var vr7 = new C0(0, 1838341904U); |
| 75 | + if ((arg0 >= (byte)M3(vr7, 0))) |
| 76 | + { |
| 77 | + arg0 <<= 1; |
| 78 | + } |
| 79 | + |
| 80 | + s_rt.WriteLine("c_7", arg0); |
| 81 | + return 0; |
| 82 | + } |
| 83 | + |
| 84 | + public static uint M3(C0 argThis, uint arg0) |
| 85 | + { |
| 86 | + s_rt.WriteLine("c_0", arg0); |
| 87 | + return argThis.F4; |
| 88 | + } |
| 89 | +} |
| 90 | + |
| 91 | +public interface IRuntime |
| 92 | +{ |
| 93 | + void WriteLine<T>(string site, T value); |
| 94 | +} |
| 95 | + |
| 96 | +public class Runtime : IRuntime |
| 97 | +{ |
| 98 | + public void WriteLine<T>(string site, T value) |
| 99 | + { |
| 100 | + if (typeof(T) == typeof(byte)) |
| 101 | + Runtime_90219.Result = (byte)(object)value; |
| 102 | + } |
| 103 | +} |
| 104 | + |
| 105 | +public class CollectibleALC : System.Runtime.Loader.AssemblyLoadContext |
| 106 | +{ |
| 107 | + public CollectibleALC(): base(true) |
| 108 | + { |
| 109 | + } |
| 110 | +} |
0 commit comments