What are the functions of the liver? How does an impaired liver…