bottomPeek = Math.max(0, peek - (prePeek - prePop));
if (initFire  - 1 > 0) { bottomPeek = Math.max(0, peek - (prePeek - prePop)); } else bottomPeek = 0;
    void calculateItems(SIRFilter filter)     {	int pop = filter.getPopInt();	int peek = filter.getPeekInt();		//set up prePop, prePeek	int prePop = 0;	int prePeek = 0;		if (filter instanceof SIRTwoStageFilter) {	    prePop = ((SIRTwoStageFilter)filter).getInitPop();	    prePeek = ((SIRTwoStageFilter)filter).getInitPeek();	}		//the number of times this filter fires in the initialization	//schedule	initFire = 0;		Integer init = (Integer)RawBackend.initExecutionCounts.	    get(Layout.getNode(Layout.getTile(filter)));		if (init != null) 	    initFire = init.intValue();		//if this is not a twostage, fake it by adding to initFire,	//so we always think the preWork is called	if (!(filter instanceof SIRTwoStageFilter))	    initFire++;	//the number of items produced by the upstream filter in	//initialization	int upStreamItems = 0;	//number of times the previous node fires in init	int prevInitCount = 0;	//its push rate	int prevPush = 0;		FlatNode node = Layout.getNode(Layout.getTile(filter));	FlatNode previous = null;		if (node.inputs > 0) {	    previous = node.incoming[0];	    prevInitCount = Util.getCountPrev(RawBackend.initExecutionCounts, 					 previous, node);	    if (prevInitCount > 0) {		if (previous.contents instanceof SIRSplitter || 		    previous.contents instanceof SIRJoiner) {		    prevPush = 1;		}		else		    prevPush = ((SIRFilter)previous.contents).getPushInt();	    }	    //System.out.println("previous: " + previous.getName());	    //System.out.println("prev Push: " + prevPush + " prev init: " + prevInitCount);	}		//calculate the total items produced by the upstream node	upStreamItems = (prevInitCount * prevPush);	//if the previous node is a two stage filter then count its initWork	//in the initialItemsTo Receive	if (previous != null && previous.contents instanceof SIRTwoStageFilter) {	    upStreamItems -= ((SIRTwoStageFilter)previous.contents).getPushInt();	    upStreamItems += ((SIRTwoStageFilter)previous.contents).getInitPush();	}	//see my thesis for an explanation of this calculation	bottomPeek = Math.max(0, 			      peek - (prePeek - prePop));		remaining = upStreamItems -	    (prePeek + bottomPeek + ((initFire - 2) * pop));	    }