/*
 * @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:600 -XX:-PrintWarnings -Xmx1G -XX:+IgnoreUnrecognizedVMOptions -XX:CompileCommand=quiet -XX:CompileCommand=compileonly,*Test*::* -XX:-TieredCompilation -Xbatch -XX:+UnlockDiagnosticVMOptions -XX:StressSeed=942240539 -XX:+VerifyLoopOptimizations -XX:VerifyIterativeGVN=1110 Test


 */

// Generated by Java* Fuzzer test generator (1.0.001). Tue Oct 21 11:10:15 2025
// Use '-Dtest_generator_rng_seed=7219664161033994026001744488677367935 to re-generate the same test code
public class Test {

    public static final int N = 400;

    public static long instanceCount=-8184521847874691389L;
    public static byte byFld=100;
    public static int iFld=-21172;
    public static float fFld=2.626F;
    public static boolean bFld=false;
    public static int iFld1=-7;
    public static int iArrFld[]=new int[N];
    public long lArrFld[]=new long[N];

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

    public static long iMeth_check_sum = 0;
    public static long dMeth_check_sum = 0;
    public static long vMeth_check_sum = 0;

    public static void vMeth(long l, byte by, int i2) {

        int i3=58578, i4=118, i5=-194, i6=11260, iArr[]=new int[N];
        boolean b1=false;
        double d=12.116031, d1=1.31695;

        FuzzerUtils.init(iArr, 51924);

        for (i3 = 4; i3 < 310; i3++) {
            i2 += i3;
            if (b1) continue;
            l += (((i3 * l) + i2) - i2);
        }
        d = 1;
        while ((d += 3) < 272) {
            i2 += (int)d;
            Test.instanceCount = i2;
            for (i5 = (int)(d); i5 < 17; i5++) {
                by += (byte)i6;
                i2 -= (int)d;
                d1 = l;
                iArr[(int)(d)] -= (int)l;
                i6 -= -9;
                i4 &= (int)Test.instanceCount;
            }
            i4 += (int)(((d * i2) + i6) - i5);
        }
        vMeth_check_sum += l + by + i2 + i3 + i4 + (b1 ? 1 : 0) + Double.doubleToLongBits(d) + i5 + i6 +
            Double.doubleToLongBits(d1) + FuzzerUtils.checkSum(iArr);
    }

    public static double dMeth(boolean b) {

        int i1=-24834, i7=64, i8=40, i9=62495, i10=60, i11=234;
        double d2=0.46079;

        i1 = 1;
        do {
            vMeth(Test.instanceCount, Test.byFld, i1);
            i7 *= (int)Test.instanceCount;
            i7 *= (int)d2;
            i7 += i1;
            for (i8 = 1; i8 < 5; ++i8) {
                Test.iArrFld[i8 + 1] = 47472;
            }
            i7 = i9;
            i7 += (int)d2;
            i9 = Test.iFld;
            Test.instanceCount = i7;
            Test.iFld += i7;
        } while (++i1 < 328);
        for (i10 = 8; i10 < 211; i10++) {
            Test.instanceCount += (-156 + (i10 * i10));
            Test.fFld += Test.fFld;
        }
        long meth_res = (b ? 1 : 0) + i1 + i7 + Double.doubleToLongBits(d2) + i8 + i9 + i10 + i11;
        dMeth_check_sum += meth_res;
        return (double)meth_res;
    }

    public static int iMeth() {

        int i=166, i12=-57255, i13=50790, i14=10, i15=-3982;

        i <<= (int)(dMeth(Test.bFld) + 61);
        for (i12 = 257; i12 > 7; i12 -= 2) {
            Test.fFld += i12;
            Test.instanceCount = -9;
            i13 ^= i12;
            Test.fFld = i13;
            i += i;
            Test.instanceCount += Test.instanceCount;
            if (Test.bFld) {
                i14 = 1;
                do {
                    i13 += (((i14 * Test.byFld) + i12) - Test.instanceCount);
                    Test.iFld -= (int)Test.fFld;
                } while (++i14 < 13);
            } else if (Test.bFld) {
                i15 = 1;
                do {
                    Test.iFld1 += (i15 ^ Test.instanceCount);
                } while ((i15 += 2) < 13);
                try {
                    Test.iFld = (i / Test.iFld);
                    i = (Test.iFld / 77);
                    i = (i15 % i13);
                } catch (ArithmeticException a_e) {}
            } else {
                Test.iFld <<= (int)Test.instanceCount;
            }
        }
        long meth_res = i + i12 + i13 + i14 + i15;
        iMeth_check_sum += meth_res;
        return (int)meth_res;
    }

