do someone out of something vs prevent from gaining

do someone out of something

prevent from gaining

How often have the words do someone out of something and prevent from gaining occurred in a corpus of books? (source: Google Ngram Viewer )