view interps/c-intercal/oilout00.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_0(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==MINGLE &&
     (np->lval->opcode==MESH || np->lval->opcode==MESH32) &&
     (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;
    OPTING(minglefold);
    tp=newnode();
    MAYBENEWNODE(tp);
    tp->opcode=MESH32;
    tp->width=32;
    tp->constant=(mingle(x1,x2));
    nodefree(np->lval); nodefree(np->rval);
    tempw=np->width; *np=*tp; np->width=tempw; free(tp);
  } while(0);

  checknodeactbits(np);
  if(np->opcode==SELECT &&
     (np->lval->opcode==MESH || np->lval->opcode==MESH32) &&
     (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;
    OPTING(selectfold);
    tp=newnode();
    MAYBENEWNODE(tp);
    tp->opcode=MESH32;
    tp->width=32;
    tp->constant=(iselect(x1,x2));
    nodefree(np->lval); nodefree(np->rval);
    tempw=np->width; *np=*tp; np->width=tempw; free(tp);
  } while(0);

  checknodeactbits(np);
  if(np->opcode==AND &&
     np->width==32 &&
     (np->rval->opcode==MESH || np->rval->opcode==MESH32))
  do
  {
    x1=np->rval->constant; c1=np->rval->optdata;
    OPTING(and32fold);
    tp=newnode();
    MAYBENEWNODE(tp);
    tp->opcode=MESH32;
    tp->width=32;
    tp->constant=(and32(x1));
    nodefree(np->lval); nodefree(np->rval);
    tempw=np->width; *np=*tp; np->width=tempw; free(tp);
  } while(0);

  checknodeactbits(np);
  if(np->opcode==OR &&
     np->width==32 &&
     (np->rval->opcode==MESH || np->rval->opcode==MESH32))
  do
  {
    x1=np->rval->constant; c1=np->rval->optdata;
    OPTING(or32fold);
    tp=newnode();
    MAYBENEWNODE(tp);
    tp->opcode=MESH32;
    tp->width=32;
    tp->constant=(or32(x1));
    nodefree(np->lval); nodefree(np->rval);
    tempw=np->width; *np=*tp; np->width=tempw; free(tp);
  } while(0);

  checknodeactbits(np);
  if(np->opcode==XOR &&
     np->width==32 &&
     (np->rval->opcode==MESH || np->rval->opcode==MESH32))
  do
  {
    x1=np->rval->constant; c1=np->rval->optdata;
    OPTING(xor32fold);
    tp=newnode();
    MAYBENEWNODE(tp);
    tp->opcode=MESH32;
    tp->width=32;
    tp->constant=(xor32(x1));
    nodefree(np->lval); nodefree(np->rval);
    tempw=np->width; *np=*tp; np->width=tempw; free(tp);
  } while(0);

  checknodeactbits(np);
  if(np->opcode==AND &&
     np->width==16 &&
     (np->rval->opcode==MESH || np->rval->opcode==MESH32))
  do
  {
    x1=np->rval->constant; c1=np->rval->optdata;
    OPTING(and16fold);
    tp=newnode();
    MAYBENEWNODE(tp);
    tp->opcode=MESH32;
    tp->width=32;
    tp->constant=(and16(x1));
    nodefree(np->lval); nodefree(np->rval);
    tempw=np->width; *np=*tp; np->width=tempw; free(tp);
  } while(0);

  checknodeactbits(np);
  if(np->opcode==OR &&
     np->width==16 &&
     (np->rval->opcode==MESH || np->rval->opcode==MESH32))
  do
  {
    x1=np->rval->constant; c1=np->rval->optdata;
    OPTING(or16fold);
    tp=newnode();
    MAYBENEWNODE(tp);
    tp->opcode=MESH32;
    tp->width=32;
    tp->constant=(or16(x1));
    nodefree(np->lval); nodefree(np->rval);
    tempw=np->width; *np=*tp; np->width=tempw; free(tp);
  } while(0);

  checknodeactbits(np);
  if(np->opcode==XOR &&
     np->width==16 &&
     (np->rval->opcode==MESH || np->rval->opcode==MESH32))
  do
  {
    x1=np->rval->constant; c1=np->rval->optdata;
    OPTING(xor16fold);
    tp=newnode();
    MAYBENEWNODE(tp);
    tp->opcode=MESH32;
    tp->width=32;
    tp->constant=(xor16(x1));
    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==MESH || np->rval->opcode==MESH32))
  do
  {
    x2=np->rval->constant; c2=np->rval->optdata;
    x1=np->lval->constant; c1=np->lval->optdata;
    OPTING(cfold);
    tp=newnode();
    MAYBENEWNODE(tp);
    tp->opcode=MESH32;
    tp->width=32;
    tp->constant=(x1 & 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_OR &&
     (np->lval->opcode==MESH || np->lval->opcode==MESH32) &&
     (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;
    OPTING(cfold);
    tp=newnode();
    MAYBENEWNODE(tp);
    tp->opcode=MESH32;
    tp->width=32;
    tp->constant=(x1 | 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_XOR &&
     (np->lval->opcode==MESH || np->lval->opcode==MESH32) &&
     (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;
    OPTING(cfold);
    tp=newnode();
    MAYBENEWNODE(tp);
    tp->opcode=MESH32;
    tp->width=32;
    tp->constant=(x1 ^ 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_PLUS &&
     (np->lval->opcode==MESH || np->lval->opcode==MESH32) &&
     (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;
    OPTING(cfold);
    tp=newnode();
    MAYBENEWNODE(tp);
    tp->opcode=MESH32;
    tp->width=32;
    tp->constant=(x1 + 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_MINUS &&
     (np->lval->opcode==MESH || np->lval->opcode==MESH32) &&
     (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;
    OPTING(cfold);
    tp=newnode();
    MAYBENEWNODE(tp);
    tp->opcode=MESH32;
    tp->width=32;
    tp->constant=(x1 - 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_TIMES &&
     (np->lval->opcode==MESH || np->lval->opcode==MESH32) &&
     (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;
    OPTING(cfold);
    tp=newnode();
    MAYBENEWNODE(tp);
    tp->opcode=MESH32;
    tp->width=32;
    tp->constant=(x1 * 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_DIVIDEBY &&
     (np->lval->opcode==MESH || np->lval->opcode==MESH32) &&
     (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;
    OPTING(cfold);
    tp=newnode();
    MAYBENEWNODE(tp);
    tp->opcode=MESH32;
    tp->width=32;
    tp->constant=(x1 / 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_MODULUS &&
     (np->lval->opcode==MESH || np->lval->opcode==MESH32) &&
     (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;
    OPTING(cfold);
    tp=newnode();
    MAYBENEWNODE(tp);
    tp->opcode=MESH32;
    tp->width=32;
    tp->constant=(x1 % 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_GREATER &&
     (np->lval->opcode==MESH || np->lval->opcode==MESH32) &&
     (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;
    OPTING(cfold);
    tp=newnode();
    MAYBENEWNODE(tp);
    tp->opcode=MESH32;
    tp->width=32;
    tp->constant=(x1 > 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_LESS &&
     (np->lval->opcode==MESH || np->lval->opcode==MESH32) &&
     (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;
    OPTING(cfold);
    tp=newnode();
    MAYBENEWNODE(tp);
    tp->opcode=MESH32;
    tp->width=32;
    tp->constant=(x1 < 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==MESH || np->lval->opcode==MESH32) &&
     (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;
    OPTING(cfold);
    tp=newnode();
    MAYBENEWNODE(tp);
    tp->opcode=MESH32;
    tp->width=32;
    tp->constant=(x1 >> x2);
    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;
}