/* Generated with C2C (Cedar To C)*/
/* Copyright (C) 1992 by Xerox Corporation.  All rights reserved. */
/* time: February 21, 1992 7:27:21 pm PST */
/* C2C version: October 16, 1990 (native) */
/* ref-counting: off */
/* file: ProcessorFaceImpl, module: ProcessorFaceImpl */ 
/* switches: bcfhklnouw */ 
#include <cedar/InstallationSupport.h>
#include <cedar/CedarExtra.h>
static char versionStamp[] = "@(#)mob←version [2124677674,4279112002] ProcessorFaceImpl";
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←Q360();
static void ProcessorFaceImpl←P0();
static void GetProcessorID←P60();
static word GetProcessorType←P120();
static word GetProcessorTypeName←P180();
static word ProcessorTypeFromName←P240();
static word LastProcessorType←P300();
static struct {unsigned f; char r[16];} string1 = {851984, "\257\300\176\244\002\052\300\377\016\021\102\100\164\000\000"};
static struct {unsigned f; char r[4];} string2 = {196611, "\004G\300"};
static struct {unsigned f; char r[16];} string3 = {851984, "\257\300\374\377\221\350\300\202\044\047\115\100\150\000\000"};
static struct {unsigned f; char r[16];} string4 = {851984, "\257\300\011\071\113\334\300\244\027\111\067\100\150\000\000"};
static struct {unsigned f; char r[12];} string6 = {655372, "decstation\000"};
static struct {unsigned f; char r[8];} string8 = {393224, "rs6000\000"};
static struct {unsigned f; char r[8];} string10 = {262152, "sun3\000\000\000"};
static struct {unsigned f; char r[8];} string12 = {262152, "sun4\000\000\000"};
static struct {unsigned f; char r[8];} string14 = {458760, "unknown"};
static struct {
   word f0[12]; word f12; word f13; word f14; 
   word f15; word f16; word f17; word f18; 
   word f19; word f20; word f21; word f22; 
   word f23[3]; 
   } globalframe = {
   {0}, (word) LastProcessorType←P300, 0, (word) ProcessorTypeFromName←P240, 
   0, (word) GetProcessorTypeName←P180, 0, (word) GetProcessorType←P120, 
   0, (word) GetProcessorID←P60, 0, (word) ProcessorFaceImpl←P0, 
   {0}
   };
extern void XR←getxnshostid();

static void NoName←Q360()
   {
   register ptr gf←c030 =  (ptr) &globalframe;
   word var←c4336;
   (void) XR←DeclareGlobalFrame((word) "ProcessorFaceImpl", &globalframe, (word) XR←GetTypeIndex((word) &string1, 0, (word) &string2)
      , (word) (( (bPt) gf←c030)+88)/* var←c4176 */ );
   var←c4336 = (word) XR←ImportInterface((word) "AtomPrivate", (word) XR←GetTypeIndexS((word) (&string3)), 2);
   (* (( (ptr) gf←c030)+24)/* var←c4208 */  ) = var←c4336;
   (void) XR←ImportProcS(var←c4336, 67371265);
   var←c4336 = (word) XR←ExportInterface((word) "ProcessorFace", (word) XR←GetTypeIndexS((word) (&string4)), 5);
   (* (( (ptr) gf←c030)+25)/* var←c4368 */  ) = var←c4336;
   (void) XR←ExportVar(var←c4336, 0, (word) (( (bPt) gf←c030)+16)/* processorID←v2468 */ );
   (void) XR←ExportProcS(var←c4336, (word) (( (bPt) gf←c030)+72)/* var←c4112 */ , 67109120);
   (void) XR←ExportProcS(var←c4336, (word) (( (bPt) gf←c030)+64)/* var←c4080 */ , 67371521);
   (void) XR←ExportProcS(var←c4336, (word) (( (bPt) gf←c030)+56)/* var←c4048 */ , 67371777);
   (void) XR←ExportProcS(var←c4336, (word) (( (bPt) gf←c030)+48)/* var←c4016 */ , 67109888);
   }

