/* Generated with C2C (Cedar To C)*/
/* Copyright (C) 1993 by Xerox Corporation.  All rights reserved. */
/* time: October 19, 1993 1:04:11 pm PDT */
/* C2C version: April 20, 1993 (sun4) */
/* ref-counting: off */
/* file: TJaMIOImpl, module: TJaMIOImpl */ 
/* switches: bcfhklnouw */ 
#include <cedar/InstallationSupport.h>
#include <cedar/CedarExtra.h>
static char versionStamp[] = "@(#)mob←version [40055616,2127488726] TJaMIOImpl";
typedef unsigned word, *ptr;
typedef unsigned char byte, *bPt;
typedef unsigned short half, *hPt;
typedef word (*fPt)();
typedef struct {word f0, f1, f2, f3, f4, f5, f6, f7;} W8;
typedef struct {word f0, f1, f2;} W3;
typedef struct {W8 f; W3 r;} W11;
typedef struct {word f0, f1;} W2;
typedef struct {word f0, f1, f2, f3;} W4;
typedef W4 *W4Pt;
typedef struct {word f0, f1, f2, f3, f4;} W5;
typedef W5 *W5Pt;
typedef W2 *W2Pt;
#define SOURCE(p, l) /* source p, l */
static void NoName←Q120();
static void TJaMIOImpl←P0();
static void ApplyRun←P60();
static word NoName←Q180();
static void NoName←Q240();
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[12];} string3 = {589836, ".pfserror\000\000"};
static struct {unsigned f; char r[12];} string4 = {524300, ".badname\000\000\000"};
static struct {unsigned f; char r[8];} string5 = {262152, ".run\000\000\000"};
static struct {unsigned f; char r[16];} string6 = {851984, "\257\300\002\143\063\100\300\176\316\346\326\100\164\000\000"};
static struct {unsigned f; char r[4];} string7 = {196611, "\004N0"};
static struct {unsigned f; char r[16];} string8 = {851984, "\257\300\141\260\110\353\300\162\250\066\353\100\150\000\000"};
static struct {unsigned f; char r[16];} string9 = {851984, "\257\300\243\004\305\073\300\011\303\367\103\100\150\000\000"};
static struct {
   word f0[12]; word f12; word f13; word f14; 
   word f15; word f16; word f17[10]; 
   } globalframe = {
   {0}, (word) ApplyRun←P60, 0, (word) TJaMIOImpl←P0, 
   0, (word) 2147483647, {0}
   };

static void NoName←Q120()
   {
   register ptr gf←c033 =  (ptr) &globalframe;
   word var←c9852;
   (* (( (ptr) gf←c033)+7) ) = (word) XR←GetTypeIndex((word) &string1, 0, (word) &string2);
   (*  (ptr) (( (bPt) gf←c033)+36) ) = (word) XR←GetRefLiteral((* (( (ptr) gf←c033)+7) ), (word) &string3);
   (*  (ptr) (( (bPt) gf←c033)+40) ) = (word) XR←GetRefLiteral((* (( (ptr) gf←c033)+7) ), (word) &string4);
   (*  (ptr) (( (bPt) gf←c033)+44) ) = (word) XR←GetRefLiteral((* (( (ptr) gf←c033)+7) ), (word) &string5);
   (void) XR←DeclareGlobalFrame((word) "TJaMIOImpl", &globalframe, (word) XR←GetTypeIndex((word) &string6, 0, (word) &string7)
      , (word) (( (bPt) gf←c033)+56)/* var←c9532 */ );
   var←c9852 = (word) XR←ImportInterface((word) "PFS", (word) XR←GetTypeIndexS((word) (&string8)), 40);
   (* (( (ptr) gf←c033)+26)/* var←c9756 */  ) = var←c9852;
   (void) XR←ImportProcS(var←c9852, 67371265);
   (void) XR←ImportProcS(var←c9852, 71312136);
   var←c9852 = (word) XR←ImportInterface((word) "TJaM", (word) XR←GetTypeIndexS((word) (&string9)), 101);
   (* (( (ptr) gf←c033)+25)/* var←c9692 */  ) = var←c9852;
   (void) XR←ImportProcS(var←c9852, 809987);
   (void) XR←ImportProcS(var←c9852, 531202);
   (void) XR←ImportProcS(var←c9852, 67380993);
   (void) XR←ImportProcS(var←c9852, 812035);
   (void) XR←ImportProcS(var←c9852, 67375617);
   }

