Revert "Update pad-trim.r"

This reverts commit b16a38d3954861faf24568dad0e85e156d58becc.