public static Vector copyConsListToVariablesVector(Cons conslist) {
    if (conslist == Stella.NIL) {
      return (Logic.ZERO_VARIABLES_VECTOR);
    }
    { Vector vector = Vector.newVector(conslist.length());

      { Stella_Object t = null;
        Cons iter000 = conslist;
        int i = Stella.NULL_INTEGER;
        int iter001 = 0;

        for (;!(iter000 == Stella.NIL); iter000 = iter000.rest, iter001 = iter001 + 1) {
          t = iter000.value;
          i = iter001;
          (vector.theArray)[i] = (((PatternVariable)(t)));
        }
      }
      return (vector);
    }
  }