content: package androidx.constraintlayout.core.widgets;
  
  import androidx.constraintlayout.core.LinearSystem;
  import androidx.constraintlayout.core.widgets.ConstraintWidget;
  
  public class Optimizer {
      static final int FLAG_CHAIN_DANGLING = 1;
      static final int FLAG_RECOMPUTE_BOUNDS = 2;
      static final int FLAG_USE_OPTIMIZE = 0;
      public static final int OPTIMIZATION_BARRIER = 2;
      public static final int OPTIMIZATION_CACHE_MEASURES = 256;
      public static final int OPTIMIZATION_CHAIN = 4;
      public static final int OPTIMIZATION_DEPENDENCY_ORDERING = 512;
      public static final int OPTIMIZATION_DIMENSIONS = 8;
      public static final int OPTIMIZATION_DIRECT = 1;
      public static final int OPTIMIZATION_GRAPH = 64;
      public static final int OPTIMIZATION_GRAPH_WRAP = 128;
      public static final int OPTIMIZATION_GROUPING = 1024;
      public static final int OPTIMIZATION_GROUPS = 32;
      public static final int OPTIMIZATION_NONE = 0;
      public static final int OPTIMIZATION_RATIO = 16;
      public static final int OPTIMIZATION_STANDARD = 257;
      static boolean[] flags = new boolean[3];
  
      static void checkMatchParent(ConstraintWidgetContainer container, LinearSystem system, ConstraintWidget widget) {
          widget.mHorizontalResolution = -1;
          widget.mVerticalResolution = -1;
          if (container.mListDimensionBehaviors[0] != ConstraintWidget.DimensionBehaviour.WRAP_CONTENT && widget.mListDimensionBehaviors[0] == ConstraintWidget.DimensionBehaviour.MATCH_PARENT) {
              int i = widget.mLeft.mMargin;
              int width = container.getWidth() - widget.mRight.mMargin;
              widget.mLeft.mSolverVariable = system.createObjectVariable(widget.mLeft);
              widget.mRight.mSolverVariable = system.createObjectVariable(widget.mRight);
              system.addEquality(widget.mLeft.mSolverVariable, i);
              system.addEquality(widget.mRight.mSolverVariable, width);
              widget.mHorizontalResolution = 2;
              widget.setHorizontalDimension(i, width);
          }
          if (container.mListDimensionBehaviors[1] != ConstraintWidget.DimensionBehaviour.WRAP_CONTENT && widget.mListDimensionBehaviors[1] == ConstraintWidget.DimensionBehaviour.MATCH_PARENT) {
              int i2 = widget.mTop.mMargin;
              int height = container.getHeight() - widget.mBottom.mMargin;
              widget.mTop.mSolverVariable = system.createObjectVariable(widget.mTop);
              widget.mBottom.mSolverVariable = system.createObjectVariable(widget.mBottom);
              system.addEquality(widget.mTop.mSolverVariable, i2);
              system.addEquality(widget.mBottom.mSolverVariable, height);
              if (widget.mBaselineDistance > 0 || widget.getVisibility() == 8) {
                  widget.mBaseline.mSolverVariable = system.createObjectVariable(widget.mBaseline);
                  system.addEquality(widget.mBaseline.mSolverVariable, widget.mBaselineDistance + i2);
              }
              widget.mVerticalResolution = 2;
              widget.setVerticalDimension(i2, height);
          }
      }
  
      public static final boolean enabled(int optimizationLevel, int optimization) {
          return (optimizationLevel & optimization) == optimization;
      }
  }
  