threeBiggest[3].repetitions + "\n");
threeBiggest[2].repetitions + "\n");
    public static void dumpSchedules()     {	//get all the nodes that have either init switch code	//or steady state switch code	HashSet tiles = new HashSet(Simulator.initSchedules.	    keySet());		RawBackend.addAll(tiles, Simulator.steadySchedules.keySet());	RawBackend.addAll(tiles, Layout.getTiles());	//do not generate switchcode for Tiles assigned to file readers	//they are just dummy tiles	Iterator frs = FileReaderVisitor.fileReaders.iterator();	while (frs.hasNext()) {	    tiles.remove(Layout.getTile((FlatNode)frs.next()));	}		Iterator tileIterator = tiles.iterator();				//for each tiles dump the code	while(tileIterator.hasNext()) {	    Coordinate tile = (Coordinate) tileIterator.next();	    try {		//true if we are compressing the switch code		boolean compression = false;				//get the code		String steadyCode = "";		String initCode = "";		if (Simulator.initSchedules.get(tile) != null)		    initCode = ((StringBuffer)Simulator.initSchedules.get(tile)).toString();		if (Simulator.steadySchedules.get(tile) != null)		    steadyCode = ((StringBuffer)Simulator.steadySchedules.get(tile)).toString();				//the sequences we are going to compress if compression is needed		Repetition[] threeBiggest = null;				int codeSize = getCodeLength(steadyCode + initCode);		if (codeSize > 5000) {		    System.out.println("Compression needed.  Code size = " + codeSize);		    compression = true;		    threeBiggest = threeBiggestRepetitions(steadyCode);		}				FileWriter fw =		    new FileWriter("sw" + Layout.getTileNumber(tile) 				   + ".s");		fw.write("#  Switch code\n");		fw.write(getHeader());		//if this tile is the north neighbor of a bc file i/o device		//we need to send a data word to it		printIOStartUp(tile, fw);		//print the code to get the repetition counts from the processor		if (threeBiggest != null)		    getRepetitionCounts(threeBiggest, fw);		//print the init switch code		toASM(initCode, null, fw);		//loop label		fw.write("sw_loop:\n");		//print the steady state switch code		if (Simulator.steadySchedules.get(tile) != null)		    toASM(steadyCode, threeBiggest, fw);		//print the jump ins		fw.write("\tj\tsw_loop\n\n");		fw.write(getTrailer(tile, threeBiggest));		fw.close();		if (threeBiggest != null) {		    System.out.print("Found Seqeunces of: " +				     threeBiggest[0].repetitions + " " + 				     threeBiggest[1].repetitions + " " + 				     threeBiggest[3].repetitions + "\n");		} 		System.out.println("sw" + Layout.getTileNumber(tile) 				   + ".s written");	    }	    catch (Exception e) {		e.printStackTrace();				Utils.fail("Error creating switch code file for tile " + 			   Layout.getTileNumber(tile));	    }	}    }