How can I repair my music library after iTunes Cloud has made a Hash of it? Since turning on iTunes Cloud and Apple Music, I have noticed creeping corruption in my iTunes library. There are songs which exist, but only as items which are NOT available offline, and NOT available ONLINE.  They are gray, and when I click on the cloud download icon they do not download from iCloud.

I suspect I must use Time Machine to retrieve a copy of my iTunes library that has not been munched up by the fine engineers at Apple and turned into a worthless pile of bits.  Before I despair, and go back into backups, is there any way to repair this?

Here is a screen-shot example:
First turn iTunes Match and iTunes Cloud off. If you have not added a lot of music you can't stand adding back manually, you can just go to ~/Music/iTunes and rename one of the Previous iTunes Library files to "iTunes Library.itl"and move it back up to the iTunes folder, leaving out the quotes. See the screenshot of my folder; the closer the file's date is to the date of the current file, the less adding back of music you will have to do. This does not add the music just the 'music  library stats'.