Stereodivergent Synthesis with a Programmable Molecular Machine