Manny Machado blasts 2-run HR in 9th to lift Padres past Diamondbacks