Sentence 1: Max had a new dog. 
 Sentence 3: He tried to give it food and walk it outside with no success 
 Sentence 4:  He went to bed exhausted and the dog was still barking 
 Sentence 5:  Only when he let the dog sleep with him could he fall asleep 
 Option 1: He was desperate because it did nothing but sleep. 
 Option 2: He was desperate because it was barking all the time.