EVOLUTION AND NUCLEOSYNTHESIS OF ASYMPTOTIC GIANT BRANCH STARS IN THREE MAGELLANIC CLOUD CLUSTERS