/* Generated with C2C (Cedar To C)*/
/* Copyright (C) 1992 by Xerox Corporation.  All rights reserved. */
/* time: October 12, 1992 2:03:26 pm PDT */
/* C2C version: October 16, 1990 (native) */
/* ref-counting: off */
/* file: MesaBasicsImpl, module: MesaBasicsImpl */ 
/* switches: bcfhklnouw */ 
#include <cedar/InstallationSupport.h>
#include <cedar/CedarExtra.h>
static char versionStamp[] = "@(#)mob←version [2078331943,128915792] MesaBasicsImpl";
typedef unsigned word, *ptr;
typedef unsigned char byte, *bPt;
typedef unsigned short half, *hPt;
#define SOURCE(p, l) /* source p, l */
#define SGNCK(i) ((int) (word) (i) < 0 ? XR←RaiseArithmeticFault(): i )
static void NoName←Q840();
static void MesaBasicsImpl←P0();
extern void XR←MoveWords();
extern void XR←MoveWordsDisjoint();
extern word XR←EqualWords();
extern void XR←MoveBytes();
extern void XR←MoveBytesDisjoint();
extern word XR←ExtractField();
extern void XR←DepositField();
extern void XR←MoveField();
extern word XR←EqualFields();
extern void XR←FillFields();
extern void XR←FillLongFields();
extern void XR←FillWords();
extern void XR←FillLongWords();
static struct {unsigned f; char r[16];} string1 = {851984, "\257\300\173\340\324\047\300\007\257\031\120\100\164\000\000"};
static struct {unsigned f; char r[16];} string2 = {851984, "\257\300\341\052\141\002\300\145\275\236\330\100\150\000\000"};
static struct {
   word f0[4]; word f4; word f5; word f6; 
   word f7; word f8; word f9; word f10; 
   word f11; word f12; word f13; word f14; 
   word f15; word f16; word f17; word f18; 
   word f19; word f20; word f21; word f22; 
   word f23; word f24; word f25; word f26; 
   word f27; word f28; word f29; word f30; 
   word f31[2]; 
   } globalframe = {
   {0}, (word) XR←FillLongWords, 0, (word) XR←FillWords, 
   0, (word) XR←FillLongFields, 0, (word) XR←FillFields, 
   0, (word) XR←EqualFields, 0, (word) XR←MoveField, 
   0, (word) XR←DepositField, 0, (word) XR←ExtractField, 
   0, (word) XR←MoveBytesDisjoint, 0, (word) XR←MoveBytes, 
   0, (word) XR←EqualWords, 0, (word) XR←MoveWordsDisjoint, 
   0, (word) XR←MoveWords, 0, (word) MesaBasicsImpl←P0, 
   {0}
   };

static void NoName←Q840()
   {
   register ptr gf←c082 =  (ptr) &globalframe;
   word var←c7996;
   (void) XR←DeclareGlobalFrame((word) "MesaBasicsImpl", &globalframe, (word) XR←GetTypeIndexS((word) (&string1)), (word) (( (bPt) gf←c082)+120)
      /* var←c7900 */ );
   var←c7996 = (word) XR←ExportInterface((word) "MesaBasics", (word) XR←GetTypeIndexS((word) (&string2)), 13);
   (* (( (ptr) gf←c082)+32)/* var←c7964 */  ) = var←c7996;
   (void) XR←ExportProcS(var←c7996, (word) (( (bPt) gf←c082)+112)/* var←c7868 */ , 786435);
   (void) XR←ExportProcS(var←c7996, (word) (( (bPt) gf←c082)+104)/* var←c7836 */ , 786691);
   (void) XR←ExportProcS(var←c7996, (word) (( (bPt) gf←c082)+96)/* var←c7804 */ , 67895811);
   (void) XR←ExportProcS(var←c7996, (word) (( (bPt) gf←c082)+88)/* var←c7772 */ , 787203);
   (void) XR←ExportProcS(var←c7996, (word) (( (bPt) gf←c082)+80)/* var←c7740 */ , 787459);
   (void) XR←ExportProcS(var←c7996, (word) (( (bPt) gf←c082)+72)/* var←c7708 */ , 67896579);
   (void) XR←ExportProcS(var←c7996, (word) (( (bPt) gf←c082)+64)/* var←c7676 */ , 1050116);
   (void) XR←ExportProcS(var←c7996, (word) (( (bPt) gf←c082)+56)/* var←c7644 */ , 1312517);
   (void) XR←ExportProcS(var←c7996, (word) (( (bPt) gf←c082)+48)/* var←c7612 */ , 68421637);
   (void) XR←ExportProcS(var←c7996, (word) (( (bPt) gf←c082)+40)/* var←c7580 */ , 1313029);
   (void) XR←ExportProcS(var←c7996, (word) (( (bPt) gf←c082)+32)/* var←c7548 */ , 1575430);
   (void) XR←ExportProcS(var←c7996, (word) (( (bPt) gf←c082)+24)/* var←c7516 */ , 789251);
   (void) XR←ExportProcS(var←c7996, (word) (( (bPt) gf←c082)+16)/* var←c7484 */ , 1051652);
   }

