Step 4: Preparation of benzyl 4-hydrazinylpiperidine-1-carboxylate dihydrochloride. Benzyl 4-(2-(tert-butoxycarbonyl)hydrazinylpiperidine-1-carboxylate (174 g, 0.5 mol) was dissolved in 2 L of a 50% methanol/4N hydrochloric acid dioxane solution and the reaction was stirred for 48 hours at room temperature. After completion of the reaction, the reaction solution was concentrated in vacuum to give the crude product. The crude product was purified by grinding with warmed dichloromethane to give the final 4-hydrazinylpiperidine-1-carboxylic acid benzyl ester dihydrochloride (131 g, 96% yield).