I rolled up on the altercation outside City Hall. A human resources supervisor was in the parking lot trying to get a terminated employee to leave the area. When the man refused, the supervisor had called the cops.

The former employee was calmly sitting behind the wheel of a pickup. I’ve handled at least a hundred situations like this. Most of the time, trespassers leave voluntarily rather than go to jail. Things might be OK.

They weren’t. Standing at the rear of the pickup, I called for the man to step out. Things went dark when he raised a pistol and pointed it at his own head. Understandably terrified, the supervisor fled back inside the building.

Drawing my sidearm, I again asked the man to put down the gun and step out of his vehicle. He refused. This went on for at least a minute — me trying to use logic to de-escalate a situation where logic no longer applied.

Suddenly, the man threw open the door of his pickup and got out. He still refused to face me, but at least now he wasn’t holding the gun to his head. It dangled in his hand.

I wasn’t entirely happy about the change. The gun was still the problem. It takes two seconds for an armed suspect to spin around and get a shot off. For what had to be the 10th time, I ordered him to put the gun down.

Instead, he started calmly walking toward the door of City Hall. With the gun. By all appearances, he was calm. But he wouldn’t stop. Walking. Toward. The. Door.

So, I shot him. In the back. Twice. He fell face down on the sidewalk. There was a lot of blood. I think some people screamed. Did I also mention that the suspect was black?

When things calmed down, I immediately started having second thoughts. I had just shot a black man who hadn’t threatened anyone other than himself. I also shot him in the back. How was this going to play out in the news?

My guess is badly. I could just see the headlines: “White Cop Shoots Black Man in the Back.” “Race a Factor in Recent Police Shooting?”

Fortunately for me, it never made the news. This bloody scenario had played out on the computerized shooting simulator at the Utah Attorney General’s Office. The mammoth computer is capable of monitoring my actions and words, and making changes to accommodate them.

During the scenario, my ancient police training had kicked in. All I knew in the moment was that I couldn’t let a disgruntled former employee into that building with a gun.

Turns out I was right. If I hadn’t shot him, the computer would have walked him into the building where he would have killed the HR manager and three other employees before taking his own life.

In the next scenario, I managed to talk another suspect into laying down his rifle. Although upset, he chose to listen to reason. I’m hoping the computer got him the help he needed.

I was feeling pretty good about myself until the next scenario, where a man was holding a gun to his wife’s head, ranting about the unfairness in their pending divorce. I managed to drag things out by trying to talk him down.

I even managed to confuse the computer when the guy shouted that he was an astronaut, and I asked him to tell me what space was like. Here the computer audibly labored for a reaction.

What it came up with was the guy shooting his wife in the face, then turning the gun on me.

It’s not as easy as it looks. Do you shoot someone because they might hurt someone else, or should you have to wait until they actually try to do it? And if you wait, how close are you willing to let them get before you fire?

Here’s the tricky part — the decision has to be made faster than it took for you to read the first sentence of this column.

Add the fact that you’re already aware that regardless of which choice you make, you’ll be torn apart by people who have all the time in the world to second-guess you. People who weren’t there and have never been in that situation.

I’m happy to be out of that life, and happier still that we have men and women willing to accept the risk so that the vast majority of us don’t have to.