SAN FRANCISCO -- San Francisco quarterback Alex Smith threw for 303 yards and three touchdowns, and the 49ers rolled up a franchise-record 621 net yards Sunday, routing the Buffalo Bills 45-3 at Candlestick Park.