Question: So, I'm playing this video game and I came across this sentence that uses "stem from" in an alien way to me.

"Their zeal is admirable, but their ideas impractical for a society that must maintain secrecy and organization **to stem** its own genocide **from** coming about."

I know that "stem from" means Originate from:(TFD source below)

stem from (something)
To come, result, or develop from something else.
My fear of the water stems from the time my brother nearly drowned me when we were playing in our cousin's pool as kids.

But this usage is different. It is as if it means "to prevent". There is one definition on TFD that sort of fits but it would have to be an abbreviated version of it.
(TFD def)
**stem the tide or stem the flow**
COMMON If you stem the tide or stem the flow of something bad which is happening to a large degree, you start to control and stop it. *The authorities seem powerless to stem the rising tide of violence. The cut in interest rates has done nothing to stem the flow of job losses.*

is it possible it is that meaning?

Answer: 
Both are correct. But how?

These sentences both use "unreal" grammar. The reason they're both correct will make more sense if we change them back to real sentences with the same meaning:

> 
> (1) We **have been** able to come here because it isn't raining.
> 
> 
> (2) We **were** able to come here because it wasn't raining.
> 
> 
> 

Sentence (1) refers to the **present** situation of now being at the top of the mountain, and the **present** fact that it's not raining. Sentence (2) refers to the **past** situation of arriving at the top of the mountain with the **past** reason why. So it's two perspectives on the same thing: either (1) *now being* at the top of the mountain, or (2) *having arrived earlier*.

I've highlighted the two main verbs. You'll notice they don't have the same tense, even though the original two sentences have the exact same structure\*. This is because when we shift present perfect or simple past into "unreal" grammar, *the result is the same*: *"could have" + past participle*.

\*I've also replaced "couldn't" with "be able to" for grammar reasons which are unrelated to this question.
One does not say, "If it was..", but "If it were..." This is the subjunctive mood, used in stating a condition *known* to be false.

[Tevye is grammatically correct](https://genius.com/Topol-if-i-were-a-rich-man-lyrics) asking, "If I were a rich man."