Design a circuit in Ltspice based on the input and output
Look up &quot;ideal rectifiers&quot; or &quot;precision rectifiers&quot; made with op-amps.
https://en.wikipedia.org/wiki/Precision_rectifier#:~:text=The%20precision%20rectifier%2C%20also%20known,an%20ideal%20diode%20and%20rectifier.&amp;text=The%20op%2Damp%2Dbased%20precision,based%20active%20rectification%20ideal%20diode.
Apply the input to two ideal rectifiers of opposite polarities, and them mix the results with a third op amp, set to voltage divide one of the inputs by 50%. The result should be what you are looking for.