Rule reminder
The condizionale passato is used for: (1) unfulfilled past conditions (with se + congiuntivo trapassato), (2) future-in-the-past in indirect speech, (3) polite past wishes and regrets.
Se tu ___ (studiare) di più, non avresti fallito l'esame.