There really is no easy answer.
We stay, that causes resentment, which brings extremists.
We leave, we create a power vacuum, which brings extremists.
No matter what solution I read, or think of, there's always a very strong counter argument. All I know is, I'm glad I'm not the one to make decisions. Any solution will end in the loss of many civilians, either by our hands, or by extremist hands, or maybe a bit of both. Humanity sucks.