/* Generated with C2C (Cedar To C)*/
/* Copyright (C) 1993 by Xerox Corporation.  All rights reserved. */
/* time: January 19, 1993 12:23:18 pm PST */
/* C2C version: October 7, 1992 (native) */
/* ref-counting: off */
/* file: CommanderSysPImpl, module: CommanderSysPImpl */ 
/* switches: bcfhklnouw */ 
#include <cedar/InstallationSupport.h>
#include <cedar/CedarExtra.h>
static char versionStamp[] = "@(#)mob←version [4221914629,3177391448] CommanderSysPImpl";
typedef unsigned word, *ptr;
typedef unsigned char byte, *bPt;
typedef unsigned short half, *hPt;
typedef word (*fPt)();
typedef struct {word f0, f1;} W2;
typedef W2 *W2Pt;
#define SOURCE(p, l) /* source p, l */
static void NoName←Q540();
static void CommanderSysPImpl←P0();
static void ExtendedNow←P60();
static word GetEnv←P120();
static void CurrentProcess←P180();
static void AbortProcess←P240();
static word UNCAUGHTProtect←P300();
static void ExitWorldCommand←P360();
static void InterceptTerminationCommand←P420();
static void GCollect←P480();
static struct {unsigned f; char r[16];} string1 = {917520, "\216\257\300\363\223\326\161\300\017\164\046\072\104\350\000"};
static struct {unsigned f; char r[4];} string2 = {65537, "\001\000\000"};
static struct {unsigned f; char r[20];} string3 = {1179668, "Exit the PCR world\000"};
static struct {unsigned f; char r[12];} string4 = {655372, "ExitWorld!\000"};
static struct {unsigned f; char r[56];} string5 = {3539000, "Same as ExitWorld, defeats command abbreviation danger\000"};
static struct {unsigned f; char r[12];} string6 = {524300, "GCollect\000\000\000"};
static struct {unsigned f; char r[24];} string7 = {1507352, "force a garbage collect"};
static struct {unsigned f; char r[12];} string8 = {589836, "ExitWorld\000\000"};
static struct {unsigned f; char r[16];} string9 = {851984, "\257\300\373\245\116\005\300\275\143\045\130\100\164\000\000"};
static struct {unsigned f; char r[4];} string10 = {196611, "\004←\200"};
static struct {unsigned f; char r[16];} string11 = {851984, "\257\300\212\174\364\337\300\361\376\000\156\100\150\000\000"};
static struct {unsigned f; char r[16];} string12 = {851984, "\257\300\373\225\000\071\300\362\156\307\320\100\150\000\000"};
static struct {unsigned f; char r[16];} string13 = {851984, "\257\300\064\321\106\155\300\242\071\325\060\100\150\000\000"};
static struct {unsigned f; char r[16];} string14 = {851984, "\257\300\240\236\274\315\300\111\163\325\023\100\150\000\000"};
static struct {unsigned f; char r[16];} string15 = {851984, "\257\300\277\374\326\303\300\302\136\022\175\100\150\000\000"};
static struct {unsigned f; char r[16];} string16 = {851984, "\257\300\210\010\162\111\300\030\013\367\102\100\150\000\000"};
static struct {unsigned f; char r[16];} string17 = {851984, "\257\300\322\342\022\352\300\100\014\165\000\100\150\000\000"};
static struct {unsigned f; char r[16];} string18 = {851984, "\257\300\327\320\204\011\300\302\026\022\076\100\150\000\000"};
static struct {
   word f0[13]; 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[9]; 
   } globalframe = {
   {0}, (word) GCollect←P480, 0, (word) InterceptTerminationCommand←P420, 
   0, (word) ExitWorldCommand←P360, 0, (word) UNCAUGHTProtect←P300, 
   0, (word) AbortProcess←P240, 0, (word) CurrentProcess←P180, 
   0, (word) GetEnv←P120, 0, (word) ExtendedNow←P60, 
   0, (word) CommanderSysPImpl←P0, {0}
   };

