Mr. Kelly silently counted heads, trying to account for which of his friends were there, and which of them had made it out. It would be hours after dawn before he learned that two of the guys he had taken a photo with that night had not made it out alive.

Since the shooting, he has been going “nonstop” — nights in local bars with friends, a concert in San Diego, a weeklong trip to Las Vegas for the National Finals Rodeo. He has spent countless hours with two of his close friends who also survived both shootings, the second coming just as they felt their lives returning to normal after the first.

Late last week, Mr. Kelly embraced dozens of friends at a party organized by the owners of Borderline. He had seen many of them before — for several days after the shooting they met up in parking lots and empty fields to line dance. But this was what they had really missed, seeing their favorite DJs and dance instructors, sweating under bright lights.

For the last several days, he has forced himself to sit in front of the computer to complete training courses he is required to do before his unit leaves. Being there has made it easy to turn to anyone in his large family for comfort — he is one of a set of quadruplets and has two other younger siblings.

“There have been nightmares, it’s something I can’t really control,” he said. “I wake up and shake myself out of it and write it down and maybe even talk about it.”

He took a deep breath. “Mostly replaying the terrible things that happened that night,” he said before pausing several seconds. “And potentially what could have happened.”