assert instrCount == instrDumped : "Error in Switch Compression!";
assert instrCount == instrDumped : "Error in Switch Compression! (" + instrCount + " != " + instrDumped + ")";
    private static void toASM(String ins, String side, Repetition[] compressMe,            FileWriter fw) throws Exception {        int seq = 0;        StringTokenizer t = new StringTokenizer(ins, "\n");	int instrCount = t.countTokens();	//a count of the instructions we have produced (including loop trip counts)	int instrDumped = 0;        if (compressMe == null) {            // no compression --- just dump the routes with nops as the            // instructions            while (t.hasMoreTokens()) {                fw.write("\tnop\t" + t.nextToken() + "\n");            }        } else {            // print the switch instructions compressing according to compressMe            int counter = 0;            String current;            while (t.hasMoreTokens()) {                // get the next route instruction                current = t.nextToken();                counter++;                int repetitions = 1;		//the size of the repetition, if one starts at this counter (line num)		int repSize = 1;                for (int i = 0; i < compressMe.length; i++) {                    if (compressMe[i].hasLine(counter)) {                        repetitions = compressMe[i].repetitions;			assert repetitions > 1 : "Invalid repetition size for switch code compression.";			repSize = compressMe[i].getSize(counter);			                        fw.write("\tmove $3, $" + i + "\n");                        fw.write("seq_start" + side + seq + ":\n");                        // fw.write("\tnop\t" + current + "\n");                        // fw.write("\tbnezd $3, $3, seq_start" + i + "\n");			if (repSize == 0) {			    fw.write("\tbnezd $3, $3, seq_start" + side + seq				     + "\t" + current + "\n");			}			else {			    for (int j = 0; j < repSize - 1; j++) {				fw.write("\tnop\t" + current + "\n");				current = t.nextToken();				counter++;			    }			    fw.write("\tbnezd $3, $3, seq_start" + side + seq				     + "\t" + current + "\n");			}			                        seq++;                        break;                    }                }                if (repetitions == 1) {		    instrDumped++;                    fw.write("\tnop\t" + current + "\n");		}                else {  //there was a loop found starting a this line...                    for (int i = 0; i < (repetitions - 1) * repSize; i++) {                        // skip over remainders			t.nextToken();                        counter++;                    }		    instrDumped += (repetitions * repSize);                }            }        }	assert instrCount == instrDumped : "Error in Switch Compression!";    }