A 50-year-old man undergoes follow-up evaluation for type 2 diabetes mellitus. His daily log demonstrates average blood glucose levels of 120 to 150 mg/dL (6.7–8.3 mmol/L), with hypoglycemia in the 50 mg/dL (2.8 mmol/L) range noted once or twice per week without a discernible pattern. He is unable to detect the hypoglycemia.

The patient has a medical history of diabetic retinopathy, chronic kidney disease, peripheral neuropathy, hypertension, hyperlipidemia, obstructive sleep apnea (on bilevel positive airway pressure), gastroesophageal reflux disease, and osteoarthritis in both knees. He reports intolerance to strenuous exercise due to knee pain. He is able to walk 15 minutes daily. He has worked closely with a nutritionist, resulting in a 5.0-kg (11-lb) weight loss over 1 year, which has plateaued recently.

Medications are insulin glargine, insulin aspart, lisinopril, carvedilol, pantoprazole, aspirin, and atorvastatin.

On physical examination, blood pressure is 140/90 mm Hg and pulse rate is 65/min. BMI is 37. Bilateral proliferative retinopathy is present. There are no carotid bruits or cardiac murmurs. Bilateral loss of monofilament and vibratory sensation on the feet and decreased ankle reflexes are noted. The remainder of the examination is normal.

Results of laboratory studies show hemoglobin A1c level of 8.2% and serum creatinine level of 1.7 mg/dL (150.3 µmol/L).

Which of the following is the most appropriate treatment of this patient?