Reaction SMILES: C(O[CH:4](OCC)[CH2:5][N:6]([CH3:8])[CH3:7])C.Cl.[OH-].[K+].[Cl:15][C:16]1[CH:21]=[CH:20][C:19]([NH:22][C:23]2[C:24]3[CH:32]=[C:31]([NH:33][C:34](=[O:44])[CH2:35]P(=O)(OCC)OCC)[N:30]=[CH:29][C:25]=3[N:26]=[CH:27][N:28]=2)=[CH:18][C:17]=1[C:45]#[CH:46].[Li+].[Cl-]>O.C(Cl)Cl.CO.CC(N(C)C)=O.C1COCC1>[Cl:15][C:16]1[CH:21]=[CH:20][C:19]([NH:22][C:23]2[C:24]3[CH:32]=[C:31]([NH:33][C:34](=[O:44])/[CH:35]=[CH:4]/[CH2:5][N:6]([CH3:7])[CH3:8])[N:30]=[CH:29][C:25]=3[N:26]=[CH:27][N:28]=2)=[CH:18][C:17]=1[C:45]#[CH:46]
Reactant: CCOC(CN(C)C)OCC
Reactant: C#Cc1cc(Nc2ncnc3cnc(NC(=O)CP(=O)(OCC)OCC)cc23)ccc1Cl
Agent: Cl
Agent: [Cl-]
Agent: [K+]
Solvent: CC(=O)N(C)C
Solvent: ClCCl
Solvent: CO
Product: C#Cc1cc(Nc2ncnc3cnc(NC(=O)/C=C/CN(C)C)cc23)ccc1Cl
Temperature: 45 °C
Reaction time: 27 h
Yield: 95.1 %

Procedure:
To a stirred mixture of 2,2-diethoxy-N,N-dimethylethanamine (1.67 g, 10.4 mmol) and water (1.8 mL) at room temperature and under a nitrogen atmosphere was added an aq. 37% HCl (1.75 mL, 20.8 mmol). After addition the mixture was stirred at 45° C. (bath) for 27 h. It was cooled to 0° C. (bath). This is called solution A. KOH (2.98 g, 53.2 mmol) was dissolved in water (9 mL) at room temperature under a nitrogen atmosphere. It was cooled to 0° C. (bath). This is called solution B. To a stirred heterogeneous mixture of compound 236 (1.97 g, 4.16 mmol) and THF (9 mL) at room temperature and under a nitrogen atmosphere was added minimum amount of DMA (4.5 mL) to give a homogeneous solution. LiCl (176 mg, 4.16 mmol) was added and stirred at 0° C. (bath) for 15 min. The cold solution B was added and stirred at 0° C. for 2 min. Then the cold solution A was added and the final reaction mixture was continued to stir at 0° C. under a nitrogen atmosphere. The reaction was monitored by TLC (DCM-MeOH=10:1). After stirred for 35 min. it was poured into water (300 mL). Petroleum ether (300 mL) was added and stirred at room temperature for 15 min. Petroleum ether layer was decanted. More petroleum ether (300 mL) was added and stirred for 10 min. The solid was collected by suction filtration; washed with water (5×20 mL); petroleum ether/ethyl acetate=10:1×30 mL); dried under reduced pressure over silica gel/KOH to give compound 9 (1.61 g, 95%) which was found only 85.2% pure by HPLC. Thus, the sample was purified by a silica column (ethyl acetate/MeOH=10:1). The fractions containing the required product were combined and evaporated to give a yellow/orange solid. The solid was dissolved in warm ethyl acetate (30 mL) and precipitated with petroleum ether (90 mL). Solid was collected; washed with petroleum ether/ethyl acetate=3:1 (3×20 mL) and dried to give (2E)-N-[4-(4-chloro-3-ethynylanilino)pyrido[3,4-d]pyrimidin-6-yl]-4-(dimethylamino)-2-butenamide (9) (1.1 g, 65%) as a yellow/orange solid, mp 173-176° C.; 1H NMR δ [(CD3)2SO] 10.92 (s, 1H), 10.31 (s, 1H), 9.03 (s, 1H), 9.00 (s, 1H), 8.66 (s, 1H), 8.18 (d, J=2.2 Hz, 1H), 7.96 (dd, J=8.9, 2.2 Hz, 1H), 7.57 (d, J=8.9 Hz, 1H), 6.88 (dt, J=15.4, 6.0 Hz, 1H), 6.52 (br d, J=15.4 Hz, 1H), 4.58 (s, 1 H), 3.09 (br d, J=5.8 Hz, 2H), 2.19 (s, 6H). Anal. Calcd for C21H19ClN6O.0.8MeOH.0.1-ethyl acetate: C, 60.42; H, 5.25; N, 19.04%. Found C, 60.15; H, 4.90; N, 18.76%.