Rectal pain is the symptom of pain in the area of the rectum. A number of different causes 68 have been documented. One of the most common causes of rectal pain is an anal fissure. Two more highly common causes of functional anorectal pain are levator ani syndrome LAS and proctalgia fugax. Both of these conditions are thought to be caused by muscle spasms of the either the levator ani muscle or the anal sphincter muscle respectively, and may overlap symptomatically with a third less-common condition called coccygodynia which is the result of previous trauma to the coccyx bone.
An anal fissure is a break or tear in the skin of the anal canal. Anal fissures may be noticed by bright red anal bleeding on toilet paper and undergarments, or sometimes in the toilet. If acute they are painful after defecation,  but with chronic fissures, pain intensity often reduces. Anal fissures usually extend from the anal opening and are usually located posteriorly in the midline, probably because of the relatively unsupported nature and poor perfusion of the anal wall in that location. Fissure depth may be superficial or sometimes down to the underlying sphincter muscle.
Stapled hemorrhoidopexy , is a surgical procedure that involves the cutting and removal of Anal Hemorhoidal Vascular Cushion whose function is to help to seal stools and create continence. Procedure also removes abnormally enlarged hemorrhoidal tissue , followed by the repositioning of the remaining hemorrhoidal tissue back to its normal anatomic position. Severe cases of hemorrhoidal prolapse will normally require surgery. This procedure is for internal hemorrhoids only and not for external hemorrhoids or anal fissures. During the procedure the anal sphincter muscle is pulled in due to tight stapling and if external hemorrhoids are present they also get pulled in and get hidden and get tucked inside anal sphincter muscle and reappear when staples fall after few months and sphincter comes to its normal position.
In humans , the anus from Latin anus meaning "ring", "circle"   is the external opening of the rectum. Two sphincters control the exit of feces from the body during an act of defecation , which is the primary function of the anus. These are the internal anal sphincter and the external anal sphincter , which are circular muscles that normally maintain constriction of the orifice and which relaxes as required by normal physiological functioning.