Biopatterned Reorganization of Alkaloids Enabled by Ring-Opening Functionalization of Tertiary Amines.