We use the conditional type 3 to express Regret or to talk about events and actions in the past that are impossible.
It’s form is:
If + Subject + Verb(past perfect) + Subject + Would + have + Past participle
The sentence is composed of two parts: Conditional clause & Main clause.
the conditional clause is formed by IF+Past perfect, and the main clause is formed by WOULD+HAVE+PAST PARTICIPLE.
It’s not obligatory that the conditional clause be the first, the main clause can be the first, in this case no need to the comma wich separate the two clauses.
|If I had worked hard, I would have passed the test.
|If you hadn’t woke up early, you would have missed the train.
|If I had not drove carefully, an accident would have happen.
|If I had won the price, I would have been rich.