# threw him down
Here the word "him" refers to the demon-possessed man.
# and went out from him while crying out with a loud voice
"and cried out with a loud voice as it went out from him"