public void Color(InterferenceGraph graph)
	{
		// Retrieve random node with fewer than NUM_REGISTERS neighbors
		int x = ig.getVertexWithMaxDegree(NUM_REGISTERS);
		if (x == -1)
		{
			x = ig.getSmallestCost();
		}

		// Remove the vertex and recover its neighbors
		regSet.add(x);
		ArrayList<Integer> neighbors = ig.removeVertex(x);

		// If the graph isn't empty, recursively color
		if (ig.isEmpty() == false)
		{
			Color(ig);
		}

		// Add x and its edges back to G
		ig.addVertex(x, neighbors);

		// choose a color for x that is different from its neighbors
		HashSet<Integer> neighborColors = new HashSet<Integer>();
		for (Integer n : neighbors)
		{
			neighborColors.add(regMap.get(n));
		}
		boolean colored = false;
		int color = 1; // register 0, for DLX, is always reserved to be a constant zero
		while (!colored)
		{
			if (neighborColors.contains(color) == false)
			{
				regMap.put(x, color);
				colored = true;
				break;
			}

			// Try the next color
			color++;

			 // We can't use reserved registers... only R1-R26 are general purpose (27 is our return reg)
			 // See DLX spec for R0, R28, R29, R30, R31 roles
			 while (color == 27 || color == 28 || color == 29 || color == 30)
			 {
				 color++;
			 }
		}
		
		System.out.println("REG ASSIGNMENT: " + PLStaticSingleAssignment.getInstruction(x).toString() + " => " + color);
		regMap.put(x, color);
		PLStaticSingleAssignment.getInstruction(x).regNum = color;
	}