addMainFunction(str, flatClass);
    public static JClassDeclaration flatten(SIRStream str) {	// DEBUGGING PRINTING	SIRPrinter printer1 = new SIRPrinter();	str.accept(printer1);	printer1.close();	// name the components	Namer.assignNames(str);	// make single structure	JClassDeclaration flatClass = Structurer.structure(str);	// build schedule as set of higher-level work functions	Schedule schedule = SIRScheduler.schedule(str, flatClass);	// add LIR hooks to init functions	LowerInitFunctions.lower(str, schedule);	// add main function	addMainFunction(str, flatClass);	// DEBUGGING PRINTING	IRPrinter printer = new IRPrinter();	flatClass.accept(printer);	printer.close();	return flatClass;    }