static void NoName←Q540()
   {
   register ptr gf←c049 =  (ptr) &globalframe;
   word var←c9652;
   (* (( (ptr) gf←c049)+5) ) = (word) XR←GetTypeIndex((word) &string1, 0, (word) &string2);
   (*  (ptr) (( (bPt) gf←c049)+28) ) = (word) XR←GetRefLiteral((* (( (ptr) gf←c049)+5) ), (word) &string3);
   (*  (ptr) (( (bPt) gf←c049)+32) ) = (word) XR←GetRefLiteral((* (( (ptr) gf←c049)+5) ), (word) &string4);
   (*  (ptr) (( (bPt) gf←c049)+36) ) = (word) XR←GetRefLiteral((* (( (ptr) gf←c049)+5) ), (word) &string5);
   (*  (ptr) (( (bPt) gf←c049)+40) ) = (word) XR←GetRefLiteral((* (( (ptr) gf←c049)+5) ), (word) &string6);
   (*  (ptr) (( (bPt) gf←c049)+44) ) = (word) XR←GetRefLiteral((* (( (ptr) gf←c049)+5) ), (word) &string7);
   (*  (ptr) (( (bPt) gf←c049)+48) ) = (word) XR←GetRefLiteral((* (( (ptr) gf←c049)+5) ), (word) &string8);
   (void) XR←DeclareGlobalFrame((word) "CommanderSysPImpl", &globalframe, (word) XR←GetTypeIndex((word) &string9, 0, (word) &string10)
      , (word) (( (bPt) gf←c049)+116)/* var←c9236 */ );
   var←c9652 = (word) XR←ImportInterface((word) "BasicTime", (word) XR←GetTypeIndexS((word) (&string11)), 24);
   (* (( (ptr) gf←c049)+32)/* var←c9300 */  ) = var←c9652;
   (void) XR←ImportProcS(var←c9652, 134220544);
   var←c9652 = (word) XR←ImportInterface((word) "Commander", (word) XR←GetTypeIndexS((word) (&string12)), 3);
   (* (( (ptr) gf←c049)+31)/* var←c9268 */  ) = var←c9652;
   (void) XR←ImportProcS(var←c9652, 1310725);
   var←c9652 = (word) XR←ImportInterface((word) "PreDebug", (word) XR←GetTypeIndexS((word) (&string13)), 5);
   (* (( (ptr) gf←c049)+35)/* var←c9556 */  ) = var←c9652;
   (void) XR←ImportProcS(var←c9652, 67633922);
   var←c9652 = (word) XR←ImportInterface((word) "Process", (word) XR←GetTypeIndexS((word) (&string14)), 22);
   (* (( (ptr) gf←c049)+34)/* var←c9460 */  ) = var←c9652;
   (void) XR←ImportProcS(var←c9652, 527105);
   (void) XR←ImportProcS(var←c9652, 134219776);
   var←c9652 = (word) XR←ImportInterface((word) "SafeStorage", (word) XR←GetTypeIndexS((word) (&string15)), 27);
   (* (( (ptr) gf←c049)+37)/* var←c9620 */  ) = var←c9652;
   (void) XR←ImportProcS(var←c9652, 526082);
   var←c9652 = (word) XR←ImportInterface((word) "Termination", (word) XR←GetTypeIndexS((word) (&string16)), 5);
   (* (( (ptr) gf←c049)+36)/* var←c9588 */  ) = var←c9652;
   (void) XR←ImportProcS(var←c9652, 768);
   (void) XR←ImportProcS(var←c9652, 524290);
   var←c9652 = (word) XR←ImportInterface((word) "UnixEnviron", (word) XR←GetTypeIndexS((word) (&string17)), 1);
   (* (( (ptr) gf←c049)+33)/* var←c9396 */  ) = var←c9652;
   (void) XR←ImportProcS(var←c9652, 67371009);
   var←c9652 = (word) XR←ExportInterface((word) "CommanderSys", (word) XR←GetTypeIndexS((word) (&string18)), 5);
   (* (( (ptr) gf←c049)+38)/* var←c9684 */  ) = var←c9652;
   (void) XR←ExportProcS(var←c9652, (word) (( (bPt) gf←c049)+108)/* var←c9204 */ , 134217728);
   (void) XR←ExportProcS(var←c9652, (word) (( (bPt) gf←c049)+100)/* var←c9172 */ , 67371265);
   (void) XR←ExportProcS(var←c9652, (word) (( (bPt) gf←c049)+92)/* var←c9140 */ , 134218240);
   (void) XR←ExportProcS(var←c9652, (word) (( (bPt) gf←c049)+84)/* var←c9108 */ , 525057);
   (void) XR←ExportProcS(var←c9652, (word) (( (bPt) gf←c049)+76)/* var←c9076 */ , 67634178);
   }

