/*
 * @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_3164
 * @run driver/timeout=180 applications.javafuzzer.TestDriver BASIC:240 -XX:-PrintWarnings -Xmx1G -XX:+IgnoreUnrecognizedVMOptions -XX:CompileCommand=quiet -XX:CompileCommand=compileonly,*Test*::* -Xcomp Test_3164
 * @run driver/timeout=180 applications.javafuzzer.TestDriver C2_STRESS:480 -XX:-PrintWarnings -Xmx1G -XX:+IgnoreUnrecognizedVMOptions -XX:CompileCommand=quiet -XX:CompileCommand=compileonly,*Test*::* -XX:-TieredCompilation -Xcomp -XX:+UnlockDiagnosticVMOptions -XX:StressSeed=895873744 Test_3164


 */

// Generated by Java* Fuzzer test generator (1.0.001). Tue Oct 14 22:28:02 2025
// Use '-Dtest_generator_rng_seed=132921838576037455620839992123689821004 to re-generate the same test code
public class Test_3164 {

    public static final int N = 400;

    public static long instanceCount=-133L;
    public static float fFld=-1.743F;
    public static volatile boolean bFld=false;
    public static int iFld=-49282;
    public static double dFld=-2.26536;
    public static volatile double dArrFld[]=new double[N];

    static {
        FuzzerUtils.init(Test_3164.dArrFld, 1.103002);
    }

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

    public static void vMeth1(int i3, int i4) {

        int i5=-5, i6=34386, i7=9, iArr[]=new int[N];
        short s=31361;
        boolean b=true, b1=true;
        byte by=-100;
        long lArr[]=new long[N];

        FuzzerUtils.init(iArr, 36);
        FuzzerUtils.init(lArr, 12L);

        i5 = 1;
        while (++i5 < 337) {
            iArr[i5 + 1] -= 12418;
            Test_3164.instanceCount += (((i5 * i5) + i5) - i3);
            Test_3164.instanceCount = s;
            Test_3164.instanceCount = 4;
            iArr[i5 - 1] >>= -60459;
        }
        i4 ^= -53460;
        for (i6 = 278; i6 > 7; i6--) {
            b = b;
            i7 *= i7;
            by -= (byte)i7;
            if (b) {
                i4 += (((i6 * Test_3164.instanceCount) + Test_3164.instanceCount) - i7);
                b = b1;
                i3 -= i5;
            } else if (b) {
                Test_3164.instanceCount >>>= i4;
            } else {
                lArr[i6] -= i4;
            }
        }
        vMeth1_check_sum += i3 + i4 + i5 + s + i6 + i7 + (b ? 1 : 0) + by + (b1 ? 1 : 0) + FuzzerUtils.checkSum(iArr) +
            FuzzerUtils.checkSum(lArr);
    }

    public static void vMeth(int i2) {

        int i8=11, i9=-14, i10=8, i11=4;
        byte by1=-62;
        float f1=0.899F;

        if (Test_3164.bFld) {
            vMeth1(i2, i2);
            Test_3164.fFld *= -14;
            Test_3164.fFld *= -230;
            for (i8 = 2; i8 < 128; ++i8) {
                i10 = 1;
                while (++i10 < 12) {
                    if (Test_3164.bFld) break;
                    i2 ^= by1;
                    for (f1 = 1; f1 < 1; f1++) {
                        i9 += (int)((long)f1 | (long)f1);
                        i9 |= Test_3164.iFld;
                        i9 += -208;
                        i2 -= (int)Test_3164.instanceCount;
                    }
                    Test_3164.instanceCount = Test_3164.instanceCount;
                }
                i11 += i10;
            }
        }
        vMeth_check_sum += i2 + i8 + i9 + i10 + by1 + Float.floatToIntBits(f1) + i11;
    }

    public static int iMeth() {

        float f=-111.344F;
        int i1=55, i12=-67, i13=66, i14=-1200, iArr1[]=new int[N];
        byte by2=124;
        double dArr[]=new double[N];

        FuzzerUtils.init(dArr, 40.127418);
        FuzzerUtils.init(iArr1, -53846);

        for (f = 12; f < 373; ++f) {
            vMeth(i1);
        }
        switch (((i1 >>> 1) % 1) + 41) {
        case 41:
            i12 = 1;
            do {
                by2 -= (byte)i1;
                i1 += (int)Test_3164.dFld;
                by2 = (byte)i1;
                i1 += i12;
                for (i13 = 6; i13 > i12; i13--) {
                    short s1=22121;
                    i1 *= -8;
                    iArr1 = iArr1;
                    Test_3164.iFld -= Test_3164.iFld;
                    s1 = (short)i13;
                }
            } while (++i12 < 274);
            iArr1[(Test_3164.iFld >>> 1) % N] += i13;
            break;
        default:
            iArr1[(Test_3164.iFld >>> 1) % N] = (int)-8L;
        }
        long meth_res = Float.floatToIntBits(f) + i1 + i12 + by2 + i13 + i14 +
            Double.doubleToLongBits(FuzzerUtils.checkSum(dArr)) + FuzzerUtils.checkSum(iArr1);
        iMeth_check_sum += meth_res;
        return (int)meth_res;
    }