static void ProcessorFaceImpl←P0(formal←c019, formal←c017)
   word formal←c019;
   word formal←c017;
   {
   register ptr gf←c4400 =  (ptr) &globalframe;
   /* ProcessorFaceImpl: */ 
SOURCE(107, 1714)
SOURCE(192, 64)
   (void) GetProcessorID←P60((word) ((( (bPt) gf←c4400)+16)/* processorID←v2468 */ ));
SOURCE(1519, 302)
SOURCE(1521, 60)
   {
      word pd5;
      pd5 = (* (( (ptr) (* (( (ptr) gf←c4400)+24)/* var←c4208 */  ))+5) );
      (* (( (ptr) gf←c4400)+6)/* decAtom←v2552 */  ) = (word) ( *( (fPt) ((*  (ptr) pd5 ))))((word) (&string6), pd5);
      };
SOURCE(1583, 59)
   {
      word pd7;
      pd7 = (* (( (ptr) (* (( (ptr) gf←c4400)+24)/* var←c4208 */  ))+5) );
      (* (( (ptr) gf←c4400)+7)/* rs6000Atom←v2580 */  ) = (word) ( *( (fPt) ((*  (ptr) pd7 ))))((word) (&string8), pd7);
      };
SOURCE(1644, 55)
   {
      word pd9;
      pd9 = (* (( (ptr) (* (( (ptr) gf←c4400)+24)/* var←c4208 */  ))+5) );
      (* (( (ptr) gf←c4400)+8)/* sun3Atom←v2608 */  ) = (word) ( *( (fPt) ((*  (ptr) pd9 ))))((word) (&string10), pd9);
      };
SOURCE(1701, 55)
   {
      word pd11;
      pd11 = (* (( (ptr) (* (( (ptr) gf←c4400)+24)/* var←c4208 */  ))+5) );
      (* (( (ptr) gf←c4400)+9)/* sun4Atom←v2636 */  ) = (word) ( *( (fPt) ((*  (ptr) pd11 ))))((word) (&string12), pd11);
      };
SOURCE(1758, 61)
   {
      word pd13;
      pd13 = (* (( (ptr) (* (( (ptr) gf←c4400)+24)/* var←c4208 */  ))+5) );
      (* (( (ptr) gf←c4400)+10)/* unknownAtom←v2664 */  ) = (word) ( *( (fPt) ((*  (ptr) pd13 ))))((word) (&string14), pd13);
      };
   }

static void GetProcessorID←P60(formal←c021)
   word formal←c021;
   {
   W2 processorID←v2856;
   /* GetProcessorID: */ 
SOURCE(260, 272)
SOURCE(499, 33)
   (void) XR←getxnshostid((word) (&processorID←v2856));
   /* removed tail goto */ 
   (*  (W2Pt) formal←c021 ) = processorID←v2856;
   return;
   }

static word GetProcessorType←P120()
   {
   word var←c2916;
   /* GetProcessorType: */ 
SOURCE(539, 198)
SOURCE(721, 16)
   return((word) XR←GetProcessorType());
   }

static word GetProcessorTypeName←P180(type←v2976)
   word type←v2976;
   {
   register ptr gf←c4432 =  (ptr) &globalframe;
   word var←c3020;
   /* GetProcessorTypeName: */ 
SOURCE(865, 255)
SOURCE(954, 166)
   {
      word var←c4272;
      var←c4272 = type←v2976;
      switch (var←c4272) {
         case 0: 
SOURCE(980, 17)
            return((* (( (ptr) gf←c4432)+8)/* sun3Atom←v2608 */  ));
         case 1: 
SOURCE(1007, 17)
            return((* (( (ptr) gf←c4432)+9)/* sun4Atom←v2636 */  ));
         case 2: 
SOURCE(1036, 19)
            return((* (( (ptr) gf←c4432)+7)/* rs6000Atom←v2580 */  ));
         case 3: 
SOURCE(1071, 16)
            return((* (( (ptr) gf←c4432)+6)/* decAtom←v2552 */  ));
         default: 
SOURCE(1100, 20)
            return((* (( (ptr) gf←c4432)+10)/* unknownAtom←v2664 */  ));
         };
      };
   }

static word ProcessorTypeFromName←P240(name←v3080)
   word name←v3080;
   {
   register ptr gf←c4464 =  (ptr) &globalframe;
   word var←c3124;
   /* ProcessorTypeFromName: */ 
SOURCE(1126, 278)
SOURCE(1216, 188)
   {
      word var←c4304;
      var←c4304 = name←v3080;
      if ((var←c4304 == (* (( (ptr) gf←c4464)+8)/* sun3Atom←v2608 */  ))) {
SOURCE(1246, 13)
         return(0);
         };
      if ((var←c4304 == (* (( (ptr) gf←c4464)+9)/* sun4Atom←v2636 */  ))) {
SOURCE(1273, 13)
         return(1);
         };
      if ((var←c4304 == (* (( (ptr) gf←c4464)+7)/* rs6000Atom←v2580 */  ))) {
SOURCE(1302, 15)
         return(2);
         };
      if ((var←c4304 == (* (( (ptr) gf←c4464)+6)/* decAtom←v2552 */  ))) {
SOURCE(1330, 19)
         return(3);
         };
SOURCE(1362, 42)
      return( (word) -1);
      };
   }

static word LastProcessorType←P300()
   {
   word var←c3184;
   /* LastProcessorType: */ 
SOURCE(1410, 98)
SOURCE(1482, 26)
   return(3);
   }

/* file: ProcessorFaceImpl, module: ProcessorFaceImpl, compiled at: February 21, 1992 7:27:21 pm PST */ 
extern void XR←install←ProcessorFaceImpl() {
   NoName←Q360();
   }
extern void XR←run←ProcessorFaceImpl() { XR←Start(&globalframe); }