The body's ability to adjust breathing rate and depth to maintain proper levels of oxygen and carbon dioxide in the blood.