static void MesaBasicsImpl←P0(formal←c018, formal←c017)
   word formal←c018;
   word formal←c017;
   {
   /* MesaBasicsImpl: */ 
   }

extern void XR←MoveWords(dst←v3040, src←v3068, len←v3096)
   word dst←v3040;
   word src←v3068;
   word len←v3096;
   {
   /* MoveWords: */ 
SOURCE(768, 130)
SOURCE(830, 68)
   (void) Basics←MoveWords(dst←v3040, src←v3068, len←v3096);
   }

extern void XR←MoveWordsDisjoint(dst←v3156, src←v3184, len←v3212)
   word dst←v3156;
   word src←v3184;
   word len←v3212;
   {
   /* MoveWordsDisjoint: */ 
SOURCE(903, 277)
SOURCE(974, 206)
   if ((((dst←v3156 & 3) + (src←v3184 & 3)) == 0)) {
SOURCE(1042, 68)
      (void) Basics←CopyWords(dst←v3156, src←v3184, len←v3212);
      }
   else {
SOURCE(1121, 59)
      (void) XR←MoveBytes(dst←v3156, src←v3184, (len←v3212 << 2));
      };
   }

extern word XR←EqualWords(src1←v3272, src2←v3300, len←v3328)
   word src1←v3272;
   word src2←v3300;
   word len←v3328;
   {
   word var←c3372;
   word c←v4956;
   /* EqualWords: */ 
SOURCE(1187, 239)
SOURCE(1266, 136)
   c←v4956 = (word) Basics←CompareBits(src1←v3272, 0, src2←v3300, 0, (len←v3328 << 5));
SOURCE(1404, 22)
   return((c←v4956 == 1));
   }

extern void XR←MoveBytes(dest←v3432, src←v3460, len←v3488)
   word dest←v3432;
   word src←v3460;
   word len←v3488;
   {
   word dstStart←v5028;
   word srcStart←v5056;
   word destWP←v5084;
   word srcWP←v5112;
   /* MoveBytes: */ 
SOURCE(1430, 415)
SOURCE(1522, 53)
   dstStart←v5028 = (dest←v3432 & 3);
SOURCE(1577, 52)
   srcStart←v5056 = (src←v3460 & 3);
SOURCE(1631, 44)
   destWP←v5084 = (dest←v3432 - dstStart←v5028);
SOURCE(1677, 42)
   srcWP←v5112 = (src←v3460 - srcStart←v5056);
SOURCE(1721, 124)
   (void) Basics←MoveBytes(destWP←v5084, dstStart←v5028, srcWP←v5112, srcStart←v5056, len←v3488);
   }

extern void XR←MoveBytesDisjoint(dest←v3548, src←v3576, len←v3604)
   word dest←v3548;
   word src←v3576;
   word len←v3604;
   {
   word dstStart←v5204;
   word srcStart←v5232;
   word destWP←v5260;
   word srcWP←v5288;
   /* MoveBytesDisjoint: */ 
SOURCE(1849, 422)
SOURCE(1949, 53)
   dstStart←v5204 = (dest←v3548 & 3);
SOURCE(2004, 52)
   srcStart←v5232 = (src←v3576 & 3);
SOURCE(2058, 44)
   destWP←v5260 = (dest←v3548 - dstStart←v5204);
SOURCE(2104, 42)
   srcWP←v5288 = (src←v3576 - srcStart←v5232);
SOURCE(2148, 123)
   (void) Basics←CopyBytes(destWP←v5260, dstStart←v5204, srcWP←v5288, srcStart←v5232, len←v3604);
   }

