We flew from Dublin a few years ago and we were cleared for US Immigration at Dublin. You stay in the departures lounge and when ready go through the US immigration. When you have gone through there is no going back though, so make sure you have all you need prior to that gate.
I would stay in the main departures for as long as you can, as the Us departures gate is very basic, with very few amenities.