Translation:After giving him a dog, she left him.
The subject in both phrases is the same with this construction in French, so she gave him a dog and she left him.
If we convert the English to a similar construction, it becomes obvious: "After having given * a dog, she left him." The person giving the dog is the same as the person leaving. So him is the most obvious replacement for the asterix.