/*
 * @test

 * @library / /closed/test/hotspot/jtreg /open/test/lib /open/test/hotspot/jtreg/testlibrary/jittester/src /open/test/failure_handler/src/share/classes
 * @build Test
 * @run driver/timeout=180 applications.javafuzzer.TestDriver BASIC:240 -XX:-PrintWarnings -Xmx1G -XX:+IgnoreUnrecognizedVMOptions -XX:CompileCommand=quiet -XX:CompileCommand=compileonly,*Test*::* -Xcomp Test
 * @run driver/timeout=180 applications.javafuzzer.TestDriver C2_STRESS:720 -XX:-PrintWarnings -Xmx1G -XX:+IgnoreUnrecognizedVMOptions -XX:CompileCommand=quiet -XX:CompileCommand=compileonly,*Test*::* -XX:-TieredCompilation -Xbatch -XX:+UnlockDiagnosticVMOptions -XX:StressSeed=74065881 -XX:+UnlockDiagnosticVMOptions -XX:+StressLCM -XX:+StressGCM -XX:+StressIGVN -XX:+StressCCP -XX:+StressMacroExpansion -XX:+StressLoopPeeling -XX:+VerifyLoopOptimizations -XX:VerifyIterativeGVN=1110 Test


 */

// Generated by Java* Fuzzer test generator (1.0.001). Sat Nov  8 21:28:21 2025
// Use '-Dtest_generator_rng_seed=76998150173091235283776042847254357740 to re-generate the same test code
public class Test {

    public static final int N = 400;

    public static long instanceCount=-969990862L;
    public static volatile double dFld=-34.108579;
    public static int iFld=234;
    public float fFld=-2.652F;
    public static byte byFld=-67;
    public static int iArrFld[]=new int[N];

    static {
        FuzzerUtils.init(Test.iArrFld, 0);
    }

    public static long vMeth_check_sum = 0;
    public static long vMeth1_check_sum = 0;
    public static long vMeth2_check_sum = 0;

    public static void vMeth2() {

        float f1=0.89F, f2=-1.80F;
        int i4=-117, i5=-6;
        byte by=-115;
        long l=207104917436252066L;
        boolean b=false;

        Test.instanceCount <<= -9;
        for (f1 = 241; f1 > 13; --f1) {
            by = (byte)Test.instanceCount;
            Test.iFld = Test.iFld;
            for (l = 1; l < 7; l++) {
                Test.iFld = i5;
            }
            Test.instanceCount += (long)f1;
            i4 &= i5;
            i5 += Test.iFld;
            Test.instanceCount &= i5;
            f2 = -1.543F;
            Test.instanceCount >>>= l;
            Test.iArrFld[(int)(f1)] = i4;
        }
        b = false;
        i4 *= -7;
        vMeth2_check_sum += Float.floatToIntBits(f1) + i4 + by + l + i5 + Float.floatToIntBits(f2) + (b ? 1 : 0);
    }

    public static void vMeth1() {

        int i2=14060, i3=134, i6=-7, i7=-181;
        short s=7553;
        float f=-56.714F;
        byte by1=-1;

        for (i2 = 6; i2 < 347; i2++) {
            s = (short)(--Test.instanceCount);
            switch (((Integer.reverseBytes(i2) >>> 1) % 7) + 49) {
            case 49:
            case 50:
                f += (float)Math.sqrt(Test.dFld);
                break;
            case 51:
                Test.iArrFld[i2 + 1] <<= Test.iFld;
                vMeth2();
                f += s;
                switch ((i2 % 2) + 102) {
                case 102:
                    for (i6 = 1; i6 < 5; i6++) {
                        Test.instanceCount = Test.instanceCount;
                        i3 += (i6 * i6);
                        f *= s;
                        Test.iArrFld[i2] += (int)Test.instanceCount;
                    }
                    Test.iArrFld[(Test.iFld >>> 1) % N] -= s;
                    Test.iFld = i6;
                case 103:
                    Test.iArrFld[i2 + 1] *= (int)Test.instanceCount;
                    break;
                }
                break;
            case 52:
                by1 -= (byte)s;
                break;
            case 53:
            case 54:
                Test.instanceCount = i3;
                break;
            case 55:
                Test.iFld += i2;
                break;
            default:
                i7 -= i6;
            }
        }
        vMeth1_check_sum += i2 + i3 + s + Float.floatToIntBits(f) + i6 + i7 + by1;
    }

