// Path: src/main/java/io/usethesource/criterion/api/JmhValue.java
// @CompilerControl(Mode.DONT_INLINE)
// public interface JmhValue {
// 
//   /**
//    * Removes the JmhValue delegation object to reveal its internal representation.
//    *
//    * @return internal representation
//    */
//   Object unwrap();
// 
// }
// 
// Path: src/main/java/io/usethesource/criterion/generators/JmhSleepingIntegerGenerator.java
// public class JmhSleepingIntegerGenerator extends Generator<JmhValue> {
// 
//   public JmhSleepingIntegerGenerator() {
//     super(JmhValue.class);
//   }
// 
//   @Override
//   public JmhValue generate(SourceOfRandomness random, GenerationStatus status) {
//     return new SleepingInteger(random.nextInt());
//   }
// 
// }
// 
// Path: src/main/java/io/usethesource/criterion/BenchmarkUtils.java
// public static int seedFromSizeAndRun(int size, int run) {
//   return mix(size) ^ mix(run);
// }


import java.util.Arrays;
import java.util.Random;
import java.util.concurrent.TimeUnit;
import java.util.function.Function;
import java.util.function.Supplier;
import com.pholser.junit.quickcheck.generator.GenerationStatus;
import com.pholser.junit.quickcheck.generator.Generator;
import com.pholser.junit.quickcheck.internal.GeometricDistribution;
import com.pholser.junit.quickcheck.internal.generator.SimpleGenerationStatus;
import com.pholser.junit.quickcheck.random.SourceOfRandomness;
import io.usethesource.capsule.Set;
import io.usethesource.capsule.generators.set.AbstractSetGenerator;
import io.usethesource.capsule.generators.set.SetGeneratorDefault;
import io.usethesource.capsule.generators.set.SetGeneratorMemoizedLazyHashCode;
import io.usethesource.capsule.generators.set.SetGeneratorSpec0To8;
import io.usethesource.criterion.api.JmhValue;
import io.usethesource.criterion.generators.JmhSleepingIntegerGenerator;
import org.openjdk.jmh.annotations.Benchmark;
import org.openjdk.jmh.annotations.BenchmarkMode;
import org.openjdk.jmh.annotations.Level;
import org.openjdk.jmh.annotations.Mode;
import org.openjdk.jmh.annotations.OutputTimeUnit;
import org.openjdk.jmh.annotations.Param;
import org.openjdk.jmh.annotations.Scope;
import org.openjdk.jmh.annotations.Setup;
import org.openjdk.jmh.annotations.State;
import org.openjdk.jmh.infra.Blackhole;
import org.openjdk.jmh.runner.Runner;
import org.openjdk.jmh.runner.RunnerException;
import org.openjdk.jmh.runner.options.Options;
import org.openjdk.jmh.runner.options.OptionsBuilder;
import org.openjdk.jmh.runner.options.TimeValue;
import static io.usethesource.criterion.BenchmarkUtils.seedFromSizeAndRun;

  @Param({"0"}) // "1", "2", "3", "4", "5", "6", "7", "8", "9"
  protected int run;

  private Set.Immutable<JmhValue> testSet1;
  private Set.Immutable<JmhValue> testSet2;
  private Set.Immutable<JmhValue> testSetCommon;

  private Set.Immutable<JmhValue> testSet1Duplicate;
  private Set.Immutable<JmhValue> testSet2Duplicate;

  public JmhValue VALUE_EXISTING;
  public JmhValue VALUE_NOT_EXISTING;

  public static final int CACHED_NUMBERS_SIZE = 8;
  public JmhValue[] cachedNumbers = new JmhValue[CACHED_NUMBERS_SIZE];
  public JmhValue[] cachedNumbersNotContained = new JmhValue[CACHED_NUMBERS_SIZE];

  public static final Class<JmhValue> payloadToken = JmhValue.class;

  @Setup(Level.Trial)

  public void setUp() throws Exception {
    final Generator<JmhValue> itemGenerator;
    final AbstractSetGenerator<? extends Set.Immutable> collectionGenerator;

    final SourceOfRandomness random0 = new SourceOfRandomness(new Random(13));
    final GenerationStatus status0 = freshGenerationStatus.apply(random0);

    try {
// Path: src/main/java/io/usethesource/criterion/api/JmhValue.java
// @CompilerControl(Mode.DONT_INLINE)
// public interface JmhValue {
// 
//   /**
//    * Removes the JmhValue delegation object to reveal its internal representation.
//    *
//    * @return internal representation
//    */
//   Object unwrap();
// 
// }
// 
// Path: src/main/java/io/usethesource/criterion/generators/JmhSleepingIntegerGenerator.java
// public class JmhSleepingIntegerGenerator extends Generator<JmhValue> {
// 
//   public JmhSleepingIntegerGenerator() {
//     super(JmhValue.class);
//   }
// 
//   @Override
//   public JmhValue generate(SourceOfRandomness random, GenerationStatus status) {
//     return new SleepingInteger(random.nextInt());
//   }
// 
// }
// 
// Path: src/main/java/io/usethesource/criterion/BenchmarkUtils.java
// public static int seedFromSizeAndRun(int size, int run) {
//   return mix(size) ^ mix(run);
// }


// Path: src/main/java/io/usethesource/criterion/JmhCapsuleSetBenchmark.java
import java.util.Arrays;
import java.util.Random;
import java.util.concurrent.TimeUnit;
import java.util.function.Function;
import java.util.function.Supplier;
import com.pholser.junit.quickcheck.generator.GenerationStatus;
import com.pholser.junit.quickcheck.generator.Generator;
import com.pholser.junit.quickcheck.internal.GeometricDistribution;
import com.pholser.junit.quickcheck.internal.generator.SimpleGenerationStatus;
import com.pholser.junit.quickcheck.random.SourceOfRandomness;
import io.usethesource.capsule.Set;
import io.usethesource.capsule.generators.set.AbstractSetGenerator;
import io.usethesource.capsule.generators.set.SetGeneratorDefault;
import io.usethesource.capsule.generators.set.SetGeneratorMemoizedLazyHashCode;
import io.usethesource.capsule.generators.set.SetGeneratorSpec0To8;
import io.usethesource.criterion.api.JmhValue;
import io.usethesource.criterion.generators.JmhSleepingIntegerGenerator;
import org.openjdk.jmh.annotations.Benchmark;
import org.openjdk.jmh.annotations.BenchmarkMode;
import org.openjdk.jmh.annotations.Level;
import org.openjdk.jmh.annotations.Mode;
import org.openjdk.jmh.annotations.OutputTimeUnit;
import org.openjdk.jmh.annotations.Param;
import org.openjdk.jmh.annotations.Scope;
import org.openjdk.jmh.annotations.Setup;
import org.openjdk.jmh.annotations.State;
import org.openjdk.jmh.infra.Blackhole;
import org.openjdk.jmh.runner.Runner;
import org.openjdk.jmh.runner.RunnerException;
import org.openjdk.jmh.runner.options.Options;
import org.openjdk.jmh.runner.options.OptionsBuilder;
import org.openjdk.jmh.runner.options.TimeValue;
import static io.usethesource.criterion.BenchmarkUtils.seedFromSizeAndRun;


  @Param({"0"}) // "1", "2", "3", "4", "5", "6", "7", "8", "9"
  protected int run;

  private Set.Immutable<JmhValue> testSet1;
  private Set.Immutable<JmhValue> testSet2;
  private Set.Immutable<JmhValue> testSetCommon;

  private Set.Immutable<JmhValue> testSet1Duplicate;
  private Set.Immutable<JmhValue> testSet2Duplicate;

  public JmhValue VALUE_EXISTING;
  public JmhValue VALUE_NOT_EXISTING;

  public static final int CACHED_NUMBERS_SIZE = 8;
  public JmhValue[] cachedNumbers = new JmhValue[CACHED_NUMBERS_SIZE];
  public JmhValue[] cachedNumbersNotContained = new JmhValue[CACHED_NUMBERS_SIZE];

  public static final Class<JmhValue> payloadToken = JmhValue.class;

  @Setup(Level.Trial)

  public void setUp() throws Exception {
    final Generator<JmhValue> itemGenerator;
    final AbstractSetGenerator<? extends Set.Immutable> collectionGenerator;

    final SourceOfRandomness random0 = new SourceOfRandomness(new Random(13));
    final GenerationStatus status0 = freshGenerationStatus.apply(random0);

    try {
      itemGenerator = new JmhSleepingIntegerGenerator();