You misunderstand... M is the sum of the 2 stereo tracks, call them tracks 1&2, or A&B, or X&Y, and S is the difference between the 2.
When I worked in BBC sound we didn't have a plug-in to do the coding or decoding for us, we'd do it via a jackfield with parallel blocks and a phase reverse lead...
If you've recorded in M&S, then one of the tracks is the mid signal, and the other is side.