If + Past Perfect + Would + Base Form in the main clause. It refers to an unreal past condition and its probable result in the present. If I had studied all year, I wouldn't be worried now. If I hadn't eaten so much, I wouldn't feel sick now.
Past Result of a Present or Continuing Condition
If + Past Simple + Would Have + Past Participle in the main clause. It describes ongoing circumstances in relation to a previous past event. If I were a good cook, I would have cooked Chinese food. If I spoke Russian, I would have helped you with your homework.