lung function and respiratory failure