SALT LAKE CITY — BYU’s beleaguered football team will play Massachusetts this weekend, its big win over Wisconsin seemingly eons ago. If you’re counting at home, the Cougars have lost four of their last five games.

What’s most disheartening for the team and its fans is that the last two defeats — by a total of six points — were due to their own mistakes — poor clock management, poor play calling, poor decisions on the field. This falls on the coaches and they have to be second-guessing themselves, if not publicly, then privately.

After the game, offensive coordinator Jeff Grimes said that the offense is changing its “style” because of the addition of a new quarterback and other new players, resulting in growing pains — specifically, he mentioned, the red-zone offense, the protection, the running game (in other words, pretty much everything). And they have scored one touchdown total in the last two games.

Still, it’s difficult to understand what happened late in the game at Boise State, a 21-16 defeat that was a clinic in what not to do.

Forget the holding penalties. Forget the leaky pass protection and the seven sacks, including two on consecutive plays that cost them 20 yards after they had reached the 5-yard line. Forget the poor running game and the nine tackles for lost yardage. Forget the three lost fumbles, one of them at the goal line and the other at the 13-yard line. And, finally, forget that BYU drove inside the 15-yard-line six times and came away with only one touchdown and two field goals.

You can forget all of the above because even after all those blunders and wasted opportunities, they still could have — and should have — won the game on the final possession.

Just for fun, let’s review the last nine plays of the game:

2:05 left in the game: Running back Matt Hadley takes a screen pass 59 yards to the Boise 24-yard line. It’s a brilliant play call by Grimes. The Broncos’ had been able to harass Wilson all night without blitzing, simply by sending their front four. On this play the linebackers set up deep and wide and the front four came hard again, leaving Hadley a lot of room to maneuver, and, just like that, BYU had given itself a chance to win.

1:40: Hadley runs into the left side of the line for 3 yards. It’s reasonable to wonder why the Cougars chose to run here — two good things happen with a pass — a completion or clock stoppage — and the ground game had had little success (96 yards total).

1:10: Wilson passes to Dylan Collie on an out route for 8 yards, and Collie gets out of bounds at the 13 to stop the clock. A perfect call and perfectly executed — safe, smart and time efficient.

1:04: Lopini Katoa runs left for 8 yards, running wide when a Boise lineman breaks into the backfield. He steps out of bounds at the 5-yard line.

At this point, the Cougars are in a great position to win. They have 58 seconds left and face second-and-two. Then they squander it all.

:58 seconds: On second-and-two, Hadley runs right on a wrap play (in this case, the center “wraps” around the guard, who blocks down on the noseguard) and joins the tackle in lead-blocking around the end. The problem is that tight end Matt Bushman fails to block the end, who gets penetration and forces Hadley inside, away from his lead blockers, for no gain. Meanwhile, the clock rolls on … the Cougars let 32 seconds pass before they run the next play.

:26 seconds: Hadley runs behind a pulling guard to the left side, again for no gain, leaving the Cougars with a fourth-and-two situation and time running out. Time out is called with 15 seconds left.

:15 seconds: Freshman quarterback Zach Wilson runs a quarterback draw for 3 yards.

:09 seconds: Wilson spikes the ball to stop the clock.

The Cougars had had the clock on their side, but not anymore. They have left their freshman quarterback too little time to work with. Since Collie’s catch at the 13-yard line with 1:10 left, the Cougars called four consecutive running plays and then spiked the ball, eating up 1 minute and 3 seconds.

:07 seconds: There is time for two plays, but only if the pass comes out quickly; an incompletion will at least stop the clock. Grimes orders up a pass play — an old school pass play. This is the era of spread offense — spread the defense with formations to create space and to even up the numerical advantages defenses usually enjoy in the box. Instead, the Cougars choose to pack it in. They use an ace formation — two tight ends and a single running back, with two receivers wide, one on each side. Grimes calls for max protection — only the two outside receivers will run pass routes; everyone else blocks. This of course gives Wilson limited options.

The Broncos employ man coverage on the outside, and with no other receivers to cover, they load the box with eight players (and almost nine).

Collie, on the left, motions inside and then breaks back to the right. At the snap, he runs a simple arrow route at the goal line; he is easily covered. Talon Shumway runs a slant, but the safety cheats over at the snap and there is no way Wilson can squeeze the ball in. The window is too small. That’s it for his options.

At this point, Wilson should have thrown the ball out of bounds to stop the clock, as Grimes said he had been instructed to do. Instead, he tries to run, but the Broncos, even with just four linemen rushing, gain penetration as they did all night. Wilson is tackled and the clock expired.

In the final 1:04, the Cougars ran only six plays and never threw a pass, unless you count the spike.

It’s easy to second-guess the final play. Why not spread the field? When Wilson scored a touchdown earlier in the game on a quarterback draw, it was out of an empty formation. You might also wonder why they didn’t give the quarterback more receivers, perhaps running combination routes on one side, making it an easier and quicker read. How about a quick-hitting rollout away from the pressure?

Of course it’s easy to play Monday morning quarterback (or Friday morning), but the last drive certainly left a lot of room for second-guessing.