As you read the title, these are not normal sentences, the order changes a little bit. There is inversion in the first part of the sentence, and in the second part, there is also inversion in the conditionals.
Here is an image where you can see who is the change in each part of the sentence and in the conditionals: