(i) When the doctor first smiles, he has an inflated opinion of himself, admiring his looks and profession.
(ii) In the second instance, the doctor smiles at his foolishness and helplessness. His thoughts change after his encounter with the snake – from being a proud doctor he moves on to accept his stupidity.