

#include "BUILTIN.h"

#include "Denotation.h"
extern OBJ _ANatMap_12(OBJ,OBJ);extern OBJ __ANatMap_12;

#include "Array.h"
extern OBJ __AOcError_15;
extern OBJ _AOcError_21(OBJ,OBJ);extern OBJ __AOcError_21;
extern OBJ _AImpl_84(OBJ);extern OBJ __AImpl_84;
extern OBJ _AImpl_92(OBJ);extern OBJ __AImpl_92;
extern OBJ _AImpl_102(OBJ);extern OBJ __AImpl_102;
extern OBJ _AImpl_103(OBJ);extern OBJ __AImpl_103;
extern OBJ __ARepSet_2;

#include "Nat.h"

#include "Char.h"

#include "Bitset.h"

#include "Int.h"
extern TUP5 _ATypeIndepExprAnalysis_1(OBJ,OBJ);extern OBJ __ATypeIndepExprAnalysis_1;
extern TUP2 _ATypeIndepExprAnalysis_3(OBJ,OBJ);extern OBJ __ATypeIndepExprAnalysis_3;
extern OBJ _ATypeIndepExprAnalysis_4(OBJ,OBJ);extern OBJ __ATypeIndepExprAnalysis_4;
extern TUP4 _ATypeIndepFormAnalysis_1(OBJ);OBJ __ATypeIndepFormAnalysis_1; /* rearrange */

