Analysis of pulmonary function in high-risk pregnancies: a case-control study