A student is observing a pendulum swinging back and forth. Each time it swings, the pendulum bob reaches a lower maximum, and eventually it comes to rest and hangs straight down vertically. What happens to the total energy of the pendulum? Does this violate the law of conservation of energy? Explain your reasoning.