US needs Pakistan as long as they are in Afghanistan. US in all certainty would expect Pakistan to help when they get on with their plans on Iran. But as far as US is concerned, Pakistan is a bonded labourer living on aid and chained to get the job done.
Pakistan views US as a long term ally or atleast did that in the past. Now US is replaced by China. Pakistan however relies heavily on US for defence technology though the shift to unproven Chinese hardware has risen in the recent past.
Pakistan cannot get international acceptance without US for any battle it wants to win on the international stage including issues with India. US was believed to provide that platform for long to Pakistan. However, this does not seem to be in the interest of US. China however would love to play US but it does not have the leverage that US has.
You do the math.