/*
 * @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=1418315396 -XX:+UnlockDiagnosticVMOptions -XX:+StressLCM -XX:+StressGCM -XX:+StressIGVN -XX:+StressCCP -XX:+StressMacroExpansion -XX:+StressLoopPeeling -XX:+VerifyLoopOptimizations -XX:VerifyIterativeGVN=10 Test


 */

// Generated by Java* Fuzzer test generator (1.0.001). Mon Jul  7 22:11:01 2025
// Use '-Dtest_generator_rng_seed=119614928766176289188599748674545330427 to re-generate the same test code
public class Test {

    public static final int N = 400;

    public static long instanceCount=46921L;
    public volatile boolean bFld=false;
    public byte byFld=86;
    public static volatile short sFld=30283;
    public static float fFld=-28.785F;
    public static volatile int iArrFld[]=new int[N];
    public static long lArrFld[][]=new long[N][N];
    public static short sArrFld[]=new short[N];

    static {
        FuzzerUtils.init(Test.iArrFld, -39652);
        FuzzerUtils.init(Test.lArrFld, 5636L);
        FuzzerUtils.init(Test.sArrFld, (short)5770);
    }

    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(int i4, long l) {

        float f1=0.677F;
        int i5=-4, i7=5, i8=28573, i9=-24826, i10=-12;

        i4 -= i4;
        f1 += i4;
        i5 = 1;
        while (++i5 < 166) {
            i4 += (int)-45.72106;
            if (true) {
                for (i7 = i5; 10 > i7; ++i7) {
                    Test.instanceCount += (i7 - Test.instanceCount);
                    for (i9 = 1; i9 < 1; i9++) {
                        i8 += (i9 - i5);
                        try {
                            i10 = (i9 / 84);
                            i10 = (i9 % i4);
                            i4 = (49136 % i9);
                        } catch (ArithmeticException a_e) {}
                    }
                    Test.iArrFld[i5] = (int)Test.instanceCount;
                    Test.instanceCount += (((i7 * i4) + i9) - i7);
                    i10 *= (int)f1;
                }
                i4 = i9;
                i8 += (((i5 * f1) + Test.instanceCount) - i9);
            }
        }
        vMeth2_check_sum += i4 + l + Float.floatToIntBits(f1) + i5 + i7 + i8 + i9 + i10;
    }

    public static void vMeth1(float f, int i3, boolean b) {

        int i11=-48449, i12=47564, i13=-52759, i14=58177, i15=-11, i16=11, i17=4;
        short s1=-30885;
        byte by1=-81;
        double d=2.82364;

        vMeth2(i3, Test.instanceCount);
        for (i11 = 12; i11 < 373; ++i11) {
            s1 >>= (short)i11;
        }
        for (i13 = 3; 212 > i13; i13++) {
            Test.lArrFld[i13][i13 + 1] -= i11;
            if (i14 != 0) {
                vMeth1_check_sum += Float.floatToIntBits(f) + i3 + (b ? 1 : 0) + i11 + i12 + s1 + i13 + i14 + by1 +
                    Double.doubleToLongBits(d) + i15 + i16 + i17;
                return;
            }
            Test.sArrFld[i13] -= by1;
            i3 = (int)d;
            for (i15 = 1; 8 > i15; ++i15) {
                i12 *= i16;
                i14 = -195;
                if (b) continue;
                i17 += (-2 + (i15 * i15));
                b = b;
                f -= s1;
            }
        }
        vMeth1_check_sum += Float.floatToIntBits(f) + i3 + (b ? 1 : 0) + i11 + i12 + s1 + i13 + i14 + by1 +
            Double.doubleToLongBits(d) + i15 + i16 + i17;
    }

    public void vMeth(short s) {

        int i1=-1, i2=-8694, i18=-118, i19=-189, i20=30795, i21=-119, i22=-14, i23=-162;
        float f2=1.786F;
        boolean bArr[]=new boolean[N];

        FuzzerUtils.init(bArr, false);

        for (i1 = 19; i1 < 337; i1++) {
            bFld = ((bFld && (i1 > i2)) || bArr[i1 + 1]);
            s += (short)(((i1 * i2) + byFld) - i2);
            vMeth1(f2, i2, bFld);
            if (bFld) continue;
            for (i18 = i1; i18 < 5; i18++) {
                for (i20 = 1; i20 < 1; i20++) {
                    Test.instanceCount += (i20 - byFld);
                    i2 <<= i18;
                }
            }
            switch (((i1 % 1) * 5) + 53) {
            case 55:
                Test.instanceCount += Test.instanceCount;
                for (i22 = 1; i22 < 5; i22 += 2) {
                    Test.lArrFld[i22 + 1] = Test.lArrFld[i22 - 1];
                }
                break;
            }
            Test.iArrFld[i1] += i18;
            i23 += i18;
        }
        vMeth_check_sum += s + i1 + i2 + Float.floatToIntBits(f2) + i18 + i19 + i20 + i21 + i22 + i23 +
            FuzzerUtils.checkSum(bArr);
    }

    public void mainTest(String[] strArr1) {

        int i=-32468, i24=13647, i25=12580;
        byte by=14;

        Test.iArrFld[(i >>> 1) % N] >>= i;
        i = i;
        by -= (byte)(++i);
        vMeth(Test.sFld);
        i += (int)Test.fFld;
        for (i24 = 342; i24 > 11; i24--) {
            if (bFld) continue;
            Test.fFld += i25;
        }

        FuzzerUtils.out.println("i by i24 = " + i + "," + by + "," + i24);
        FuzzerUtils.out.println("i25 Test = " + i25 + "," + Test.instanceCount);

        FuzzerUtils.out.println("Test.instanceCount bFld byFld = " + Test.instanceCount + "," + (bFld ? 1 : 0)
            + "," + byFld);
        FuzzerUtils.out.println("Test.sFld Test.fFld Test.iArrFld = " + Test.sFld + "," +
            Float.floatToIntBits(Test.fFld) + "," + FuzzerUtils.checkSum(Test.iArrFld));
        FuzzerUtils.out.println("Test.lArrFld Test.sArrFld Test = " +
            FuzzerUtils.checkSum(Test.lArrFld) + "," + FuzzerUtils.checkSum(Test.sArrFld) + "," +
            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 = {}
