Hobbled by chip, other shortages, GM profit slides 40% in Q2