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


 */

// Generated by Java* Fuzzer test generator (1.0.001). Mon May 26 21:16:45 2025
// Use '-Dtest_generator_rng_seed=168783228626388397093416996576705864977 to re-generate the same test code
public class Test {

    public static final int N = 400;

    public static volatile long instanceCount=-195L;
    public static boolean bFld=false;
    public byte byFld=47;
    public static float fArrFld[]=new float[N];
    public static double dArrFld[]=new double[N];
    public static int iArrFld[]=new int[N];

    static {
        FuzzerUtils.init(Test.fArrFld, 1.612F);
        FuzzerUtils.init(Test.dArrFld, 68.5812);
        FuzzerUtils.init(Test.iArrFld, -62408);
    }

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

    public static int iMeth1() {

        int i15=-104, i16=-175, i17=-25535, i18=23, i19=7, i20=-10;
        short s=-1444;
        float f3=-1.823F;
        long lArr1[]=new long[N];

        FuzzerUtils.init(lArr1, 3L);

        i15 *= -20021;
        i16 = 1;
        do {
            Test.bFld = false;
            i15 = i15;
            lArr1[i16 - 1] *= i16;
            if (Test.bFld) continue;
            for (i17 = 1; i17 < 6; i17++) {
                i15 -= 50313;
                i18 <<= -241;
                Test.instanceCount |= s;
                lArr1[i16 - 1] >>= i15;
            }
        } while (++i16 < 259);
        for (i19 = 4; i19 < 315; ++i19) {
            try {
                Test.iArrFld[i19 + 1] = (i17 / 310661559);
                Test.iArrFld[i19] = (i19 % -38733);
                i20 = (i17 / i15);
            } catch (ArithmeticException a_e) {}
            f3 += i20;
            i15 = 3;
        }
        long meth_res = i15 + i16 + i17 + i18 + s + i19 + i20 + Float.floatToIntBits(f3) + FuzzerUtils.checkSum(lArr1);
        iMeth1_check_sum += meth_res;
        return (int)meth_res;
    }

    public static void vMeth(int i10) {

        double d1=-38.39255;
        int i11=-2, i12=-18935, i13=-177, i14=-41, i21=-1, i22=-50794, i23=-134, i24=202;
        byte by=-70;
        float f4=-90.463F;

        i10 = (i10++);
        d1 = (i10--);
        for (i11 = 7; i11 < 163; ++i11) {
            for (i13 = 1; 10 > i13; ++i13) {
                Test.iArrFld[i11 - 1] <<= (int)(Math.min((int)(Test.instanceCount * by), -3753 + iMeth1()) /
                    ((long)(d1) | 1));
                for (i21 = 2; i21 > 1; i21--) {
                    Test.instanceCount += i21;
                    Test.iArrFld[i13 - 1] -= (int)Test.instanceCount;
                    f4 += (i21 + Test.instanceCount);
                    d1 += -1;
                }
                for (i23 = 1; i23 < 2; ++i23) {
                    Test.instanceCount += i14;
                    Test.instanceCount -= i11;
                    Test.iArrFld = Test.iArrFld;
                    Test.bFld = true;
                }
            }
        }
        vMeth_check_sum += i10 + Double.doubleToLongBits(d1) + i11 + i12 + i13 + i14 + by + i21 + i22 +
            Float.floatToIntBits(f4) + i23 + i24;
    }

