Rule #1: Whatever choices your infertile friend has made, those choices are their's and if you debate them, you are likely to offend them.
Rule #2: Offering sentiments like, "It will happen when you least expect it, or God works in mysterious ways, or Just Relax, or I could go on and on" are not helpful. Your infertile friend at best will ignore you, and at worst will be annoyed.
Rule #3: Losing the ability to have a child feels like a death, in that it is a death to that person's hopes and dreams. The infertile person will go through all the stages in grief, so patience from friends is good.
Rule #4: Telling someone who is infertile, that motherhood is lame or sucks or whatever negative descriptor has the affect of making the infertile person resent those people who are complaining about motherhood. That isn't to say that motherhood doesn't suck sometimes, but perhaps if one wishes to complain about motherhood, they should leave that for their friends who are mothers, and are in similar places as them.
I am sure I could come up with more rules, but I think these are a good summary.