If the named card is found, everything from the top of the library down to the named card is put into the graveyard and the library isn’t shuffled. If the named card isn’t in the library, no cards are put into the graveyard and the library is shuffled.