/* Sue Ann Hong, Virginia Vassilevska
 * 15-745 Task 1 Test Suite
 * 1/31/2006
 * The following should benefit from const propagation, and from const folding
 */

void print_int(int i) {}
void print_newline(void) {}

void main(void) {
  int i,j;
	
	for(i=0; i<20; i+=1){
		
		j=prop(1);
		if(i>18){
			print_int(j);
			print_newline();
		}
	}
}


int prop(int b){
	int a,c,d,e;
	
	e=1;

	if(b>10000)
		return copyint(b*e);

	if(b<1)
		return (e-e);

	a=1;
	
	for(e=0; e<b; e+=1){
		c=copyint(a);
		d=copyint(b);
		d=b;
	}

	e=(copyint(a)+copyint(b)+copyint(c)+copyint(d));
	e+=prop(b+1);
	//print_int(e);
	//print_space(1);
	e=e/4;
	return e;

}

int copyint(int n){
  int i;
	i=n;
	return i;
}