    public void mainTest(String[] strArr1) {

        int i=14, i15=38066, i16=-7, i17=-4, i18=60586, i19=30423, i20=216, iArr2[]=new int[N];
        byte by3=-28;
        short s2=441;
        long lArr1[]=new long[N];

        FuzzerUtils.init(lArr1, -7478148367123746989L);
        FuzzerUtils.init(iArr2, 176);

        i ^= (int)(iMeth() + Test_3164.instanceCount);
        for (long l : lArr1) {
            Test_3164.bFld = Test_3164.bFld;
            i *= i;
            Test_3164.iFld = i;
            i15 = 1;
            while (++i15 < 63) {
                l += (i15 * i15);
                l = (long)Test_3164.fFld;
            }
            Test_3164.instanceCount -= (long)Test_3164.dFld;
            try {
                iArr2[(i >>> 1) % N] = (95 / iArr2[(i >>> 1) % N]);
                Test_3164.iFld = (-245 / i);
                iArr2[(-15155 >>> 1) % N] = (9 % i15);
            } catch (ArithmeticException a_e) {}
            for (i16 = 1; i16 < 63; i16++) {
                Test_3164.instanceCount |= i17;
                i += (int)33671L;
                iArr2[i16 - 1] = 162;
                Test_3164.dFld = Test_3164.iFld;
                iArr2[i16 - 1] *= i16;
                iArr2[i16 + 1] -= i17;
                by3 = (byte)l;
                Test_3164.instanceCount >>= s2;
                iArr2[(i17 >>> 1) % N] += (int)Test_3164.fFld;
                Test_3164.instanceCount = Test_3164.iFld;
            }
            for (i18 = 63; i18 > 3; --i18) {
                Test_3164.instanceCount -= l;
                i20 = 1;
                do {
                    by3 += (byte)(i20 * i20);
                    Test_3164.iFld |= i15;
                    Test_3164.iFld = i20;
                    i17 >>= Test_3164.iFld;
                    i = Test_3164.iFld;
                    Test_3164.dArrFld[i20 - 1] -= i17;
                } while (++i20 < 2);
            }
        }

        FuzzerUtils.out.println("i i15 i16 = " + i + "," + i15 + "," + i16);
        FuzzerUtils.out.println("i17 by3 s2 = " + i17 + "," + by3 + "," + s2);
        FuzzerUtils.out.println("i18 i19 i20 = " + i18 + "," + i19 + "," + i20);
        FuzzerUtils.out.println("lArr1 iArr2 Test_3164 = " + FuzzerUtils.checkSum(lArr1) + "," +
            FuzzerUtils.checkSum(iArr2) + "," + Test_3164.instanceCount);

        FuzzerUtils.out.println("Test_3164.instanceCount Test_3164.fFld Test_3164.bFld = " + Test_3164.instanceCount +
            "," + Float.floatToIntBits(Test_3164.fFld) + "," + (Test_3164.bFld ? 1 : 0));
        FuzzerUtils.out.println("Test_3164.iFld Test_3164.dFld Test_3164.dArrFld = " + Test_3164.iFld + "," +
            Double.doubleToLongBits(Test_3164.dFld) + "," +
            Double.doubleToLongBits(FuzzerUtils.checkSum(Test_3164.dArrFld)));
        FuzzerUtils.out.println("Test_3164 = " + Test_3164.instanceCount);

        FuzzerUtils.out.println("vMeth1_check_sum: " + vMeth1_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_3164 _instance = new Test_3164();
            for (int i = 0; i < 10; i++ ) {
                _instance.mainTest(strArr);
            }
         } catch (Exception ex) {
            FuzzerUtils.out.println(ex.getClass().getCanonicalName());
         }
    }
}
///////////////////////////////////////////////////////////////////////
//DEBUG  Test_3164 ->  Test_3164
//DEBUG  main ->  main
//DEBUG  mainTest ->  mainTest
//DEBUG  iMeth ->  iMeth mainTest
//DEBUG  vMeth ->  vMeth iMeth mainTest
//DEBUG  vMeth1 ->  vMeth1 vMeth iMeth mainTest
//DEBUG  Depth = 3
//DEBUG  Classes = 1
//DEBUG  static objects = {}