    public static int iMeth(int i7, int i8, int i9) {

        int i25=15, i26=5, i27=10;
        double d2=-12.105884;
        float f5=2.742F;
        long lArr2[]=new long[N];

        FuzzerUtils.init(lArr2, 122L);

        vMeth(i9);
        Test.dArrFld[(i7 >>> 1) % N] -= i7;
        for (long l : lArr2) {
            lArr2[(i7 >>> 1) % N] *= i8;
            i25 = 1;
            do {
                i9 >>= -19509;
                for (i26 = 1; i26 < 1; i26 += 3) {
                    i9 = 6;
                }
                d2 = f5;
                i8 = (int)f5;
                lArr2 = lArr2;
                i27 = i27;
                i9 = (int)l;
            } while (++i25 < 4);
            i8 = i27;
            f5 += 136;
        }
        long meth_res = i7 + i8 + i9 + i25 + i26 + i27 + Double.doubleToLongBits(d2) + Float.floatToIntBits(f5) +
            FuzzerUtils.checkSum(lArr2);
        iMeth_check_sum += meth_res;
        return (int)meth_res;
    }

    public void mainTest(String[] strArr1) {

        int i=0, i1=-6, i2=-14, i3=0, i4=7375, i5=6, i6=63274, i28=-28, i29=-131;
        float f=80.140F, f1=0.574F, f2=-105.462F;
        double d=2.31061;
        long lArr[]=new long[N];

        FuzzerUtils.init(lArr, -20399L);

        for (i = 9; i < 194; i++) {
            for (f = 6; 136 > f; f++) {
                Test.instanceCount |= i;
                for (i3 = 1; i3 < 2; i3++) {
                    Test.fArrFld[i3] = (float)d;
                    d *= Math.sqrt(--d);
                    f1 = lArr[i3];
                }
                i1 += (int)(Test.dArrFld[(int)(f - 1)]--);
                f1 += (float)(Math.sqrt(Test.instanceCount - f1) + (i3 + i));
                for (i5 = (int)(f); i5 < 2; i5++) {
                    Test.bFld = Test.bFld;
                    switch ((int)((f % 1) + 119)) {
                    case 119:
                        Test.instanceCount += (((i5 * i3) + i4) - i2);
                        break;
                    default:
                        f2 += iMeth(i5, i6, i5);
                        Test.instanceCount = byFld;
                        i2 = i6;
                    }
                    Test.instanceCount = Test.instanceCount;
                    i1 = 54928;
                    try {
                        i2 = (i3 % -69);
                        i2 = (-4 / i6);
                        i2 = (i4 % -16415);
                    } catch (ArithmeticException a_e) {}
                }
            }
            Test.instanceCount = 38871;
            for (i28 = 3; i28 < 136; ++i28) {
                i2 = (int)Test.instanceCount;
                i6 |= -105;
                if (Test.bFld) break;
                i6 = (int)Test.instanceCount;
                Test.instanceCount -= Test.instanceCount;
                i2 >>= -26505;
                Test.instanceCount -= -139;
            }
            Test.instanceCount = byFld;
            Test.fArrFld[i - 1] = i29;
        }

        FuzzerUtils.out.println("i i1 f = " + i + "," + i1 + "," + Float.floatToIntBits(f));
        FuzzerUtils.out.println("i2 i3 i4 = " + i2 + "," + i3 + "," + i4);
        FuzzerUtils.out.println("d f1 i5 = " + Double.doubleToLongBits(d) + "," + Float.floatToIntBits(f1) + "," + i5);
        FuzzerUtils.out.println("i6 f2 i28 = " + i6 + "," + Float.floatToIntBits(f2) + "," + i28);
        FuzzerUtils.out.println("i29 lArr Test = " + i29 + "," + FuzzerUtils.checkSum(lArr) + "," +
            Test.instanceCount);

        FuzzerUtils.out.println("Test.instanceCount Test.bFld byFld = " + Test.instanceCount + "," +
            (Test.bFld ? 1 : 0) + "," + byFld);
        FuzzerUtils.out.println("Test.fArrFld Test.dArrFld Test.iArrFld = " +
            Double.doubleToLongBits(FuzzerUtils.checkSum(Test.fArrFld)) + "," +
            Double.doubleToLongBits(FuzzerUtils.checkSum(Test.dArrFld)) + "," +
            FuzzerUtils.checkSum(Test.iArrFld));
        FuzzerUtils.out.println("Test = " + Test.instanceCount);

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