In introduces a condition; lam yadkhul is a negated jussive verb, with al-muhrim as subject and Makkata as its object.
Tawajjaha ila ʿArafat and wa-waqafa biha supply further actions. The consequence is carried by fa-qad saqata ʿanhu tawaf al-qudum: the arrival tawaf has fallen away.