Coffee during pregnancy?

Is it safe? Pre pregnancy I was a smoker and I obviously had to quit. I found coffee really helped with withdrawals the first few weeks and now I just can't wean myself off coffee. I'm falling asleep by 4pm everyday without caffeine. I limit myself to 3 cups a day(home brew) but I feel so guilty. But it's better than smoking right? Did anyone else consume a decent amount of caffeine during pregnancy and everything turn out fine? Please no judgement I feel bad enough as it is 😕