The lungs to release carbon dioxide from the bloodstream into the atmosphere, in a process of gas exchange.