static void TJaMIOImpl←P0(formal←c017, formal←c016)
   word formal←c017;
   word formal←c016;
   {
   register ptr gf←c9884 =  (ptr) &globalframe;
   /* TJaMIOImpl: */ 
SOURCE(171, 582)
   /* moved to installation proc */ 
SOURCE(235, 40)
   {
      word pd10;
      pd10 = (* (( (ptr) (* (( (ptr) gf←c9884)+25)/* var←c9692 */  ))+22) );
      (* (( (ptr) gf←c9884)+4)/* badName←v2496 */  ) = (word) ( *( (fPt) ((*  (ptr) pd10 ))))((* ((( (ptr) gf←c9884)+10)) ), pd10)
      ;
      };
SOURCE(277, 42)
   {
      word pd11;
      pd11 = (* (( (ptr) (* (( (ptr) gf←c9884)+25)/* var←c9692 */  ))+22) );
      (* (( (ptr) gf←c9884)+5)/* pfsError←v2524 */  ) = (word) ( *( (fPt) ((*  (ptr) pd11 ))))((* ((( (ptr) gf←c9884)+9)) ), pd11)
      ;
      };
SOURCE(718, 35)
   {
      word pd12;
      pd12 = (* (( (ptr) (* (( (ptr) gf←c9884)+25)/* var←c9692 */  ))+104) );
      (void) ( *( (fPt) ((*  (ptr) pd12 ))))((* (( (ptr) gf←c9884)+11) ), (word) (( (bPt) gf←c9884)+48)/* var←c9500 */ , 0, pd12)
      ;
      };
   }

static void ApplyRun←P60(formal←c042, cmd←v9228)
   word formal←c042;
   word cmd←v9228;
   {
   W11 var←c9916;
   /* declaration of frame←v9200 skipped */ 
   register ptr gf←c9948 =  (ptr) &globalframe;
   word fileName←v2600;
   /* declaration of errorAtom←v2628 skipped */ 
   word stream←v2656 = 0;
   (* (( (ptr) &var←c9916)+4)/* frame←v9200 */  ) = formal←c042;
   /* ApplyRun: */ 
SOURCE(322, 389)
SOURCE(348, 31)
   {
      word pd13;
      pd13 = (* (( (ptr) (* (( (ptr) gf←c9948)+25)/* var←c9692 */  ))+43) );
      fileName←v2600 = (word) ( *( (fPt) ((*  (ptr) pd13 ))))((* ((( (ptr) &var←c9916)+4)/* frame←v9200 */ ) ), pd13);
      };
SOURCE(381, 21)
   (* (( (ptr) &var←c9916)+5)/* errorAtom←v2628 */  ) = 0;
SOURCE(426, 191)
SOURCE(426, 191)
   {
      /* declaration of var←c9724 skipped */ 
      {
         word pd14;
         pd14 = (* (( (ptr) (* (( (ptr) gf←c9948)+26)/* var←c9756 */  ))+5) );
         (* (( (ptr) &var←c9916)+6)/* var←c9724 */  ) = (word) ( *( (fPt) ((*  (ptr) pd14 ))))(fileName←v2600, pd14);
         };
      {
         /* declaration of var←c01 skipped */ 
         /* declaration of var←c02 skipped */ 
         (* (( (ptr) &var←c9916)+7) ) = 4096;
         (* (( (ptr) &var←c9916)+8) ) = 2;
         (* (( (ptr) &var←c9916)+9)/* var←c02 */  ) = (* (( (ptr) (* (( (ptr) gf←c9948)+26)/* var←c9756 */  ))+39) );
         {
            /* declaration of var←c03 skipped */ 
            {
               word var←c04;
               {
                  word var←c039;
                  var←c039 = (word) &var←c9916;
                  var←c04 = (word) XR←Enable(( ((word)  (fPt) NoName←Q180) ), ( ((word)  (fPt) NoName←Q240) ), var←c039);
                  };
               if ((var←c04 == 2)) {
                  goto lab←L100001;
                  };
               };
            stream←v2656 = (* (( (ptr) &var←c9916)+10)/* var←c03 */  );
            };
         };
      };
   lab←L100001: ;
SOURCE(636, 75)
   if ((stream←v2656 != 0)) {
SOURCE(655, 34)
      {
         word pd15;
         pd15 = (* (( (ptr) (* (( (ptr) gf←c9948)+25)/* var←c9692 */  ))+96) );
         (void) ( *( (fPt) ((*  (ptr) pd15 ))))((* (( (ptr) &var←c9916)+4)/* frame←v9200 */  ), stream←v2656, 1, pd15);
         };
      }
   else {
SOURCE(689, 22)
      {
         word var←c025;
         var←c025 = (* (( (ptr) &var←c9916)+5)/* errorAtom←v2628 */  );
         (void) XR←RaiseError((* (( (ptr) (* (( (ptr) gf←c9948)+25)/* var←c9692 */  ))+92) ), (word) &var←c025);
         };
      };
   }