static void CommanderSysPImpl←P0(formal←c022, formal←c021)
   word formal←c022;
   word formal←c021;
   {
   register ptr gf←c9716 =  (ptr) &globalframe;
   /* CommanderSysPImpl: */ 
SOURCE(111, 1414)
SOURCE(1176, 104)
   {
      word pd19;
      pd19 = (* (( (ptr) (* (( (ptr) gf←c9716)+31)/* var←c9268 */  ))+4) );
      (void) ( *( (fPt) ((*  (ptr) pd19 ))))((* (( (ptr) gf←c9716)+12) ), (word) (( (bPt) gf←c9716)+68)/* var←c9044 */ , (* (( (ptr) gf←c9716)+7)
          ), 0, 1, pd19);
      };
SOURCE(1282, 141)
   {
      word pd20;
      pd20 = (* (( (ptr) (* (( (ptr) gf←c9716)+31)/* var←c9268 */  ))+4) );
      (void) ( *( (fPt) ((*  (ptr) pd20 ))))((* (( (ptr) gf←c9716)+8) ), (word) (( (bPt) gf←c9716)+68)/* var←c9044 */ , (* (( (ptr) gf←c9716)+9)
          ), 0, 1, pd20);
      };
SOURCE(1425, 100)
   {
      word pd21;
      pd21 = (* (( (ptr) (* (( (ptr) gf←c9716)+31)/* var←c9268 */  ))+4) );
      (void) ( *( (fPt) ((*  (ptr) pd21 ))))((* (( (ptr) gf←c9716)+10) ), (word) (( (bPt) gf←c9716)+52)/* var←c8980 */ , (* (( (ptr) gf←c9716)+11)
          ), 0, 1, pd21);
      };
   }

static void ExtendedNow←P60(formal←c026)
   word formal←c026;
   {
   register ptr gf←c9748 =  (ptr) &globalframe;
   word var←c059;
   word var←c060;
   W2 now←v3644;
   /* ExtendedNow: */ 
SOURCE(287, 128)
   /* Return var split */ 
SOURCE(331, 52)
   {
      word pd22;
      pd22 = (* (( (ptr) (* (( (ptr) gf←c9748)+32)/* var←c9300 */  ))+15) );
      (void) ( *( (fPt) ((*  (ptr) pd22 ))))((word) (&now←v3644), pd22);
      };
SOURCE(385, 30)
   var←c059 = now←v3644.f0;
   var←c060 = now←v3644.f1;
   /* removed tail goto */ 
   (* (( (ptr) formal←c026)+1) ) = var←c060;
   (*  (ptr) formal←c026 ) = var←c059;
   return;
   }

static word GetEnv←P120(key←v3168)
   word key←v3168;
   {
   register ptr gf←c9780 =  (ptr) &globalframe;
   word var←c3212;
   /* GetEnv: */ 
SOURCE(419, 84)
SOURCE(470, 33)
   {
      word pd23;
      pd23 = (* (( (ptr) (* (( (ptr) gf←c9780)+33)/* var←c9396 */  ))+4) );
      return((word) ( *( (fPt) ((*  (ptr) pd23 ))))(key←v3168, pd23));
      };
   }

static void CurrentProcess←P180(formal←c032)
   word formal←c032;
   {
   register ptr gf←c9812 =  (ptr) &globalframe;
   W2 var←c3272;
   /* CurrentProcess: */ 
SOURCE(507, 79)
SOURCE(557, 29)
   {
      W2 var←c9492;
      {
         word pd24;
         pd24 = (* (( (ptr) (* (( (ptr) gf←c9812)+34)/* var←c9460 */  ))+12) );
         (void) ( *( (fPt) ((*  (ptr) pd24 ))))((word) (&var←c9492), pd24);
         };
      var←c3272 = var←c9492;
      /* removed tail goto */ 
      };
   (*  (W2Pt) formal←c032 ) = var←c3272;
   return;
   }

static void AbortProcess←P240(process←v3348)
   W2 process←v3348;
   {
   register ptr gf←c9844 =  (ptr) &globalframe;
   /* AbortProcess: */ 
SOURCE(592, 79)
SOURCE(649, 22)
   {
      word pd25;
      pd25 = (* (( (ptr) (* (( (ptr) gf←c9844)+34)/* var←c9460 */  ))+15) );
      (void) ( *( (fPt) ((*  (ptr) pd25 ))))(process←v3348, pd25);
      };
   }

