Modular Multiplication

Many teams have used the following function to perform modular multiplication. Can someone explain how it works?

Click here to see code

i dont get it…u accept the ans on ur prev ques…and ask a new ques related to the same topic…y dont u continue on the same ques…!!!

Ok fine… my bad! (Y)