The sentence is expressing a hypothetical situation in the past, the correct answer is had had, as it is the past perfect form of the verb "to have" that is used for the third conditional sentence. The third conditional sentence is used to talk about a hypothetical past situation and its result in the past.
Conditional sentence
Want to say I would have caught the train if I'd left earlier without freezing on the verb forms? That's a third conditional, and it's one of five patterns English uses to talk about possibilities, regrets, and hypotheticals. Get the system right and you stop sounding stuck in the present tense.
A conditional sentence pairs a condition clause (usually with if) with a consequence clause: If it rains, we stay in. The five named patterns — zero, first, second, third, and mixed — each match a specific time frame and likelihood, with their own tense rules.