int unrollFactor = 1;     if (filter.getPeekInt() > 0) { unrollFactor = lcm(filter.getPopInt(), CalcBufferSize.getConsBufSize (Layout.getNode(Layout.getTile(filter)))); }
    JStatement generateSteadyStateLoop(SIRFilter filter, 				       LocalVariables localVariables)     {	int unrollFactor = 1;		//if this filter has a buffer, 	//the unroll factor is equal to the lcm of pop	//and the buffersize	if (filter.getPeekInt() > 0) {	    unrollFactor = 		lcm(filter.getPopInt(),		    CalcBufferSize.getConsBufSize		    (Layout.getNode(Layout.getTile(filter))));	}		JBlock block = new JBlock(null, new JStatement[0], null);	//clone and inline the work function	//	for (int i = 0; i < unrollFactor; i++) {		//if a simple filter, reset the simpleIndex	if (isSimple(filter)){	    block.addStatement		(new JExpressionStatement(null,					  (new JAssignmentExpression					   (null,					    new JLocalVariableExpression					    (null, localVariables.simpleIndex),					    new JIntLiteral(-1))), null));	}	    		//add the statements to receive pop items into the buffer	block.addStatement	    (makeForLoop(receiveCode(filter, filter.getInputType(),				     localVariables),			 localVariables.exeIndex,			 new JIntLiteral(filter.getPopInt())));		JBlock workBlock = 	    (JBlock)ObjectDeepCloner.	    deepCopy(filter.getWork().getBody());	//if we are in debug mode, print out that the filter is firing	if (RawBackend.FILTER_DEBUG_MODE) {	    block.addStatement		(new SIRPrintStatement(null,				       new JStringLiteral(null, filter.getName() + " firing."),				       null));	}	//add the cloned work function to the block	block.addStatement(workBlock);	//	}		//	return block;		//if we are in decoupled mode do not put the work function in a for loop	//and add the print statements	if (KjcOptions.decoupled) {	    block.addStatementFirst		(new SIRPrintStatement(null, 				       new JIntLiteral(0),				       null));	    block.addStatement(block.size(), 				    new SIRPrintStatement(null, 							  new JIntLiteral(1),							  null));	    return block;	}		//return the infinite loop	return new JWhileStatement(null, 				   new JBooleanLiteral(null, true),				   block, 				   null);    }