49ers flatten Cardinals 24-3, Smith almost perfect