I searched the Irish Family History Foundation's database. It contains 12,000,000 surviving rcds for abt 65% of Irish counties. Rcds B4 1840 are sparse.
For Hugh Dempsey B ???? in Newbridge, Kildare, I found two B rcds which might fit your search criteria: 1789 & 1843.
There are also two Michael Doyles B in Newbridge, Kildare: 1-1790, the other 1793. This MIGHT be for your ancestor's friend. It could be coincidence as there were 21,000+ Doyles in all Ireland, of whom 1,014 were named Michael.
A view of the detailed rcds SHOULD show their parents' names and other info.
Google the Foundation's name to lead you to this database. Pls post your search results to my genforum msg. Good luck.