extern word XR←ExtractField(base←v3664, offset←v3692, bits←v3720)
   word base←v3664;
   word offset←v3692;
   word bits←v3720;
   {
   word var←c3764;
   word w←v5352 = 0;
   /* ExtractField: */ 
SOURCE(2277, 318)
SOURCE(2376, 74)
   lab←L100002: ;
   if (( (int)offset←v3692 <  (int)0)) {
      }
   else {
      goto lab←L100000;
      };
SOURCE(2396, 28)
   offset←v3692 = (offset←v3692 + 32);
SOURCE(2426, 24)
   base←v3664 = (base←v3664 - 4);
   goto lab←L100002;
   lab←L100000: ;
SOURCE(2461, 123)
   (void) Basics←CopyBits((word) &w←v5352, (32 - bits←v3720), base←v3664, SGNCK(offset←v3692), bits←v3720);
SOURCE(2586, 9)
   return(w←v5352);
   }

extern void XR←DepositField(base←v3824, offset←v3852, bits←v3880, w←v3908)
   word base←v3824;
   word offset←v3852;
   word bits←v3880;
   word w←v3908;
   {
   /* DepositField: */ 
SOURCE(2601, 287)
SOURCE(2680, 74)
   lab←L100005: ;
   if (( (int)offset←v3852 <  (int)0)) {
      }
   else {
      goto lab←L100003;
      };
SOURCE(2700, 28)
   offset←v3852 = (offset←v3852 + 32);
SOURCE(2730, 24)
   base←v3824 = (base←v3824 - 4);
   goto lab←L100005;
   lab←L100003: ;
SOURCE(2765, 123)
   (void) Basics←CopyBits(base←v3824, SGNCK(offset←v3852), (word) &w←v3908, (32 - bits←v3880), bits←v3880);
   }

extern void XR←MoveField(dst←v3968, dstOffset←v3996, src←v4024, srcOffset←v4052, bits←v4080)
   word dst←v3968;
   word dstOffset←v3996;
   word src←v4024;
   word srcOffset←v4052;
   word bits←v4080;
   {
   /* MoveField: */ 
SOURCE(2894, 404)
SOURCE(2994, 81)
   lab←L100008: ;
   if (( (int)dstOffset←v3996 <  (int)0)) {
      }
   else {
      goto lab←L100006;
      };
SOURCE(3017, 34)
   dstOffset←v3996 = (dstOffset←v3996 + 32);
SOURCE(3053, 22)
   dst←v3968 = (dst←v3968 - 4);
   goto lab←L100008;
   lab←L100006: ;
SOURCE(3086, 81)
   lab←L100011: ;
   if (( (int)srcOffset←v4052 <  (int)0)) {
      }
   else {
      goto lab←L100009;
      };
SOURCE(3109, 34)
   srcOffset←v4052 = (srcOffset←v4052 + 32);
SOURCE(3145, 22)
   src←v4024 = (src←v4024 - 4);
   goto lab←L100011;
   lab←L100009: ;
SOURCE(3178, 120)
   (void) Basics←CopyBits(dst←v3968, SGNCK(dstOffset←v3996), src←v4024, SGNCK(srcOffset←v4052), bits←v4080);
   }

extern word XR←EqualFields(x←v4140, xOffset←v4168, y←v4196, yOffset←v4224, bits←v4252)
   word x←v4140;
   word xOffset←v4168;
   word y←v4196;
   word yOffset←v4224;
   word bits←v4252;
   {
   word var←c4296;
   /* EqualFields: */ 
SOURCE(3304, 360)
SOURCE(3411, 71)
   lab←L100014: ;
   if (( (int)xOffset←v4168 <  (int)0)) {
      }
   else {
      goto lab←L100012;
      };
SOURCE(3432, 30)
   xOffset←v4168 = (xOffset←v4168 + 32);
SOURCE(3464, 18)
   x←v4140 = (x←v4140 - 4);
   goto lab←L100014;
   lab←L100012: ;
SOURCE(3493, 71)
   lab←L100017: ;
   if (( (int)yOffset←v4224 <  (int)0)) {
      }
   else {
      goto lab←L100015;
      };
SOURCE(3514, 30)
   yOffset←v4224 = (yOffset←v4224 + 32);
SOURCE(3546, 18)
   y←v4196 = (y←v4196 - 4);
   goto lab←L100017;
   lab←L100015: ;
SOURCE(3575, 89)
   return(((word) Basics←CompareBits(x←v4140, SGNCK(xOffset←v4168), y←v4196, SGNCK(yOffset←v4224), bits←v4252) == 1));
   }

