Rule reminder
Type 3 (impossible past): English 'If I had studied, I would have passed' = Se avessi studiato, avrei passato.
If you had listened, you would have understood.