The cyclization of ethyl acetoacetate (I) with 3-amino-2-butenenitrile (II) gives 4-hydroxy-2,6-dimethylpyridine-3-carbonitrile (III), which is treated with SOCl2 and oxidized with MCPBA to yield 4-chloro-2,6-dimethylpyridine-3-carbonitrile N-oxide (IV). Finally, this compound is condensed with thiomorpholine (V) to afford the target compound.
The reaction of 3-acetyl-6-methyl-3,4-dihydro-2H-pyran-2,4-dione (I) with ammonia gives 2,6-dimethylpyridin-4-ol (II), which is nitrated with HNO3/H2SO4 and treated with SOCl2 to yield 4-chloro-2,6-dimethyl-3-nitropyridine (III). The condensation of (III) with ethanolamine (IV) affords N-(2,6-dimethyl-3-nitropyridin-4-yl)ethanolamine (V), which is finally condensed with 1-(diphenylmethyl)piperazine (VI) by means of SOCl2 and treated with HCl to furnish the target trihydrochloride.