import jdk.internal.vm.annotation.NullRestricted;
import jdk.internal.vm.annotation.Strict;

public class Test {
    static int test178Idx = 0;

    static Value178[] test178Values;
    
    static int rI = 0;
    static double rD = 0;
    static long rL = 0;

    static value class IntBox {
        Integer integerValue;

        public IntBox(int i, Integer integerValue) {
            this.integerValue = integerValue;
        }

        public IntBox(IntBox other, int[] offsets) {
            this.integerValue = other.integerValue + offsets[test178Idx++];
        }
    }

    static value class Value178_1 {
        long l1;
        long l2;
        @Strict
        @NullRestricted
        IntBox prims1;
        IntBox prims2;
        Integer i;

        public Value178_1() {
            this.l1 = rL;
            this.l2 = rL + 1;
            this.prims1 = new IntBox(rI, rI);
            this.prims2 = new IntBox(rI, rI);
            this.i = rI;
        }

        public static IntBox doIt1(Value178_1 other, int[] offsets) {
            return (offsets[test178Idx++] != 0) ? null : new IntBox(other.prims2, offsets);
        }

        public static Integer doIt2(Value178_1 other, int[] offsets) {
            return (offsets[test178Idx++] != 0) ? null : (other.i + offsets[test178Idx++]);
        }

        public Value178_1(Value178_1 other, int[] offsets) {
            this.l1 = other.l1 + offsets[test178Idx++];
            this.l2 = other.l2 + offsets[test178Idx++];
            this.prims1 = new IntBox(other.prims1, offsets);
            this.prims2 = doIt1(other, offsets);
            this.i = doIt2(other, offsets);
        }
    }

    static value class Value178 {
        @Strict
        @NullRestricted
        Value178_1 val1;

        Value178_1 val2;

        @NullRestricted
        Value178_1 val3;

        Value178_1 val4;

        @Strict
        @NullRestricted
        IntBox prims1;

        IntBox prims2;

        public Value178() {
            this.val1 = new Value178_1();
            this.val2 = new Value178_1();
            this.val3 = new Value178_1();
            this.val4 = new Value178_1();
            this.prims1 = new IntBox(rI, rI);
            this.prims2 = new IntBox(rI, rI);
        }

        public static Value178_1 doIt1(Value178 other, int[] offsets) {
            return (offsets[test178Idx++] != 0) ? null : new Value178_1(other.val2, offsets);
        }

        public static Value178_1 doIt2(Value178 other, int[] offsets) {
            return (offsets[test178Idx++] != 0) ? null : new Value178_1(other.val4, offsets);
        }

        public static IntBox doIt3(Value178 other, int[] offsets) {
            return (offsets[test178Idx++] != 0) ? null : new IntBox(other.prims2, offsets);
        }

        public Value178(Value178 other, int[] offsets) {
            test178Idx = 0;
            this.val1 = new Value178_1(other.val1, offsets);
            this.val2 = doIt1(other, offsets);
            this.val3 = new Value178_1(other.val3, offsets);
            this.val4 = doIt2(other, offsets);
            this.prims1 = new IntBox(other.prims1, offsets);
            this.prims2 = doIt3(other, offsets);
        }
    }

    static void init() {
        Value178 defVal = new Value178();

        int[] offsets = new int[115];
        Value178 val2 = new Value178(defVal, offsets);

        test178Values = new Value178[offsets.length];
        for (int i = 0; i < offsets.length; ++i) {
            test178Values[i] = new Value178(defVal, offsets);
        }
    }

    public static void main(String[] args) {
        for (int i = 0; i < 50_000; ++i) {
            init();
        }
    }
}
