boolean alreadyPrinted = isSteadyState && filter instanceof SIRTwoStageFilter && ((SIRTwoStageFilter)filter).getInitPeek() > 0; if (peek > 0 && !alreadyPrinted) {
int bottomPeek; if (isSteadyState && filter instanceof SIRTwoStageFilter) { bottomPeek = ((SIRTwoStageFilter)filter).getInitPeek(); } else { bottomPeek = 0; } if (bottomPeek < peek) {
    private void printWorkHeader(boolean isSteadyState, int pop, int peek)     {	print("{\n");	// don't print the header for "work" functions in a two-stage	// filter, since it should go in initWork instead.  Here we	// calculate if we're already printed this header in initWork.	boolean alreadyPrinted = isSteadyState && 	    filter instanceof SIRTwoStageFilter &&	    ((SIRTwoStageFilter)filter).getInitPeek() > 0;	if (peek > 0 && !alreadyPrinted) {	    //print("int i, " + TAPE_INDEX + " = -1;\n");	    print("/* work header */\n");	    //	print(filter.getInputType() + 	    //       " buffer[" + filter.getPeekInt() + "];\n");	    print(" for (" + BUFFER_INDEX + " = 0; " + BUFFER_INDEX + " < " + 		  peek + "; " + BUFFER_INDEX + "++) \n");	    printReceive();	}	if (isSteadyState) {	    print(" while (1) {\n");	}	if (debug) print("   print_int("+   Layout.getTileNumber(filter) + ");\n");    }