Two years ago, the Giants entered the offseason with a clear goal of adding to the rotation. They scooped up Jeff Samardzija and Johnny Cueto. Last year, there was no doubt that the priority had to be getting a closer, so Mark Melancon was brought in.

The 2017 offseason is quite a bit more complicated. The Giants have an aging roster that just lost 98 games, a payroll that is bumping up against the tax for a fourth straight year, and a farm system that is poorly rated and not yet ready to fill the major league club.

It’s a sobering time for Brian Sabean, Bobby Evans and the rest of the front office, which is why they so often mention how painful this winter might be. Sabean did so again on a recent episode of “The TK Show.”

“There are going to be some painful decisions,” Sabean told Tim Kawakami. “To do what we need to do to be competitive to start the year and hopefully have that roll into also making some moves at the deadline, we’re going to have to make some tough choices and may have to move some payroll, which means moving some people that we perhaps under normal circumstances would not.”

When it comes to moving money, the Giants would love to find a way to shed the $18.5 million they owe Hunter Pence and $11 million they owe Denard Span, but those aren’t realistic options. Those are not the players Sabean is talking about when he refers to pain. Neither are Buster Posey, Brandon Crawford or Madison Bumgarner, the three Giants viewed as most untouchable.

When you’re talking pain, you’re really only talking about a few regulars. Here’s a look at some players the Giants might have to make decisions on:

Joe Panik: The greatest strength of a terrible team was infield defense up the middle, which also means Panik serves as the front office’s best trade chip. You can bet there are a few general managers out there who would like to see what the 27-year-old could do with a full season away from AT&T Park; he hit .320 on the road last season with all 10 of his homers. Panik also brings cost certainty, as he’s just now entering his arbitration years. The Giants don’t want to break up their Crawnik duo. They also might find themselves with no choice, and with Kelby Tomlinson and Christian Arroyo in the wings, this is one position where they have options ready in-house.