static u32 do_calc_pll(int freq, int* freq_out) {	int m, n, k, best_m, best_n, best_k, f_cur, best_error;	int fref = 14318;  	/* this really could be done with more intelligence --	   255*63*4 = 64260 iterations is silly */	best_error = freq;	best_n = best_m = best_k = 0;	for (n = 1; n < 256; n++) {		for (m = 1; m < 64; m++) {			for (k = 0; k < 4; k++) {				f_cur = fref*(n + 2)/(m + 2)/(1 << k);				if (abs(f_cur - freq) < best_error) {					best_error = abs(f_cur-freq);					best_n = n;					best_m = m;					best_k = k;				}			}		}	}	n = best_n;	m = best_m;	k = best_k;	*freq_out = fref*(n + 2)/(m + 2)/(1 << k);	return (n << 8) | (m << 2) | k;}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/0fbe9cafff72799700713e6a9d5a4ec7191e8d19/tdfxfb.c/buggy/drivers/video/tdfxfb.c