US foreign policy has been screwed up for decades. We spent billions propping up our particular puppets in these dirt-bag countries, and as with all government endeavors, there were unintended consequences. We cannot control the governments of these countries, and we will bankrupt ourselves trying.
In my opinion there are only two outcomes in dealing with muslim countries: damned if you do and damned if you don’t. You can’t appease everybody. In other words, you can’t pick up the clean end of a turd.