    public void mainTest(String[] strArr1) {

        int i16=-11792, i17=26888, i18=-5, i19=-6, i20=17603, i21=-85, i22=0, i23=1016, i24=239, i25=38541;
        double d3=-1.40832, dArr[]=new double[N];

        FuzzerUtils.init(dArr, 109.114245);

        Test.instanceCount *= iMeth();
        for (i16 = 21; i16 < 376; ++i16) {
            for (i18 = 3; i18 < 71; i18++) {
                i19 += Test.iFld1;
                Test.iFld += (((i18 * Test.iFld1) + Test.instanceCount) - Test.fFld);
                Test.instanceCount += (i18 * i18);
                Test.iArrFld[i18] = (int)d3;
            }
            for (i20 = 4; i20 < 71; ++i20) {
                Test.instanceCount += Test.iFld1;
                Test.fFld += Test.fFld;
                dArr[i16 + 1] -= i21;
                i17 = (int)Test.instanceCount;
                for (i22 = i16; i22 < 2; i22++) {
                    Test.iFld += (int)6L;
                    Test.fFld += i22;
                }
                Test.instanceCount <<= i21;
                i19 = 127;
                i23 += (((i20 * i17) + i19) - Test.iFld1);
                Test.instanceCount *= i19;
            }
            i21 += (i16 + i20);
            lArrFld[i16] >>= Test.iFld;
            for (i24 = i16; i24 < 71; i24++) {
                Test.instanceCount = -55397;
                if (Test.bFld) break;
                Test.iArrFld[i24] += (int)d3;
            }
            i17 = (int)1349318816L;
        }
        i25 -= Test.iFld;
        Test.iArrFld[(Test.iFld1 >>> 1) % N] = Test.iFld1;
        Test.iFld1 += Test.iFld;
        Test.iArrFld[(Test.iFld >>> 1) % N] ^= i18;

        FuzzerUtils.out.println("i16 i17 i18 = " + i16 + "," + i17 + "," + i18);
        FuzzerUtils.out.println("i19 d3 i20 = " + i19 + "," + Double.doubleToLongBits(d3) + "," + i20);
        FuzzerUtils.out.println("i21 i22 i23 = " + i21 + "," + i22 + "," + i23);
        FuzzerUtils.out.println("i24 i25 dArr = " + i24 + "," + i25 + "," +
            Double.doubleToLongBits(FuzzerUtils.checkSum(dArr)));
        FuzzerUtils.out.println("Test = " + Test.instanceCount);

        FuzzerUtils.out.println("Test.instanceCount Test.byFld Test.iFld = " + Test.instanceCount +
            "," + Test.byFld + "," + Test.iFld);
        FuzzerUtils.out.println("Test.fFld Test.bFld Test.iFld1 = " +
            Float.floatToIntBits(Test.fFld) + "," + (Test.bFld ? 1 : 0) + "," + Test.iFld1);
        FuzzerUtils.out.println("Test.iArrFld lArrFld Test = " + FuzzerUtils.checkSum(Test.iArrFld) +
            "," + FuzzerUtils.checkSum(lArrFld) + "," + Test.instanceCount);

        FuzzerUtils.out.println("vMeth_check_sum: " + vMeth_check_sum);
        FuzzerUtils.out.println("dMeth_check_sum: " + dMeth_check_sum);
        FuzzerUtils.out.println("iMeth_check_sum: " + iMeth_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  iMeth ->  iMeth mainTest
//DEBUG  dMeth ->  dMeth iMeth mainTest
//DEBUG  vMeth ->  vMeth dMeth iMeth mainTest
//DEBUG  Depth = 3
//DEBUG  Classes = 1
//DEBUG  static objects = {}
