public static int treeSize(Stella_Object self) {
    if (Stella_Object.safePrimaryType(self) == Stella.SGT_STELLA_CONS) {
      { Cons self000 = ((Cons)(self));

        if (self000 == Stella.NIL) {
          return (0);
        }
        else {
          return (1 + Stella_Object.treeSize(self000.value) + Stella_Object.treeSize(self000.rest));
        }
      }
    }
    else {
      return (0);
    }
  }