extern TUP4 _ATypeIndepFormAnalysis_1(register OBJ x1) /* rearrange */
{TUP4 r;OBJ* p1=&r.c1;OBJ* p2=&r.c2;OBJ* p3=&r.c3;OBJ* p4=&r.c4;
 for(;;){
  switch(TGPRD(x1)){
   case 7:
    CPPRD(x1,2);
    {OBJ x1218;OBJ x1219;OBJ x1220;TUP4 x1222;TUP4 x1227;
     x1218=_AImpl_84(x1);
     x1219=_AImpl_103(x1);
     x1220=_AImpl_102(x1);
     x1222=_ATypeIndepFormAnalysis_1(x1220);
     x1227=_ATypeIndepFormAnalysis_1(x1219);
     *p2=_ANatMap_12(x1227.c2,x1222.c2);
     *p3=_ANatMap_12(x1227.c3,x1222.c3);
     PRD(3,7,*p1);FLD(*p1,1)=x1227.c1;FLD(*p1,2)=x1222.c1;FLD(*p1,3)=x1218;
     *p4=_AOcError_21(x1227.c4,x1222.c4);}break;
   case 9:
    {OBJ x1235=FLD(x1,1);
     COPY(x1235,3);
     CPPRD(x1,1);
     {OBJ x1238;OBJ x1239;TUP4 x1241;OBJ x1245;TUP2 x1249;OBJ x1250;
      x1238=_AImpl_84(x1);
      x1239=_AImpl_92(x1);
      x1241=_ATypeIndepFormAnalysis_1(x1239);*p3=x1241.c3;
      CPPRD(*p3,1);
      x1245=_ATypeIndepExprAnalysis_4(x1235,*p3);
      PRD(3,9,*p1);FLD(*p1,1)=x1235;FLD(*p1,2)=x1241.c1;FLD(*p1,3)=x1238;
      x1249=_ATypeIndepExprAnalysis_3(x1235,x1241.c2);*p2=x1249.c1;
      x1250=_AOcError_21(x1241.c4,x1249.c2);
      *p4=_AOcError_21(x1250,x1245);}}break;
   case 10:
    CPPRD(__AOcError_15,1);
    CPPRD(__ARepSet_2,2);
    *p1=x1;*p2=__ARepSet_2;*p3=__ARepSet_2;*p4=__AOcError_15;break;
   case 8:
    {OBJ x1254=FLD(x1,1);
     COPY(x1254,3);
     CPPRD(x1,1);
     {OBJ x1257;OBJ x1258;TUP4 x1260;OBJ x1264;TUP2 x1268;OBJ x1269;
      x1257=_AImpl_84(x1);
      x1258=_AImpl_92(x1);
      x1260=_ATypeIndepFormAnalysis_1(x1258);*p3=x1260.c3;
      CPPRD(*p3,1);
      x1264=_ATypeIndepExprAnalysis_4(x1254,*p3);
      PRD(3,8,*p1);FLD(*p1,1)=x1254;FLD(*p1,2)=x1260.c1;FLD(*p1,3)=x1257;
      x1268=_ATypeIndepExprAnalysis_3(x1254,x1260.c2);*p2=x1268.c1;
      x1269=_AOcError_21(x1260.c4,x1268.c2);
      *p4=_AOcError_21(x1269,x1264);}}break;
   case 5:
    CPPRD(x1,2);
    {OBJ x1274;OBJ x1275;OBJ x1276;TUP4 x1278;TUP4 x1283;
     x1274=_AImpl_84(x1);
     x1275=_AImpl_103(x1);
     x1276=_AImpl_102(x1);
     x1278=_ATypeIndepFormAnalysis_1(x1276);
     x1283=_ATypeIndepFormAnalysis_1(x1275);
     *p2=_ANatMap_12(x1283.c2,x1278.c2);
     *p3=_ANatMap_12(x1283.c3,x1278.c3);
     PRD(3,5,*p1);FLD(*p1,1)=x1283.c1;FLD(*p1,2)=x1278.c1;FLD(*p1,3)=x1274;
     *p4=_AOcError_21(x1283.c4,x1278.c4);}break;
   case 6:
    CPPRD(x1,2);
    {OBJ x1294;OBJ x1295;OBJ x1296;TUP4 x1298;TUP4 x1303;
     x1294=_AImpl_102(x1);
     x1295=_AImpl_103(x1);
     x1296=_AImpl_84(x1);
     x1298=_ATypeIndepFormAnalysis_1(x1294);
     x1303=_ATypeIndepFormAnalysis_1(x1295);
     *p4=_AOcError_21(x1303.c4,x1298.c4);
     *p3=_ANatMap_12(x1303.c3,x1298.c3);
     PRD(3,6,*p1);FLD(*p1,1)=x1303.c1;FLD(*p1,2)=x1298.c1;FLD(*p1,3)=x1296;
     *p2=_ANatMap_12(x1303.c2,x1298.c2);}break;
   case 4:
    CPPRD(x1,2);
    {OBJ x1314;OBJ x1315;OBJ x1316;TUP4 x1318;TUP4 x1323;
     x1314=_AImpl_84(x1);
     x1315=_AImpl_103(x1);
     x1316=_AImpl_102(x1);
     x1318=_ATypeIndepFormAnalysis_1(x1316);
     x1323=_ATypeIndepFormAnalysis_1(x1315);
     *p2=_ANatMap_12(x1323.c2,x1318.c2);
     *p3=_ANatMap_12(x1323.c3,x1318.c3);
     PRD(3,4,*p1);FLD(*p1,1)=x1323.c1;FLD(*p1,2)=x1318.c1;FLD(*p1,3)=x1314;
     *p4=_AOcError_21(x1323.c4,x1318.c4);}break;
   case 1:
    {OBJ x1331=FLD(x1,1);OBJ x1332=FLD(x1,2);
     CPPRD(x1331,1);CPPRD(x1332,1);
     CPPRD(__ARepSet_2,2);
     {OBJ x1334;TUP5 x1338;TUP5 x1343;
      x1334=_AImpl_84(x1);
      x1338=_ATypeIndepExprAnalysis_1(x1332,__ARepSet_2);
      FRPRD(x1338.c2,1);
      x1343=_ATypeIndepExprAnalysis_1(x1331,__ARepSet_2);
      FRPRD(x1343.c2,1);
      *p4=_AOcError_21(x1343.c5,x1338.c5);
      *p3=_ANatMap_12(x1343.c4,x1338.c4);
      PRD(3,1,*p1);FLD(*p1,1)=x1343.c1;FLD(*p1,2)=x1338.c1;FLD(*p1,3)=x1334;
      *p2=_ANatMap_12(x1343.c3,x1338.c3);}}break;
   case 2:
    {OBJ x1352=FLD(x1,1);OBJ x1353=FLD(x1,2);
     CPPRD(x1352,1);CPPRD(x1353,1);
     CPPRD(__ARepSet_2,2);
     {OBJ x1356;TUP5 x1359;TUP5 x1364;
      x1356=_AImpl_84(x1);
      x1359=_ATypeIndepExprAnalysis_1(x1353,__ARepSet_2);
      FRPRD(x1359.c2,1);
      x1364=_ATypeIndepExprAnalysis_1(x1352,__ARepSet_2);
      FRPRD(x1364.c2,1);
      *p2=_ANatMap_12(x1364.c3,x1359.c3);
      *p3=_ANatMap_12(x1364.c4,x1359.c4);
      PRD(3,2,*p1);FLD(*p1,1)=x1364.c1;FLD(*p1,2)=x1359.c1;FLD(*p1,3)=x1356;
      *p4=_AOcError_21(x1364.c5,x1359.c5);}}break;
   case 0:
    {OBJ x1373=FLD(x1,1);
     CPPRD(x1373,1);
     CPPRD(__ARepSet_2,1);
     {OBJ x1375;TUP5 x1377;
      x1375=_AImpl_84(x1);
      x1377=_ATypeIndepExprAnalysis_1(x1373,__ARepSet_2);*p2=x1377.c3;*p3=x1377.c4;*p4=x1377.c5;
      FRPRD(x1377.c2,1);
      PRD(2,0,*p1);FLD(*p1,1)=x1377.c1;FLD(*p1,2)=x1375;}}break;
   case 11:
    HLT("TypeIndepFormAnalysis at <unknown> : missing else in rearrange\'TypeIndepFormAnalysis:formula->formula**repSet**repSet**err");break;
   default: 
    CPPRD(x1,1);
    {OBJ x1207;OBJ x1208;
     x1207=_AImpl_84(x1);
     x1208=_AImpl_92(x1);
     PRD(2,3,*p1);FLD(*p1,2)=x1207;
     x1=x1208;p1=&FLD(*p1,1);continue;}}
  break;}
 return r;}