extern void XR←FillFields(dst←v4356, dstOffset←v4384, bits←v4412, times←v4440, value←v4468)
   word dst←v4356;
   word dstOffset←v4384;
   word bits←v4412;
   word times←v4440;
   word value←v4468;
   {
   /* FillFields: */ 
SOURCE(3668, 178)
SOURCE(3765, 81)
   (void) XR←FillLongFields(dst←v4356, dstOffset←v4384, (word) &value←v4468, (32 - bits←v4412), bits←v4412, times←v4440);
   }

extern void XR←FillLongFields(dst←v4528, dstOffset←v4556, src←v4584, srcOffset←v4612, bits←v4640, times←v4668)
   word dst←v4528;
   word dstOffset←v4556;
   word src←v4584;
   word srcOffset←v4612;
   word bits←v4640;
   word times←v4668;
   {
   /* FillLongFields: */ 
SOURCE(3852, 490)
SOURCE(3970, 81)
   lab←L100020: ;
   if (( (int)dstOffset←v4556 <  (int)0)) {
      }
   else {
      goto lab←L100018;
      };
SOURCE(3993, 34)
   dstOffset←v4556 = (dstOffset←v4556 + 32);
SOURCE(4029, 22)
   dst←v4528 = (dst←v4528 - 4);
   goto lab←L100020;
   lab←L100018: ;
SOURCE(4062, 81)
   lab←L100023: ;
   if (( (int)srcOffset←v4612 <  (int)0)) {
      }
   else {
      goto lab←L100021;
      };
SOURCE(4085, 34)
   srcOffset←v4612 = (srcOffset←v4612 + 32);
SOURCE(4121, 22)
   src←v4584 = (src←v4584 - 4);
   goto lab←L100023;
   lab←L100021: ;
SOURCE(4154, 188)
   lab←L100026: ;
   if ((times←v4668 > 0)) {
      }
   else {
      goto lab←L100024;
      };
SOURCE(4173, 120)
   (void) Basics←CopyBits(dst←v4528, SGNCK(dstOffset←v4556), src←v4584, SGNCK(srcOffset←v4612), bits←v4640);
SOURCE(4295, 28)
   dstOffset←v4556 = (dstOffset←v4556 + bits←v4640);
SOURCE(4325, 17)
   times←v4668 = (times←v4668 - 1);
   goto lab←L100026;
   lab←L100024: ;
   }

extern void XR←FillWords(dst←v4728, times←v4756, value←v4784)
   word dst←v4728;
   word times←v4756;
   word value←v4784;
   {
   /* FillWords: */ 
SOURCE(4357, 287)
SOURCE(4424, 220)
   if (((dst←v4728 & 3) != 0)) {
SOURCE(4464, 96)
      lab←L100029: ;
      if ((times←v4756 > 0)) {
         }
      else {
         goto lab←L100027;
         };
SOURCE(4484, 40)
      (void) XR←MoveWords(dst←v4728, (word) &value←v4784, 1);
SOURCE(4526, 15)
      dst←v4728 = (dst←v4728 + 4);
SOURCE(4543, 17)
      times←v4756 = (times←v4756 - 1);
      goto lab←L100029;
      lab←L100027: ;
      }
   else {
SOURCE(4580, 64)
      (void) Basics←FillWords(dst←v4728, times←v4756, value←v4784);
      };
   }

extern void XR←FillLongWords(dst←v4844, src←v4872, nWords←v4900, times←v4928)
   word dst←v4844;
   word src←v4872;
   word nWords←v4900;
   word times←v4928;
   {
   /* FillLongWords: */ 
SOURCE(4653, 222)
SOURCE(4724, 151)
   if ((nWords←v4900 == 1)) {
SOURCE(4745, 35)
      (void) XR←FillWords(dst←v4844, times←v4928, (*  (ptr) src←v4872 ));
      }
   else {
SOURCE(4780, 95)
      lab←L100032: ;
      if ((times←v4928 > 0)) {
         }
      else {
         goto lab←L100030;
         };
SOURCE(4800, 32)
      (void) XR←MoveWords(dst←v4844, src←v4872, nWords←v4900);
SOURCE(4834, 22)
      dst←v4844 = (dst←v4844 + (nWords←v4900 << 2));
SOURCE(4858, 17)
      times←v4928 = (times←v4928 - 1);
      goto lab←L100032;
      lab←L100030: ;
      };
   }

/* file: MesaBasicsImpl, module: MesaBasicsImpl, compiled at: October 12, 1992 2:03:24 pm PDT */ 
extern void XR←install←MesaBasicsImpl() {
   NoName←Q840();
   }
extern void XR←run←MesaBasicsImpl() { XR←Start(&globalframe); }