    public static void vMeth(int i, int i1) {

        int i8=221, i9=2, i10=40877, i11=-2, i12=-31882;
        byte by2=-105;
        float f3=58.532F, f4=-86.66F;
        boolean b1=false;
        short sArr[]=new short[N];

        FuzzerUtils.init(sArr, (short)-8053);

        vMeth1();
        for (i8 = 21; i8 < 385; i8++) {
            Test.dFld = 16;
            for (i10 = 1; i10 < 5; ++i10) {
                Test.iArrFld[i10 - 1] = -39860;
                Test.instanceCount += Test.iFld;
                Test.instanceCount += (i10 * Test.iFld);
                by2 += (byte)f3;
                switch ((i8 % 2) + 34) {
                case 34:
                    Test.instanceCount += Test.instanceCount;
                    sArr[i10 + 1] += (short)i8;
                    for (f4 = 1; f4 < 2; ++f4) {
                        f3 += f4;
                        i12 *= (int)f4;
                        if (b1) continue;
                    }
                    break;
                case 35:
                    i = (int)f3;
                    break;
                }
            }
        }
        vMeth_check_sum += i + i1 + i8 + i9 + i10 + i11 + by2 + Float.floatToIntBits(f3) + Float.floatToIntBits(f4) +
            i12 + (b1 ? 1 : 0) + FuzzerUtils.checkSum(sArr);
    }

    public void mainTest(String[] strArr1) {

        int i13=-14, i14=-57957, i15=-110, i16=8256, i17=122;
        short s1=-29660;
        boolean b2=true;
        long l1=3L, lArr[]=new long[N];

        FuzzerUtils.init(lArr, 172L);

        vMeth(38109, Test.iFld);
        fFld -= Test.byFld;
        i13 = 1;
        while (++i13 < 362) {
            for (i14 = 4; i14 < 70; ++i14) {
                i16 = 1;
                while (++i16 < 2) {
                    Test.instanceCount = i13;
                    lArr[i14] = Test.instanceCount;
                    i15 -= (int)Test.instanceCount;
                    Test.dFld -= s1;
                    if (b2) continue;
                    Test.instanceCount = Test.instanceCount;
                    Test.iFld -= (int)fFld;
                    Test.instanceCount = i14;
                    Test.instanceCount = 8;
                }
                for (l1 = 1; l1 < 2; l1++) {
                    switch ((i13 % 7) + 89) {
                    case 89:
                    case 90:
                        i15 = (int)l1;
                        Test.instanceCount += (((l1 * i13) + i13) - Test.iFld);
                        i15 = -31464;
                        Test.instanceCount += (550079215046138842L + (l1 * l1));
                        break;
                    case 91:
                        Test.iFld %= (int)3223922027704676207L;
                        i17 -= i16;
                        if (b2) continue;
                        break;
                    case 92:
                        i17 = i14;
                        break;
                    case 93:
                        fFld += Test.iFld;
                        Test.instanceCount += (l1 - Test.byFld);
                    case 94:
                        Test.iArrFld = Test.iArrFld;
                        Test.iFld = (int)Test.instanceCount;
                        break;
                    case 95:
                        Test.iArrFld[(int)(l1 + 1)] = i16;
                        break;
                    }
                    Test.iFld -= (int)Test.dFld;
                }
            }
        }

        FuzzerUtils.out.println("i13 i14 i15 = " + i13 + "," + i14 + "," + i15);
        FuzzerUtils.out.println("i16 s1 b2 = " + i16 + "," + s1 + "," + (b2 ? 1 : 0));
        FuzzerUtils.out.println("l1 i17 lArr = " + l1 + "," + i17 + "," + FuzzerUtils.checkSum(lArr));
        FuzzerUtils.out.println("Test = " + Test.instanceCount);

        FuzzerUtils.out.println("Test.instanceCount Test.dFld Test.iFld = " + Test.instanceCount +
            "," + Double.doubleToLongBits(Test.dFld) + "," + Test.iFld);
        FuzzerUtils.out.println("fFld Test.byFld Test.iArrFld = " + Float.floatToIntBits(fFld) + "," +
            Test.byFld + "," + FuzzerUtils.checkSum(Test.iArrFld));
        FuzzerUtils.out.println("Test = " + Test.instanceCount);

        FuzzerUtils.out.println("vMeth2_check_sum: " + vMeth2_check_sum);
        FuzzerUtils.out.println("vMeth1_check_sum: " + vMeth1_check_sum);
        FuzzerUtils.out.println("vMeth_check_sum: " + vMeth_check_sum);
    }
    public static void main(String[] strArr) {

        try {
            Test _instance = new Test();
            for (int i = 0; i < 10; i++ ) {
                _instance.mainTest(strArr);
            }
         } catch (Exception ex) {
            FuzzerUtils.out.println(ex.getClass().getCanonicalName());
         }
    }
}
///////////////////////////////////////////////////////////////////////
//DEBUG  Test ->  Test
//DEBUG  main ->  main
//DEBUG  mainTest ->  mainTest
//DEBUG  vMeth ->  vMeth mainTest
//DEBUG  vMeth1 ->  vMeth1 vMeth mainTest
//DEBUG  vMeth2 ->  vMeth2 vMeth1 vMeth mainTest
//DEBUG  Depth = 3
//DEBUG  Classes = 1
//DEBUG  static objects = {}