static word UNCAUGHTProtect←P300(inner←v3424, rejectP←v3452)
   word inner←v3424;
   word rejectP←v3452;
   {
   register ptr gf←c9876 =  (ptr) &globalframe;
   word ok←v3616;
   /* UNCAUGHTProtect: */ 
SOURCE(677, 152)
SOURCE(677, 152)
   ok←v3616 = 1;
SOURCE(787, 42)
   {
      word pd26;
      pd26 = (* (( (ptr) (* (( (ptr) gf←c9876)+35)/* var←c9556 */  ))+7) );
      return((word) ( *( (fPt) ((*  (ptr) pd26 ))))(inner←v3424, rejectP←v3452, pd26));
      };
   }

static void ExitWorldCommand←P360(formal←c040, cmd←v4400)
   word formal←c040;
   word cmd←v4400;
   {
   register ptr gf←c9908 =  (ptr) &globalframe;
   word result←v4444;
   word msg←v4472;
   /* ExitWorldCommand: */ 
SOURCE(833, 131)
SOURCE(833, 131)
   result←v4444 = 0;
SOURCE(833, 131)
   msg←v4472 = 0;
SOURCE(877, 69)
   {
      word pd27;
      pd27 = (* (( (ptr) (* (( (ptr) gf←c9908)+36)/* var←c9588 */  ))+4) );
      (void) ( *( (fPt) ((*  (ptr) pd27 ))))((* (( (ptr) cmd←v4400)+4) ), 0, pd27);
      };
SOURCE(948, 16)
   result←v4444 = 0;
   msg←v4472 = 0;
   /* removed tail goto */ 
   (*  (ptr) formal←c040 ) = result←v4444;
   (* (( (ptr) formal←c040)+1) ) = msg←v4472;
   return;
   }

static void InterceptTerminationCommand←P420(formal←c044, cmd←v4532)
   word formal←c044;
   word cmd←v4532;
   {
   register ptr gf←c9940 =  (ptr) &globalframe;
   word result←v4576;
   word msg←v4604;
   /* InterceptTerminationCommand: */ 
SOURCE(969, 103)
SOURCE(969, 103)
   result←v4576 = 0;
SOURCE(969, 103)
   msg←v4604 = 0;
SOURCE(1024, 30)
   {
      word pd28;
      pd28 = (* (( (ptr) (* (( (ptr) gf←c9940)+36)/* var←c9588 */  ))+7) );
      (void) ( *( (fPt) ((*  (ptr) pd28 ))))(pd28);
      };
SOURCE(1056, 16)
   result←v4576 = 0;
   msg←v4604 = 0;
   /* removed tail goto */ 
   (*  (ptr) formal←c044 ) = result←v4576;
   (* (( (ptr) formal←c044)+1) ) = msg←v4604;
   return;
   }

static void GCollect←P480(formal←c048, cmd←v4664)
   word formal←c048;
   word cmd←v4664;
   {
   register ptr gf←c9972 =  (ptr) &globalframe;
   word result←v4708;
   word msg←v4736;
   /* GCollect: */ 
SOURCE(1077, 93)
SOURCE(1077, 93)
   result←v4708 = 0;
SOURCE(1077, 93)
   msg←v4736 = 0;
SOURCE(1113, 39)
   {
      word pd29;
      pd29 = (* (( (ptr) (* (( (ptr) gf←c9972)+37)/* var←c9620 */  ))+11) );
      (void) ( *( (fPt) ((*  (ptr) pd29 ))))(1, 0, pd29);
      };
SOURCE(1154, 16)
   result←v4708 = 0;
   msg←v4736 = 0;
   /* removed tail goto */ 
   (*  (ptr) formal←c048 ) = result←v4708;
   (* (( (ptr) formal←c048)+1) ) = msg←v4736;
   return;
   }

/* file: CommanderSysPImpl, module: CommanderSysPImpl, compiled at: January 19, 1993 12:23:18 pm PST */ 
extern void XR←install←CommanderSysPImpl() {
   NoName←Q540();
   }
extern void XR←run←CommanderSysPImpl() { XR←Start(&globalframe); }