Mod p decompositions of gauge groups