Mercurial > repo
view interps/c-intercal/oilout05.c @ 12518:2d8fe55c6e65 draft default tip
<int-e> learn The password of the month is release incident pilot.
author | HackEso <hackeso@esolangs.org> |
---|---|
date | Sun, 03 Nov 2024 00:31:02 +0000 |
parents | 859f9b4339e6 |
children |
line wrap: on
line source
/* Automatically generated output, edit source and recompile to change */ #include "oil.h" int optimize_pass1_5(node *np) { int opted=0; unsigned long c,c1,c2,c3,c4,c5,c6,c7,c8,c9; unsigned long x,x1,x2,x3,x4,x5,x6,x7,x8,x9,r; int tempw; node *tp; checknodeactbits(np); if(np->opcode==C_RSHIFTBY && np->lval->opcode==C_LSHIFTBY && (np->lval->rval->opcode==MESH || np->lval->rval->opcode==MESH32) && (np->rval->opcode==MESH || np->rval->opcode==MESH32)) do { x3=np->rval->constant; c3=np->rval->optdata; x2=np->lval->rval->constant; c2=np->lval->rval->optdata; x1=np->lval->lval->constant; c1=np->lval->lval->optdata; x=x3; c=c3; if(!(x>x2)) break; OPTING(combinelrshift); tp=newnode(); MAYBENEWNODE(tp); tp->opcode=C_RSHIFTBY; tp->width=32; tp->lval=np->lval->lval; np->lval->lval=0; MAYBENEWNODE(tp->rval); tp->rval->opcode=MESH32; tp->rval->width=32; tp->rval->constant=(x3-x2); nodefree(np->lval); nodefree(np->rval); tempw=np->width; *np=*tp; np->width=tempw; free(tp); } while(0); checknodeactbits(np); if(np->opcode==C_RSHIFTBY && np->lval->opcode==C_LSHIFTBY && (np->lval->rval->opcode==MESH || np->lval->rval->opcode==MESH32) && (np->rval->opcode==MESH || np->rval->opcode==MESH32)) do { x3=np->rval->constant; c3=np->rval->optdata; x2=np->lval->rval->constant; c2=np->lval->rval->optdata; x1=np->lval->lval->constant; c1=np->lval->lval->optdata; x=x3; c=c3; if(!(x==x2)) break; OPTING(combinelrshift); tp=newnode(); tp=np->lval->lval; np->lval->lval=0; nodefree(np->lval); nodefree(np->rval); tempw=np->width; *np=*tp; np->width=tempw; free(tp); } while(0); checknodeactbits(np); if(np->opcode==C_RSHIFTBY && np->lval->opcode==C_LSHIFTBY && (np->lval->rval->opcode==MESH || np->lval->rval->opcode==MESH32) && (np->rval->opcode==MESH || np->rval->opcode==MESH32)) do { x3=np->rval->constant; c3=np->rval->optdata; x2=np->lval->rval->constant; c2=np->lval->rval->optdata; x1=np->lval->lval->constant; c1=np->lval->lval->optdata; x=x3; c=c3; if(!(x<x2)) break; OPTING(combinelrshift); tp=newnode(); MAYBENEWNODE(tp); tp->opcode=C_LSHIFTBY; tp->width=32; tp->lval=np->lval->lval; np->lval->lval=0; MAYBENEWNODE(tp->rval); tp->rval->opcode=MESH32; tp->rval->width=32; tp->rval->constant=(x2-x3); nodefree(np->lval); nodefree(np->rval); tempw=np->width; *np=*tp; np->width=tempw; free(tp); } while(0); checknodeactbits(np); if(np->opcode==C_LSHIFTBY && np->lval->opcode==C_RSHIFTBY && (np->lval->rval->opcode==MESH || np->lval->rval->opcode==MESH32) && (np->rval->opcode==MESH || np->rval->opcode==MESH32)) do { x3=np->rval->constant; c3=np->rval->optdata; x2=np->lval->rval->constant; c2=np->lval->rval->optdata; x1=np->lval->lval->constant; c1=np->lval->lval->optdata; x=x3; c=c3; if(!(x>x2)) break; OPTING(combinerlshift); tp=newnode(); MAYBENEWNODE(tp); tp->opcode=C_LSHIFTBY; tp->width=32; tp->lval=np->lval->lval; np->lval->lval=0; MAYBENEWNODE(tp->rval); tp->rval->opcode=MESH32; tp->rval->width=32; tp->rval->constant=(x3-x2); nodefree(np->lval); nodefree(np->rval); tempw=np->width; *np=*tp; np->width=tempw; free(tp); } while(0); checknodeactbits(np); if(np->opcode==C_LSHIFTBY && np->lval->opcode==C_RSHIFTBY && (np->lval->rval->opcode==MESH || np->lval->rval->opcode==MESH32) && (np->rval->opcode==MESH || np->rval->opcode==MESH32)) do { x3=np->rval->constant; c3=np->rval->optdata; x2=np->lval->rval->constant; c2=np->lval->rval->optdata; x1=np->lval->lval->constant; c1=np->lval->lval->optdata; x=x3; c=c3; if(!(x==x2)) break; OPTING(combinerlshift); tp=newnode(); tp=np->lval->lval; np->lval->lval=0; nodefree(np->lval); nodefree(np->rval); tempw=np->width; *np=*tp; np->width=tempw; free(tp); } while(0); checknodeactbits(np); if(np->opcode==C_LSHIFTBY && np->lval->opcode==C_RSHIFTBY && (np->lval->rval->opcode==MESH || np->lval->rval->opcode==MESH32) && (np->rval->opcode==MESH || np->rval->opcode==MESH32)) do { x3=np->rval->constant; c3=np->rval->optdata; x2=np->lval->rval->constant; c2=np->lval->rval->optdata; x1=np->lval->lval->constant; c1=np->lval->lval->optdata; x=x3; c=c3; if(!(x<x2)) break; OPTING(combinerlshift); tp=newnode(); MAYBENEWNODE(tp); tp->opcode=C_RSHIFTBY; tp->width=32; tp->lval=np->lval->lval; np->lval->lval=0; MAYBENEWNODE(tp->rval); tp->rval->opcode=MESH32; tp->rval->width=32; tp->rval->constant=(x2-x3); nodefree(np->lval); nodefree(np->rval); tempw=np->width; *np=*tp; np->width=tempw; free(tp); } while(0); checknodeactbits(np); if(np->opcode==C_RSHIFTBY && np->lval->opcode==C_RSHIFTBY && (np->lval->rval->opcode==MESH || np->lval->rval->opcode==MESH32) && (np->rval->opcode==MESH || np->rval->opcode==MESH32)) do { x3=np->rval->constant; c3=np->rval->optdata; x2=np->lval->rval->constant; c2=np->lval->rval->optdata; x1=np->lval->lval->constant; c1=np->lval->lval->optdata; OPTING(combinerrshift); tp=newnode(); MAYBENEWNODE(tp); tp->opcode=C_RSHIFTBY; tp->width=32; tp->lval=np->lval->lval; np->lval->lval=0; MAYBENEWNODE(tp->rval); tp->rval->opcode=MESH32; tp->rval->width=32; tp->rval->constant=(x2+x3); nodefree(np->lval); nodefree(np->rval); tempw=np->width; *np=*tp; np->width=tempw; free(tp); } while(0); checknodeactbits(np); if(np->opcode==C_RSHIFTBY && (np->rval->opcode==MESH || np->rval->opcode==MESH32) && np->rval->constant==0LU) do { x1=np->lval->constant; c1=np->lval->optdata; OPTING(nullshift); tp=newnode(); tp=np->lval; np->lval=0; nodefree(np->lval); nodefree(np->rval); tempw=np->width; *np=*tp; np->width=tempw; free(tp); } while(0); checknodeactbits(np); if(np->opcode==C_LSHIFTBY && (np->rval->opcode==MESH || np->rval->opcode==MESH32) && np->rval->constant==0LU) do { x1=np->lval->constant; c1=np->lval->optdata; OPTING(nullshift); tp=newnode(); tp=np->lval; np->lval=0; nodefree(np->lval); nodefree(np->rval); tempw=np->width; *np=*tp; np->width=tempw; free(tp); } while(0); checknodeactbits(np); if(np->opcode==C_AND && np->lval->opcode==XOR && np->lval->width==32 && np->lval->rval->opcode==MINGLE && (np->lval->rval->rval->opcode==MESH || np->lval->rval->rval->opcode==MESH32) && np->lval->rval->rval->constant==1LU && (np->rval->opcode==MESH || np->rval->opcode==MESH32) && np->rval->constant==3LU) do { x1=np->lval->rval->lval->constant; c1=np->lval->rval->lval->optdata; x=x1; c=c1; if(!(!(c&4294901760LU))) break; OPTING(xorto1or2); tp=newnode(); MAYBENEWNODE(tp); tp->opcode=C_PLUS; tp->width=32; MAYBENEWNODE(tp->lval); tp->lval->opcode=C_AND; tp->lval->width=32; tp->lval->lval=np->lval->rval->lval; np->lval->rval->lval=0; MAYBENEWNODE(tp->lval->rval); tp->lval->rval->opcode=MESH32; tp->lval->rval->width=32; tp->lval->rval->constant=(1LU); MAYBENEWNODE(tp->rval); tp->rval->opcode=MESH32; tp->rval->width=32; tp->rval->constant=(1LU); nodefree(np->lval); nodefree(np->rval); tempw=np->width; *np=*tp; np->width=tempw; free(tp); } while(0); checknodeactbits(np); if(np->opcode==C_AND && np->lval->opcode==XOR && np->lval->width==32 && np->lval->rval->opcode==MINGLE && (np->lval->rval->rval->opcode==MESH || np->lval->rval->rval->opcode==MESH32) && np->lval->rval->rval->constant==2LU && (np->rval->opcode==MESH || np->rval->opcode==MESH32) && np->rval->constant==3LU) do { x1=np->lval->rval->lval->constant; c1=np->lval->rval->lval->optdata; x=x1; c=c1; if(!(!(c&4294901760LU))) break; OPTING(xorto1or2); tp=newnode(); MAYBENEWNODE(tp); tp->opcode=C_MINUS; tp->width=32; MAYBENEWNODE(tp->lval); tp->lval->opcode=MESH32; tp->lval->width=32; tp->lval->constant=(2LU); MAYBENEWNODE(tp->rval); tp->rval->opcode=C_AND; tp->rval->width=32; tp->rval->lval=np->lval->rval->lval; np->lval->rval->lval=0; MAYBENEWNODE(tp->rval->rval); tp->rval->rval->opcode=MESH32; tp->rval->rval->width=32; tp->rval->rval->constant=(1LU); nodefree(np->lval); nodefree(np->rval); tempw=np->width; *np=*tp; np->width=tempw; free(tp); } while(0); checknodeactbits(np); if(np->opcode==C_AND && (np->rval->opcode==MESH || np->rval->opcode==MESH32)) do { x1=np->lval->constant; c1=np->lval->optdata; x=np->rval->constant; c=np->rval->optdata; if(!(!(c1&~x))) break; OPTING(unneededand); tp=newnode(); tp=np->lval; np->lval=0; nodefree(np->lval); nodefree(np->rval); tempw=np->width; *np=*tp; np->width=tempw; free(tp); } while(0); checknodeactbits(np); if(np->opcode==C_AND && (np->lval->opcode==MESH || np->lval->opcode==MESH32)) do { x1=np->rval->constant; c1=np->rval->optdata; x=np->lval->constant; c=np->lval->optdata; if(!(!(c1&~x))) break; OPTING(unneededand); tp=newnode(); tp=np->rval; np->rval=0; nodefree(np->lval); nodefree(np->rval); tempw=np->width; *np=*tp; np->width=tempw; free(tp); } while(0); checknodeactbits(np); if(np->opcode==C_AND && np->lval->opcode==C_AND && (np->lval->rval->opcode==MESH || np->lval->rval->opcode==MESH32) && (np->rval->opcode==MESH || np->rval->opcode==MESH32)) do { x3=np->rval->constant; c3=np->rval->optdata; x2=np->lval->rval->constant; c2=np->lval->rval->optdata; x1=np->lval->lval->constant; c1=np->lval->lval->optdata; OPTING(combineand); tp=newnode(); MAYBENEWNODE(tp); tp->opcode=C_AND; tp->width=32; tp->lval=np->lval->lval; np->lval->lval=0; MAYBENEWNODE(tp->rval); tp->rval->opcode=MESH32; tp->rval->width=32; tp->rval->constant=(x2&x3); nodefree(np->lval); nodefree(np->rval); tempw=np->width; *np=*tp; np->width=tempw; free(tp); } while(0); checknodeactbits(np); if(np->opcode==C_AND && np->lval->opcode==C_AND && (np->lval->lval->opcode==MESH || np->lval->lval->opcode==MESH32) && (np->rval->opcode==MESH || np->rval->opcode==MESH32)) do { x3=np->rval->constant; c3=np->rval->optdata; x2=np->lval->lval->constant; c2=np->lval->lval->optdata; x1=np->lval->rval->constant; c1=np->lval->rval->optdata; OPTING(combineand); tp=newnode(); MAYBENEWNODE(tp); tp->opcode=C_AND; tp->width=32; tp->lval=np->lval->rval; np->lval->rval=0; MAYBENEWNODE(tp->rval); tp->rval->opcode=MESH32; tp->rval->width=32; tp->rval->constant=(x2&x3); nodefree(np->lval); nodefree(np->rval); tempw=np->width; *np=*tp; np->width=tempw; free(tp); } while(0); checknodeactbits(np); if(np->opcode==C_AND && (np->lval->opcode==MESH || np->lval->opcode==MESH32) && np->rval->opcode==C_AND && (np->rval->rval->opcode==MESH || np->rval->rval->opcode==MESH32)) do { x3=np->lval->constant; c3=np->lval->optdata; x2=np->rval->rval->constant; c2=np->rval->rval->optdata; x1=np->rval->lval->constant; c1=np->rval->lval->optdata; OPTING(combineand); tp=newnode(); MAYBENEWNODE(tp); tp->opcode=C_AND; tp->width=32; tp->lval=np->rval->lval; np->rval->lval=0; MAYBENEWNODE(tp->rval); tp->rval->opcode=MESH32; tp->rval->width=32; tp->rval->constant=(x2&x3); nodefree(np->lval); nodefree(np->rval); tempw=np->width; *np=*tp; np->width=tempw; free(tp); } while(0); checknodeactbits(np); if(np->opcode==C_AND && (np->lval->opcode==MESH || np->lval->opcode==MESH32) && np->rval->opcode==C_AND && (np->rval->lval->opcode==MESH || np->rval->lval->opcode==MESH32)) do { x3=np->lval->constant; c3=np->lval->optdata; x2=np->rval->lval->constant; c2=np->rval->lval->optdata; x1=np->rval->rval->constant; c1=np->rval->rval->optdata; OPTING(combineand); tp=newnode(); MAYBENEWNODE(tp); tp->opcode=C_AND; tp->width=32; tp->lval=np->rval->rval; np->rval->rval=0; MAYBENEWNODE(tp->rval); tp->rval->opcode=MESH32; tp->rval->width=32; tp->rval->constant=(x2&x3); nodefree(np->lval); nodefree(np->rval); tempw=np->width; *np=*tp; np->width=tempw; free(tp); } while(0); checknodeactbits(np); if(np->opcode==C_AND && (np->rval->opcode==MESH || np->rval->opcode==MESH32)) do { x2=np->rval->constant; c2=np->rval->optdata; x1=np->lval->constant; c1=np->lval->optdata; x=x2; c=c2; if(!((~c1)&x)) break; OPTING(weakenand); tp=newnode(); MAYBENEWNODE(tp); tp->opcode=C_AND; tp->width=32; tp->lval=np->lval; np->lval=0; MAYBENEWNODE(tp->rval); tp->rval->opcode=MESH32; tp->rval->width=32; tp->rval->constant=(c1&x2); nodefree(np->lval); nodefree(np->rval); tempw=np->width; *np=*tp; np->width=tempw; free(tp); } while(0); checknodeactbits(np); if(np->opcode==C_AND && (np->lval->opcode==MESH || np->lval->opcode==MESH32)) do { x2=np->lval->constant; c2=np->lval->optdata; x1=np->rval->constant; c1=np->rval->optdata; x=x2; c=c2; if(!((~c1)&x)) break; OPTING(weakenand); tp=newnode(); MAYBENEWNODE(tp); tp->opcode=C_AND; tp->width=32; tp->lval=np->rval; np->rval=0; MAYBENEWNODE(tp->rval); tp->rval->opcode=MESH32; tp->rval->width=32; tp->rval->constant=(c1&x2); nodefree(np->lval); nodefree(np->rval); tempw=np->width; *np=*tp; np->width=tempw; free(tp); } while(0); checknodeactbits(np); if(np->opcode==C_LSHIFTBY && np->lval->opcode==C_AND && np->lval->lval->opcode==XOR && np->lval->lval->width==32 && np->lval->lval->rval->opcode==C_OR && (np->lval->lval->rval->rval->opcode==MESH || np->lval->lval->rval->rval->opcode==MESH32) && np->lval->lval->rval->rval->constant==1431655765LU && (np->lval->rval->opcode==MESH || np->lval->rval->opcode==MESH32) && np->lval->rval->constant==1431655765LU && (np->rval->opcode==MESH || np->rval->opcode==MESH32) && np->rval->constant==1LU) do { x1=np->lval->lval->rval->lval->constant; c1=np->lval->lval->rval->lval->optdata; OPTING(com1z0); tp=newnode(); MAYBENEWNODE(tp); tp->opcode=C_XOR; tp->width=32; MAYBENEWNODE(tp->lval); tp->lval->opcode=C_AND; tp->lval->width=32; tp->lval->lval=np->lval->lval->rval->lval; np->lval->lval->rval->lval=0; MAYBENEWNODE(tp->lval->rval); tp->lval->rval->opcode=MESH32; tp->lval->rval->width=32; tp->lval->rval->constant=(2863311530LU); MAYBENEWNODE(tp->rval); tp->rval->opcode=MESH32; tp->rval->width=32; tp->rval->constant=(2863311530LU); nodefree(np->lval); nodefree(np->rval); tempw=np->width; *np=*tp; np->width=tempw; free(tp); } while(0); c=c1=c2=c3=c4=c5=c6=c7=c8=c9=0; x=x1=x2=x3=x4=x5=x6=x7=x8=x9=r=0; if(c+c1+c2+c3+c4+c5+c6+c7+c8+c9+r+ x+x1+x2+x3+x4+x5+x6+x7+x8+x9) raise(SIGSEGV); return opted; }