we achieved an efficient and sustainable synthesis of secondary amine hydrochlorides via a fully continuous flow; in the second step, we developed a Pictet–Spengler reaction/Friedel–Crafts hydroxyalkylation/dehydration cascade for the construction of the dihydroprotoberberine core structure (ABCD-ring); and in the last step, Ir-catalyzed enantioselective hydrogenation was employed for the introduction