extern OBJ _ATypeIndepFormAnalysis_1_c(OBJ x1) /* rearrange */
{OBJ r;
 {TUP4 t=_ATypeIndepFormAnalysis_1(x1);
  PRD1(4,r);
  FLD1(r,1)=t.c1;
  FLD1(r,2)=t.c2;
  FLD1(r,3)=t.c3;
  FLD1(r,4)=t.c4;}
 return r;}

init_ATypeIndepFormAnalysis()
{
 static int visited=0; if(visited) return; visited=1;
 init_ADenotation();
 init_ANatMap();
 init_AArray();
 init_ASeqReduce();
 init_AOcError();
 init_APartName();
 init_AImpl();
 init_ARepSet();
 init_ATriple();
 init_ASeq();
 init_ARep();
 init_AOcPos();
 init_ANat();
 init_AChar();
 init_AOption();
 init_AFct();
 init_APair();
 init_ABitset();
 init_APragma();
 init_AString();
 init_AOcOptions();
 init_ACom();
 init_AVoid();
 init_AStream();
 init_AFile();
 init_AInt();
 init_ATypeIndepExprAnalysis();
 init_ASet();
 init_AMap();
 init_ASetByBST();
 init_ABSTree();
 init_ATree();
 init_ASeqConv();
 CLS(1,_ATypeIndepFormAnalysis_1_c,__ATypeIndepFormAnalysis_1);}

