Hi, I have John Thom son of Agnes Mac Millian and JOHN THOM. This listed in the IGI There are 7 John Thom's listed in Ayr born between 1821-1852. I hope this connects with what you have.
John Thom Mc Mahon step son of William McMahon listed in the 1881 census of Ayr.Number 33, Coylton,Ayr. John Thom McMahon was my grandfather.