This is the past perfect FORM. We use it in English combined with "if" to talk about past counterfactuals/opposite to fact events.
"If + [past perfect FORM]
In this case,
If she hadn't overslept = She overslept
I said 'hi' to you, Noobz. If I hadn't written a response to your question, I probably wouldn't have said 'hi' to you today.
Fact: She came to my house. She got a piece of cake.
Past event Counterfactual: If she hadn't come to my house, she wouldn't have gotten a piece of cake [from me].
she wouldn't have noticed."
This is a modal perfect FORM which is often used, though not always to describe the result of what would have happened "IF"
Student or Learner