Asset Sale of IP
Selling the IP if you created it will cause you to be hit with personal income tax with a top rate of 35% for the full amount of the IP, since self-created IP has a basis of zero.
Stock Sale of the S Corp
Selling the stock of the S Corp will be less because: 1) Your basis may be higher in the S Corporation shares because you had to put cash in to buy them and you may have put other cash in to fund the business, which also increases the basis in the stock and 2) The sale of S Corporation shares may be eligible for long term capital gains treatment, which is 15%
Note: This is not legal advice and should not be construed as such, and does not create an attorney client relationship.