* @param index
   * @return Stella_Object
   */
  public static Stella_Object consTreeNth(Cons tree, Cons index) {
    { Stella_Object result = tree;

      { int i = Stella.NULL_INTEGER;
        Cons iter000 = index;

        for (;!(iter000 == Stella.NIL); iter000 = iter000.rest) {
          i = ((IntegerWrapper)(iter000.value)).wrapperValue;
          if (Stella_Object.safePrimaryType(result) == Stella.SGT_STELLA_CONS) {
            { Cons result000 = ((Cons)(result));

              tree = result000;
            }
          }
          else {
            return (null);
          }
          result = tree.nth(i);
        }
      }
      return (result);
    }
  }