We would be most unlikely to say, "If I had this book, I would have given it to you" with the a meaning similar to: "In the not very likely event of my being the owner of this book, then there is a hyothetical possibility that I gave it to you." It's not so much the grammar as the near-impossibility of the situation that renders the utterance so unlikely.
It's just about possible with a different meaning. Let's consider a series of utterances:
1. If I have a book, I give it away.
2. If I have a book, I will give it away.
3. If I had a book, I gave it away.
4. If I had a book I would give it away.
5. If I had had a book, I would have given it away.
6. I had a book. I will have given it away.
7. I had a book I would have given it away.
8. If I had a book I would have given it away.
 is the traditional Zero Conditional, where if has a meaning similar to whenever.
 could be EITHER (a) a traditional First Conditional, referring to a possible future event, OR (b) a Zero Conditional in which will indicates volition/customary habit rather than futurity. (Context and co-text will usually make it clear which is intended.
 is the past-time Zero Conditional, where, once again, if has a meaning similar to whenever
 could be EITHER (a) a traditional Second Conditional referring to a less likely future or present event, OR (b) a Zero Conditiona l(past time) in which would indicates volition/customary habit rather than futurity. (Context and co-text will usually make it clear which is intended.
 is the traditional Third Conditional indicating a counterfactual hypothesis about the past.
 is not a conditional. The speaker states that s/he did have a book (fact), and that s/he is certain that s/he gave it away (will denotes certainty).
 is also not a conditional. It is similar to meaning to , except that would implies a more remote certainty than will.
This brings us to .This is not a conditional in the accepted sense. It is similar to  in meaning, except that if is used with a meaning similar to granted/accepted that.
My personal feeling is that  is a rare utterance. the meaning is more likely to be expressed with some such words as: "Well, assuming that I did have the book, then I probably gave it away. However, it's possible
Student or Learner