Bring a large pot of salted water to a boil then add the potatoes and cook until just almost tender, about 20 minutes. Wash the chard and trim the stems, then cut the stems into 1 inch pieces. Fold the leaves together, and cut into 1/2 inch strips. Add the stems from the chard to the boiling potatoes and cook another 10 minutes, then add the leaves and cook until wilted. Drain the potatoes and chard very well in a colander. In a large heavy skillet, heat the oil over medium heat and add the garlic. Season the oil with salt and pepper and add the red pepper flakes. Add the Swiss chard and potatoes, then cook over medium heat, stirring often, and mashing the potatoes gently as they cook, for about 8 minutes. Taste, and adjust seasonings as needed, then serve warm.