/*  REGENERATE CYCLES							     */
/*  03/09/13 (dkc)							     */
/*									     */
/*  This C program regenerates cycles for the 3n+c sequence given entry      */
/*  points.  The number of even and odd elements in the extended sequences   */
/*  are counted.							     */
/*									     */
/*    "jump=0" indicates a no-jump attachment point                          */
/*    "jump=1" indicates a one-jump attachment point                         */
/*    "jump=2" indicates a multiple-jump attachment point                    */
/*    "jump=3" indicates a jumped-over attachment point                      */
/*									     */
/*  "delta" denotes the number of odd elements in the jump minus j where     */
/*  t=u(mod 2^j) (for one-jump or multiple-jump attachment points).  The     */
/*  domains of the cycles are also computed.				     */
/*									     */
/*****************************************************************************/
#include <stdio.h>
#include <math.h>
#include "ln.h"
#include "c:\trin2\c50k\c19801.h"
unsigned int euclid(unsigned int a, unsigned int b);
unsigned int halbhung(unsigned int l, unsigned int n, unsigned int *M,
		      unsigned int *N, unsigned int *sv, unsigned int *A,
		      unsigned int *B, unsigned int *C, unsigned int *D,
		      unsigned int *L, unsigned int *S, unsigned int m);
void add64(unsigned int *A, unsigned int *B);
void sub64(unsigned int *A, unsigned int *B);
void div64_32(unsigned int *A, unsigned int *B, unsigned int C);
int main () {

unsigned int conv[75*2]={
 5, 3, 6, 4, 8, 5, 9, 6, 11, 7, 16, 10, 19, 12, 24, 15, 27, 17, 38, 24, 46, 29, 
 57, 36, 65, 41, 76, 48, 84, 53, 130, 82, 149, 94, 168, 106, 233, 147, 252, 159, 
 317, 200, 336, 212, 401, 253, 420, 265, 485, 306, 504, 318, 569, 359, 970, 612, 
 1054, 665, 1455, 918, 1539, 971, 2108, 1330, 2593, 1636, 3162, 1995, 3647, 2301, 
 4216, 2660, 4701, 2966, 5270, 3325, 5755, 3631, 6324, 3990, 6809, 4296, 7378, 4655, 
 7863, 4961, 8432, 5320, 8917, 5626, 9486, 5985, 9971, 6291, 10540, 6650, 11025, 6956, 
 11594, 7315, 12079, 7621, 12648, 7980, 13133, 8286, 13702, 8645, 14187, 8951, 
 14756, 9310, 15241, 9616, 15810, 9975, 16295, 10281, 16864, 10640, 17349, 10946, 
 17918, 11305, 18403, 11611, 18972, 11970, 19457, 12276, 20026, 12635, 20511, 12941, 
 21080, 13300, 21565, 13606, 22134, 13965, 22619, 14271, 23188, 14630, 23673, 14936, 
 24242, 15295, 24727, 15601};

int hflag=0;	 // selects which c value to histogram k values
int hflag1=0;
unsigned int indmin=0;	 // selects (l,m) value
unsigned int indmax=0;	 // Note: Could include different (l,m) values.
unsigned int bypass=0;	 // normally set to 0
unsigned int wflag=1;	 // normally set to 0
unsigned int infin=0;	 // normally set to 0
unsigned int eowrite=1;  // normally set to 0 ((K,L) values are output when set)
unsigned int flag13=1;	 // normally set to 0 (for "histov" and "histob")
unsigned int flag14=2;	 // normally set to 2 (definition of "d", plus, minus, or average)
unsigned int flag15=1;	 // normally set to 1 (Euclidean G.C.D. flag)
unsigned int flag16=0;	 // normally set to 0 (select log(3)/log(2), 3/2, 1.67, or 1.75)
int k,max,temp,order,s[14000],t,u,savek,oldk,c,olds,cmax,cmin,delta,locmin,locmax;
unsigned int g,h,i,m,iters,j,count,first,odds,evens,flag,lodds,levens,jump,jcnt;
unsigned int flag0,offset,index,sumtu,total,stu[3000*2],county,countn,countx;
unsigned int histo[100],mincnt,hismin[20],savjmp,second,histoj[200],histom[10];
int lastodd,glomax,usave,tmps,cyccnt,mcount,hcount,icount,lcount,oddsum,oldt,oldu;
unsigned int jumps[14000],mflag,attcnt,savind,newhis[100],oldhis[100],histon[40];
unsigned int histoh[500],histoi[100],histox[200],badcnt,badcntu,primary,jmpcnt,tempi;
int glomin,a,badcomp,savet,lastt,evensum,hsum,jsum,compcnt,sum,tsave,TSAVE[2];
unsigned int firstt,savjump,savcnt,tmpcnt,twojmp,lasthop,jmphop,offset1,jmpsum;
unsigned int twojmp0,twojmp1,twojmp2,twojmp3,glohop,glojmp,tmpjump,histoy[100];
unsigned int histoz[200],histow[500],histov[1500],histos[700],offset2,badtucnt;
unsigned int concov[75*3],histot[50],offset4,concove[75*3],histoa[50],histob[300];
unsigned int histou[100],offset5,patcnt,cyccntu,cyccntb,histor[100],offset3,equcnt;
unsigned int histod[3000],offset6,kl[100*2],klcount,outcnt[500],OLDT[2],GLOMAX[2];
unsigned int outkl[1000*2],outklind,cycsav[100*2],cycsavind,wrap,ncyc[30],USAVE[2];
unsigned int lamcnt,lamcntc,sumtuc,mintu,maxtu,mintuc,maxtuc,OLDS[2],LASTT[2];
unsigned int histodd[3000],ii,histodp[200],offset10,error[8],OLDU[2],offset11;
unsigned int EM[4],EN[4],sv[2002],A[32],B[32],C[32],D[32],L[32],S[32],em;
double maxminrat,minmaxrat,maxminratc,minmaxratc,deltaef;
double lambda,d,dmin,dmax,del,maxdel,mindel,sumrec,tempf,chain,rat,oldchn;
double ratdel,tempg,cap,cam,bp,bm,savchain,maxcmp,mean,std,var,maxdiff;
unsigned int flubs,flubx,pcount,chhist[40],jj,GLOMIN[2],LASTODD[2],LOCMIN[2];
unsigned int l1flag,l2flag,l3flag,d1hist[40],d2hist[40],d3hist[40],LOCMAX[2];
unsigned int maxt,maxu,mint,minu,sumt,sumu,kk,ut[5000],sumtu1,SAVET[2],V[2];
double lambdat,lambdau,lambda1,lambda2,lambda3,lambda4,lambda5,lambda6,dtemp,etemp;
unsigned int TEE[2],YOU[2],TMPS[2],TS[7000*2],MAXTU[2],MINTU[2],SUMTU[2],SUMT[2];
unsigned int UT[5000*2],STU[3000*4],SUMU[2],MAXT[2],MINT[2],MAXU[2],MINU[2];
unsigned int KSAVE[2],KSAVEP[2],onecnt,d4hist[40],d5hist[40],d6hist[40];
int savecp,ksavep,savec,ksave,deltae,temps[14000];
unsigned int begind,oldii,offset7,offset8,offset9,l4flag,l5flag,l6flag;
unsigned int CP[2],K[2],O[2],OR[2],E[2],Q[2],T[2],U[2],M[2],Z[2],ES[14000*2];
unsigned int count1,count2,count3,count4,count5,count6,d0hist[40],offdp,offdp3;
unsigned int d7hist[40],d8hist[40],d9hist[40],d10hist[40],levenpp,levenpm;
unsigned int d11hist[40],d12hist[40],d13hist[40],d14hist[40],d15hist[40];
unsigned int d16hist[40],d17hist[40],d18hist[40],d19hist[40],d20hist[40];
unsigned int d21hist[40],d22hist[40],d23hist[40],d24hist[40],d25hist[40];
unsigned int d26hist[40],d27hist[40],d28hist[40],d29hist[40],d30hist[40];
unsigned int d31hist[40],d32hist[40],d33hist[40],d34hist[40],d35hist[40];
unsigned int d36hist[40],d37hist[40],d38hist[40],d39hist[40],d40hist[40];
unsigned int d41hist[40],d42hist[40],d43hist[40],d44hist[40],d45hist[40];
unsigned int d46hist[40],d47hist[40],d48hist[40],d49hist[40];
unsigned int d50hist[40],d51hist[40],d52hist[40],d53hist[40],d54hist[40];
unsigned int d55hist[40],d56hist[40],d57hist[40],d58hist[40],d59hist[40];
unsigned int d60hist[40],d61hist[40],d62hist[40],d63hist[40],d64hist[40];
unsigned int d65hist[40],d66hist[40],d67hist[40],d68hist[40],d69hist[40];
FILE *Outfp;
Outfp = fopen("out0cyu.dat","w");
flubs=0;
flubx=0;
maxdiff=0.0;
pcount=0;
em=32;
for (i=0; i<8; i++)
   error[i]=0;
for (i=0; i<40; i++) {
   chhist[i]=0;
   d0hist[i]=0;
   d1hist[i]=0;
   d2hist[i]=0;
   d3hist[i]=0;
   d4hist[i]=0;
   d5hist[i]=0;
   d6hist[i]=0;
   d7hist[i]=0;
   d8hist[i]=0;
   d9hist[i]=0;
   d10hist[i]=0;
   }
for (i=0; i<40; i++) {
   d11hist[i]=0;
   d12hist[i]=0;
   d13hist[i]=0;
   d14hist[i]=0;
   d15hist[i]=0;
   d16hist[i]=0;
   d17hist[i]=0;
   }
for (i=0; i<40; i++) {
   d18hist[i]=0;
   d19hist[i]=0;
   d20hist[i]=0;
   d21hist[i]=0;
   d22hist[i]=0;
   d23hist[i]=0;
   d24hist[i]=0;
   d25hist[i]=0;
   d42hist[i]=0;
   d43hist[i]=0;
   d44hist[i]=0;
   d45hist[i]=0;
   d46hist[i]=0;
   d47hist[i]=0;
   d48hist[i]=0;
   d49hist[i]=0;
   }
for (i=0; i<40; i++) {
   d26hist[i]=0;
   d27hist[i]=0;
   d28hist[i]=0;
   d29hist[i]=0;
   d30hist[i]=0;
   d31hist[i]=0;
   d32hist[i]=0;
   d33hist[i]=0;
   }
for (i=0; i<40; i++) {
   d34hist[i]=0;
   d35hist[i]=0;
   d36hist[i]=0;
   d37hist[i]=0;
   d38hist[i]=0;
   d39hist[i]=0;
   d40hist[i]=0;
   d41hist[i]=0;
   }
for (i=0; i<40; i++) {
   d50hist[i]=0;
   d51hist[i]=0;
   d52hist[i]=0;
   d53hist[i]=0;
   d54hist[i]=0;
   d55hist[i]=0;
   d56hist[i]=0;
   d57hist[i]=0;
   d58hist[i]=0;
   d59hist[i]=0;
   d60hist[i]=0;
   d61hist[i]=0;
   d62hist[i]=0;
   d63hist[i]=0;
   d64hist[i]=0;
   d65hist[i]=0;
   d66hist[i]=0;
   d67hist[i]=0;
   d68hist[i]=0;
   d69hist[i]=0;
   }
for (i=0; i<100; i++) {
   histo[i]=0;
   newhis[i]=0;
   oldhis[i]=0;
   histoi[i]=0;
   histoy[i]=0;
   histor[i]=0;
   }
for (i=0; i<200; i++) {
   histox[i]=0;
   histodp[i]=0;
   histoz[i]=0;
   histoj[i]=0;
   }
for (i=0; i<500; i++)
   histow[i]=0;
for (i=0; i<500; i++)
   histoh[i]=0;
for (i=0; i<10; i++)
   histom[i]=0;
for (i=0; i<20; i++)
   hismin[i]=0;
for (i=0; i<40; i++)
   histon[i]=0;
for (i=0; i<100; i++)
   histou[i]=0;
for (i=0; i<300; i++)
   histob[i]=0;
for (i=0; i<50; i++) {
   histot[i]=0;
   histoa[i]=0;
   }
for (i=0; i<75*3; i++) {
   concov[i]=0;
   concove[i]=0;
   }
for (i=0; i<700; i++)
   histos[i]=0;
for (i=0; i<3000; i++) {  // these two arrays must be the same size
   histod[i]=0;
   histodd[i]=0;
   }
for (i=0; i<1500; i++)
   histov[i]=0;
for (i=0; i<1000; i++) {
   outkl[2*i]=0;
   outkl[2*i+1]=0;
   }
for (i=0; i<30; i++)
   ncyc[i]=0;
if (numbc>500) {
   printf("outcnt array not big enough \n");
   goto zskip;
   }
for (i=0; i<500; i++)
   outcnt[i]=0;
count1=0;
count2=0;
count3=0;
count4=0;
count5=0;
count6=0;
outklind=0;
badcnt=0;
badcntu=0;
badtucnt=0;
badcomp=0;
compcnt=0;
cyccntu=0;
cyccntb=0;
equcnt=0;
maxcmp=0.0;
primary=0;
rat=log(3.0)/log(2.0);
ratdel=rat/(rat-1.0);
offset=20;
offset1=110;
offset2=220;
offset3=100;
offset4=25;
offset5=70;
offset6=275;
offset7=500;
offset8=260;
offset9=660;
offset10=2000;
offset11=400;
offdp=20;
offdp3=40;
index=0;
maxdel=-1000000.0;
mindel=1000000.0;
maxminrat=0.0;
minmaxrat=65536.0*65536.0*65536.0;
maxminratc=0.0;
minmaxratc=65536.0*65536.0*65536.0;
lamcnt=0;
lamcntc=0;
county=0;
countn=0;
countx=0;
cyccnt=0;
mcount=0;
glohop=0;
glojmp=0;
twojmp=0;
twojmp0=0;
twojmp1=0;
twojmp2=0;
twojmp3=0;
jmphop=0;
Z[0]=0;
Z[1]=0;
onecnt=0;
for (h=0; h<numbc; h++) {
   c=cval[h];
   CP[0]=0;
   CP[1]=(unsigned int)c;
   iters=size[h];
   if (iters>14000) {
      printf("error: arrays (s, temps, jumps, ES) not big enough \n");
      goto zskip;
      }
   for (i=0; i<100; i++) {
      kl[2*i]=0;
      kl[2*i+1]=0;
      }
   klcount=0;
   for (i=0; i<100; i++) {
      cycsav[2*i]=0;
      cycsav[2*i+1]=0;
      }
   cycsavind=0;
   if (eowrite==0)
      printf("c=%d \n",c);
   for (i=0; i<iters; i++) {
      s[i]=sinp[i+index];
      ES[2*i+1]=s[i];
      if (s[i]<0)
	 ES[2*i]=0xffffffff;
      else
	 ES[2*i]=0;
//
//  set first word
//
      if ((c==467)&&(s[i]==0x59f50ee4))
	 ES[2*i]=0xffffffff;
      if (c==3949) {
	 if (s[i]==0x9610d0e6)
	    ES[2*i]=0;
	 if (s[i]==0x1ce41f70)
	    ES[2*i]=1;
	 }
      if (c==5137) {
	 if (s[i]==0x6fa35098)
	    ES[2*i]=0xffffffff;
	 if (s[i]==0x10922e5e)
	    ES[2*i]=0xffffffff;
	 if (s[i]==0x5630ae4a)
	    ES[2*i]=0xfffffffd;
	 if (s[i]==0x00524660)
	    ES[2*i]=0xffffffff;
	 if (s[i]==0x6d8d6c22)
	    ES[2*i]=0xffffffff;
	 if (s[i]==0x75d815a4)
	    ES[2*i]=0xffffffff;
	 if (s[i]==0x9bfe48c6)
	    ES[2*i]=0xfffffffa;
	 if (s[i]==0xf7bf157a)
	    ES[2*i]=0xfffffffc;
	 if (s[i]==0xdce7ad12)
	    ES[2*i]=0xfffffffe;
	 if (s[i]==0x0b2850de)
	    ES[2*i]=0xffffffff;
	 if (s[i]==0x46c97c3a)
	    ES[2*i]=0xfffffffe;
	 if (s[i]==0x5a8b939a)
	    ES[2*i]=0xffffffff;
	 if (s[i]==0x4f514348)
	    ES[2*i]=0xffffffff;
	 if (s[i]==0x537bff30)
	    ES[2*i]=0xffffffff;
	 if (s[i]==0x137ec610)
	    ES[2*i]=0xfffffffc;
	 if (s[i]==0x04dfb184)
	    ES[2*i]=0xffffffff;
	 if (s[i]==0x7b9565e2)
	    ES[2*i]=0xffffffff;
	 if (s[i]==0xc1d86a28)
	    ES[2*i]=0xfffffffe;
	 if (s[i]==0x14a8ea0e)
	    ES[2*i]=0xfffffffd;
	 if (s[i]==0x896e9d50)
	    ES[2*i]=0xfffffffd;
	 if (s[i]==0x625ba754)
	    ES[2*i]=0xffffffff;
	 if (s[i]==0xe47232fa)
	    ES[2*i]=0xfffffffe;
	 if (s[i]==0x5727200c)
	    ES[2*i]=0xffffffff;
	 if (s[i]==0x97ef9100)
	    ES[2*i]=0xfffffffd;
	 if (s[i]==0x65fbe440)
	    ES[2*i]=0xffffffff;
	 if (s[i]==0x196886e4)
	    ES[2*i]=0xffffffff;
	 if (s[i]==0x5bd6ff3c)
	    ES[2*i]=0xffffffff;
	 if (s[i]==0x642d566e)
	    ES[2*i]=0xffffffff;
	 if (s[i]==0x49cdb8fe)
	    ES[2*i]=0xffffffff;
	 if (s[i]==0x8be46252)
	    ES[2*i]=0xfffffffd;
	 if (s[i]==0xf7046baa)
	    ES[2*i]=0xfffffffe;
	 if (s[i]==0x65eec8a2)
	    ES[2*i]=0xffffffff;
	 if (s[i]==0x4fd563be)
	    ES[2*i]=0xffffffff;
	 if (s[i]==0xcba20e18)
	    ES[2*i]=0xfffffffd;
	 if (s[i]==0x72e88386)
	    ES[2*i]=0xffffffff;
	 if (s[i]==0x312420aa)
	    ES[2*i]=0xffffffff;
	 if (s[i]==0x2bae5f92)
	    ES[2*i]=0xffffffff;
	 if (s[i]==0x6576451a)
	    ES[2*i]=0xffffffff;
	 if (s[i]==0x56bc28b4)
	    ES[2*i]=0xffffffff;
	 if (s[i]==0x5bcc665e)
	    ES[2*i]=0xffffffff;
	 if (s[i]==0x2c6977c2)
	    ES[2*i]=0xfffffffe;
	 if (s[i]==0x7c7db276)
	    ES[2*i]=0xffffffff;
	 if (s[i]==0x461a371c)
	    ES[2*i]=0xffffffff;
	 if (s[i]==0xf8b9cb42)
	    ES[2*i]=0xfffffffe;
	 if (s[i]==0x3f757366)
	    ES[2*i]=0xfffffffd;
	 if (s[i]==0x73b21d74)
	    ES[2*i]=0xfffffffe;
	 if (s[i]==0x61c6bdb6)
	    ES[2*i]=0xfffffffe;
	 if (s[i]==0x7ceff1dc)
	    ES[2*i]=0xffffffff;
	 if (s[i]==0x1da422e2)
	    ES[2*i]=0xfffffffe;
	 if (s[i]==0xfe73cb64)
	    ES[2*i]=0xfffffffe;
	 if (s[i]==0x60c9761c)
	    ES[2*i]=0xffffffff;
	 if (s[i]==0x89b091dc)
	    ES[2*i]=0xfffffffe;
	 if (s[i]==0x4421b2b6)
	    ES[2*i]=0xffffffff;
	 if (s[i]==0xdab7522a)
	    ES[2*i]=0xfffffffe;
	 if (s[i]==0x296c412e)
	    ES[2*i]=0xffffffff;
	 if (s[i]==0x3451e938)
	    ES[2*i]=0xffffffff;
	 if (s[i]==0xa92c4a22)
	    ES[2*i]=0xfffffffe;
	 if (s[i]==0xb1a84b54)
	    ES[2*i]=0xfffffffe;
	 if (s[i]==0x7d17cdde)
	    ES[2*i]=0xffffffff;
	 if (s[i]==0x8af091f0)
	    ES[2*i]=0xfffffffd;
	 if (s[i]==0x62bc247c)
	    ES[2*i]=0xffffffff;
	 if (s[i]==0x68777cc0)
	    ES[2*i]=0xffffffff;
	 if (s[i]==0x559a1182)
	    ES[2*i]=0xffffffff;
	 if (s[i]==0x9bec7fdc)
	    ES[2*i]=0xfffffff8;
	 if (s[i]==0xa955eb58)
	    ES[2*i]=0xfffffffd;
	 if (s[i]==0x6a557ad6)
	    ES[2*i]=0xffffffff;
	 }
      if ((c==10663)&&(s[i]==0x89cadabc))
	 ES[2*i]=0;
      if (c==13033) {
	 if (s[i]==0x86afb44c)
	    ES[2*i]=0;
	 if (s[i]==0xa1cfd02e)
	    ES[2*i]=0;
	 if (s[i]==0x3c93c3b2)
	    ES[2*i]=9;
	 if (s[i]==0x9909a550)
	    ES[2*i]=2;
	 if (s[i]==0xa6426954)
	    ES[2*i]=0;
	 }
      if ((c==13889)&&(s[i]==0xb61feca8))
	 ES[2*i]=0;
      if ((c==14857)&&(s[i]==0x05aa7d42))
	 ES[2*i]=1;
      if (c==15217) {
	 if (s[i]==0x6249cc02)
	    ES[2*i]=0xffffffff;
	 if (s[i]==0x6ca1a200)
	    ES[2*i]=0xffffffff;
	 if (s[i]==0x745873e2)
	    ES[2*i]=0xffffffff;
	 if (s[i]==0x583babe0)
	    ES[2*i]=0xffffffff;
	 }
      if ((c==15343)&&(s[i]==0xab72f760))
	 ES[2*i]=0;
      if (c==15913) {
	 if (s[i]==0xddbb59ce)
	    ES[2*i]=0;
	 if (s[i]==0x18a19bec)
	    ES[2*i]=1;
	 }
      if (c==17021) {
	 if (s[i]==0xc4cf57a0)
	    ES[2*i]=0;
	 if (s[i]==0x238981ea)
	    ES[2*i]=1;
	 if (s[i]==0x943282a0)
	    ES[2*i]=0;
	 if (s[i]==0xd75f9f04)
	    ES[2*i]=0;
	 if (s[i]==0x76f31934)
	    ES[2*i]=2;
	 if (s[i]==0xb5d7cc08)
	    ES[2*i]=0;
	 if (s[i]==0xd6342702)
	    ES[2*i]=1;
	 if (s[i]==0xb0539f40)
	    ES[2*i]=0;
	 }
      if ((c==18631)&&(s[i]==0x48f4e5f6))
	 ES[2*i]=0xffffffff;
      if ((c==19189)&&(s[i]==0x8fa27166))
	 ES[2*i]=0;
      if (c==20729) {
	 if (s[i]==0xe24a3aee)
	    ES[2*i]=0;
	 if (s[i]==0x610605d6)
	    ES[2*i]=1;
	 if (s[i]==0x060b16dc)
	    ES[2*i]=1;
	 if (s[i]==0x97c9ac98)
	    ES[2*i]=1;
	 if (s[i]==0xc69395e4)
	    ES[2*i]=0;
	 if (s[i]==0xa34e86b0)
	    ES[2*i]=0;
	 }
      if (c==21091) {
	 if (s[i]==0x02b30d5a)
	    ES[2*i]=0xffffffff;
	 if (s[i]==0x0f9087c8)
	    ES[2*i]=0xffffffff;
	 }
      if ((c==22937)&&(s[i]==0xf54f2a4a))
	 ES[2*i]=0;
      if (c==23173) {
	 if (s[i]==0x526d70c6)
	    ES[2*i]=1;
	 if (s[i]==0x029491ee)
	    ES[2*i]=2;
	 if (s[i]==0xd916eea0)
	    ES[2*i]=0;
	 }
      if ((c==23563)&&(s[i]==0x985144c0))
	 ES[2*i]=0;
      if ((c==23617)&&(s[i]==0x18df53b4))
	 ES[2*i]=1;
      if ((c==26305)&&(s[i]==0xb63536a8))
	 ES[2*i]=0;
      if ((c==26513)&&(s[i]==0x2c2e8800))
	 ES[2*i]=1;
      if ((c==26923)&&(s[i]==0xa33b9286))
	 ES[2*i]=0;
      if ((c==28345)&&(s[i]==0xa2735d2a))
	 ES[2*i]=0;
      if (c==28493) {
	 if (s[i]==0xfbade37c)
	    ES[2*i]=1;
	 if (s[i]==0xf0f40106)
	    ES[2*i]=0;
	 if (s[i]==0x8907280a)
	    ES[2*i]=0xc;
	 if (s[i]==0x30f5b360)
	    ES[2*i]=1;
	 if (s[i]==0x49cf69c2)
	    ES[2*i]=5;
	 }
      if (c==28615) {
	 if (s[i]==0x53be0ebe)
	    ES[2*i]=1;
	 if (s[i]==0x2035e656)
	    ES[2*i]=2;
	 if (s[i]==0xcc145252)
	    ES[2*i]=0;
	 if (s[i]==0x024a9b3c)
	    ES[2*i]=1;
	 }
      if ((c==30337)&&(s[i]==0x8b4b9306))
	 ES[2*i]=0;
      if (c==30799) {
	 if (s[i]==0x21463d46)
	    ES[2*i]=1;
	 if (s[i]==0x9c9be132)
	    ES[2*i]=0;
	 if (s[i]==0x842414e0)
	    ES[2*i]=0;
	 }
      if (c==30809) {
	 if (s[i]==0xc703b7f2)
	    ES[2*i]=5;
	 if (s[i]==0x87a32986)
	    ES[2*i]=39;
	 if (s[i]==0xc2e0862c)
	    ES[2*i]=18;
	 if (s[i]==0x46cf70f4)
	    ES[2*i]=5;
	 if (s[i]==0xfd470344)
	    ES[2*i]=0;
	 if (s[i]==0xe439ef48)
	    ES[2*i]=0;
	 if (s[i]==0x647e106a)
	    ES[2*i]=2;
	 if (s[i]==0xe5af643e)
	    ES[2*i]=0;
	 if (s[i]==0xc1cc8b7e)
	    ES[2*i]=0;
	 if (s[i]==0xa385249c)
	    ES[2*i]=0;
	 if (s[i]==0x5d4063e4)
	    ES[2*i]=1;
	 if (s[i]==0x2abb6f7e)
	    ES[2*i]=1;
	 if (s[i]==0xfc0eb4fc)
	    ES[2*i]=0;
	 if (s[i]==0x8867a5ae)
	    ES[2*i]=0;
	 if (s[i]==0x817b37b2)
	    ES[2*i]=0;
	 if (s[i]==0x16e15c84)
	    ES[2*i]=11;
	 if (s[i]==0xa1aeaa0e)
	    ES[2*i]=2;
	 if (s[i]==0xfef3239c)
	    ES[2*i]=4;
	 if (s[i]==0x1d03a172)
	    ES[2*i]=7;
	 if (s[i]==0x9d296680)
	    ES[2*i]=9;
	 if (s[i]==0x674a59a0)
	    ES[2*i]=2;
	 if (s[i]==0x99d29668)
	    ES[2*i]=0;
	 if (s[i]==0x91a1bd2e)
	    ES[2*i]=1;
	 if (s[i]==0x28066a98)
	    ES[2*i]=7;
	 if (s[i]==0xca019aa6)
	    ES[2*i]=1;
	 if (s[i]==0xca019aa6)
	    ES[2*i]=1;
	 if (s[i]==0xc13903be)
	    ES[2*i]=0;
	 if (s[i]==0xa308aa12)
	    ES[2*i]=0;
	 if (s[i]==0x90e54e2e)
	    ES[2*i]=0;
	 if (s[i]==0x29e4ec4a)
	    ES[2*i]=5;
	 if (s[i]==0xefb5f6b2)
	    ES[2*i]=1;
	 if (s[i]==0xdb55b72e)
	    ES[2*i]=0;
	 if (s[i]==0x384ce98c)
	    ES[2*i]=1;
	 if (s[i]==0xf442d07a)
	    ES[2*i]=1;
	 if (s[i]==0xbb992c44)
	    ES[2*i]=0;
	 if (s[i]==0x1d8ed584)
	    ES[2*i]=2;
	 if (s[i]==0xab5af33e)
	    ES[2*i]=0;
	 if (s[i]==0x90954c26)
	    ES[2*i]=0;
	 if (s[i]==0xb02922ba)
	    ES[2*i]=0;
	 if (s[i]==0x6c0fc8ce)
	    ES[2*i]=1;
	 if (s[i]==0xc42216f0)
	    ES[2*i]=5;
	 if (s[i]==0x710885bc)
	    ES[2*i]=1;
	 if (s[i]==0x33528ce8)
	    ES[2*i]=1;
	 if (s[i]==0xcbbda482)
	    ES[2*i]=0;
	 if (s[i]==0xd99340e4)
	    ES[2*i]=0;
	 if (s[i]==0xf4583c8e)
	    ES[2*i]=2;
	 if (s[i]==0x4f5d7cea)
	    ES[2*i]=6;
	 if (s[i]==0x5dc32cee)
	    ES[2*i]=2;
	 if (s[i]==0xfeabf952)
	    ES[2*i]=2;
	 if (s[i]==0xd7a092c6)
	    ES[2*i]=0;
	 if (s[i]==0x5966c2f6)
	    ES[2*i]=1;
	 if (s[i]==0xc24a18e2)
	    ES[2*i]=0;
	 if (s[i]==0xe648cdb2)
	    ES[2*i]=1;
	 if (s[i]==0x03a6a3e6)
	    ES[2*i]=1;
	 if (s[i]==0x7c3fb870)
	    ES[2*i]=11;
	 if (s[i]==0xdf0fee1c)
	    ES[2*i]=2;
	 if (s[i]==0xb9bdabca)
	    ES[2*i]=2;
	 if (s[i]==0x05a73e82)
	    ES[2*i]=1;
	 if (s[i]==0x748e9f82)
	    ES[2*i]=1;
	 if (s[i]==0x1bb2b7c4)
	    ES[2*i]=3;
	 if (s[i]==0xa7d81fd4)
	    ES[2*i]=0;
	 }
      if ((c==30815)&&(s[i]==0x8f43d076))
	  ES[2*i]=0;
      if ((c==30959)&&(s[i]==0xc843e2d6))
	  ES[2*i]=0;
      if (c==31639) {
	 if (s[i]==0xb6613838)
	    ES[2*i]=9;
	 if (s[i]==0x6d984e0e)
	    ES[2*i]=2;
	 if (s[i]==0xaed30c06)
	    ES[2*i]=0;
	 if (s[i]==0x940efd8c)
	    ES[2*i]=10;
	 if (s[i]==0xfbc2ee70)
	    ES[2*i]=1;
	 if (s[i]==0xcd2056f2)
	    ES[2*i]=0;
	 if (s[i]==0x2411f376)
	    ES[2*i]=1;
	 if (s[i]==0x8a9fa732)
	    ES[2*i]=0;
	 if (s[i]==0xaf730aa6)
	    ES[2*i]=0;
	 }
      if (c==31843) {
	 if (s[i]==0x28aeebf4)
	    ES[2*i]=7;
	 if (s[i]==0x18b7da24)
	    ES[2*i]=5;
	 if (s[i]==0x6ef40318)
	    ES[2*i]=1;
	 }
      if ((c==32593)&&(s[i]==0x885d7f62))
	 ES[2*i]=0;
      if (c==32735) {
	 if (s[i]==0x8010cb56)
	    ES[2*i]=1;
	 if (s[i]==0x90066c38)
	    ES[2*i]=0;
	 }
      if (c==33587) {
	 if (s[i]==0x68e2f65a)
	    ES[2*i]=2;
	 if (s[i]==0xdc23f098)
	    ES[2*i]=3;
	 if (s[i]==0xf708fc26)
	    ES[2*i]=0;
	 }
      if (c==33641) {
	 if (s[i]==0xf446a43c)
	    ES[2*i]=1;
	 if (s[i]==0xd30e6956)
	    ES[2*i]=0;
	 }
      if (c==33899) {
	 if (s[i]==0x6e42ac4e)
	    ES[2*i]=0xffffffff;
	 if (s[i]==0x726bfe80)
	    ES[2*i]=0xffffffff;
	 if (s[i]==0x2844171c)
	    ES[2*i]=0xffffffff;
	 if (s[i]==0x7e1b5e38)
	    ES[2*i]=0xffffffff;
	 if (s[i]==0x5344cf7a)
	    ES[2*i]=0xffffffff;
	 }
      if ((c==35491)&&(s[i]==0xe25bb43e))
	 ES[2*i]=0;
      if (c==35681) {
	 if (s[i]==0xec9c51a)
	    ES[2*i]=2;
	 if (s[i]==0xc58bccc2)
	    ES[2*i]=0;
	 }
      if (c==36691) {
	 if (s[i]==0xc24b4966)
	    ES[2*i]=1;
	 if (s[i]==0x8e7a7258)
	    ES[2*i]=0;
	 }
      if ((c==37351)&&(s[i]==0x85bd0eee))
	 ES[2*i]=0;
      if (c==38671) {
	 if (s[i]==0xe3f78b5a)
	    ES[2*i]=0;
	 if (s[i]==0x803b9ccc)
	    ES[2*i]=0;
	 }
      if (c==38777) {
	 if (s[i]==0xbd0c4406)
	    ES[2*i]=0;
	 if (s[i]==0x976a464a)
	    ES[2*i]=0;
	 }
      if ((c==39067)&&(s[i]==0x37bddd0c))
	 ES[2*i]=1;
      if (c==39409) {
	 if (s[i]==0x6f2b5a94)
	    ES[2*i]=2;
	 if (s[i]==0x840cbb4e)
	    ES[2*i]=0;
	 if (s[i]==0xab623c02)
	    ES[2*i]=0;
	 if (s[i]==0xbf265772)
	    ES[2*i]=0;
	 if (s[i]==0x90f734e0)
	    ES[2*i]=0;
	 if (s[i]==0x9bce7fec)
	    ES[2*i]=0;
	 if (s[i]==0x88636702)
	    ES[2*i]=0;
	 if (s[i]==0xf2772886)
	    ES[2*i]=0;
	 if (s[i]==0xfff785f8)
	    ES[2*i]=0;
	 }
      if ((c==39611)&&(s[i]==0xfaccc6dc))
	 ES[2*i]=0;
      if ((c==40057)&&(s[i]==0x004b81a8))
	 ES[2*i]=1;
      if (c==40295) {
	 if (s[i]==0x96127ebe)
	    ES[2*i]=0xfffffffe;
	 if (s[i]==0x7c91f98a)
	    ES[2*i]=0xfffffffd;
	 if (s[i]==0xad439da)
	    ES[2*i]=0xfffffffa;
	 if (s[i]==0xfb230af0)
	    ES[2*i]=0xfffffffd;
	 if (s[i]==0x679c4812)
	    ES[2*i]=0xfffffffe;
	 if (s[i]==0x5ded3f18)
	    ES[2*i]=0xffffffff;
	 if (s[i]==0x28e08772)
	    ES[2*i]=0xffffffff;
	 if (s[i]==0x7ec8c2bc)
	    ES[2*i]=0xffffffff;
	 if (s[i]==0x1af8b186)
	    ES[2*i]=0xffffffff;
	 }
      if (c==40741) {
	 if (s[i]==0xc8418714)
	    ES[2*i]=0xfffffffe;
	 if (s[i]==0x3e874350)
	    ES[2*i]=0xffffffff;
	 if (s[i]==0x381dc766)
	    ES[2*i]=0xffffffff;
	 if (s[i]==0x5759dd3a)
	    ES[2*i]=0xffffffff;
	 }
      if ((c==40831)&&(s[i]==0x92af1dbc))
	 ES[2*i]=0;
      if ((c==41057)&&(s[i]==0xd7bd2534))
	 ES[2*i]=1;
      if ((c==41191)&&(s[i]==0x37bdd8e6))
	 ES[2*i]=1;
      if ((c==41597)&&(s[i]==0xcace7d9c))
	 ES[2*i]=0;
      if (c==42019) {
	 if (s[i]==0x867e274c)
	    ES[2*i]=1;
	 if (s[i]==0x114ffb5e)
	    ES[2*i]=4;
	 }
      if (c==42317) {
	 if (s[i]==0xb81a5342)
	    ES[2*i]=0;
	 }
      if (c==42763) {
	 if (s[i]==0xb53b6262)
	    ES[2*i]=0;
	 if (s[i]==0xb7bca88c)
	    ES[2*i]=0;
	 }
      if (c==42887) {
	 if (s[i]==0x4a97567a)
	    ES[2*i]=1;
	 if (s[i]==0x190fde12)
	    ES[2*i]=0x43;
	 if (s[i]==0x0f63e7f8)
	    ES[2*i]=0x132;
	 if (s[i]==0x83d8f9fe)
	    ES[2*i]=0x4c;
	 if (s[i]==0x6b705bd0)
	    ES[2*i]=0x30;
	 if (s[i]==0x1adc16f4)
	    ES[2*i]=0xc;
	 if (s[i]==0x9e218caa)
	    ES[2*i]=8;
	 if (s[i]==0xd8f347d4)
	    ES[2*i]=4;
	 if (s[i]==0x5d04d4e8)
	    ES[2*i]=1;
	 }
      if (c==44411) {
	 if (s[i]==0x52c27f8e)
	    ES[2*i]=3;
	 if (s[i]==0x3f091b34)
	    ES[2*i]=1;
	 if (s[i]==0x8698a57c)
	    ES[2*i]=0;
	 }
      if ((c==44515)&&(s[i]==0x874cf1e0))
	 ES[2*i]=0;
      if ((c==44711)&&(s[i]==0x26660716))
	 ES[2*i]=1;
      if ((c==44837)&&(s[i]==0x020f916a))
	 ES[2*i]=1;
      if ((c==44837)&&(s[i]==0x020f916a))
	 ES[2*i]=1;
      if ((c==45941)&&(s[i]==0xdbaba8fe))
	 ES[2*i]=0;
      if (c==47275) {
	 if (s[i]==0x63643446)
	    ES[2*i]=1;
	 if (s[i]==0x515a0996)
	    ES[2*i]=1;
	 if (s[i]==0xa01d9f2e)
	    ES[2*i]=0;
	 }
      if ((c==47351)&&(s[i]==0xd522d0dc))
	 ES[2*i]=2;
      if ((c==47657)&&(s[i]==0x8bd9de54))
	 ES[2*i]=0;
      if (c==47677) {
	 if (s[i]==0xa9b42330)
	    ES[2*i]=4;
	 if (s[i]==0x2a6d08cc)
	    ES[2*i]=1;
	 }
      if (c==47737) {
	 if (s[i]==0x2fac837c)
	    ES[2*i]=1;
	 if (s[i]==0x801da4e8)
	    ES[2*i]=0;
	 }
      if (c==48191) {
	 if (s[i]==0x0277c912)
	    ES[2*i]=1;
	 if (s[i]==0xda15f132)
	    ES[2*i]=0;
	 if (s[i]==0xcf044516)
	    ES[2*i]=0;
	 }
      if (c==48229) {
	 if (s[i]==0x428c94c2)
	    ES[2*i]=0xffffffff;
	 if (s[i]==0x7b8d75ec)
	    ES[2*i]=0xffffffff;
	 if (s[i]==0x1d7f0f74)
	    ES[2*i]=0xffffffff;
	 }
      if (c==48523) {
	 if (s[i]==0xce6ce4d4)
	    ES[2*i]=0;
	 if (s[i]==0x25ede48c)
	    ES[2*i]=1;
	 if (s[i]==0x9731807e)
	    ES[2*i]=0;
	 }
      if ((c==49037)&&(s[i]==0xd5348ff8))
	 ES[2*i]=0;
      if ((c==49205)&&(s[i]==0x8c4e0894))
	 ES[2*i]=0;
      if (c==49331) {
	 if (s[i]==0xb89e53ba)
	    ES[2*i]=0;
	 if (s[i]==0x836fe796)
	    ES[2*i]=0;
	 if (s[i]==0xece01daa)
	    ES[2*i]=0;
	 if (s[i]==0xc7ddfddc)
	    ES[2*i]=0;
	 }
      if ((c==49543)&&(s[i]==0xcf4b39ca))
	 ES[2*i]=0;
      if (c==50605) {
	 if (s[i]==0xe22e8592)
	    ES[2*i]=2;
	 if (s[i]==0x14d1a382)
	    ES[2*i]=1;
	 }
      if (c==50071) {
	 if (s[i]==0x24975830)
	    ES[2*i]=0xffffffff;
	 if (s[i]==0xbf713818)
	    ES[2*i]=0xfffffffe;
	 }
      if ((c==50371)&&(s[i]==0xd346f57e))
	 ES[2*i]=0;
      if ((c==51167)&&(s[i]==0xcac908be))
	 ES[2*i]=1;
      if (c==52643) {
	 if (s[i]==0x35d28fba)
	    ES[2*i]=1;
	 if (s[i]==0xd073c5e8)
	    ES[2*i]=9;
	 if (s[i]==0x741cf17a)
	    ES[2*i]=2;
	 if (s[i]==0xf710632c)
	    ES[2*i]=1;
	 }
      if (c==53891) {
	 if (s[i]==0x8065bab4)
	    ES[2*i]=1;
	 if (s[i]==0xf3420bc0)
	    ES[2*i]=0;
	 }
      if ((c==55055)&&(s[i]==0x8c8bb60c))
	 ES[2*i]=0;
      if (c==55825) {
	 if (s[i]==0x1b847c86)
	    ES[2*i]=1;
	 if (s[i]==0x9f7b0e56)
	    ES[2*i]=0;
	 if (s[i]==0xd2d6d16c)
	    ES[2*i]=1;
	 }
      if (c==56353) {
	 if (s[i]==0x9808d154)
	    ES[2*i]=1;
	 if (s[i]==0x178d1636)
	    ES[2*i]=4;
	 if (s[i]==0x96e86c6a)
	    ES[2*i]=2;
	 if (s[i]==0xf8975fb0)
	    ES[2*i]=0;
	 if (s[i]==0xbfa92bb4)
	    ES[2*i]=0;
	 }
      if (c==56413) {
	 if (s[i]==0x417d83ec)
	    ES[2*i]=0xffffffed;
	 if (s[i]==0x17a1f956)
	    ES[2*i]=0xfffffff8;
	 if (s[i]==0x5008bbac)
	    ES[2*i]=0xfffffff5;
	 if (s[i]==0x643cf6e0)
	    ES[2*i]=0xfffffff8;
	 if (s[i]==0x190f3db8)
	    ES[2*i]=0xfffffffe;
	 if (s[i]==0x7869abce)
	    ES[2*i]=0xffffffff;
	 }
      if (c==56737) {
	 if (s[i]==0xad176db4)
	    ES[2*i]=2;
	 if (s[i]==0x80749bfa)
	    ES[2*i]=0;
	 }
      if (c==56941) {
	 if (s[i]==0x293bbe40)
	    ES[2*i]=16;
	 if (s[i]==0xa4eef90)
	    ES[2*i]=4;
	 if (s[i]==0x0293bbe4)
	    ES[2*i]=1;
	 }
      if ((c==57427)&&(s[i]==0xc7ee74a2))
	 ES[2*i]=0;
      if (c==57691) {
	 if (s[i]==0x9c3dc588)
	    ES[2*i]=0;
	 if (s[i]==0x7ea1fd8a)
	    ES[2*i]=1;
	 if (s[i]==0xd66a6e4c)
	    ES[2*i]=2;
	 if (s[i]==0x83def9c4)
	    ES[2*i]=1;
	 }
      if (c==57941) {
	 if (s[i]==0xa5a54f46)
	    ES[2*i]=0;
	 if (s[i]==0x8bc487a8)
	    ES[2*i]=0;
	 }
      if ((c==58241)&&(s[i]==0x57cb6fd4))
	 ES[2*i]=1;
      if (c==58943) {
	 if (s[i]==0x5eb1baba)
	    ES[2*i]=1;
	 if (s[i]==0xc54488f0)
	    ES[2*i]=0;
	 }
      if ((c==59087)&&(s[i]==0x9ea5be7a))
	 ES[2*i]=0;
      if ((c==59213)&&(s[i]==0x92bbebfa))
	 ES[2*i]=0;
      if ((c==59299)&&(s[i]==0xb334b06e))
	 ES[2*i]=0;
      if (c==59575) {
	 if (s[i]==0xd8b6d83a)
	    ES[2*i]=10;
	 if (s[i]==0x936dca7c)
	    ES[2*i]=4;
	 if (s[i]==0xf719fb9c)
	    ES[2*i]=0;
	 }
      if ((c==59687)&&(s[i]==0xa0746c9e))
	 ES[2*i]=0;
      if (c==59695) {
	 if (s[i]==0xd5b21d88)
	    ES[2*i]=0;
	 if (s[i]==0x927e3164)
	    ES[2*i]=0;
	 }
      if (c==59767) {
	 if (s[i]==0x5b49692e)
	    ES[2*i]=1;
	 if (s[i]==0xf73fdfe6)
	    ES[2*i]=0;
	 }
      if ((c==60503)&&(s[i]==0x8d9073dc))
	 ES[2*i]=0;
      if ((c==60841)&&(s[i]==0x7dffd324))
	 ES[2*i]=1;
      if ((c==60883)&&(s[i]==0x8f3bdcd4))
	 ES[2*i]=0;
      if (c==61135) {
	 if (s[i]==0xb35236f2)
	    ES[2*i]=5;
	 if (s[i]==0xcf4e79f2)
	    ES[2*i]=4;
	 if (s[i]==0x0eeb527a)
	    ES[2*i]=4;
	 if (s[i]==0x4864f3a6)
	    ES[2*i]=2;
	 if (s[i]==0xdb261712)
	    ES[2*i]=0;
	 if (s[i]==0xd006fc30)
	    ES[2*i]=0;
	 }
      if ((c==61147)&&(s[i]==0x8b2dc9de))
	 ES[2*i]=0;
      if ((c==61325)&&(s[i]==0x8161ab64))
	 ES[2*i]=0;
      if (c==61489) {
	 if (s[i]==0xb0fcb7f8)
	    ES[2*i]=0;
	 if (s[i]==0x899ec172)
	    ES[2*i]=11;
	 if (s[i]==0x3d93d9aa)
	    ES[2*i]=9;
	 if (s[i]==0x7717adac)
	    ES[2*i]=3;
	 if (s[i]==0x8fa7c9e0)
	    ES[2*i]=1;
	 if (s[i]==0xb41a23cc)
	    ES[2*i]=0;
	 }
      if ((c==61823)&&(s[i]==0xdb5f6b76))
	 ES[2*i]=0;
      if ((c==61825)&&(s[i]==0x8e6e4dc8))
	 ES[2*i]=0;
      if (c==61979) {
	 if (s[i]==0xcd82e180)
	    ES[2*i]=16;
	 if (s[i]==0x3360b860)
	    ES[2*i]=4;
	 if (s[i]==0x0cd82e18)
	    ES[2*i]=1;
	 }
      if ((c==62167)&&(s[i]==0xd85d1b70))
	 ES[2*i]=0;
      if (c==62299) {
	 if (s[i]==0xc87c8bd4)
	    ES[2*i]=1;
	 if (s[i]==0xe77c62f6)
	    ES[2*i]=1;
	 if (s[i]==0xe75f5d9e)
	    ES[2*i]=0;
	 }
      if (c==62675) {
	 if (s[i]==0x0f35314e)
	    ES[2*i]=0xffffffff;
	 if (s[i]==0x138acfec)
	    ES[2*i]=0xfffffff9;
	 if (s[i]==0xebad5edc)
	    ES[2*i]=0xfffffffd;
	 if (s[i]==0x3607b582)
	    ES[2*i]=0xffffffff;
	 if (s[i]==0xe0716e8e)
	    ES[2*i]=0xfffffffe;
	 if (s[i]==0x95ae0634)
	    ES[2*i]=0xfffffffc;
	 if (s[i]==0x477a4454)
	    ES[2*i]=0xffffffff;
	 if (s[i]==0xd78a45d4)
	    ES[2*i]=0xfffffffe;
	 if (s[i]==0x1f3b6558)
	    ES[2*i]=0xffffffff;
	 }
      if ((c==63307)&&(s[i]==0x9651784c))
	 ES[2*i]=0;
      if (c==63991) {
	 if (s[i]==0xb9ab4592)
	    ES[2*i]=0;
	 if (s[i]==0x10bdcbc2)
	    ES[2*i]=2;
	 if (s[i]==0x34a34242)
	    ES[2*i]=2;
	 if (s[i]==0x2ecddf5e)
	    ES[2*i]=30;
	 if (s[i]==0x533821b8)
	    ES[2*i]=14;
	 if (s[i]==0x94ce086e)
	    ES[2*i]=3;
	 if (s[i]==0xc164064a)
	    ES[2*i]=0;
	 }
      if ((c==64417)&&(s[i]==0xb17a7d66))
	 ES[2*i]=0;
      if ((c==64543)&&(s[i]==0xe7f05ecc))
	 ES[2*i]=0;
      if (c==65225) {
	 if (s[i]==0xe02f3d1e)
	    ES[2*i]=0;
	 if (s[i]==0xbd290a20)
	    ES[2*i]=0;
	 }
      if (c==65251) {
	 if (s[i]==0x8f9bc056)
	    ES[2*i]=0xfffffffe;
	 if (s[i]==0x64969c22)
	    ES[2*i]=0xffffffff;
	 if (s[i]==0x66960326)
	    ES[2*i]=0xffffffff;
	 if (s[i]==0x28d6ea00)
	    ES[2*i]=0xffffffff;
	 if (s[i]==0xb14fe1fe)
	    ES[2*i]=0xfffffffe;
	 }
      if ((c==65705)&&(s[i]==0x9acd66e4))
	 ES[2*i]=0;
      if ((c==65977)&&(s[i]==0x96c9e2a8))
	 ES[2*i]=0;
      if (c==66563) {
	 if (s[i]==0x3df0bf22)
	    ES[2*i]=1;
	 if (s[i]==0x2dcdcc6c)
	    ES[2*i]=1;
	 }
      if (c==66781) {
	 if (s[i]==0xa9c868be)
	    ES[2*i]=0xffffff7d;
	 if (s[i]==0xaf74f484)
	    ES[2*i]=0xffffffb5;
	 if (s[i]==0x10e62f10)
	    ES[2*i]=0xfffffff2;
	 if (s[i]==0x84398bc4)
	    ES[2*i]=0xfffffffc;
	 if (s[i]==0x58cb0b6c)
	    ES[2*i]=0xffffffff;
	 if (s[i]==0x3b25f2d6)
	    ES[2*i]=0xfffffffb;
	 if (s[i]==0x5c72c4ea)
	    ES[2*i]=0xfffffff8;
	 if (s[i]==0x8fd37966)
	    ES[2*i]=0xfffffffa;
	 if (s[i]==0x1e09b786)
	    ES[2*i]=0xfffffff9;
	 if (s[i]==0x33479c0c)
	    ES[2*i]=0xfffffff6;
	 if (s[i]==0xb2b05528)
	    ES[2*i]=0xfffffff6;
	 if (s[i]==0xacac154a)
	    ES[2*i]=0xfffffffd;
	 if (s[i]==0xcaea0f2a)
	    ES[2*i]=0xfffffffd;
	 if (s[i]==0x119baace)
	    ES[2*i]=0xffffffff;
	 if (s[i]==0x79e8331e)
	    ES[2*i]=0xffffffff;
	 }
      if (c==66805) {
	 if (s[i]==0x825e30b6)
	    ES[2*i]=0;
	 if (s[i]==0xa50147b8)
	    ES[2*i]=0;
	 }
      if ((c==66925)&&(s[i]==0x86764858))
	 ES[2*i]=0;
      if (c==67087) {
	 if (s[i]==0x0e456966)
	    ES[2*i]=0xfffffffc;
	 if (s[i]==0x855a490a)
	    ES[2*i]=0xfffffffe;
	 if (s[i]==0xe22ee142)
	    ES[2*i]=0xfffffffc;
	 if (s[i]==0xe6848a82)
	    ES[2*i]=0xfffffffe;
	 if (s[i]==0xf4d1a038)
	    ES[2*i]=0xfffffffe;
	 }
      if ((c==67199)&&(s[i]==0xa4ec7a9e))
	 ES[2*i]=0;
      if ((c==67547)&&(s[i]==0x5faa1b60))
	 ES[2*i]=1;
      if (c==67841) {
	 if (s[i]==0x3fc8774e)
	    ES[2*i]=1;
	 if (s[i]==0x606cb91e)
	    ES[2*i]=3;
	 if (s[i]==0x460bb494)
	    ES[2*i]=4;
	 if (s[i]==0xcd22741c)
	    ES[2*i]=0;
	 }
      if (c==67907) {
	 if (s[i]==0x16656a66)
	    ES[2*i]=1;
	 if (s[i]==0xa73f32ca)
	    ES[2*i]=0;
	 if (s[i]==0x8d1e8dda)
	    ES[2*i]=0;
	 if (s[i]==0xb29cc658)
	    ES[2*i]=0;
	 }
      if ((c==68461)&&(s[i]==0x82506be0))
	 ES[2*i]=0;
      if ((c==68921)&&(s[i]==0xecb5694a))
	 ES[2*i]=0;
      if ((c==68947)&&(s[i]==0xd760b87c))
	 ES[2*i]=0;
      if (c==69301) {
	 if (s[i]==0xa3ca3a16)
	    ES[2*i]=0;
	 if (s[i]==0x5dd48a0a)
	    ES[2*i]=1;
	 }
      if (c==69391) {
	 if (s[i]==0x8cb7fa82)
	    ES[2*i]=0;
	 if (s[i]==0x8594837e)
	    ES[2*i]=0;
	 }
      if (c==69901) {
	 if (s[i]==0x102b0112)
	    ES[2*i]=1;
	 if (s[i]==0xc7e43bb8)
	    ES[2*i]=0;
	 }
      if ((c==70067)&&(s[i]==0xce7b21f0))
	 ES[2*i]=0;
      if ((c==70247)&&(s[i]==0x32dcbbd8))
	 ES[2*i]=1;
      if ((c==70289)&&(s[i]==0x8bd54a0e))
	 ES[2*i]=0;
      if ((c==70331)&&(s[i]==0xd8f117b0))
	 ES[2*i]=0;
      if ((c==70397)&&(s[i]==0x3189a5f4))
	 ES[2*i]=1;
      if (c==70489) {
	 if (s[i]==0x1cffb9f2)
	    ES[2*i]=2;
	 if (s[i]==0x68fc2b86)
	    ES[2*i]=2;
	 if (s[i]==0x24d505c4)
	    ES[2*i]=1;
	 }
      if ((c==70649)&&(s[i]==0x8719e2ba))
	 ES[2*i]=0;
      if ((c==70763)&&(s[i]==0x9cd9eaac))
	 ES[2*i]=0;
      if ((c==70801)&&(s[i]==0x81e241d0))
	 ES[2*i]=0;
      if (c==70925) {
	 if (s[i]==0x185c0124)
	    ES[2*i]=0xffffffff;
	 if (s[i]==0x788c2e6c)
	    ES[2*i]=0xffffffff;
	 if (s[i]==0x54b19732)
	    ES[2*i]=0xffffffff;
	 if (s[i]==0x35cd7bba)
	    ES[2*i]=0xffffffff;
	 if (s[i]==0xec71bb4a)
	    ES[2*i]=0xfffffffe;
	 if (s[i]==0x7d39c202)
	    ES[2*i]=0xffffffff;
	 if (s[i]==0x512719fe)
	    ES[2*i]=0xffffffff;
	 if (s[i]==0x7781d072)
	    ES[2*i]=0xffffffff;
	 if (s[i]==0xd0ba5c50)
	    ES[2*i]=0xfffffffd;
	 if (s[i]==0x742e9714)
	    ES[2*i]=0xffffffff;
	 if (s[i]==0xc99f68fe)
	    ES[2*i]=0xfffffffe;
	 if (s[i]==0x3b985066)
	    ES[2*i]=0xffffffff;
	 }
      if (c==71233) {
	 if (s[i]==0x9815027e)
	    ES[2*i]=0000000000;
	 if (s[i]==0x89a67c22)
	    ES[2*i]=0x00000002;
	 if (s[i]==0xb6b74ca6)
	    ES[2*i]=0000000000;
	 if (s[i]==0x38a7894e)
	    ES[2*i]=0x00000001;
	 if (s[i]==0x4de2c7d4)
	    ES[2*i]=0x00000001;
	 }
      if (c==71339) {
	 if (s[i]==0x07dd7324)
	    ES[2*i]=0x00000001;
	 if (s[i]==0x82c06d52)
	    ES[2*i]=0x00000002;
	 if (s[i]==0x043173c8)
	    ES[2*i]=0x00000003;
	 if (s[i]==0xc10c5cf2)
	    ES[2*i]=0000000000;
	 }
      if (c==71395) {
	 if (s[i]==0x525dc490)
	    ES[2*i]=0xffffffff;
	 if (s[i]==0x784abd66)
	    ES[2*i]=0xffffffff;
	 if (s[i]==0x71a37fd6)
	    ES[2*i]=0xffffffff;
	 if (s[i]==0x7aab1bb4)
	    ES[2*i]=0xffffffff;
	 if (s[i]==0x64e939e0)
	    ES[2*i]=0xffffffff;
	 if (s[i]==0xf54664d8)
	    ES[2*i]=0xfffffffd;
	 if (s[i]==0x7d519936)
	    ES[2*i]=0xffffffff;
	 if (s[i]==0x266ec8aa)
	    ES[2*i]=0xffffffff;
	 if (s[i]==0xc886ac0a)
	    ES[2*i]=0xfffffffe;
	 if (s[i]==0xf932ec56)
	    ES[2*i]=0xfffffffe;
	 if (s[i]==0x30f45338)
	    ES[2*i]=0xfffffff9;
	 if (s[i]==0x4c3d14ce)
	    ES[2*i]=0xfffffffe;
	 if (s[i]==0x5c972d86)
	    ES[2*i]=0xffffffff;
	 if (s[i]==0xeff2b83a)
	    ES[2*i]=0xfffffffe;
	 }
      if (c==71515) {
	 if (s[i]==0xd5ce2696)
	    ES[2*i]=0;
	 if (s[i]==0xabb7da5c)
	    ES[2*i]=0;
	 if (s[i]==0x94468f24)
	    ES[2*i]=0;
	 if (s[i]==0xe3266438)
	    ES[2*i]=0;
	 if (s[i]==0xcf6b2b52)
	    ES[2*i]=0;
	 }
      if ((c==71551)&&(s[i]==0x9ff64bd0))
	 ES[2*i]=0;
      if ((c==71629)&&(s[i]==0x05923ab2))
	 ES[2*i]=1;
      if (c==71671) {
	 if (s[i]==0x9e5f3f86)
	    ES[2*i]=1;
	 if (s[i]==0x9b63fdd0)
	    ES[2*i]=0;
	 }
      if (c==72089) {
	 if (s[i]==0x4ba528b0)
	    ES[2*i]=0xffffffff;
	 if (s[i]==0x75a017cc)
	    ES[2*i]=0xffffffff;
	 if (s[i]==0xfb7c4ba0)
	    ES[2*i]=0xfffffffe;
	 if (s[i]==0x32278dee)
	    ES[2*i]=0xffffffff;
	 if (s[i]==0x7124bbf6)
	    ES[2*i]=0xffffffff;
	 if (s[i]==0x6013865a)
	    ES[2*i]=0xffffffff;
	 if (s[i]==0x17462dc0)
	    ES[2*i]=0xffffffff;
	 if (s[i]==0x37b5e526)
	    ES[2*i]=0xfffffffd;
	 if (s[i]==0xd3818712)
	    ES[2*i]=0xfffffffe;
	 if (s[i]==0x63172e48)
	    ES[2*i]=0xffffffff;
	 if (s[i]==0xd1cde5c4)
	    ES[2*i]=0xfffffffd;
	 if (s[i]==0xc8c443d8)
	    ES[2*i]=0xfffffffe;
	 if (s[i]==0x3daf6ac6)
	    ES[2*i]=0xffffffff;
	 }
      if (c==72451) {
	 if (s[i]==0xb2712c4a)
	    ES[2*i]=0;
	 if (s[i]==0x9690cd72)
	    ES[2*i]=0;
	 }
      if (c==72743) {
	 if (s[i]==0xc2b8a4fc)
	    ES[2*i]=0;
	 if (s[i]==0x8aa4a9fe)
	    ES[2*i]=0;
	 if (s[i]==0x839d425c)
	    ES[2*i]=0;
	 }
      if (c==72779) {
	 if (s[i]==0x1249aab4)
	    ES[2*i]=2;
	 if (s[i]==0x79887d12)
	    ES[2*i]=1;
	 if (s[i]==0xc9961b32)
	    ES[2*i]=0;
	 }
      if ((c==73013)&&(s[i]==0x88243748))
	 ES[2*i]=0;
      if ((c==73087)&&(s[i]==0x9aa20dec))
	 ES[2*i]=0;
      if ((c==73115)&&(s[i]==0xa29f606e))
	 ES[2*i]=0;
      if (c==73265) {
	 if (s[i]==0x0d5a74d6)
	    ES[2*i]=1;
	 if (s[i]==0x6c0fb590)
	    ES[2*i]=1;
	 }
      if (c==73457) {
	 if (s[i]==0x7fc892d4)
	    ES[2*i]=10;
	 if (s[i]==0xf7f5e344)
	    ES[2*i]=1;
	 if (s[i]==0xc9d47bde)
	    ES[2*i]=0;
	 if (s[i]==0x7f2d152a)
	    ES[2*i]=1;
	 if (s[i]==0x8fb12fac)
	    ES[2*i]=0;
	 }
      if (c==73511) {
	 if (s[i]==0x42451024)
	    ES[2*i]=1;
	 if (s[i]==0xcbf1fb7e)
	    ES[2*i]=0;
	 if (s[i]==0x46b42538)
	    ES[2*i]=1;
	 }
      if (c==73825) {
	 if (s[i]==0x870f5ede)
	    ES[2*i]=0;
	 if (s[i]==0xaaf1bdd6)
	    ES[2*i]=0;
	 if (s[i]==0x9246b308)
	    ES[2*i]=0;
	 }
      if ((c==74405)&&(s[i]==0xf01785d4))
	 ES[2*i]=0;
      if ((c==74419)&&(s[i]==0xbb3b8206))
	 ES[2*i]=0;
      if ((c==74467)&&(s[i]==0x990d26dc))
	 ES[2*i]=0;
      if ((c==74503)&&(s[i]==0xdf67cd18))
	 ES[2*i]=1;
      if (c==74867) {
	 if (s[i]==0xaa7e9c90)
	    ES[2*i]=0;
	 if (s[i]==0x15425986)
	    ES[2*i]=1;
	 }
      if (c==74869) {
	 if (s[i]==0xf559e5de)
	    ES[2*i]=5;
	 if (s[i]==0x5a034816)
	    ES[2*i]=3;
	 if (s[i]==0x28bbd41e)
	    ES[2*i]=24;
	 if (s[i]==0x96ea5e1a)
	    ES[2*i]=13;
	 if (s[i]==0x5de046ca)
	    ES[2*i]=18;
	 if (s[i]==0x2a6793dc)
	    ES[2*i]=5;
	 if (s[i]==0xa26c4a34)
	    ES[2*i]=1;
	 }
      if (c==74897) {
	 if (s[i]==0x0d960a60)
	    ES[2*i]=3;
	 if (s[i]==0xc3658298)
	    ES[2*i]=0;
	 }
      if (c==74977) {
	 if (s[i]==0xb781b17c)
	    ES[2*i]=0;
	 if (s[i]==0x054e1ace)
	    ES[2*i]=1;
	 if (s[i]==0x7e00d834)
	    ES[2*i]=3;
	 if (s[i]==0xa7a071c2)
	    ES[2*i]=0;
	 }
      if ((c==74989)&&(s[i]==0x90bf23c0))
	 ES[2*i]=0;
      if (c==75067) {
	 if (s[i]==0xbf7e3f7a)
	    ES[2*i]=0;
	 if (s[i]==0x1695a196)
	    ES[2*i]=8;
	 if (s[i]==0x465a95bc)
	    ES[2*i]=2;
	 }
      if ((c==75259)&&(s[i]==0xe1a17c1c))
	 ES[2*i]=0;
      if (c==75325) {
	 if (s[i]==0xd207d862)
	    ES[2*i]=0xfffffffe;
	 if (s[i]==0x7cb99272)
	    ES[2*i]=0xffffffff;
	 if (s[i]==0xf709cc60)
	    ES[2*i]=0xfffffffd;
	 if (s[i]==0x7dc27318)
	    ES[2*i]=0xffffffff;
	 if (s[i]==0x1cb83f72)
	    ES[2*i]=0xffffffff;
	 if (s[i]==0x78554dd4)
	    ES[2*i]=0xffffffff;
	 if (s[i]==0x0415c530)
	    ES[2*i]=0xfffffffe;
	 if (s[i]==0x7f536680)
	    ES[2*i]=0xffffffff;
	 }
      if ((c==75331)&&(s[i]==0xc4a6f4e2))
	 ES[2*i]=0;
      if ((c==75383)&&(s[i]==0x96ab029c))
	 ES[2*i]=0;
      if ((c==75667)&&(s[i]==0x8e9e4378))
	 ES[2*i]=0;
      if ((c==75815)&&(s[i]==0x3fb6b906))
	 ES[2*i]=1;
      if ((c==75859)&&(s[i]==0x37bd9530))
	 ES[2*i]=1;
      if ((c==75971)&&(s[i]==0x8e0c7d4a))
	 ES[2*i]=0;
      if (c==76085) {
	 if (s[i]==0x86fe968c)
	    ES[2*i]=0xfffffffc;
	 if (s[i]==0x88f4c872)
	    ES[2*i]=0xfffffffe;
	 if (s[i]==0x735c1578)
	    ES[2*i]=0xffffffff;
	 if (s[i]==0xf8d6d2e2)
	    ES[2*i]=0xfffffffe;
	 if (s[i]==0x70f86318)
	    ES[2*i]=0xffffffff;
	 if (s[i]==0x50098798)
	    ES[2*i]=0xfffffffe;
	 if (s[i]==0x3269bb60)
	    ES[2*i]=0xffffffff;
	 if (s[i]==0x7a94bb9e)
	    ES[2*i]=0xffffffff;
	 if (s[i]==0x7c59dbba)
	    ES[2*i]=0xffffffff;
	 if (s[i]==0x3de4b762)
	    ES[2*i]=0xffffffff;
	 if (s[i]==0x5d64576e)
	    ES[2*i]=0xffffffff;
	 if (s[i]==0x569c7eac)
	    ES[2*i]=0xffffffff;
	 if (s[i]==0x5f3a6018)
	    ES[2*i]=0xffffffff;
	 if (s[i]==0xae2af2aa)
	    ES[2*i]=0xfffffffe;
	 if (s[i]==0x09c9eba2)
	    ES[2*i]=0xfffffffb;
	 if (s[i]==0x23ac02aa)
	    ES[2*i]=0xfffffffe;
	 if (s[i]==0xf072848e)
	    ES[2*i]=0xfffffffe;
	 if (s[i]==0x766b8bbc)
	    ES[2*i]=0xffffffff;
	 if (s[i]==0x5e46d060)
	    ES[2*i]=0xfffffff9;
	 if (s[i]==0x5791b418)
	    ES[2*i]=0xfffffffe;
	 if (s[i]==0x6cf2e1d6)
	    ES[2*i]=0xffffffff;
	 if (s[i]==0x36ea75fc)
	    ES[2*i]=0xffffffff;
	 if (s[i]==0xd64b6ade)
	    ES[2*i]=0xfffffffd;
	 if (s[i]==0xc88b25de)
	    ES[2*i]=0xfffffffe;
	 if (s[i]==0x50ceff0e)
	    ES[2*i]=0xffffffff;
	 if (s[i]==0xdc541056)
	    ES[2*i]=0xfffffffe;
	 if (s[i]==0x49230f62)
	    ES[2*i]=0xfffffffd;
	 if (s[i]==0xfb6d7012)
	    ES[2*i]=0xfffffffe;
	 if (s[i]==0x67a4b1ae)
	    ES[2*i]=0xffffffff;
	 if (s[i]==0x8609c190)
	    ES[2*i]=0xfffffff9;
	 if (s[i]==0x61827064)
	    ES[2*i]=0xfffffffe;
	 if (s[i]==0x7236ee7a)
	    ES[2*i]=0xffffffff;
	 if (s[i]==0x66dff4a4)
	    ES[2*i]=0xfffffffe;
	 if (s[i]==0x1bc78eb8)
	    ES[2*i]=0xffffffff;
	 if (s[i]==0x6298a304)
	    ES[2*i]=0xffffffff;
	 if (s[i]==0xf94a7838)
	    ES[2*i]=0xfffffffe;
	 if (s[i]==0x0ee5a54a)
	    ES[2*i]=0xfffffff1;
	 if (s[i]==0xcc311884)
	    ES[2*i]=0xfffffffb;
	 if (s[i]==0x36497ee6)
	    ES[2*i]=0xffffffff;
	 if (s[i]==0x77b68954)
	    ES[2*i]=0xffffffff;
	 if (s[i]==0xdaa611ec)
	    ES[2*i]=0xfffffffb;
	 if (s[i]==0xcdff0f3a)
	    ES[2*i]=0xfffffffa;
	 if (s[i]==0xb65d45f4)
	    ES[2*i]=0xfffffffc;
	 if (s[i]==0xaefa79da)
	    ES[2*i]=0xfffffffe;
	 if (s[i]==0x71d2b8c0)
	    ES[2*i]=0xffffffff;
	 if (s[i]==0xeb37f7d6)
	    ES[2*i]=0xfffffffe;
	 if (s[i]==0x8e9b7210)
	    ES[2*i]=0xfffffffb;
	 if (s[i]==0xe3a6dc84)
	    ES[2*i]=0xfffffffe;
	 if (s[i]==0x9ae12bda)
	    ES[2*i]=0xfffffffe;
	 if (s[i]==0x69580bd8)
	    ES[2*i]=0xffffffff;
	 if (s[i]==0x7f361958)
	    ES[2*i]=0xffffffff;
	 if (s[i]==0x58c6cd2e)
	    ES[2*i]=0xffffffff;
	 if (s[i]==0x9acc7b00)
	    ES[2*i]=0xfffffffe;
	 if (s[i]==0x17477b9e)
	    ES[2*i]=0xffffffff;
	 if (s[i]==0x7d18ef4a)
	    ES[2*i]=0xffffffff;
	 if (s[i]==0x72a9896c)
	    ES[2*i]=0xffffffff;
	 if (s[i]==0x4c800ac2)
	    ES[2*i]=0xffffffff;
	 if (s[i]==0xb1a2f1ce)
	    ES[2*i]=0xfffffff9;
	 if (s[i]==0x01357906)
	    ES[2*i]=0xfffffffe;
	 if (s[i]==0x51067f0c)
	    ES[2*i]=0xfffffffe;
	 if (s[i]==0x4a301e88)
	    ES[2*i]=0xffffffff;
	 if (s[i]==0xd55d40c6)
	    ES[2*i]=0xfffffffe;
	 if (s[i]==0x04080f96)
	    ES[2*i]=0xffffffff;
	 if (s[i]==0x4dc5f0c0)
	    ES[2*i]=0xfffffffe;
	 if (s[i]==0x3c9dbd3c)
	    ES[2*i]=0xfffffffe;
	 if (s[i]==0x34ad4d16)
	    ES[2*i]=0xffffffff;
	 if (s[i]==0x1ed0d44e)
	    ES[2*i]=0xffffffff;
	 if (s[i]==0xc34a9a72)
	    ES[2*i]=0xfffffffc;
	 if (s[i]==0xc93c4438)
	    ES[2*i]=0xfffffffe;
	 if (s[i]==0x66b2da96)
	    ES[2*i]=0xffffffff;
	 if (s[i]==0x088239a8)
	    ES[2*i]=0xffffffff;
	 if (s[i]==0x3fdc00f2)
	    ES[2*i]=0xffffffff;
	 if (s[i]==0x467c4286)
	    ES[2*i]=0xfffffffe;
	 if (s[i]==0x8b7a3910)
	    ES[2*i]=0xfffffffe;
	 if (s[i]==0x7584bb9e)
	    ES[2*i]=0xffffffff;
	 if (s[i]==0x468ae79e)
	    ES[2*i]=0xffffffff;
	 if (s[i]==0x71a82d58)
	    ES[2*i]=0xffffffff;
	 if (s[i]==0x53fc184c)
	    ES[2*i]=0xffffffff;
	 if (s[i]==0x650b1586)
	    ES[2*i]=0xffffffff;
	 if (s[i]==0x7d42bb18)
	    ES[2*i]=0xffffffff;
	 }
      if (c==76141) {
	 if (s[i]==0xabdb0842)
	    ES[2*i]=2;
	 if (s[i]==0x000726d74)
	    ES[2*i]=1;
	 }
      if (c==76171) {
	 if (s[i]==0x6ad415ea)
	    ES[2*i]=4;
	 if (s[i]==0xde5a44bc)
	    ES[2*i]=18;
	 if (s[i]==0x89b13746)
	    ES[2*i]=3;
	 if (s[i]==0x3d2403d6)
	    ES[2*i]=2;
	 if (s[i]==0xb559b1a0)
	    ES[2*i]=0;
	 }
      if ((c==76235)&&(s[i]==0xa12c8dee))
	 ES[2*i]=0;
      if ((c==76405)&&(s[i]==0xb5b2a442))
	 ES[2*i]=0;
      if ((c==76535)&&(s[i]==0xca445e5e))
	 ES[2*i]=0;
      if (c==76895) {
	 if (s[i]==0x952e82ee)
	    ES[2*i]=0;
	 if (s[i]==0x9f52cb08)
	    ES[2*i]=0;
	 }
      if ((c==77189)&&(s[i]==0xc46a0120))
	 ES[2*i]=0;
      if (c==77287) {
	 if (s[i]==0xc0fa1572)
	    ES[2*i]=0;
	 if (s[i]==0x6e5ea80c)
	    ES[2*i]=1;
	 }
      if (c==77299) {
	 if (s[i]==0x90f6f118)
	    ES[2*i]=0;
	 if (s[i]==0x1ff811b2)
	    ES[2*i]=1;
	 if (s[i]==0xa1fc46ac)
	    ES[2*i]=0;
	 }
      if (c==77393) {
	 if (s[i]==0x72311088)
	    ES[2*i]=2;
	 if (s[i]==0x9c8c4422)
	    ES[2*i]=0;
	 }
      if (c==77465) {
	 if (s[i]==0x989e2bc6)
	    ES[2*i]=3;
	 if (s[i]==0x69e0ca08)
	    ES[2*i]=3;
	 if (s[i]==0xda783282)
	    ES[2*i]=0;
	 if (s[i]==0x9b8aba36)
	    ES[2*i]=0;
	 }
      if ((c==77717)&&(s[i]==0xbc393504))
	 ES[2*i]=0;
      if (c==77791) {
	 if (s[i]==0xa3e66bfe)
	    ES[2*i]=0;
	 if (s[i]==0x93b45878)
	    ES[2*i]=0;
	 }
      if (c==78083) {
	 if (s[i]==0x194d6da2)
	    ES[2*i]=1;
	 if (s[i]==0xfaf19128)
	    ES[2*i]=1;
	 }
      if ((c==78581)&&(s[i]==0x98873c66))
	 ES[2*i]=0;
      if (c==79103) {
	 if (s[i]==0xcbacc20c)
	    ES[2*i]=0;
	 if (s[i]==0x9ae78afa)
	    ES[2*i]=0;
	 }
      if ((c==79169)&&(s[i]==0xaf366334))
	 ES[2*i]=0;
      if ((c==79409)&&(s[i]==0xa6604540))
	 ES[2*i]=0;
      if (c==79513) {
	 if (s[i]==0x7d88aa38)
	    ES[2*i]=6;
	 if (s[i]==0x9f622a8e)
	    ES[2*i]=1;
	 if (s[i]==0x14985cca)
	    ES[2*i]=3;
	 if (s[i]==0x27b97072)
	    ES[2*i]=1;
	 }
      if (c==79621) {
	 if (s[i]==0xbb010a1c)
	    ES[2*i]=0;
	 if (s[i]==0x2b95fd32)
	    ES[2*i]=1;
	 }
      if (c==80335) {
	 if (s[i]==0xefbb3548)
	    ES[2*i]=2;
	 if (s[i]==0xbbeecd52)
	    ES[2*i]=0;
	 }
      if ((c==80807)&&(s[i]==0xd558226c))
	 ES[2*i]=0;
      if (c==80989) {
	 if (s[i]==0x92c94112)
	    ES[2*i]=24;
	 if (s[i]==0x370bc77e)
	    ES[2*i]=9;
	 if (s[i]==0xe339db8c)
	    ES[2*i]=3;
	 if (s[i]==0x890e4cb4)
	    ES[2*i]=5;
	 if (s[i]==0xc7468d32)
	    ES[2*i]=0;
	 }
      if ((c==81043)&&(s[i]==0x9b182d74))
	 ES[2*i]=0;
      if ((c==81235)&&(s[i]==0x8ee8dc1c))
	 ES[2*i]=0;
      if (c==81319) {
	 if (s[i]==0xec9227e0)
	    ES[2*i]=1;
	 if (s[i]==0xde056f98)
	    ES[2*i]=0;
	 }
      if ((c==81421)&&(s[i]==0xc37a3be4))
	 ES[2*i]=0;
      if ((c==81521)&&(s[i]==0xd38d8a4c))
	 ES[2*i]=0;
      if ((c==81599)&&(s[i]==0x3553021e))
	 ES[2*i]=0xffffffff;
      if ((c==81851)&&(s[i]==0x8b6ec91a))
	 ES[2*i]=0;
      if (c==81943) {
	 if (s[i]==0x355c602a)
	    ES[2*i]=12;
	 if (s[i]==0xde04be26)
	    ES[2*i]=6;
	 if (s[i]==0x93421754)
	    ES[2*i]=2;
	 if (s[i]==0xb96b5e9e)
	    ES[2*i]=0;
	 if (s[i]==0x8403bbb4)
	    ES[2*i]=0;
	 }
      if ((c==82189)&&(s[i]==0xefcda9e4))
	 ES[2*i]=0;
      if (c==82745) {
	 if (s[i]==0xae5493c2)
	    ES[2*i]=0;
	 if (s[i]==0xa2e89b10)
	    ES[2*i]=1;
	 }
      if ((c==83183)&&(s[i]==0xc6108128))
	 ES[2*i]=0;
      if (c==83581) {
	 if (s[i]==0xbb68530e)
	    ES[2*i]=0;
	 if (s[i]==0xc8263f78)
	    ES[2*i]=0;
	 }
      if (c==83647) {
	 if (s[i]==0x165c848c)
	    ES[2*i]=2;
	 if (s[i]==0xf0c75a48)
	    ES[2*i]=0;
	 }
      if ((c==83977)&&(s[i]==0xc24103c8))
	 ES[2*i]=1;
      if ((c==84197)&&(s[i]==0x83860562))
	 ES[2*i]=0;
      if (c==84229) {
	 if (s[i]==0xee9cadbe)
	    ES[2*i]=0;
	 if (s[i]==0x8638ef5e)
	    ES[2*i]=0;
	 }
      if (c==84679) {
	 if (s[i]==0xdf7b5d42)
	    ES[2*i]=0;
	 if (s[i]==0xbc919f7c)
	    ES[2*i]=0;
	 }
      if (c==84767) {
	 if (s[i]==0x53ee499a)
	    ES[2*i]=3;
	 if (s[i]==0xdf36d85a)
	    ES[2*i]=1;
	 if (s[i]==0x0d8fa8a6)
	    ES[2*i]=1;
	 }
      if (c==85105) {
	 if (s[i]==0x112baa76)
	    ES[2*i]=0x00000001;
	 if (s[i]==0xdef230e2)
	    ES[2*i]=0x00000019;
	 if (s[i]==0x11d4fa1a)
	    ES[2*i]=0x00000003;
	 if (s[i]==0x26b030e6)
	    ES[2*i]=0x00000001;
	 if (s[i]==0xa5c3eb48)
	    ES[2*i]=0;
	 if (s[i]==0x871540f6)
	    ES[2*i]=0;
	 if (s[i]==0xc9096776)
	    ES[2*i]=0x00000005;
	 if (s[i]==0x16c9df08)
	    ES[2*i]=0x00000003;
	 if (s[i]==0xc5b277c2)
	    ES[2*i]=0;
	 if (s[i]==0xf143879e)
	    ES[2*i]=0;
	 if (s[i]==0xaf100c54)
	    ES[2*i]=0x00000002;
	 if (s[i]==0x80d3556c)
	    ES[2*i]=0;
	 if (s[i]==0xa7ed39ce)
	    ES[2*i]=0;
	 if (s[i]==0x8db1b38c)
	    ES[2*i]=0;
	 if (s[i]==0xeff65202)
	    ES[2*i]=0x00000002;
	 if (s[i]==0xd37dd882)
	    ES[2*i]=0;
	 if (s[i]==0xb2d40f78)
	    ES[2*i]=0x00000001;
	 if (s[i]==0xce63ed5c)
	    ES[2*i]=0;
	 if (s[i]==0xb0b577b8)
	    ES[2*i]=0x00000004;
	 if (s[i]==0x2c2d5dee)
	    ES[2*i]=0x00000001;
	 if (s[i]==0xab6abd32)
	    ES[2*i]=0x00000001;
	 if (s[i]==0x2a13240c)
	    ES[2*i]=0x0000004e;
	 if (s[i]==0xfbd631ea)
	    ES[2*i]=0x00000015;
	 if (s[i]==0x3e70a5d4)
	    ES[2*i]=0x00000008;
	 if (s[i]==0x8bb57234)
	    ES[2*i]=0x00000001;
	 if (s[i]==0x9df5cf9a)
	    ES[2*i]=0;
	 if (s[i]==0xb30877dc)
	    ES[2*i]=0;
	 if (s[i]==0xbf9a1a9e)
	    ES[2*i]=0;
	 if (s[i]==0x17c12d80)
	    ES[2*i]=0x00000008;
	 if (s[i]==0x05f04b60)
	    ES[2*i]=0x00000002;
	 if (s[i]==0x817c12d8)
	    ES[2*i]=0;
	 if (s[i]==0x139a313a)
	    ES[2*i]=0x00000093;
	 if (s[i]==0x275a2592)
	    ES[2*i]=0x00000037;
	 if (s[i]==0x449b3520)
	    ES[2*i]=0x00000017;
	 if (s[i]==0xd126cd48)
	    ES[2*i]=0x00000005;
	 if (s[i]==0x7449b352)
	    ES[2*i]=0x00000001;
	 }
      if ((c==85141)&&(s[i]==0xe32ed014))
	 ES[2*i]=1;
      if ((c==85297)&&(s[i]==0xa58490e8))
	 ES[2*i]=0;
      if (c==85339) {
	 if (s[i]==0x16523e8e)
	    ES[2*i]=2;
	 if (s[i]==0xc85f2acc)
	    ES[2*i]=0;
	 }
      if ((c==85393)&&(s[i]==0x81553524))
	 ES[2*i]=1;
      if ((c==85811)&&(s[i]==0x88a1993e))
	 ES[2*i]=0;
      if (c==85855) {
	 if (s[i]==0x3e251018)
	    ES[2*i]=3;
	 if (s[i]==0xcf894406)
	    ES[2*i]=0;
	 }
      if ((c==85999)&&(s[i]==0x982bad20))
	 ES[2*i]=0;
      if ((c==86437)&&(s[i]==0xc5673a8a))
	 ES[2*i]=0;
      if ((c==86627)&&(s[i]==0xafde89b8))
	 ES[2*i]=1;
      if ((c==86671)&&(s[i]==0x9d2f6850))
	 ES[2*i]=0;
      if (c==86713) {
	 if (s[i]==0x0ebe5644)
	    ES[2*i]=9;
	 if (s[i]==0xe91d592a)
	    ES[2*i]=1;
	 if (s[i]==0xb76b561e)
	    ES[2*i]=0;
	 }
      if (c==87391) {
	 if (s[i]==0x6b8779f0)
	    ES[2*i]=0xfffffffe;
	 if (s[i]==0x70ed772a)
	    ES[2*i]=0xfffffffe;
	 if (s[i]==0x57a523a2)
	    ES[2*i]=0xffffffff;
	 if (s[i]==0x2aefb682)
	    ES[2*i]=0xffffffff;
	 if (s[i]==0x66898d30)
	    ES[2*i]=0xffffffff;
	 if (s[i]==0x69e624f6)
	    ES[2*i]=0xffffffff;
	 if (s[i]==0x5a78f52a)
	    ES[2*i]=0xffffffff;
	 if (s[i]==0x4a79630e)
	    ES[2*i]=0xffffffff;
	 if (s[i]==0x77d20e0e)
	    ES[2*i]=0xfffffffe;
	 if (s[i]==0x5a8dd34c)
	    ES[2*i]=0xffffffff;
	 if (s[i]==0xfaf9baa4)
	    ES[2*i]=0xfffffffe;
	 }
      if (c==87575) {
	 if (s[i]==0x16b3433e)
	    ES[2*i]=2;
	 if (s[i]==0xa92ff650)
	    ES[2*i]=0;
	 }
      if ((c==88661)&&(s[i]==0xb174373e))
	 ES[2*i]=0;
      if (c==88673) {
	 if (s[i]==0x97c2f2ae)
	    ES[2*i]=0;
	 if (s[i]==0x800e1816)
	    ES[2*i]=0;
	 if (s[i]==0xcd97fc8c)
	    ES[2*i]=1;
	 if (s[i]==0x81d39784)
	    ES[2*i]=0;
	 }
      if ((c==88721)&&(s[i]==0x3099207a))
	 ES[2*i]=1;
      if ((c==88841)&&(s[i]==0x02d44194))
	 ES[2*i]=1;
      if (c==89015) {
	 if (s[i]==0x19a33898)
	    ES[2*i]=2;
	 if (s[i]==0x8668ce26)
	    ES[2*i]=0;
	 }
      if ((c==89309)&&(s[i]==0x87787c16))
	 ES[2*i]=0;
      if (c==89555) {
	 if (s[i]==0x997598da)
	    ES[2*i]=1;
	 if (s[i]==0x6a8592be)
	    ES[2*i]=3;
	 if (s[i]==0x47f26e7c)
	    ES[2*i]=1;
	 }
      if (c==89587) {
	 if (s[i]==0xecf11784)
	    ES[2*i]=2;
	 if (s[i]==0x63777d50)
	    ES[2*i]=1;
	 }
      if (c==90695) {
	 if (s[i]==0x843086d2)
	    ES[2*i]=0;
	 if (s[i]==0xa7503a42)
	    ES[2*i]=0;
	 if (s[i]==0x8d2d55dc)
	    ES[2*i]=0;
	 }
      if ((c==90727)&&(s[i]==0x81bcf98c))
	 ES[2*i]=0;
      if (c==90763) {
	 if (s[i]==0xec22fa8a)
	    ES[2*i]=0;
	 if (s[i]==0x503bd580)
	    ES[2*i]=1;
	 }
      if (c==91043) {
	 if (s[i]==0x5125da7c)
	    ES[2*i]=0xfffffffe;
	 if (s[i]==0x7da0a0ce)
	    ES[2*i]=0xffffffff;
	 if (s[i]==0x636f9570)
	    ES[2*i]=0xffffffff;
	 }
      if (c==91241) {
	 if (s[i]==0xaf46eb14)
	    ES[2*i]=0;
	 if (s[i]==0x049c1400)
	    ES[2*i]=20;
	 if (s[i]==0x01270500)
	    ES[2*i]=5;
	 if (s[i]==0x4049c140)
	    ES[2*i]=1;
	 }
      if (c==91397) {
	 if (s[i]==0x01f5292a)
	    ES[2*i]=3;
	 if (s[i]==0xd88d8fc6)
	    ES[2*i]=0;
	 }
      if (c==91861) {
	 if (s[i]==0x231c5e3a)
	    ES[2*i]=23;
	 if (s[i]==0xf183d7cc)
	    ES[2*i]=32;
	 if (s[i]==0xb9fa77a2)
	    ES[2*i]=11;
	 if (s[i]==0x65be4692)
	    ES[2*i]=4;
	 if (s[i]==0xa627b42c)
	    ES[2*i]=1;
	 if (s[i]==0x90bc4f0c)
	    ES[2*i]=1;
	 if (s[i]==0xa9111b76)
	    ES[2*i]=0;
	 if (s[i]==0xd5fc7fa2)
	    ES[2*i]=0;
	 }
      if ((c==91921)&&(s[i]==0x9989afb8))
	 ES[2*i]=0;
      if (c==92141) {
	 if (s[i]==0x2944fdfe)
	    ES[2*i]=1;
	 if (s[i]==0xf213408a)
	    ES[2*i]=7;
	 if (s[i]==0x8399660a)
	    ES[2*i]=2;
	 if (s[i]==0x01bdbd42)
	    ES[2*i]=1;
	 }
      if (c==92155) {
	 if (s[i]==0x39caccf2)
	    ES[2*i]=4;
	 if (s[i]==0x2745330c)
	    ES[2*i]=10;
	 if (s[i]==0x2449df00)
	    ES[2*i]=2;
	 if (s[i]==0x891277c0)
	    ES[2*i]=0;
	 }
      if (c==92485) {
	 if (s[i]==0xfbcb2e78)
	    ES[2*i]=2;
	 if (s[i]==0xbef2cb9e)
	    ES[2*i]=0;
	 }
      if (c==93725) {
	 if (s[i]==0x2367ac96)
	    ES[2*i]=1;
	 if (s[i]==0xb8693cd0)
	    ES[2*i]=0;
	 }
      if ((c==93779)&&(s[i]==0x98ac21a4))
	 ES[2*i]=0;
      if (c==93857) {
	 if (s[i]==0x64b51e9e)
	    ES[2*i]=1;
	 if (s[i]==0xf9dc6f38)
	    ES[2*i]=2;
	 if (s[i]==0xbe771bce)
	    ES[2*i]=0;
	 }
      if (c==94015) {
	 if (s[i]==0x1f2f772e)
	    ES[2*i]=1;
	 if (s[i]==0x65641ea4)
	    ES[2*i]=2;
	 if (s[i]==0x02c7f108)
	    ES[2*i]=1;
	 if (s[i]==0xcf4be188)
	    ES[2*i]=0;
	 }
      if ((c==94343)&&(s[i]==0x881144f0))
	 ES[2*i]=0;
      if (c==94447) {
	 if (s[i]==0x66ff92dc)
	    ES[2*i]=0xffffffef;
	 if (s[i]==0x5fccc5ba)
	    ES[2*i]=0xfffffffd;
	 if (s[i]==0x85e415ce)
	    ES[2*i]=0xfffffffe;
	 if (s[i]==0xf2d52314)
	    ES[2*i]=0xfffffffe;
	 if (s[i]==0xa35a5e82)
	    ES[2*i]=0xfffffff5;
	 if (s[i]==0xe2c14d02)
	    ES[2*i]=0xfffffff2;
	 }
      if ((c==94597)&&(s[i]==0xe54b95f4))
	 ES[2*i]=0;
      if ((c==94675)&&(s[i]==0x87d25c0e))
	 ES[2*i]=0;
      if (c==94697) {
	 if (s[i]==0xef02c6bc)
	    ES[2*i]=2;
	 if (s[i]==0x3cd6e31c)
	    ES[2*i]=1;
	 }
      if (c==94949) {
	 if (s[i]==0x81e462de)
	    ES[2*i]=0;
	 if (s[i]==0x83b723be)
	    ES[2*i]=0;
	 }
      if ((c==95035)&&(s[i]==0xaf00c8ee))
	 ES[2*i]=0;
      if ((c==95171)&&(s[i]==0x67999e3c))
	 ES[2*i]=2;
      if ((c==95393)&&(s[i]==0x92f7b834))
	 ES[2*i]=0;
      if ((c==95399)&&(s[i]==0xc41108d8))
	 ES[2*i]=0;
      if (c==95665) {
	 if (s[i]==0xa159b56e)
	    ES[2*i]=0;
	 if (s[i]==0xac5107fe)
	    ES[2*i]=0;
	 if (s[i]==0xa393814e)
	    ES[2*i]=0;
	 if (s[i]==0x8a0630dc)
	    ES[2*i]=0;
	 if (s[i]==0x936bb6c0)
	    ES[2*i]=0;
	 }
      if ((c==95873)&&(s[i]==0xa6deb368))
	 ES[2*i]=0;
      if (c==96029) {
	 if (s[i]==0xea6052ce)
	    ES[2*i]=8;
	 if (s[i]==0x03d71906)
	    ES[2*i]=5;
	 if (s[i]==0xa00fa896)
	    ES[2*i]=7;
	 if (s[i]==0xd34b948c)
	    ES[2*i]=4;
	 if (s[i]==0xdee0b9d6)
	    ES[2*i]=6;
	 if (s[i]==0xe42e01c2)
	    ES[2*i]=4;
	 if (s[i]==0xd5919e70)
	    ES[2*i]=1;
	 }
      if ((c==96187)&&(s[i]==0x94337338))
	 ES[2*i]=0;
      if (c==96361) {
	 if (s[i]==0x80c5b402)
	    ES[2*i]=1;
	 if (s[i]==0xa254bd10)
	    ES[2*i]=0;
	 }
      if ((c==96407)&&(s[i]==0x82fea364))
	 ES[2*i]=0;
      if ((c==96517)&&(s[i]==0xaa2ff5ac))
	 ES[2*i]=0;
      if ((c==96791)&&(s[i]==0xabd1f58e))
	 ES[2*i]=0;
      if (c==96985) {
	 if (s[i]==0x941fdd72)
	    ES[2*i]=0;
	 if (s[i]==0x9e34dd6e)
	    ES[2*i]=0;
	 if (s[i]==0xc83de9c8)
	    ES[2*i]=0;
	 }
      if (c==97087) {
	 if (s[i]==0x915e6032)
	    ES[2*i]=0;
	 if (s[i]==0x9b4059a4)
	    ES[2*i]=0;
	 }
      if (c==97217) {
	 if (s[i]==0x4b978cf4)
	    ES[2*i]=1;
	 if (s[i]==0xbd1f70fc)
	    ES[2*i]=0;
	 if (s[i]==0xfd149934)
	    ES[2*i]=7;
	 if (s[i]==0x7f743baa)
	    ES[2*i]=1;
	 if (s[i]==0x8fcbf550)
	    ES[2*i]=0;
	 }
      if (c==97513) {
	 if (s[i]==0xe70e3896)
	    ES[2*i]=0;
	 if (s[i]==0x81f8ede6)
	    ES[2*i]=0;
	 if (s[i]==0x8ed2acc2)
	    ES[2*i]=0;
	 }
      if ((c==97529)&&(s[i]==0xd00ff652))
	 ES[2*i]=0;
      if ((c==97759)&&(s[i]==0x8f356bd6))
	 ES[2*i]=0;
      if ((c==98093)&&(s[i]==0x99843a70))
	 ES[2*i]=0;
      if (c==98257) {
	 if (s[i]==0x9864dbee)
	    ES[2*i]=0;
	 if (s[i]==0x895483ea)
	    ES[2*i]=0;
	 }
      if (c==98315) {
	 if (s[i]==0xd2fa9b00)
	    ES[2*i]=2;
	 if (s[i]==0xb4bea6c0)
	    ES[2*i]=0;
	 }
      if (c==98585) {
	 if (s[i]==0xcd052634)
	    ES[2*i]=14;
	 if (s[i]==0xc6715770)
	    ES[2*i]=2;
	 if (s[i]==0xb19c55dc)
	    ES[2*i]=0;
	 }
      if ((c==98909)&&(s[i]==0x806da7f0))
	 ES[2*i]=0;
      if (c==99173) {
	 if (s[i]==0x8c2b7fee)
	    ES[2*i]=0;
	 if (s[i]==0x89b709ae)
	    ES[2*i]=0;
	 }
      if (c==99419) {
	 if (s[i]==0x8ce8ddc0)
	    ES[2*i]=6;
	 if (s[i]==0xa33a3770)
	    ES[2*i]=1;
	 }
      if ((c==99569)&&(s[i]==0xff8b12fa))
	 ES[2*i]=0;
      if ((c==99743)&&(s[i]==0xa5e31524))
	 ES[2*i]=0;
      if ((c==99901)&&(s[i]==0xb95cb138))
	 ES[2*i]=1;
      }
//
// fix wrap-around problem
//
   ii=0;
   while (ii!=iters) {
      oldii=ii;
      while ((cflag[ii+index]==cflag[ii+index+1])&&(ii<(iters-1)))
	 ii=ii+1;
      T[0]=ES[2*oldii]<<2;
      T[1]=ES[2*oldii+1]<<2;
      T[0]=T[0]|ES[2*oldii+1]>>30;
      if ((T[0]==ES[ii*2])&&(T[1]==ES[ii*2+1])) {
//    if (4*s[oldii]==s[ii]) {
	 begind=0;
	 T[0]=ES[(oldii+begind+1)*2]<<2;
	 T[1]=ES[(oldii+begind+1)*2+1]<<2;
	 T[0]=T[0]|ES[(oldii+begind+1)*2+1]>>30;
	 while ((T[0]==ES[(oldii+begind)*2])&&(T[1]==ES[(oldii+begind)*2+1])) {
//	 while (s[oldii+begind]==4*s[oldii+begind+1])
	    begind=begind+1;
	    T[0]=ES[(oldii+begind+1)*2]<<2;
	    T[1]=ES[(oldii+begind+1)*2+1]<<2;
	    T[0]=T[0]|ES[(oldii+begind+1)*2+1]>>30;
	    }
	 for (jj=0; jj<(ii-oldii-begind); jj++) {
	    temps[jj]=s[oldii+begind+1+jj];
	    TS[jj*2]=ES[(oldii+begind+1+jj)*2];
	    TS[jj*2+1]=ES[(oldii+begind+1+jj)*2+1];
	    }
	 for (jj=0; jj<(begind+1); jj++) {
	    temps[jj+ii-oldii-begind]=s[oldii+jj];
	    TS[(jj+ii-oldii-begind)*2]=ES[(oldii+jj)*2];
	    TS[(jj+ii-oldii-begind)*2+1]=ES[(oldii+jj)*2+1];
	    }
	 for (jj=0; jj<=(ii-oldii); jj++) {
	    s[oldii+jj]=temps[jj];
	    ES[(oldii+jj)*2]=TS[(jj*2)];
	    ES[(oldii+jj)*2+1]=TS[(jj*2)+1];
	    }
	 }
      ii=ii+1;
      }
//
// compute order (of loop)
//
   for (i=0; i<iters; i++) {  // temporary
      s[i]=ES[2*i+1];
      }
   sumtu=0;
   SUMTU[0]=0;
   SUMTU[1]=0;
   sumt=0;
   SUMT[0]=0;
   SUMT[1]=0;
   sumu=0;
   SUMU[0]=0;
   SUMU[1]=0;
   sumtuc=0;
   maxtu=0;
   MAXTU[0]=0;
   MAXTU[1]=0;
   maxt=0;
   MAXT[0]=0;
   MAXT[1]=0;
   maxu=0;
   MAXU[0]=0;
   MAXU[1]=0;
   mintu=1000000000;
   MINTU[0]=0x7fffffff;
   MINTU[1]=0xffffffff;
   mint=1000000000;
   MINT[0]=0x7fffffff;
   MINT[1]=0xffffffff;
   minu=1000000000;
   MINU[0]=0x7fffffff;
   MINU[1]=0xffffffff;
   kk=0;
   maxtuc=0;
   mintuc=1000000000;
   total=0;
   olds=0;
   OLDS[0]=0;
   OLDS[1]=0;
   glomax=0;
   GLOMAX[0]=0;
   GLOMAX[1]=0;
   glomin=1000000000;
   GLOMIN[0]=0x7fffffff;
   GLOMIN[1]=0xffffffff;
   a=0;
   mflag=0;
   attcnt=0;
   patcnt=0;
   savind=0;
   sumrec=0.0;
   oddsum=0;
   jmpsum=0;
   oldt=0;
   OLDT[0]=0;
   OLDT[1]=0;
   lastt=0;
   LASTT[0]=0;
   LASTT[1]=0;
   firstt=1;
   oldchn=65536.0*65536.0*65536.0;
   oldu=0;
   evensum=0;
   hcount=0;
   jsum=0;
   for (i=0; i<iters; i++) {
      k=s[i];
      K[0]=ES[2*i];
      K[1]=ES[2*i+1];
//    K[1]=(unsigned int)s[i];
//    if ((K[1]&0x80000000)!=0)
//	 K[0]=0xffffffff;
//    else
//	 K[0]=0;
      savek=k;
      E[0]=K[0];
      E[1]=K[1];
      max=k;
      M[0]=K[0];
      M[1]=K[1];
      if ((M[0]&0x80000000)!=0) {
	 max=-max;
	 sub64(Z,M);
	 }
      levens=0;
      while ((K[1]&1)==0) {
	 k=k/2;
	 K[1]=(K[1]>>1)|(K[0]<<31);
	 K[0]=(int)K[0]>>1;
	 levens=levens+1;
	 }
      lodds=1;
      for (j=1; j<1000000; j++) {
	 k=3*k+c;
	 T[0]=K[0];
	 T[1]=K[1];
	 add64(K,K);
	 add64(T,K);
	 add64(CP,K);
	 if ((K[1]&7)==0) {
	    oldk=savek;
	    savek=k;
	    O[0]=E[0];
	    O[1]=E[1];
	    E[0]=K[0];
	    E[1]=K[1];
	    }
	 temp=k;
	 T[0]=K[0];
	 T[1]=K[1];
	 if ((T[0]&0x80000000)!=0) {
	    temp=-temp;
	    sub64(Z,T);
	    }
	 U[0]=M[0];
	 U[1]=M[1];
	 sub64(T,U);
	 if ((U[0]&0x80000000)==0) {
	    max=temp;
	    M[0]=T[0];
	    M[1]=T[1];
	    }
	 while ((K[1]&1)==0) {
//	    if (K[1]==(unsigned int)s[i]) {
	    if ((K[0]==ES[i*2])&&(K[1]==ES[i*2+1])) {
	       levens=levens-1;
	       goto bskip;
	       }
	    K[1]=(K[1]>>1)|(K[0]<<31);
	    K[0]=(int)K[0]>>1;
	    k=k/2;
	    levens=levens+1;
	    }
	 levens=levens-1;
	 lodds=lodds+1;
	 }
      printf("error 100: i=%d, s[i]=%#010x %#010x, %d \n",i,ES[2*i],ES[2*i+1],ES[2*i+1]);
      goto zskip;
bskip:
      order=3;
      OR[0]=0;
      OR[1]=3;
      T[0]=M[0];
      T[1]=M[1];
      sub64(OR,T);
      while((T[0]&0x80000000)!=0) {
	 add64(OR,OR);
	 order=order*2;
	 T[0]=M[0];
	 T[1]=M[1];
	 sub64(OR,T);
	 }
      while ((O[1]&1)==0) {
	 oldk=oldk/2;
	 O[1]=(O[1]>>1)|(O[0]<<31);
	 O[0]=(int)O[0]>>1;
	 }
      u=(int)O[1];
      YOU[0]=O[0];
      YOU[1]=O[1];
//
// find odd natural number divisible by 3
//
      k=s[i];
      K[0]=ES[2*i];
      K[1]=ES[2*i+1];
//    K[1]=(unsigned int)s[i];
//    if (s[i]<0)
//	 K[0]=0xffffffff;
//    else
//	 K[0]=0;
      max=k;
      M[0]=K[0];
      M[1]=K[1];
      if ((M[0]&0x80000000)!=0) {
	 max=-max;
	 sub64(Z,M);
	 }
      if ((K[0]&0x80000000)!=0) {
	 T[0]=K[0];
	 T[1]=K[1];
	 sub64(Z,T);
	 div64_32(T,Q,3);
	 sub64(Z,Q);
	 }
      else
	 div64_32(K,Q,3);
      T[0]=Q[0];
      T[1]=Q[1];
      add64(Q,Q);
      add64(T,Q);
      sub64(K,Q);
      while ((Q[0]!=0)||(Q[1]!=0)) {
	 if ((K[1]&1)==0) {
	    U[0]=CP[0];
	    U[1]=CP[1];
	    sub64(K,U);
	    if ((U[0]&0x80000000)!=0) {
	       T[0]=U[0];
	       T[1]=U[1];
	       sub64(Z,T);
	       div64_32(T,Q,3);
	       sub64(Z,Q);
	       }
	    else
	       div64_32(U,Q,3);
	    T[0]=Q[0];
	    T[1]=Q[1];
	    add64(T,T);
	    add64(Q,T);
	    sub64(U,T);
	    if ((T[0]==0)&&(T[1]==0)) {
	       k=(k-c)/3;
	       K[0]=Q[0];
	       K[1]=Q[1];
	       temp=k;
	       T[0]=K[0];
	       T[1]=K[1];
	       if ((T[0]&0x80000000)!=0) {
		  temp=-temp;
		  sub64(Z,T);
		  }
	       U[0]=M[0];
	       U[1]=M[1];
	       sub64(T,U);
	       if ((U[0]&0x80000000)==0) {
		  max=temp;
		  M[0]=T[0];
		  M[1]=T[1];
		  }
	       }
	    else {
	       k=k*2;
	       add64(K,K);
	       temp=k;
	       T[0]=K[0];
	       T[1]=K[1];
	       if ((T[0]&0x80000000)!=0) {
		  temp=-temp;
		  sub64(Z,T);
		  }
	       U[0]=M[0];
	       U[1]=M[1];
	       sub64(T,U);
	       if ((U[0]&0x80000000)==0) {
		  M[0]=T[0];
		  M[1]=T[1];
		  max=temp;
		  }
	       }
	    }
	 else {
	    k=k*2;
	    add64(K,K);
	    T[0]=K[0];
	    T[1]=K[1];
	    temp=k;
	    if ((T[0]&0x80000000)!=0) {
	       temp=-temp;
	       sub64(Z,T);
	       }
	    U[0]=M[0];
	    U[1]=M[1];
	    sub64(T,U);
	    if ((U[0]&0x80000000)==0) {
	       max=temp;
	       M[0]=T[0];
	       M[1]=T[1];
	       }
	    }
	 if ((K[0]&0x80000000)!=0) {
	    T[0]=K[0];
	    T[1]=K[1];
	    sub64(Z,T);
	    div64_32(T,Q,3);
	    sub64(Z,Q);
	    }
	 else
	    div64_32(K,Q,3);
	 T[0]=Q[0];
	 T[1]=Q[1];
	 add64(Q,Q);
	 add64(T,Q);
	 sub64(K,Q);
	 }
//
// include even natural numbers to the left of the odd natural number divisible
// by 3
//
      t=(int)K[1];
      TEE[0]=K[0];
      TEE[1]=K[1];
      jump=1;
      flag0=3;
      T[0]=K[0];
      T[1]=K[1];
      add64(T,T);
      add64(K,T);
      add64(CP,T);
//    if (((T[0]&0x80000000)==0)&&(s[i]<0))
//	 goto fjump;
//    if (((T[0]&0x80000000)!=0)&&(s[i]>0))
//	 goto fjump;
//    if (T[1]==(unsigned int)s[i]) {
      if ((T[0]==ES[2*i])&&(T[1]==ES[2*i+1])) {
	 jump=0;
	 flag0=0;
	 }
//fjump:
      temp=t-u;
      T[0]=YOU[0];
      T[1]=YOU[1];
      sub64(TEE,T);
      m=0;
      jcnt=0;
      while ((T[1]&1)==0) {
//    while ((temp&1)==0) {
	 m=m+1;
	 temp=temp/2;
	 T[1]=T[1]>>1;
	 T[1]=T[1]|(T[0]<<31);
	 T[0]=(int)T[0]>>1;
	 }
      T[0]=M[0];
      T[1]=M[1];
      sub64(OR,T);
      while ((T[0]&0x80000000)!=0) {
	 order=order*2;
	 add64(OR,OR);
	 T[0]=M[0];
	 T[1]=M[1];
	 sub64(OR,T);
	 }
      temp=k;
      T[0]=K[0];
      T[1]=K[1];
      if ((T[0]&0x80000000)!=0) {
	 temp=-temp;
	 sub64(Z,T);
	 }
      U[1]=(OR[1]>>1)|(OR[0]<<31);
      U[0]=(int)OR[0]>>1;
      M[0]=U[0];
      M[1]=U[1];
      sub64(T,M);
      while((M[0]&0x80000000)!=0) {
	 temp=temp*2;
	 add64(T,T);
	 add64(K,K);
	 k=k*2;
	 M[0]=U[0];
	 M[1]=U[1];
	 sub64(T,M);
	 }
//
// compute sequence
//
      hsum=0;
      count=1;
      first=1;
      while ((K[1]&1)==0) {
	 k=k/2;
	 K[1]=(K[1]>>1)|(K[0]<<31);
	 K[0]=(int)K[0]>>1;
	 count=count+1;
	 }
      evens=count-1;
      odds=1;
      for (j=1; j<1000000; j++) {
	 k=3*k+c;
	 T[0]=K[0];
	 T[1]=K[1];
	 add64(K,K);
	 add64(T,K);
	 add64(CP,K);
	 count=count+1;
	 if (first==0) {
	    if (((K[1]&3)==0)&&((K[1]&7)!=0))
	       hsum=hsum+1;
	    }
	 flag=0;
	 while ((K[1]&1)==0) {
//	    if (K[1]==(unsigned int)s[i]) {
	    if ((K[0]==ES[2*i])&&(K[1]==ES[2*i+1])) {
	       if (first==1)
		  first=0;
	       else
		  goto askip;
	       }
	    k=k/2;
	    K[1]=(K[1]>>1)|(K[0]<<31);
	    K[0]=(int)K[0]>>1;
	    count=count+1;
	    flag=flag+1;
	    }
	 if (first==1) {
	    evens=evens+(flag-1);
	    odds=odds+1;
	    if (flag==2) {
	       jcnt=jcnt+1;
	       T[0]=K[0];
	       T[1]=K[1];
	       add64(T,T);
	       add64(K,T);
	       add64(CP,T);
//	       if (((T[0]&0x80000000)==0)&&(s[i]<0))
//		  goto gjump;
//	       if (((T[0]&0x80000000)!=0)&&(s[i]>0))
//		  goto gjump;
//	       if (T[1]==(unsigned int)s[i])
	       if ((T[0]==ES[2*i])&&(T[1]==ES[2*i+1]))
		  flag0=1;
//gjump:	 first=1;  // dummy
	       }
	    }
	 }
      printf("error 2z: \n");
      goto zskip;
askip:
      if ((jcnt==1)&&(flag0==1))
	 jump=1;
      if ((jcnt>1)&&(flag0==1))
	 jump=2;
      if ((jcnt>0)&&(flag0==0))
	 jump=3;
      if (flag0==3)
	 jump=3;
      jumps[i]=jump;
      attcnt=attcnt+1;
//
// check order of jump types for primary, secondary, tertiary, etc.
//
      T[0]=ES[2*i]<<2;
      T[1]=ES[2*i+1]<<2;
      T[0]=T[0]|ES[2*i+1]>>30;
      if ((T[0]!=OLDS[0])||(T[1]!=OLDS[1])) {
//    if ((4*s[i])!=olds) {
	 tmpjump=jump;
	 if (jump==3) {
	    printf("error: primary jumped-over attachment point, s=%d, olds=%d \n",s[i],olds);
	    goto zskip;
	    }
	 }
      else {
	 if (tmpjump==0) {
	    if (jump!=3) {
	       printf("error: incorrect order \n");
	       fprintf(Outfp,"error: incorrect order \n");
	       goto zskip;
	       }
	    }
	 if (tmpjump==3) {
	    if ((jump!=1)&&(jump!=2)) {
	       printf("error: incorrect order \n");
	       fprintf(Outfp,"error: incorrect order \n");
	       goto zskip;
	       }
	    }
	 if ((tmpjump==1)||(tmpjump==2)) {
	    if (jump!=0) {
	       printf("error: incorrect order \n");
	       fprintf(Outfp,"error: incorrect order \n");
	       goto zskip;
	       }
	    }
	 tmpjump=jump;
	 }
//
// check hops in multiple-jumps
//
      jmpcnt=0;
      if (jump==2) {
	 first=0;
	 second=0;
	 flag0=0;
	 k=t;
	 K[0]=TEE[0];
	 K[1]=TEE[1];
//	 K[1]=t;
//	 if (t<0)
//	    K[0]=0xffffffff;
//	 else
//	    K[0]=0;
	 T[0]=K[0];
	 T[1]=K[1];
	 add64(T,T);
	 add64(K,T);
	 add64(CP,T);
	 if ((T[1]&3)==0) {
	    first=1;		      // hop count
	    lasthop=1;		      // set last hop flag
	    }
	 else {
	    second=1;		      // jump count
	    flag0=1;		      // set first jump flag
	    lasthop=0;
	    }
	 while ((T[0]!=ES[2*i])||(T[1]!=ES[2*i+1])) {
//	 while (T[1]!=(unsigned int)s[i]) {
	    add64(CP,K);
	    k=k+c;
	    tmpcnt=0;
	    while ((K[1]&1)==0) {
	       k=k/2;
	       K[1]=(K[1]>>1)|(K[0]<<31);
	       K[0]=(int)K[0]>>1;
	       tmpcnt=tmpcnt+1;
	       }
	    for (j=0; j<tmpcnt; j++) {
	       k=k*3;
	       T[0]=K[0];
	       T[1]=K[1];
	       add64(K,K);
	       add64(T,K);
	       }
	    T[0]=CP[0];
	    T[1]=CP[1];
	    sub64(K,T);
	    K[1]=(T[1]>>1)|(T[0]<<31);
	    K[0]=(int)T[0]>>1;
	    k=(k-c)/2;
	    T[0]=K[0];
	    T[1]=K[1];
	    add64(T,T);
	    add64(K,T);
	    add64(CP,T);
//	    if (((T[1]&3)==0)&&(T[1]!=(unsigned int)s[i])) {
	    if (((T[1]&3)==0)&&((T[0]!=ES[2*i])||(T[1]!=ES[2*i+1]))) {
	       first=first+1;	      // increment hop count
	       lasthop=1;	      // set last hop flag
	       }
//	    if (((T[1]&3)!=0)&&(T[1]!=(unsigned int)s[i])) {
	    if (((T[1]&3)!=0)&&((T[0]!=ES[2*i])||(T[1]!=ES[2*i+1]))) {
	       second=second+1;       // increment jump count
	       lasthop=0;
	       }
	    jmpcnt=jmpcnt+1;
	    }
	 if ((flag0==0)&&(second>0)&&(lasthop==1)) {  // first and last are hops
	    if (wflag==5) {
	       printf("warning: non-adjacent hops, c=%d, s=%d \n",c,s[i]);
	       fprintf(Outfp,"warning: non-adjacent hops, c=%d, s=%d \n",c,s[i]);
	       }
	    jmphop=jmphop+1;
	    }
	 if ((flag0==1)&&(first>0)&&(lasthop==0)) {  // first and last are jumps
	    if (wflag==5) {
	       printf("warning: non-adjacent jumps, c=%d, s=%d \n",c,s[i]);
	       fprintf(Outfp,"warning: non-adjacent jumps, c=%d, s=%d \n",c,s[i]);
	       }
	    jmphop=jmphop+1;
	    }
	 glohop=glohop+first;	     // total number of hops
	 glojmp=glojmp+second;	     // total number of jumps
	 if (jmpcnt==2) {
	    twojmp=twojmp+1;	     // total number of two-"jumps"
	    if (first==2)
	       twojmp0=twojmp0+1;
	    if ((first==1)&&(second==1)) {
	       if (lasthop==1)
		  twojmp1=twojmp1+1;
	       else
		  twojmp2=twojmp2+1;
	       }
	    if (second==2)
	       twojmp3=twojmp3+1;
	    }
	 mcount=mcount+1;
	 }
//
// check chain (t values)
//
      T[0]=ES[2*i]<<2;
      T[1]=ES[2*i+1]<<2;
      T[0]=T[0]|(ES[2*i+1]>>30);
      if ((T[0]!=OLDS[0])||(T[1]!=OLDS[1])) {
//    if ((4*s[i])!=olds) {
	 T[0]=TEE[0];
	 T[1]=TEE[1];
	 add64(CP,T);
	 if ((T[0]&0x80000000)!=0)
	    sub64(Z,T);
	 temp=t+c;
	 if (temp<0)
	    temp=-temp;
//	 chain=(double)temp;
	 chain=(double)T[1]+(double)T[0]*65536.0*65536.0;
	 temp=s[i];
	 if (temp<0)
	    temp=-temp;
	 while ((temp&1)==0)	 // next u value
	    temp=temp/2;
	 T[0]=ES[2*i];
	 T[1]=ES[2*i+1];
	 if ((T[0]&0x80000000)!=0)
	    sub64(Z,T);
	 while ((T[1]&1)==0) {
	    T[1]=T[1]>>1;
	    T[1]=T[1]|(T[0]<<31);
	    T[0]=(int)T[0]>>1;
	    }
	 dtemp=(double)T[1]+(double)T[0]*65536.0*65536.0;
	 chain=rat*log(chain);
	 chain=exp(chain);
	 if (jump==1)
	    chain=chain*2.0;
	 if (jump==2)
	    chain=chain*(double)(1<<jmpcnt);
	 if (chain<dtemp) {
//	 if (chain<(double)temp) {
	    if ((wflag!=2)&&(eowrite==0)) {
	       printf("error:  bad t-u chain, c=%d, t=%#010x %#010x, u=%#010x %#010x, jump=%d, count=%d \n",c,TEE[0],TEE[1],T[0],T[1],jump,jmpcnt);
	       fprintf(Outfp,"error:  bad t-u chain, c=%d, t=%#010x %#010x, u=%#010x %#010x, jump=%d, count=%d \n",c,TEE[0],TEE[1],T[0],T[1],jump,jmpcnt);
	       }
	    badtucnt=badtucnt+1;
	    }
	 dtemp=(double)OLDT[1]+(double)OLDT[0]*65536.0*65536.0;
	 if (chain<dtemp) {
//	 if (chain<(double)oldt) {
	    if ((wflag!=2)&&(eowrite==0)) {
	       printf("error: bad t chain, c=%d \n",c);
	       printf("chain=%e, oldt=%#010x %#010x, t=%#010x %#010x, jump=%d, count=%d, s=%#010x %#010x \n",chain,OLDT[0],OLDT[1],TEE[0],TEE[1],jump,jmpcnt,ES[2*i],ES[2*i+1]);
	       fprintf(Outfp,"error: bad t chain, c=%d \n",c);
	       fprintf(Outfp,"chain=%e, oldt=%#010x %#010x, t=%#010x %#010x, jump=%d, count=%d, s=%#010x %#010x \n",chain,OLDT[0],OLDT[1],TEE[0],TEE[1],jump,jmpcnt,ES[2*i],ES[2*i+1]);
	       }
	    badcnt=badcnt+1;
	    }
	 oldt=t;
	 OLDT[0]=TEE[0];
	 OLDT[1]=TEE[1];
	 if ((OLDT[0]&0x80000000)!=0)
	    sub64(Z,OLDT);
	 if (oldt<0)
	    oldt=-oldt;
	 if (firstt==1) {
	    savchain=chain;
	    savet=t;
	    SAVET[0]=TEE[0];
	    SAVET[1]=TEE[1];
	    savjump=jump;
	    savcnt=jmpcnt;
	    firstt=0;
	    }
	 }
//
// check for powers of 2
//
      T[0]=ES[2*i]<<2;
      T[1]=ES[2*i+1]<<2;
      T[0]=T[0]|(ES[2*i+1]>>30);
      if (((T[0]!=OLDS[0])||(T[1]!=OLDS[1]))&&(jump==2)&&(jmpcnt==2)) {
//    if (((4*s[i])!=olds)&&(jump==2)&&(jmpcnt==2)) {
	 temp=t;
	 temp=temp+c;
	 if (temp<0)
	    temp=-temp;
	 while ((temp&1)==0)
	    temp=temp/2;
	 T[0]=TEE[0];
	 T[1]=TEE[1];
	 add64(CP, T);
	 if ((T[0]&0x80000000)!=0)
	    sub64(Z,T);
	 while ((T[1]&1)==0) {
	    T[1]=T[1]>>1;
	    T[1]=T[1]|(T[0]<<31);
	    T[0]=(int)T[0]>>1;
	    }
	 if ((wflag==3)&&(T[1]==1)&&(T[0]==0)) {
//	 if ((wflag==3)&&(temp==1)) {
	    printf("power of two:  c=%d, u=%d, t=%d, s=%d \n",c,u,t,s[i]);
	    fprintf(Outfp,"power of two:  c=%d, u=%d, t=%d, s=%d \n",c,u,t,s[i]);
	    }
	 dtemp=(double)LASTT[1]+(double)LASTT[0]*65536.0*65536.0;
	 if (chain<dtemp) {
//	 if (chain<(double)lastt) {
	    printf("error: bad t chain, chain=%e, lastt=%#010x %#010x \n",chain,LASTT[0],LASTT[1]);
	    fprintf(Outfp,"error: bad t chain, chain=%e, lastt=%#010x %#010x \n",chain,LASTT[0],LASTT[1]);
	    goto zskip;
	    }
	 }
      lastt=t;
      if (lastt<0)
	 lastt=-lastt;
      LASTT[0]=TEE[0];
      LASTT[1]=TEE[1];
      if ((LASTT[0]&0x80000000)!=0)
	 sub64(Z,LASTT);
//
// count hops up until attachment point
//
      T[0]=ES[2*i];
      T[1]=ES[2*i+1];
//    T[1]=(unsigned int)s[i];
//    if (s[i]<0)
//	 T[0]=0xffffffff;
//    else
//	 T[0]=0;
      add64(T,T);
      add64(T,T);
      if ((T[0]!=OLDS[0])||(T[1]!=OLDS[1])) {
//    if (T[1]!=(unsigned int)olds) {
	 icount=0;
	 k=u;
	 K[0]=YOU[0];
	 K[1]=YOU[1];
//	 K[1]=u;
//	 if (u<0)
//	    K[0]=0xffffffff;
//	 else
//	    K[0]=0;
	 k=3*k+c;
	 T[0]=K[0];
	 T[1]=K[1];
	 add64(K,K);
	 add64(T,K);
	 add64(CP,K);
	 U[0]=ES[2*i];
	 U[1]=ES[2*i+1];
//	 U[1]=(unsigned int)s[i];
//	 if (s[i]<0)
//	    U[0]=0xffffffff;
//	 else
//	    U[0]=0;
	 add64(U,U);
	 add64(U,U);
	 while ((K[0]!=U[0])||(K[1]!=U[1])) {
//	 while (K[1]!=U[1]) {
	    if ((K[1]&3)==0) {
	       icount=icount+1;
	       K[1]=(K[1]>>2)|(K[0]<<30);
	       K[0]=(int)K[0]>>2;
	       k=k/4;
	       }
	    else {
	       K[1]=(K[1]>>1)|(K[0]<<31);
	       K[0]=(int)K[0]>>1;
	       k=k/2;
	       }
	    k=3*k+c;
	    T[0]=K[0];
	    T[1]=K[1];
	    add64(K,K);
	    add64(T,K);
	    add64(CP,K);
	    }
//
	 lcount=1;
	 k=s[i];
	 K[0]=ES[2*i];
	 K[1]=ES[2*i+1];
	 while ((K[1]&1)==0) {
//	 while ((k&1)==0) {
	    lcount=lcount+1;
	    k=k/2;
	    K[1]=K[1]>>1;
	    K[1]=K[1]|(K[0]<<31);
	    K[0]=(int)K[0]>>1;
	    }
	 delta=odds+icount-lcount;
	 if (jump==1) {
	    delta=delta-1;
	    jmpsum=jmpsum+1;
	    }
	 if (jump==2) {
	    delta=delta-jmpcnt;
	    jmpsum=jmpsum+jmpcnt;
	    }
	 if ((delta<-10)&&(wflag==0)) {
	    printf("warning: delta less than -10 \n");
	    printf("lcount=%d, icount=%d, delta=%d \n",lcount,icount,odds+icount-lcount);
	    fprintf(Outfp,"warning: delta less than -2 \n");
	    fprintf(Outfp,"lcount=%d, icount=%d, delta=%d \n",lcount,icount,odds+icount-lcount);
	    }
	 delta=delta+offset;
	 if (delta<0) {
	    printf("error: offset not big enough (histoi) \n");
	    goto zskip;
	    }
	 if (delta>99) {
	    printf("error: histogram array not big enough (histoi), delta=%d \n",delta);
	    goto zskip;
	    }
	 histoi[delta]=histoi[delta]+1;
//
	 delta=(int)m-lcount+icount;
	 if (jump==1)
	    delta=delta-1;
	 if (jump==2)
	    delta=delta-jmpcnt;
	 delta=delta+offset5;
	 if (delta<0) {
	    printf("error: offset not big enough (histox) \n");
	    goto zskip;
	    }
	 if (delta>199) {
	    printf("error: histogram array not big enough (histox) \n");
	    goto zskip;
	    }
	 histox[delta]=histox[delta]+1;
//
	 if (((c==hflag1)&&(cflag[index+i]>=indmin)&&(cflag[index+i]<=indmax))||(hflag1==0)) {
	    delta=(int)m-lcount;
	    delta=delta+offset;
	    if (delta<0) {
	       printf("error: offset not big enough (histoy) \n");
	       goto zskip;
	       }
	    if (delta>99) {
	       printf("error: histogram array not big enough (histoy) \n");
	       goto zskip;
	       }
	    histoy[delta]=histoy[delta]+1;
	    }
//
	 delta=icount;
	 if (jump==1)
	    delta=delta-1;
	 if (jump==2)
	    delta=delta-jmpcnt;
	 delta=delta+offset5;
	 if (delta<0) {
	    printf("error: offset not big enough (histoz) \n");
	    goto zskip;
	    }
	 if (delta>199) {
	    printf("error: histogram array not big enough (histoz) \n");
	    goto zskip;
	    }
	 histoz[delta]=histoz[delta]+1;
//
	 delta=odds-lcount;
	 delta=delta+offset;
	 if (delta<0) {
	    printf("error: offset not big enough (histor) \n");
	    goto zskip;
	    }
	 if (delta>99) {
	    printf("error: histogram array not big enough (histor) \n");
	    goto zskip;
	    }
	 histor[delta]=histor[delta]+1;
	 }
//
      k=(int)odds-(int)m;
      if (wflag==0) {
	 printf("c=%d, s=%d, o=%d, t=%d, u=%d, e=%d, o=%d, e=%d, o=%d, jump=%d, j=%d, d=%d \n",c,s[i],order,t,u,evens,odds,levens,lodds,jump,m,k);
	 fprintf(Outfp,"c=%d, s=%d, o=%d, t=%d, u=%d, e=%d, o=%d, e=%d, o=%d, jump=%d, j=%d, d=%d \n",c,s[i],order,t,u,evens,odds,levens,lodds,jump,m,k);
	 if (evens<odds) {
	    printf("warning: even count less than odd count \n");
	    fprintf(Outfp,"warning: even count less than odd count \n");
	    }
	 }
//
// continued-fraction convergents
//
      for (tempi=0; tempi<75; tempi++) {
	 if ((conv[2*tempi]==(levens+lodds))&&(conv[2*tempi+1]==lodds)) {
	    if ((concov[3*tempi]==0)||(concov[3*tempi]==(unsigned int)c))
	       concov[3*tempi]=c;
	    else {
	       if ((concov[3*tempi+1]==0)||(concov[3*tempi+1]==(unsigned int)c))
		  concov[3*tempi+1]=c;
	       else
		  concov[3*tempi+2]=c;
	       }
	    T[0]=ES[2*i]<<2;
	    T[1]=ES[2*i+1]<<2;
	    T[0]=T[0]|(ES[2*i+1]>>30);
	    if ((T[0]!=OLDS[0])||(T[1]!=OLDS[1])) {
//	    if ((4*s[i])!=olds) {
	       delta=(int)m-lcount;
	       delta=delta+offset4;
	       if (delta<0) {
		  printf("array not big enough (histot) \n");
		  goto zskip;
		  }
	       if (delta>49) {
		  printf("array not big enough (histot) \n");
		  goto zskip;
		  }
	       histot[delta]=histot[delta]+1;
	       }
	    }
	 if (conv[2*tempi+1]>lodds)
	    break;
	 }
//
      for (tempi=0; tempi<75; tempi++) {
	 if ((conv[2*tempi+1]==levens)&&(conv[2*tempi+1]==lodds)) {
	    if ((concove[3*tempi]==0)||(concove[3*tempi]==(unsigned int)c))
	       concove[3*tempi]=c;
	    else {
	       if ((concove[3*tempi+1]==0)||(concove[3*tempi+1]==(unsigned int)c))
		  concove[3*tempi+1]=c;
	       else
		  concove[3*tempi+2]=c;
	       }
	    T[0]=ES[2*i]<<2;
	    T[1]=ES[2*i+1]<<2;
	    T[0]=T[0]|(ES[2*i+1]>>30);
	    if ((T[0]!=OLDS[0])||(T[1]!=OLDS[1])) {
//	    if ((4*s[i])!=olds) {
	       delta=(int)m-lcount;
	       delta=delta+offset4;
	       if (delta<0) {
		  printf("array not big enough (histoa) \n");
		  goto zskip;
		  }
	       if (delta>49) {
		  printf("array not big enough (histoa) \n");
		  goto zskip;
		  }
	       histoa[delta]=histoa[delta]+1;
	       }
	    }
	 if (conv[2*tempi+1]>lodds)
	    break;
	 }
//
// total odds and evens
//
      T[0]=ES[2*i]<<2;
      T[1]=ES[2*i+1]<<2;
      T[0]=T[0]|(ES[2*i+1]>>30);
      if ((T[0]!=OLDS[0])||(T[1]!=OLDS[1])) {
//    if ((4*s[i])!=olds) {
	 oddsum=oddsum+odds;
	 evensum=evensum+lcount;
	 jsum=jsum+m;
	 hcount=hcount+icount;
	 patcnt=patcnt+1;
	 }
//
// compute sum of reciprocals
//
      T[0]=ES[2*i]<<2;
      T[1]=ES[2*i+1]<<2;
      T[0]=T[0]|(ES[2*i+1]>>30);
      if ((T[0]!=OLDS[0])||(T[1]!=OLDS[1])) {
//    if ((4*s[i])!=olds) {
	 T[0]=TEE[0];
	 T[1]=TEE[1];
	 if ((T[0]&0x80000000)!=0)
	    sub64(Z,T);
	 dtemp=(double)T[1]+(double)T[0]*65536.0*65536.0;
	 temp=t;
	 if (temp<0)
	    temp=-temp;
//	 sumrec=sumrec+(1.0/(double)temp);
	 sumrec=sumrec+(1.0/dtemp);
	 T[0]=YOU[0];
	 T[1]=YOU[1];
	 if ((T[0]&0x80000000)!=0)
	    sub64(Z,T);
	 dtemp=(double)T[1]+(double)T[0]*65536.0*65536.0;
	 temp=u;
	 if (temp<0)
	    temp=-temp;
//	 sumrec=sumrec+(1.0/(double)temp);
	 sumrec=sumrec+(1.0/dtemp);
	 primary=primary+1;
	 }
//
// check chain (u values)
//
      T[0]=ES[2*i]<<2;
      T[1]=ES[2*i+1]<<2;
      T[0]=T[0]|(ES[2*i+1]>>30);
      if ((T[0]!=OLDS[0])||(T[1]!=OLDS[1])) {
//    if ((4*s[i])!=olds) {
	 T[0]=YOU[0];
	 T[1]=YOU[1];
	 if ((T[0]&0x80000000)!=0)
	    sub64(Z,T);
	 dtemp=(double)T[1]+(double)T[0]*65536.0*65536.0;
	 temp=u;
	 if (temp<0)
	    temp=-temp;
	 if (oldchn<dtemp) {
//	 if (oldchn<(double)temp) {
	    if ((wflag!=2)&&(eowrite==0)) {
	       printf("error: bad u chain, c=%d \n",c);
	       printf("chain=%e, u=%#010x %#010x, old u=%#010x %#010x, jump=%d, s=%#010x %#010x \n",oldchn,YOU[0],YOU[1],OLDU[0],OLDU[1],jump,ES[2*i],ES[2*i+1]);
	       fprintf(Outfp,"error: bad u chain, c=%d \n",c);
	       fprintf(Outfp,"chain=%e, u=%#010x %#010x, old u=%#010x %#010x, jump=%d, s=%#010x %#010x \n",oldchn,YOU[0],YOU[1],OLDU[0],OLDU[1],jump,ES[2*i],ES[2*i+1]);
	       }
	    badcntu=badcntu+1;
	    }
	 T[0]=YOU[0];
	 T[1]=YOU[1];
	 add64(CP,T);
	 if ((T[0]&0x80000000)!=0)
	    sub64(Z,T);
	 dtemp=(double)T[1]+(double)T[0]*65536.0*65536.0;
	 temp=u+c;
	 if (temp<0)
	    temp=-temp;
//	 oldchn=(double)temp;
	 oldchn=dtemp;
	 oldchn=rat*log(oldchn);
	 oldchn=exp(oldchn);
	 oldu=u;
	 OLDU[0]=YOU[0];
	 OLDU[1]=YOU[1];
	 }
//
// check j values for no-jumps
//
      if (jump==0) {
	 if ((m>10)&&(wflag==0)) {
	    printf("warning: no-jump with j>10 \n");
	    fprintf(Outfp,"warning: no-jump with j>10 \n");
	    }
	 if (((c==hflag)&&(cflag[index+i]>=indmin)&&(cflag[index+i]<=indmax))||(hflag==0)) {
	    T[0]=ES[2*i]<<2;
	    T[1]=ES[2*i+1]<<2;
	    T[0]=T[0]|(ES[2*i+1]>>30);
	    if ((T[0]!=OLDS[0])||(T[1]!=OLDS[1])) {
//	    if ((4*s[i])!=olds) {
	       if (m>39) {
		  printf("histogram array not big enough (histon) \n");
		  goto zskip;
		  }
	       histon[m]=histon[m]+1;
	       }
	    }
	 }
//
// check j values for multiple-jumps
//
      if (jump==2) {
	 if ((m>3)&&(wflag==0)) {
	    printf("warning: multiple-jump with j>3 \n");
	    fprintf(Outfp,"warning: multiple-jump with j>3 \n");
	    }
	 T[0]=ES[2*i]<<2;
	 T[1]=ES[2*i+1]<<2;
	 T[0]=T[0]|(ES[2*i+1]>>30);
	 if ((T[0]!=OLDS[0])||(T[1]!=OLDS[1])) {
//	 if ((4*s[i])!=olds) {
	    if (m>9) {
	       printf("histogram array not big enough (histom) \n");
	       goto zskip;
	       }
	    histom[m]=histom[m]+1;
	    }
	 }
//
// histogram k values
//
      if (((c==hflag)&&(cflag[index+i]>=indmin)&&(cflag[index+i]<=indmax))||(hflag==0)) {
	 T[0]=ES[2*i]<<2;
	 T[1]=ES[2*i+1]<<2;
	 T[0]=T[0]|(ES[2*i+1]>>30);
	 if ((jump==1)&&((T[0]!=OLDS[0])||(T[1]!=OLDS[1]))) {
//	 if ((jump==1)&&((4*s[i])!=olds)) {
	    delta=k+offset5;
	    if (delta<0) {
	       printf("error: offset not big enough (histoj) \n");
	       goto zskip;
	       }
	    if (delta>199) {
	       printf("error: histogram array not big enough (histoj) \n");
	       goto zskip;
	       }
	    histoj[delta]=histoj[delta]+1;
	    }
	 }
//
// histogram evens minus odds
//
      if (jump==1) {
	 delta=(int)evens-(int)odds;
	 delta=delta+offset;
	 if (delta<0) {
	    printf("error: offset not big enough (histo) \n");
	    goto zskip;
	    }
	 if (delta>99) {
	    printf("error: histogram array not big enough (histo) \n");
	    goto zskip;
	    }
	 histo[delta]=histo[delta]+1;
	 }
//
// find minimum t or u
//
      T[0]=ES[2*i]<<2;
      T[1]=ES[2*i+1]<<2;
      T[0]=T[0]|(ES[2*i+1]>>30);
      if ((T[0]!=OLDS[0])||(T[1]!=OLDS[1])) {
//    if ((4*s[i])!=olds) {
	 T[0]=TEE[0];
	 T[1]=TEE[1];
	 if ((T[0]&0x80000000)!=0)
	    sub64(Z,T);
	 V[0]=T[0];
	 V[1]=T[1];
	 sub64(GLOMIN,V);
	 temp=t;
	 if (temp<0)
	    temp=-temp;
	 if ((V[0]&0x80000000)==0) {
//	 if (temp<glomin)
	    glomin=temp;
	    GLOMIN[0]=T[0];
	    GLOMIN[1]=T[1];
	    }
	 T[0]=YOU[0];
	 T[1]=YOU[1];
	 if ((T[0]&0x80000000)!=0)
	    sub64(Z,T);
	 V[0]=T[0];
	 V[1]=T[1];
	 sub64(GLOMIN,V);
	 temp=u;
	 if (temp<0)
	    temp=-temp;
	 if ((V[0]&0x80000000)==0) {
//	 if (temp<glomin)
	    glomin=temp;
	    GLOMIN[0]=T[0];
	    GLOMIN[1]=T[1];
	    }
	 a=a+1;
	 }
//
// find local maximum and minimum
//
      K[0]=YOU[0];
      K[1]=YOU[1];
      LOCMIN[0]=K[0];
      LOCMIN[1]=K[1];
      if ((LOCMIN[0]&0x80000000)!=0)
	 sub64(Z,LOCMIN);
      LOCMAX[0]=LOCMIN[0];
      LOCMAX[1]=LOCMIN[1];
      LASTODD[0]=LOCMAX[0];
      LASTODD[1]=LOCMAX[1];
      k=u;
      locmin=k;
      if (locmin<0)
	 locmin=-locmin;
      locmax=locmin;
      lastodd=locmax;
      k=3*k+c;
      T[0]=K[0];
      T[1]=K[1];
      add64(K,K);
      add64(T,K);
      add64(CP,K);
      while ((K[1]&7)!=0) {
//    while ((k&7)!=0) {
	 while ((K[1]&1)==0) {
//	 while ((k&1)==0) {
	    k=k/2;
	    K[1]=K[1]>>1;
	    K[1]=K[1]|(K[0]<<31);
	    K[0]=(int)K[0]>>1;
	    }
	 T[0]=K[0];
	 T[1]=K[1];
	 if ((T[0]&0x80000000)!=0)
	    sub64(Z,T);
	 V[0]=T[0];
	 V[1]=T[1];
	 sub64(LOCMIN,V);
	 delta=k;
	 if (delta<0)
	    delta=-delta;
	 if ((V[0]&0x80000000)==0) {
//	 if (delta<locmin) {
	    locmin=delta;
	    LOCMIN[0]=T[0];
	    LOCMIN[1]=T[1];
	    }
	 V[0]=LOCMAX[0];
	 V[1]=LOCMAX[1];
	 sub64(T,V);
	 if ((V[0]&0x80000000)==0) {
//	 if (delta>locmax) {
	    locmax=delta;
	    LOCMAX[0]=T[0];
	    LOCMAX[1]=T[1];
	    }
	 lastodd=delta;
	 LASTODD[0]=T[0];
	 LASTODD[1]=T[1];
	 k=3*k+c;
	 T[0]=K[0];
	 T[1]=K[1];
	 add64(K,K);
	 add64(T,K);
	 add64(CP,K);
	 }
      T[0]=ES[2*i]<<2;
      T[1]=ES[2*i+1]<<2;
      T[0]=T[0]|(ES[2*i+1]>>30);
      if ((T[0]!=OLDS[0])||(T[1]!=OLDS[1])) {
//    if ((4*s[i])!=olds) {	   // check if primary
//	 if ((lastodd!=locmax)&&(jump==2)) {
	 if (((LASTODD[0]!=LOCMAX[0])||(LASTODD[1]!=LOCMAX[1]))&&(jump==2)) {
	    printf("error: no-jump with local maximum at attachment point \n");
	    printf("locmin=%d, locmax=%d, lastodd=%d \n",locmin,locmax,lastodd);
	    fprintf(Outfp,"error: no-jump with local maximum at attachment point \n");
	    printf("o=%d, e=%d \n",lodds,levens);
	    goto zskip;
	    }
	 if ((LASTODD[0]!=LOCMAX[0])||(LASTODD[1]!=LOCMAX[1])) {
//	   if (lastodd!=locmax) {
	    if (jump==0)
	       county=county+1;
	    if (jump==1) {
	       countn=countn+1;
	       if (((c==hflag)&&(cflag[index+i]>=indmin)&&(cflag[index+i]<=indmax))||(hflag==0)) {
		  delta=(int)odds-(int)m;
		  delta=delta+offset;
		  if (delta<0) {
		     printf("array not big enough (newhis) \n");
		     goto zskip;
		     }
		  if (delta>99) {
		     printf("array not big enough (newhis) \n");
		     goto zskip;
		     }
		  newhis[delta]=newhis[delta]+1;
		  }
	       }
	    if (jump==3)
	       countx=countx+1;
	    }
	 }
      T[0]=ES[2*i]<<2;
      T[1]=ES[2*i+1]<<2;
      T[0]=T[0]|(ES[2*i+1]>>30);
      if ((T[0]!=OLDS[0])||(T[1]!=OLDS[1])) {
//    if ((4*s[i])!=olds) {
	 V[0]=GLOMAX[0];
	 V[1]=GLOMAX[1];
	 sub64(LOCMAX,V);
	 if ((V[0]&0x80000000)==0) {
//	 if (locmax>glomax) {
	    glomax=locmax;
	    GLOMAX[0]=LOCMAX[0];
	    GLOMAX[1]=LOCMAX[1];
	    usave=u;
	    tsave=t;
	    USAVE[0]=YOU[0];
	    USAVE[1]=YOU[1];
	    TSAVE[0]=TEE[0];
	    TSAVE[1]=TEE[1];
	    savjmp=jump;
	    }
	 }
//
// check local minimum
//
      T[0]=ES[2*i]<<2;
      T[1]=ES[2*i+1]<<2;
      T[0]=T[0]|(ES[2*i+1]>>30);
      if ((jump==1)&&((T[0]!=OLDS[0])||(T[1]!=OLDS[1]))) {
//    if ((jump==1)&&((4*s[i])!=olds)) {
	 mincnt=0;
	 k=u;
	 delta=k;
	 if (delta<0)
	    delta=-delta;
	 K[0]=YOU[0];
	 K[1]=YOU[1];
	 T[0]=K[0];
	 T[1]=K[1];
	 if ((T[0]&0x80000000)!=0)
	    sub64(Z,T);
	 if ((T[0]==LOCMIN[0])&&(T[1]==LOCMIN[1])) {
//	 if (delta==locmin) {
	    hismin[0]=hismin[0]+1;
	    goto yskip;
	    }
	 while ((T[0]!=LOCMIN[0])||(T[1]!=LOCMIN[1])) {
//	 while (delta!=locmin) {
	    V[0]=K[0];
	    V[1]=K[1];
	    add64(K,K);
	    add64(V,K);
	    add64(CP,K);
	    k=3*k+c;
	    if ((K[1]&3)!=0) {
//	    if ((k&3)!=0) {
	       hismin[19]=hismin[19]+1;
	       if (bypass==0)
		  goto pskip;
	       else
		  goto yskip;
	       }
	    K[1]=K[1]>>2;
	    K[1]=K[1]|(K[0]<<30);
	    K[0]=(int)K[0]>>2;
	    k=k/4;
	    delta=k;
	    if (delta<0)
	       delta=-delta;
	    T[0]=K[0];
	    T[1]=K[1];
	    if ((T[0]&0x80000000)!=0)
	       sub64(Z,T);
	    mincnt=mincnt+1;
	    }
	 if (mincnt>18) {
	    printf("error: array not big enough (hismin) \n");
	    goto zskip;
	    }
	 hismin[mincnt]=hismin[mincnt]+1;
pskip:	 if (((c==hflag)&&(cflag[index+i]>=indmin)&&(cflag[index+i]<=indmax))||(hflag==0)) {
	    delta=(int)odds-(int)m;
	    delta=delta+offset;
	    if (delta<0) {
	       printf("array not big enough (oldhis) \n");
	       goto zskip;
	       }
	    if (delta>99) {
	       printf("array not big enough (oldhis) \n");
	       goto zskip;
	       }
	    oldhis[delta]=oldhis[delta]+1;
	    }
	 }
//
// check multiple-jumps
//
yskip:
      T[0]=ES[2*i]<<2;
      T[1]=ES[2*i+1]<<2;
      T[0]=T[0]|(ES[2*i+1]>>30);
      if ((jump==2)&&((T[0]!=OLDS[0])||(T[1]!=OLDS[1]))) {
//    if ((jump==2)&&((4*s[i])!=olds)) {
	 K[0]=YOU[0];
	 K[1]=YOU[1];
	 V[0]=K[0];
	 V[1]=K[1];
	 add64(K,K);
	 add64(V,K);
	 add64(CP,K);
	 k=u;
	 k=3*k+c;
	 while ((K[1]&7)!=0) {
//	 while ((k&7)!=0) {
	    if ((K[1]&3)==0) {
//	    if ((k&3)==0) {
	       printf("error: not one jump from u \n");
	       fprintf(Outfp,"error: not one jump from u \n");
	       goto zskip;
	       }
	    k=k/2;
	    k=3*k+c;
	    K[1]=K[1]>>1;
	    K[1]=K[1]|(K[0]<<31);
	    K[0]=(int)K[0]>>1;
	    V[0]=K[0];
	    V[1]=K[1];
	    add64(K,K);
	    add64(V,K);
	    add64(CP,K);
	    }
	 }
//
// check if primary multiple-jumps are preceded by no-jumps
// Note:  Only last primary multiple-jump checked.
//
      T[0]=ES[2*i]<<2;
      T[1]=ES[2*i+1]<<2;
      T[0]=T[0]|(ES[2*i+1]>>30);
      if ((jump==2)&&((T[0]!=OLDS[0])||(T[1]!=OLDS[1]))) {
//    if ((jump==2)&&((4*s[i])!=olds)) {
	 K[0]=YOU[0]<<1;
	 K[0]=K[0]|(YOU[1]>>31);
	 K[1]=YOU[1]<<1;
	 k=u*2;
	 V[0]=CP[0];
	 V[1]=CP[1];
	 sub64(K,V);
	 if ((V[0]&0x80000000)!=0) {
	    T[0]=V[0];
	    T[1]=V[1];
	    sub64(Z,T);
	    div64_32(T,Q,3);
	    sub64(Z,Q);
	    }
	 else
	    div64_32(V,Q,3);
	 T[0]=Q[0];
	 T[1]=Q[1];
	 add64(Q,Q);
	 add64(T,Q);
	 sub64(V,Q);
	 if ((Q[0]!=0)||(Q[1]!=0)) {
//	 if ((((k-c)/3)*3)!=(k-c))
	    k=k*2;
	    add64(K,K);
	    }
	 tmps=k;
	 TMPS[0]=K[0];
	 TMPS[1]=K[1];
	 mflag=1;
	 }
//
// compute domain
//
      T[0]=ES[2*i]<<2;
      T[1]=ES[2*i+1]<<2;
      T[0]=T[0]|(ES[2*i+1]>>30);
      if ((T[0]!=OLDS[0])||(T[1]!=OLDS[1])) {
//    if ((4*s[i])!=olds) {
	 K[0]=TEE[0];
	 K[1]=TEE[1];
	 if ((K[0]&0x80000000)!=0)
	    sub64(Z,K);
	 V[0]=MAXTU[0];
	 V[1]=MAXTU[1];
	 sub64(K,V);
	 k=t;
	 if (k<0)
	    k=-k;
	 if ((V[0]&0x80000000)==0) {
//	 if ((unsigned int)k>maxtu) {
	    maxtu=k;
	    MAXTU[0]=K[0];
	    MAXTU[1]=K[1];
	    }
	 V[0]=K[0];
	 V[1]=K[1];
	 sub64(MINTU,V);
	 if ((V[0]&0x80000000)==0) {
//	 if ((unsigned int)k<mintu) {
	    mintu=k;
	    MINTU[0]=K[0];
	    MINTU[1]=K[1];
	    }
	 add64(K,SUMTU);
	 add64(K,SUMT);
	 sumtu=sumtu+k;
	 sumt=sumt+k;
	 ut[kk]=k;
	 UT[kk*2]=K[0];
	 UT[kk*2+1]=K[1];
	 kk=kk+1;
	 if (kk>4998) {
	    printf("array not big enough (ut) \n");
	    goto zskip;
	    }
	 stu[2*total]=k;
	 STU[4*total]=K[0];
	 STU[4*total+1]=K[1];
	 V[0]=MAXT[0];	 // new!
	 V[1]=MAXT[1];
	 sub64(K,V);
	 if ((V[0]&0x80000000)==0) {
	    MAXT[0]=K[0];
	    MAXT[1]=K[1];
	    }
	 V[0]=K[0];
	 V[1]=K[1];
	 sub64(MINT,V);
	 if ((V[0]&0x80000000)==0) {
	    MINT[0]=K[0];
	    MINT[1]=K[1];
	    }
//
	 K[0]=YOU[0];
	 K[1]=YOU[1];
	 if ((K[0]&0x80000000)!=0)
	    sub64(Z,K);
	 V[0]=MAXTU[0];
	 V[1]=MAXTU[1];
	 sub64(K,V);
	 k=u;
	 if (k<0)
	    k=-k;
	 if ((V[0]&0x80000000)==0) {
//	 if ((unsigned int)k>maxtu) {
	    maxtu=k;
	    MAXTU[0]=K[0];
	    MAXTU[1]=K[1];
	    }
	 V[0]=K[0];
	 V[1]=K[1];
	 sub64(MINTU,V);
	 if ((V[0]&0x80000000)==0) {
//	 if ((unsigned int)k<mintu) {
	    mintu=k;
	    MINTU[0]=K[0];
	    MINTU[1]=K[1];
	    }
	 add64(K,SUMTU);
	 add64(K,SUMU);
	 sumtu=sumtu+k;
	 sumu=sumu+k;
	 ut[kk]=k;
	 UT[kk*2]=K[0];
	 UT[kk*2+1]=K[1];
	 kk=kk+1;
	 stu[2*total+1]=k;
	 STU[4*total+2]=K[0];
	 STU[4*total+3]=K[1];
	 V[0]=MAXU[0];	 // new!
	 V[1]=MAXU[1];
	 sub64(K,V);
	 if ((V[0]&0x80000000)==0) {
	    MAXU[0]=K[0];
	    MAXU[1]=K[1];
	    }
	 V[0]=K[0];
	 V[1]=K[1];
	 sub64(MINU,V);
	 if ((V[0]&0x80000000)==0) {
	    MINU[0]=K[0];
	    MINU[1]=K[1];
	    }
//
	 k=t+c;
	 if (k<0)
	    k=-k;
	 if ((unsigned int)k>maxtuc)
	    maxtuc=k;
	 if ((unsigned int)k<mintuc)
	    mintuc=k;
	 sumtuc=sumtuc+k;
	 k=u+c;
	 if (k<0)
	    k=-k;
	 if ((unsigned int)k>maxtuc)
	    maxtuc=k;
	 if ((unsigned int)k<mintuc)
	    mintuc=k;
	 sumtuc=sumtuc+k;
	 total=total+1;
	 if (total>2999) {
	    printf("output array too small (stu, STU) \n");
	    goto zskip;
	    }
	 }
//
// check for new cycle
//
      if ((cflag[index+i]!=cflag[index+i+1])||(i==(iters-1))) {
	 for (tempi=0; tempi<klcount; tempi++) {
	    if ((kl[2*tempi]==lodds)&&(kl[2*tempi+1]==levens))
	       goto qskip;
	    }
	 kl[2*klcount]=lodds;
	 kl[2*klcount+1]=levens;
	 klcount=klcount+1;
	 if (klcount>99) {
	    printf("array not big enough (kl) \n");
	    goto zskip;
	    }
qskip:	 if (i==(iters-1)) {
	    printf("c=%d, cycles=%d \n",c,klcount);
	    fprintf(Outfp,"c=%d, cycles=%d \n",c,klcount);
	    if (klcount<30) {
	       ncyc[klcount]=ncyc[klcount]+1;
	       }
	    else {
	       printf("error: array not big enough, klcount=%d \n",klcount);
	       goto zskip;
	       }
	    }
	 for (tempi=0; tempi<cycsavind; tempi++) {
	    if ((cycsav[2*tempi]==levens)&&(cycsav[2*tempi+1]==lodds))
	       goto rjump;
	    }
	 cycsav[2*cycsavind]=levens;
	 cycsav[2*cycsavind+1]=lodds;
	 cycsavind=cycsavind+1;
//
// check maximum, minimum, and average (lambda, lambda1, lambda2, and lambda3)
//
rjump:	 dtemp=(double)SUMTU[1]+(double)SUMTU[0]*65536.0*65536.0;
	 lambda=dtemp/(double)(total*2);
//rjump: lambda=(double)sumtu/(double)(total*2);
	 dtemp=(double)SUMT[1]+(double)SUMT[0]*65536.0*65536.0;
	 lambdat=dtemp/(double)total;
//	 lambdat=(double)sumt/(double)total;
	 dtemp=(double)SUMU[1]+(double)SUMU[0]*65536.0*65536.0;
	 lambdau=dtemp/(double)total;
//	 lambdau=(double)sumu/(double)total;
	 lambda1=0.0;
	 lambda2=0.0;
	 lambda3=0.0;
	 lambda4=0.0;
	 lambda5=0.0;
	 lambda6=0.0;
	 if (total>1) {
	    V[0]=0;
	    V[1]=0;
	    sumtu1=0;
	    kk=0;
	    for (g=0; g<total*2; g++) {
	       dtemp=(double)UT[2*g+1]+(double)UT[2*g]*65536.0*65536.0;
//	       if ((double)ut[g]<=lambda) {
	       if (dtemp<=lambda) {
		  sumtu1=sumtu1+ut[g];
		  add64(&UT[2*g],V);
		  kk=kk+1;
		  }
	       }
	    if (kk==0) {
	       printf("error 1a: kk=0, c=%d, e=%d, o=%d, a=%d \n",c,levens,lodds,total);
	       fprintf(Outfp,"error 1a: kk=0, c=%d, e=%d, o=%d, a=%d \n",c,levens,lodds,total);
	       goto zskip;
	       }
	    l1flag=kk;
	    dtemp=(double)V[1]+(double)V[0]*65536.0*65536.0;
	    lambda1=dtemp/(double)kk;
//	    lambda1=(double)sumtu1/(double)kk;
	    if (kk==1)
	       goto ejump;
//
	    V[0]=0;
	    V[1]=0;
	    sumtu1=0;
	    kk=0;
	    for (g=0; g<total*2; g++) {
	       dtemp=(double)UT[2*g+1]+(double)UT[2*g]*65536.0*65536.0;
	       if (dtemp<=lambda1) {
//	       if ((double)ut[g]<=lambda1) {
		  sumtu1=sumtu1+ut[g];
		  add64(&UT[2*g],V);
		  kk=kk+1;
		  }
	       }
	    if (kk==0)
	       goto ejump;
	    l2flag=kk;
	    dtemp=(double)V[1]+(double)V[0]*65536.0*65536.0;
	    lambda2=dtemp/(double)kk;
//	    lambda2=(double)sumtu1/(double)kk;
	    if (kk==1)
	       goto ejump;
//
	    V[0]=0;
	    V[1]=0;
	    sumtu1=0;
	    kk=0;
	    for (g=0; g<total*2; g++) {
	       dtemp=(double)UT[2*g+1]+(double)UT[2*g]*65536.0*65536.0;
	       if (dtemp<=lambda2) {
//	       if ((double)ut[g]<=lambda2) {
		  sumtu1=sumtu1+ut[g];
		  add64(&UT[2*g],V);
		  kk=kk+1;
		  }
	       }
	    if (kk==0)
	       goto ejump;
	    l3flag=kk;
	    dtemp=(double)V[1]+(double)V[0]*65536.0*65536.0;
	    lambda3=dtemp/(double)kk;
//	    lambda3=(double)sumtu1/(double)kk;
	    if (kk==1)
	       goto ejump;
//
	    V[0]=0;
	    V[1]=0;
	    kk=0;
	    for (g=0; g<total*2; g++) {
	       dtemp=(double)UT[2*g+1]+(double)UT[2*g]*65536.0*65536.0;
	       if (dtemp<=lambda3) {
		  add64(&UT[2*g],V);
		  kk=kk+1;
		  }
	       }
	    if (kk==0)
	       goto ejump;
	    l4flag=kk;
	    dtemp=(double)V[1]+(double)V[0]*65536.0*65536.0;
	    lambda4=dtemp/(double)kk;
	    if (kk==1)
	       goto ejump;
//
	    V[0]=0;
	    V[1]=0;
	    kk=0;
	    for (g=0; g<total*2; g++) {
	       dtemp=(double)UT[2*g+1]+(double)UT[2*g]*65536.0*65536.0;
	       if (dtemp<=lambda4) {
		  add64(&UT[2*g],V);
		  kk=kk+1;
		  }
	       }
	    if (kk==0)
	       goto ejump;
	    l5flag=kk;
	    dtemp=(double)V[1]+(double)V[0]*65536.0*65536.0;
	    lambda5=dtemp/(double)kk;
	    if (kk==1)
	       goto ejump;
//
	    V[0]=0;
	    V[1]=0;
	    kk=0;
	    for (g=0; g<total*2; g++) {
	       dtemp=(double)UT[2*g+1]+(double)UT[2*g]*65536.0*65536.0;
	       if (dtemp<=lambda5) {
		  add64(&UT[2*g],V);
		  kk=kk+1;
		  }
	       }
	    if (kk==0)
	       goto ejump;
	    l6flag=kk;
	    dtemp=(double)V[1]+(double)V[0]*65536.0*65536.0;
	    lambda6=dtemp/(double)kk;
	    }
//
// check M and N for parity vector p
//
ejump:	 if (lodds>levens) {
	    for (g=0; g<5000; g++) {
	       if (((levens+lodds)==(ln[g]>>16))&&(lodds==(ln[g]&0xffff))) {
		  pcount=pcount+1;
		  g=halbhung(levens+lodds,lodds,EM,EN,sv,A,B,C,D,L,S,em);
		  if (g!=0) {
		     printf("error: N can't be computed \n");
		     fprintf(Outfp,"error: N can't be computed \n");
		     goto qjump;
		     }
		  d=(double)EN[3]*(double)c/4.0/6.0;
		  dtemp=(double)MAXTU[1]+(double)MAXTU[0]*65536.0*65536.0;
		  if (d>dtemp) {
//		  if (d>(double)maxtu) {
		     printf("error 1: lambda=%e, max=%d, min=%d, evens=%d, odds=%d, M=%e, N=%e \n",lambda,maxtu,mintu,levens,lodds,(double)(c*EM[3])/4.0,(double)(c*EN[3])/4.0);
		     fprintf(Outfp,"error 1: lambda=%e, max=%d, min=%d, evens=%d, odds=%d, M=%e, N=%e \n",lambda,maxtu,mintu,levens,lodds,(double)(c*EM[3])/4.0,(double)(c*EN[3])/4.0);
		     goto zskip;
		     }
		  d=d*2.0;
//		  if ((d>(double)maxtu)&&(total!=1)) {
		  if ((d>dtemp)&&(total!=1)) {
		     printf("error 1x: lambda=%e, max=%d, min=%d, evens=%d, odds=%d, M=%e, N=%e, a=%d \n",lambda,maxtu,mintu,levens,lodds,(double)(c*EM[3])/4.0,(double)(c*EN[3])/4.0,patcnt);
		     fprintf(Outfp,"error 1x: lambda=%e, max=%d, min=%d, evens=%d, odds=%d, M=%e, N=%e \n",lambda,maxtu,mintu,levens,lodds,(double)(c*EM[3])/4.0,(double)(c*EN[3])/4.0);
		     if ((c==8059)&&(levens==14)&&(lodds==24)&&(patcnt==2))
			goto phop;
		     if ((c==36791)&&(levens==15)&&(lodds==25)&&(patcnt==2))
			goto phop;
		     if ((c==71515)&&(levens==10)&&(lodds==17)&&(total==2))
			goto phop;
		     goto zskip;
		     }
phop:		  d=(double)EM[3]*(double)c/2.0;
		  dtemp=(double)MINTU[1]+(double)MINTU[0]*65536.0*65536.0;
		  if (d<dtemp) {
//		  if (d<(double)mintu) {
		     printf("error 2y: lambda=%e, max=%d, min=%d, evens=%d, odds=%d, a=%d, M=%e, N=%e \n",lambda,maxtu,mintu,levens,lodds,patcnt,(double)(c*EM[3])/4.0,(double)(c*EN[3])/4.0);
		     fprintf(Outfp,"error 2y: lambda=%e, max=%d, min=%d, evens=%d, odds=%d, a=%d, M=%e, N=%e \n",lambda,maxtu,mintu,levens,lodds,patcnt,(double)(c*EM[3])/4.0,(double)(c*EN[3])/4.0);
		     if ((c==71515)&&(levens==10)&&(lodds==17)&&(patcnt==1))
			break;
		     goto zskip;
		     }
		  break;
		  }
	       if (lodds<(ln[g]&0xffff))
		  break;
	       }
	    }
//
//  check maxtu/lambda, delta power=a+1
//
qjump:	 d=log(3)/log(2);
	 d=exp((double)(total+1)*log(d));
	 dtemp=(double)MAXTU[1]+(double)MAXTU[0]*65536.0*65536.0;
	 if (d<(dtemp/lambda)) {
//	 if (d<((double)maxtu/lambda)) {
	    printf("error 1: d=%e, max=%d, min=%d, lambda=%e, total=%d, c=%d, e=%d, o=%d \n",d,maxtu,mintu,lambda,total,c,levens,lodds);
	    fprintf(Outfp,"error 1: d=%e, max=%d, min=%d, lambda=%e, total=%d, c=%d, e=%d, o=%d \n",d,maxtu,mintu,lambda,total,c,levens,lodds);
	    goto zskip;
	    }
//
//  check maxtu/mintu, a>3, delta power=4*a+1
//
	 if (total>3) {
	    d=log(3)/log(2);
	    d=exp((double)(total*4+1)*log(d));
	    dtemp=(double)MAXTU[1]+(double)MAXTU[0]*65536.0*65536.0;
	    etemp=(double)MINTU[1]+(double)MINTU[0]*65536.0*65536.0;
	    if (d<(dtemp/etemp)) {
//	    if (d<((double)maxtu/(double)mintu)) {
	       if ((c==3047)&&(levens==24)&&(lodds==12)&&(total==4))
		  goto bhop;
	       if ((c==3185)&&(levens==24)&&(lodds==12)&&(total==4))
		  goto bhop;
	       if ((c==4331)&&(levens==30)&&(lodds==30)&&(total==4))
		  goto bhop;
	       if ((c==4339)&&(levens==28)&&(lodds==20)&&(total==4))
		  goto bhop;
	       if ((c==5063)&&(levens==40)&&(lodds==56)&&(total==6))
		  goto bhop;
	       if ((c==6059)&&(levens==20)&&(lodds=28)&&(total==4))
		  goto bhop;
	       if ((c==6511)&&(levens==15)&&(lodds==22)&&(total==4))
		  goto bhop;
	       if ((c==6755)&&(levens==12)&&(lodds==12)&&(total==4))
		  goto bhop;
	       if ((c==7337)&&(levens==16)&&(lodds==18)&&(total==4))
		  goto bhop;
	       if ((c==7633)&&(levens==31)&&(lodds==22)&&(total==4))
		  goto bhop;
	       if ((c==8039)&&(levens==11)&&(lodds==15)&&(total==4))
		  goto bhop;
	       if ((c==8681)&&(levens==23)&&(lodds==10)&&(total==4))
		  goto bhop;
	       if ((c==9217)&&(levens==27)&&(lodds==25)&&(total==4))
		  goto bhop;
	       if ((c==10093)&&(levens==29)&&(lodds==23)&&(total==4))
		  goto bhop;
	       if ((c==11117)&&(levens==20)&&(lodds==7)&&(total==4))
		  goto bhop;
	       if ((c==13657)&&(levens==24)&&(lodds==18)&&(total==4))
		  goto bhop;
	       if ((c==13885)&&(levens==20)&&(lodds==24)&&(total==4))
		  goto bhop;
	       if ((c==13925)&&(levens==14)&&(lodds==9)&&(total==4))
		  goto bhop;
	       if ((c==15005)&&(levens==20)&&(lodds=10)&&(total==4))
		  goto bhop;
	       if ((c==16831)&&(levens==17)&&(lodds==22)&&(total==4))
		  goto bhop;
	       if ((c==17231)&&(levens==13)&&(lodds==20)&&(total==4))
		  goto bhop;
	       if ((c==18571)&&(levens==14)&&(lodds==14)&&(total==4))
		  goto bhop;
	       if ((c==19415)&&(levens==12)&&(lodds==16)&&(total==4))
		  goto bhop;
	       if ((c==19439)&&(levens==30)&&(lodds==36)&&(total==4))
		  goto bhop;
	       if ((c==20221)&&(levens==24)&&(lodds==12)&&(total==4))
		  goto bhop;
	       if ((c==20297)&&(levens==13)&&(lodds==8)&&(total==4))
		  goto bhop;
	       if ((c==21191)&&(levens==23)&&(lodds==11)&&(total==4))
		  goto bhop;
	       if ((c==21697)&&(levens==33)&&(lodds==39)&&(total==6))
		  goto bhop;
	       if ((c==22237)&&(levens==15)&&(lodds==15)&&(total==4))
		  goto bhop;
	       if ((c==23137)&&(levens==35)&&(lodds==30)&&(total==4))
		  goto bhop;
	       if ((c==23159)&&(levens==38)&&(lodds==30)&&(total==6))
		  goto bhop;
	       if ((c==23465)&&(levens==24)&&(lodds==20)&&(total==4))
		  goto bhop;
	       if ((c==23761)&&(levens==23)&&(lodds==14)&&(total==4))
		  goto bhop;
	       if ((c==24053)&&(levens==14)&&(lodds==16)&&(total==4))
		  goto bhop;
	       if ((c==25277)&&(levens==30)&&(lodds==42)&&(total==6))
		  goto bhop;
	       if ((c==25309)&&(levens==19)&&(lodds==19)&&(total==4))
		  goto bhop;
	       if ((c==25309)&&(levens==19)&&(lodds==19)&&(total==5))
		  goto bhop;
	       if ((c==25921)&&(levens==23)&&(lodds==8)&&(total==4))
		  goto bhop;
	       if ((c==27041)&&(levens==34)&&(lodds==22)&&(total==4))
		  goto bhop;
	       if ((c==28595)&&(levens==36)&&(lodds==24)&&(total==6))
		  goto bhop;
	       if ((c==28727)&&(levens==17)&&(lodds==4)&&(total==4))
		  goto bhop;
	       if ((c==29521)&&(levens==28)&&(lodds==18)&&(total==4))
		  goto bhop;
	       if ((c==29687)&&(levens==16)&&(lodds==16)&&(total==4))
		  goto bhop;
	       if ((c==30193)&&(levens==19)&&(lodds==21)&&(total==4))
		  goto bhop;
	       if ((c==30241)&&(levens==21)&&(lodds==14)&&(total==4))
		  goto bhop;
	       if ((c==31415)&&(levens==20)&&(lodds==28)&&(total==4))
		  goto bhop;
	       if ((c==32137)&&(levens==27)&&(lodds==24)&&(total==5))
		  goto bhop;
	       if ((c==33011)&&(levens==20)&&(lodds==10)&&(total==4))
		  goto bhop;
	       if ((c==33497)&&(levens==18)&&(lodds==12)&&(total==5))
		  goto bhop;
	       if ((c==33181)&&(levens==26)&&(lodds==18)&&(total==4))
		  goto bhop;
	       if ((c==33775)&&(levens==12)&&(lodds==12)&&(total==4))
		  goto bhop;
	       if ((c==34501)&&(levens==26)&&(lodds==18)&&(total==4))
		  goto bhop;
	       if ((c==35705)&&(levens==24)&&(lodds==24)&&(total==5))
		  goto bhop;
	       if ((c==34501)&&(levens==13)&&(lodds==9)&&(total==4))
		  goto bhop;
	       if ((c==34765)&&(levens==36)&&(lodds==24)&&(total==4))
		  goto bhop;
	       if ((c==35483)&&(levens==20)&&(lodds==8)&&(total==4))
		  goto bhop;
	       if ((c==35815)&&(levens==24)&&(lodds==20)&&(total==4))
		  goto bhop;
	       if ((c==35851)&&(levens==22)&&(lodds==7)&&(total==4))
		  goto bhop;
	       if ((c==36043)&&(levens==36)&&(lodds==18)&&(total==4))
		  goto bhop;
	       if ((c==36173)&&(levens==20)&&(lodds==16)&&(total==5))
		  goto bhop;
	       if ((c==36391)&&(levens==24)&&(lodds==30)&&(total==4))
		  goto bhop;
	       if ((c==36649)&&(levens==16)&&(lodds==23)&&(total==4))
		  goto bhop;
	       if ((c==37315)&&(levens==28)&&(lodds==24)&&(total==4))
		  goto bhop;
	       if ((c==37595)&&(levens==20)&&(lodds==28)&&(total==4))
		  goto bhop;
	       if ((c==38353)&&(levens==23)&&(lodds==20)&&(total==4))
		  goto bhop;
	       if ((c==38375)&&(levens==14)&&(lodds==19)&&(total==4))
		  goto bhop;
	       if ((c==39217)&&(levens==16)&&(lodds==23)&&(total==4))
		  goto bhop;
	       if ((c==38669)&&(levens==22)&&(lodds==29)&&(total==5))
		  goto bhop;
	       if ((c==38701)&&(levens==15)&&(lodds==9)&&(total==4))
		  goto bhop;
	       if ((c==40103)&&(levens==16)&&(lodds==16)&&(total==4))
		  goto bhop;
	       if ((c==40151)&&(levens==15)&&(lodds==11)&&(total==4))
		  goto bhop;
	       if ((c==40619)&&(levens==16)&&(lodds==20)&&(total==4))
		  goto bhop;
	       if ((c==40549)&&(levens==18)&&(lodds==12)&&(total==4))
		  goto bhop;
	       if ((c==41003)&&(levens==26)&&(lodds==26)&&(total==5))
		  goto bhop;
	       if ((c==41095)&&(levens==20)&&(lodds==6)&&(total==4))
		  goto bhop;
	       if ((c==41137)&&(levens==11)&&(lodds==12)&&(total==4))
		  goto bhop;
	       if ((c==41161)&&(levens==26)&&(lodds==28)&&(total==4))
		  goto bhop;
	       if ((c==41279)&&(levens==11)&&(lodds==14)&&(total==4))
		  goto bhop;
	       if ((c==42251)&&(levens==16)&&(lodds==18)&&(total==5))
		  goto bhop;
	       if ((c==42851)&&(levens==14)&&(lodds==16)&&(total==4))
		  goto bhop;
	       if ((c==43441)&&(levens==15)&&(lodds==20)&&(total==4))
		  goto bhop;
	       if ((c==43441)&&(levens==15)&&(lodds==20)&&(total==5))
		  goto bhop;
	       if ((c==43529)&&(levens==12)&&(lodds==10)&&(total==4))
		  goto bhop;
	       if ((c==43369)&&(levens==27)&&(lodds==24)&&(total==4))
		  goto bhop;
	       if ((c==44311)&&(levens==15)&&(lodds==12)&&(total==4))
		  goto bhop;
	       if ((c==44311)&&(levens==15)&&(lodds==12)&&(total==5))
		  goto bhop;
	       if ((c==45641)&&(levens==18)&&(lodds==28)&&(total==4))
		  goto bhop;
	       if ((c==45853)&&(levens==14)&&(lodds==18)&&(total==4))
		  goto bhop;
	       if ((c==45853)&&(levens==21)&&(lodds==27)&&(total==5))
		  goto bhop;
	       if ((c==45871)&&(levens==18)&&(lodds==18)&&(total==4))
		  goto bhop;
	       if ((c==46181)&&(levens==24)&&(lodds==23)&&(total==5))
		  goto bhop;
	       if ((c==47209)&&(levens==20)&&(lodds==24)&&(total==4))
		  goto bhop;
	       if ((c==47209)&&(levens==20)&&(lodds==24)&&(total==5))
		  goto bhop;
	       if ((c==47369)&&(levens==24)&&(lodds==18)&&(total==4))
		  goto bhop;
	       if ((c==47369)&&(levens==24)&&(lodds==18)&&(total==5))
		  goto bhop;
	       if ((c==50359)&&(levens==34)&&(lodds==18)&&(total==6))
		  goto bhop;
	       if ((c==50479)&&(levens==24)&&(lodds==32)&&(total==4))
		  goto bhop;
	       if ((c==51719)&&(levens==21)&&(lodds==10)&&(total==4))
		  goto bhop;
	       if ((c==51833)&&(levens==19)&&(lodds==14)&&(total==4))
		  goto bhop;
	       if ((c==51895)&&(levens==12)&&(lodds==14)&&(total==4))
		  goto bhop;
	       if ((c==52349)&&(levens==18)&&(lodds==24)&&(total==4))
		  goto bhop;
	       if ((c==52451)&&(levens==12)&&(lodds==18)&&(total==4))
		  goto bhop;
	       if ((c==53431)&&(levens==31)&&(lodds==22)&&(total==5))
		  goto bhop;
	       if ((c==53741)&&(levens==40)&&(lodds==32)&&(total==5))
		  goto bhop;
	       if ((c==54955)&&(levens==28)&&(lodds==28)&&(total==4))
		  goto bhop;
	       if ((c==55085)&&(levens==26)&&(lodds==21)&&(total==4))
		  goto bhop;
	       if ((c==57061)&&(levens==22)&&(lodds==24)&&(total==4))
		  goto bhop;
	       if ((c==58045)&&(levens==12)&&(lodds==16)&&(total==4))
		  goto bhop;
	       if ((c==58975)&&(levens==16)&&(lodds==16)&&(total==5))
		  goto bhop;
	       if ((c==59495)&&(levens==36)&&(lodds==36)&&(total==4))
		  goto bhop;
	       if ((c==60481)&&(levens==24)&&(lodds==18)&&(total==4))
		  goto bhop;
	       if ((c==60965)&&(levens==20)&&(lodds==8)&&(total==4))
		  goto bhop;
	       if ((c==60997)&&(levens==40)&&(lodds==40)&&(total==5))
		  goto bhop;
	       if ((c==62419)&&(levens==32)&&(lodds==20)&&(total==4))
		  goto bhop;
	       if ((c==62683)&&(levens==22)&&(lodds==21)&&(total==4))
		  goto bhop;
	       if ((c==62725)&&(levens==12)&&(lodds==12)&&(total==4))
		  goto bhop;
	       if ((c==63889)&&(levens==17)&&(lodds==20)&&(total==5))
		  goto bhop;
	       if ((c==63973)&&(levens==18)&&(lodds==18)&&(total==5))
		  goto bhop;
	       if ((c==63973)&&(levens==18)&&(lodds==18)&&(total==4))
		  goto bhop;
	       if ((c==64255)&&(levens==20)&&(lodds==20)&&(total==5))
		  goto bhop;
	       if ((c==64829)&&(levens==12)&&(lodds==15)&&(total==4))
		  goto bhop;
	       if ((c==65617)&&(levens==24)&&(lodds==8)&&(total==4))
		  goto bhop;
	       if ((c==66367)&&(levens==18)&&(lodds==30)&&(total==5))
		  goto bhop;
	       if ((c==67033)&&(levens==18)&&(lodds==22)&&(total==4))
		  goto bhop;
	       if ((c==67667)&&(levens==23)&&(lodds==27)&&(total==5))
		  goto bhop;
	       if ((c==67723)&&(levens==36)&&(lodds==28)&&(total==5))
		  goto bhop;
	       if ((c==67915)&&(levens==24)&&(lodds==32)&&(total==4))
		  goto bhop;
	       if ((c==68495)&&(levens==36)&&(lodds==30)&&(total==5))
		  goto bhop;
	       if ((c==69355)&&(levens==24)&&(lodds==12)&&(total==4))
		  goto bhop;
	       if ((c==69443)&&(levens==17)&&(lodds==11)&&(total==4))
		  goto bhop;
	       if ((c==69685)&&(levens==20)&&(lodds==20)&&(total==4))
		  goto bhop;
	       if ((c==69907)&&(levens==20)&&(lodds==24)&&(total==4))
		  goto bhop;
	       if ((c==71791)&&(levens==23)&&(lodds==22)&&(total==4))
		  goto bhop;
	       if ((c==72023)&&(levens==14)&&(lodds==20)&&(total==4))
		  goto bhop;
	       if ((c==72097)&&(levens==16)&&(lodds==16)&&(total==4))
		  goto bhop;
	       if ((c==72097)&&(levens==32)&&(lodds==32)&&(total==4))
		  goto bhop;
	       if ((c==72163)&&(levens==30)&&(lodds==18)&&(total==5))
		  goto bhop;
	       if ((c==72391)&&(levens==28)&&(lodds==14)&&(total==4))
		  goto bhop;
	       if ((c==74531)&&(levens==30)&&(lodds==20)&&(total==4))
		  goto bhop;
	       if ((c==75025)&&(levens==40)&&(lodds==20)&&(total==5))
		  goto bhop;
	       if ((c==75821)&&(levens==24)&&(lodds==29)&&(total==4))
		  goto bhop;
	       if ((c==76463)&&(levens==26)&&(lodds==30)&&(total==4))
		  goto bhop;
	       if ((c==77089)&&(levens==45)&&(lodds==36)&&(total==5))
		  goto bhop;
	       if ((c==77287)&&(levens==30)&&(lodds==30)&&(total==5))
		  goto bhop;
	       if ((c==77891)&&(levens==24)&&(lodds==12)&&(total==4))
		  goto bhop;
	       if ((c==78005)&&(levens==30)&&(lodds==29)&&(total==4))
		  goto bhop;
	       if ((c==78403)&&(levens==18)&&(lodds==18)&&(total==4))
		  goto bhop;
	       if ((c==79285)&&(levens==16)&&(lodds==12)&&(total==4))
		  goto bhop;
	       if ((c==80155)&&(levens==24)&&(lodds==16)&&(total==4))
		  goto bhop;
	       if ((c==80969)&&(levens==24)&&(lodds==30)&&(total==4))
		  goto bhop;
	       if ((c==81059)&&(levens==23)&&(lodds==39)&&(total==6))
		  goto bhop;
	       if ((c==81097)&&(levens==28)&&(lodds==23)&&(total==4))
		  goto bhop;
	       if ((c==81437)&&(levens==30)&&(lodds==30)&&(total==5))
		  goto bhop;
	       if ((c==81437)&&(levens==30)&&(lodds==30)&&(total==6))
		  goto bhop;
	       if ((c==81515)&&(levens==20)&&(lodds==8)&&(total==4))
		  goto bhop;
	       if ((c==81757)&&(levens==30)&&(lodds==22)&&(total==4))
		  goto bhop;
	       if ((c==82093)&&(levens==14)&&(lodds==12)&&(total==4))
		  goto bhop;
	       if ((c==82847)&&(levens==23)&&(lodds==8)&&(total==4))
		  goto bhop;
	       if ((c==82955)&&(levens==12)&&(lodds==16)&&(total==4))
		  goto bhop;
	       if ((c==83285)&&(levens==22)&&(lodds==13)&&(total==4))
		  goto bhop;
	       if ((c==85189)&&(levens==18)&&(lodds==18)&&(total==4))
		  goto bhop;
	       if ((c==85219)&&(levens==28)&&(lodds==36)&&(total==4))
		  goto bhop;
	       if ((c==85351)&&(levens==20)&&(lodds==8)&&(total==4))
		  goto bhop;
	       if ((c==86731)&&(levens==28)&&(lodds==21)&&(total==4))
		  goto bhop;
	       if ((c==86963)&&(levens==36)&&(lodds==24)&&(total==5))
		  goto bhop;
	       if ((c==87551)&&(levens==32)&&(lodds==22)&&(total==4))
		  goto bhop;
	       if ((c==85565)&&(levens==16)&&(lodds==12)&&(total==4))
		  goto bhop;
	       if ((c==90421)&&(levens==18)&&(lodds==24)&&(total==4))
		  goto bhop;
	       if ((c==90739)&&(levens==32)&&(lodds==16)&&(total==5))
		  goto bhop;
	       if ((c==91595)&&(levens==24)&&(lodds==36)&&(total==4))
		  goto bhop;
	       if ((c==92629)&&(levens==42)&&(lodds==36)&&(total==7))
		  goto bhop;
	       if ((c==92833)&&(levens==12)&&(lodds==12)&&(total==4))
		  goto bhop;
	       if ((c==92905)&&(levens==28)&&(lodds==24)&&(total==5))
		  goto bhop;
	       if ((c==95185)&&(levens==20)&&(lodds==14)&&(total==4))
		  goto bhop;
	       if ((c==96913)&&(levens==27)&&(lodds==18)&&(total==5))
		  goto bhop;
	       if ((c==97105)&&(levens==28)&&(lodds==30)&&(total==4))
		  goto bhop;
	       if ((c==97471)&&(levens==20)&&(lodds==20)&&(total==4))
		  goto bhop;
	       if ((c==97565)&&(levens==24)&&(lodds==20)&&(total==4))
		  goto bhop;
	       if ((c==97625)&&(levens==20)&&(lodds==20)&&(total==4))
		  goto bhop;
	       if ((c==97817)&&(levens==24)&&(lodds==20)&&(total==4))
		  goto bhop;
	       if ((c==99157)&&(levens==30)&&(lodds==18)&&(total==5))
		  goto bhop;
	       if ((c==99157)&&(levens==15)&&(lodds==9)&&(total==4))
		  goto bhop;
	       if ((c==99263)&&(levens==21)&&(lodds==18)&&(total==4))
		  goto bhop;
	       printf("error 2: d=%e, max=%d, min=%d, lambda=%e, total=%d, c=%d, e=%d, o=%d \n",d,maxtu,mintu,lambda,total,c,levens,lodds);
	       fprintf(Outfp,"error 2: d=%e, max=%d, min=%d, lambda=%e, total=%d, c=%d, e=%d, o=%d \n",d,maxtu,mintu,lambda,total,c,levens,lodds);
	       goto zskip;
	       }
	    }
bhop:	 d=log(3)/log(2);
	 d=exp((double)(total+1)*log(d));
	 if (lambda1!=0.0) {
	    count1=count1+1;
	    if (d<(lambda/lambda1)) {
	       if (eowrite==0) {
		  printf("error 1b: d=%e, max=%d, min=%d, lambda=%e, lambda1=%e, total=%d, c=%d, e=%d, o=%d \n",d,maxtu,mintu,lambda,lambda1,total,c,levens,lodds);
		  fprintf(Outfp,"error 1b: d=%e, max=%d, min=%d, lambda=%e, lambda1=%e, total=%d, c=%d, e=%d, o=%d \n",d,maxtu,mintu,lambda,lambda1,total,c,levens,lodds);
		  printf("c=%d, e=%d, o=%d, a=%d, kk=%d \n",c,levens,lodds,total,l1flag);
		  fprintf(Outfp,"c=%d, e=%d, o=%d, a=%d, kk=%d \n",c,levens,lodds,total,l1flag);
		  }
	       error[0]=error[0]+1;
	       }
	    }
	 if ((lambda1!=0.0)&&(lambda2!=0.0)) {
	    count2=count2+1;
	    if (d<(lambda1/lambda2)) {
	       if (eowrite==0) {
		  printf("error 2b: d=%e, max=%d, min=%d, lambda1=%e, lambda2=%e, total=%d, c=%d, e=%d, o=%d \n",d,maxtu,mintu,lambda1,lambda2,total,c,levens,lodds);
		  fprintf(Outfp,"error 2b: d=%e, max=%d, min=%d, lambda1=%e, lambda2=%e, total=%d, c=%d, e=%d, o=%d \n",d,maxtu,mintu,lambda1,lambda2,total,c,levens,lodds);
		  printf("c=%d, e=%d, o=%d, a=%d, kk=%d \n",c,levens,lodds,total,l2flag);
		  fprintf(Outfp,"c=%d, e=%d, o=%d, a=%d, kk=%d \n",c,levens,lodds,total,l2flag);
		  }
	       error[1]=error[1]+1;
	       }
	    }
	 if ((lambda2!=0.0)&&(lambda3!=0.0)) {
	    count3=count3+1;
	    if (d<(lambda2/lambda3)) {
	       if (eowrite==0) {
		  printf("error 3b: d=%e, max=%d, min=%d, lambda2=%e, lambda3=%e, total=%d, c=%d, e=%d, o=%d \n",d,maxtu,mintu,lambda2,lambda3,total,c,levens,lodds);
		  fprintf(Outfp,"error 3b: d=%e, max=%d, min=%d, lambda2=%e, lambda3=%e, total=%d, c=%d, e=%d, o=%d \n",d,maxtu,mintu,lambda2,lambda3,total,c,levens,lodds);
		  printf("c=%d, e=%d, o=%d, a=%d, kk=%d \n",c,levens,lodds,total,l3flag);
		  fprintf(Outfp,"c=%d, e=%d, o=%d, a=%d, kk=%d \n",c,levens,lodds,total,l3flag);
		  }
	       error[2]=error[2]+1;
	       }
	    }
	 if ((lambda3!=0.0)&&(lambda4!=0.0)) {
	    count4=count4+1;
	    if (d<(lambda3/lambda4)) {
	       if (eowrite==0) {
		  printf("error 4b: d=%e, max=%d, min=%d, lambda3=%e, lambda4=%e, total=%d, c=%d, e=%d, o=%d \n",d,maxtu,mintu,lambda3,lambda4,total,c,levens,lodds);
		  fprintf(Outfp,"error 4b: d=%e, max=%d, min=%d, lambda3=%e, lambda4=%e, total=%d, c=%d, e=%d, o=%d \n",d,maxtu,mintu,lambda3,lambda4,total,c,levens,lodds);
		  printf("c=%d, e=%d, o=%d, a=%d, kk=%d \n",c,levens,lodds,total,l4flag);
		  fprintf(Outfp,"c=%d, e=%d, o=%d, a=%d, kk=%d \n",c,levens,lodds,total,l4flag);
		  }
	       error[3]=error[3]+1;
	       }
	    }
	 if ((lambda4!=0.0)&&(lambda5!=0.0)) {
	    count5=count5+1;
	    if (d<(lambda4/lambda5)) {
	       if (eowrite==0) {
		  printf("error 5b: d=%e, max=%d, min=%d, lambda4=%e, lambda5=%e, total=%d, c=%d, e=%d, o=%d \n",d,maxtu,mintu,lambda4,lambda5,total,c,levens,lodds);
		  fprintf(Outfp,"error 5b: d=%e, max=%d, min=%d, lambda4=%e, lambda5=%e, total=%d, c=%d, e=%d, o=%d \n",d,maxtu,mintu,lambda4,lambda5,total,c,levens,lodds);
		  printf("c=%d, e=%d, o=%d, a=%d, kk=%d \n",c,levens,lodds,total,l5flag);
		  fprintf(Outfp,"c=%d, e=%d, o=%d, a=%d, kk=%d \n",c,levens,lodds,total,l5flag);
		  }
	       error[4]=error[4]+1;
	       }
	    }
	 if ((lambda5!=0.0)&&(lambda6!=0.0)) {
	    count6=count6+1;
	    if (d<(lambda5/lambda6)) {
	       if (eowrite==0) {
		  printf("error 6b: d=%e, max=%d, min=%d, lambda5=%e, lambda6=%e, total=%d, c=%d, e=%d, o=%d \n",d,maxtu,mintu,lambda5,lambda6,total,c,levens,lodds);
		  fprintf(Outfp,"error 6b: d=%e, max=%d, min=%d, lambda5=%e, lambda6=%e, total=%d, c=%d, e=%d, o=%d \n",d,maxtu,mintu,lambda5,lambda6,total,c,levens,lodds);
		  printf("c=%d, e=%d, o=%d, a=%d, kk=%d \n",c,levens,lodds,total,l6flag);
		  fprintf(Outfp,"c=%d, e=%d, o=%d, a=%d, kk=%d \n",c,levens,lodds,total,l6flag);
		  }
	       error[5]=error[5]+1;
	       }
	    }
//
// check maxtu/mintu, parity vector p, lambda/lambda1, lambda1/lambda2, etc.
//
	 if (lodds>levens) {
	    for (g=0; g<5000; g++) {
	       if (((levens+lodds)==(ln[g]>>16))&&(lodds==(ln[g]&0xffff))) {
		  d=log(3)/log(2);
		  d=exp((double)(total*4+1)*log(d));
		  dtemp=(double)MAXTU[1]+(double)MAXTU[0]*65536.0*65536.0;
		  etemp=(double)MINTU[1]+(double)MINTU[0]*65536.0*65536.0;
		  if (d<(dtemp/etemp)) {
//		  if (d<((double)maxtu/(double)mintu)) {
		     printf("error 11: d=%e, max=%d, min=%d, lambda=%e, total=%d, c=%d, e=%d, o=%d \n",d,maxtu,mintu,lambda,total,c,levens,lodds);
		     fprintf(Outfp,"error 11: d=%e, max=%d, min=%d, lambda=%e, total=%d, c=%d, e=%d, o=%d \n",d,maxtu,mintu,lambda,total,c,levens,lodds);
		     if ((c==1631)&&(levens==5)&&(lodds==8)&&(total==2))
			goto ahop;
		     if ((c==6487)&&(levens==12)&&(lodds==20)&&(total==2))
			goto ahop;
		     if ((c==6487)&&(levens==12)&&(lodds==20)&&(total==3))
			goto ahop;
		     if ((c==6487)&&(levens==6)&&(lodds==10)&&(total==2))
			goto ahop;
		     if ((c==6487)&&(levens==6)&&(lodds==10)&&(total==1))
			goto ahop;
		     if ((c==7153)&&(levens==14)&&(lodds==24)&&(total==2))
			goto ahop;
		     if ((c==7153)&&(levens==7)&&(lodds==12)&&(total==1))
			goto ahop;
		     if ((c==8059)&&(levens==14)&&(lodds==24)&&(total==2))
			goto ahop;
		     if ((c==8059)&&(levens==14)&&(lodds==24)&&(total==1))
			goto ahop;
		     if ((c==14303)&&(levens==10)&&(lodds==17)&&(total==1))
			goto ahop;
		     if ((c==14303)&&(levens==10)&&(lodds==17)&&(total==2))
			goto ahop;
		     if ((c==27313)&&(levens==15)&&(lodds==25)&&(total==3))
			goto ahop;
		     if ((c==32435)&&(levens==12)&&(lodds==20)&&(total==3))
			goto ahop;
		     if ((c==39409)&&(levens==17)&&(lodds==29)&&(total==2))
			goto ahop;
		     if ((c==40741)&&(levens==14)&&(lodds==24)&&(total==1))
			goto ahop;
		     if ((c==40741)&&(levens==14)&&(lodds==24)&&(total==2))
			goto ahop;
		     if ((c==40741)&&(levens==14)&&(lodds==24)&&(total==3))
			goto ahop;
		     if ((c==50071)&&(levens==21)&&(lodds==36)&&(total==2))
			goto ahop;
		     if ((c==50071)&&(levens==21)&&(lodds==36)&&(total==3))
			goto ahop;
		     if ((c==71515)&&(levens==10)&&(lodds==17)&&(total==2))
			goto ahop;
		     if ((c==71515)&&(levens==10)&&(lodds==17)&&(total==1))
			goto ahop;
		     if ((c==81059)&&(levens==23)&&(lodds==39)&&(total==6))
			goto ahop;
		     goto zskip;
		     }
ahop:		  d=log(3)/log(2);
		  d=exp((double)(total+1)*log(d));
		  if (lambda1!=0.0) {
		     if (d<(lambda/lambda1)) {
			printf("error 1c: d=%e, max=%d, min=%d, lambda=%e, lambda1=%e, total=%d, c=%d, e=%d, o=%d \n",d,maxtu,mintu,lambda,lambda1,total,c,levens,lodds);
			fprintf(Outfp,"error 1c: d=%e, max=%d, min=%d, lambda=%e, lambda1=%e, total=%d, c=%d, e=%d, o=%d \n",d,maxtu,mintu,lambda,lambda1,total,c,levens,lodds);
			if (l1flag!=1) {
			   if ((c==3013)&&(levens==14)&&(lodds==24)&&(total==4))
			      goto quhop;
			   if ((c==5137)&&(levens==31)&&(lodds==53)&&(total==4))
			      goto quhop;
			   if ((c==6487)&&(levens==12)&&(lodds==20)&&(total==2))
			      goto quhop;
			   if ((c==6487)&&(levens==12)&&(lodds==20)&&(total==3))
			      goto quhop;
			   if ((c==7153)&&(levens==14)&&(lodds==24)&&(total==3))
			      goto quhop;
			   if ((c==7153)&&(levens==21)&&(lodds==36)&&(total==3))
			      goto quhop;
			   if ((c==7153)&&(levens==14)&&(lodds==24)&&(total==2))
			      goto quhop;
			   if ((c==7153)&&(levens==7)&&(lodds==12)&&(total==2))
			      goto quhop;
			   if ((c==8059)&&(levens==14)&&(lodds==24)&&(total==2))
			      goto quhop;
			   if ((c==8059)&&(levens==14)&&(lodds==24)&&(total==3))
			      goto quhop;
			   if ((c==14303)&&(levens==10)&&(lodds==17)&&(total==2))
			      goto quhop;
			   if ((c==17021)&&(levens==24)&&(lodds==41)&&(total==5))
			      goto quhop;
			   if ((c==17021)&&(levens==24)&&(lodds==41)&&(total==4))
			      goto quhop;
			   if ((c==18035)&&(levens==20)&&(lodds==34)&&(total==4))
			      goto quhop;
			   if ((c==18035)&&(levens==20)&&(lodds==34)&&(total==3))
			      goto quhop;
			   if ((c==24917)&&(levens==12)&&(lodds==20)&&(total==2))
			      goto quhop;
			   if ((c==27313)&&(levens==15)&&(lodds==25)&&(total==3))
			      goto quhop;
			   if ((c==27313)&&(levens==15)&&(lodds==25)&&(total==2))
			      goto quhop;
			   if ((c==32435)&&(levens==12)&&(lodds==20)&&(total==2))
			      goto quhop;
			   if ((c==32435)&&(levens==12)&&(lodds==20)&&(total==3))
			      goto quhop;
			   if ((c==33899)&&(levens==28)&&(lodds==48)&&(total==4))
			      goto quhop;
			   if ((c==35893)&&(levens==15)&&(lodds==25)&&(total==2))
			      goto quhop;
			   if ((c==35893)&&(levens==15)&&(lodds==25)&&(total==3))
			      goto quhop;
			   if ((c==36791)&&(levens==15)&&(lodds==25)&&(total==2))
			      goto quhop;
			   if ((c==39409)&&(levens==17)&&(lodds==29)&&(total==2))
			      goto quhop;
			   if ((c==39409)&&(levens==17)&&(lodds==29)&&(total==4))
			      goto quhop;
			   if ((c==39409)&&(levens==17)&&(lodds==29)&&(total==3))
			      goto quhop;
			   if ((c==40741)&&(levens==14)&&(lodds==24)&&(total==2))
			      goto quhop;
			   if ((c==40741)&&(levens==14)&&(lodds==24)&&(total==3))
			      goto quhop;
			   if ((c==40741)&&(levens==14)&&(lodds==24)&&(total==1))
			      goto quhop;
			   if ((c==50071)&&(levens==21)&&(lodds==36)&&(total==2))
			      goto quhop;
			   if ((c==50071)&&(levens==21)&&(lodds==36)&&(total==3))
			      goto quhop;
			   if ((c==50071)&&(levens==21)&&(lodds==36)&&(total==4))
			      goto quhop;
			   if ((c==56653)&&(levens==25)&&(lodds==43)&&(total==3))
			      goto quhop;
			   if ((c==65251)&&(levens==28)&&(lodds==48)&&(total==4))
			      goto quhop;
			   if ((c==71515)&&(levens==10)&&(lodds==17)&&(total==2))
			      goto quhop;
			   if ((c==71515)&&(levens==20)&&(lodds==34)&&(total==4))
			      goto quhop;
			   if ((c==71515)&&(levens==10)&&(lodds==17)&&(total==3))
			      goto quhop;
			   if ((c==71515)&&(levens==20)&&(lodds==34)&&(total==2))
			      goto quhop;
			   if ((c==72089)&&(levens==28)&&(lodds==48)&&(total==4))
			      goto quhop;
			   if ((c==72089)&&(levens==28)&&(lodds==48)&&(total==5))
			      goto quhop;
			   if ((c==81059)&&(levens==23)&&(lodds==39)&&(total==4))
			      goto quhop;
			   goto zskip;
			   }
			else {
			   if (eowrite==0) {
			      printf("kkp=1 \n");
			      fprintf(Outfp,"kkp=1, c=%d, e=%d, o=%d, a=%d \n",c,levens,lodds,total);
			      }
			   }
			}
		     }
quhop:		  if ((lambda1!=0.0)&&(lambda2!=0.0)) {
		     if (d<(lambda1/lambda2)) {
			printf("error 2c: d=%e, max=%d, min=%d, lambda1=%e, lambda2=%e, total=%d, c=%d, e=%d, o=%d \n",d,maxtu,mintu,lambda1,lambda2,total,c,levens,lodds);
			fprintf(Outfp,"error 2c: d=%e, max=%d, min=%d, lambda1=%e, lambda2=%e, total=%d, c=%d, e=%d, o=%d \n",d,maxtu,mintu,lambda1,lambda2,total,c,levens,lodds);
			if (l2flag!=1) {
			   if ((c==7097)&&(levens==41)&&(lodds==70)&&(total==5))
			      goto jhop;
			   if ((c==7153)&&(levens==14)&&(lodds==24)&&(total==3))
			      goto jhop;
			   if ((c==14303)&&(levens==10)&&(lodds==17)&&(total==2))
			      goto jhop;
			   if ((c==27313)&&(levens==15)&&(lodds==25)&&(total==3))
			      goto jhop;
			   if ((c==27313)&&(levens==15)&&(lodds==25)&&(total==2))
			      goto jhop;
			   if ((c==71515)&&(levens==10)&&(lodds==17)&&(total==2))
			      goto jhop;
			   if ((c==73013)&&(levens==20)&&(lodds==34)&&(total==3))
			      goto jhop;
			   if ((c==75325)&&(levens==28)&&(lodds==48)&&(total==5))
			      goto jhop;
			   goto zskip;
			   }
			else {
			   if (eowrite==0) {
			      printf("kkp=1 \n");
			      fprintf(Outfp,"kkp=1, c=%d, e=%d, o=%d, a=%d \n",c,levens,lodds,total);
			      }
			   }
			}
jhop:		     dtemp=0.0;
		     }
		  if ((lambda2!=0.0)&&(lambda3!=0.0)) {
		     if (d<(lambda2/lambda3)) {
			printf("error 3c: d=%e, max=%d, min=%d, lambda2=%e, lambda3=%e, total=%d, c=%d, e=%d, o=%d \n",d,maxtu,mintu,lambda2,lambda3,total,c,levens,lodds);
			fprintf(Outfp,"error 3c: d=%e, max=%d, min=%d, lambda2=%e, lambda3=%e, total=%d, c=%d, e=%d, o=%d \n",d,maxtu,mintu,lambda2,lambda3,total,c,levens,lodds);
			if (l3flag!=1) {
			   if ((c==50071)&&(levens==21)&&(lodds==36)&&(total==3))
			      goto khup;
			   goto zskip;
			   }
			else {
			   if (eowrite==0) {
			      printf("kkp=1 \n");
			      fprintf(Outfp,"kkp=1, c=%d, e=%d, o=%d, a=%d \n",c,levens,lodds,total);
			      }
			   }
			}
khup:		     dtemp=0.0;
		     }
		  }
	       if (lodds<(ln[g]&0xffff))
		  break;
	       }
	    }
//
// lambda=average of t, lambda=average of u, delta power=(a+2)/2
//
	 d=log(3)/log(2);
	 d=exp((double)(total+2)/2.0*log(d));
	 dtemp=(double)MAXU[1]+(double)MAXU[0]*65536.0*65536.0;
	 if (d<(dtemp/lambdau)) {
//	 if (d<((double)maxu/lambdau)) {
	    printf("error 12: d=%e, max=%d, min=%d, lambdau=%e, total=%d, c=%d, e=%d, o=%d \n",d,maxu,minu,lambdau,total,c,levens,lodds);
	    fprintf(Outfp,"error 12: d=%e, max=%d, min=%d, lambdau=%e, total=%d, c=%d, e=%d, o=%d \n",d,maxu,minu,lambdau,total,c,levens,lodds);
	    goto zskip;
	    }
	 d=lambdau;
	 dtemp=(double)MAXU[1]+(double)MAXU[0]*65536.0*65536.0;
	 for (jj=0; jj<80; jj++) {
	    d=d*log(3)/log(2);
	    if (d>dtemp) {
	       if ((jj+1)>39) {
		  printf("array not big enough (d50hist) p=%d \n",jj+1);
		  printf("c=%d, e=%d, o=%d, a=%d, max=%d, avg=%e \n",c,levens,lodds,patcnt,MAXU[1],lambdau);
		  goto zskip;
		  }
	       if (total==1)
		  d50hist[jj+1]=d50hist[jj+1]+1;
	       if (total==2)
		  d51hist[jj+1]=d51hist[jj+1]+1;
	       if (total==3)
		  d52hist[jj+1]=d52hist[jj+1]+1;
	       if (total==4)
		  d53hist[jj+1]=d53hist[jj+1]+1;
	       if (total==5)
		  d54hist[jj+1]=d54hist[jj+1]+1;
	       if (total==6)
		  d55hist[jj+1]=d55hist[jj+1]+1;
	       if (total==7)
		  d56hist[jj+1]=d56hist[jj+1]+1;
	       if (total==8)
		  d57hist[jj+1]=d57hist[jj+1]+1;
	       if (total==9)
		  d58hist[jj+1]=d58hist[jj+1]+1;
	       if (total==10)
		  d59hist[jj+1]=d59hist[jj+1]+1;
	       break;
	       }
	    }
//
	 dtemp=(double)MAXT[1]+(double)MAXT[0]*65536.0*65536.0;
	 if (d<(dtemp/lambdat)) {
//	 if (d<((double)maxt/lambdat)) {
	    printf("error 13: d=%e, max=%d, min=%d, lambdat=%e, total=%d, c=%d, e=%d, o=%d \n",d,maxt,mint,lambdat,total,c,levens,lodds);
	    fprintf(Outfp,"error 13: d=%e, max=%d, min=%d, lambdat=%e, total=%d, c=%d, e=%d, o=%d \n",d,maxt,mint,lambdat,total,c,levens,lodds);
	    goto zskip;
	    }
	 d=lambdat;
	 dtemp=(double)MAXT[1]+(double)MAXT[0]*65536.0*65536.0;
	 for (jj=0; jj<80; jj++) {
	    d=d*log(3)/log(2);
	    if (d>dtemp) {
	       if ((jj+1)>39) {
		  printf("array not big enough (d60hist) p=%d \n",jj+1);
		  printf("c=%d, e=%d, o=%d, a=%d, max=%d, avg=%e \n",c,levens,lodds,patcnt,MAXT[1],lambdat);
		  goto zskip;
		  }
	       if (total==1)
		  d60hist[jj+1]=d60hist[jj+1]+1;
	       if (total==2)
		  d61hist[jj+1]=d61hist[jj+1]+1;
	       if (total==3)
		  d62hist[jj+1]=d62hist[jj+1]+1;
	       if (total==4)
		  d63hist[jj+1]=d63hist[jj+1]+1;
	       if (total==5)
		  d64hist[jj+1]=d64hist[jj+1]+1;
	       if (total==6)
		  d65hist[jj+1]=d65hist[jj+1]+1;
	       if (total==7)
		  d66hist[jj+1]=d66hist[jj+1]+1;
	       if (total==8)
		  d67hist[jj+1]=d67hist[jj+1]+1;
	       if (total==9)
		  d68hist[jj+1]=d68hist[jj+1]+1;
	       if (total==10)
		  d69hist[jj+1]=d69hist[jj+1]+1;
	       break;
	       }
	    }
//
//  power greater than max/lambda
//
	 d=lambda;
	 dtemp=(double)MAXTU[1]+(double)MAXTU[0]*65536.0*65536.0;
	 for (jj=0; jj<80; jj++) {
	    d=d*log(3)/log(2);
//	    if (d>(double)maxtu) {
	    if (d>dtemp) {
	       if ((jj+1)>39) {
		  printf("array not big enough (d11hist) p=%d \n",jj+1);
		  printf("c=%d, e=%d, o=%d, a=%d, max=%d, avg=%e \n",c,levens,lodds,patcnt,MAXTU[1],lambda);
		  goto zskip;
		  }
	       if (total==1)
		  d18hist[jj+1]=d18hist[jj+1]+1;
	       if (total==2)
		  d19hist[jj+1]=d19hist[jj+1]+1;
	       if (total==3)
		  d20hist[jj+1]=d20hist[jj+1]+1;
	       if (total==4)
		  d21hist[jj+1]=d21hist[jj+1]+1;
	       if (total==5)
		  d22hist[jj+1]=d22hist[jj+1]+1;
	       if (total==6)
		  d23hist[jj+1]=d23hist[jj+1]+1;
	       if (total==7)
		  d24hist[jj+1]=d24hist[jj+1]+1;
	       if (total==8)
		  d25hist[jj+1]=d25hist[jj+1]+1;
	       if (total==9)
		  d42hist[jj+1]=d42hist[jj+1]+1;
	       if (total==10)
		  d43hist[jj+1]=d43hist[jj+1]+1;
	       if (total==11)
		  d44hist[jj+1]=d44hist[jj+1]+1;
	       if (total==12)
		  d45hist[jj+1]=d45hist[jj+1]+1;
	       if (total==13)
		  d46hist[jj+1]=d46hist[jj+1]+1;
	       if (total==14)
		  d47hist[jj+1]=d47hist[jj+1]+1;
	       if (total==15)
		  d48hist[jj+1]=d48hist[jj+1]+1;
	       if (total==16)
		  d49hist[jj+1]=d49hist[jj+1]+1;
	       d11hist[jj+1]=d11hist[jj+1]+1;
	       break;
	       }
	    }
//
	 if (lambda1!=0.0) {
	    d=lambda1;
	    for (jj=0; jj<80; jj++) {
	       d=d*log(3)/log(2);
	       if (d>lambda) {
		  if ((jj+1)>39) {
		     printf("array not big enough (d12hist) p=%d \n",jj+1);
		     printf("c=%d, e=%d, o=%d, a=%d, max=%d, avg=%e \n",c,levens,lodds,patcnt,MAXTU[1],lambda);
		     goto zskip;
		     }
		  if (total==1)
		     d26hist[jj+1]=d26hist[jj+1]+1;
		  if (total==2)
		     d27hist[jj+1]=d27hist[jj+1]+1;
		  if (total==3)
		     d28hist[jj+1]=d28hist[jj+1]+1;
		  if (total==4)
		     d29hist[jj+1]=d29hist[jj+1]+1;
		  if (total==5)
		     d30hist[jj+1]=d30hist[jj+1]+1;
		  if (total==6)
		     d31hist[jj+1]=d31hist[jj+1]+1;
		  if (total==7)
		     d32hist[jj+1]=d32hist[jj+1]+1;
		  if (total==8)
		     d33hist[jj+1]=d33hist[jj+1]+1;
		  d12hist[jj+1]=d12hist[jj+1]+1;
		  break;
		  }
	       }
	    }
//
	 if ((lambda1!=0.0)&&(lambda2!=0.0)) {
	    d=lambda2;
	    for (jj=0; jj<80; jj++) {
	       d=d*log(3)/log(2);
	       if (d>lambda1) {
		  if ((jj+1)>39) {
		     printf("array not big enough (d13hist) p=%d \n",jj+1);
		     printf("c=%d, e=%d, o=%d, a=%d, max=%d, avg=%e \n",c,levens,lodds,patcnt,MAXTU[1],lambda);
		     goto zskip;
		     }
		  if (total==1)
		     d34hist[jj+1]=d34hist[jj+1]+1;
		  if (total==2)
		     d35hist[jj+1]=d35hist[jj+1]+1;
		  if (total==3)
		     d36hist[jj+1]=d36hist[jj+1]+1;
		  if (total==4)
		     d37hist[jj+1]=d37hist[jj+1]+1;
		  if (total==5)
		     d38hist[jj+1]=d38hist[jj+1]+1;
		  if (total==6)
		     d39hist[jj+1]=d39hist[jj+1]+1;
		  if (total==7)
		     d40hist[jj+1]=d40hist[jj+1]+1;
		  if (total==8)
		     d41hist[jj+1]=d41hist[jj+1]+1;
		  d13hist[jj+1]=d13hist[jj+1]+1;
		  break;
		  }
	       }
	    }
//
	 if ((lambda2!=0.0)&&(lambda3!=0.0)) {
	    d=lambda3;
	    for (jj=0; jj<80; jj++) {
	       d=d*log(3)/log(2);
	       if (d>lambda2) {
		  if ((jj+1)>39) {
		     printf("array not big enough (d14hist) p=%d \n",jj+1);
		     printf("c=%d, e=%d, o=%d, a=%d, max=%d, avg=%e \n",c,levens,lodds,patcnt,MAXTU[1],lambda);
		     goto zskip;
		     }
		  d14hist[jj+1]=d14hist[jj+1]+1;
		  break;
		  }
	       }
	    }
//
	 if ((lambda3!=0.0)&&(lambda4!=0.0)) {
	    d=lambda4;
	    for (jj=0; jj<80; jj++) {
	       d=d*log(3)/log(2);
	       if (d>lambda3) {
		  if ((jj+1)>39) {
		     printf("array not big enough (d15hist) p=%d \n",jj+1);
		     printf("c=%d, e=%d, o=%d, a=%d, max=%d, avg=%e \n",c,levens,lodds,patcnt,MAXTU[1],lambda);
		     goto zskip;
		     }
		  d15hist[jj+1]=d15hist[jj+1]+1;
		  break;
		  }
	       }
	    }
//
	 if ((lambda4!=0.0)&&(lambda5!=0.0)) {
	    d=lambda5;
	    for (jj=0; jj<80; jj++) {
	       d=d*log(3)/log(2);
	       if (d>lambda4) {
		  if ((jj+1)>39) {
		     printf("array not big enough (d16hist) p=%d \n",jj+1);
		     printf("c=%d, e=%d, o=%d, a=%d, max=%d, avg=%e \n",c,levens,lodds,patcnt,MAXTU[1],lambda);
		     goto zskip;
		     }
		  d16hist[jj+1]=d16hist[jj+1]+1;
		  break;
		  }
	       }
	    }
//
	 if ((lambda5!=0.0)&&(lambda6!=0.0)) {
	    d=lambda6;
	    for (jj=0; jj<80; jj++) {
	       d=d*log(3)/log(2);
	       if (d>lambda5) {
		  if ((jj+1)>39) {
		     printf("array not big enough (d17hist) p=%d \n",jj+1);
		     printf("c=%d, e=%d, o=%d, a=%d, max=%d, avg=%e \n",c,levens,lodds,patcnt,MAXTU[1],lambda);
		     goto zskip;
		     }
		  d17hist[jj+1]=d17hist[jj+1]+1;
		  break;
		  }
	       }
	    }
//
//  power for specified a value
//
	 d=(double)MINTU[1]+(double)MINTU[0]*65536.0*65536.0;
	 dtemp=(double)MAXTU[1]+(double)MAXTU[0]*65536.0*65536.0;
//	 d=(double)mintu;
	 for (jj=0; jj<80; jj++) {
	    d=d*log(3)/log(2);
//	    if (d>(double)maxtu) {
	    if (d>dtemp) {
	       if ((jj+1)>39) {
		  printf("array not big enough (d0hist) p=%d \n",jj+1);
		  printf("c=%d, e=%d, o=%d, a=%d, max=%d, min=%d \n",c,levens,lodds,patcnt,MAXTU[1],MINTU[1]);
		  if ((c==13889)&&(levens==378)&&(lodds==420)&&(patcnt==89))
		     goto zhop;
		  if ((c==22937)&&(levens==561)&&(lodds==586)&&(patcnt==142)) // p=40
		     goto zhop;
		  if ((c==23173)&&(levens==179)&&(lodds==211)&&(patcnt==42))  // p=40
		     goto zhop;
		  if ((c==27011)&&(levens==634)&&(lodds==672)&&(patcnt==150))
		     goto zhop;
		  if ((c==28493)&&(levens==1280)&&(lodds==1317)&&(patcnt==327))
		     goto zhop;
		  if ((c==32845)&&(levens==496)&&(lodds==520)&&(patcnt==123))
		     goto zhop;
		  if ((c==35491)&&(levens==510)&&(lodds==624)&&(patcnt==119)) // p=40
		     goto zhop;
		  if ((c==35681)&&(levens==178)&&(lodds==216)&&(patcnt==41)) // p=42
		     goto zhop;
		  if ((c==36691)&&(levens==380)&&(lodds==403)&&(patcnt==95))
		     goto zhop;
		  if ((c==37351)&&(levens==430)&&(lodds==460)&&(patcnt==101)) // p=40
		     goto zhop;
		  if ((c==38671)&&(levens==1668)&&(lodds==1620)&&(patcnt==412))
		     goto zhop;
		  if ((c==39685)&&(levens==516)&&(lodds==472)&&(patcnt==132))
		     goto zhop;
		  if ((c==40241)&&(levens==866)&&(lodds==896)&&(patcnt==212)) // p=40
		     goto zhop;
		  if ((c==41057)&&(levens==1317)&&(lodds==1406)&&(patcnt==330))  // p=40
		     goto zhop;
		  if ((c==42887)&&(levens==807)&&(lodds==793)&&(patcnt==204)) // p=49
		     goto zhop;
		  if ((c==44701)&&(levens==975)&&(lodds==987)&&(patcnt==236))
		     goto zhop;
		  if ((c==52643)&&(levens==1100)&&(lodds==1096)&&(patcnt==265)) // p=41
		     goto zhop;
		  if ((c==53891)&&(levens==838)&&(lodds==888)&&(patcnt==207)) // p=40
		     goto zhop;
		  if ((c==56941)&&(levens==438)&&(lodds==438)&&(patcnt==107))  // p=41
		     goto zhop;
		  if ((c==57941)&&(levens==1560)&&(lodds==1632)&&(patcnt==377)) // p=46
		     goto zhop;
		  if ((c==58241)&&(levens==1782)&&(lodds==1842)&&(patcnt==431)) // p=40
		     goto zhop;
		  if ((c==59087)&&(levens==660)&&(lodds==726)&&(patcnt==166)) // p=40
		     goto zhop;
		  if ((c==59383)&&(levens==1710)&&(lodds==1770)&&(patcnt==404)) // p=41
		     goto zhop;
		  if ((c==59575)&&(levens==912)&&(lodds==932)&&(patcnt==232)) // p=43
		     goto zhop;
		  if ((c==60841)&&(levens==510)&&(lodds==540)&&(patcnt==123)) // p=40
		     goto zhop;
		  if ((c==60883)&&(levens==2608)&&(lodds==2760)&&(patcnt==676)) // p=42
		     goto zhop;
		  if ((c==61051)&&(levens==2246)&&(lodds==2210)&&(patcnt==561)) // p=40
		     goto zhop;
		  if ((c==61273)&&(levens==460)&&(lodds==474)&&(patcnt==110)) // p=40
		     goto zhop;
		  if ((c==61357)&&(levens==963)&&(lodds==987)&&(patcnt==251)) // p=40
		     goto zhop;
		  if ((c==61489)&&(levens==776)&&(lodds==880)&&(patcnt==190)) // p=41
		     goto zhop;
		  if ((c==63991)&&(levens==1028)&&(lodds==1080)&&(patcnt==242)) // p=44
		     goto zhop;
		  if ((c==64951)&&(levens==669)&&(lodds==652)&&(patcnt==168)) // p=40
		     goto zhop;
		  if ((c==65029)&&(levens==907)&&(lodds==929)&&(patcnt==225)) // p=41
		     goto zhop;
		  if ((c==65687)&&(levens==656)&&(lodds==687)&&(patcnt==158)) // p=40
		     goto zhop;
		  if ((c==66859)&&(levens==600)&&(lodds==636)&&(patcnt==158)) // p=41
		     goto zhop;
		  if ((c==67199)&&(levens==180)&&(lodds==200)&&(patcnt==42)) // p=40
		     goto zhop;
		  if ((c==67231)&&(levens==2911)&&(lodds==3136)&&(patcnt==728)) // p=41
		     goto zhop;
		  if ((c==67841)&&(levens==1246)&&(lodds==1246)&&(patcnt==311)) // p=46
		     goto zhop;
		  if ((c==69451)&&(levens==756)&&(lodds==768)&&(patcnt==199)) // p=40
		     goto zhop;
		  if ((c==71515)&&(levens==3982)&&(lodds==3909)&&(patcnt==979)) // p=47
		     goto zhop;
		  if ((c==71671)&&(levens==1035)&&(lodds==1030)&&(patcnt==256)) // p=43
		     goto zhop;
		  if ((c==71837)&&(levens==1556)&&(lodds==1580)&&(patcnt==393)) // p=41
		     goto zhop;
		  if ((c==72451)&&(levens==1420)&&(lodds==1418)&&(patcnt==353)) // p=41
		     goto zhop;
		  if ((c==73457)&&(levens==252)&&(lodds==280)&&(patcnt==63)) // p=40
		     goto zhop;
		  if ((c==73529)&&(levens==1816)&&(lodds==1848)&&(patcnt==446)) // p=41
		     goto zhop;
		  if ((c==74869)&&(levens==196)&&(lodds==232)&&(patcnt==56))  // p=42
		     goto zhop;
		  if ((c==74897)&&(levens==4848)&&(lodds==4976)&&(patcnt==1178)) // p=43
		     goto zhop;
		  if ((c==75067)&&(levens==2046)&&(lodds==2058)&&(patcnt==511)) // p=43
		     goto zhop;
		  if ((c==75697)&&(levens==681)&&(lodds==659)&&(patcnt==156)) // p=42
		     goto zhop;
		  if ((c==71339)&&(levens==1100)&&(lodds==1178)&&(patcnt==274)) // p=44
		     goto zhop;
		  if ((c==77465)&&(levens==1524)&&(lodds==1500)&&(patcnt==385)) // p=45
		     goto zhop;
		  if ((c==78083)&&(levens==1880)&&(lodds==1920)&&(patcnt==488)) // p=44
		     goto zhop;
		  if ((c==78685)&&(levens==1960)&&(lodds==1864)&&(patcnt==498)) // p=40
		     goto zhop;
		  if ((c==79409)&&(levens==372)&&(lodds==366)&&(patcnt==92)) // p=43
		     goto zhop;
		  if ((c==80335)&&(levens==1972)&&(lodds==2030)&&(patcnt==481)) // p=44
		     goto zhop;
		  if ((c==80989)&&(levens==1262)&&(lodds==1370)&&(patcnt==333)) // p=42
		     goto zhop;
		  if ((c==81173)&&(levens==532)&&(lodds==536)&&(patcnt==143)) // p=40
		     goto zhop;
		  if ((c==81419)&&(levens==735)&&(lodds==697)&&(patcnt==180)) // p=40
		     goto zhop;
		  if ((c==81943)&&(levens==1266)&&(lodds==1260)&&(patcnt==320))  // p=44
		     goto zhop;
		  if ((c==83987)&&(levens==2261)&&(lodds==2373)&&(patcnt==543)) // p=42
		     goto zhop;
		  if ((c==84059)&&(levens==2667)&&(lodds==2621)&&(patcnt==670)) // p=40
		     goto zhop;
		  if ((c==84229)&&(levens==1413)&&(lodds==1475)&&(patcnt==357)) // p=40
		     goto zhop;
		  if ((c==84545)&&(levens==228)&&(lodds==228)&&(patcnt==59))  // p=42
		     goto zhop;
		  if ((c==84767)&&(levens==660)&&(lodds==732)&&(patcnt==166)) // p=41
		     goto zhop;
		  if ((c==86003)&&(levens==1772)&&(lodds==1768)&&(patcnt==446))  // p=41
		     goto zhop;
		  if ((c==86491)&&(levens==460)&&(lodds==470)&&(patcnt==113)) // p=40
		     goto zhop;
		  if ((c==86531)&&(levens==1933)&&(lodds==1907)&&(patcnt==477)) // p=41
		     goto zhop;
		  if ((c==86627)&&(levens==881)&&(lodds==919)&&(patcnt==224)) // p=40
		     goto zhop;
		  if ((c==86713)&&(levens==1130)&&(lodds==1150)&&(patcnt==295))  // p=41
		     goto zhop;
		  if ((c==86743)&&(levens==1221)&&(lodds==1226)&&(patcnt==294)) // p=42
		     goto zhop;
		  if ((c==86771)&&(levens==2062)&&(lodds==2170)&&(patcnt==504)) // p=41
		     goto zhop;
		  if ((c==87721)&&(levens==1438)&&(lodds==1449)&&(patcnt==359)) // p=41
		     goto zhop;
		  if ((c==88631)&&(levens==1039)&&(lodds==976)&&(patcnt==255)) // p=41
		     goto zhop;
		  if ((c==88661)&&(levens==372)&&(lodds==434)&&(patcnt==96)) // p=40
		     goto zhop;
		  if ((c==91339)&&(levens==492)&&(lodds==465)&&(patcnt==128)) // p=41
		     goto zhop;
		  if ((c==91397)&&(levens==1996)&&(lodds==1960)&&(patcnt==484)) // p=40
		     goto zhop;
		  if ((c==91861)&&(levens==322)&&(lodds==376)&&(patcnt==83)) // p=43
		     goto zhop;
		  if ((c==94597)&&(levens==570)&&(lodds==682)&&(patcnt==143))  // p=44
		     goto zhop;
		  if ((c==94843)&&(levens==1280)&&(lodds==1328)&&(patcnt==321)) // p=40
		     goto zhop;
		  if ((c==95171)&&(levens==822)&&(lodds==796)&&(patcnt==205)) // p=40
		     goto zhop;
		  if ((c==95393)&&(levens==513)&&(lodds==502)&&(patcnt==120)) // p=40
		     goto zhop;
		  if ((c==96029)&&(levens==2140)&&(lodds==2064)&&(patcnt==525)) // p=43
		     goto zhop;
		  if ((c==96563)&&(levens==580)&&(lodds==512)&&(patcnt==145)) // p=42
		     goto zhop;
		  if ((c==97217)&&(levens==1852)&&(lodds==1862)&&(patcnt==459)) // p=41
		     goto zhop;
		  if ((c==97307)&&(levens==1180)&&(lodds==1228)&&(patcnt==292)) // p=40
		     goto zhop;
		  if ((c==98189)&&(levens==1200)&&(lodds==1188)&&(patcnt==302)) // p=45
		     goto zhop;
		  if ((c==98201)&&(levens==1788)&&(lodds==1806)&&(patcnt==442)) // p=41
		     goto zhop;
		  if ((c==98585)&&(levens==424)&&(lodds==424)&&(patcnt==104)) // p=41
		     goto zhop;
		  if ((c==98815)&&(levens==1484)&&(lodds==1458)&&(patcnt==377)) // p=40
		     goto zhop;
		  if ((c==99233)&&(levens==956)&&(lodds==952)&&(patcnt==249)) // p=40
		     goto zhop;
		  goto zskip;
		  }
	       d0hist[jj+1]=d0hist[jj+1]+1;
	       break;
	       }
	    }
zhop:	 if (total==1) {
	    d=(double)MINTU[1]+(double)MINTU[0]*65536.0*65536.0;
	    dtemp=(double)MAXTU[1]+(double)MAXTU[0]*65536.0*65536.0;
//	    d=(double)mintu;
	    for (jj=0; jj<80; jj++) {
	       d=d*log(3)/log(2);
//	       if (d>(double)maxtu) {
	       if (d>dtemp) {
		  if ((jj+1)>39) {
		     printf("array not big enough (d1hist) \n");
		     goto zskip;
		     }
		  d1hist[jj+1]=d1hist[jj+1]+1;
		  break;
		  }
	       }
	    }
	 if (total==2) {
	    d=(double)MINTU[1]+(double)MINTU[0]*65536.0*65536.0;
	    dtemp=(double)MAXTU[1]+(double)MAXTU[0]*65536.0*65536.0;
//	    d=(double)mintu;
	    for (jj=0; jj<80; jj++) {
	       d=d*log(3)/log(2);
//	       if (d>(double)maxtu) {
	       if (d>dtemp) {
		  if ((jj+1)>39) {
		     printf("array not big enough (d2hist) \n");
		     goto zskip;
		     }
		  d2hist[jj+1]=d2hist[jj+1]+1;
		  break;
		  }
	       }
	    }
	 if (total==3) {
	    d=(double)MINTU[1]+(double)MINTU[0]*65536.0*65536.0;
	    dtemp=(double)MAXTU[1]+(double)MAXTU[0]*65536.0*65536.0;
//	    d=(double)mintu;
	    for (jj=0; jj<80; jj++) {
	       d=d*log(3)/log(2);
	       if (d>dtemp) {
//	       if (d>(double)maxtu) {
		  if ((jj+1)>39) {
		     printf("array not big enough (d3hist) \n");
		     goto zskip;
		     }
		  d3hist[jj+1]=d3hist[jj+1]+1;
		  break;
		  }
	       }
	    }
	 if (total==4) {
	    d=(double)MINTU[1]+(double)MINTU[0]*65536.0*65536.0;
	    dtemp=(double)MAXTU[1]+(double)MAXTU[0]*65536.0*65536.0;
//	    d=(double)mintu;
	    for (jj=0; jj<80; jj++) {
	       d=d*log(3)/log(2);
	       if (d>dtemp) {
//	       if (d>(double)maxtu) {
		  if ((jj+1)>39) {
		     printf("array not big enough (d4hist) \n");
		     goto zskip;
		     }
		  d4hist[jj+1]=d4hist[jj+1]+1;
		  break;
		  }
	       }
	    }
	 if (total==5) {
	    d=(double)MINTU[1]+(double)MINTU[0]*65536.0*65536.0;
	    dtemp=(double)MAXTU[1]+(double)MAXTU[0]*65536.0*65536.0;
//	    d=(double)mintu;
	    for (jj=0; jj<80; jj++) {
	       d=d*log(3)/log(2);
	       if (d>dtemp) {
//	       if (d>(double)maxtu) {
		  if ((jj+1)>39) {
		     printf("array not big enough (d5hist) \n");
		     goto zskip;
		     }
		  d5hist[jj+1]=d5hist[jj+1]+1;
		  break;
		  }
	       }
	    }
	 if (total==6) {
	    d=(double)MINTU[1]+(double)MINTU[0]*65536.0*65536.0;
	    dtemp=(double)MAXTU[1]+(double)MAXTU[0]*65536.0*65536.0;
//	    d=(double)mintu;
	    for (jj=0; jj<80; jj++) {
	       d=d*log(3)/log(2);
	       if (d>dtemp) {
//	       if (d>(double)maxtu) {
		  if ((jj+1)>39) {
		     printf("array not big enough (d6hist) \n");
		     goto zskip;
		     }
		  d6hist[jj+1]=d6hist[jj+1]+1;
		  break;
		  }
	       }
	    }
	 if (total==7) {
	    d=(double)MINTU[1]+(double)MINTU[0]*65536.0*65536.0;
	    dtemp=(double)MAXTU[1]+(double)MAXTU[0]*65536.0*65536.0;
//	    d=(double)mintu;
	    for (jj=0; jj<80; jj++) {
	       d=d*log(3)/log(2);
	       if (d>dtemp) {
//	       if (d>(double)maxtu) {
		  if ((jj+1)>39) {
		     printf("array not big enough (d7hist) \n");
		     goto zskip;
		     }
		  d7hist[jj+1]=d7hist[jj+1]+1;
		  break;
		  }
	       }
	    }
	 if (total==8) {
	    d=(double)MINTU[1]+(double)MINTU[0]*65536.0*65536.0;
	    dtemp=(double)MAXTU[1]+(double)MAXTU[0]*65536.0*65536.0;
//	    d=(double)mintu;
	    for (jj=0; jj<80; jj++) {
	       d=d*log(3)/log(2);
	       if (d>dtemp) {
//	       if (d>(double)maxtu) {
		  if ((jj+1)>39) {
		     printf("array not big enough (d8hist) \n");
		     goto zskip;
		     }
		  d8hist[jj+1]=d8hist[jj+1]+1;
		  break;
		  }
	       }
	    }
	 if (total==9) {
	    d=(double)MINTU[1]+(double)MINTU[0]*65536.0*65536.0;
	    dtemp=(double)MAXTU[1]+(double)MAXTU[0]*65536.0*65536.0;
//	    d=(double)mintu;
	    for (jj=0; jj<80; jj++) {
	       d=d*log(3)/log(2);
	       if (d>dtemp) {
//	       if (d>(double)maxtu) {
		  if ((jj+1)>39) {
		     printf("array not big enough (d9hist) \n");
		     goto zskip;
		     }
		  d9hist[jj+1]=d9hist[jj+1]+1;
		  break;
		  }
	       }
	    }
	 if (total==10) {
	    d=(double)MINTU[1]+(double)MINTU[0]*65536.0*65536.0;
	    dtemp=(double)MAXTU[1]+(double)MAXTU[0]*65536.0*65536.0;
//	    d=(double)mintu;
	    for (jj=0; jj<80; jj++) {
	       d=d*log(3)/log(2);
	       if (d>dtemp) {
//	       if (d>(double)maxtu) {
		  if ((jj+1)>39) {
		     printf("array not big enough (d10hist) \n");
		     goto zskip;
		     }
		  d10hist[jj+1]=d10hist[jj+1]+1;
		  break;
		  }
	       }
	    }
//
//  histogram of powers for parity vector p, max/min
//
	 if (lodds>levens) {
	    if ((flag15!=0)||(euclid(lodds,levens)==1)) {
	       for (g=0; g<5000; g++) {
		  if (((levens+lodds)==(ln[g]>>16))&&(lodds==(ln[g]&0xffff)))	 {
//		     d=(double)mintu;
		     d=(double)MINTU[1]+(double)MINTU[0]*65536.0*65536.0;
		     dtemp=(double)MAXTU[1]+(double)MAXTU[0]*65536.0*65536.0;
		     for (jj=0; jj<80; jj++) {
			d=d*log(3)/log(2);
//			if (d>(double)maxtu) {
			if (d>dtemp) {
			   if (((jj+1)>(total*2+7))&&(flag15==0)) {
			      printf("exception: c=%d, e=%d, o=%d, power=%d, max=%d, min=%d, a=%d \n",c,levens,lodds,jj+1,MAXTU[1],MINTU[1],total);
			      goto zskip;
			      }
			   if (((jj+1)>(total*2+14))&&(flag15==1)) {
			      printf("exception: c=%d, e=%d, o=%d, power=%d, max=%d, min=%d, a=%d \n",c,levens,lodds,jj+1,MAXTU[1],MINTU[1],total);
			      goto zskip;
			      }
			   if ((jj+1+20)<total*2) {
			      printf("error: count=%d, total=%d \n",jj+1,total);
			      printf("c=%d, e=%d, o=%d, a=%d, max=%d, min=%d, s=%#010x, flag=%d \n",c,levens,lodds,patcnt,MAXTU[1],MINTU[1],ES[i*2+1],cflag[index+i]);
			      if (eowrite==0) {
				 fprintf(Outfp,"error: count=%d, total=%d \n",jj+1,total);
				 fprintf(Outfp,"c=%d, e=%d, o=%d, a=%d, max=%d, min=%d \n",c,levens,lodds,patcnt,MAXTU[1],MINTU[1]);
				 }
			      if ((c==39263)&&(levens==60)&&(lodds==102)&&(patcnt==18))
				 goto xjump;
			      if ((c==41807)&&(levens==66)&&(lodds==113)&&(patcnt==16))
				 goto xjump;
			      if ((c==72089)&&(levens==56)&&(lodds==96)&&(patcnt==17))
				 goto xjump;
			      goto zskip;
			      }
			   chhist[jj+21-total*2]=chhist[jj+21-total*2]+1;
			   goto xjump;
			   }
			}
		     }
		  if (lodds<(ln[g]&0xffff))
		     break;
		  }
	       }
	    }
//
//  histogram of powers for parity vector p, lambda/min
//
xjump:	 d=log(3)/log(2);
	 d=exp((double)(total+3)*log(d));
	 dtemp=(double)MINTU[1]+(double)MINTU[0]*65536.0*65536.0;
//	 if (d<((double)lambda/mintu)) {
	 if (d<(lambda/dtemp)) {
	    if (lodds>levens) {
	       if (euclid(lodds,levens)==1) {
		  for (g=0; g<5000; g++) {
		     if (((levens+lodds)==(ln[g]>>16))&&(lodds==(ln[g]&0xffff))) {
			flubx=flubx+1;
//			d=(double)lambda/d/mintu;
			d=lambda/d/dtemp;
			if (d>maxdiff)
			   maxdiff=d;
			printf("error 14: d=%e, max=%d, min=%d, lambda=%e, total=%d, c=%d, e=%d, o=%d \n",d,maxtu,mintu,lambda,total,c,levens,lodds);
			fprintf(Outfp,"error 14: d=%e, max=%d, min=%d, lambda=%e, total=%d, c=%d, e=%d, o=%d \n",d,maxtu,mintu,lambda,total,c,levens,lodds);
			goto pjump;
			}
		     if (lodds<(ln[g]&0xffff))
			break;
		     }
		  }
	       }
	    flubs=flubs+1;
	    }
//
//  max*min/lambda^2
//
pjump:	 dtemp=(double)MAXTU[1]+(double)MAXTU[0]*65536.0*65536.0;
	 etemp=(double)MINTU[1]+(double)MINTU[0]*65536.0*65536.0;
	 d=dtemp*etemp/lambda/lambda;
//	 d=(double)maxtu*(double)mintu/lambda/lambda;
	 if (d>log(3.0)/log(2.0)) {
	    printf("error tu: d=%e, %#010x, %#010x, %#010x, %#010x, a=%d \n",d,MAXTU[0],MAXTU[1],MINTU[0],MINTU[1],patcnt);
	    printf("c=%d, e=%d, o=%d \n",c,levens,lodds);
	    if (eowrite==0) {
	       fprintf(Outfp,"error tu: d=%e, %#010x, %#010x, %#010x, %#010x, a=%d \n",d,MAXTU[0],MAXTU[1],MINTU[0],MINTU[1],patcnt);
	       fprintf(Outfp,"c=%d, e=%d, o=%d \n",c,levens,lodds);
	       }
	    if ((c==12649)&&(levens==30)&&(lodds==18)&&(patcnt==10))
	       goto hhop;
	    if ((c==14543)&&(levens==23)&&(lodds==15)&&(patcnt==5))
	       goto hhop;
	    if ((c==15857)&&(levens==16)&&(lodds==12)&&(patcnt==5))
	       goto hhop;
	    if ((c==17351)&&(levens==34)&&(lodds==37)&&(patcnt==9))
	       goto hhop;
	    if ((c==18571)&&(levens==14)&&(lodds==14)&&(patcnt==5))
	       goto hhop;
	    if ((c==20885)&&(levens==16)&&(lodds==8)&&(patcnt==5))
	       goto hhop;
	    if ((c==21577)&&(levens==31)&&(lodds==31)&&(patcnt==7))
	       goto hhop;
	    if ((c==23159)&&(levens==19)&&(lodds==15)&&(patcnt==7))
	       goto hhop;
	    if ((c==27479)&&(levens==12)&&(lodds==7)&&(patcnt==4))
	       goto hhop;
	    if ((c==28667)&&(levens==19)&&(lodds==21)&&(patcnt==6))
	       goto hhop;
	    if ((c==30241)&&(levens==21)&&(lodds==14)&&(patcnt==6))
	       goto hhop;
	    if ((c==34435)&&(levens==30)&&(lodds==23)&&(patcnt==8))
	       goto hhop;
	    if ((c==35587)&&(levens==42)&&(lodds==41)&&(patcnt==11))
	       goto hhop;
	    if ((c==36601)&&(levens==37)&&(lodds==34)&&(patcnt==7))
	       goto hhop;
	    if ((c==36661)&&(levens==15)&&(lodds==15)&&(patcnt==4))
	       goto hhop;
	    if ((c==39409)&&(levens==17)&&(lodds==29)&&(patcnt==6))
	       goto hhop;
	    if ((c==38701)&&(levens==15)&&(lodds==9)&&(patcnt==6))
	       goto hhop;
	    if ((c==40549)&&(levens==18)&&(lodds==12)&&(patcnt==6))
	       goto hhop;
	    if ((c==43529)&&(levens==12)&&(lodds==10)&&(patcnt==5))
	       goto hhop;
	    if ((c==49393)&&(levens==21)&&(lodds==14)&&(patcnt==7))
	       goto hhop;
	    if ((c==52283)&&(levens==12)&&(lodds==6)&&(patcnt==4))
	       goto hhop;
	    if ((c==59899)&&(levens==18)&&(lodds==12)&&(patcnt==5))
	       goto hhop;
	    if ((c==61789)&&(levens==24)&&(lodds==12)&&(patcnt==7))
	       goto hhop;
	    if ((c==65041)&&(levens==24)&&(lodds==24)&&(patcnt==6))
	       goto hhop;
	    if ((c==72097)&&(levens==16)&&(lodds==16)&&(patcnt==5))
	       goto hhop;
	    if ((c==72943)&&(levens==30)&&(lodds==30)&&(patcnt==10))
	       goto hhop;
	    if ((c==73177)&&(levens==15)&&(lodds==9)&&(patcnt==5))
	       goto hhop;
	    if ((c==80155)&&(levens==12)&&(lodds==8)&&(patcnt==4))
	       goto hhop;
	    if ((c==81631)&&(levens==40)&&(lodds==40)&&(patcnt==10))
	       goto hhop;
	    if ((c==86731)&&(levens==28)&&(lodds==21)&&(patcnt==7))
	       goto hhop;
	    if ((c==86731)&&(levens==28)&&(lodds==21)&&(patcnt==9))
	       goto hhop;
	    if ((c==87551)&&(levens==16)&&(lodds==11)&&(patcnt==5))
	       goto hhop;
	    if ((c==88325)&&(levens==36)&&(lodds==26)&&(patcnt==8))
	       goto hhop;
	    if ((c==84175)&&(levens==12)&&(lodds==12)&&(patcnt==3))
	       goto hhop;
	    if ((c==97471)&&(levens==20)&&(lodds==20)&&(patcnt==5))
	       goto hhop;
	    if ((c==99157)&&(levens==15)&&(lodds==9)&&(patcnt==4))
	       goto hhop;
	    goto zskip;
	    }
hhop:	 if (d>1.0)
	    lamcnt=lamcnt+1;
	 if (d>maxminrat) {
	    maxminrat=d;
	    savec=c;
	    ksave=s[i];
	    KSAVE[0]=ES[2*i];
	    KSAVE[1]=ES[2*i+1];
	    }
	 if (d<minmaxrat) {
	    minmaxrat=d;
	    savecp=c;
	    ksavep=s[i];
	    KSAVEP[0]=ES[2*i];
	    KSAVEP[1]=ES[2*i+1];
	    }
	 dtemp=(double)MAXU[1]+(double)MAXU[0]*65536.0*65536.0;
	 etemp=(double)MINU[1]+(double)MINU[0]*65536.0*65536.0;
//	 d=(double)maxu*(double)minu/lambdau/lambdau;
	 d=dtemp*etemp/lambdau/lambdau;
	 if (d>log(3.0)/log(2.0)) {
	    printf("error u: d=%e, maxu=%d, minu=%d, lambda=%e \n",d,MAXU[1],MINU[1],lambdau);
	    printf("c=%d, e=%d, o=%d, a=%d \n",c,levens,lodds,patcnt);
	    if (eowrite==0) {
	       fprintf(Outfp,"error u: d=%e, maxu=%d, minu=%d, lambda=%e \n",d,MAXU[1],MINU[1],lambdau);
	       fprintf(Outfp,"c=%d, e=%d, o=%d, a=%d \n",c,levens,lodds,patcnt);
	       }
	    if ((c==10075)&&(levens==60)&&(lodds==60)&&(patcnt==14))
	       goto dhop;
	    if ((c==1421)&&(levens==28)&&(lodds==28)&&(patcnt==8))
	       goto dhop;
	    if ((c==4405)&&(levens==20)&&(lodds==16)&&(patcnt==6))
	       goto dhop;
	    if ((c==23623)&&(levens==63)&&(lodds==66)&&(patcnt==18))
	       goto dhop;
	    if ((c==23725)&&(levens==36)&&(lodds==36)&&(patcnt==8))
	       goto dhop;
	    if ((c==27623)&&(levens==66)&&(lodds==77)&&(patcnt==17))
	       goto dhop;
	    if ((c==31909)&&(levens==108)&&(lodds==88)&&(patcnt==29))
	       goto dhop;
	    if ((c==32021)&&(levens==40)&&(lodds==40)&&(patcnt==10))
	       goto dhop;
	    if ((c==32137)&&(levens==27)&&(lodds==24)&&(patcnt==10))
	       goto dhop;
	    if ((c==34435)&&(levens==30)&&(lodds==23)&&(patcnt==10))
	       goto dhop;
	    if ((c==36173)&&(levens==40)&&(lodds==32)&&(patcnt==14))
	       goto dhop;
	    if ((c==38497)&&(levens==84)&&(lodds==88)&&(patcnt==23))
	       goto dhop;
	    if ((c==39931)&&(levens==46)&&(lodds==32)&&(patcnt==14))
	       goto dhop;
	    if ((c==42191)&&(levens==35)&&(lodds==30)&&(patcnt==10))
	       goto dhop;
	    if ((c==42217)&&(levens==36)&&(lodds==36)&&(patcnt==10))
	       goto dhop;
	    if ((c==43225)&&(levens==36)&&(lodds==36)&&(patcnt==11))
	       goto dhop;
	    if ((c==44099)&&(levens==126)&&(lodds==138)&&(patcnt==33))
	       goto dhop;
	    if ((c==48337)&&(levens==69)&&(lodds==63)&&(patcnt==18))
	       goto dhop;
	    if ((c==50221)&&(levens==46)&&(lodds==58)&&(patcnt==10))
	       goto dhop;
	    if ((c==57137)&&(levens==27)&&(lodds==30)&&(patcnt==10))
	       goto dhop;
	    if ((c==57337)&&(levens==70)&&(lodds==70)&&(patcnt==20))
	       goto dhop;
	    if ((c==57385)&&(levens==92)&&(lodds==98)&&(patcnt==28))
	       goto dhop;
	    if ((c==59899)&&(levens==18)&&(lodds==12)&&(patcnt==7))
	       goto dhop;
	    if ((c==63349)&&(levens==72)&&(lodds==56)&&(patcnt==27))
	       goto dhop;
	    if ((c==64297)&&(levens==36)&&(lodds==32)&&(patcnt==9))
	       goto dhop;
	    if ((c==68285)&&(levens==48)&&(lodds==36)&&(patcnt==15))
	       goto dhop;
	    if ((c==68411)&&(levens==56)&&(lodds==56)&&(patcnt==17))
	       goto dhop;
	    if ((c==68495)&&(levens==36)&&(lodds==30)&&(patcnt==12))
	       goto dhop;
	    if ((c==71521)&&(levens==69)&&(lodds==69)&&(patcnt==16))
	       goto dhop;
	    if ((c==72851)&&(levens==38)&&(lodds==42)&&(patcnt==10))
	       goto dhop;
	    if ((c==73667)&&(levens==30)&&(lodds==30)&&(patcnt==9))
	       goto dhop;
	    if ((c==76397)&&(levens==52)&&(lodds==55)&&(patcnt==15))
	       goto dhop;
	    if ((c==83293)&&(levens==36)&&(lodds==36)&&(patcnt==11))
	       goto dhop;
	    if ((c==91309)&&(levens==53)&&(lodds==65)&&(patcnt==13))
	       goto dhop;
	    if ((c==92689)&&(levens==41)&&(lodds==47)&&(patcnt==9))
	       goto dhop;
	    if ((c==93605)&&(levens==48)&&(lodds==48)&&(patcnt==12))
	       goto dhop;
	    if ((c==98161)&&(levens==42)&&(lodds==42)&&(patcnt==13))
	       goto dhop;
	    goto zskip;
	    }
dhop:	 dtemp=(double)MAXT[1]+(double)MAXT[0]*65536.0*65536.0;
	 etemp=(double)MINT[1]+(double)MINT[0]*65536.0*65536.0;
//	 d=(double)maxt*(double)mint/lambdat/lambdat;
	 d=dtemp*etemp/lambdat/lambdat;
	 if (d>log(3.0)/log(2.0)) {
	    printf("error t: d=%e, lambdat=%e, maxt=%d, mint=%d, a=%d \n",d,lambdat,MAXT[1],MINT[1],patcnt);
	    printf("c=%d, e=%d, o=%d \n",c,levens,lodds);
	    if (eowrite==0) {
	       fprintf(Outfp,"error t: d=%e, lambdat=%e, maxt=%d, mint=%d, a=%d \n",d,lambdat,MAXT[1],MINT[1],patcnt);
	       fprintf(Outfp,"c=%d, e=%d, o=%d \n",c,levens,lodds);
	       }
	    if ((c==8213)&&(levens==22)&&(lodds==24)&&(patcnt==8))
	       goto ehop;
	    if ((c==12961)&&(levens==42)&&(lodds==18)&&(patcnt==11))
	       goto ehop;
	    if ((c==17569)&&(levens==68)&&(lodds==67)&&(patcnt==18))
	       goto ehop;
	    if ((c==26285)&&(levens==40)&&(lodds==34)&&(patcnt==10))
	       goto ehop;
	    if ((c==29441)&&(levens==142)&&(lodds==126)&&(patcnt==38))
	       goto ehop;
	    if ((c==30581)&&(levens==40)&&(lodds==35)&&(patcnt==11))
	       goto ehop;
	    if ((c==30667)&&(levens==24)&&(lodds==24)&&(patcnt==7))
	       goto ehop;
	    if ((c==31493)&&(levens==52)&&(lodds==46)&&(patcnt==15))
	       goto ehop;
	    if ((c==48545)&&(levens==72)&&(lodds==72)&&(patcnt==17))
	       goto ehop;
	    if ((c==52195)&&(levens==24)&&(lodds==12)&&(patcnt==6))
	       goto ehop;
	    if ((c==56303)&&(levens==30)&&(lodds==30)&&(patcnt==10))
	       goto ehop;
	    if ((c==56881)&&(levens==44)&&(lodds==22)&&(patcnt==11))
	       goto ehop;
	    if ((c==61789)&&(levens==24)&&(lodds==12)&&(patcnt==6))
	       goto ehop;
	    if ((c==62027)&&(levens==20)&&(lodds==20)&&(patcnt==7))
	       goto ehop;
	    if ((c==62849)&&(levens==216)&&(lodds==208)&&(patcnt==59))
	       goto ehop;
	    if ((c==69139)&&(levens==26)&&(lodds==20)&&(patcnt==8))
	       goto ehop;
	    if ((c==73891)&&(levens==54)&&(lodds==42)&&(patcnt==14))
	       goto ehop;
	    if ((c==85879)&&(levens==78)&&(lodds==78)&&(patcnt==21))
	       goto ehop;
	    if ((c==86491)&&(levens==46)&&(lodds==47)&&(patcnt==10))
	       goto ehop;
	    if ((c==93649)&&(levens==35)&&(lodds==42)&&(patcnt==8))
	       goto ehop;
	    if ((c==93671)&&(levens==33)&&(lodds==21)&&(patcnt==8))
	       goto ehop;
	    if ((c==94939)&&(levens==48)&&(lodds==36)&&(patcnt==12))
	       goto ehop;
	    goto zskip;
	    }
//
// c/X0 > |2^((K+L)/K)-3|
//
ehop:	 d=exp((double)(levens+lodds)/(double)lodds*log(2.0));
	 d=d-3.0;
	 tempf=d;
	 if (d<0.0)
	    d=-d;
	 dtemp=(double)MINTU[1]+(double)MINTU[0]*65536.0*65536.0;
//	 if (((double)c/d)<=(double)mintu) {
	 if (((double)c/d)<=dtemp) {
	    if (eowrite==0) {
	       printf("error 15: d=%e, mintu=%d, c=%d, e=%d, o=%d, a=%d, s=%d \n",d,mintu,c,levens,lodds,total,s[i]);
	       fprintf(Outfp,"error 15: d=%e, mintu=%d, c=%d, e=%d, o=%d, a=%d, s=%d \n",d,mintu,c,levens,lodds,total,s[i]);
	       }
	    }
//
//  |1-c/X0| > |2^((K+L)/K)-3| (parity vector p, continued-fraction conv., etc.
//
//	 dmin=1.0-(double)c/(double)mintu;
	 dmin=1.0-(double)c/(double)dtemp;
	 if (dmin<0.0)
	    dmin=-dmin;
	 if (dmin<=d) {
	    if (lodds>levens) {
	       for (g=0; g<5000; g++) {
		  if (((levens+lodds)==(ln[g]>>16))&&(lodds==(ln[g]&0xffff))) {
		     printf("error 16: d=%e, dmin=%e, mintu=%d, c=%d, e=%d, o=%d, a=%d \n",d,dmin,mintu,c,levens,lodds,total);
		     fprintf(Outfp,"error 16: d=%e, dmin=%e, mintu=%d, c=%d, e=%d, o=%d, a=%d \n",d,dmin,mintu,c,levens,lodds,total);
		     if ((c==1631)&&(levens==5)&&(lodds==8)&&(total==2))
			goto ihop;
		     if ((c==36791)&&(levens==15)&&(lodds==25)&&(total==3))
			goto ihop;
		     if ((c==36791)&&(levens==15)&&(lodds==25)&&(total==4))
			goto ihop;
		     goto zskip;
		     }
		  if (lodds<(ln[g]&0xffff))
		     break;
		  }
	       }
ihop:	    for (g=0; g<75; g++) {
	       if ((conv[2*g]==(levens+lodds))&&(conv[2*g+1]==lodds)) {
		  printf("error 17: d=%e, dmin=%e, mintu=%d, c=%d, e=%d, o=%d, a=%d \n",d,dmin,mintu,c,levens,lodds,total);
		  fprintf(Outfp,"error 17: d=%e, dmin=%e, mintu=%d, c=%d, e=%d, o=%d, a=%d \n",d,dmin,mintu,c,levens,lodds,total);
		  goto zskip;
		  }
	       }
	    if ((tempf<0.0)&&(eowrite==0)) {
	       printf("error 1: d=%e, dmin=%e, mintu=%d, c=%d, e=%d, o=%d, a=%d \n",d,dmin,mintu,c,levens,lodds,total);
	       fprintf(Outfp,"error 1: d=%e, dmin=%e, mintu=%d, c=%d, e=%d, o=%d, a=%d \n",d,dmin,mintu,c,levens,lodds,total);
	       }
	    if ((total!=1)&&(eowrite==0)) {
	       printf("error 2: d=%e, dmin=%e, mintu=%d, c=%d, e=%d, o=%d, a=%d \n",d,dmin,mintu,c,levens,lodds,total);
	       fprintf(Outfp,"error 2: d=%e, dmin=%e, mintu=%d, c=%d, e=%d, o=%d, a=%d \n",d,dmin,mintu,c,levens,lodds,total);
	       }
	    else
	       onecnt=onecnt+1;
	    }
//
	 dmin=1000000.0;
	 dmax=-1000000.0;
	 for (g=0; g<total*2; g++) {
//	    d=-log((double)stu[g]/lambda)/lambda;
	    dtemp=(double)STU[2*g+1]+(double)STU[2*g]*65536.0*65536.0;
	    d=-log(dtemp/lambda)/lambda;
	    if (d<dmin)
	       dmin=d;
	    if (d>dmax)
	       dmax=d;
	    }
	 del=dmax-dmin;
	 if (del>maxdel) {
	    maxdel=del;
	    cmax=c;
	    }
	 if (del<mindel) {
	    mindel=del;
	    cmin=c;
	    }
	 if (wflag==0) {
	    printf("lambda=%e, min=%e, max=%e, del=%e \n",lambda,dmin,dmax,del);
	    fprintf(Outfp,"lambda=%e, min=%e, max=%e, del=%e \n",lambda,dmin,dmax,del);
	    }
	 lambda=(double)sumtuc/(double)(total*2);
	 d=(double)maxtuc*(double)mintuc/lambda/lambda;
	 if (d>1)
	    lamcntc=lamcntc+1;
	 if (d>maxminratc)
	    maxminratc=d;
	 if (d<minmaxratc)
	    minmaxratc=d;
	 sumtu=0;
	 SUMTU[0]=0;
	 SUMTU[1]=0;
	 sumt=0;
	 SUMT[0]=0;
	 SUMT[1]=0;
	 sumu=0;
	 SUMU[0]=0;
	 SUMU[1]=0;
	 sumtuc=0;
	 maxtu=0;
	 MAXTU[0]=0;
	 MAXTU[1]=0;
	 maxt=0;
	 MAXT[0]=0;
	 MAXT[1]=0;
	 maxu=0;
	 MAXU[0]=0;
	 MAXU[1]=0;
	 mintu=1000000000;
	 MINTU[0]=0x7fffffff;
	 MINTU[1]=0xffffffff;
	 mint=1000000000;
	 MINT[0]=0x7fffffff;
	 MINT[1]=0xffffffff;
	 minu=1000000000;
	 MINU[0]=0x7fffffff;
	 MINU[1]=0xffffffff;
	 kk=0;
	 maxtuc=0;
	 mintuc=1000000000;
	 total=0;
	 olds=0;
	 OLDS[0]=0;
	 OLDS[1]=0;
	 cyccnt=cyccnt+1;
//
	 sumrec=sumrec*(double)c;
	 tempf=(double)(levens+lodds)*log(2)-(double)(lodds)*log(3);
	 if ((wflag==1)&&(eowrite==0)) {
	    printf("c=%d, e=%d, o=%d, sum=%e, tempf=%e, osum=%d, esum=%d, jsum=%d, hsum=%d \n",c,levens,lodds,sumrec,tempf,oddsum,evensum,jsum,hcount);
	    fprintf(Outfp,"c=%d, e=%d, o=%d, sum=%e, tempf=%e, osum=%d, esum=%d, jsum=%d, hsum=%d \n",c,levens,lodds,sumrec,tempf,oddsum,evensum,jsum,hcount);
	    }
	 if (tempf<0.0)
	    tempf=-tempf;
	 if (tempf>(sumrec*3.0)) {
	    printf("error: delta greater than sum of reciprocals,sumrec=%e \n",sumrec);
	    printf("c=%d, e=%d, o=%d, a=%d \n",c,levens,lodds,patcnt);
	    if (eowrite==0) {
	       fprintf(Outfp,"error: delta greater than sum of reciprocals \n");
	       fprintf(Outfp,"a=%d, s=%d \n",patcnt,s[i]);
	       }
	    if ((c==2761)&&(levens==15)&&(lodds==25)&&(patcnt==1))
	       goto mohop;
	    if ((c==3013)&&(levens==14)&&(lodds=24)&&(patcnt==1))
	       goto mohop;
	    if ((c==4513)&&(levens==12)&&(lodds=32)&&(patcnt==1))
	       goto mohop;
	    if ((c==7645)&&(levens==16)&&(lodds==28)&&(patcnt==1))
	       goto mohop;
	    if ((c==8059)&&(levens==14)&&(lodds==24)&&(patcnt==2))
	       goto mohop;
	    if ((c==8059)&&(levens==14)&&(lodds==24)&&(patcnt==1))
	       goto mohop;
	    if ((c==10703)&&(levens==8)&&(lodds==14)&&(patcnt==1))
	       goto mohop;
	    if ((c==14303)&&(levens==10)&&(lodds==17)&&(patcnt==1))
	       goto mohop;
	    if ((c==14819)&&(levens==12)&&(lodds==24)&&(patcnt==1))
	       goto mohop;
	    if ((c==16589)&&(levens==8)&&(lodds==20)&&(patcnt==1))
	       goto mohop;
	    if ((c==16819)&&(levens==16)&&(lodds==28)&&(patcnt==1))
	       goto mohop;
	    if ((c==16819)&&(levens==8)&&(lodds==14)&&(patcnt==1))
	       goto mohop;
	    if ((c==17231)&&(levens==13)&&(lodds==20)&&(patcnt==1))
	       goto mohop;
	    if ((c==22897)&&(levens==15)&&(lodds==30)&&(patcnt==1))
	       goto mohop;
	    if ((c==27313)&&(levens==15)&&(lodds==25)&&(patcnt==1))
	       goto mohop;
	    if ((c==27521)&&(levens==12)&&(lodds==24)&&(patcnt==1))
	       goto mohop;
	    if ((c==27875)&&(levens==8)&&(lodds==18)&&(patcnt==1))
	       goto mohop;
	    if ((c==32435)&&(levens==12)&&(lodds==20)&&(patcnt==1))
	       goto mohop;
	    if ((c==33587)&&(levens==13)&&(lodds==21)&&(patcnt==1))
	       goto mohop;
	    if ((c==34669)&&(levens==10)&&(lodds==22)&&(patcnt==2))
	       goto mohop;
	    if ((c==36067)&&(levens==10)&&(lodds==18)&&(patcnt==1))
	       goto mohop;
	    if ((c==38311)&&(levens==12)&&(lodds==24)&&(patcnt==1))
	       goto mohop;
	    if ((c==39409)&&(levens==17)&&(lodds==29)&&(patcnt==2))
	       goto mohop;
	    if ((c==40741)&&(levens==14)&&(lodds==24)&&(patcnt==1))
	       goto mohop;
	    if ((c==40741)&&(levens==14)&&(lodds==24)&&(patcnt==2))
	       goto mohop;
	    if ((c==41983)&&(levens==8)&&(lodds==22)&&(patcnt==1))
	       goto mohop;
	    if ((c==46075)&&(levens==18)&&(lodds==33)&&(patcnt==1))
	       goto mohop;
	    if ((c==47941)&&(levens==15)&&(lodds==25)&&(patcnt==1))
	       goto mohop;
	    if ((c==49787)&&(levens==9)&&(lodds==19)&&(patcnt==1))
	       goto mohop;
	    if ((c==50071)&&(levens==21)&&(lodds==36)&&(patcnt==2))
	       goto mohop;
	    if ((c==53515)&&(levens==8)&&(lodds==14)&&(patcnt==1))
	       goto mohop;
	    if ((c==64679)&&(levens==7)&&(lodds==15)&&(patcnt==1))
	       goto mohop;
	    if ((c==65627)&&(levens==12)&&(lodds==24)&&(patcnt==1))
	       goto mohop;
	    if ((c==71515)&&(levens==10)&&(lodds==17)&&(patcnt==1))
	       goto mohop;
	    if ((c==71515)&&(levens==20)&&(lodds==34)&&(patcnt==2))
	       goto mohop;
	    if ((c==73013)&&(levens==20)&&(lodds==34)&&(patcnt==2))
	       goto mohop;
	    if ((c==75325)&&(levens==28)&&(lodds==48)&&(patcnt==4))
	       goto mohop;
	    if ((c==77569)&&(levens==15)&&(lodds==24)&&(patcnt==1))
	       goto mohop;
	    if ((c==79079)&&(levens==6)&&(lodds==18)&&(patcnt==1))
	       goto mohop;
	    if ((c==81059)&&(levens==23)&&(lodds==39)&&(patcnt==3))
	       goto mohop;
	    if ((c==81809)&&(levens==12)&&(lodds==24)&&(patcnt==1))
	       goto mohop;
	    if ((c==82945)&&(levens==8)&&(lodds==20)&&(patcnt==1))
	       goto mohop;
	    if ((c==84095)&&(levens==8)&&(lodds==14)&&(patcnt==1))
	       goto mohop;
	    if ((c==85463)&&(levens==12)&&(lodds==24)&&(patcnt==1))
	       goto mohop;
	    if ((c==87391)&&(levens==35)&&(lodds==60)&&(patcnt==4))
	       goto mohop;
	    if ((c==89411)&&(levens==8)&&(lodds==20)&&(patcnt==1))
	       goto mohop;
	    if ((c==91057)&&(levens==19)&&(lodds==31)&&(patcnt==3))
	       goto mohop;
	    if ((c==91057)&&(levens==19)&&(lodds==31)&&(patcnt==1))
	       goto mohop;
	    if ((c==91817)&&(levens==10)&&(lodds==20)&&(patcnt==1))
	       goto mohop;
	    goto zskip;
	    }
mohop:	 sumrec=0.0;
//
	 dtemp=(double)OLDT[1]+(double)OLDT[0]*65536.0*65536.0;
//	 if (savchain<oldt) {
	 if (savchain<dtemp) {
	    if ((wflag!=2)&&(eowrite==0)) {
	       printf("error: bad t chain (wrap-around), c=%d \n",c);
	       printf("chain=%e, oldt=%#010x %#010x, t=%#010x %#010x, jump=%d, count=%d, s=%#010x %#010x \n",savchain,OLDT[0],OLDT[1],SAVET[0],SAVET[1],savjump,savcnt,ES[2*i],ES[2*i+1]);
	       fprintf(Outfp,"error: bad t chain (wrap-around), c=%d \n",c);
	       fprintf(Outfp,"chain=%e, oldt=%#010x %#010x, t=%#010x %#010x, jump=%d, count=%d, s=%#010x %#010x \n",savchain,OLDT[0],OLDT[1],SAVET[0],SAVET[1],savjump,savcnt,ES[2*i],ES[2*i+1]);
	       }
	    badcnt=badcnt+1;
	    }
	 oldt=0;
	 OLDT[0]=0;
	 OLDT[1]=0;
	 lastt=0;
	 LASTT[0]=0;
	 LASTT[1]=0;
	 firstt=1;
	 oldchn=65536.0*65536.0*65536.0;
	 oldu=0;
//
	 delta=oddsum-jmpsum+hcount-evensum+offset11;
	 if (delta<0) {
	    printf("error: offset not big enough (histoh), d=%d \n",delta);
	    goto zskip;
	    }
	 if (delta>499) {
	    printf("error: histogram array not big enough (histoh)\n");
	    goto zskip;
	    }
	 histoh[delta]=histoh[delta]+1;
	 if (wflag==0) {
	    if ((oddsum+hcount+2)<evensum) {
	       printf("warning: oddsum=%d, hcount=%d, evensum=%d \n",oddsum,hcount,evensum);
	       fprintf(Outfp,"warning: oddsum=%d, hcount=%d, evensum=%d \n",oddsum,hcount,evensum);
	       }
	    }
//
	 delta=hcount-jmpsum+offset8;
	 if (delta<0) {
	    printf("error: offset not big enough (histow), delta=%d \n",delta);
	    goto zskip;
	    }
	 if (delta>499) {
	    printf("error: histogram array not big enough (histow) \n");
	    goto zskip;
	    }
	 histow[delta]=histow[delta]+1;
//
	 delta=jsum-evensum+offset9;
	 if (flag13!=0) {
	    for (ii=0; ii<5000; ii++) {
	       if (lodds<=(ln[ii]&0xffff)) {
		  if (flag14==0) {
		     if ((lodds==(ln[ii]&0xffff))||(lodds==1))
			levenpm=(ln[ii]>>16)-(ln[ii]&0xffff);
		     else
			levenpm=(ln[ii-1]>>16)-(ln[ii-1]&0xffff);
		     levenpp=levenpm;
		     }
		  if (flag14==1) {
		     levenpp=(ln[ii]>>16)-(ln[ii]&0xffff);
		     levenpm=levenpp;
		     }
		  if (flag14==2) {
		     if ((lodds==(ln[ii]&0xffff))||(lodds==1))
			levenpm=(ln[ii]>>16)-(ln[ii]&0xffff);
		     else
			levenpm=(ln[ii-1]>>16)-(ln[ii-1]&0xffff);
		     levenpp=(ln[ii]>>16)-(ln[ii]&0xffff);
		     }
		  deltaef=((double)levenpm+(double)levenpp)/2.0-(double)levens;
		  if (deltaef<0.0)
		     deltaef=-deltaef;
		  delta=delta+(int)(deltaef/rat);
		  break;
		  }
	       }
	    }
	 if (delta<0) {
	    printf("error: offset not big enough (histov), jsum=%d, delta=%d \n",jsum,delta);
	    goto zskip;
	    }
	 if (delta>1499) {
	    printf("error: histogram array not big enough (histov) \n");
	    goto zskip;
	    }
	 histov[delta]=histov[delta]+1;
//
	 for (tempi=0; tempi<75; tempi++) {
	    if ((conv[2*tempi]==(levens+lodds))&&(conv[2*tempi+1]==lodds)) {
	       delta=jsum-evensum+offset4;
	       if (delta<0) {
		  printf("array not big enough (histou) \n");
		  goto zskip;
		  }
	       if (delta>99) {
		  printf("array not big enough (histou) \n");
		  goto zskip;
		  }
	       histou[delta]=histou[delta]+1;
	       cyccntu=cyccntu+1;
	       if ((3.0*log(c))<patcnt) {
		  if (c!=1) {
		     printf("error: not enough attachment points, c=%d, count=%d, e=%d, o=%d \n",c,patcnt,levens,lodds);
		     goto zskip;
		     }
		  }
	       }
	    if (conv[2*tempi+1]>lodds)
	       break;
	    }
//
	 for (tempi=0; tempi<75; tempi++) {
	    if ((conv[2*tempi+1]==levens)&&(conv[2*tempi+1]==lodds)) {
	       delta=jsum-evensum+offset3;
	       if (flag13!=0) {
		  for (ii=0; ii<5000; ii++) {
		     if (lodds<=(ln[ii]&0xffff)) {
			if (flag14==0) {
			   if ((lodds==(ln[ii]&0xffff))||(lodds==1))
			      levenpm=(ln[ii]>>16)-(ln[ii]&0xffff);
			   else
			      levenpm=(ln[ii-1]>>16)-(ln[ii-1]&0xffff);
			   levenpp=levenpm;
			   }
			if (flag14==1) {
			   levenpp=(ln[ii]>>16)-(ln[ii]&0xffff);
			   levenpm=levenpp;
			   }
			if (flag14==2) {
			   if ((lodds==(ln[ii]&0xffff))||(lodds==1))
			      levenpm=(ln[ii]>>16)-(ln[ii]&0xffff);
			   else
			      levenpm=(ln[ii-1]>>16)-(ln[ii-1]&0xffff);
			   levenpp=(ln[ii]>>16)-(ln[ii]&0xffff);
			   }
			deltaef=((double)levenpm+(double)levenpp)/2.0-(double)levens;
			if (deltaef<0.0)
			   deltaef=-deltaef;
			delta=delta+(int)(deltaef/rat);
			break;
			}
		     }
		  }
	       if (delta<0) {
		  printf("array not big enough (histob), delta b=%d \n",delta);
		  goto zskip;
		  }
	       if (delta>299) {
		  printf("array not big enough (histob), delta b=%d \n",delta);
		  goto zskip;
		  }
	       histob[delta]=histob[delta]+1;
	       cyccntb=cyccntb+1;
	       if ((3.0*log(c))<patcnt) {
		  if ((c==4291)&&(levens==306))
		     goto kjump;
		  if ((c==4907)&&(levens=200))
		     goto kjump;
		  if ((c==7427)&&(levens==212))
		     goto kjump;
		  if ((c==7711)&&(levens==200))
		     goto kjump;
		  if ((c==10717)&&(levens==306))
		     goto kjump;
		  if ((c==11647)&&(levens==306))
		     goto kjump;
		  if ((c==12625)&&(levens==200)&&(patcnt==48))
		     goto kjump;
		  if ((c==16789)&&(levens==306)&&(patcnt==76))
		     goto kjump;
		  if ((c==17461)&&(levens==306)&&(patcnt==74))
		     goto kjump;
		  if ((c==17525)&&(levens==200)&&(patcnt==58))
		     goto kjump;
		  if ((c==17675)&&(levens==200))
		     goto kjump;
		  if ((c==18281)&&(levens==200))
		     goto kjump;
		  if ((c==18725)&&(levens==212))
		     goto kjump;
		  if ((c==19903)&&(levens==306))
		     goto kjump;
		  if ((c==19717)&&(levens==106))
		     goto kjump;
		  if ((c==19717)&&(levens==318))
		     goto kjump;
		  if ((c==20705)&&(levens==200))
		     goto kjump;
		  if ((c==22681)&&(levens==306)&&(patcnt==74))
		     goto kjump;
		  if ((c==22681)&&(levens==306)&&(patcnt==75))
		     goto kjump;
		  if ((c==24341)&&(levens==200)&&(patcnt==47))
		     goto kjump;
		  if ((c==24341)&&(levens==200)&&(patcnt==46))
		     goto kjump;
		  if ((c==24341)&&(levens==200)&&(patcnt==45))
		     goto kjump;
		  if ((c==24341)&&(levens==200)&&(patcnt==53))
		     goto kjump;
		  if ((c==24341)&&(levens==200)&&(patcnt==51))
		     goto kjump;
		  if ((c==24535)&&(levens==200)&&(patcnt==49))
		     goto kjump;
		  if ((c==24863)&&(levens==253)&&(patcnt==60))
		     goto kjump;
		  if ((c==25625)&&(levens==200)&&(patcnt==52))
		     goto kjump;
		  if ((c==25625)&&(levens==200)&&(patcnt==44))
		     goto kjump;
		  if ((c==25625)&&(levens==200)&&(patcnt==49))
		     goto kjump;
		  if ((c==25625)&&(levens==200)&&(patcnt==56))
		     goto kjump;
		  if ((c==25625)&&(levens==200)&&(patcnt==50))
		     goto kjump;
		  if ((c==27713)&&(levens==318)&&(patcnt==73))
		     goto kjump;
		  if ((c==27713)&&(levens==318)&&(patcnt==82))
		     goto kjump;
		  if ((c==27775)&&(levens==200)&&(patcnt==49))
		     goto kjump;
		  if ((c==28741)&&(levens==200)&&(patcnt==49))
		     goto kjump;
		  if ((c==28987)&&(levens==200)&&(patcnt==55))
		     goto kjump;
		  if ((c==28987)&&(levens==200)&&(patcnt==46))
		     goto kjump;
		  if ((c==28987)&&(levens==200)&&(patcnt==56))
		     goto kjump;
		  if ((c==28987)&&(levens==200)&&(patcnt==52))
		     goto kjump;
		  if ((c==29089)&&(levens==306)&&(patcnt==76))
		     goto kjump;
		  if ((c==29089)&&(levens==306)&&(patcnt==77))
		     goto kjump;
		  if ((c==30125)&&(levens==200)&&(patcnt==51))
		     goto kjump;
		  if ((c==32021)&&(levens==200)&&(patcnt==46))
		     goto kjump;
		  if ((c==34037)&&(levens==200)&&(patcnt==47))
		     goto kjump;
		  if ((c==34037)&&(levens==200)&&(patcnt==44))
		     goto kjump;
		  if ((c==37135)&&(levens==212)&&(patcnt==59))
		     goto kjump;
		  if ((c==38885)&&(levens==200)&&(patcnt==56))
		     goto kjump;
		  if ((c==38885)&&(levens==200)&&(patcnt==52))
		     goto kjump;
		  if ((c==39845)&&(levens==612)&&(patcnt==147))
		     goto kjump;
		  if ((c==39887)&&(levens==147)&&(patcnt==38))
		     goto kjump;
		  if ((c==39887)&&(levens==147)&&(patcnt==36))
		     goto kjump;
		  if ((c==39887)&&(levens==147)&&(patcnt==41))
		     goto kjump;
		  if ((c==42125)&&(levens==200)&&(patcnt==53))
		     goto kjump;
		  if ((c==42125)&&(levens==200)&&(patcnt==46))
		     goto kjump;
		  if ((c==43621)&&(levens==200)&&(patcnt==47))
		     goto kjump;
		  if ((c==43621)&&(levens==200)&&(patcnt==50))
		     goto kjump;
		  if ((c==44459)&&(levens==253)&&(patcnt==65))
		     goto kjump;
		  if ((c==45551)&&(levens==200)&&(patcnt==48))
		     goto kjump;
		  if ((c==45551)&&(levens==200)&&(patcnt==50))
		     goto kjump;
		  if ((c==45551)&&(levens==200)&&(patcnt==52))
		     goto kjump;
		  if ((c==48125)&&(levens==200)&&(patcnt==52))
		     goto kjump;
		  if ((c==48125)&&(levens==200)&&(patcnt==50))
		     goto kjump;
		  if ((c==49771)&&(levens==200)&&(patcnt==49))
		     goto kjump;
		  if ((c==49771)&&(levens==200)&&(patcnt==54))
		     goto kjump;
		  if ((c==49771)&&(levens==200)&&(patcnt==52))
		     goto kjump;
		  if ((c==50041)&&(levens==306)&&(patcnt==77))
		     goto kjump;
		  if ((c==50041)&&(levens==306)&&(patcnt==73))
		     goto kjump;
		  if ((c==50041)&&(levens==306)&&(patcnt==70))
		     goto kjump;
		  if ((c==50041)&&(levens==612)&&(patcnt==142))
		     goto kjump;
		  if ((c==50197)&&(levens==200)&&(patcnt==53))
		     goto kjump;
		  if ((c==50197)&&(levens==200)&&(patcnt==46))
		     goto kjump;
		  if ((c==51467)&&(levens==318)&&(patcnt==73))
		     goto kjump;
		  if ((c==51467)&&(levens==318)&&(patcnt==85))
		     goto kjump;
		  if ((c==55783)&&(levens==306)&&(patcnt==74))
		     goto kjump;
		  if ((c==56647)&&(levens==306)&&(patcnt==85))
		     goto kjump;
		  if ((c==56647)&&(levens==306)&&(patcnt==75))
		     goto kjump;
		  if ((c==56647)&&(levens==306)&&(patcnt==77))
		     goto kjump;
		  if ((c==56647)&&(levens==612)&&(patcnt==149))
		     goto kjump;
		  if ((c==56647)&&(levens==612)&&(patcnt==153))
		     goto kjump;
		  if ((c==58213)&&(levens==253)&&(patcnt==63))
		     goto kjump;
		  if ((c==58213)&&(levens==253)&&(patcnt==77))
		     goto kjump;
		  if ((c==58213)&&(levens==253)&&(patcnt==61))
		     goto kjump;
		  if ((c==58213)&&(levens==253)&&(patcnt==58))
		     goto kjump;
		  if ((c==58213)&&(levens==253)&&(patcnt==62))
		     goto kjump;
		  if ((c==58213)&&(levens==253)&&(patcnt==69))
		     goto kjump;
		  if ((c==58213)&&(levens==253)&&(patcnt==67))
		     goto kjump;
		  if ((c==58235)&&(levens==612)&&(patcnt==160))
		     goto kjump;
		  if ((c==53585)&&(levens==612)&&(patcnt==161))
		     goto kjump;
		  if ((c==53977)&&(levens==200)&&(patcnt==46))
		     goto kjump;
		  if ((c==53977)&&(levens==200)&&(patcnt==51))
		     goto kjump;
		  if ((c==53977)&&(levens==200)&&(patcnt==54))
		     goto kjump;
		  if ((c==60997)&&(levens==200)&&(patcnt==48))
		     goto kjump;
		  if ((c==60997)&&(levens==200)&&(patcnt==50))
		     goto kjump;
		  if ((c==63125)&&(levens==200)&&(patcnt==52))
		     goto kjump;
		  if ((c==63125)&&(levens==200)&&(patcnt==56))
		     goto kjump;
		  if ((c==63125)&&(levens==200)&&(patcnt==47))
		     goto kjump;
		  if ((c==63125)&&(levens==200)&&(patcnt==50))
		     goto kjump;
		  if ((c==63139)&&(levens==306)&&(patcnt==75))
		     goto kjump;
		  if ((c==63139)&&(levens==306)&&(patcnt==87))
		     goto kjump;
		  if ((c==63139)&&(levens==306)&&(patcnt==73))
		     goto kjump;
		  if ((c==63139)&&(levens==306)&&(patcnt==78))
		     goto kjump;
		  if ((c==63139)&&(levens==306)&&(patcnt==76))
		     goto kjump;
		  if ((c==66817)&&(levens==918)&&(patcnt==227))
		     goto kjump;
		  if ((c==67087)&&(levens==612)&&(patcnt==147))
		     goto kjump;
		  if ((c==69085)&&(levens==200)&&(patcnt==50))
		     goto kjump;
		  if ((c==69085)&&(levens==200)&&(patcnt==48))
		     goto kjump;
		  if ((c==70801)&&(levens==200)&&(patcnt==49))
		     goto kjump;
		  if ((c==70801)&&(levens==200)&&(patcnt==58))
		     goto kjump;
		  if ((c==70801)&&(levens==200)&&(patcnt==47))
		     goto kjump;
		  if ((c==71821)&&(levens==1330)&&(patcnt==327))
		     goto kjump;
		  if ((c==72409)&&(levens==306)&&(patcnt==79))
		     goto kjump;
		  if ((c==72409)&&(levens==306)&&(patcnt==76))
		     goto kjump;
		  if ((c==75829)&&(levens==306)&&(patcnt==71))
		     goto kjump;
		  if ((c==75829)&&(levens==306)&&(patcnt==81))
		     goto kjump;
		  if ((c==75829)&&(levens==306)&&(patcnt==78))
		     goto kjump;
		  if ((c==78881)&&(levens==200)&&(patcnt==53))
		     goto kjump;
		  if ((c==78881)&&(levens==200)&&(patcnt==52))
		     goto kjump;
		  if ((c==78881)&&(levens==200)&&(patcnt==50))
		     goto kjump;
		  if ((c==78881)&&(levens==200)&&(patcnt==57))
		     goto kjump;
		  if ((c==78881)&&(levens==200)&&(patcnt==47))
		     goto kjump;
		  if ((c==78881)&&(levens==200)&&(patcnt==48))
		     goto kjump;
		  if ((c==79513)&&(levens==306)&&(patcnt==77))
		     goto kjump;
		  if ((c==79513)&&(levens==306)&&(patcnt==78))
		     goto kjump;
		  if ((c==81217)&&(levens==200)&&(patcnt==45))
		     goto kjump;
		  if ((c==81529)&&(levens==306)&&(patcnt==73))
		     goto kjump;
		  if ((c==81529)&&(levens==306)&&(patcnt==74))
		     goto kjump;
		  if ((c==81529)&&(levens==306)&&(patcnt==83))
		     goto kjump;
		  if ((c==81529)&&(levens==306)&&(patcnt==85))
		     goto kjump;
		  if ((c==81631)&&(levens==200)&&(patcnt==46))
		     goto kjump;
		  if ((c==81631)&&(levens==200)&&(patcnt==51))
		     goto kjump;
		  if ((c==83567)&&(levens==265)&&(patcnt==59))
		     goto kjump;
		  if ((c==83567)&&(levens==265)&&(patcnt==66))
		     goto kjump;
		  if ((c==83567)&&(levens==265)&&(patcnt==65))
		     goto kjump;
		  if ((c==83945)&&(levens==612)&&(patcnt==157))
		     goto kjump;
		  if ((c==87305)&&(levens==612)&&(patcnt==150))
		     goto kjump;
		  if ((c==87625)&&(levens==200)&&(patcnt==54))
		     goto kjump;
		  if ((c==87625)&&(levens==200)&&(patcnt==46))
		     goto kjump;
		  if ((c==87625)&&(levens==200)&&(patcnt==51))
		     goto kjump;
		  if ((c==87625)&&(levens==200)&&(patcnt==44))
		     goto kjump;
		  if ((c==88375)&&(levens==200)&&(patcnt==49))
		     goto kjump;
		  if ((c==88375)&&(levens==200)&&(patcnt==47))
		     goto kjump;
		  if ((c==88375)&&(levens==200)&&(patcnt==56))
		     goto kjump;
		  if ((c==88375)&&(levens==200)&&(patcnt==44))
		     goto kjump;
		  if ((c==85555)&&(levens==200)&&(patcnt==55))
		     goto kjump;
		  if ((c==91393)&&(levens==612)&&(patcnt==150))
		     goto kjump;
		  if ((c==91405)&&(levens==200)&&(patcnt==48))
		     goto kjump;
		  if ((c==91405)&&(levens==200)&&(patcnt==52))
		     goto kjump;
		  if ((c==91405)&&(levens==200)&&(patcnt==55))
		     goto kjump;
		  if ((c==91405)&&(levens==200)&&(patcnt==47))
		     goto kjump;
		  if ((c==92675)&&(levens==200)&&(patcnt==49))
		     goto kjump;
		  if ((c==92785)&&(levens==200)&&(patcnt==49))
		     goto kjump;
		  if ((c==94657)&&(levens==306)&&(patcnt==71))
		     goto kjump;
		  if ((c==94657)&&(levens==306)&&(patcnt==78))
		     goto kjump;
		  if ((c==95275)&&(levens==612)&&(patcnt==156))
		     goto kjump;
		  if ((c==97747)&&(levens==612)&&(patcnt==140))
		     goto kjump;
		  if ((c==98585)&&(levens==212)&&(patcnt==51))
		     goto kjump;
		  if ((c==98585)&&(levens==212)&&(patcnt==50))
		     goto kjump;
		  if ((c==98585)&&(levens==212)&&(patcnt==53))
		     goto kjump;
		  if ((c==98585)&&(levens==212)&&(patcnt==54))
		     goto kjump;
		  if ((c==98585)&&(levens==212)&&(patcnt==52))
		     goto kjump;
		  if ((c==98585)&&(levens==212)&&(patcnt==55))
		     goto kjump;
		  if ((c==98585)&&(levens==212)&&(patcnt==48))
		     goto kjump;
		  if ((c==98585)&&(levens==212)&&(patcnt==56))
		     goto kjump;
		  if ((c==99515)&&(levens==612)&&(patcnt==159))
		     goto kjump;
		  if ((c==99919)&&(levens==306)&&(patcnt==80))
		     goto kjump;
		  if ((c==99919)&&(levens==612)&&(patcnt==160))
		     goto kjump;
		  if ((c==99919)&&(levens==306)&&(patcnt==72))
		     goto kjump;
		  if ((c==99919)&&(levens==306)&&(patcnt==81))
		     goto kjump;
		  if ((c==99919)&&(levens==612)&&(patcnt==158))
		     goto kjump;
		  if ((c==99919)&&(levens==306)&&(patcnt==74))
		     goto kjump;
		  else {
		     printf("error: not enough attachment points, c=%d, e=%d, count=%d \n",c,levens,patcnt);
		     goto zskip;
		     }
		  }
	       }
	    if (conv[2*tempi+1]>lodds)
	       break;
	    }
//
kjump:	 delta=oddsum-evensum+offset11;
	 if (delta<0) {
	    printf("error: offset not big enough (histos), jsum=%d, delta=%d \n",jsum,delta);
	    goto zskip;
	    }
	 if (delta>699) {
	    printf("error: histogram array not big enough (histos) \n");
	    goto zskip;
	    }
	 histos[delta]=histos[delta]+1;
//
// check limit
//
	 if (oddsum>jsum) {
	    tempi=oddsum-jsum;
	    tempf=1.0;
	    for (j=0; j<tempi; j++)
	       tempf=tempf*2.0;
	    tempf=(rat-1.0)*log(tempf);
	    tempf=exp(tempf);
	    tempg=1.0;
	    for (j=0; j<(unsigned int)evensum; j++)
	       tempg=tempg*2.0;
	    tempf=tempf/tempg;
	    if (tempf>1.0) {
	       if (eowrite==0)
		  printf("warning: tempf=%e, tempg=%e, oddsum=%d, jsum=%d, evensum=%d \n",tempf,tempg,oddsum,jsum,evensum);
	       compcnt=compcnt+1;
	       if (tempf>maxcmp)
		  maxcmp=tempf;
	       }
	    }
//
	 if (hsum!=hcount) {
	    printf("mis-matched sums, c=%d, hsum=%d, hcount=%d, s=%d, flag=%d, e=%d, o=%d, a=%d \n",c,hsum,hcount,s[i],cflag[index+i],levens,lodds,patcnt);
//	    goto zskip;
	    }
	 oddsum=0;
	 evensum=0;
	 jmpsum=0;
	 jsum=0;
	 hcount=0;
//
//  check primary multiple jumps
//
	 if (mflag!=0) {
	    for (j=0; j<attcnt; j++) {
//	       if (s[j+savind]==tmps) {
	       if ((ES[(j+savind)*2]==TMPS[0])&&(ES[(j+savind)*2+1]==TMPS[1])) {
		  if ((jumps[j+savind]!=0)&&(jumps[j+savind]!=3)) {
		     printf("error: one-jump not found \n");
		     goto zskip;
		     }
		  goto vskip;
		  }
	       }
	    printf("error: no match \n");
	    goto zskip;
	    }
//
// check number of attachment points
//
vskip:	 if ((3.0*log(c))<patcnt) {
	    if (wflag==0) {
	       printf("not enough attachment points, c=%d, count=%d \n",c,patcnt);
	       fprintf(Outfp,"not enough attachment points, c=%d, count=%d \n",c,patcnt);
	       }
	    if (levens==lodds)
	       equcnt=equcnt+1;
	    }
	 delta=(int)(3.0*log(c))-patcnt+offset10;
	 if (delta<0) {
	    printf("array not big enough (histod): delta=%d \n",delta);
	    goto zskip;
	    }
	 if (delta>2999) {
	    printf("array not big enough (histod): delta=%d \n",delta);
	    goto zskip;
	    }
	 histod[delta]=histod[delta]+1;
//
	 for (ii=0; ii<5000; ii++) {
	    if (lodds<=(ln[ii]&0xffff)) {
	       if (flag14==0) {
		  if ((lodds==(ln[ii]&0xffff))||(lodds==1))
		     levenpm=(ln[ii]>>16)-(ln[ii]&0xffff);
		  else
		     levenpm=(ln[ii-1]>>16)-(ln[ii-1]&0xffff);
		  levenpp=levenpm;
		  }
	       if (flag14==1) {
		  levenpp=(ln[ii]>>16)-(ln[ii]&0xffff);
		  levenpm=levenpp;
		  }
	       if (flag14==2) {
		  if ((lodds==(ln[ii]&0xffff))||(lodds==1))
		     levenpm=(ln[ii]>>16)-(ln[ii]&0xffff);
		  else
		     levenpm=(ln[ii-1]>>16)-(ln[ii-1]&0xffff);
		  levenpp=(ln[ii]>>16)-(ln[ii]&0xffff);
		  }
	       deltaef=((double)levenpm+(double)levenpp)/2.0-(double)levens;
	       if (deltaef<0.0)
		  deltaef=-deltaef;
	       if (flag16==0)
		  deltae=(int)(3*log(c)+(double)deltaef/rat);
	       if (flag16==1)
		  deltae=(int)(3*log(c)+(double)deltaef/1.5);
	       if (flag16==2)
		  deltae=(int)(3*log(c)+(double)deltaef/1.67);
	       if (flag16==3)
		  deltae=(int)(3*log(c)+(double)deltaef/1.75);
	       if (flag16<2)
		  deltae=deltae-patcnt+1;
	       if (flag16==2)
		  deltae=deltae-patcnt+offdp;
	       if (flag16==3)
		  deltae=deltae-patcnt+offdp3;
	       if (deltae<0) {
		  printf("error: array not big enough (histodp) \n");
		  printf("c=%d, e=%d, o=%d, a=%d, d=%d \n",c,levens,lodds,patcnt,deltae);
		  if ((flag14==0)&&(flag16==0)) {
		     if ((c==5827)&&(levens==426)&&(lodds==504)&&(patcnt==114)) // d=-5
			break;
		     if ((c==6515)&&(levens==436)&&(lodds==506)&&(patcnt==122)) // d=-7
			break;
		     if ((c==8243)&&(levens==805)&&(lodds==929)&&(patcnt==196)) // d=-3
			break;
		     if ((c==11707)&&(levens==624)&&(lodds==713)&&(patcnt==165)) // d=-6
			break;
		     if ((c==14957)&&(levens==500)&&(lodds==591)&&(patcnt==129)) // d=-2
			break;
		     if ((c==16001)&&(levens==613)&&(lodds==726)&&(patcnt==151)) // d=-3
			break;
		     if ((c==16487)&&(levens==529)&&(lodds==625)&&(patcnt==134)) // d=-2
			break;
		     if ((c==17315)&&(levens==696)&&(lodds==750)&&(patcnt==194)) // d=-2
			break;
		     if ((c==20807)&&(levens==484)&&(lodds==590)&&(patcnt==119)) // d=-1
			break;
		     if ((c==21809)&&(levens==480)&&(lodds==576)&&(patcnt==129)) // d=-8
			break;
		     if ((c==22343)&&(levens==1185)&&(lodds==1282)&&(patcnt==306)) // d=-1
			break;
		     if ((c==22429)&&(levens==553)&&(lodds==689)&&(patcnt==137)) // d=-12
			break;
		     if ((c==26213)&&(levens==428)&&(lodds==514)&&(patcnt==113)) // d=-2
			break;
		     if ((c==27547)&&(levens==588)&&(lodds==696)&&(patcnt==149)) // d=-4
			break;
		     if ((c==28771)&&(levens==738)&&(lodds==843)&&(patcnt==190)) // d=-4
			break;
		     if ((c==32389)&&(levens==876)&&(lodds==984)&&(patcnt==234)) // d=-13
			break;
		     if ((c==33989)&&(levens==1116)&&(lodds==1224)&&(patcnt==296)) // d=-12
			break;
		     if ((c==35191)&&(levens==552)&&(lodds==672)&&(patcnt==135)) // d=-3
			break;
		     if ((c==38689)&&(levens==633)&&(lodds==726)&&(patcnt==164)) // d=-1
			break;
		     if ((c==39605)&&(levens==912)&&(lodds=1016)&&(patcnt==237)) // d=-4
			break;
		     if ((c==41893)&&(levens==471)&&(lodds==549)&&(patcnt==128)) // d=-1
			break;
		     if ((c==42641)&&(levens==1555)&&(lodds==1722)&&(patcnt==382))  // d=-4
			break;
		     if ((c==43739)&&(levens==969)&&(lodds==1083)&&(patcnt==250))  // d=-5
			break;
		     if ((c==43925)&&(levens==680)&&(lodds==800)&&(patcnt==175))  // d=-9
			break;
		     if ((c==45613)&&(levens==1181)&&(lodds==1345)&&(patcnt==290))  // d=-9
			break;
		     if ((c==45679)&&(levens==527)&&(lodds==646)&&(patcnt==138))  // d=-11
			break;
		     if ((c==46801)&&(levens==564)&&(lodds==664)&&(patcnt==145))  // d=-1
			break;
		     if ((c==46823)&&(levens==1105)&&(lodds==1192)&&(patcnt=296))  // d=-6
			break;
		     if ((c==46841)&&(levens==585)&&(lodds==690)&&(patcnt==151))   // d=-4
			break;
		     if ((c==48091)&&(levens==596)&&(lodds==720)&&(patcnt==147))  // d=-4
			break;
		     goto zskip;
		     }
		  if ((flag14==2)&&(flag16==0)) {
		     if ((c==5827)&&(levens==426)&&(lodds==504)&&(patcnt==114)) // d=-5
			break;
		     if ((c==6515)&&(levens==436)&&(lodds==506)&&(patcnt==122)) // d=-7
			break;
		     if ((c==8243)&&(levens==805)&&(lodds==929)&&(patcnt==196)) // d=-3
			break;
		     if ((c==11707)&&(levens==624)&&(lodds==713)&&(patcnt==165)) // d=-6
			break;
		     if ((c==14957)&&(levens==500)&&(lodds==591)&&(patcnt==129)) // d=-2
			break;
		     if ((c==16001)&&(levens==613)&&(lodds==726)&&(patcnt==151)) // d=-3
			break;
		     if ((c==16487)&&(levens==529)&&(lodds==625)&&(patcnt==134)) // d=-2
			break;
		     if ((c==17315)&&(levens==696)&&(lodds==750)&&(patcnt==194)) // d=-2
			break;
		     if ((c==17449)&&(levens==366)&&(lodds==454)&&(patcnt==94))  // d=-1
			break;
		     if ((c==20807)&&(levens==484)&&(lodds==590)&&(patcnt==119)) // d=-1
			break;
		     if ((c==21809)&&(levens==480)&&(lodds==576)&&(patcnt==129)) // d=-8
			break;
		     if ((c==22343)&&(levens==1185)&&(lodds==1282)&&(patcnt==306)) // d=-1
			break;
		     if ((c==22429)&&(levens==553)&&(lodds==689)&&(patcnt==137)) // d=-12
			break;
		     if ((c==26213)&&(levens==428)&&(lodds==514)&&(patcnt==113)) // d=-2
			break;
		     if ((c==27547)&&(levens==588)&&(lodds==696)&&(patcnt==149)) // d=-4
			break;
		     if ((c==28771)&&(levens==738)&&(lodds==843)&&(patcnt==190)) // d=-4
			break;
		     if ((c==32389)&&(levens==876)&&(lodds==984)&&(patcnt==234)) // d=-13
			break;
		     if ((c==33989)&&(levens==1116)&&(lodds==1224)&&(patcnt==296)) // d=-12
			break;
		     if ((c==35191)&&(levens==552)&&(lodds==672)&&(patcnt==135)) // d=-3
			break;
		     if ((c==38689)&&(levens==633)&&(lodds==726)&&(patcnt==164)) // d=-1
			break;
		     if ((c==39605)&&(levens==912)&&(lodds=1016)&&(patcnt==237)) // d=-4
			break;
		     if ((c==41893)&&(levens==471)&&(lodds==549)&&(patcnt==128)) // d=-1
			break;
		     if ((c==42641)&&(levens==1555)&&(lodds==1722)&&(patcnt==382))  // d=-4
			break;
		     if ((c==43739)&&(levens==969)&&(lodds==1083)&&(patcnt==250))  // d=-6
			break;
		     if ((c==43925)&&(levens==680)&&(lodds==800)&&(patcnt==175))  // d=-9
			break;
		     if ((c==45613)&&(levens==1181)&&(lodds==1345)&&(patcnt==290))  // d=-9
			break;
		     if ((c==45679)&&(levens==527)&&(lodds==646)&&(patcnt==138))  // d=-11
			break;
		     if ((c==46801)&&(levens==564)&&(lodds==664)&&(patcnt==145))  // d=-2
			break;
		     if ((c==46823)&&(levens==1105)&&(lodds==1192)&&(patcnt=296))  // d=-6
			break;
		     if ((c==46841)&&(levens==585)&&(lodds==690)&&(patcnt==151))   // d=-4
			break;
		     if ((c==48091)&&(levens==596)&&(lodds==720)&&(patcnt==147))  // d=-4
			break;
		     if ((c==50957)&&(levens==496)&&(lodds==594)&&(patcnt==130))  // d=-3
			break;
		     if ((c==52561)&&(levens==970)&&(lodds==1065)&&(patcnt==257))  // d=-5
			break;
		     if ((c==52835)&&(levens==1016)&&(lodds==1078)&&(patcnt==278))  // d=-2
			break;
		     if ((c==54317)&&(levens==984)&&(lodds==1072)&&(patcnt==261))  // d=-3
			break;
		     if ((c==54721)&&(levens==1077)&&(lodds==1224)&&(patcnt==271))  // d=-10
			break;
		     if ((c==55019)&&(levens==966)&&(lodds==1074)&&(patcnt==255))  // d=-9
			break;
		     if ((c==55289)&&(levens==960)&&(lodds==1052)&&(patcnt==253))  // d=-2
			break;
		     if ((c==55613)&&(levens==936)&&(lodds==1038)&&(patcnt==242))  // d=-1
			break;
		     if ((c==55631)&&(levens==3278)&&(lodds==3519)&&(patcnt==814))  // d=-11
			break;
		     if ((c==58763)&&(levens==1386)&&(lodds==1496)&&(patcnt==368))  // d=-12
			break;
		     if ((c==58853)&&(levens==672)&&(lodds==768)&&(patcnt==185)) // d=-11
			break;
		     if ((c==59695)&&(levens==860)&&(lodds==996)&&(patcnt==212)) // d=-4
			break;
		     if ((c==59993)&&(levens==1022)&&(lodds==1132)&&(patcnt==264))  // d=-4
			break;
		     if ((c==60169)&&(levens==989)&&(lodds==1127)&&(patcnt==251))  // d=-10
			break;
		     if ((c==60383)&&(levens==732)&&(lodds==821)&&(patcnt==199))  // d=-7
			break;
		     if ((c==60407)&&(levens==1356)&&(lodds==1466)&&(patcnt==350))  // d=-2
			break;
		     if ((c==60883)&&(levens==2608)&&(lodds==2760)&&(patcnt==676))  // d=-16
			break;
		     if ((c==60917)&&(levens==1972)&&(lodds==2082)&&(patcnt==519))  // d=-10
			break;
		     if ((c==62537)&&(levens==584)&&(lodds==668)&&(patcnt==165))  // d=-10
			break;
		     if ((c==62897)&&(levens==1491)&&(lodds==1618)&&(patcnt==385))  // d=-8
			break;
		     if ((c==63263)&&(levens==1004)&&(lodds==1096)&&(patcnt==266))  // d=-3
			break;
		     if ((c==63641)&&(levens==1215)&&(lodds==1338)&&(patcnt==307))  // d=-1
			break;
		     if ((c==65143)&&(levens==750)&&(lodds==870)&&(patcnt==195)) // d=-9
			break;
		     if ((c==65347)&&(levens==1612)&&(lodds==1709)&&(patcnt==430))  // d=-10
			break;
		     if ((c==66733)&&(levens==995)&&(lodds==1087)&&(patcnt==267))  // d=-7
			break;
		     if ((c==67231)&&(levens==2911)&&(lodds==3136)&&(patcnt==728))  // d=-15
			break;
		     if ((c==68063)&&(levens==996)&&(lodds==1131)&&(patcnt==249))  // d=-4
			break;
		     if ((c==68899)&&(levens==1506)&&(lodds==1716)&&(patcnt==375))  // d=-24
			break;
		     if ((c==69211)&&(levens==918)&&(lodds==1068)&&(patcnt==233))  // d=-14
			break;
		     if ((c==69799)&&(levens==930)&&(lodds==1038)&&(patcnt==239))  // d=-2
			break;
		     if ((c==69997)&&(levens==416)&&(lodds==508)&&(patcnt==110))  // d=-1
			break;
		     if ((c==70793)&&(levens==1307)&&(lodds==1422)&&(patcnt==335))  // d=-1
			break;
		     if ((c==71087)&&(levens==708)&&(lodds==828)&&(patcnt==177)) // d=-2
			break;
		     if ((c==71297)&&(levens==728)&&(lodds==806)&&(patcnt==198)) // d=-2
			break;
		     if ((c==71303)&&(levens==875)&&(lodds==980)&&(patcnt==225)) // d=-1
			break;
		     if ((c==72227)&&(levens==1125)&&(lodds==1291)&&(patcnt==301))  // d=-34
			break;
		     if ((c==72391)&&(levens==696)&&(lodds==818)&&(patcnt==172)) // d=-1
			break;
		     if ((c==73265)&&(levens==1452)&&(lodds==1560)&&(patcnt==377))  // d=-3
			break;
		     if ((c==75245)&&(levens==348)&&(lodds==436)&&(patcnt==96)) // d=-3
			break;
		     if ((c==75443)&&(levens==1286)&&(lodds==1418)&&(patcnt==323))  // d=-1
			break;
		     if ((c==75617)&&(levens==838)&&(lodds==920)&&(patcnt==224)) // d=-1
			break;
		     if ((c==75959)&&(levens==765)&&(lodds==891)&&(patcnt==195)) // d=-7
			break;
		     if ((c==76411)&&(levens==1006)&&(lodds==1128)&&(patcnt==258))  // d=-5
			break;
		     if ((c==77705)&&(levens==1064)&&(lodds==1180)&&(patcnt==279))  // d=-9
			break;
		     if ((c==79499)&&(levens==2172)&&(lodds==2328)&&(patcnt==549))  // d=-4
			break;
		     if ((c==79529)&&(levens==898)&&(lodds==998)&&(patcnt==234)) // d=-2
			break;
		     if ((c==79693)&&(levens==722)&&(lodds==814)&&(patcnt==191)) // d=-1
			break;
		     if ((c==80077)&&(levens==1251)&&(lodds==1427)&&(patcnt==307))  // d=-10
			break;
		     if ((c==80437)&&(levens==2442)&&(lodds==2622)&&(patcnt==610))  // d=-3
			break;
		     if ((c==80677)&&(levens==943)&&(lodds==1055)&&(patcnt==244))  // d=-4
			break;
		     if ((c==80843)&&(levens==1004)&&(lodds==1148)&&(patcnt==253))  // d=-9
			break;
		     if ((c==80989)&&(levens==1262)&&(lodds==1370)&&(patcnt==333))  // d=-8
			break;
		     if ((c==81851)&&(levens==954)&&(lodds==1092)&&(patcnt==238))  // d=-5
			break;
		     if ((c==81905)&&(levens==1196)&&(lodds==1352)&&(patcnt==304))  // d=-14
			break;
		     if ((c==83399)&&(levens==1099)&&(lodds==1237)&&(patcnt==275))  // d=-4
			break;
		     if ((c==83611)&&(levens==780)&&(lodds==870)&&(patcnt==211))  // d=-6
			break;
		     if ((c==85039)&&(levens==636)&&(lodds==732)&&(patcnt==171)) // d=-6
			break;
		     if ((c==86149)&&(levens==606)&&(lodds==702)&&(patcnt==161)) // d=-3
			break;
		     if ((c==86633)&&(levens==1132)&&(lodds==1248)&&(patcnt==289))  // d=-1
			break;
		     if ((c==87299)&&(levens==2015)&&(lodds==2169)&&(patcnt==509))  // d=-4
			break;
		     if ((c==87629)&&(levens==712)&&(lodds==810)&&(patcnt==186)) // d=-1
			break;
		     if ((c==87989)&&(levens==540)&&(lodds==660)&&(patcnt==136)) // d=-4
			break;
		     if ((c==88057)&&(levens==888)&&(lodds==1000)&&(patcnt==229))  // d=-3
			break;
		     if ((c==89497)&&(levens==993)&&(lodds==1116)&&(patcnt==256))  // d=-7
			break;
		     if ((c==89783)&&(levens==1245)&&(lodds==1376)&&(patcnt==316))  // d=-4
			break;
		     if ((c==89941)&&(levens==1296)&&(lodds==1472)&&(patcnt==329))  // d=-20
			break;
		     if ((c==91343)&&(levens==1045)&&(lodds==1192)&&(patcnt==268))  // d=-14
			break;
		     if ((c==91559)&&(levens==1245)&&(lodds==1331)&&(patcnt==330))  // d=-1
			break;
		     if ((c==91877)&&(levens==1818)&&(lodds==1918)&&(patcnt==475))  // d=-1
			break;
		     if ((c==91925)&&(levens==904)&&(lodds==1014)&&(patcnt==235))  // d=-4
			break;
		     if ((c==92591)&&(levens==592)&&(lodds==739)&&(patcnt==145)) // d=-10
			break;
		     if ((c==93539)&&(levens==1162)&&(lodds==1248)&&(patcnt==308))  // d=-1
			break;
		     if ((c==93997)&&(levens==773)&&(lodds==897)&&(patcnt==202)) // d=-11
			break;
		     if ((c==94235)&&(levens==900)&&(lodds==1016)&&(patcnt==233))  // d=-5
			break;
		     if ((c==94589)&&(levens==996)&&(lodds==1138)&&(patcnt==248))  // d=-5
			break;
		     if ((c==95767)&&(levens==1140)&&(lodds==1254)&&(patcnt==292))  // d=-1
			break;
		     if ((c==96665)&&(levens==1276)&&(lodds==1396)&&(patcnt==327))  // d=-2
			break;
		     if ((c==96773)&&(levens==700)&&(lodds==826)&&(patcnt==178)) // d=-6
			break;
		     if ((c==98269)&&(levens==1264)&&(lodds==1420)&&(patcnt==324)) // d=-16
			break;
		     if ((c==99395)&&(levens==444)&&(lodds==540)&&(patcnt==118)) // d=-2
			break;
		     goto zskip;
		     }
		  if ((flag14==2)&&(flag16==1)) {
		     if ((c==6515)&&(levens==436)&&(lodds==506)&&(patcnt==122)) // d=-2
			break;
		     if ((c==21809)&&(levens==480)&&(lodds==576)&&(patcnt==129)) // d=-3
			break;
		     if ((c==22429)&&(levens==553)&&(lodds==689)&&(patcnt==137)) // d=-6
			break;
		     goto zskip;
		     }
		  if ((flag14==2)&&(flag16>1))
		     goto zskip;
		  }
	       if (deltae>199) {
		  printf("error: array not big enough (histodp) \n");
		  printf("c=%d, e=%d, o=%d, a=%d, d=%d \n",c,levens,lodds,patcnt,deltae);
		  goto zskip;
		  }
	       histodp[deltae]=histodp[deltae]+1;
	       break;
	       }
	    }
//
	 for (ii=0; ii<5000; ii++) {
	    if (((levens+lodds)==(ln[ii]>>16))&&(lodds==(ln[ii]&0xffff))) {
	       histodd[delta]=histodd[delta]+1;
	       goto iiskip;
	       }
	    if (lodds<(ln[ii]&0xffff))
	       goto iiskip;
	    }
	 printf("error: ln array not big enough \n");
	 goto zskip;
//
iiskip:  attcnt=0;
	 patcnt=0;
	 mflag=0;
	 savind=i+1;
//
// compute inequality
//
	 if (infin==0) {
	    dtemp=(double)GLOMIN[1]+(double)GLOMIN[0]*65536.0*65536.0;
//	    bp=1.0+(double)c/(double)glomin;
//	    bm=1.0-(double)c/(double)glomin;
	    bp=1.0+(double)c/dtemp;
	    bm=1.0-(double)c/dtemp;
	    if (bm<0.0)
	       bm=-bm;
	    }
	 else {
	    bp=1.0;
	    bm=1.0;
	    }
	 tempf=exp((double)a*log(rat))-1.0;
	 tempg=(double)a/tempf;
	 tempg=ratdel-tempg;
	 cap=exp(tempg*log(bp));
	 cam=exp(tempg*log(bm));
	 cap=3.0*(double)c*(double)a*cap;
	 cam=3.0*(double)c*(double)a*cam;
	 tempg=(rat-1.0)/tempf;
	 tempg=-tempg*(double)lodds;
	 tempg=exp(tempg*log(2.0));
	 cap=cap*tempg;
	 cam=cam*tempg;
	 tempf=(double)(levens+lodds)*log(2)-(double)lodds*log(3);
	 if (tempf<0.0)
	    tempf=-tempf;
	 if ((tempf>cap)||(tempf>cam)) {
	    if (eowrite==0) {
	       printf("error: c=%d, e=%d, o=%d, a=%d, cap=%e, cam=%e, tempf=%e \n",c,levens,lodds,a,cap,cam,tempf);
	       fprintf(Outfp,"error: c=%d, e=%d, o=%d, a=%d, cap=%e, cam=%e, tempf=%e \n",c,levens,lodds,a,cap,cam,tempf);
	       }
	    badcomp=badcomp+1;
	    }
	 glomin=1000000000;
	 GLOMIN[0]=0x7fffffff;
	 GLOMIN[1]=0xffffffff;
	 a=0;
//
// check global maximum
//
	 K[0]=USAVE[0];
	 K[1]=USAVE[1];
	 LOCMAX[0]=K[0];
	 LOCMAX[1]=K[1];
	 if ((LOCMAX[0]&0x80000000)!=0)
	    sub64(Z,LOCMAX);
	 k=usave;
	 locmax=k;
	 if (locmax<0)
	    locmax=-locmax;
	 lastodd=locmax;
	 LASTODD[0]=LOCMAX[0];
	 LASTODD[1]=LOCMAX[1];
	 T[0]=K[0];
	 T[1]=K[1];
	 add64(K,K);
	 add64(T,K);
	 add64(CP,K);
	 k=3*k+c;
//	 while ((k&7)!=0) {
//	    while ((k&1)==0) {
	 while ((K[1]&7)!=0) {
	    while ((K[1]&1)==0) {
	       K[1]=K[1]>>1;
	       K[1]=K[1]|(K[0]<<31);
	       K[0]=(int)K[0]>>1;
	       k=k/2;
	       }
	    T[0]=K[0];
	    T[1]=K[1];
	    if ((T[0]&0x80000000)!=0)
	       sub64(Z,T);
	    U[0]=LOCMAX[0];
	    U[1]=LOCMAX[1];
	    sub64(T,U);
	    delta=k;
	    if (delta<0)
	       delta=-delta;
	    if ((U[0]&0x80000000)==0) {
//	    if (delta>locmax) {
	       locmax=delta;
	       usave=k;
	       LOCMAX[0]=T[0];
	       LOCMAX[1]=T[1];
	       USAVE[0]=K[0];
	       USAVE[1]=K[1];
	       }
	    lastodd=delta;
	    LASTODD[0]=T[0];
	    LASTODD[1]=T[1];
	    T[0]=K[0];
	    T[1]=K[1];
	    add64(K,K);
	    add64(T,K);
	    add64(CP,K);
	    k=3*k+c;
	    }
//	 if (lastodd!=locmax) {
	 if ((LASTODD[0]!=LOCMAX[0])||(LASTODD[1]!=LOCMAX[1])) {
	    K[0]=USAVE[0];
	    K[1]=USAVE[1];
	    T[0]=K[0];
	    T[1]=K[1];
	    add64(K,K);
	    add64(T,K);
	    add64(CP,K);
	    k=usave;
	    k=3*k+c;
//	    while ((k&7)!=0) {
	    while ((K[1]&7)!=0) {
	       k=k/2;
	       K[1]=K[1]>>1;
	       K[1]=K[1]|(K[0]<<31);
	       K[0]=(int)K[0]>>1;
//	       if ((k&1)==0) {
	       if ((K[1]&1)==0) {
		  K[1]=K[1]>>1;
		  K[1]=K[1]|(K[0]<<31);
		  K[0]=(int)K[0]>>1;
		  T[0]=K[0];
		  T[1]=K[1];
		  if ((T[0]&0x80000000)!=0)
		     sub64(Z,T);
		  k=k/2;
		  delta=k;
		  if (delta<0)
		     delta=-delta;
//		  if (delta==lastodd) {
		  if ((T[0]==LASTODD[0])&&(T[1]==LASTODD[1])) {
		     if (savjmp==0) {
			T[0]=LOCMAX[0];
			T[1]=LOCMAX[1];
			sub64(TSAVE,T);
			if ((T[0]&0x80000000)==0) {
//			if (tsave>locmax) {
			   printf("error: t is greater than global maximum, u=%d, t=%d, max=%d, jump=%d \n",usave,tsave,locmax,savjmp);
			   if ((c!=26281)&&(levens!=5)&&(lodds!=10))  // temp!
			      goto zskip;
			   }
			goto wskip;
			}
		     else {
			printf("error: not a no-jump attachment point \n");
			fprintf(Outfp,"error: not a no-jump attachment point \n");
			goto zskip;
			}
		     }
		  }
	       k=3*k+c;
	       T[0]=K[0];
	       T[1]=K[1];
	       add64(K,K);
	       add64(T,K);
	       add64(CP,K);
	       }
	    if (savjmp!=1) {
	       printf("error: not a one-jump attachment point \n");
	       fprintf(Outfp,"error: not a one-jump attachment point \n");
	       goto zskip;
	       }
	    T[0]=LOCMAX[0];
	    T[1]=LOCMAX[1];
	    sub64(TSAVE,T);
	    if ((T[0]&0x80000000)==0) {
//	    if (tsave>locmax) {
	       printf("error: t is greater than global maximum, u=%d, t=%d, max=%d, jump=%d \n",usave,tsave,locmax,savjmp);
	       goto zskip;
	       }
wskip:	    delta=0;
	    }
	 glomax=0;
	 GLOMAX[0]=0;
	 GLOMAX[1]=0;
	 }
      else {
	 olds=s[i];
	 OLDS[0]=ES[2*i];
	 OLDS[1]=ES[2*i+1];
	 }
      }
   index=index+iters;
   if (wflag==0) {
      printf("\n");
      fprintf(Outfp,"\n");
      }
   for (tempi=0; tempi<cycsavind; tempi++) {
      outkl[2*outklind]=cycsav[2*tempi];
      outkl[2*outklind+1]=cycsav[2*tempi+1];
      outklind=outklind+1;
      if (outklind>999) {
	 printf("array not big enough (outkl) \n");
	 goto zskip;
	 }
      }
   outcnt[h]=cycsavind;
   }
printf("\n");
fprintf(Outfp,"\n");
if (eowrite==0) {
   printf("maxdel=%e, c=%d, mindel=%e, c=%d \n",maxdel,cmax,mindel,cmin);
   fprintf(Outfp,"maxdel=%e, c=%d, mindel=%e, c=%d \n",maxdel,cmax,mindel,cmin);
   printf("\n");
   fprintf(Outfp,"\n");
   }
//
// output histogram of evens minus odds
//
printf("histogram of number of evens minus odds in extended sequences \n");
fprintf(Outfp,"histogram of number evens minus odds in extended sequences \n");
flag=99;
for (i=99; i>0; i--) {
   if (histo[i]==0)
      continue;
   else {
      flag=i;
      break;
      }
   }
first=0;
for (i=0; i<=(int)flag; i++) {
   if ((histo[i]==0)&&(first==0))
      continue;
   first=1;
   fprintf(Outfp,"i=%d, h[i]=%d \n",i-offset,histo[i]);
   printf("i=%d, h[i]=%d \n",i-offset,histo[i]);
   }
//
// output histogram of k values (for primary one-jump attachment points)
//
printf("\n");
fprintf(Outfp,"\n");
printf("histogram of k values for primary one-jump attachment points \n");
fprintf(Outfp,"histogram of k values for primary one-jump attachment points \n");
printf("c=%d \n",hflag);
fprintf(Outfp,"c=%d \n",hflag);
flag=199;
for (i=199; i>0; i--) {
   if (histoj[i]==0)
      continue;
   else {
      flag=i;
      break;
      }
   }
first=0;
for (i=0; i<=(int)flag; i++) {
   if ((histoj[i]==0)&&(first==0))
      continue;
   first=1;
   fprintf(Outfp,"i=%d, h[i]=%d \n",i-offset5,histoj[i]);
   printf("i=%d, h[i]=%d \n",i-offset5,histoj[i]);
   }
//
// output histogram of hops
//
printf("\n");
fprintf(Outfp,"\n");
printf("number of hops before local minimum is reached \n");
fprintf(Outfp,"number of hops before local minimum is reached \n");
for (i=0; i<20; i++) {
   printf("i=%d, h=%d \n",i,hismin[i]);
   fprintf(Outfp,"i=%d, h=%d \n",i,hismin[i]);
   }
//
// output histogram of j values for primary no-jumps
//
printf("\n");
fprintf(Outfp,"\n");
printf("j values for primary no-jumps \n");
fprintf(Outfp,"j values for primary no-jumps \n");
for (i=0; i<40; i++) {
   printf("i=%d, h=%d \n",i,histon[i]);
   fprintf(Outfp,"i=%d, h=%d \n",i,histon[i]);
   }
//
//
// output histogram of j values for primary multiple-jumps
//
printf("\n");
fprintf(Outfp,"\n");
printf("j values for primary multiple-jumps \n");
fprintf(Outfp,"j values for primary multiple-jumps \n");
for (i=0; i<10; i++) {
   printf("i=%d, h=%d \n",i,histom[i]);
   fprintf(Outfp,"i=%d, h=%d \n",i,histom[i]);
   }
//
// last odd counts
//
printf("\n");
fprintf(Outfp,"\n");
printf("no-jump count=%d, one-jump count=%d, jumped-over count=%d \n",county,countn,countx);
fprintf(Outfp,"no-jump count=%d, one-jump count=%d, jumped-over count=%d \n",county,countn,countx);
//
// output histogram of k values (for primary one-jump attachment points)
//
printf("primary one-jump attachment points, last odd not equal to locmax \n");
fprintf(Outfp,"primary one-jump attachment points, last odd not equal to locmax \n");
printf("c=%d \n",hflag);
fprintf(Outfp,"c=%d \n",hflag);
flag=99;
for (i=99; i>0; i--) {
   if (newhis[i]==0)
      continue;
   else {
      flag=i;
      break;
      }
   }
first=0;
for (i=0; i<=(int)flag; i++) {
   if ((newhis[i]==0)&&(first==0))
      continue;
   first=1;
   fprintf(Outfp,"i=%d, h[i]=%d \n",i-offset,newhis[i]);
   printf("i=%d, h[i]=%d \n",i-offset,newhis[i]);
   }
//
// output histogram of k values (for primary one-jump attachment points)
//
printf("\n");
fprintf(Outfp,"\n");
printf("primary one-jump attachment points, u not equal to locmin \n");
fprintf(Outfp,"primary one-jump attachment points, u not equal to locmin \n");
printf("c=%d \n",hflag);
fprintf(Outfp,"c=%d \n",hflag);
flag=99;
for (i=99; i>0; i--) {
   if (oldhis[i]==0)
      continue;
   else {
      flag=i;
      break;
      }
   }
first=0;
for (i=0; i<=(int)flag; i++) {
   if ((oldhis[i]==0)&&(first==0))
      continue;
   first=1;
   fprintf(Outfp,"i=%d, h[i]=%d \n",i-offset,oldhis[i]);
   printf("i=%d, h[i]=%d \n",i-offset,oldhis[i]);
   }
printf("\n");
fprintf(Outfp,"\n");
//
// output histogram of odd sum plus hops minus number of evens
//
printf("odd sum minus jumps plus hops minus even sum (global, histoh) \n");
fprintf(Outfp,"odd sum minus jumps plus hops minus even sum (global, histoh) \n");
flag=499;
for (i=499; i>0; i--) {
   if (histoh[i]==0)
      continue;
   else {
      flag=i;
      break;
      }
   }
first=0;
for (i=0; i<=(int)flag; i++) {
   if ((histoh[i]==0)&&(first==0))
      continue;
   first=1;
   fprintf(Outfp,"i=%d, h[i]=%d, \n",i-offset11,histoh[i]);
   printf("i=%d, h[i]=%d \n",i-offset11,histoh[i]);
   }
printf("\n");
fprintf(Outfp,"\n");
//
// output histogram of odd sum plus hops minus number of evens
//
printf("number of odds minus jumps plus hops minus number of evens (local, histoi) \n");
fprintf(Outfp,"number of odds minus jumps plus hops minus number of evens (local, histoi) \n");
flag=99;
for (i=99; i>0; i--) {
   if (histoi[i]==0)
      continue;
   else {
      flag=i;
      break;
      }
   }
first=0;
for (i=0; i<=(int)flag; i++) {
   if ((histoi[i]==0)&&(first==0))
      continue;
   first=1;
   fprintf(Outfp,"i=%d, h[i]=%d, \n",i-offset,histoi[i]);
   printf("i=%d, h[i]=%d \n",i-offset,histoi[i]);
   }
printf("\n");
fprintf(Outfp,"\n");
//
// output histogram of j minus number of evens plus number of hops
//
printf("j minus number of evens plus number of hops minus jumps (local, histox) \n");
fprintf(Outfp,"j minus number of evens plus number of hops minus jumps (local, histox) \n");
flag=199;
for (i=199; i>0; i--) {
   if (histox[i]==0)
      continue;
   else {
      flag=i;
      break;
      }
   }
first=0;
for (i=0; i<=(int)flag; i++) {
   if ((histox[i]==0)&&(first==0))
      continue;
   first=1;
   fprintf(Outfp,"i=%d, h[i]=%d, \n",i-offset5,histox[i]);
   printf("i=%d, h[i]=%d \n",i-offset5,histox[i]);
   }
printf("\n");
fprintf(Outfp,"\n");
//
// output histogram of j minus number of evens (local)
//
printf("j minus number of evens (local, histoy) \n");
fprintf(Outfp,"j minus number of evens (local, histoy) \n");
flag=99;
for (i=99; i>0; i--) {
   if (histoy[i]==0)
      continue;
   else {
      flag=i;
      break;
      }
   }
first=0;
sum=0;
tempi=0;
for (i=0; i<=(int)flag; i++) {
   if ((histoy[i]==0)&&(first==0))
      continue;
   first=1;
   fprintf(Outfp,"i=%d, h[i]=%d, \n",i-offset,histoy[i]);
   printf("i=%d, h[i]=%d \n",i-offset,histoy[i]);
   sum=sum+histoy[i]*(i-offset);
   tempi=tempi+histoy[i];
   }
mean=(double)sum/(double)tempi;
first=0;
var=0.0;
for (i=0; i<=(int)flag; i++) {
   if ((histoy[i]==0)&&(first==0))
      continue;
   first=1;
   tempf=(double)i-(double)offset-mean;
   var=var+tempf*tempf*(double)histoy[i];
   }
var=var/(double)(tempi-1);
std=sqrt(var);
printf("mean=%e, standard deviation=%e \n",mean,std);
fprintf(Outfp,"mean=%e, standard deviation=%e \n",mean,std);
//
// output histogram of j minus number of evens
//
printf("\n");
fprintf(Outfp,"\n");
if (flag13==0) {
   printf("j minus number of evens (global) \n");
   fprintf(Outfp,"j minus number of evens (global, histov) \n");
   }
else {
   printf("j plus d/del minus number of evens (global) \n");
   fprintf(Outfp,"j plus d/del minus number of evens (global, histov) \n");
   }
flag=1499;
for (i=1499; i>0; i--) {
   if (histov[i]==0)
      continue;
   else {
      flag=i;
      break;
      }
   }
first=0;
for (i=0; i<=(int)flag; i++) {
   if ((histov[i]==0)&&(first==0))
      continue;
   first=1;
   fprintf(Outfp,"i=%d, h[i]=%d, \n",i-offset9,histov[i]);
   printf("i=%d, h[i]=%d \n",i-offset9,histov[i]);
   }
//
// output histogram of hops minus number of jumps
//
printf("\n");
fprintf(Outfp,"\n");
printf("hops minus number of jumps (local) \n");
fprintf(Outfp,"hops minus number of jumps (local, histoz) \n");
flag=199;
for (i=199; i>0; i--) {
   if (histoz[i]==0)
      continue;
   else {
      flag=i;
      break;
      }
   }
first=0;
for (i=0; i<=(int)flag; i++) {
   if ((histoz[i]==0)&&(first==0))
      continue;
   first=1;
   fprintf(Outfp,"i=%d, h[i]=%d, \n",i-offset5,histoz[i]);
   printf("i=%d, h[i]=%d \n",i-offset5,histoz[i]);
   }
//
// output histogram of hops minus number of jumps
//
printf("\n");
fprintf(Outfp,"\n");
printf("hops minus number of jumps \n");
fprintf(Outfp,"hops minus number of jumps (global, histow) \n");
flag=499;
for (i=499; i>0; i--) {
   if (histow[i]==0)
      continue;
   else {
      flag=i;
      break;
      }
   }
first=0;
for (i=0; i<=(int)flag; i++) {
   if ((histow[i]==0)&&(first==0))
      continue;
   first=1;
   fprintf(Outfp,"i=%d, h[i]=%d, \n",i-offset8,histow[i]);
   printf("i=%d, h[i]=%d \n",i-offset8,histow[i]);
   }
printf("\n");
fprintf(Outfp,"\n");
//
// output histogram of odds minus evens (global)
//
printf("sum of odds minus sum of evens (global) \n");
fprintf(Outfp,"sum of odds minus sum of evens (global, histos) \n");
flag=699;
for (i=699; i>0; i--) {
   if (histos[i]==0)
      continue;
   else {
      flag=i;
      break;
      }
   }
first=0;
for (i=0; i<=(int)flag; i++) {
   if ((histos[i]==0)&&(first==0))
      continue;
   first=1;
   fprintf(Outfp,"i=%d, h[i]=%d, \n",i-offset11,histos[i]);
   printf("i=%d, h[i]=%d \n",i-offset11,histos[i]);
   }
printf("\n");
fprintf(Outfp,"\n");
//
// output histogram of odds minus evens (local)
//
printf("odds minus evens (local) \n");
fprintf(Outfp,"odds minus evens (local, histor) \n");
flag=99;
for (i=99; i>0; i--) {
   if (histor[i]==0)
      continue;
   else {
      flag=i;
      break;
      }
   }
first=0;
for (i=0; i<=(int)flag; i++) {
   if ((histor[i]==0)&&(first==0))
      continue;
   first=1;
   fprintf(Outfp,"i=%d, h[i]=%d, \n",i-offset,histor[i]);
   printf("i=%d, h[i]=%d \n",i-offset,histor[i]);
   }
//
// output histogram of j minus evens (continued-fraction convergents)
//
printf("\n");
fprintf(Outfp,"\n");
printf("j minus evens (convergents) \n");
fprintf(Outfp,"j minus evens (convergents, local, histot) \n");
flag=49;
for (i=49; i>0; i--) {
   if (histot[i]==0)
      flag=flag-1;
   else
      break;
   }
sum=0;
tempi=0;
first=0;
for (i=0; i<=(int)flag; i++) {
   if ((histot[i]==0)&&(first==0))
      continue;
   first=1;
   fprintf(Outfp,"i=%d, h[i]=%d, \n",i-offset4,histot[i]);
   printf("i=%d, h[i]=%d \n",i-offset4,histot[i]);
   sum=sum+histot[i]*(i-offset4);
   tempi=tempi+histot[i];
   }
mean=(double)sum/(double)tempi;
printf("n=%d, sum=%d, mean=%e \n",tempi,sum,mean);
fprintf(Outfp,"n=%d, sum=%d, mean=%e \n",tempi,sum,mean);

//
// output histogram of j minus evens (continued-fraction convergents)
//
printf("\n");
fprintf(Outfp,"\n");
printf("j minus evens (convergents, global) \n");
fprintf(Outfp,"j minus evens (convergents, global, histou) \n");
flag=99;
for (i=99; i>0; i--) {
   if (histou[i]==0)
      flag=flag-1;
   else
      break;
   }
first=0;
for (i=0; i<=(int)flag; i++) {
   if ((histou[i]==0)&&(first==0))
      continue;
   first=1;
   fprintf(Outfp,"i=%d, h[i]=%d, \n",i-offset4,histou[i]);
   printf("i=%d, h[i]=%d \n",i-offset4,histou[i]);
   }
//
// output histogram of j minus evens (continued-fraction convergents)
//
printf("\n");
fprintf(Outfp,"\n");
printf("j minus evens (convergents, evens equal odds) \n");
fprintf(Outfp,"j minus evens (convergents, evens equal odds, local, histoa) \n");
flag=49;
for (i=49; i>0; i--) {
   if (histoa[i]==0)
      flag=flag-1;
   else
      break;
   }
sum=0;
tempi=0;
first=0;
for (i=0; i<=(int)flag; i++) {
   if ((histoa[i]==0)&&(first==0))
      continue;
   first=1;
   fprintf(Outfp,"i=%d, h[i]=%d, \n",i-offset4,histoa[i]);
   printf("i=%d, h[i]=%d \n",i-offset4,histoa[i]);
   sum=sum+histoa[i]*(i-offset4);
   tempi=tempi+histoa[i];
   }
mean=(double)sum/(double)tempi;
printf("n=%d, sum=%d, mean=%e \n",tempi,sum,mean);
fprintf(Outfp,"n=%d, sum=%d, mean=%e \n",tempi,sum,mean);
//
// output histogram of j minus evens (continued-fraction convergents)
//
printf("\n");
fprintf(Outfp,"\n");
printf("j minus evens (convergents, evens equal odds, global) \n");
fprintf(Outfp,"j minus evens (convergents, evens equal odds, global, histob) \n");
flag=299;
for (i=299; i>0; i--) {
   if (histob[i]==0)
      flag=flag-1;
   else
      break;
   }
first=0;
for (i=0; i<=(int)flag; i++) {
   if ((histob[i]==0)&&(first==0))
      continue;
   first=1;
   fprintf(Outfp,"i=%d, h[i]=%d, \n",i-offset3,histob[i]);
   printf("i=%d, h[i]=%d \n",i-offset3,histob[i]);
   }
//
// output histogram
//
printf("\n");
fprintf(Outfp,"\n");
printf("3*log(c)-a \n");
fprintf(Outfp,"3*log(c)-a \n"                                                   );
flag=2999;
for (i=2999; i>0; i--) {
   if (histod[i]==0)
      flag=flag-1;
   else
      break;
   }
first=0;
for (i=0; i<=(int)flag; i++) {
   if ((histod[i]==0)&&(first==0))
      continue;
   first=1;
   fprintf(Outfp,"i=%d, h[i]=%d, \n",i-offset10,histod[i]);
   printf("i=%d, h[i]=%d \n",i-offset10,histod[i]);
   }
//
// output histogram
//
printf("\n");
fprintf(Outfp,"\n");
printf("3*log(c)-a ((L,K) in table) \n");
fprintf(Outfp,"3*log(c)-a ((L,K) in table)\n"                                   );
flag=2999;
for (i=2999; i>0; i--) {
   if (histodd[i]==0)
      flag=flag-1;
   else
      break;
   }
first=0;
for (i=0; i<=(int)flag; i++) {
   if ((histodd[i]==0)&&(first==0))
      continue;
   first=1;
   fprintf(Outfp,"i=%d, h[i]=%d, \n",i-offset10,histodd[i]);
   printf("i=%d, h[i]=%d \n",i-offset10,histodd[i]);
   }
//
// output histogram
//
printf("\n");
fprintf(Outfp,"\n");
printf("3*log(c)-a plus delta evens over del \n");
fprintf(Outfp,"3*log(c)-a plus delta evens over del \n");
flag=199;
for (i=199; i>0; i--) {
   if (histodp[i]==0)
      flag=flag-1;
   else
      break;
   }
for (i=0; i<=(int)flag; i++) {
   if (flag16<2) {
      fprintf(Outfp,"i=%d, h[i]=%d, \n",i-1,histodp[i]);
      printf("i=%d, h[i]=%d \n",i-1,histodp[i]);
      }
   else {
      if (flag16==2) {
	 fprintf(Outfp,"i=%d, h[i]=%d, \n",i-offdp,histodp[i]);
	 printf("i=%d, h[i]=%d \n",i-offdp,histodp[i]);
	 }
      else {
	 fprintf(Outfp,"i=%d, h[i]=%d, \n",i-offdp3,histodp[i]);
	 printf("i=%d, h[i]=%d \n",i-offdp3,histodp[i]);
	 }
      }
   }
printf("\n");
fprintf(Outfp,"\n");
printf("cycle count=%d, multiple-jump count=%d, two-jump count=%d, non-adjacent count=%d \n",cyccnt,mcount,twojmp,jmphop);
printf("total jumps (in multiple-jumps)=%d, total hops (in multiple-jumps)=%d \n",glojmp,glohop);
printf("hop/hop=%d, jump/hop=%d, hop/jump=%d, jump/jump=%d \n",twojmp0,twojmp1,twojmp2,twojmp3);
fprintf(Outfp,"cycle count=%d, multiple-jump count=%d, two-jump count=%d, non=adjacent count=%d \n",cyccnt,mcount,twojmp,jmphop);
fprintf(Outfp,"total jumps (in multiple-jumps)=%d, total hops (in multiple-jumps)=%d \n",glojmp,glohop);
fprintf(Outfp,"hop/hop=%d, jump/hop=%d, hop/jump=%d, jump/jump=%d \n",twojmp0,twojmp1,twojmp2,twojmp3);
printf("primary attachment points=%d \n",primary);
fprintf(Outfp,"primary attachment points=%d \n",primary);
printf("bad t chains=%d, bad u chains=%d, bad t-u chains=%d \n",badcnt,badcntu,badtucnt);
fprintf(Outfp,"bad t chains=%d, bad u chains=%d, bad t-u chains=%d \n",badcnt,badcntu,badtucnt);
printf("bad comparisons=%d, other comparisons=%d, maximum=%e \n",badcomp,compcnt,maxcmp);
fprintf(Outfp,"bad comparisons=%d, other comparisons=%d, maximum=%e \n",badcomp,compcnt,maxcmp);
printf("cycle count=%d, cycle count=%d (convergents)\n",cyccntu,cyccntb);
fprintf(Outfp,"cycle count=%d, cycle count=%d (convergents)\n",cyccntu,cyccntb);
printf("evens equal odds, bad comparison count=%d \n",equcnt);
fprintf(Outfp,"evens equal odds, bad comparison count=%d \n",equcnt);
printf("maximum ratio=%e, minimum ratio=%e, count=%d, c=%d, k=%d \n",maxminrat,minmaxrat,lamcnt,savec,ksave);
fprintf(Outfp,"maximum ratio=%e, minimum ratio=%e, count=%d, c=%d, k=%d \n",maxminrat,minmaxrat,lamcnt,savec,ksave);
printf("maximum ratio=%e, minimum ratio=%e, count=%d \n",maxminratc,minmaxratc,lamcntc);
fprintf(Outfp,"maximum ratio=%e, minimum ratio=%e, count=%d \n",maxminratc,minmaxratc,lamcntc);
printf("flubs=%d, maximum ratio=%e, flubs=%d, pcount=%d \n",flubx,maxdiff,flubs,pcount);
fprintf(Outfp,"flubs=%d, maximum ratio=%e, flubs=%d, pcount=%d \n",flubx,maxdiff,flubs,pcount);
printf("errors=%d, %d, %d, %d, %d, %d \n",error[0],error[1],error[2],error[3],error[4],error[5]);
fprintf(Outfp,"errors=%d, %d, %d, %d, %d, %d \n",error[0],error[1],error[2],error[3],error[4],error[5]);
printf("counts=%d, %d, %d, %d, %d, %d \n",count1,count2,count3,count4,count5,count6);
fprintf(Outfp,"counts=%d, %d, %d, %d, %d, %d \n",count1,count2,count3,count4,count5,count6);
printf("\n");
fprintf(Outfp,"\n");
printf("powers for specified a value \n");
fprintf(Outfp,"powers for specified a value \n");
for (i=0; i<40; i++) {
   printf("i=%d, counts=%d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, \n",i,chhist[i],d0hist[i],d1hist[i],d2hist[i],d3hist[i],d4hist[i],d5hist[i],d6hist[i],d7hist[i],d8hist[i],d9hist[i],d10hist[i]);
   fprintf(Outfp,"counts=%d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, \n",chhist[i],d0hist[i],d1hist[i],d2hist[i],d3hist[i],d4hist[i],d5hist[i],d6hist[i],d7hist[i],d8hist[i],d9hist[i],d10hist[i]);
   }
printf("\n");
fprintf(Outfp,"\n");
printf("utmax/lambda, lambda/lambda1, lambda1/lambda2, etc.\n");
fprintf(Outfp,"utmax/lambda, lambda/lambda1, lambda1/lambda2, etc.\n");
for (i=0; i<40; i++) {
   printf("i=%d, counts=%d, %d, %d, %d, %d, %d, %d, \n",i,d11hist[i],d12hist[i],d13hist[i],d14hist[i],d15hist[i],d16hist[i],d17hist[i]);
   fprintf(Outfp,"i=%d, counts=%d, %d, %d, %d, %d, %d, %d, \n",i,d11hist[i],d12hist[i],d13hist[i],d14hist[i],d15hist[i],d16hist[i],d17hist[i]);
   }
printf("\n");
fprintf(Outfp,"\n");
printf("utmax/lambda \n");
fprintf(Outfp,"utmax/lambda \n");
for (i=0; i<20; i++) {
   printf("counts=%d, %d, %d, %d, %d, %d, %d, %d, ",d18hist[i],d19hist[i],d20hist[i],d21hist[i],d22hist[i],d23hist[i],d24hist[i],d25hist[i]);
   fprintf(Outfp,"counts=%d, %d, %d, %d, %d, %d, %d, %d, ",d18hist[i],d19hist[i],d20hist[i],d21hist[i],d22hist[i],d23hist[i],d24hist[i],d25hist[i]);
   printf("%d, %d, %d, %d, %d, %d, %d, %d, \n",d42hist[i],d43hist[i],d44hist[i],d45hist[i],d46hist[i],d47hist[i],d48hist[i],d49hist[i]);
   fprintf(Outfp,"%d, %d, %d, %d, %d, %d, %d, %d, \n",d42hist[i],d43hist[i],d44hist[i],d45hist[i],d46hist[i],d47hist[i],d48hist[i],d49hist[i]);
   }
printf("\n");
fprintf(Outfp,"\n");
printf("umax/lambdau \n");
fprintf(Outfp,"umax/lambdau \n");
for (i=0; i<20; i++) {
   printf("counts=%d, %d, %d, %d, %d, %d, %d, %d, %d, %d, \n",d50hist[i],d51hist[i],d52hist[i],d53hist[i],d54hist[i],d55hist[i],d56hist[i],d57hist[i],d58hist[i],d59hist[i]);
   fprintf(Outfp,"counts=%d, %d, %d, %d, %d, %d, %d, %d, %d, %d, \n",d50hist[i],d51hist[i],d52hist[i],d53hist[i],d54hist[i],d55hist[i],d56hist[i],d57hist[i],d58hist[i],d59hist[i]);
   }
printf("\n");
fprintf(Outfp,"\n");
printf("tmax/lambdat \n");
fprintf(Outfp,"tmax/lambdat \n");
for (i=0; i<20; i++) {
   printf("counts=%d, %d, %d, %d, %d, %d, %d, %d, %d, %d, \n",d60hist[i],d61hist[i],d62hist[i],d63hist[i],d64hist[i],d65hist[i],d66hist[i],d67hist[i],d68hist[i],d69hist[i]);
   fprintf(Outfp,"counts=%d, %d, %d, %d, %d, %d, %d, %d, %d, %d, \n",d60hist[i],d61hist[i],d62hist[i],d63hist[i],d64hist[i],d65hist[i],d66hist[i],d67hist[i],d68hist[i],d69hist[i]);
   }
printf("\n");
fprintf(Outfp,"\n");
printf("lambda/lambda1 \n");
fprintf(Outfp,"lambda/lambda1 \n");
for (i=0; i<40; i++) {
   printf("counts=%d, %d, %d, %d, %d, %d, %d, %d, \n",d26hist[i],d27hist[i],d28hist[i],d29hist[i],d30hist[i],d31hist[i],d32hist[i],d33hist[i]);
   fprintf(Outfp,"counts=%d, %d, %d, %d, %d, %d, %d, %d, \n",d26hist[i],d27hist[i],d28hist[i],d29hist[i],d30hist[i],d31hist[i],d32hist[i],d33hist[i]);
   }
printf("\n");
fprintf(Outfp,"\n");
printf("lambda1/lambda2 \n");
fprintf(Outfp,"lambda1/lambda2 \n");
for (i=0; i<40; i++) {
   printf("counts=%d, %d, %d, %d, %d, %d, %d, %d, \n",d34hist[i],d35hist[i],d36hist[i],d37hist[i],d38hist[i],d39hist[i],d40hist[i],d41hist[i]);
   fprintf(Outfp,"counts=%d, %d, %d, %d, %d, %d, %d, %d, \n",d34hist[i],d35hist[i],d36hist[i],d37hist[i],d38hist[i],d39hist[i],d40hist[i],d41hist[i]);
   }
if (eowrite==0) {
   printf("\n");
   fprintf(Outfp,"\n");
   printf("count=%d \n",onecnt);
   fprintf(Outfp,"count=%d \n",onecnt);
   printf("generalized continued-fraction convergents \n");
   fprintf(Outfp,"generalized continued-fraction convergents \n");
   for (i=0; i<75; i++) {
      printf("i=%d, c=%d, c=%d, c=%d \n",i,concov[3*i],concov[3*i+1],concov[3*i+2]);
      fprintf(Outfp,"i=%d, c=%d, c=%d, c=%d \n",i,concov[3*i],concov[3*i+1],concov[3*i+2]);
      }
   printf("\n");
   fprintf(Outfp,"\n");
   for (i=0; i<75; i++) {
      printf("i=%d, c=%d, c=%d, c=%d \n",i,concove[3*i],concove[3*i+1],concove[3*i+2]);
      fprintf(Outfp,"i=%d, c=%d, c=%d, c=%d \n",i,concove[3*i],concove[3*i+1],concove[3*i+2]);
      }
   }
if (eowrite!=0) {
   printf("\n");
   fprintf(Outfp,"\n");
   printf("histogram of number of cycles with attachment points \n");
   fprintf(Outfp,"histogram of number of cycles with attachment points \n");
   for (i=0; i<30; i++) {
      printf("i=%d, count=%d \n",i,ncyc[i]);
      fprintf(Outfp,"i=%d, count=%d \n",i,ncyc[i]);
      }
   printf("\n");
   fprintf(Outfp,"\n");
   printf("count=%d \n",outklind);
   fprintf(Outfp,"count=%d \n",outklind);
   wrap=0;
   for (i=0; i<outklind; i++) {
      printf("%d,%d,",outkl[2*i],outkl[2*i+1]);
      fprintf(Outfp,"%d,%d,",outkl[2*i],outkl[2*i+1]);
      wrap=wrap+1;
      if (wrap==10) {
	 wrap=0;
	 printf("\n");
	 fprintf(Outfp,"\n");
	 }
      }
   printf("\n");
   fprintf(Outfp,"\n");
   printf("numbc=%d \n",numbc);
   fprintf(Outfp,"numbc=%d \n",numbc);
   wrap=0;
   for (i=0; i<numbc; i++) {
      printf("%d,",outcnt[i]);
      fprintf(Outfp,"%d,",outcnt[i]);
      wrap=wrap+1;
      if (wrap==20) {
	 wrap=0;
	 printf("\n");
	 fprintf(Outfp,"\n");
	 }
      }
   printf("\n");
   fprintf(Outfp,"\n");
   }
zskip:
fclose(Outfp);
return(0);
}