Gas vents - which dump pressure from inside the bolt carrier out the holes and also right out the ejection port.
The gas used to power the action can be seen exiting the gun in high speed photography just before the case starts to tilt out for ejection. Most of the gas residue left in the action of the M16 passes over the exiting brass from the chamber. Its why the brass gets dirty compared to a manual bolt action, same as any other blowback .22 or .380.
Those of us who have owned HK91's understand this fact - its one of the more notorious guns for getting dirty, but it has NO gas action at all. It's roller delayed blowback, all the gas residue exits the chamber into the action.
Some BCG makers have three holes at that location.