A method for controlling valves during an engine stop is presented. The
valves are controlled in a manner that can quiet the engine during a
stop. In addition, the valves may be selectively controlled to direct the
contents of the cylinder in a desired direction so that engine emissions
may be reduced.