static word NoName←Q180(formal←c037)
   word formal←c037;
   {
   register ptr gf←c036 =  (ptr) &globalframe;
SOURCE(426, 191)
   {
      word pd16;
      pd16 = (* (( (ptr) formal←c037)+9) );
      (* (( (ptr) formal←c037)+10) ) = (word) ( *( (fPt) ((*  (ptr) pd16 ))))((* (( (ptr) formal←c037)+6) ), 0, (*  (W4Pt) (( (ptr) gf←c036)+16)
         /* var←c9596 */  ), 0, 0, (*  (W5Pt) (( (ptr) gf←c036)+20)/* var←c9660 */  )
         , 1, (*  (W2Pt) (( (ptr) formal←c037)+7) ), pd16);
      };
   return(0);
   }

static void NoName←Q240(formal←c032, formal←c200000, formal←c200001, formal←c200002, formal←c200003)
   word formal←c032;
   word formal←c200000;
   word formal←c200001;
   word formal←c200002;
   word formal←c200003;
   {
   register ptr gf←c038 =  (ptr) &globalframe;
   if ((formal←c200001 == (* (( (ptr) (* (( (ptr) gf←c038)+26)/* var←c9756 */  ))+9) ))) {
      {
         W4 error←v9288;
         error←v9288 = (*  (W4Pt) formal←c200003 );
SOURCE(494, 123)
         {
            word var←c9820;
            var←c9820 = error←v9288.f0;
            if ((var←c9820 == 4)) {
SOURCE(526, 19)
               (* (( (ptr) formal←c200000)+5) ) = (* (( (ptr) gf←c038)+4)/* badName←v2496 */  );
               }
            else {
SOURCE(560, 34)
               {
                  word pd17;
                  pd17 = (* (( (ptr) (* (( (ptr) gf←c038)+25)/* var←c9692 */  ))+31) );
                  (void) ( *( (fPt) ((*  (ptr) pd17 ))))((* (( (ptr) formal←c200000)+4) ), error←v9288.f2, pd17);
                  };
SOURCE(596, 21)
               (* (( (ptr) formal←c200000)+5) ) = (* (( (ptr) gf←c038)+5)/* pfsError←v2524 */  );
               };
            };
SOURCE(620, 8)
         (*  (ptr) formal←c032 ) = 2;
         (* (( (ptr) formal←c032)+1) ) = 2;
         return;
         };
      };
   (*  (ptr) formal←c032 ) = 0;
   (* (( (ptr) formal←c032)+1) ) = 0;
   return;
   }

/* file: TJaMIOImpl, module: TJaMIOImpl, compiled at: October 19, 1993 1:04:11 pm PDT */ 
extern void XR←install←TJaMIOImpl() {
   NoName←Q120();
   }
extern void XR←run←TJaMIOImpl() { XR←Start(&globalframe); }