Spoiler Alert! Only one guy survives.
This movie is based on a book by Marcus Luttrell, the lone survivor of a dangerous four-man Navy Seal mission in Afghanistan. Mark Wahlberg plays Luttrell. During a debriefing before the mission, rattlesnakes are mentioned as a possible hazard the team might encounter. (Even though there are no rattlesnakes in Afghanistan.) During the mission, Luttrell and his comrades are ambushed up on a mountain. They are under such heavy fire that the only way they can survive is to jump off a cliff. They bounce off rocks and trees as they fall and roll hundreds, maybe thousands of feet. Wahlberg/Luttrell lands on his butt right next to a rattling rattlesnake. (Rattlesnakes are always rattling in movies - it's the law.) But he doesn't pull out his gun and kill it. That might give away his position. He just rolls over away from it, and we never see the snake again. At that moment, the snake is the least of his worries.
The snake appears to be an Eastern Diamond-backed Rattlesnake, which is not native to Afghanistan, and not native to the mountains of New Mexico where the film was made. That means it wasn't a snake they found while filming and decided to put in the movie, it was a snake they went out of their way to hire, bring to the set and add to the scene.