The surgery went on for one and a half-day.
Sam couldn't rest for even a second. Since he took over the formation, he kept on absorbing the energy out of it to sustain his consumption.
He first cleared the lungs, then the liver, the pancreas, intestines, the bones, muscles, skin, and finally the heart.
At least whoever messed with his body and made him this way, didn't mess with the brain that much. So, Sam is out of trouble.
As soon as the refinement of the organs was finished, he pulled the specter out and healed the openings he made before removing the inscribed formation on his head.
Then he slowly let the controls of the bodily functions go back to Five-Elemental King's control.